Browse Source

Merge branch 'dev' of http://47.101.143.145:8090/77975466/pco into dev

# Conflicts:
#	sp-admin/sa-view/tb-business-car/tb-business-car-info.html
#	sp-admin/sa-view/tb-business-car/tb-business-car-list.html
#	sp-server/src/main/java/com/pj/project/tb_business/TbBusinessService.java
#	sp-server/src/main/java/com/pj/project/tb_business_car/TbBusinessCarService.java
qzyReal 3 years ago
parent
commit
2f049a1f5c

+ 2 - 1
app/apis/api.js

@@ -37,7 +37,8 @@ export default {
 		return ajax.postForm('/TbBusiness/adminConfirmIn',data)
 	},
     getInOutRecord(data) {
-        return ajax.get('/api/getInOutRecord', data)
+        //return ajax.get('/api/getInOutRecord', data)
+		return ajax.get('/TbBusinessCar/getList', data)
     },
     getCustomerList(data) {
         return ajax.get('/api/getCustomerList', data)

+ 1 - 1
app/common/common.scss

@@ -20,7 +20,7 @@
 			align-items: center;
 			margin: 0 60rpx;
 			padding: 10rpx 0;
-			min-height: 110rpx;
+			min-height: 80rpx;
 			border-bottom: 1rpx solid #f5f5f5;
 			.l{
 				flex: 4;

+ 62 - 75
app/pages/business-entering/business-detail.vue

@@ -11,73 +11,60 @@
 				</view>
 			</view>
 			<view class="item">
-				<view class="l">境外车牌:</view>
-				<view class="r">
-					{{form.cardNo}}
-				</view>
-			</view>
-			<view class="item">
-				<view class="l">规格(米):</view>
-				<view class="r">
-					{{form.cardSize}}
-				</view>
-			</view>
-			<view class="item">
-				<view class="l">载重(吨):</view>
-				<view class="r">
-					{{form.netWeight}}
-				</view>
-			</view>
-			<view class="item">
 				<view class="l">货物:</view>
 				<view class="r">
 					{{form.goodsName}}
 				</view>
 			</view>
-			<view class="item" v-if="form.realInTime">
-				<view class="l" style="flex: 6;">境外车入场时间:</view>
-				<view class="r">
-					{{form.realInTime}}
-				</view>
-			</view>
-			<view class="item" v-if="form.outDayTime">
-				<view class="l" style="flex: 6;">境外车离场时间:</view>
-				<view class="r">
-					{{form.outDayTime}}
-				</view>
-			</view>
-		
-			<view class="item">
-				<view class="l">中国司机:</view>
-				<view class="r">
-					{{form.driverName}}
-				</view>
-			</view>
-			<view class="item">
-				<view class="l">联系号码:</view>
-				<view class="r">
-					{{form.driverPhone}}
-				</view>
-			</view>
-			<view class="item">
-				<view class="l">中国车牌号:</view>
-				<view class="r">
-					{{form.chinaCarNo}}
-				</view>
-			</view>
-			<view class="item">
-				<view class="l" style="flex: 6;">中国车入场时间:</view>
-				<view class="r">
-					{{form.chinaCarInTime}}
-				</view>
-			</view>
 			<view class="item">
-				<view class="l" style="flex: 6;">中国车离场时间:</view>
+				<view class="l">货重:</view>
 				<view class="r">
-					{{form.chinaCarOutTime}}
+					{{form.netWeight}}(吨)
 				</view>
 			</view>
 			<view class="item-line">
+				车辆
+			</view>
+			<view v-for="item in form.cars" :key="item.id" style="border-bottom: 1px solid #E5E5E5;">
+				<view class="item">
+					<view class="l" >车牌号:</view>
+					<view class="r">
+						{{item.carNo}}
+					</view>
+				</view>
+				<view class="item">
+					<view class="l" >规格:</view>
+					<view class="r">
+						{{item.carSize}} (米)
+					</view>
+				</view>
+				<view class="item" v-if="item.realInTime">
+					<view class="l" >入场时间:</view>
+					<view class="r">
+						{{item.realInTime}} 
+					</view>
+				</view>
+				<view class="item" v-if="item.realOutTime">
+					<view class="l" >离场时间:</view>
+					<view class="r">
+						{{item.realOutTime}} (米)
+					</view>
+				</view>
+				<view class="item" v-if="item.driverName">
+					<view class="l" >联系人:</view>
+					<view class="r">
+						{{item.driverName}}
+					</view>
+				</view>
+				<view class="item" v-if="item.driverPhone">
+					<view class="l">联系号码:</view>
+					<view class="r">
+						{{item.driverPhone}}
+					</view>
+				</view>
+			</view>
+			
+			<view class="item-line">
 				业务项
 			</view>
 			<view class="item" v-for="item in form.items" :key="item.id">
@@ -86,21 +73,7 @@
 					{{item.itemName}}({{item.itemPrice}}x{{item.num}}={{item.total}}元)
 				</view>
 			</view>
-			<view class="item">
-				<text class="p1">订单状态:</text>
-				<text class="p2">
-					<text v-if="form.confirmInput==0">未确认</text>
-					<text v-else>已确认</text>
-				</text>
-			</view>
-			<view class="item">
-				<text class="p1">支付状态:</text>
-				<text class="p2">
-					<text v-if="form.payStatus==1">未支付</text>
-					<text v-if="form.payStatus==2">已支付(未确认)</text>
-					<text v-if="form.payStatus==3">已支付(已确认)</text>
-				</text>
-			</view>
+			
 			<view class="item" >
 				<view class="l" style="flex: 6;">境外车停车费:</view>
 				<view class="r">
@@ -122,12 +95,27 @@
 					<text>(元)</text>
 				</view>
 			</view>
+			<view class="item">
+				<text class="p1">订单状态:</text>
+				<text class="p2">
+					<text v-if="form.confirmInput==0">未确认</text>
+					<text v-else>已确认</text>
+				</text>
+			</view>
+			<view class="item">
+				<text class="p1">支付状态:</text>
+				<text class="p2">
+					<text v-if="form.payStatus==1">未支付</text>
+					<text v-if="form.payStatus==2">已支付(未确认)</text>
+					<text v-if="form.payStatus==3">已支付(已确认)</text>
+				</text>
+			</view>
 			<view class="hj">
 				总费用:{{form.totalMoney}}元
 			</view>
+			<u-button type="primary" text="返回" @click="backFn"></u-button>
+				<view style="height: 80rpx;"></view>
 		</view>
-		<u-button type="primary" text="返回" @click="backFn"></u-button>
-
 	</view>
 </template>
 
@@ -195,6 +183,5 @@
 		font-weight: bold;
 		border-radius: 10rpx;
 	}
-
 	@import '@/common/common.scss'
 </style>

+ 18 - 21
app/pages/inout-record/inout-record.vue

@@ -10,36 +10,36 @@
 		</u-sticky> -->
 		<view class="card-box">
 			<view class="card" v-for="(recordItem,index) in recordItemList" :key="index">
-				<view class="t">
+				<!-- <view class="t">
 					<image class="icon" src="../../static/home-icon-01.png"></image>
 					<text class="title">{{recordItem.customerName}}</text>
-				</view>
+				</view> -->
 				<view class="c">
 					<view class="item car-num-item">
-						<text class="car-num">{{recordItem.cardNo}}</text>
+						<text class="car-num">{{recordItem.carNo}}</text>
 					</view>
 					<view class="item">
 						<text class="p1">联系人:</text>
-						<text class="p2">{{recordItem.dutyPeople}}</text>
+						<text class="p2">{{recordItem.driverName}}</text>
 					</view>
 					<view class="item">
 						<text class="p1">联系电话:</text>
-						<text class="p2">{{recordItem.customerContact}}</text>
+						<text class="p2">{{recordItem.driverPhone}}</text>
 					</view>
-					<view class="item" v-if="recordItem.inTime != null">
+					<view class="item" >
 						<text class="p1">入场时间:</text>
-						<text class="p2">{{recordItem.inTime}}</text>
+						<text class="p2">{{recordItem.realInTime}}</text>
 					</view>
-					<view class="item" v-if="recordItem.outTime != null">
+					<view class="item" >
 						<text class="p1">出场时间:</text>
-						<text class="p2">{{recordItem.outTime}}</text>
+						<text class="p2">{{recordItem.realOutTime}}</text>
 					</view>
 					<view class="item">
 						<text class="p1">状态:</text>
 						<text class="p2">
-							<text v-if="recordItem.status==1">未进场</text>
-							<text v-if="recordItem.status==2">已进场</text>
-							<text v-if="recordItem.status==3">已出场</text>
+							<text v-if="recordItem.realInTime==null && recordItem.realOutTime==null">未进场</text>
+							<text v-if="recordItem.realInTime!=null && recordItem.realOutTime==null">已进场</text>
+							<text v-if="recordItem.realInTime!=null && recordItem.realOutTime!=null">已出场</text>
 						</text>
 					</view>
 				</view>
@@ -60,7 +60,7 @@
 			return {
 				current:0,
 				pageNo: 1,
-				pageSize: 3,
+				pageSize: 4,
 				dataCount: 0,
 				status: 'loadmore',
 				page: 0,
@@ -80,14 +80,11 @@
 				],
 				recordItemList:[
 					{
-						customerName:'',
-						cardNo:'',
-						carCountryName: '',
-						dutyPeople:'',
-						customerContact:'',
-						inTime:'',
-						outTime:'',
-						status:''
+						carNo:'',
+						driverName: '',
+						driverPhone:'',
+						realInTime:'',
+						realOutTime:'',
 					},
 				],
 				//recordList: [],

+ 163 - 0
app/pages/wx/payOrder.vue

@@ -0,0 +1,163 @@
+<template>
+	<view>
+		<view class="box">
+			<view class="item" >
+				<view class="l">订单号:</view>
+				<view class="r">
+					{{form.no}}
+				</view>
+			</view>
+			<view class="item-line">
+				业务项
+			</view>
+			<view class="item" v-for="item in form.items" :key="item.id">
+				<view class="l" style="flex: 6;">{{item.itemTypeName}}:</view>
+				<view class="r">
+					{{item.itemName}}({{item.itemPrice}}x{{item.num}}={{item.total}}元)
+				</view>
+			</view>
+			<view class="item">
+				<view class="l" style="flex: 6;">业务费:</view>
+				<view class="r">
+					{{form.itemPrice}}
+					<text>(元)</text>
+				</view>
+			</view>
+			<view class="item" >
+				<view class="l" style="flex: 6;">境外车停车费:</view>
+				<view class="r">
+					{{form.partMoney}}
+					<text>(元)</text>
+				</view>
+			</view>
+			<view class="item">
+				<view class="l" style="flex: 6;">中国车停车费:</view>
+				<view class="r">
+					{{form.chinaPartMoney}}
+					<text>(元)</text>
+				</view>
+			</view>
+			<view class="item">
+				<view class="l" style="flex: 6;">合计费用:</view>
+				<view class="r">
+					{{form.totalMoney}}元
+				</view>
+			</view>
+		</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>
+
+<script>
+	export default {
+		data() {
+			return {
+				wx:{
+					id:'',
+					code:'',
+					openid:''
+				},
+				form: {
+					partMoney: 0
+				},
+			}
+		},
+		onBackPress() {
+			this.$common.to('/pages/business-order/business-order')
+			return false;
+		},
+		onLoad(options) {
+			this.wx.id = options.state;
+			this.wx.code=options.state;
+			this.getOpenidByCode();
+			this.getWxConfig();
+		},
+		onShow() {
+			this.getBusinessById();
+		},
+		methods: {
+			getWxConfig() {
+				let url = window.location.href;
+				this.$api.getWxConfig({
+					url: url
+				}).then(resp => {
+					jweixin.config({
+						//debug: true,
+						appId: resp.data.appId,
+						timestamp: resp.data.timestamp, // 必填,生成签名的时间戳
+						nonceStr: resp.data.noncestr, // 必填,生成签名的随机串
+						signature: resp.data.sign, // 必填,签名
+						jsApiList: ['chooseWXPay'] // 必填,需要使用的JS接口列表
+					});
+					jweixin.ready(function() {
+						console.log('111')
+			
+					});
+					jweixin.error(function(res) {
+						console.log(res)
+					});
+				})
+			},
+			getOpenidByCode() {
+				let storeOpenid = uni.getStorageSync('openid');
+				this.$api.getOpenidByCode({
+					code: this.wx.code,
+					openid: storeOpenid
+				}).then(resp => {
+					let openid = resp.data;
+					this.openid = openid;
+					if (openid) {
+						uni.setStorageSync('openid', openid)
+					}
+			
+				})
+			},
+			getBusinessById() {
+				this.$api.getBusinessById({
+					id: this.wx.id
+				}).then(resp => {
+					this.form = resp.data;
+				})
+			},
+			confirmFn(){
+				let p = {
+					businessId: this.wx.id,
+					money: this.form.totalMoney,
+					tradeType: "JSAPI",
+					openid: this.wx.openid
+				}
+				this.$api.getPrePay(this.$common.removeNull(p)).then(resp => {
+					let data = resp.data;
+					let that = this;
+					jweixin.chooseWXPay({
+						timestamp: data
+						.timeStamp, // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符
+						nonceStr: data.nonceStr, // 支付签名随机串,不长于 32 位
+						package: data.package, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=\*\*\*)
+						signType: data.signType, // 微信支付V3的传入RSA,微信支付V2的传入格式与V2统一下单的签名格式保持一致
+						paySign: data.paySign, // 支付签名
+						success: function(res) {
+							if (res.errMsg === "chooseWXPay:ok") {
+								that.$common.toast('支付成功')
+								// wx.closeWindow();
+							}
+						}
+					});
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		background-color: #fff;
+	}
+.item-line {
+		color: #a2a2a2;
+		padding: 5px 0 10px 29px;
+		border-bottom: 1px solid #E5E5E5;
+	}
+	@import '@/common/common.scss'
+</style>

+ 68 - 0
app/pages/wx/payOrderTemp.vue

@@ -0,0 +1,68 @@
+<template>
+	<view class="box">
+
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				id:''
+			}
+		},
+		onLoad(options) {
+			this.id=options.id;
+		},
+		created() {
+			this.$common.showLoading('正在加载...')
+		},
+		mounted() {
+			this.getRedirectUri();
+		},
+		beforeDestroy() {
+			this.$common.hidingLoading()
+		},
+		methods: {
+			getRedirectUri() {
+				this.$api.getRedirectUrl({path:'/pages/wx/payOrder',state:this.id}).then(resp => {
+					window.location.href = resp.data;
+				})
+			}
+		}
+	}
+</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;
+			flex: 1;
+			align-items: center;
+			justify-content: center;
+			margin-top: 30rpx;
+
+			text {
+				margin-left: 20rpx;
+			}
+		}
+	}
+</style>

+ 11 - 2
sp-admin/sa-frame/menu-list.js

@@ -50,13 +50,22 @@ var menuList =	[
 			{id: 'tb-car-add', name: '车辆-添加', url: 'sa-view/tb-car/tb-car-add.html'},
 		]
 	},
+	// {
+	// 	id: 'tb-pass-record',
+	// 	name: '放行记录-旧',
+	// 	icon: 'el-icon-notebook-2',
+	// 	info: '放行日志表数据的维护',
+	// 	childList: [
+	// 		{id: 'tb-pass-record-list', name: '放行列表', url: 'sa-view/tb-pass-record/tb-pass-record-list.html'},
+	// 	]
+	// },
 	{
-		id: 'tb-pass-record',
+		id: 'tb-business-car',
 		name: '放行记录',
 		icon: 'el-icon-notebook-2',
 		info: '放行日志表数据的维护',
 		childList: [
-			{id: 'tb-pass-record-list', name: '放行列表', url: 'sa-view/tb-pass-record/tb-pass-record-list.html'},
+			{id: 'tb-business-car-list', name: '放行列表', url: 'sa-view/tb-business-car/tb-business-car-list.html'},
 		]
 	},
 	{

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

@@ -189,7 +189,7 @@
 					<el-button type="primary" @click="confirmAdd">确 定</el-button>
 				</span>
 			</el-dialog>
-			<el-dialog title="添加中国车" :visible.sync="china.visible" width="80%">
+			<el-dialog title="中国车" :visible.sync="china.visible" width="80%">
 				<el-card class="box-card">
 					<div slot="header">
 						<span>列表</span>
@@ -515,7 +515,7 @@
 							sa.ajax('/TbBusiness/getById?id=' + this.id, function(res) {
 								let m = res.data;
 								let items = m.items;
-								this.china.list = m.cars;
+								this.china.list = m.cars.filter(obj=>obj.carNo!==m.cardNo);
 								let hsItem = items.filter(obj => obj.itemTypeName.indexOf('人') !== -1 &&
 									obj.itemTypeName.indexOf('核酸') !== -1);
 								if (hsItem.length > 0) {

+ 2 - 1
sp-server/src/main/java/com/pj/constants/RoleEnum.java

@@ -2,6 +2,7 @@ package com.pj.constants;
 
 import com.pj.current.satoken.AuthConst;
 import com.pj.project.tb_business.TbBusiness;
+import com.pj.project.tb_business_car.TbBusinessCar;
 import com.pj.project.tb_costomer.TbCostomer;
 import com.pj.project.tb_notices.TbNotices;
 import com.pj.project.tb_pass_record.TbPassRecord;
@@ -25,7 +26,7 @@ public enum RoleEnum {
             Arrays.asList(AuthConst.ADMIN_LIST,TbCostomer.PERMISSION_CODE,TbCostomer.PERMISSION_INFO,TbBusiness.PERMISSION_CODE,TbBusiness.PERMISSION_LIST,TbBusiness.PERMISSION_PAY)),
     ADMIN_ROLE("admin","管理员", Collections.emptyList()),
     SUPER_ROLE("super","超级管理员", Collections.emptyList()),
-    COMMON_ROLE_PER("common","共同",Arrays.asList(TbPassRecord.PERMISSION_CODE,TbPassRecord.PERMISSION_LIST,TbNotices.PERMISSION_CODE,TbNotices.PERMISSION_LIST))
+    COMMON_ROLE_PER("common","共同",Arrays.asList(TbNotices.PERMISSION_CODE,TbNotices.PERMISSION_LIST, TbBusinessCar.PERMISSION_CODE, TbBusinessCar.PERMISSION_LIST))
     ;
     private String type;
     private String name;

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

@@ -46,8 +46,6 @@ public class TbBusinessController {
     @Resource
     private TbBusinessItemService tbBusinessItemService;
     @Resource
-    private TbPassRecordService tbPassRecordService;
-    @Resource
     private TbNoticesService tbNoticesService;
     @Resource
     private TbBusinessCarService tbBusinessCarService;
@@ -81,7 +79,7 @@ public class TbBusinessController {
         }
         tbBusinessService.removeById(id);
         tbBusinessItemService.removeByBusinessId(id);
-        tbPassRecordService.removeByBusinessId(id);
+
         tbBusinessCarService.removeByBusinessId(id);
         return AjaxJson.getSuccess();
     }
@@ -203,11 +201,9 @@ public class TbBusinessController {
         tbBusinessService.updateById(tbBusiness);
 
         //更新境外车入场记录
-        tbPassRecordService.addOrUpdate(tbBusiness.getId(), tbBusiness.getCustomerId(), tbBusiness.getCustomerName(),
-                tbBusiness.getCardNo(), 2, tbBusiness.getRealInTime(), null, tbBusiness.getCountryName());
+
         //更新中国车入场记录
-        tbPassRecordService.addOrUpdate(tbBusiness.getId(), tbBusiness.getCustomerId(), tbBusiness.getCustomerName(),
-                tbBusiness.getChinaCarNo(), 2, tbBusiness.getChinaCarInTime(), null, "中国车");
+
         //发送消息
         String text = "您的车辆已入场,业务单号[" + tbBusiness.getNo() + "]";
         tbNoticesService.sendNotice(tbBusiness.getId(), tbBusiness.getNo(), tbBusiness.getCustomerId(), text);
@@ -239,13 +235,9 @@ public class TbBusinessController {
         business.setAdminConfirmOut(1);
         tbBusinessService.updateById(business);
         //更新境外车出场记录
-        tbPassRecordService.addOrUpdate(business.getId(), business.getCustomerId(), business.getCustomerName(),
-                business.getCardNo(), 3,
-                business.getRealInTime(), business.getOutDayTime(), business.getCountryName());
+
         //更新中国车出场记录
-        tbPassRecordService.addOrUpdate(business.getId(), business.getCustomerId(), business.getCustomerName(),
-                business.getChinaCarNo(), 3,
-                business.getChinaCarInTime(), business.getChinaCarOutTime(), "中国车");
+
         tbBusinessService.storeMsg(business.getCustomerId(), "业务订单【" + business.getNo() + "】已完成作业离场" + DateUtil.now() + "。");
         //发送消息
         String text = "您的车辆已离场,业务单号[" + business.getNo() + "]";

+ 6 - 19
sp-server/src/main/java/com/pj/project/tb_business/TbBusinessService.java

@@ -98,8 +98,6 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
     private CarConfig carConfig;
 
     @Resource
-    private TbPassRecordService tbPassRecordService;
-    @Resource
     private TbNoticesService tbNoticesService;
     @Resource
     TbBusinessCarService tbBusinessCarService;
@@ -171,13 +169,14 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
             }
             tbBusinessCar.setBusinessId(t.getId());
             tbBusinessCar.setCarNo(carNo);
+            tbBusinessCar.setBusinessId(t.getId()).setCustomerId(t.getCustomerId());
         });
         String yueCarNo = t.getCardNo().toUpperCase();
         TbBusinessCar yueCar = tbBusinessCarService.findInAndNoBusinessCar(yueCarNo);
         if (yueCar == null) {
             yueCar = new TbBusinessCar();
         }
-        yueCar.setBusinessId(t.getId()).setCarSize(t.getCardSize()).setCarNo(yueCarNo);
+        yueCar.setBusinessId(t.getId()).setCarSize(t.getCardSize()).setCarNo(yueCarNo).setCustomerId(t.getCustomerId());
         carList.add(yueCar);
         tbBusinessCarService.saveOrUpdateBatch(carList);
         BigDecimal initCarPartMoney = partConfig.getBasePrice();
@@ -188,12 +187,6 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
         this.saveOrUpdate(t);
         tbBusinessItemService.saveBatch(items);
 
-        //增加或修改一条境外车未入场记录
-        tbPassRecordService.addOrUpdate(t.getId(), t.getCustomerId(), t.getCustomerName(),
-                t.getCardNo(), 1, null, null, t.getCountryName());
-        //增加或修改一条中国车未入场记录
-        tbPassRecordService.addOrUpdate(t.getId(), t.getCustomerId(), t.getCustomerName(),
-                t.getChinaCarNo(), 1, null, null, "中国车");
 
         return AjaxJson.getSuccess();
     }
@@ -319,11 +312,9 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
         this.updateById(tbBusiness);
 
         //更新境外车入场记录
-        tbPassRecordService.addOrUpdate(tbBusiness.getId(), tbBusiness.getCustomerId(), tbBusiness.getCustomerName(),
-                tbBusiness.getCardNo(), 2, tbBusiness.getRealInTime(), null, tbBusiness.getCountryName());
+
         //更新中国车入场记录
-        tbPassRecordService.addOrUpdate(tbBusiness.getId(), tbBusiness.getCustomerId(), tbBusiness.getCustomerName(),
-                tbBusiness.getChinaCarNo(), 2, tbBusiness.getChinaCarInTime(), null, "中国车");
+
         //发送消息
         String text = "您的车辆已入场,业务单号[" + tbBusiness.getNo() + "]";
         tbNoticesService.sendNotice(tbBusiness.getId(), tbBusiness.getNo(), tbBusiness.getCustomerId(), text);
@@ -337,13 +328,9 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
         this.updateById(tbBusiness);
 
         //更新境外车出场记录
-        tbPassRecordService.addOrUpdate(tbBusiness.getId(), tbBusiness.getCustomerId(), tbBusiness.getCustomerName(),
-                tbBusiness.getCardNo(), 3,
-                tbBusiness.getRealInTime(), tbBusiness.getOutDayTime(), tbBusiness.getCountryName());
+
         //更新中国车出场记录
-        tbPassRecordService.addOrUpdate(tbBusiness.getId(), tbBusiness.getCustomerId(), tbBusiness.getCustomerName(),
-                tbBusiness.getChinaCarNo(), 3,
-                tbBusiness.getChinaCarInTime(), tbBusiness.getChinaCarOutTime(), "中国车");
+
         //发送消息
         String text = "您的车辆已离场,业务单号[" + tbBusiness.getNo() + "]";
         tbNoticesService.sendNotice(tbBusiness.getId(), tbBusiness.getNo(), tbBusiness.getCustomerId(), text);

+ 4 - 1
sp-server/src/main/java/com/pj/project/tb_business_car/TbBusinessCar.java

@@ -33,7 +33,8 @@ public class TbBusinessCar extends Model<TbBusinessCar> implements Serializable
 	/**
 	 * 此模块对应的权限码 
 	 */
-	public static final String PERMISSION_CODE = "tb-business-car";	
+	public static final String PERMISSION_CODE = "tb-business-car";
+	public static final String PERMISSION_LIST = "tb-business-car-list";
 
 
 	// ---------- 表中字段 ----------
@@ -47,6 +48,8 @@ public class TbBusinessCar extends Model<TbBusinessCar> implements Serializable
 	 */
 	private String businessId;
 
+	private String customerId;
+
 	/**
 	 *  
 	 */

+ 6 - 0
sp-server/src/main/java/com/pj/project/tb_business_car/TbBusinessCarController.java

@@ -2,6 +2,7 @@ package com.pj.project.tb_business_car;
 
 import java.util.List;
 
+import com.pj.constants.UserTypeEnum;
 import com.pj.project.tb_business.TbBusiness;
 import com.pj.project.tb_costomer.TbCostomer;
 import com.pj.utils.so.SoMap;
@@ -70,9 +71,14 @@ public class TbBusinessCarController {
 	@RequestMapping("getList")
 	public AjaxJson getList() { 
 		SoMap so = SoMap.getRequestSoMap();
+        String currentCustomerId = StpUserUtil.getCustomerId();
+        if (!currentCustomerId.equals(UserTypeEnum.PLATFORM_ADMIN.getCustomerId())) {
+            so.put("customerId",currentCustomerId);
+        }
 		List<TbBusinessCar> list = tbBusinessCarService.getList(so.startPage());
 		return AjaxJson.getPageData(so.getDataCount(), list);
 	}
+
 	
 	
 	

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

@@ -29,7 +29,8 @@
 		<where>
 			<if test=' this.has("id") '> and id = #{id} </if>
 			<if test=' this.has("businessId") '> and business_id = #{businessId} </if>
-			<if test=' this.has("carNo") '> and car_no = #{carNo} </if>
+            <if test=' this.has("customerId") '> and customer_id = #{customerId} </if>
+			<if test=' this.has("carNo") '> and car_no like concat('%',#{carNo},'%') </if>
 			<if test=' this.has("preInTime") '> and pre_in_time = #{preInTime} </if>
 			<if test=' this.has("preOutTime") '> and pre_out_time = #{preOutTime} </if>
 			<if test=' this.has("realInTime") '> and real_in_time = #{realInTime} </if>

+ 12 - 0
sp-server/src/main/java/com/pj/project/tb_business_car/TbBusinessCarService.java

@@ -1,5 +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;
@@ -119,4 +120,15 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
     public void updateCar(TbBusinessCar t) {
         this.updateById(t);
     }
+
+    public void adminIn(String businessId, String carNo, Date realInTime){
+        TbBusinessCar car = this.findByBusinessIdAndCarNo(businessId, carNo);
+        car.setRealInTime(realInTime);
+        this.updateById(car);
+    }
+    public void adminOut(String businessId, String carNo, Date realOutTime){
+        TbBusinessCar car = this.findByBusinessIdAndCarNo(businessId, carNo);
+        car.setRealOutTime(realOutTime);
+        this.updateById(car);
+    }
 }