Ver código fonte

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

# Conflicts:
#	sp-server/src/main/java/com/pj/project/tb_fee_details/TbFeeDetailsService.java
qzyReal 2 anos atrás
pai
commit
9dc2674977
21 arquivos alterados com 305 adições e 68 exclusões
  1. 2 3
      app/pages/onely-disinfect/Index.vue
  2. 3 0
      app/pages/onely-disinfect/type-business-edit.vue
  3. 1 3
      app/pages/onely-disinfect/type-business.vue
  4. 1 1
      sp-admin/sa-view-sp/console/console-main.html
  5. 1 9
      sp-admin/sa-view/tb-business/tb-car-disincle-add.html
  6. 0 2
      sp-admin/sa-view/tb-business/tb-car-disincle-edit.html
  7. 0 1
      sp-admin/sa-view/tb-fee-statistics/month-statistcs-list.html
  8. 79 0
      sp-admin/sa-view/tb-fee-statistics/tb-fee-details-list.html
  9. 6 8
      sp-admin/sa-view/tb-fee-statistics/tb-fee-statistics-list.html
  10. 0 1
      sp-admin/sa-view/tb-fee-statistics/year-statistcs-list.html
  11. 4 4
      sp-admin/sa-view/tb-goods/tb-goods-list.html
  12. 7 14
      sp-server/src/main/java/com/pj/api/open/service/OpenService.java
  13. 0 1
      sp-server/src/main/java/com/pj/api/service/ApiService.java
  14. 4 5
      sp-server/src/main/java/com/pj/api/wx/service/WxService.java
  15. 20 13
      sp-server/src/main/java/com/pj/project/tb_business/TbBusinessService.java
  16. 2 1
      sp-server/src/main/java/com/pj/project/tb_business_car/TbBusinessCarController.java
  17. 3 2
      sp-server/src/main/java/com/pj/project/tb_business_car/TbBusinessCarMapper.xml
  18. 26 0
      sp-server/src/main/java/com/pj/project/tb_fee_details/TbFeeDetails.java
  19. 25 0
      sp-server/src/main/java/com/pj/project/tb_fee_details/TbFeeDetailsController.java
  20. 108 0
      sp-server/src/main/java/com/pj/project/tb_fee_details/TbFeeDetailsService.java
  21. 13 0
      sp-server/src/main/java/com/pj/project/tb_fee_statistics/TbFeeStatistics.java

+ 2 - 3
app/pages/onely-disinfect/Index.vue

@@ -27,10 +27,9 @@
 						<text class="p2">{{businessItem.goodsName}}</text>
 					</view>
 					<view class="item">
-						<text class="p1">载重(kg):</text>
+						<text class="p1">业务费(元):</text>
 						<text class="p2">
-							<text v-if="businessItem.netWeight">{{businessItem.netWeight}}</text>
-							<text>空车</text>
+							<text>{{businessItem.itemPrice}}</text>
 						</text>
 					</view>
 					<view class="item">

+ 3 - 0
app/pages/onely-disinfect/type-business-edit.vue

@@ -222,6 +222,9 @@
 				}
 				let carSize = car.carSize;
 				let carType = car.carType;
+				if (carType.indexOf('空') !== -1 && carList.length > 1) {
+					return;
+				}
 				let netWeight = car.netWeight;
 				let tempList = [];
 				for (let i in filterTypeList) {

+ 1 - 3
app/pages/onely-disinfect/type-business.vue

@@ -118,7 +118,7 @@
 				columns: [],
 				customerId: '1',
 				customer: {
-					index: 0,
+					index: -1,
 					customerList: [],
 				},
 				goods: {
@@ -221,8 +221,6 @@
 				if (carType.indexOf('空') !== -1 && carList.length > 1) {
 					return;
 				}
-				let carSize = car.carSize;
-				let carType = car.carType;
 				let netWeight = car.netWeight;
 				let tempList = [];
 				for (let i in filterTypeList) {

+ 1 - 1
sp-admin/sa-view-sp/console/console-main.html

@@ -89,7 +89,7 @@
 						<div slot="header" class="clearfix">
 							<span>收费项目统计</span>
 							<div style="float: right; padding: 3px 0">
-								<el-date-picker v-model="feeType.date" type="daterange" range-separator="至"
+								<el-date-picker v-model="itemType.date" type="daterange" range-separator="至"
 									start-placeholder="开始日期" end-placeholder="结束日期" @change="itemTypeStatics">
 								</el-date-picker>
 							</div>

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

@@ -87,7 +87,7 @@
 											<div class="c-item">
 												<label class="c-label"><span style="color: red;">*</span>客户:</label>
 												<el-select
-													:disabled="goods.needDeclare||m.declareNo||currentCustomerId!='1'"
+													:disabled="goods.needDeclare||m.declareNo"
 													v-model="m.customerId" placeholder="请选择">
 													<el-option v-for="item in customerList" :key="item.id"
 														:label="item.name" :value="item.id">
@@ -608,11 +608,6 @@
 							judgeStatus: 2
 						}, function(res) {
 							let list = res.data;
-							if (list.length == 1) {
-								let customer = list[0];
-								this.m.customerId = customer.id;
-								this.m.customerName = customer.name;
-							}
 							this.customerList = list;
 						}.bind(this));
 					},
@@ -706,9 +701,6 @@
 						sa.ajax('/TbCostomer/getCurrentCustomerId', function(resp) {
 							let id = resp.data;
 							this.currentCustomerId = id;
-							if (id != 1) {
-								this.m.customerId = id;
-							}
 						}.bind(this));
 					},
 				},

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

@@ -518,8 +518,6 @@
 						if (carType.indexOf('空') !== -1 && carList.length > 1) {
 							return;
 						}
-						let carSize = car.carSize;
-						let carType = car.carType;
 						let netWeight = car.netWeight;
 						let tempList = [];
 						for (let i in filterTypeList) {

+ 0 - 1
sp-admin/sa-view/tb-fee-statistics/month-statistcs-list.html

@@ -58,7 +58,6 @@
 				</div>
 				<!-- ------------- 数据列表 ------------- -->
 				<el-table class="data-table" ref="data-table" :data="dataList">
-					<sa-td type="selection"></sa-td>
 					<sa-td name="收费项目" prop="feeType" type="enum"
 						   :jv="{1: '核酸检测',2: '消杀作业', 3: '装卸作业', 4: '停车费', 5: '过磅费', 6: '入场管理费', 7: '充电打冷作业'}"></sa-td>
 					<sa-td name="月份" prop="month" ></sa-td>

+ 79 - 0
sp-admin/sa-view/tb-fee-statistics/tb-fee-details-list.html

@@ -87,6 +87,13 @@
 					<el-button class="c-btn" type="success" icon="el-icon" @click="print()">打印</el-button>
 					<slot></slot>
 				</div>
+				<div class="fast-btn">
+					<el-button class="c-btn" type="success" icon="el-icon" @click="kaiDanConfirm()">开单确认</el-button>
+					<el-button class="c-btn" type="success" icon="el-icon" @click="diaoDuConfirm()">调度确认</el-button>
+					<el-button class="c-btn" type="success" icon="el-icon" @click="jiChaConfirm()">稽查确认</el-button>
+					<el-button class="c-btn" type="danger" icon="el-icon" @click="jiChaCancel()">取消确认</el-button>
+					<slot></slot>
+				</div>
 				<!-- ------------- 数据列表 ------------- -->
 				<el-table class="data-table" ref="data-table" :data="dataList" >
 					<sa-td type="selection"></sa-td>
@@ -141,6 +148,9 @@
 					<sa-td name="生成时间" prop="createTime" width="150px" ></sa-td>
 					<sa-td name="付款时间" prop="payTime"  width="150px" ></sa-td>
 					<sa-td name="备注" prop="remark" ></sa-td>
+					<sa-td name="开单员" prop="kaiDanPerson" width="80px" ></sa-td>
+					<sa-td name="现场调度员" prop="diaoDuPerson" width="80px" ></sa-td>
+					<sa-td name="统计稽查员" prop="jiChaPerson" width="80px" ></sa-td>
 
 <!--					<el-table-column label="操作" fixed="right"  width="240px">-->
 <!--						<template slot-scope="s">-->
@@ -240,6 +250,75 @@
 					},
 				},
 				methods: {
+					kaiDanConfirm(){
+						let selection = this.$refs['data-table'].selection;
+						let ids = sa.getArrayField(selection, 'id');
+						if(selection.length == 0) {
+							return sa.msg('请至少选择一条数据')
+						}
+						this.$confirm('确定进行开单确认操作?', '提示', {
+							confirmButtonText: '确定',
+							cancelButtonText: '取消',
+						}).then(() => {
+							sa.ajax('/TbFeeDetails/kaiDanConfirm', {ids: ids.join(',')}, function(res) {
+								this.f5();
+							}.bind(this))
+						}).catch(() => {
+
+						});
+					},
+					diaoDuConfirm(){
+						let selection = this.$refs['data-table'].selection;
+						let ids = sa.getArrayField(selection, 'id');
+						if(selection.length == 0) {
+							return sa.msg('请至少选择一条数据')
+						}
+						this.$confirm('确定进行调度确认操作?', '提示', {
+							confirmButtonText: '确定',
+							cancelButtonText: '取消',
+						}).then(() => {
+							sa.ajax('/TbFeeDetails/diaoDuConfirm', {ids: ids.join(',')}, function(res) {
+								this.f5();
+							}.bind(this))
+						}).catch(() => {
+
+						});
+					},
+					jiChaConfirm(){
+						let selection = this.$refs['data-table'].selection;
+						let ids = sa.getArrayField(selection, 'id');
+						if(selection.length == 0) {
+							return sa.msg('请至少选择一条数据')
+						}
+						this.$confirm('确定进行稽查确认操作?', '提示', {
+							confirmButtonText: '确定',
+							cancelButtonText: '取消',
+						}).then(() => {
+							sa.ajax('/TbFeeDetails/jiChaConfirm', {ids: ids.join(',')}, function(res) {
+								this.f5();
+							}.bind(this))
+						}).catch(() => {
+
+						});
+					},
+					jiChaCancel(){
+						let selection = this.$refs['data-table'].selection;
+						let ids = sa.getArrayField(selection, 'id');
+						if(selection.length == 0) {
+							return sa.msg('请至少选择一条数据')
+						}
+						this.$confirm('确定进行开单确认操作?', '提示', {
+							confirmButtonText: '确定',
+							cancelButtonText: '取消',
+							type: 'warning'
+						}).then(() => {
+							sa.ajax('/TbFeeDetails/jiChaCancel', {ids: ids.join(',')}, function(res) {
+								this.f5();
+							}.bind(this))
+						}).catch(() => {
+
+						});
+					},
 					print: function(data) {
 						this.$confirm('确定打印符合条件的数据?', '提示', {
 							confirmButtonText: '确定',

+ 6 - 8
sp-admin/sa-view/tb-fee-statistics/tb-fee-statistics-list.html

@@ -62,7 +62,7 @@
 				</div>
 				<!-- ------------- 数据列表 ------------- -->
 				<el-table class="data-table" ref="data-table" :data="dataList" >
-					<sa-td type="selection"></sa-td>
+<!--					<sa-td type="selection"></sa-td>-->
 					<sa-td name="收费项目" prop="feeType" type="enum"
 						   :jv="{1: '核酸检测',2: '消杀作业', 3: '装卸作业', 4: '停车费', 5: '过磅费', 6: '入场管理费', 7: '充电打冷作业'}"></sa-td>
 <!--					<sa-td name="业务类型" prop="itemTypeName" ></sa-td>-->
@@ -94,13 +94,11 @@
 						</template>
 					</el-table-column>
 					<sa-td name="支付方式" prop="payType" type="enum" :jv="{3: '微信支付'}"></sa-td>
-<!--					<el-table-column label="操作" fixed="right"  width="240px">-->
-<!--						<template slot-scope="s">-->
-<!--							<el-button class="c-btn" type="success" icon="el-icon-view" @click="get(s.row)">查看</el-button>-->
-<!--							<el-button class="c-btn" type="primary" icon="el-icon-edit" @click="update(s.row)">修改</el-button>-->
-<!--							<el-button class="c-btn" type="danger" icon="el-icon-delete" @click="del(s.row)">删除</el-button>-->
-<!--						</template>-->
-<!--					</el-table-column>-->
+
+					<sa-td name="开单员" prop="kaiDanPerson" ></sa-td>
+					<sa-td name="现场调度员" prop="diaoDuPerson" ></sa-td>
+					<sa-td name="统计稽查员" prop="jiChaPerson" ></sa-td>
+
 				</el-table>
 				<!-- ------------- 分页 ------------- -->
 				<sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()"></sa-item>

+ 0 - 1
sp-admin/sa-view/tb-fee-statistics/year-statistcs-list.html

@@ -47,7 +47,6 @@
 				</div>
 				<!-- ------------- 数据列表 ------------- -->
 				<el-table class="data-table" ref="data-table" :data="dataList">
-					<sa-td type="selection"></sa-td>
 					<sa-td name="收费项目" prop="feeType" type="enum"
 						   :jv="{1: '核酸检测',2: '消杀作业', 3: '装卸作业', 4: '停车费', 5: '过磅费', 6: '入场管理费', 7: '充电打冷作业'}"></sa-td>
 					<sa-td name="年份" prop="year"></sa-td>

+ 4 - 4
sp-admin/sa-view/tb-goods/tb-goods-list.html

@@ -44,11 +44,11 @@
 							@change="s => updateNeedOwner(s.row)" width="90"></sa-td>
 					<sa-td name="作业时间" prop="needOperateTime" type="switch" :jv="{0: '选填[#005500]', 1: '必填[#ff0000]'}"
 						@change="s => updateNeedOperateTime(s.row)" width="90"></sa-td>
-					<sa-td name="中国车" prop="chinaCarPay" type="switch" :jv="{0: '免停车费[#005500]', 1: '收停车费[#ff0000]'}"
+					<sa-td name="车" prop="chinaCarPay" type="switch" :jv="{0: '免停车费[#005500]', 1: '收停车费[#ff0000]'}"
 						@change="s => updateChinaCarPay(s.row)" width="120"></sa-td>
-					<sa-td name="越南车" prop="vietnamCarPay" type="switch" :jv="{0: '免停车费[#005500]', 1: '收停车费[#ff0000]'}"
+					<sa-td name="载重车" prop="vietnamCarPay" type="switch" :jv="{0: '免停车费[#005500]', 1: '收停车费[#ff0000]'}"
 						@change="s => updateVietnamCarPay(s.row)" width="120"></sa-td>
-					<el-table-column label="中国车离场限制" width="140">
+					<el-table-column label="车离场限制" width="140">
 						<template slot-scope="s">
 							<el-select v-model="s.row.chinaCarLeave" @change="chinaLeaveChange(s.row)">
 								<el-option v-for="item in leaveSetting" :key="item.id" :value="item.id"
@@ -57,7 +57,7 @@
 							</el-select>
 						</template>
 					</el-table-column>
-					<el-table-column label="越南车离场限制" width="140">
+					<el-table-column label="载重车离场限制" width="140">
 						<template slot-scope="s">
 							<el-select v-model="s.row.vietnamCarLeave" @change="vietnamLeaveChange(s.row)">
 								<el-option v-for="item in leaveSetting" :key="item.id" :value="item.id"

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

@@ -84,7 +84,6 @@ public class OpenService {
     private TbGoodsService tbGoodsService;
 
 
-    private final List<String> CAR_LIST = StrUtil.splitTrim("浙,粤,京,津,冀,晋,蒙,辽,黑,沪,吉,苏,皖,赣,鲁,豫,鄂,湘,桂,琼,渝,川,贵,云,藏, 陕, 甘, 青, 宁", ",");
 
 
     public ResultJson checkCarNumber(CheckCarNumberBO checkCarNumberBO) {
@@ -128,13 +127,6 @@ public class OpenService {
                 .setCarCompany(tbCar != null ? tbCar.getCustomerName() : "临时");
         tbBusinessCarService.saveOrUpdate(tbBusinessCar);
         CoverBase64ToUrl(image, tbBusinessCar.getId(), carNo, 1);
-        if (!CAR_LIST.contains(carNo)) {
-            TbBusiness tbBusiness = tbBusinessService.getById(tbBusinessCar.getBusinessId());
-            if (tbBusiness != null) {
-                tbBusiness.setRealInTime(now).setInChannel(channel);
-                tbBusinessService.updateById(tbBusiness);
-            }
-        }
 
     }
 
@@ -186,7 +178,8 @@ public class OpenService {
             return ResultJson.error("车辆已锁定");
         }
         String businessCarId = tbBusinessCar.getId();
-        String carNoPrefix = StrUtil.sub(carNo, 0, 1);
+        //String carNoPrefix = StrUtil.sub(carNo, 0, 1);
+        String carType=tbBusinessCar.getCarType();
         List<TbBusiness> businessList = tbBusinessService.findOtherBusinessByCarId(businessCarId);
         if (businessList.isEmpty()) {//无业务车辆===>计算停车费
             //如果已经支付过,则从支付时间算起,重新计算停车费
@@ -201,9 +194,9 @@ public class OpenService {
             }
         } else {
             //有业务的车
-            //1、分越南车和中国
-            //中国车是否收费
-            if (CAR_LIST.contains(carNoPrefix)) {
+            //1、分越重车和空
+            //车是否收费
+            if (TbItem.ItemTypeEnum.EMPTY_TYPE.getType().equals(carType)) {
                 boolean chinaCarPay = businessList.stream().anyMatch(tbBusiness -> {
                     TbGoods tbGoods = tbGoodsService.getById(tbBusiness.getGoodsId());
                     return tbGoods.getChinaCarPay() == 1;
@@ -216,7 +209,7 @@ public class OpenService {
                         return ResultJson.error("请缴停车费" + dif + "元");
                     }
                 }
-            } else {//越南车
+            } else {//越南车=重车
                 boolean vietnamCarPay = businessList.stream().anyMatch(tbBusiness -> {
                     TbGoods tbGoods = tbGoodsService.getById(tbBusiness.getGoodsId());
                     return tbGoods.getVietnamCarPay() == 1;
@@ -238,7 +231,7 @@ public class OpenService {
             int chinaCarLeave = tbGoods.getChinaCarLeave();
             boolean pay = tbBusiness.getPayMoney().doubleValue() >= tbBusiness.getItemPrice().doubleValue();
             //需要交业务费
-            if (!CAR_LIST.contains(carNoPrefix)) {//越南
+            if (TbItem.ItemTypeEnum.WEIGHT_TYPE.getType().equals(carType)) {//越南车==重
                 if (TbGoods.LeaveEnum.PART_MONEY.getCode() != vietnamLeave
                         && !pay) {
                     RedisUtil.setByMINUTES(channel, carNo, 1);

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

@@ -120,7 +120,6 @@ public class ApiService {
     @Resource
     private TbBusinessSortService tbBusinessSortService;
 
-    private final List<String> CAR_LIST = StrUtil.splitTrim("浙,粤,京,津,冀,晋,蒙,辽,黑,沪,吉,苏,皖,赣,鲁,豫,鄂,湘,桂,琼,渝,川,贵,云,藏, 陕, 甘, 青, 宁", ",");
 
 
     public List<InOutRecordBO> getInOutRecord(SoMap so) {

+ 4 - 5
sp-server/src/main/java/com/pj/api/wx/service/WxService.java

@@ -33,6 +33,7 @@ import com.pj.project.tb_fee_details.TbFeeDetailsService;
 import com.pj.project.tb_fee_statistics.TbFeeStatisticsService;
 import com.pj.project.tb_goods.TbGoods;
 import com.pj.project.tb_goods.TbGoodsService;
+import com.pj.project.tb_item.TbItem;
 import com.pj.project.tb_order.TbOrder;
 import com.pj.project.tb_order.TbOrderService;
 import com.pj.project.tb_pay_record.TbPayRecord;
@@ -84,7 +85,6 @@ public class WxService {
     @Resource
     private TbGoodsService tbGoodsService;
 
-    private final List<String> CAR_LIST = StrUtil.splitTrim("浙,粤,京,津,冀,晋,蒙,辽,黑,沪,吉,苏,皖,赣,鲁,豫,鄂,湘,桂,琼,渝,川,贵,云,藏, 陕, 甘, 青, 宁", ",");
 
     /**
      * 统一下单接口
@@ -253,11 +253,10 @@ public class WxService {
                     TbGoods tbGoods = tbGoodsService.getById(tbBusiness.getGoodsId());
                     List<TbBusinessCar> carList = tbBusinessCarService.findOtherBusinessCar(businessId);
                     carList.forEach(tbBusinessCar -> {
-                        String carNo = tbBusinessCar.getCarNo();
-                        String carNoStr = StrUtil.sub(carNo, 0, 1);
+                        String carType=tbBusinessCar.getCarType();
                         //
-                        if (CAR_LIST.contains(carNoStr)&&tbGoods.getChinaCarPay()==0
-                                ||!CAR_LIST.contains(carNoStr)&&tbGoods.getVietnamCarPay()==0){
+                        if (TbItem.ItemTypeEnum.EMPTY_TYPE.getType().equals(carType)&&tbGoods.getChinaCarPay()==0
+                                ||TbItem.ItemTypeEnum.WEIGHT_TYPE.getType().equals(carType)&&tbGoods.getVietnamCarPay()==0){
                             tbBusinessCar.setPay(1).setPayTime(now);
                             tbBusinessCarService.updateById(tbBusinessCar);
                         }

+ 20 - 13
sp-server/src/main/java/com/pj/project/tb_business/TbBusinessService.java

@@ -347,8 +347,6 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
                     .setConfirmInputTime(new Date())
                     .setConfirmInputBy(StpUserUtil.getAdmin().getName());
             this.updateById(business);
-            TbGoods tbGoods = tbGoodsService.getById(business.getGoodsId());
-            Integer payStep = tbGoods.getPayStep();
             List<TbBusinessCar> cars = tbBusinessCarService.findOtherBusinessCar(business.getId());
             String carNoStr = cars.stream().map(TbBusinessCar::getCarNo).collect(Collectors.joining("、"));
             storeMsg(business.getCustomerId(), "业务订单【" + business.getNo() + "】已确认" + DateUtil.now() + "。");
@@ -357,11 +355,13 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
             items.forEach(item -> {
                 String businessType = item.getBusinessType();
                 //合作伙伴创建+是否下单后付款
-                if (!StrUtil.equals(businessType, TbCostomer.CustomerEnum.BUSINESS_TYPE.getType())
-                        &&TbGoods.PayStep.BEFORE_CONFIRM.getCode().equals(payStep)) {
+                if (!StrUtil.equals(businessType, TbCostomer.CustomerEnum.BUSINESS_TYPE.getType())) {
                     String customerId = business.getCreateByCustomerId();
+                    List<String> customerType=new ArrayList<>();
                     TbCostomer tbCostomer = tbCostomerService.getById(customerId);
-                    List<String> customerType = StrUtil.splitTrim(tbCostomer.getType(),",");
+                    if (tbCostomer!=null){
+                        customerType = StrUtil.splitTrim(tbCostomer.getType(),",");
+                    }
                     if (customerType.contains(businessType)) {
                         StaticLog.error("订单自动确认======================="+id);
                         MsgDataBO msgDataBO = new MsgDataBO("订单号:" + item.getNo(), "系统自动确认",
@@ -378,6 +378,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
                             wxService.sendTemplateMsg(wxConfig.getBusinessConfirmTemplate(), openId, msgDataBO, detailUrl);
                         });
                     } else {
+                        StaticLog.error("正常流程======================="+id);
                         String remark = "车牌:";
                         String carNo = business.getCardNo();
                         String chinaCarNo = business.getChinaCarNo();
@@ -499,7 +500,10 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
         for (TbBusinessCar tbBusinessCar : cars) {
             Date inTime = tbBusinessCar.getRealInTime();
             BigDecimal partMoney = new BigDecimal("0");
-            String carNo = tbBusinessCar.getCarNo().substring(0, 1);
+            String carType=tbBusinessCar.getCarType();
+            if (StrUtil.isEmpty(carType)){
+                carType=TbItem.ItemTypeEnum.EMPTY_TYPE.getType();
+            }
             if (inTime != null && tbBusinessCar.getRealOutTime() == null) {
                 if (tbBusinessCar.getPay() == 1 && tbBusinessCar.getPayTime() != null) {
                     inTime = tbBusinessCar.getPayTime();
@@ -516,11 +520,11 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
             }
 
             //越南车牌,是否免费
-            if (!CAR_LIST.contains(carNo) && vietnamCarPay == 0) {
+            if (TbItem.ItemTypeEnum.WEIGHT_TYPE.getType().equals(carType) && vietnamCarPay == 0) {
                 partMoney = new BigDecimal("0");
             }
             //中国车,是否免费
-            if (CAR_LIST.contains(carNo) && chinaCarPay == 0) {
+            if (TbItem.ItemTypeEnum.EMPTY_TYPE.getType().equals(carType)&& chinaCarPay == 0) {
                 partMoney = new BigDecimal("0");
             }
             Map<String, Object> carMap = new HashMap<>();
@@ -713,7 +717,10 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
         String carBuseinssNo = DateUtil.format(now, "yyyyMMddHHmm");
         for (TbBusinessCar car : cars) {
             String carNo = car.getCarNo().trim().toUpperCase();
-            String carPrefix = StrUtil.sub(carNo, 0, 1);
+            String carType=car.getCarType();
+            if (StrUtil.isEmpty(carType)){
+                throw new BusinessException(carNo+"类型不能为空");
+            }
             List<TbBusinessCar> notOutRecords = tbBusinessCarService.findNotOutCar(carNo);
             if (notOutRecords.size() > 1) {
                 throw new BusinessException(carNo + "有多个未出场记录,请先处理");
@@ -729,7 +736,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
                 checkOtherBusiness(item.getItemTypeId(), otherBusinessBO.getOperateTime(), tbBusiness.getId(), carNo);
             }
             db.setPayType(TbBusinessCar.PayTypeEnum.NO_PAY_TYPE.getType());
-            if ((CAR_LIST.contains(carPrefix) && chinaCarPay == 0) || (!CAR_LIST.contains(carPrefix) && vietnamCarPay == 0)) {
+            if ((TbItem.ItemTypeEnum.EMPTY_TYPE.getType().equals(carType)&& chinaCarPay == 0) || (TbItem.ItemTypeEnum.WEIGHT_TYPE.getType().equals(carType)&& vietnamCarPay == 0)) {
                 db.setPayType(TbBusinessCar.PayTypeEnum.FEE_TYPE.getType());
             }
             TbCar tbCar = tbCarService.findByCardNo(carNo);
@@ -823,7 +830,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
             for (TbBusinessItem item : itemList) {
                 checkOtherBusiness(item.getItemTypeId(), otherBusinessBO.getOperateTime(), dbBusiness.getId(), carNo);
             }
-            String carPrefix = StrUtil.sub(carNo, 0, 1);
+            String carType=tbBusinessCar.getCarType();
             if (StrUtil.isNotEmpty(businessCarId)) {
                 //原来已存在的
                 TbBusinessCar dbBusinessCar = tbBusinessCarService.getById(businessCarId);
@@ -840,7 +847,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
                                 .setCarNo(carNo).setCarType(tbBusinessCar.getCarType()).setCarSize(tbBusinessCar.getCarSize())
                                 .setNetWeight(tbBusinessCar.getNetWeight()).setCustomerId(dbBusiness.getCustomerId())
                                 .setTimeUpdate(now).setIsLock(0).setCarType(tbBusinessCar.getCarType());
-                        if ((CAR_LIST.contains(carPrefix) && chinaCarPay == 0) || (!CAR_LIST.contains(carPrefix) && vietnamCarPay == 0)) {
+                        if ((TbItem.ItemTypeEnum.EMPTY_TYPE.getType().equals(carType) && chinaCarPay == 0) || (TbItem.ItemTypeEnum.WEIGHT_TYPE.getType().equals(carType) && vietnamCarPay == 0)) {
                             otherCar.setPayType(TbBusinessCar.PayTypeEnum.FEE_TYPE.getType());
                         }
                         tbBusinessCarService.save(otherCar);
@@ -868,7 +875,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
                 checkCar.setCarNo(carNo).setCarType(tbBusinessCar.getCarType()).setCarSize(tbBusinessCar.getCarSize())
                         .setNetWeight(tbBusinessCar.getNetWeight()).setCustomerId(dbBusiness.getCustomerId())
                         .setTimeUpdate(now).setIsLock(0).setCarType(tbBusinessCar.getCarType());
-                if ((CAR_LIST.contains(carPrefix) && chinaCarPay == 0) || (!CAR_LIST.contains(carPrefix) && vietnamCarPay == 0)) {
+                if ((TbItem.ItemTypeEnum.EMPTY_TYPE.getType().equals(carType) && chinaCarPay == 0) || (TbItem.ItemTypeEnum.WEIGHT_TYPE.getType().equals(carType) && vietnamCarPay == 0)) {
                     checkCar.setPayType(TbBusinessCar.PayTypeEnum.FEE_TYPE.getType());
                 }
                 tbBusinessCarService.saveOrUpdate(checkCar);

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

@@ -121,7 +121,8 @@ public class TbBusinessCarController {
         }
         String carNo=so.getString("carNo");
         if (StrUtil.isNotEmpty(carNo)){
-            so.put("carNoList",StrUtil.splitTrim(carNo,"、"));
+            so.put("carNo",carNo.toUpperCase().trim());
+            so.put("carNoList",StrUtil.splitTrim(carNo.toUpperCase(),"、"));
         }
         List<TbBusinessCar> list = tbBusinessCarService.getList(so.startPage());
         return AjaxJson.getPageData(so.getDataCount(), list);

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

@@ -33,14 +33,15 @@
             <if test=' this.has("id") '>and id = #{id}</if>
             <if test=' this.has("businessId") '>and business_id = #{businessId}</if>
             <if test=' this.has("customerId") '>and customer_id = #{customerId}</if>
-            <if test=' this.has("carNo") and carNo.indexOf("、")==-1'>
+            <if test=' this.has("carNo")'>
                 and car_no like concat('%',#{carNo},'%')
             </if>
             <if test=' this.has("carNoList") and carNoList.size>0'>
-                and car_no in
+                and (car_no like concat('%',#{carNo},'%') or car_no in
                 <foreach collection="carNoList" open="(" close=")" item="carNo" separator=",">
                     #{carNo}
                 </foreach>
+                )
             </if>
             <if test=' this.has("preInTime") '>and pre_in_time = #{preInTime}</if>
             <if test=' this.has("preOutTime") '>and pre_out_time = #{preOutTime}</if>

+ 26 - 0
sp-server/src/main/java/com/pj/project/tb_fee_details/TbFeeDetails.java

@@ -175,6 +175,19 @@ public class TbFeeDetails implements Serializable {
     private String businessCarNo;
     private String outTradeNo;
 
+    /**
+     * 开单员
+     */
+    private String kaiDanPerson;
+    /**
+     * 统计稽查员
+     */
+    private String jiChaPerson;
+    /**
+     * 现场调度
+     */
+    private String diaoDuPerson;
+
 
 
     @Getter
@@ -202,6 +215,19 @@ public class TbFeeDetails implements Serializable {
         }
     }
 
+    @Getter
+    @AllArgsConstructor
+    //(1=核酸检测,2=消杀作业,3=装卸作业,4=停车费,5=过磅费)
+    public static enum personEnum{
+        JICHA(1,"统计稽查员"),
+        KAIDAN(2,"开单员"),
+        DIAODU(3,"现场调度员");
+
+        private int code;
+        private String desc;
+
+
+    }
 
 	
 

+ 25 - 0
sp-server/src/main/java/com/pj/project/tb_fee_details/TbFeeDetailsController.java

@@ -94,6 +94,31 @@ public class TbFeeDetailsController {
         return AjaxJson.getSuccessData(tbFeeDetailsService.prePrint(so));
     }
 
+    @RequestMapping("kaiDanConfirm")
+    public AjaxJson kaiDanConfirm(){
+        List<Long> ids = SoMap.getRequestSoMap().getListByComma("ids", long.class);
+        tbFeeDetailsService.kaiDanConfirm(ids);
+        return AjaxJson.getSuccess();
+    }
+    @RequestMapping("diaoDuConfirm")
+    public AjaxJson diaoDuConfirm(){
+        List<Long> ids = SoMap.getRequestSoMap().getListByComma("ids", long.class);
+        tbFeeDetailsService.diaoDuConfirm(ids);
+        return AjaxJson.getSuccess();
+    }
+    @RequestMapping("jiChaConfirm")
+    public AjaxJson jiChaConfirm(){
+        List<Long> ids = SoMap.getRequestSoMap().getListByComma("ids", long.class);
+        tbFeeDetailsService.jiChaConfirm(ids);
+        return AjaxJson.getSuccess();
+    }
+    @RequestMapping("jiChaCancel")
+    public AjaxJson jiChaCancel(){
+        List<Long> ids = SoMap.getRequestSoMap().getListByComma("ids", long.class);
+        return AjaxJson.getSuccess();
+    }
+
+
     /** 重新计算接口,手动调用 */
     @RequestMapping("calcuAgain")
     public AjaxJson calcuAgain(){

+ 108 - 0
sp-server/src/main/java/com/pj/project/tb_fee_details/TbFeeDetailsService.java

@@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.pj.api.wx.bo.PriceBO;
 import com.pj.current.config.MyConfig;
 import com.pj.current.config.PartConfig;
+import com.pj.current.satoken.StpUserUtil;
 import com.pj.project.tb_business.TbBusiness;
 import com.pj.project.tb_business.TbBusinessService;
 import com.pj.project.tb_business_car.TbBusinessCar;
@@ -27,6 +28,11 @@ import com.pj.project.tb_business_car.TbBusinessCarService;
 import com.pj.project.tb_business_item.TbBusinessItem;
 import com.pj.project.tb_fee_details.statics.FeeTypeStatics;
 import com.pj.project.tb_fee_statistics.TbFeeStatistics;
+import com.pj.project.tb_fee_statistics.TbFeeStatisticsService;
+import com.pj.project4sp.admin.SpAdmin;
+import com.pj.project4sp.global.BusinessException;
+import com.pj.project4sp.role.SpRole;
+import com.pj.project4sp.role.SpRoleMapper;
 import com.pj.project4sp.uploadfile.UploadUtil;
 import com.pj.utils.so.SoMap;
 import lombok.extern.slf4j.Slf4j;
@@ -65,6 +71,10 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
     private MyConfig myConfig;
     @Resource
     private PartConfig partConfig;
+    @Resource
+    SpRoleMapper spRoleMapper;
+    @Resource
+    TbFeeStatisticsService tbFeeStatisticsService;
 
     /**
      * 增
@@ -421,4 +431,102 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
         list.add(feeTypeStatics);
         return list;
     }
+
+    public void jiChaConfirm(List<Long> ids) {
+        SpAdmin admin = StpUserUtil.getAdmin();
+        SpRole role = spRoleMapper.getById(Long.valueOf(admin.getRoleId()));
+        if(!StrUtil.equals(TbFeeDetails.personEnum.JICHA.getDesc(), role.getName()) && !StrUtil.equals("admin", role.getType())){
+            throw new BusinessException("无操作权限");
+        }
+        List<TbFeeDetails> detailsList = this.listByIds(ids);
+        Set<String> days = new HashSet<>();
+        for (TbFeeDetails detail : detailsList) {
+            detail.setJiChaPerson(admin.getName());
+            String dayStr = DateUtil.format(detail.getCreateTime(), "yyyy-MM-dd");
+            days.add(dayStr);
+        }
+        this.updateBatchById(detailsList);
+        changeStats(days, TbFeeDetails.personEnum.JICHA.getDesc());
+    }
+
+    public void kaiDanConfirm(List<Long> ids) {
+        SpAdmin admin = StpUserUtil.getAdmin();
+        SpRole role = spRoleMapper.getById(Long.valueOf(admin.getRoleId()));
+        if(!StrUtil.equals(TbFeeDetails.personEnum.KAIDAN.getDesc(), role.getName()) && !StrUtil.equals("admin", role.getType())){
+            throw new BusinessException("无操作权限");
+        }
+        List<TbFeeDetails> detailsList = this.listByIds(ids);
+        Set<String> days = new HashSet<>();
+        for (TbFeeDetails detail : detailsList) {
+            detail.setKaiDanPerson(admin.getName());
+            String dayStr = DateUtil.format(detail.getCreateTime(), "yyyy-MM-dd");
+            days.add(dayStr);
+        }
+        this.updateBatchById(detailsList);
+        changeStats(days, TbFeeDetails.personEnum.KAIDAN.getDesc());
+    }
+
+    public void diaoDuConfirm(List<Long> ids) {
+        SpAdmin admin = StpUserUtil.getAdmin();
+        SpRole role = spRoleMapper.getById(Long.valueOf(admin.getRoleId()));
+        if(!StrUtil.equals(TbFeeDetails.personEnum.DIAODU.getDesc(), role.getName()) && !StrUtil.equals("admin", role.getType())){
+            throw new BusinessException("无操作权限");
+        }
+        List<TbFeeDetails> detailsList = this.listByIds(ids);
+        Set<String> days = new HashSet<>();
+        for (TbFeeDetails detail : detailsList) {
+            detail.setDiaoDuPerson(admin.getName());
+            String dayStr = DateUtil.format(detail.getCreateTime(), "yyyy-MM-dd");
+            days.add(dayStr);
+        }
+        this.updateBatchById(detailsList);
+        changeStats(days, TbFeeDetails.personEnum.DIAODU.getDesc());
+    }
+
+    private void changeStats(Set<String> days, String personType) {
+        String personColumn = "";
+        if(StrUtil.equals(personType, TbFeeDetails.personEnum.JICHA.getDesc())){
+            personColumn = "ji_cha_person";
+        }else if(StrUtil.equals(personType, TbFeeDetails.personEnum.KAIDAN.getDesc())){
+            personColumn = "kai_dan_person";
+        }else{
+            personColumn = "diao_du_person";
+        }
+        for (String day : days) {
+            QueryWrapper<TbFeeDetails> ew1 = new QueryWrapper<>();
+            ew1.like("create_time", day).isNotNull(personColumn);
+            List<TbFeeDetails> confirmList = this.list(ew1);
+            QueryWrapper<TbFeeDetails> ew2 = new QueryWrapper<>();
+            ew2.like("create_time", day);
+            Integer thisDayTotal = tbFeeDetailsMapper.selectCount(ew2);
+            if(confirmList.size() == thisDayTotal){
+                Set<String> names = new TreeSet<>();
+                for (TbFeeDetails detail : confirmList) {
+                    if(StrUtil.equals(personType, TbFeeDetails.personEnum.JICHA.getDesc())){
+                        names.add(detail.getJiChaPerson());
+                    }else if(StrUtil.equals(personType, TbFeeDetails.personEnum.KAIDAN.getDesc())){
+                        names.add(detail.getKaiDanPerson());
+                    }else{
+                        names.add(detail.getDiaoDuPerson());
+                    }
+                }
+                String personName = StrUtil.join(",", names);
+                QueryWrapper<TbFeeStatistics> ew3= new QueryWrapper<>();
+                ew3.eq("day_time", day);
+                List<TbFeeStatistics> statsList = tbFeeStatisticsService.list(ew3);
+                for (TbFeeStatistics thisDayStats : statsList) {
+                    if(StrUtil.equals(personType, TbFeeDetails.personEnum.JICHA.getDesc())){
+                        thisDayStats.setJiChaPerson(personName);
+                    }else if(StrUtil.equals(personType, TbFeeDetails.personEnum.KAIDAN.getDesc())){
+                        thisDayStats.setKaiDanPerson(personName);
+                    }else{
+                        thisDayStats.setDiaoDuPerson(personName);
+                    }
+                }
+                tbFeeStatisticsService.updateBatchById(statsList);
+            }else{
+                continue;
+            }
+        }
+    }
 }

+ 13 - 0
sp-server/src/main/java/com/pj/project/tb_fee_statistics/TbFeeStatistics.java

@@ -109,6 +109,19 @@ public class TbFeeStatistics implements Serializable {
 	 */
     private Integer payType;
 
+    /**
+     * 开单员
+     */
+    private String kaiDanPerson;
+    /**
+     * 统计稽查员
+     */
+    private String jiChaPerson;
+    /**
+     * 现场调度
+     */
+    private String diaoDuPerson;
+
     @TableField(exist = false)
     private BigDecimal statisticsMoney = new BigDecimal(0);