qzyReal 3 سال پیش
والد
کامیت
1e67e61c9f
37فایلهای تغییر یافته به همراه1015 افزوده شده و 154 حذف شده
  1. 8 2
      app/apis/api.js
  2. 14 0
      app/pages.json
  3. 1 1
      app/pages/business-entering/business-edit.vue
  4. 1 3
      app/pages/business-entering/business-entering.vue
  5. 3 3
      app/pages/business-order/business-order.vue
  6. 19 3
      app/pages/index/index.vue
  7. 57 0
      app/pages/onely-disinfect/addSuccess.vue
  8. 170 0
      app/pages/onely-disinfect/disinfect-Index.vue
  9. 50 3
      app/pages/wx/payOrder.vue
  10. 1 1
      app/utils/request.js
  11. 12 0
      sp-admin/sa-frame/menu-list.js
  12. 4 3
      sp-admin/sa-view/car/tb-business-car-list.html
  13. 1 1
      sp-admin/sa-view/tb-business/tb-business-add.html
  14. 1 1
      sp-admin/sa-view/tb-business/tb-business-edit.html
  15. 28 17
      sp-admin/sa-view/tb-business/tb-business-list.html
  16. 186 0
      sp-admin/sa-view/tb-business/tb-car-disincle-list.html
  17. 1 0
      sp-admin/sa-view/tb-partner/tb-partner-info.html
  18. 1 1
      sp-admin/sa-view/tb-partner/tb-partner-list.html
  19. 1 1
      sp-admin/static/sa.js
  20. 1 1
      sp-server/app.pid
  21. 23 1
      sp-server/src/main/java/com/pj/api/h5/ApiController.java
  22. 3 3
      sp-server/src/main/java/com/pj/api/open/service/OpenService.java
  23. 61 1
      sp-server/src/main/java/com/pj/api/service/ApiService.java
  24. 130 0
      sp-server/src/main/java/com/pj/api/wx/MerchantApiUtil.java
  25. 34 3
      sp-server/src/main/java/com/pj/api/wx/service/WxService.java
  26. 22 0
      sp-server/src/main/java/com/pj/project/tb_business/CarDisincle.java
  27. 2 0
      sp-server/src/main/java/com/pj/project/tb_business/TbBusiness.java
  28. 13 2
      sp-server/src/main/java/com/pj/project/tb_business/TbBusinessController.java
  29. 11 8
      sp-server/src/main/java/com/pj/project/tb_business/TbBusinessMapper.java
  30. 77 62
      sp-server/src/main/java/com/pj/project/tb_business/TbBusinessMapper.xml
  31. 41 16
      sp-server/src/main/java/com/pj/project/tb_business/TbBusinessService.java
  32. 2 2
      sp-server/src/main/java/com/pj/project/tb_business_car/TbBusinessCarMapper.xml
  33. 28 9
      sp-server/src/main/java/com/pj/project/tb_business_car/TbBusinessCarService.java
  34. 1 0
      sp-server/src/main/java/com/pj/project/tb_item_type/TbItemType.java
  35. 1 0
      sp-server/src/main/java/com/pj/project/tb_item_type/TbItemTypeMapper.xml
  36. 5 5
      sp-server/src/main/resources/application-dev.yml
  37. 1 1
      sp-server/src/main/resources/application-pro.yml

+ 8 - 2
app/apis/api.js

@@ -11,8 +11,8 @@ export default {
 	register(data) {
 		return ajax.postForm('/api/register', data)
 	},
-	getItemList() {
-		return ajax.get('/TbItemType/getList')
+	getItemList(data) {
+		return ajax.get('/TbItemType/getList',data)
 	},
 	getCustomerList() {
 		return ajax.get('/TbCostomer/getList', {
@@ -176,6 +176,12 @@ export default {
 	},
 	editCustomerAdmin(data){
 		return ajax.postForm('/admin/editCustomerAdmin',data)
+	},
+	adminConfirm(data){
+		return ajax.postForm('/TbBusiness/confirm',data)
+	},
+	addCarDisinfect(data){
+		return ajax.postForm('/api/addCarDisinfect',data)
 	}
 
 }

+ 14 - 0
app/pages.json

@@ -278,6 +278,20 @@
 				"navigationBarTitleText": ""
 			}
 		
+		},
+		{
+			"path": "pages/onely-disinfect/disinfect-Index",
+			"style": {
+				"navigationBarTitleText": ""
+			}
+		
+		},
+		{
+			"path": "pages/onely-disinfect/addSuccess",
+			"style": {
+				"navigationBarTitleText": ""
+			}
+		
 		}
 
 

+ 1 - 1
app/pages/business-entering/business-edit.vue

@@ -550,7 +550,7 @@
 				})
 			},
 			getItemList() {
-				this.$api.getItemList().then(resp => {
+				this.$api.getItemList({business:1}).then(resp => {
 					this.itemList = resp.data;
 					this.getBusinessById();
 				})

+ 1 - 3
app/pages/business-entering/business-entering.vue

@@ -252,7 +252,6 @@
 					driverName: '',
 					driverPhone: '',
 					expectInDay: ''
-
 				},
 				show: false,
 				item: {
@@ -306,7 +305,6 @@
 		onShow() {
 			this.customerId = uni.getStorageSync('customerId');
 			this.perList=uni.getStorageSync('perList')
-			console.log(this.perList)
 		},
 		computed: {
 			totalPrice() {
@@ -491,7 +489,7 @@
 					let noNeedIds = goods.noNeedIds.split(',');
 					this.needTypeId = goods.needIds.split(',')
 					this.noNeedIds = goods.noNeedIds.split(',')
-					this.$api.getItemList().then(resp => {
+					this.$api.getItemList({business:1}).then(resp => {
 						let list = resp.data;
 						this.itemList = list;
 						this.filterItemList = list.filter(obj => noNeedIds.indexOf(obj.id) == -1);

+ 3 - 3
app/pages/business-order/business-order.vue

@@ -52,8 +52,8 @@
 					<view class="btn b3" v-if="customemrId=='1'&&perList.indexOf('tb-business-item')!==-1" @click="businessFn(businessItem)">
 						作业订单</view>
 					<view class="btn b3" v-if="businessItem.payStatus==1
-								&&perList.indexOf('tb-business-confirm')!=-1
-								&&customemrId!='1'" @click="sureZdFn(businessItem)">
+								&&perList.indexOf('tb-business-confirm')!=-1"
+								 @click="sureZdFn(businessItem)">
 						账单</view>
 					<view class="btn b3" v-if="customemrId!=='1'" @click="fkFn(businessItem)">
 						证明</view>
@@ -159,6 +159,7 @@
 				this.$common.to('/pages/business-order/sureOut?id=' + data.id)
 			},
 			getBusinessList() {
+				this.p.isCar=0;
 				this.$api.getBusinessList(this.p).then(resp => {
 					this.status = 'loadmore';
 					this.p.pageNo = resp.pageNo;
@@ -199,7 +200,6 @@
 			},
 
 			ccconfirm(index) {
-				console.log('出场')
 				this.$refs.ccpopup.close()
 			},
 			zd() {

+ 19 - 3
app/pages/index/index.vue

@@ -58,7 +58,14 @@
 					text: '企业注册',
 					url: '/pages/enterprise-reg/enterprise-reg',
 					customer:true
-				}],
+				},{
+					auth: false,
+					icon: '../../static/home-icon-06.jpg',
+					text: '车辆消杀',
+					url: '/pages/onely-disinfect/disinfect-Index',
+					customer:true
+				}
+				],
 				code: '',
 				state: '',
 				userType: 1,
@@ -280,13 +287,22 @@
 				this.isLogin = false;
 				this.userName = '';
 				this.companyName = ''
-				this.indexItemList = [{
+				this.indexItemList = [
+					{
 					auth: false,
 					icon: '../../static/home-icon-01.png',
 					text: '企业注册',
 					url: '/pages/enterprise-reg/enterprise-reg',
 					customer:true
-				}]
+				},
+				{
+					auth: false,
+					icon: '../../static/home-icon-06.jpg',
+					text: '车辆消杀',
+					url: '/pages/onely-disinfect/disinfect-Index',
+					customer:true
+				}
+				]
 			},
 			navTo(item) {
 				let auth = item.auth;

+ 57 - 0
app/pages/onely-disinfect/addSuccess.vue

@@ -0,0 +1,57 @@
+<template>
+	<view class="box">
+		<u-icon name="checkmark-circle-fill" color="#07c160" size="200"></u-icon>
+		<text class="text">申报信息提交成功!</text>
+		<view class="count-down-box">
+			<view @click="goback">返回</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				timestamp: 3,
+			}
+		},
+		onBackPress() {
+			this.goback();
+			return true;
+		},
+		methods: {
+			goback() {
+				this.$common.to('/pages/index/index');
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		background-color: #fff;
+	}
+
+	.box {
+		display: flex;
+		flex: 1;
+		align-items: center;
+		justify-content: center;
+		flex-direction: column;
+		padding: 100rpx 0;
+
+		.text {
+			color: #191919;
+			font-size: 36rpx;
+			font-weight: bold;
+			margin-top: 40rpx;
+		}
+
+		.count-down-box {
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			margin-top: 30rpx;
+		}
+	}
+</style>

+ 170 - 0
app/pages/onely-disinfect/disinfect-Index.vue

@@ -0,0 +1,170 @@
+<template>
+	<view>
+		<view class="box">
+			<view class="top">
+				<text class="title">车辆消杀</text>
+			</view>
+			<view class="item-line">
+				基本信息
+			</view>
+			<view class="item">
+				<view class="l"><text style="color: red;">*</text>车牌号:</view>
+				<view class="r">
+					<u-input placeholder="请填写车牌号" v-model="form.carNo" />
+				</view>
+			</view>
+			<view class="item">
+				<view class="l"><text style="color: red;">*</text>车辆类型:</view>
+				<view class="r">
+					<picker class="p-picker" id="qy" @change="bindPickerChange($event)" :value="type.index"
+						:range="type.list" range-key="name">
+						<text class="p-text">{{type.list[type.index]}}</text>
+						<u-icon class="p-icon" name="arrow-down-fill" size="20"></u-icon>
+					</picker>
+				</view>
+			</view>
+			<view class="item-line">
+				业务项
+			</view>
+			<view class="item" v-for="item in itemList" :key="item.id">
+				<view class="l">{{item.itemName}}:
+				</view>
+				<view class="r">
+					<view style="margin-left: 20rpx;">
+						{{item.price}}元
+					</view>
+				</view>
+			</view>
+			<view class="item-line">
+				其他费用
+			</view>
+			<view class="item">
+				<view class="l">停车费:
+				</view>
+				<view class="r">
+					<view style="margin-left: 20rpx;">
+						30元
+					</view>
+				</view>
+			</view>
+		</view>
+		<u-button type="primary" text="确定" @click="saveFn"></u-button>
+		<u-button type="info" text="重置" @click="resetFn" style="margin-top: 20rpx;"></u-button>
+		<!-- ---------------------------------------------------------- -->
+		<view class="bottom-safety"></view>
+
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				type: {
+					index: 0,
+					list: ['空车', '载货']
+				},
+				form: {
+					carNo: ''
+				},
+				itemList: [],
+				list: []
+			}
+		},
+
+		mounted() {
+			this.getTypeList();
+		},
+		onBackPress() {
+			this.$common.to('/pages/index/index');
+			return true;
+		},
+		methods: {
+			bindPickerChange(e) {
+				let index = e.detail.value;
+				this.type.index = index //当前picker选中的值
+				if (index == 0) {
+					this.itemList = this.list;
+				} else {
+					this.itemList = this.list.filter(obj => obj.itemName == '车头消杀')
+				}
+			},
+			getTypeList() {
+				this.$api.getItemList({
+					business: 0
+				}).then(resp => {
+					let list = resp.data[0].items;
+					this.itemList = list;
+					this.list = list;
+				})
+			},
+			resetFn() {
+				this.form.carNo = '';
+				this.type.index = 0;
+				this.itemList = this.list;
+			},
+			saveFn() {
+				if(!this.form.carNo){
+					this.$common.toast('请输入车牌号')
+					return;
+				}
+				this.form.itemJson=JSON.stringify(this.itemList);
+				this.form.carType=this.type.list[this.type.index]
+				let that=this;
+				uni.showModal({
+					title:'提示',
+					content:'确认录入该车辆的消杀业务?',
+					success(res) {
+						if(res.confirm){
+							that.$api.addCarDisinfect(that.$common.removeNull(that.form)).then(resp => {
+								if (resp.code == 200) {
+									that.$common.to('/pages/onely-disinfect/addSuccess')
+								}
+							})
+						}
+					}
+				})
+			
+			},
+		},
+
+	}
+</script>
+
+<style lang="scss">
+	page {
+		background-color: #fff;
+	}
+
+	.hs-item {
+		text-align: center;
+	}
+
+	.item-line {
+		color: #a2a2a2;
+		padding: 5px 0 10px 29px;
+		border-bottom: 1px solid #E5E5E5;
+	}
+
+	.hj {
+		padding: 50rpx;
+		font-size: 40rpx;
+		color: red;
+		font-weight: bold;
+	}
+
+	.save-btn {
+		background-color: #ff4200;
+		height: 88rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		margin: 60rpx;
+		color: #fff;
+		font-size: 30rpx;
+		font-weight: bold;
+		border-radius: 10rpx;
+	}
+
+	@import '@/common/common.scss'
+</style>

+ 50 - 3
app/pages/wx/payOrder.vue

@@ -43,9 +43,24 @@
 					{{form.totalMoney}}元
 				</view>
 			</view>
+			<view class="item">
+				<view class="l" style="flex: 7;">状态:</view>
+				<view class="r">
+					<text v-if="form.adminConfirmInput==0">未确认</text>
+					<text v-else>已确认</text>
+				</view>
+			</view>
+		</view>
+		<view v-if="form.adminConfirmInput==0">
+			<u-button type="info" v-if="customerId!=='1'">待确认</u-button>
+			<u-button type="primary" v-if="customerId=='1'
+			&&perList.indexOf('tb-business-confirm')!==-1" @click="adminConfirmFn">确认账单</u-button>
+		</view>
+		<view v-else>
+			<u-button type="primary" v-if="form.payStatus==1&&customerId!=='1'&&form.adminConfirmInput==1"
+				@click="confirmFn">支付账单</u-button>
+			<u-button type="info" v-if="form.payStatus==3">已支付</u-button>
 		</view>
-		<u-button type="primary" v-if="form.payStatus==1" @click="confirmFn">确认并支付</u-button>
-		<u-button type="info" v-if="form.payStatus==3">已支付</u-button>
 	</view>
 </template>
 
@@ -54,6 +69,8 @@
 	export default {
 		data() {
 			return {
+				customerId: '',
+				perList: [],
 				wx: {
 					id: '',
 					code: '',
@@ -75,9 +92,34 @@
 			this.getWxConfig();
 		},
 		onShow() {
+			this.perList = uni.getStorageSync('perList')
+			let info = uni.getStorageSync('userInfo');
+			this.customerId = info.customerId;
+
 			this.getBusinessById();
 		},
 		methods: {
+			adminConfirmFn() {
+				let that = this;
+				uni.showModal({
+					title: '提示',
+					content: '是否确认该业务账单?',
+					success(res) {
+						if (res.confirm) {
+							that.$api.adminConfirm({
+								ids: that.form.id
+							}).then(resp => {
+								if (resp.code == 200) {
+									that.$common.toast('已确认');
+									setTimeout(() => {
+										that.$common.to('/pages/business-order/business-order');
+									}, 1500)
+								}
+							})
+						}
+					}
+				})
+			},
 			getWxConfig() {
 				let url = window.location.href;
 				this.$api.getWxConfig({
@@ -124,7 +166,12 @@
 			confirmFn() {
 				let p = {
 					b: this.wx.id,
-					c:JSON.stringify(this.form.cars.map(obj=>{return {id:obj.id,p:obj.basePartMoney}})),
+					c: JSON.stringify(this.form.cars.map(obj => {
+						return {
+							id: obj.id,
+							p: obj.basePartMoney
+						}
+					})),
 					money: this.form.totalMoney,
 					tradeType: "JSAPI",
 					openid: this.wx.openid

+ 1 - 1
app/utils/request.js

@@ -1,6 +1,6 @@
 const server = 'http://127.0.0.1:8099/pro';
 // const server = 'http://pco.aseanbusiness.cn/pro';
-//const server = 'https://dxkaa1.bgigc.com/pro';
+// const server = 'https://dxkaa1.bgigc.com/pro';
 
 import common from '../common/js/common.js';
 

+ 12 - 0
sp-admin/sa-frame/menu-list.js

@@ -241,6 +241,18 @@ var menuList = [{
 		
 		]
 	},
+	
+	{
+		id: 'tb-car-disincle',
+		name: '车辆消杀',
+		icon: 'el-icon-notebook-2',
+		parent: true,
+		childList: [{
+			id: 'tb-car-disincle-list',
+			name: '消杀管理',
+			url: 'sa-view/tb-business/tb-car-disincle-list.html'
+		}, ]
+	},
 	{
 		id: 'tb-business',
 		name: '业务录入',

+ 4 - 3
sp-admin/sa-view/car/tb-business-car-list.html

@@ -19,7 +19,7 @@
 		<div class="vue-box" style="display: none;" :style="'display: block;'">
 			<div class="c-panel">
 				<div class="fast-btn">
-					<el-button size="mini" type="primary"  @click="add()" v-if="payStatus==1&&sa.isAuth('tb-business-edit')">
+					<el-button size="mini" type="primary"  @click="add()" v-if="confirm==0&&sa.isAuth('tb-business-edit')">
 						新增</el-button>
 						<el-button size="mini" type="info" @click="sa.f5()">刷新</el-button>
 				</div>
@@ -54,9 +54,9 @@
 							</el-button>
 							<el-button class="c-btn" type="success" icon="el-icon-view" @click="get(s.row)">查看
 							</el-button>
-							<el-button v-if="s.row.pay==0&&sa.isAuth('tb-business-edit')" class="c-btn" type="primary" icon="el-icon-edit" @click="update(s.row)">修改
+							<el-button v-if="confirm==0&&sa.isAuth('tb-business-edit')" class="c-btn" type="primary" icon="el-icon-edit" @click="update(s.row)">修改
 							</el-button>
-							<el-button v-if="s.row.pay==0&&sa.isAuth('tb-business-edit')" class="c-btn" type="danger" icon="el-icon-delete" @click="del(s.row)">删除
+							<el-button v-if="confirm==0&&sa.isAuth('tb-business-edit')" class="c-btn" type="danger" icon="el-icon-delete" @click="del(s.row)">删除
 							</el-button>
 						</template>
 					</el-table-column>
@@ -107,6 +107,7 @@
 				el: '.vue-box',
 				data: {
 					payStatus:sa.p('payStatus',1),
+					confirm:sa.p('confirm',0),
 					p: { // 查询参数  
 						id: '', //  
 						businessId: sa.p('id', ''), //  

+ 1 - 1
sp-admin/sa-view/tb-business/tb-business-add.html

@@ -651,7 +651,7 @@
 						}.bind(this))
 					},
 					getItemTypeList() {
-						sa.ajax('/TbItemType/getList', function(resp) {
+						sa.ajax('/TbItemType/getList',{business:1}, function(resp) {
 							let typeList = resp.data;
 							// 初始化数据
 							if (this.id > 0) {

+ 1 - 1
sp-admin/sa-view/tb-business/tb-business-edit.html

@@ -544,7 +544,7 @@
 						}.bind(this))
 					},
 					getItemTypeList() {
-						sa.ajax('/TbItemType/getList', function(resp) {
+						sa.ajax('/TbItemType/getList',{business:1}, function(resp) {
 							let typeList = resp.data;
 							// 初始化数据
 							sa.ajax('/TbBusiness/getById?id=' + this.id, function(res) {

+ 28 - 17
sp-admin/sa-view/tb-business/tb-business-list.html

@@ -20,7 +20,7 @@
 		.complete-modal .c-label,
 		.confirm-in .c-label,
 		.confirm-info .c-label {
-			width: 200px;
+			width: 140px;
 		}
 	</style>
 	<body>
@@ -59,30 +59,31 @@
 					<sa-td name="业务单号" prop="no" width="160"></sa-td>
 					<sa-td name="境外车牌号" width="130" prop="cardNo"></sa-td>
 					<sa-td name="载重(吨)" prop="netWeight"></sa-td>
+					<sa-td name="确认" prop="adminConfirmInput" type="enum" :jv="{1: '已确认', 0: '未确认'}"></sa-td>
 					<sa-td name="总用费(元)" prop="totalMoney"></sa-td>
-					<sa-td name="已支付用费(元)" prop="payMoney"></sa-td>
+					<sa-td name="已支付(元)" prop="payMoney" width="140"></sa-td>
 					<sa-td width="160" name="录入时间" prop="createTime"></sa-td>
 					</sa-td>
 					<el-table-column label="操作" width="240px" fixed="right">
 						<template slot-scope="s">
-							<el-button class="c-btn" type="primary" v-if="s.row.confirmInput==0
+							<el-button class="c-btn" type="primary"
+						v-if="s.row.adminConfirmInput==0
 								&&s.row.payStatus==1
-								&&s.row.complete==1
 								&&sa.isAuth('tb-business-confirm')
-								&&currentCustomerId!='1'" @click="confirmFn(s.row)">确认账单</el-button>
+								&&currentCustomerId=='1'" @click="confirmFn(s.row)">确认账单</el-button>
 							<el-button class="c-btn" type="success"
 							v-if="sa.isAuth('tb-business-pay')
 								&&s.row.payStatus==1
-								&&s.row.confirmInput==1
+								&&s.row.adminConfirmInput==1
 								&&currentCustomerId!='1'" @click="payFn(s.row)">
 								马上支付</el-button>
 							<el-button class="c-btn" type="primary" @click="itemFn(s.row)">业务项</el-button>
 							<el-button v-if="sa.isAuth('tb-business-add')" class="c-btn" type="primary" @click="carFn(s.row)">车辆管理
 							</el-button>
 							<el-button class="c-btn" type="success" @click="get(s.row)">查看</el-button>
-							<el-button  class="c-btn" type="primary" v-if="s.row.confirmInput==0&&sa.isAuth('tb-business-edit')" @click="update(s.row)">
+							<el-button  class="c-btn" type="primary" v-if="s.row.adminConfirmInput==0&&sa.isAuth('tb-business-edit')" @click="update(s.row)">
 								修改</el-button>
-							<el-button class="c-btn" type="danger" v-if="s.row.payStatus==1&&sa.isAuth('tb-business-del')" @click="del(s.row)">删除
+							<el-button class="c-btn" type="danger" v-if="s.row.payStatus==1&&sa.isAuth('tb-business-del')&&s.row.adminConfirmInput==0" @click="del(s.row)">删除
 							</el-button>
 						</template>
 					</el-table-column>
@@ -100,15 +101,24 @@
 					<el-button type="primary" @click="surePayFn">确 定</el-button>
 				</span>
 			</el-dialog>
-			<el-dialog title="确认账单" :visible.sync="confirm.visible" width="400px">
+			<el-dialog title="确认账单" :visible.sync="confirm.visible" width="650px">
 				<div class="confirm-info">
-					<sa-info name="订单号" br>{{confirm.form.no}}</sa-info>
-					<sa-info :name="item.itemTypeName" br v-for="item in confirm.form.items">
-						{{item.itemPrice}}x{{item.num}}={{item.total}}元
-					</sa-info>
-					<sa-info name="业务费用" br>{{confirm.form.itemPrice}}(元)</sa-info>
-					<sa-info name="停车费用" br>{{confirm.form.partMoney+confirm.form.chinaPartMoney}}(元)</sa-info>
-					<sa-info name="合计费用" br>{{confirm.form.totalMoney}}(元)</sa-info>
+					<el-row>
+						<el-col span="12">
+							<sa-info name="订单号" br>{{confirm.form.no}}</sa-info>
+							<sa-info name="客户" br>{{confirm.form.customerName}}</sa-info>
+							<sa-info :name="item.itemTypeName" br v-for="item in confirm.form.items">
+								{{item.itemPrice}}x{{item.num}}={{item.total}}元
+							</sa-info>
+							<sa-info name="业务费用" br>{{confirm.form.itemPrice}}(元)</sa-info>
+						</el-col>
+						<el-col span="12">
+							<sa-info name="中国车停车费" br>{{confirm.form.chinaPartMoney}}(元)</sa-info>
+							<sa-info name="越南车停车费" br>{{confirm.form.partMoney}}(元)</sa-info>
+								<sa-info name="停车费合计" br>{{confirm.form.partMoney+confirm.form.chinaPartMoney}}(元)</sa-info>
+							<sa-info name="合计费用" br>{{confirm.form.totalMoney}}(元)</sa-info>
+						</el-col>
+					</el-row>
 				</div>
 				<span slot="footer" class="dialog-footer">
 					<el-button @click="confirm.visible = false">取 消</el-button>
@@ -204,6 +214,7 @@
 						customerId: '', // 客户id 
 						customerName: '', // 客户名称 
 						no: '', // 编号 
+						isCar:0,
 						cardNo: '', // 车牌号 
 						cardSize: '', // 车规格 
 						netWeight: '', // 载重(kg) 
@@ -263,7 +274,7 @@
 						sa.showIframe('业务项', 'tb-business-item-list.html?businessId=' + data.id, '1050px', '95%');
 					},
 					carFn(data) {
-						sa.showIframe('车辆管理', '../car/tb-business-car-list.html?id=' + data.id+'&payStatus='+data.payStatus, '1050px', '95%');
+						sa.showIframe('车辆管理', '../car/tb-business-car-list.html?id=' + data.id+'&payStatus='+data.payStatus+'&confirm='+data.adminConfirmInput, '1050px', '95%');
 					},
 					blurFn() {
 						console.log(123)

+ 186 - 0
sp-admin/sa-view/tb-business/tb-car-disincle-list.html

@@ -0,0 +1,186 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<title>入境登记-列表</title>
+		<meta charset="utf-8">
+		<meta name="viewport"
+			content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
+		<!-- 所有的 css & js 资源 -->
+		<link rel="stylesheet" href="../../static/kj/element-ui/theme-chalk/index.css">
+		<link rel="stylesheet" href="../../static/sa.css">
+		<script src="../../static/kj/vue.min.js"></script>
+		<script src="../../static/kj/element-ui/index.js"></script>
+		<script src="../../static/kj/httpVueLoader.js"></script>
+		<script src="../../static/kj/jquery.min.js"></script>
+		<script src="../../static/kj/layer/layer.js"></script>
+		<script src="../../static/sa.js"></script>
+		<script src="../../static/kj/upload-util.js"></script>
+	</head>
+	<style>
+		.complete-modal .c-label,
+		.confirm-in .c-label,
+		.confirm-info .c-label {
+			width: 140px;
+		}
+	</style>
+	<body>
+		<div class="vue-box" style="display: none;" :style="'display: block;'">
+			<div class="c-panel">
+				<!-- ------------- 检索参数 ------------- -->
+				<div class="c-title">检索参数</div>
+				<el-form ref="form" :model='p' @submit.native.prevent>
+					<sa-item type="text" name="车牌号" placeholder="越南车牌" v-model="p.cardNo"></sa-item>
+					<div class="c-item">
+						<label class="c-label">确认状态:</label>
+						<el-select v-model="p.adminConfirmInput" placeholder="请选择" @change="f5()">
+							<el-option label="全部" :value="-1"></el-option>
+							<el-option label="已确认" :value="1"></el-option>
+							<el-option label="未确认" :value="0"></el-option>
+						</el-select>
+					</div>
+					<el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
+					<el-button type="info" icon="el-icon-search" @click="p.cardNo = ''; f5()">重置</el-button>
+					<br />
+				</el-form>
+				<!-- ------------- 快捷按钮 ------------- -->
+				<!-- <div class="fast-btn">
+					<el-button  v-if="sa.isAuth('tb-business-add')" size="mini" type="primary" @click="add()">
+						新增</el-button>
+					<el-button size="mini" type="success" @click="getBySelect()">查看</el-button>
+					<el-button size="mini" type="info" @click="sa.f5()">重置</el-button>
+				</div> -->
+				<!-- ------------- 数据列表 ------------- -->
+				<el-table class="data-table" ref="data-table" :data="dataList">
+					<sa-td name="业务单号" prop="no" width="160"></sa-td>
+					<sa-td name="业务类型" prop="goodsName" ></sa-td>
+					<sa-td name="车牌号"  prop="carNo"></sa-td>
+					<sa-td name="确认" prop="adminConfirmInput" type="enum" :jv="{1: '已确认', 0: '未确认'}"></sa-td>
+					<sa-td name="业务用费(元)" prop="itemPrice" width="130"></sa-td>
+					<sa-td name="停车用费(元)" prop="basePartMoney" width="130"></sa-td>
+					<sa-td name="总用费(元)" prop="totalMoney"></sa-td>
+					<sa-td name="已支付(元)" prop="payMoney" width="140"></sa-td>
+					<sa-td name="入场时间" prop="realInTime" width="140"></sa-td>
+					<sa-td name="离场时间" prop="realOutTime" width="140"></sa-td>
+					<sa-td width="160" name="创建时间" prop="createTime"></sa-td>
+					</sa-td>
+					<el-table-column label="操作" width="240px" fixed="right">
+						<template slot-scope="s">
+							<el-button class="c-btn" type="primary" v-if="sa.isAuth('tb-business-confirm')
+								&&currentCustomerId=='1'" @click="confirmFn(s.row)">业务确认</el-button>
+						</template>
+					</el-table-column>
+				</el-table>
+				<!-- ------------- 分页 ------------- -->
+				<sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()">
+				</sa-item>
+			</div>
+			<el-dialog title="业务确认" :visible.sync="confirm.visible" width="650px">
+				<div class="confirm-info">
+					<el-row>
+						<el-col span="12">
+							<sa-info name="订单号" br>{{confirm.form.no}}</sa-info>
+							<sa-info :name="item.itemName" br v-for="item in confirm.form.items">
+								{{item.itemPrice}}x{{item.num}}={{item.total}}元
+							</sa-info>
+						</el-col>
+						<el-col span="12">
+							<sa-info name="业务费用" br>{{confirm.form.itemPrice}}(元)</sa-info>
+							<sa-info name="停车费" br>{{confirm.form.partMoney}}(元)</sa-info>
+							<sa-info name="合计费用" br>{{confirm.form.totalMoney}}(元)</sa-info>
+						</el-col>
+					</el-row>
+				</div>
+				<span slot="footer" class="dialog-footer">
+					<div v-if="confirm.form.adminConfirmInput==0">
+						<el-button @click="confirm.visible = false">取 消</el-button>
+						<el-button type="primary" @click="sureConfirmFn" >确 认</el-button>
+					</div>
+					<div v-else>
+						<el-button @click="confirm.visible = false">关闭</el-button>
+						<el-button type="info">已确认</el-button>
+					</div>
+				</span>
+			</el-dialog>
+		</div>
+		<script>
+			var app = new Vue({
+				components: {
+					"sa-info": httpVueLoader('../../sa-frame/com/sa-info.vue'),
+					"sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
+					"sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
+				},
+				el: '.vue-box',
+				data: {
+					value: '',
+					currentCustomerId: '1',
+					confirm: {
+						visible: false,
+						form: {
+							ids: ''
+						}
+					},
+					p: { // 查询参数  
+						id: '', // 主键 
+						no: '', // 编号 
+						isCar: 1,
+						adminConfirmInput:-1,
+						cardNo: '', // 车牌号 
+						outDayTime: '', // 离境时间 
+						partMoney: '', // 停车费用 
+						partTime: '', // 停车时常(分) 
+						pageNo: 1, // 当前页 
+						pageSize: 10, // 页大小 
+						sortType: 0 // 排序方式 
+					},
+					dataCount: 0,
+					dataList: [], // 数据集合 
+					timmer: null,
+					fresh: {
+						value: 60
+					}
+				},
+				methods: {
+					getPcodeByCurrRid() {
+						sa.ajax('/SpRolePermission/getPcodeByCurrRid', function(resp) {
+							this.perCode = resp.data;
+						}.bind(this))
+					},
+					confirmFn(data) {
+						sa.ajax('/TbBusinessItem/getList', {
+							businessId: data.id
+						}, function(resp) {
+							data.items = resp.data;
+							Object.assign(this.confirm, {
+								visible: true,
+								form: data,
+							})
+							this.confirm.form.ids = data.id;
+						}.bind(this));
+					},
+					sureConfirmFn() {
+						sa.ajax('/TbBusiness/confirm', {
+							ids: this.confirm.form.ids
+						}, function(resp) {
+							this.confirm.visible = false;
+							this.f5();
+						}.bind(this))
+					},
+					// 刷新
+					f5: function() {
+						sa.ajaxNoLoading('/TbBusiness/getCarDisincleList', sa.removeNull(this.p), function(res) {
+							this.dataList = res.data; // 数据
+							this.dataCount = res.dataCount; // 数据总数 
+							sa.f5TableHeight(); // 刷新表格高度 
+						}.bind(this));
+					},
+				},
+				created: function() {
+					sa.onInputEnter();
+				},
+				mounted() {
+					this.f5();
+				},
+			})
+		</script>
+	</body>
+</html>

+ 1 - 0
sp-admin/sa-view/tb-partner/tb-partner-info.html

@@ -36,6 +36,7 @@
 								<sa-info name="类型" br>
 									<span v-if="m.type == 1">消杀公司</span>
 									<span v-if="m.type == 2">装卸公司</span>
+									<span v-if="m.type == 3">核酸检测单位</span>
 								</sa-info>
 								<sa-info name="创建时间" br>{{m.creareTime}}</sa-info>
 								<sa-info type="img" name="营业执照" :value="m.businessLicence" br></sa-info>

+ 1 - 1
sp-admin/sa-view/tb-partner/tb-partner-list.html

@@ -34,7 +34,7 @@
 				<el-table class="data-table" ref="data-table" :data="dataList">
 					<sa-td type="selection"></sa-td>
 					<sa-td name="名称" prop="name"></sa-td>
-					<sa-td name="类型" prop="type" type="enum" :jv="{1: '消杀公司', 2: '装卸公司'}"></sa-td>
+					<sa-td name="类型" prop="type" type="enum" :jv="{1: '消杀公司', 2: '装卸公司',3: '核酸检测单位'}"></sa-td>
 					<sa-td name="联系人" prop="dutyPeople"></sa-td>
 					<sa-td name="联系电话" prop="phone"></sa-td>
 					<sa-td name="营业执照" prop="businessLicence" type="img"></sa-td>

+ 1 - 1
sp-admin/static/sa.js

@@ -22,7 +22,7 @@ var sa = {
 		api_url: 'https://dxkaa1.bgigc.com/pro',
 		web_url: 'http://www.baidu.com'
 	}
-	sa.cfg = cfg_test; // 最终环境 , 上线前请选择正确的环境
+	sa.cfg = cfg_dev; // 最终环境 , 上线前请选择正确的环境
 })();
 
 

+ 1 - 1
sp-server/app.pid

@@ -1 +1 @@
-29408
+18816

+ 23 - 1
sp-server/src/main/java/com/pj/api/h5/ApiController.java

@@ -17,6 +17,7 @@ import com.pj.project.tb_declare.TbDeclare;
 import com.pj.project.tb_disinfect.TbDisinfect;
 import com.pj.project.tb_district.TbDistrict;
 import com.pj.project4sp.admin4login.SpAccAdminService;
+import com.pj.project4sp.global.BusinessException;
 import com.pj.utils.sg.AjaxJson;
 import com.pj.utils.sg.NbUtil;
 import com.pj.utils.so.SoMap;
@@ -101,7 +102,9 @@ public class ApiController {
 
     @GetMapping(value = "searchPartCar")
     public AjaxJson searchPartCar(String carNo) {
+
         List<TbBusinessCar> list = apiService.searchPartCar(carNo);
+
         return AjaxJson.getSuccessData(list);
     }
 
@@ -184,7 +187,7 @@ public class ApiController {
         int type = 1;
         if (!StrUtil.equals(customerId, UserTypeEnum.PLATFORM_ADMIN.getCustomerId())) {
             TbCostomer tbCostomer = tbCostomerService.getById(customerId);
-            if (TbCostomer.CustomerEnum.BUSINESS_TYPE.getType() .equals(tbCostomer.getType())) {
+            if (TbCostomer.CustomerEnum.BUSINESS_TYPE.getType().equals(tbCostomer.getType())) {
                 type = 2;
             } else {
                 type = 3;
@@ -192,4 +195,23 @@ public class ApiController {
         }
         return AjaxJson.getSuccessData(type);
     }
+
+    @RequestMapping(value = "addCarDisinfect")
+    public AjaxJson addCarDisinfect() {
+        SoMap so = SoMap.getRequestSoMap();
+        String carNo = so.getString("carNo");
+        if (StrUtil.isEmpty(carNo)){
+            throw new BusinessException("请录入车牌号");
+        }
+        String itemJson = so.getString("itemJson");
+        if (StrUtil.isEmpty(itemJson)){
+            throw new BusinessException("业务类型错误");
+        }
+        String carType = so.getString("carType");
+        if (StrUtil.isEmpty(carType)){
+            throw new BusinessException("请选车业务类型");
+        }
+        apiService.addCarDisinfect(carNo,itemJson,carType);
+        return AjaxJson.getSuccess();
+    }
 }

+ 3 - 3
sp-server/src/main/java/com/pj/api/open/service/OpenService.java

@@ -56,9 +56,9 @@ public class OpenService {
 
     private void handlerIn(String carNo, String channel) {
         carNo = carNo.toUpperCase();
-        TbBusinessCar tbBusinessCar = tbBusinessCarService.findNotInCar(carNo);
+        TbBusinessCar tbBusinessCar = tbBusinessCarService.findTheLastRecord(carNo);
         Date now = new Date();
-        if (tbBusinessCar == null) {
+        if (tbBusinessCar == null||(tbBusinessCar.getRealInTime()!=null&&tbBusinessCar.getRealOutTime()!=null)) {
             tbBusinessCar = new TbBusinessCar();
             tbBusinessCar.setCarNo(carNo).setPay(0).setCarSize(3D).setInChannel(channel).setRealInTime(now);
             tbBusinessCarService.save(tbBusinessCar);
@@ -95,7 +95,7 @@ public class OpenService {
             for (TbBusinessItem tbBusinessItem : items) {
                 itemPayPrice = itemPayPrice.add(tbBusinessItem.getItemPrice());
             }
-            if (!business.getItemPrice().equals(itemPayPrice) && business.getCustomerType() != 2) {
+            if (!business.getItemPrice().equals(itemPayPrice) && business.getCustomerType() != 2&&StrUtil.isNotEmpty(business.getDeclareNo())) {
                 return ResultJson.error("请缴纳业务费用");
             }
         }

+ 61 - 1
sp-server/src/main/java/com/pj/api/service/ApiService.java

@@ -3,13 +3,16 @@ package com.pj.api.service;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.io.unit.DataUnit;
+import cn.hutool.core.util.NumberUtil;
 import cn.hutool.core.util.RandomUtil;
 import cn.hutool.core.util.StrUtil;
+import cn.hutool.json.JSONUtil;
 import com.pj.api.bo.InOutRecordBO;
 import com.pj.api.wx.bo.MsgDataBO;
 import com.pj.api.wx.service.WxService;
 import com.pj.constants.UserTypeEnum;
 import com.pj.current.config.MyConfig;
+import com.pj.current.config.PartConfig;
 import com.pj.current.config.WxConfig;
 import com.pj.current.satoken.StpUserUtil;
 import com.pj.project.tb_account.TbAccount;
@@ -30,10 +33,12 @@ import com.pj.project.tb_disinfect.TbDisinfect;
 import com.pj.project.tb_disinfect.TbDisinfectService;
 import com.pj.project.tb_district.TbDistrict;
 import com.pj.project.tb_district.TbDistrictService;
+import com.pj.project.tb_item.TbItem;
 import com.pj.project.tb_pass_record.TbPassRecord;
 import com.pj.project.tb_pass_record.TbPassRecordService;
 import com.pj.project4sp.admin.SpAdmin;
 import com.pj.project4sp.admin.SpAdminService;
+import com.pj.project4sp.global.BusinessException;
 import com.pj.utils.cache.RedisUtil;
 import com.pj.utils.sg.AjaxJson;
 import com.pj.utils.so.SoMap;
@@ -47,6 +52,7 @@ import java.math.BigDecimal;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
 import java.util.*;
+import java.util.stream.Collectors;
 
 /**
  *
@@ -86,6 +92,8 @@ public class ApiService {
     private WxConfig wxConfig;
     @Resource
     private MyConfig myConfig;
+    @Resource
+    private PartConfig partConfig;
 
     public List<InOutRecordBO> getInOutRecord(SoMap so) {
         List<TbPassRecord> passRecords = tbPassRecordService.getList(so);
@@ -113,7 +121,13 @@ public class ApiService {
     }
 
     public List<TbBusinessCar> searchPartCar(String carNo) {
-        return tbBusinessCarService.searchPartCar(carNo);
+        List<TbBusinessCar> list = tbBusinessCarService.searchPartCar(carNo);
+//        list = list.stream().filter(tbBusinessCar -> {
+//            String businessId = tbBusinessCar.getBusinessId();
+//            TbBusiness tbBusiness = tbBusinessService.getById(businessId);
+//            return tbBusiness.getAdminConfirmInput() == 1;
+//        }).collect(Collectors.toList());
+        return list;
     }
 
     public void confirm(List<String> ids) {
@@ -228,4 +242,50 @@ public class ApiService {
     public List<TbBusinessItem> getPartnerBusinessItem(SoMap startPage) {
         return tbBusinessItemService.getList(startPage);
     }
+
+    public void addCarDisinfect(String carNo, String itemJson, String carType) {
+        TbBusinessCar db = tbBusinessCarService.checkCar(carNo);
+        if (db != null) {
+            throw new BusinessException("该车辆有未完成作业");
+        }
+        db = new TbBusinessCar();
+        db.setCarNo(carNo).setIsLock(0);
+        TbBusiness tbBusiness=new TbBusiness();
+        if (StpUserUtil.isLogin()) {
+            String customerId = StpUserUtil.getCustomerId();
+            db.setCustomerId(customerId);
+            TbCostomer tbCostomer=tbCostomerService.getById(customerId);
+            tbBusiness.setCustomerId(customerId).setCustomerName(tbCostomer.getName());
+        }
+        db.setPay(0).setCarSize(12D);
+        List<TbItem>tbItems= JSONUtil.toList(itemJson,TbItem.class);
+        BigDecimal price=new BigDecimal("0");
+        List<TbBusinessItem>itemList=new ArrayList<>();
+       String no= LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmm"))+RandomUtil.randomNumbers(4);
+       int index=1;
+        for (TbItem tbItem : tbItems) {
+            TbBusinessItem item = new TbBusinessItem();
+            item.setNo(no+"0"+index)
+                    .setBusinessType(TbCostomer.CustomerEnum.DISINFECT_TYPE.getType());
+            item.setItemCode(tbItem.getItemCode()).setNum("1")
+                    .setItemName(tbItem.getItemName()).setItemPrice(tbItem.getPrice())
+                    .setItemTypeId(tbItem.getTypeId()).setItemTypeName(tbItem.getTypeName())
+                    .setUnit(tbItem.getUnit()).setTotal(tbItem.getPrice()).setCreateTime(new Date());
+            price=  price.add(item.getItemPrice());
+         itemList.add(item);
+         index++;
+        }
+        BigDecimal initCarPartMoney = partConfig.getBasePrice();
+        tbBusiness.setPartMoney(initCarPartMoney)
+                .setNo(no).setGoodsName(carType)
+                .setCreateTime(new Date())
+        .setItemPrice(price)
+                .setTotalMoney(price.add(initCarPartMoney)).setCardNo(carNo);
+        tbBusinessService.save(tbBusiness);
+        db.setBusinessId(tbBusiness.getId());
+        tbBusinessCarService.save(db);
+        itemList.forEach(tbBusinessItem -> tbBusinessItem.setBusinessId(tbBusiness.getId()));
+        tbBusinessItemService.saveBatch(itemList);
+    }
+
 }

+ 130 - 0
sp-server/src/main/java/com/pj/api/wx/MerchantApiUtil.java

@@ -0,0 +1,130 @@
+package com.pj.api.wx;
+
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.crypto.SecureUtil;
+import cn.hutool.log.StaticLog;
+
+import java.io.UnsupportedEncodingException;
+import java.util.Map;
+import java.util.SortedMap;
+import java.util.TreeMap;
+
+public class MerchantApiUtil {
+
+	/**
+	 * 获取参数签名
+	 * 
+	 * @param paramMap
+	 *            签名参数
+	 * @param paySecret
+	 *            签名密钥
+	 * @return
+	 */
+	public static String getSign(Map<String, Object> paramMap, String paySecret) {
+		SortedMap<String, Object> smap = new TreeMap<String, Object>(paramMap);
+		if (smap.get("sign") != null) {
+			smap.remove("sign");
+		}
+		StringBuilder stringBuffer = new StringBuilder();
+		for (Map.Entry<String, Object> m : smap.entrySet()) {
+			Object value = m.getValue();
+			if (value != null && StrUtil.isNotEmpty(value.toString())) {
+				stringBuffer.append(m.getKey()).append("=").append(value).append("&");
+			}
+		}
+		stringBuffer.delete(stringBuffer.length() - 1, stringBuffer.length());
+		String argPreSign = stringBuffer.append("&paySecret=").append(paySecret).toString();
+		return	SecureUtil.md5(argPreSign).toUpperCase();
+	}
+
+	/**
+	 * 获取参数拼接串
+	 * 
+	 * @param paramMap
+	 * @return
+	 */
+	public static String getParamStr(Map<String, Object> paramMap) {
+		SortedMap<String, Object> smap = new TreeMap<String, Object>(paramMap);
+		StringBuffer stringBuffer = new StringBuffer();
+		for (Map.Entry<String, Object> m : smap.entrySet()) {
+			Object value = m.getValue();
+			if (value != null && StrUtil.isNotEmpty(value.toString())) {
+				stringBuffer.append(m.getKey()).append("=").append(value).append("&");
+			}
+		}
+		stringBuffer.delete(stringBuffer.length() - 1, stringBuffer.length());
+		return stringBuffer.toString();
+	}
+	/**
+	 * 获取参数拼接串
+	 *
+	 * @param paramMap
+	 * @return
+	 */
+	public static String getParamStr2(Map<String, String> paramMap) {
+		SortedMap<String, Object> smap = new TreeMap<String, Object>(paramMap);
+		StringBuffer stringBuffer = new StringBuffer();
+		for (Map.Entry<String, Object> m : smap.entrySet()) {
+			Object value = m.getValue();
+			if (value != null && StrUtil.isNotEmpty(value.toString())) {
+				stringBuffer.append(m.getKey()).append("=").append(value).append("&");
+			}
+		}
+		stringBuffer.delete(stringBuffer.length() - 1, stringBuffer.length());
+
+		return stringBuffer.toString();
+	}
+
+	/**
+	 * 获取参数拼接串
+	 *
+	 * @param paramMap
+	 * @return
+	 */
+	public static String getParamStrUrlEncode(Map<String, Object> paramMap) {
+		SortedMap<String, Object> smap = new TreeMap<String, Object>(paramMap);
+		StringBuffer stringBuffer = new StringBuffer();
+		for (Map.Entry<String, Object> m : smap.entrySet()) {
+			Object value = m.getValue();
+			if (value != null && StrUtil.isNotEmpty(value.toString())) {
+				String key = m.getKey();
+				String keyValue = null;
+				try {
+					keyValue = java.net.URLEncoder.encode(value.toString(), "UTF-8");
+				} catch (UnsupportedEncodingException e) {
+					StaticLog.error("error:{}",e);
+				}
+				stringBuffer.append(key).append("=").append(keyValue).append("&");
+			}
+		}
+		stringBuffer.delete(stringBuffer.length() - 1, stringBuffer.length());
+
+		return stringBuffer.toString();
+	}
+
+	/**
+	 * 验证商户签名
+	 * 
+	 * @param paramMap
+	 *            签名参数
+	 * @param paySecret
+	 *            签名私钥
+	 * @param signStr
+	 *            原始签名密文
+	 * @return
+	 */
+	public static boolean isRightSign(Map<String, Object> paramMap, String paySecret, String signStr) {
+
+		if (StrUtil.isEmpty(signStr)) {
+			return false;
+		}
+
+		String sign = getSign(paramMap, paySecret);
+		if (signStr.equals(sign)) {
+			return true;
+		} else {
+			return false;
+		}
+	}
+
+}

+ 34 - 3
sp-server/src/main/java/com/pj/api/wx/service/WxService.java

@@ -42,6 +42,8 @@ import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import java.math.BigDecimal;
 import java.nio.charset.Charset;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
 import java.util.*;
 
 @Service
@@ -99,7 +101,7 @@ public class WxService {
 //        String total_free = "1";
         log.info("pay free:{}", total_free);
 //        params.put("total_fee", total_free);
-         params.put("total_fee", "1");
+        params.put("total_fee", "1");
         params.put("spbill_create_ip", getIpAddress(request));
         params.put("notify_url", myConfig.getDomain() + "/wx/notify");
         params.put("trade_type", tradeType);
@@ -128,6 +130,35 @@ public class WxService {
         throw new Exception("支付信息有误");
     }
 
+    public Map<String, String> getPayInit(HttpServletRequest request) throws Exception {
+        String money = request.getParameter("money");
+        String openid = request.getParameter("openid");
+        String businessId = request.getParameter("b");
+        String c = request.getParameter("c");
+        String a = request.getParameter("a");
+        Attach atchMap = new Attach();
+        atchMap.setC(c).setB(businessId).setA(a);
+        String out_trade_no = RandomUtil.randomString(32);
+        Map<String, String> params = new HashMap<>();
+        params.put("productType", "10000301");
+        params.put("businessMerchantNo", "PRO88882021122310003030");
+        params.put("openId", openid);
+        params.put("merchantNo", "PRO88882021122310003030");
+        params.put("tradeType", "GAS_PAY");
+        params.put("subTradeType", "");
+        params.put("orderPrice", NumberUtil.div(money, "1", 2) + "");
+        params.put("outTradeNo", out_trade_no);
+        params.put("productName", "场站费用");
+        params.put("orderIp", getIpAddress(request));
+        params.put("orderTime", LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")));
+        params.put("returnUrl", "");
+        params.put("notifyUrl", myConfig.getDomain() + "/wx/notify");
+        params.put("remark", "");
+        String sign = wxUtils.sign(params, "f0b9d6ea704d4c03a6b44be50d055025");
+        params.put("sign", sign);
+        return params;
+    }
+
     public Map<String, String> getPayParams(String openid, String prePayId) {
         Map<String, String> signMap = new HashMap<>(10);
         signMap.put("appId", wxConfig.getAppId());
@@ -268,9 +299,9 @@ public class WxService {
     }
 
     @Async
-    public void sendTemplateMsg(String templateId, String openid, MsgDataBO data,String detailUrl) {
+    public void sendTemplateMsg(String templateId, String openid, MsgDataBO data, String detailUrl) {
         String accessToken = RedisUtil.get(wxConfig.getAccessTokenKey());
-        BaseTemplate baseTemplate = new BaseTemplate(openid, templateId, detailUrl,data);
+        BaseTemplate baseTemplate = new BaseTemplate(openid, templateId, detailUrl, data);
         String json = JSON.toJSONString(baseTemplate);
         String url = wxConfig.getSendMsgUrl().replace("ACCESS_TOKEN", accessToken);
         String resp = HttpUtil.post(url, json);

+ 22 - 0
sp-server/src/main/java/com/pj/project/tb_business/CarDisincle.java

@@ -0,0 +1,22 @@
+package com.pj.project.tb_business;
+
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+@Data
+@Accessors(chain = true)
+public class CarDisincle implements Serializable {
+    private String id;
+    private String no;
+    private String itemPrice;
+    private String carNo;
+    private String goodsName;
+    private Integer adminConfirmInput;
+    private String basePartMoney;
+    private String totalMoney;
+    private String payMoney;
+    private String createTime;
+    private String realInTime;
+    private String realOutTime;
+}

+ 2 - 0
sp-server/src/main/java/com/pj/project/tb_business/TbBusiness.java

@@ -196,6 +196,7 @@ public class TbBusiness extends Model<TbBusiness> implements Serializable {
     private String confirmInputBy;
 
 
+    private Integer adminConfirmInput;
     private Integer adminConfirmPay;
     private Date adminConfirmPayTime;
     private String adminConfirmPayBy;
@@ -217,6 +218,7 @@ public class TbBusiness extends Model<TbBusiness> implements Serializable {
     private String disinfectReport;
     private String checkReport;
     private String outReport;
+
     private transient String itemJson;
     private transient String peopleJson;
     private transient String carJson;

+ 13 - 2
sp-server/src/main/java/com/pj/project/tb_business/TbBusinessController.java

@@ -163,7 +163,6 @@ public class TbBusinessController {
      */
     @RequestMapping("getList")
     public AjaxJson getList() {
-        System.out.println(StrUtil.subBefore("c_2222_fhjk","_",true));
         SoMap so = SoMap.getRequestSoMap();
         String currentCustomerId = StpUserUtil.getCustomerId();
         if (!currentCustomerId.equals(UserTypeEnum.PLATFORM_ADMIN.getCustomerId())) {
@@ -172,7 +171,19 @@ public class TbBusinessController {
         List<TbBusiness> list = tbBusinessService.getList(so.startPage());
         return AjaxJson.getPageData(so.getDataCount(), list);
     }
-
+    /**
+     * 查集合 - 根据条件(参数为空时代表忽略指定条件)
+     */
+    @RequestMapping("getCarDisincleList")
+    public AjaxJson getCarDisincleList() {
+        SoMap so = SoMap.getRequestSoMap();
+        String currentCustomerId = StpUserUtil.getCustomerId();
+        if (!currentCustomerId.equals(UserTypeEnum.PLATFORM_ADMIN.getCustomerId())) {
+            so.put("customerId", currentCustomerId);
+        }
+        List<CarDisincle> list = tbBusinessService.getCarDisincleList(so.startPage());
+        return AjaxJson.getPageData(so.getDataCount(), list);
+    }
     /**
      * 改
      */

+ 11 - 8
sp-server/src/main/java/com/pj/project/tb_business/TbBusinessMapper.java

@@ -10,19 +10,22 @@ import org.springframework.stereotype.Repository;
 
 /**
  * Mapper: tb_business -- 入境登记
- * @author qzy 
+ *
+ * @author qzy
  */
 
 @Mapper
 @Repository
-public interface TbBusinessMapper extends BaseMapper <TbBusiness> {
+public interface TbBusinessMapper extends BaseMapper<TbBusiness> {
 
-	/**
-	 * 查集合 - 根据条件(参数为空时代表忽略指定条件)
-	 * @param so 参数集合 
-	 * @return 数据列表 
-	 */
-	List<TbBusiness> getList(SoMap so);
+    /**
+     * 查集合 - 根据条件(参数为空时代表忽略指定条件)
+     *
+     * @param so 参数集合
+     * @return 数据列表
+     */
+    List<TbBusiness> getList(SoMap so);
 
+    List<CarDisincle> getCarDisincleList(SoMap soMap);
 
 }

+ 77 - 62
sp-server/src/main/java/com/pj/project/tb_business/TbBusinessMapper.xml

@@ -2,73 +2,88 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.pj.project.tb_business.TbBusinessMapper">
 
-	<!-- 查集合 - 根据条件(参数为空时代表忽略指定条件) [G] -->
-	<select id="getList" resultType="com.pj.project.tb_business.TbBusiness">
-		select * from tb_business
-		<where>
-			<if test=' this.has("id") '> and id = #{id} </if>
-			<if test=' this.has("customerId") '> and customer_id = #{customerId} </if>
-			<if test=' this.has("customerName") '> and customer_name like concat('%', #{customerName} ,'%')</if>
-			<if test=' this.has("no") '> and no = #{no} </if>
-			<if test=' this.has("cardNo") '> and card_no  like concat('%', #{cardNo} ,'%')</if>
-			<if test=' this.has("cardSize") '> and card_size = #{cardSize} </if>
-			<if test=' this.has("netWeight") '> and net_weight = #{netWeight} </if>
-			<if test=' this.has("goodsName") '> and goods_name = #{goodsName} </if>
-			<if test=' this.has("goodsCode") '> and goods_code = #{goodsCode} </if>
-			<if test=' this.has("driverName") '> and driver_name  like concat('%', #{driverName} ,'%')</if>
-			<if test=' this.has("driverId") '> and driver_id = #{driverId} </if>
-			<if test=' this.has("driverPhone") '> and driver_phone = #{driverPhone} </if>
-			<if test=' this.has("driverIdCard") '> and driver_id_card  like concat('%', #{driverIdCard} ,'%')</if>
-			<if test=' this.has("expectInDay") '> and expect_in_day = #{expectInDay} </if>
-			<if test=' this.has("realInDay") '> and real_in_day = #{realInDay} </if>
-			<if test=' this.has("realInTime") '> and real_in_time = #{realInTime} </if>
-			<if test=' this.has("payStatus") '> and pay_status = #{payStatus} </if>
-			<if test=' this.has("payTime") '> and pay_time = #{payTime} </if>
-			<if test=' this.has("payType") '> and pay_type = #{payType} </if>
-			<if test=' this.has("outDayTime") '> and out_day_time = #{outDayTime} </if>
-			<if test=' this.has("partMoney") '> and part_money = #{partMoney} </if>
-			<if test=' this.has("partTime") '> and part_time = #{partTime} </if>
+    <!-- 查集合 - 根据条件(参数为空时代表忽略指定条件) [G] -->
+    <select id="getList" resultType="com.pj.project.tb_business.TbBusiness">
+        select * from tb_business
+        <where>
+            <if test=' this.has("id") '>and id = #{id}</if>
+            <if test=' this.has("customerId") '>and customer_id = #{customerId}</if>
+            <if test=' this.has("customerName") '>and customer_name like concat('%', #{customerName} ,'%')</if>
+            <if test=' this.has("no") '>and no = #{no}</if>
+            <if test=' this.has("cardNo") '>and card_no like concat('%', #{cardNo} ,'%')</if>
+            <if test=' this.has("cardSize") '>and card_size = #{cardSize}</if>
+            <if test=' this.has("netWeight") '>and net_weight = #{netWeight}</if>
+            <if test=' this.has("goodsName") '>and goods_name = #{goodsName}</if>
+            <if test=' this.has("goodsCode") '>and goods_code = #{goodsCode}</if>
+            <if test=' this.has("driverName") '>and driver_name like concat('%', #{driverName} ,'%')</if>
+            <if test=' this.has("driverId") '>and driver_id = #{driverId}</if>
+            <if test=' this.has("driverPhone") '>and driver_phone = #{driverPhone}</if>
+            <if test=' this.has("driverIdCard") '>and driver_id_card like concat('%', #{driverIdCard} ,'%')</if>
+            <if test=' this.has("expectInDay") '>and expect_in_day = #{expectInDay}</if>
+            <if test=' this.has("realInDay") '>and real_in_day = #{realInDay}</if>
+            <if test=' this.has("realInTime") '>and real_in_time = #{realInTime}</if>
+            <if test=' this.has("payStatus") '>and pay_status = #{payStatus}</if>
+            <if test=' this.has("payTime") '>and pay_time = #{payTime}</if>
+            <if test=' this.has("payType") '>and pay_type = #{payType}</if>
+            <if test=' this.has("outDayTime") '>and out_day_time = #{outDayTime}</if>
+            <if test=' this.has("partMoney") '>and part_money = #{partMoney}</if>
+            <if test=' this.has("partTime") '>and part_time = #{partTime}</if>
+            <if test='isCar==0'>
+                and declare_no is not null
+            </if>
+            <if test='isCar==1'>
+                and (declare_no is null or declare_no='')
+            </if>
             <if test=' this.has("current") '>
                 <if test=' current == 3 '>and real_in_time is not null and out_day_time is not null</if>
                 <if test=' current == 2 '>and real_in_time is not null and out_day_time is null</if>
                 <if test=' current == 1 '>and real_in_time is null and out_day_time is null</if>
             </if>
-		</where>
-		order by
-		<choose>
-			<when test='sortType == 1'> id desc </when>
-			<when test='sortType == 2'> customer_id desc </when>
-			<when test='sortType == 3'> customer_name desc </when>
-			<when test='sortType == 4'> no desc </when>
-			<when test='sortType == 5'> card_no desc </when>
-			<when test='sortType == 6'> card_size desc </when>
-			<when test='sortType == 7'> net_weight desc </when>
-			<when test='sortType == 8'> goods_name desc </when>
-			<when test='sortType == 9'> goods_code desc </when>
-			<when test='sortType == 10'> driver_name desc </when>
-			<when test='sortType == 11'> driver_id desc </when>
-			<when test='sortType == 12'> driver_phone desc </when>
-			<when test='sortType == 13'> driver_id_card desc </when>
-			<when test='sortType == 14'> expect_in_day desc </when>
-			<when test='sortType == 15'> real_in_day desc </when>
-			<when test='sortType == 16'> real_in_time desc </when>
-			<when test='sortType == 17'> pay_status desc </when>
-			<when test='sortType == 18'> pay_time desc </when>
-			<when test='sortType == 19'> pay_type desc </when>
-			<when test='sortType == 20'> out_day_time desc </when>
-			<when test='sortType == 21'> part_money desc </when>
-			<when test='sortType == 22'> part_time desc </when>
-			<otherwise> id desc </otherwise>
-		</choose>
+        </where>
+        order by
+        <choose>
+            <when test='sortType == 1'>id desc</when>
+            <when test='sortType == 2'>customer_id desc</when>
+            <when test='sortType == 3'>customer_name desc</when>
+            <when test='sortType == 4'>no desc</when>
+            <when test='sortType == 5'>card_no desc</when>
+            <when test='sortType == 6'>card_size desc</when>
+            <when test='sortType == 7'>net_weight desc</when>
+            <when test='sortType == 8'>goods_name desc</when>
+            <when test='sortType == 9'>goods_code desc</when>
+            <when test='sortType == 10'>driver_name desc</when>
+            <when test='sortType == 11'>driver_id desc</when>
+            <when test='sortType == 12'>driver_phone desc</when>
+            <when test='sortType == 13'>driver_id_card desc</when>
+            <when test='sortType == 14'>expect_in_day desc</when>
+            <when test='sortType == 15'>real_in_day desc</when>
+            <when test='sortType == 16'>real_in_time desc</when>
+            <when test='sortType == 17'>pay_status desc</when>
+            <when test='sortType == 18'>pay_time desc</when>
+            <when test='sortType == 19'>pay_type desc</when>
+            <when test='sortType == 20'>out_day_time desc</when>
+            <when test='sortType == 21'>part_money desc</when>
+            <when test='sortType == 22'>part_time desc</when>
+            <otherwise>id desc</otherwise>
+        </choose>
+    </select>
+    <select id="getCarDisincleList" resultType="com.pj.project.tb_business.CarDisincle">
+		SELECT
+            a.id,
+            a.`no`,
+            a.item_price,a.goods_name,a.admin_confirm_input,b.car_no,
+            b.base_part_money,a.total_money,a.pay_money,a.create_time,
+            b.real_in_time,b.real_out_time
+        from tb_business a,tb_business_car b
+        WHERE a.id=b.business_id
+            <if test="cardNo !='' and cardNo !=null">
+                and b.car_no like concat('%',#{cardNo},'%')
+            </if>
+        <if test="adminConfirmInput !='-1'">
+            and a.admin_confirm_input=#{adminConfirmInput}
+        </if>
+        ORDER BY a.create_time desc
 	</select>
-	
-	
-	
-	
-	
-	
-	
-	
-	
+
 
 </mapper>

+ 41 - 16
sp-server/src/main/java/com/pj/project/tb_business/TbBusinessService.java

@@ -135,6 +135,9 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
      * 增
      */
     public AjaxJson addOrUpdate(TbBusiness t) {
+        if (StrUtil.isEmpty(t.getDeclareNo())) {
+            throw new BusinessException("请选择申报单");
+        }
         if (StrUtil.isNotEmpty(t.getId()) && StrUtil.isNotEmpty(t.getDeclareNo())) {
             TbBusiness db = this.getById(t.getId());
             if (!StrUtil.equals(db.getDeclareNo(), t.getDeclareNo())) {
@@ -188,21 +191,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
                     .setUnit(tbItem.getUnit()).setTotal(NumberUtil.mul(num, tbItem.getPrice())).setCreateTime(new Date())
                     .setNo(t.getNo() + "0" + index);
             tbBusinessItemService.save(item);
-            String businessType = tbItemType.getBusinessType();
-            if (!StrUtil.equals(businessType, TbCostomer.CustomerEnum.BUSINESS_TYPE.getType())) {
-                String remark = "车牌:" + t.getCardNo();
-                if (StrUtil.isNotEmpty(t.getChinaCarNo())) {
-                    remark += "、" + t.getChinaCarNo();
-                }
-                MsgDataBO msgDataBO = new MsgDataBO("订单号:"+item.getNo(), tbItemType.getName(), tbItem.getItemName(), t.getGoodsName(), DateUtil.now(), remark);
-                StrUtil.splitTrim(businessType, ",").forEach(type -> {
-                    List<String> openidList = tbCostomerService.findByBusinessTypeOpenid(type);
-                    openidList.forEach(openid -> {
-                        String detailUrl = myConfig.getWebDomain() + "/pages/business-item/item-detail?itemId=" + item.getId() + "&openid=" + openid;
-                        wxService.sendTemplateMsg(wxConfig.getBusinessNoticeTemplate(), openid, msgDataBO, detailUrl);
-                    });
-                });
-            }
+
             index++;
         }
         List<TbBusinessCar> carList = JSONUtil.toList(t.getCarJson(), TbBusinessCar.class);
@@ -331,9 +320,30 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
     public void confirm(List<String> ids) {
         ids.forEach(id -> {
             TbBusiness business = this.getById(id);
-            business.setConfirmInput(1).setConfirmInputTime(new Date()).setConfirmInputBy(StpUserUtil.getAdmin().getName());
+            business.setConfirmInput(1).setAdminConfirmInput(1)
+                    .setConfirmInputTime(new Date())
+                    .setConfirmInputBy(StpUserUtil.getAdmin().getName());
             this.updateById(business);
             storeMsg(business.getCustomerId(), "业务订单【" + business.getNo() + "】已确认" + DateUtil.now() + "。");
+            List<TbBusinessItem> items = tbBusinessItemService.findByBusinessId(id);
+            items.forEach(item -> {
+                TbItemType tbItemType = tbItemTypeService.getById(item.getItemTypeId());
+                String businessType = tbItemType.getBusinessType();
+                if (!StrUtil.equals(businessType, TbCostomer.CustomerEnum.BUSINESS_TYPE.getType())) {
+                    String remark = "车牌:" + business.getCardNo();
+                    if (StrUtil.isNotEmpty(business.getChinaCarNo())) {
+                        remark += "、" + business.getChinaCarNo();
+                    }
+                    MsgDataBO msgDataBO = new MsgDataBO("订单号:" + item.getNo(), tbItemType.getName(), item.getItemName(), business.getGoodsName(), DateUtil.now(), remark);
+                    StrUtil.splitTrim(businessType, ",").forEach(type -> {
+                        List<String> openidList = tbCostomerService.findByBusinessTypeOpenid(type);
+                        openidList.forEach(openid -> {
+                            String detailUrl = myConfig.getWebDomain() + "/pages/business-item/item-detail?itemId=" + item.getId() + "&openid=" + openid;
+                            wxService.sendTemplateMsg(wxConfig.getBusinessNoticeTemplate(), openid, msgDataBO, detailUrl);
+                        });
+                    });
+                }
+            });
         });
     }
 
@@ -457,6 +467,9 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
         String businessId = car.getBusinessId();
         result.put("businessId", businessId);
         List<TbBusinessCar> cars = tbBusinessCarService.findByBusinessId(businessId);
+        if (cars.isEmpty()){
+            cars.add(car);
+        }
         Date now = new Date();
         List<Map<String, Object>> carsList = new ArrayList<>();
         for (TbBusinessCar tbBusinessCar : cars) {
@@ -480,6 +493,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
             carsList.add(carMap);
         }
         result.put("carList", carsList);
+        result.put("itemList", Collections.emptyList());
         TbBusiness tbBusiness = this.getById(businessId);
         if (tbBusiness != null && tbBusiness.getPayStatus() != TbBusiness.PayStatus.HAS_PAY_CONFIRM.getCode()) {
             List<TbBusinessItem> items = tbBusinessItemService.findByBusinessId(businessId);
@@ -505,4 +519,15 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
         cars.forEach(tbBusinessCar -> tbBusinessCar.setIsLock(0));
         tbBusinessCarService.updateBatchById(cars);
     }
+
+    public TbBusiness checkCar(String carNo) {
+        QueryWrapper<TbBusiness> ew = new QueryWrapper<>();
+        ew.eq("car_no", carNo);
+        ew.eq("admin_confirm_input", 0);
+        return this.getOne(ew);
+    }
+
+    public List<CarDisincle> getCarDisincleList(SoMap soMap) {
+        return tbBusinessMapper.getCarDisincleList(soMap);
+    }
 }

+ 2 - 2
sp-server/src/main/java/com/pj/project/tb_business_car/TbBusinessCarMapper.xml

@@ -56,9 +56,9 @@
 		SELECT
 	        a.*
         FROM
-            tb_business_car a,
+            tb_business_car a left join
             tb_business b
-        WHERE
+        on
             a.business_id = b.id
             AND b.total_money> b.pay_money
             AND a.car_no LIKE CONCAT( '%', #{carNo}, '%' )

+ 28 - 9
sp-server/src/main/java/com/pj/project/tb_business_car/TbBusinessCarService.java

@@ -1,9 +1,6 @@
 package com.pj.project.tb_business_car;
 
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.util.stream.Collectors;
 
 import cn.hutool.core.util.StrUtil;
@@ -89,7 +86,14 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
 
 
     public List<TbBusinessCar> searchPartCar(String carNo) {
-        return   tbBusinessCarMapper.searchPartCar(carNo.toUpperCase());
+        QueryWrapper<TbBusinessCar> ew = new QueryWrapper<>();
+        ew.like("car_no", carNo);
+        ew.orderByDesc("id");
+        List<TbBusinessCar> list = this.list(ew);
+        list = list.stream().filter(tbBusinessCar -> tbBusinessCar.getPay()==0).collect(
+                Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(TbBusinessCar::getCarNo))), ArrayList::new));
+        return list;
+//        return   tbBusinessCarMapper.searchPartCar(carNo.toUpperCase());
     }
 
 
@@ -126,7 +130,7 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
             throw new Exception("车辆已存在");
         }
         TbBusiness tbBusiness = tbBusinessService.getById(businessId);
-        if (!CAR_LIST.contains(carNo.substring(0,1))) {
+        if (!CAR_LIST.contains(carNo.substring(0, 1))) {
             tbBusiness.setCardNo(carNo);
             tbBusiness.setCardSize(t.getCarSize());
         }
@@ -140,11 +144,11 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
         this.updateById(t);
         TbBusiness tbBusiness = tbBusinessService.getById(t.getBusinessId());
         String carNo = t.getCarNo();
-        if (!CAR_LIST.contains(carNo.substring(0,1))) {
+        if (!CAR_LIST.contains(carNo.substring(0, 1))) {
             tbBusiness.setCardNo(carNo);
         } else {
             List<TbBusinessCar> cars = this.findByBusinessId(t.getBusinessId());
-            String chiaCarNo = cars.stream().filter(obj -> CAR_LIST.contains(obj.getCarNo().substring(0,1))).map(TbBusinessCar::getCarNo).collect(Collectors.joining("、"));
+            String chiaCarNo = cars.stream().filter(obj -> CAR_LIST.contains(obj.getCarNo().substring(0, 1))).map(TbBusinessCar::getCarNo).collect(Collectors.joining("、"));
             tbBusiness.setChinaCarNo(chiaCarNo);
         }
         tbBusinessService.updateById(tbBusiness);
@@ -172,7 +176,7 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
 
     public AjaxJson deleteCar(String id) {
         TbBusinessCar db = this.getById(id);
-        String checkStr=db.getCarNo().substring(0,1);
+        String checkStr = db.getCarNo().substring(0, 1);
         if (!CAR_LIST.contains(checkStr)) {
             return AjaxJson.getError("越南车不能删除");
         }
@@ -186,4 +190,19 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
         }
         return AjaxJson.getSuccess();
     }
+
+    public TbBusinessCar checkCar(String carNo) {
+        QueryWrapper<TbBusinessCar> ew = new QueryWrapper<>();
+        ew.eq("car_no", carNo);
+        ew.eq("pay", 0);
+        return this.getOne(ew);
+    }
+
+    public TbBusinessCar findTheLastRecord(String carNo) {
+        QueryWrapper<TbBusinessCar> ew = new QueryWrapper<>();
+        ew.eq("car_no", carNo);
+        ew.orderByDesc("id");
+        List<TbBusinessCar> list = this.list(ew);
+        return list.isEmpty() ? null : list.get(0);
+    }
 }

+ 1 - 0
sp-server/src/main/java/com/pj/project/tb_item_type/TbItemType.java

@@ -65,6 +65,7 @@ public class TbItemType extends Model<TbItemType> implements Serializable {
 	 * 业务类型1,消杀;2装卸;0默认
 	 */
 	private String businessType="0";
+	private Integer business=1;
 
 	@TableField(exist = false)
 	private List<TbItem>items=new ArrayList<>();

+ 1 - 0
sp-server/src/main/java/com/pj/project/tb_item_type/TbItemTypeMapper.xml

@@ -60,6 +60,7 @@
 			<if test=' this.has("id") '> and id = #{id} </if>
 			<if test=' this.has("name") '> and name like concat('%',#{name},'%')  </if>
 			<if test=' this.has("need") '> and need = #{need} </if>
+			<if test=' this.has("business") '> and business = #{business} </if>
 		</where>
 		order by
 		<choose>

+ 5 - 5
sp-server/src/main/resources/application-dev.yml

@@ -45,10 +45,10 @@ spring:
     # 项目自定义配置
     myconfig:
         # 本项目部署到的服务器域名(文件上传等等模块  要用到)
-        domain: http://192.168.3.77:8099/pro
-        web-domain: https://192.168.3.77:8080
+        domain: http://127.0.0.1:8099/pro
+        web-domain: https://127.0.0.1:8080
 part-config:
-    base-price: 0.01 #基础费用
+    base-price: 30 #基础费用
     extra-price: 0.01 #过夜额外收费
     night-end: 06:00:00 #夜间结束时间
     free-minutes: 30
@@ -60,8 +60,8 @@ car:
 wx-config:
     title: 场站管理系统
     flush-second: 12000 #token刷新时间 秒
-    app-id: wxd40a34141872bf0c
-    secret: 2e6a69fab1fbab60369ebd21b0882f3e
+    app-id: wx04c8811edf4e3205
+    secret: fab1efb856912bfce3b7b1baaccd9313
     mach-id: 1615645036
     key: dongxingkouanerqiao8888888888888
     token: dx1123

+ 1 - 1
sp-server/src/main/resources/application-pro.yml

@@ -59,10 +59,10 @@ car:
 wx-config:
     flush-second: 120 #token刷新时间 秒
     app-id: wxf33627516d0851e1
+    secret: fd1dd75b8063fbf4c94fce3aac5de524
     mach-id: 1615645036
     key: dongxingkouanerqiao8888888888888
     token: dx1123
-    secret: fd1dd75b8063fbf4c94fce3aac5de524
     access-token-key: wechat:base_token_key
     js-api-ticket-key: wechat:jsapi_ticket_key
     access-token-url: https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=${wx-config.app-id}&secret=${wx-config.secret}