Browse Source

Merge remote-tracking branch 'origin/master'

shasha 4 days ago
parent
commit
492bda133e
21 changed files with 453 additions and 51 deletions
  1. 11 0
      snowy-admin-web/src/api/biz/bizLoadAppointApi.js
  2. 1 0
      snowy-admin-web/src/views/biz/bizconfig/form.vue
  3. 4 3
      snowy-admin-web/src/views/biz/bizloadappoint/dispatch.vue
  4. 2 1
      snowy-admin-web/src/views/biz/bizloadappoint/dispatchadd.vue
  5. 5 2
      snowy-admin-web/src/views/biz/bizloadappoint/dispatchload.vue
  6. 2 1
      snowy-admin-web/src/views/biz/bizloadappoint/dispatchloadadd.vue
  7. 12 1
      snowy-admin-web/src/views/biz/bizloadappoint/form.vue
  8. 57 5
      snowy-admin-web/src/views/biz/bizloadappoint/index.vue
  9. 65 0
      snowy-admin-web/src/views/biz/bizloadappoint/reject.vue
  10. 1 1
      snowy-admin-web/src/views/biz/bizloadarrive/index.vue
  11. 51 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/service/impl/BizAppointmentRecordServiceImpl.java
  12. 42 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizloadappoint/controller/BizLoadAppointController.java
  13. 9 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizloadappoint/entity/BizLoadAppoint.java
  14. 1 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizloadappoint/mapper/mapping/BizLoadAppointMapper.xml
  15. 3 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizloadappoint/param/BizLoadAppointAddParam.java
  16. 12 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizloadappoint/param/BizLoadAppointEditParam.java
  17. 15 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizloadappoint/service/BizLoadAppointService.java
  18. 69 5
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizloadappoint/service/impl/BizLoadAppointServiceImpl.java
  19. 69 5
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizloadarrive/service/impl/BizLoadArriveServiceImpl.java
  20. 19 26
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizloaddispatch/service/impl/BizLoadDispatchServiceImpl.java
  21. 3 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizservicecustomer/entity/BizServiceCustomerFlow.java

+ 11 - 0
snowy-admin-web/src/api/biz/bizLoadAppointApi.js

@@ -33,6 +33,10 @@ export default {
 	updateCustomerSign(data){
 		return request('updateCustomerSign',data)
 	},
+	//客户结束签名
+	endCustomerSign(data){
+		return request('endCustomerSign',data)
+	},
 	//导出
 	exportRecord(data){
 		return request('exportRecord', data, 'get', {
@@ -47,6 +51,10 @@ export default {
 	endLoad(data){
 		return request('endLoad',data)
 	},
+	//客户驳回
+	rejectOrder(data){
+		return request('rejectOrder',data)
+	},
 	// 填报起卸订单
 	fillLoad(data){
 		return request('fillLoad',data)
@@ -54,5 +62,8 @@ export default {
 	//修改预约次数
 	updateAppointNumber(data){
 		return request('updateAppointNumber',data)
+	},
+	sendConfirmLoad(data){
+		return request('sendConfirmLoad',data)
 	}
 }

+ 1 - 0
snowy-admin-web/src/views/biz/bizconfig/form.vue

@@ -144,6 +144,7 @@
 		lineNoticeSwitch: [required('请选择排队通知开关')],
 		loadWeight: [required('请输入车辆装载量')],
 		settleAccount:[required('请输入结算基础金额')],
+		loadSwitch:[required('请选择装货点位共享开关')],
 	}
 	// 验证并提交数据
 	const onSubmit = () => {

+ 4 - 3
snowy-admin-web/src/views/biz/bizloadappoint/dispatch.vue

@@ -37,7 +37,7 @@
 		>
 			<template #operator class="table-operator">
 				<a-space>
-					<a-button type="primary" @click="dispatchAddRef.onOpen(appointId)">
+					<a-button type="primary" @click="dispatchAddRef.onOpen(appointId,loadNumber)">
 						<template #icon><plus-outlined /></template>
 						新增
 					</a-button>
@@ -110,6 +110,7 @@
 	const loadTimeIdList = ref()
 
 	const appointId = ref()
+	const loadNumber = ref()
 	// 打开抽屉
 	const onOpen = (record) => {
 		open.value = true
@@ -117,6 +118,7 @@
 			let recordData = cloneDeep(record)
 			formData.value = Object.assign({}, recordData)
 			appointId.value = formData.value.id
+			loadNumber.value = formData.value.loadNumber
 		}
 
 		//装货点位查询
@@ -216,13 +218,12 @@
 
 	// 关闭抽屉
 	const onClose = () => {
+		emit('successful')
 		formRef.value.resetFields()
 		formData.value = {}
 		open.value = false
 		loadTimeIdList.value = ''
 		numberFlag.value = false
-		emit('successful')
-
 	}
 	// 默认要校验的
 	const formRules = {

+ 2 - 1
snowy-admin-web/src/views/biz/bizloadappoint/dispatchadd.vue

@@ -107,11 +107,12 @@
 	const loadTimeIdList = ref()
 
 	// 打开抽屉
-	const onOpen = (record) => {
+	const onOpen = (record,loadNumber) => {
 		open.value = true
 		if (record) {
 			let recordData = cloneDeep(record)
 			formData.value.appointId = record
+			formData.value.loadNumber = loadNumber
 		}
 
 		//装货点位查询

+ 5 - 2
snowy-admin-web/src/views/biz/bizloadappoint/dispatchload.vue

@@ -40,7 +40,7 @@
 		>
 			<template #operator class="table-operator">
 				<a-space>
-					<a-button type="primary" @click="dispatchLoadAddRef.onOpen(appointId)">
+					<a-button type="primary" @click="dispatchLoadAddRef.onOpen(appointId,loadNumber)">
 						<template #icon><plus-outlined /></template>
 						新增
 					</a-button>
@@ -114,6 +114,7 @@
 	const loadTimeIdList = ref()
 
 	const appointId = ref()
+	const loadNumber = ref()
 	// 打开抽屉
 	const onOpen = (record) => {
 		open.value = true
@@ -121,6 +122,7 @@
 			let recordData = cloneDeep(record)
 			formData.value = Object.assign({}, recordData)
 			appointId.value = formData.value.id
+			loadNumber.value = formData.value.loadNumber
 		}
 
 		//装货点位查询
@@ -226,12 +228,13 @@
 
 	// 关闭抽屉
 	const onClose = () => {
+		emit('successful')
 		formRef.value.resetFields()
 		formData.value = {}
 		open.value = false
 		loadTimeIdList.value = ''
 		numberFlag.value = false
-		emit('successful')
+
 
 	}
 	// 默认要校验的

+ 2 - 1
snowy-admin-web/src/views/biz/bizloadappoint/dispatchloadadd.vue

@@ -103,12 +103,13 @@
 	const loadTimeIdList = ref()
 
 	// 打开抽屉
-	const onOpen = (record) => {
+	const onOpen = (record,loadNumber) => {
 		console.log("record:"+JSON.stringify(record))
 		open.value = true
 		if (record) {
 			let recordData = cloneDeep(record)
 			formData.value.appointId = record
+			formData.value.loadNumber = loadNumber
 			console.log("formData:"+JSON.stringify(formData.value))
 		}
 

+ 12 - 1
snowy-admin-web/src/views/biz/bizloadappoint/form.vue

@@ -48,7 +48,7 @@
 				</a-radio-group>
 			</a-form-item>
 			<a-form-item label="订单类型:" name="orderType">
-				<a-radio-group button-style="solid" v-model:value="formData.orderType" @change="onChangeOrder">
+				<a-radio-group button-style="solid" v-model:value="formData.orderType">
 					<a-radio-button value="1">
 						配送订单
 					</a-radio-button>
@@ -57,6 +57,16 @@
 					</a-radio-button>
 				</a-radio-group>
 			</a-form-item>
+			<a-form-item label="场地类型:" name="loadType">
+				<a-radio-group button-style="solid" v-model:value="formData.loadType">
+					<a-radio-button value="1">
+						内场
+					</a-radio-button>
+					<a-radio-button value="2">
+						外场
+					</a-radio-button>
+				</a-radio-group>
+			</a-form-item>
 			<a-form-item label="汽运供应商:" name="supplierIdList">
 				<a-select v-model:value="formData.supplierIdList" placeholder="请选择汽运供应商"
 						  :options="supplierIdLists" mode="tags"
@@ -169,6 +179,7 @@
 		orderType:[required('请选择订单类型')],
 		supplierIdList:[required('请选择汽运供应商')],
 		landFreightPrice:[required('请选择汽运运费单价')],
+		loadType:[required('请选择场地类型')],
 	}
 
 	//获取订单总额

+ 57 - 5
snowy-admin-web/src/views/biz/bizloadappoint/index.vue

@@ -98,18 +98,27 @@
 								<a-menu-item v-if="hasPerm('bizLoadAppointDelete') && (record.status == '0')">
 									<a style="color:red" size="small" type="link" @click="deleteConfig(record)">删除</a>
 								</a-menu-item>
-								<a-menu-item v-if="hasPerm('bizLoadDispatch') && (record.status == '4' || record.status=='5' || record.status=='6') && record.arriveStatus == '2'">
+								<a-menu-item v-if="hasPerm('bizLoadDispatch') && (record.status == '10' || record.status=='5' || record.status=='6') && record.arriveStatus == '2'">
 									<a style="color:blue" size="small" type="link" @click="dispatchRef.onOpen(record)">装货调度</a>
 								</a-menu-item>
-								<a-menu-item v-if="hasPerm('bizDispatchLoad') && (record.status == '4' || record.status=='5' || record.status=='6') && record.arriveStatus == '2'">
+								<a-menu-item v-if="hasPerm('bizDispatchLoad') && (record.status == '4' || record.status=='5' || record.status=='6' || record.status == '10' || record.status == '7') && record.arriveStatus == '2'">
 									<a style="color:green" size="small" type="link" @click="dispatchLoadRef.onOpen(record)">起卸调度</a>
 								</a-menu-item>
-								<a-menu-item v-if="hasPerm('bizLoadAppointEnd') && (record.status=='5' || record.status=='6')">
+								<a-menu-item v-if="hasPerm('bizLoadAppointEnd') && (record.status=='5' || record.status=='6' || record.status == '11' || record.status == '12')">
 									<a style="color:red" @click="endRef.showModal(record.id)">结束</a>
 								</a-menu-item>
 								<a-menu-item v-if="hasPerm('bizLoadAppointFill') && (record.status=='7' )">
 									<a style="color:orange" @click="fillRef.showModal(record.id)">填报</a>
 								</a-menu-item>
+								<a-menu-item v-if="hasPerm('bizLoadCustomerConfirm') && (record.status=='8' )">
+									<a style="color:orange" @click="confirmSignNameRef.show(record.id)">确认</a>
+								</a-menu-item>
+								<a-menu-item v-if="hasPerm('bizLoadCustomerReject') && (record.status=='8' )">
+									<a style="color:orangered" @click="rejectRef.showModal(record.id)">驳回</a>
+								</a-menu-item>
+								<a-menu-item v-if="hasPerm('bizLoadSendConfirm') && (record.status=='12' )">
+									<a style="color:orangered" @click="sendConfirm(record.id)">发货确认</a>
+								</a-menu-item>
 								<a-menu-item v-if="hasPerm('bizLoadAppointConfig') && (record.orderStatus != '0' )">
 									<a style="color:forestgreen" @click="showMore(record)">配置</a>
 								</a-menu-item>
@@ -150,8 +159,11 @@
 	<Dispatch ref="dispatchRef" @successful="tableRef.refresh()" />
 	<DispatchLoad ref="dispatchLoadRef" @successful="tableRef.refresh()" />
 	<End ref="endRef" @successful="tableRef.refresh(true)" />
+	<Reject ref="rejectRef" @successful="tableRef.refresh(true)" />
 	<Fill ref="fillRef" @successful="tableRef.refresh(true)" />
 	<XnSignName ref="XnSignNameRef" @successful="signSuccess" />
+	<XnSignName ref="confirmSignNameRef" @successful="confirmSignSuccess" />
+
 
 	<a-modal v-model:visible="open" title="二维码" width="600px" style="height: 700px">
 		<div id="qrcode" style="text-align: center; margin:  15px 5px 15px 5px">
@@ -241,6 +253,7 @@
 	import DispatchLoad from './dispatchload.vue'
 	import End from "./end.vue";
 	import Fill from './fill.vue'
+	import Reject from './reject.vue'
 	import bizOrderConfigApi from "@/api/biz/bizOrderConfigApi";
 
 	const editAccountFlag = ref(false)
@@ -252,6 +265,8 @@
 	const dispatchLoadRef = ref()
 	const detailRef = ref()
 	const XnSignNameRef = ref()
+	const confirmSignNameRef = ref()
+	const rejectRef = ref()
 	const nowRecord = ref()
 	const endRef = ref()
 	const fillRef = ref()
@@ -291,8 +306,8 @@
 
 	const columns1 = [
 		{
-			title: '申请数量',
-			dataIndex: 'appointNumber',
+			title: '起卸单号',
+			dataIndex: 'loadNumber',
 			align: 'center',
 			resizable: true,
 			ellipsis: true,
@@ -474,6 +489,32 @@
 		})
 	}
 
+	//发货确认
+	const sendConfirm = (id) =>{
+		Modal.confirm({
+			title: '提示',
+			icon: createVNode(ExclamationCircleOutlined),
+			content: '确定发货确认吗?',
+			onOk() {
+				submitLoading.value = true
+				let params =
+					{
+						id: id
+					}
+
+				bizLoadAppointApi
+					.sendConfirmLoad(params)
+					.then(() => {
+						tableRef.value.refresh(true)
+					})
+					.finally(() => {
+						submitLoading.value = false
+					})
+			},
+			onCancel() {}
+		})
+	}
+
 	// 签名板组件回调
 	const signSuccess = (value) => {
 		const param = {
@@ -486,6 +527,17 @@
 	}
 
 
+	const confirmSignSuccess = (value) => {
+		const param = {
+			id:value.id,
+			endSign: value.value
+		}
+		bizLoadAppointApi.endCustomerSign(param).then(() => {
+			tableRef.value.refresh(true)
+		})
+	}
+
+
 	//导出
 	const exportTotal = () => {
 		Modal.confirm({

+ 65 - 0
snowy-admin-web/src/views/biz/bizloadappoint/reject.vue

@@ -0,0 +1,65 @@
+<template>
+    <a-modal v-model:visible="visible" title="驳回">
+
+        <a-form ref="formRef" :label-col="labelCol" :model="formData" layout="horizontal">
+            <a-form-item v-show="false">
+                <a-input v-model:value="formData.id"></a-input>
+            </a-form-item>
+            <a-form-item
+                    label="驳回说明"
+                    name="rejectRemark"
+            >
+                <a-textarea v-model:value="formData.rejectRemark" placeholder="请输入驳回说明"
+                            :auto-size="{ minRows: 3, maxRows: 5 }"/>
+            </a-form-item>
+        </a-form>
+        <template #footer>
+            <a-spin :spinning="submitLoading">
+                <a-button type="primary" @click="onsubmit(true)">结束</a-button>
+            </a-spin>
+        </template>
+    </a-modal>
+</template>
+<script setup>
+import {message} from 'ant-design-vue';
+import bizOrderApi from '@/api/biz/bizOrderApi'
+import bizLoadAppointApi from "@/api/biz/bizLoadAppointApi";
+
+const emit = defineEmits({successful: null})
+const visible = ref(false);
+const submitLoading = ref(false)
+const labelCol = ref({span: 4})
+// 表单数据
+const formData = ref({})
+const showModal = (id) => {
+    formData.value.id = id
+    visible.value = true;
+};
+const onClose = () => {
+    formData.value = {}
+    visible.value = false
+};
+const onsubmit = (flag) => {
+    if (flag === true) {
+        if (!formData.value.rejectRemark) {
+            message.error('驳回时,说明信息不能为空')
+            return
+        }
+    }
+    submitLoading.value = true
+	formData.value.auditFlag = flag
+	bizLoadAppointApi.rejectOrder(formData.value).then(() => {
+        onClose()
+        emit('successful', null)
+    }).finally(() => {
+        submitLoading.value = false
+    })
+}
+// 抛出函数
+defineExpose({
+    showModal
+})
+</script>
+<style scoped>
+
+</style>

+ 1 - 1
snowy-admin-web/src/views/biz/bizloadarrive/index.vue

@@ -100,7 +100,7 @@
 									<a style="color:blue" @click="reviewRef.showModal(record.id)" >审核</a>
 								</a-menu-item>
 								<!--确认-->
-								<a-menu-item v-if="hasPerm('bizLoadArriveConfirm') && (record.status == '2' ) && record.loadStatus == '8'">
+								<a-menu-item v-if="hasPerm('bizLoadArriveConfirm') && (record.status == '2' ) && record.loadStatus == '9'">
 <!--									<a style="color:blue" size="small" type="link" @click="confirmConfig(record)">确认</a>-->
 									<a style="color:blue" @click="XnSignNameRef.show(record.id)" >确认</a>
 								</a-menu-item>

+ 51 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/service/impl/BizAppointmentRecordServiceImpl.java

@@ -1123,6 +1123,15 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
                 bizLoadTimeService.updateById(bizLoadTime);
             }
         }
+
+        //跟新起卸订单预约次数
+        BizLoadAppoint appoint = bizLoadAppointService.getById(bizAppointmentRecordAddParam.getOrderId());
+        if(ObjectUtil.isNotNull(appoint)){
+            //修改起卸已约次数
+            appoint.setAlreadyAppointNumber(appoint.getAlreadyAppointNumber()+1);
+            bizLoadAppointService.updateById(appoint);
+        }
+
     }
 
 
@@ -1199,6 +1208,17 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
                     throw new CommonException("装卸时间段已过,不可预约!");
                 }
             }
+
+            //判断起卸订单预约次数是否满足
+            BizLoadAppoint loadAppoint = bizLoadAppointService.getById(bizAppointmentRecordAddParam.getOrderId());
+            if(ObjectUtil.isNotNull(loadAppoint)){
+                //获取剩余可约次数
+                int number = loadAppoint.getAppointNumber() - loadAppoint.getAlreadyAppointNumber();
+                if(number <= 0){
+                    throw new CommonException("起卸订单已预约满!");
+                }
+            }
+
         } finally {
             lock.unlock(); // 释放锁
         }
@@ -1229,6 +1249,21 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
                 }
             }
         }
+        if(!StringUtils.equals(bizAppointmentRecord.getOrderId(),bizAppointmentRecordEditParam.getOrderId())){
+            //获取旧的起卸订单
+            BizLoadAppoint oldOrder = bizLoadAppointService.getById(bizAppointmentRecord.getOrderId());
+            if(ObjectUtil.isNotNull(oldOrder)){
+                oldOrder.setAlreadyAppointNumber(oldOrder.getAlreadyAppointNumber() - 1);
+                bizLoadAppointService.updateById(oldOrder);
+            }
+
+            //获取新的起卸订单
+            BizLoadAppoint newOrder = bizLoadAppointService.getById(bizAppointmentRecordEditParam.getOrderId());
+            if(ObjectUtil.isNotNull(newOrder)){
+                newOrder.setAlreadyAppointNumber(newOrder.getAlreadyAppointNumber() + 1);
+                bizLoadAppointService.updateById(newOrder);
+            }
+        }
         BeanUtil.copyProperties(bizAppointmentRecordEditParam, bizAppointmentRecord);
         if (StringUtils.equals(bizAppointmentRecord.getStatus(), "2")) {
             //如果当前状态是审核不通过的状态,修改后重新提交审核
@@ -1317,6 +1352,18 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
                 }
 
             }
+
+            //判断是否更换过起卸订单
+            if(!StringUtils.equals(bizAppointmentRecord.getOrderId(),bizAppointmentRecordEditParam.getOrderId())){
+                BizLoadAppoint loadAppoint = bizLoadAppointService.getById(bizAppointmentRecordEditParam.getOrderId());
+                if(ObjectUtil.isNotNull(loadAppoint)){
+                    //获取起卸订单剩余可约次数
+                    int number = loadAppoint.getAppointNumber() - loadAppoint.getAlreadyAppointNumber();
+                    if(number <= 0){
+                        throw new CommonException("起卸订单已经预约满!");
+                    }
+                }
+            }
         } finally {
             lock.unlock(); // 释放锁
         }
@@ -1780,13 +1827,16 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
     @Override
     public void localConfirm(BizAppointmentRecordEditParam bizAppointmentRecordEditParam) {
         BizAppointmentRecord bizAppointmentRecord = this.queryEntity(bizAppointmentRecordEditParam.getId());
+        log.info("地磅端司机确认开始---车牌号:"+bizAppointmentRecord.getLicenseNumber()+",预约id:"+bizAppointmentRecord.getId());
         bizAppointmentRecord.setStatus("9");
         this.updateById(bizAppointmentRecord);
+        log.info("地磅端司机确认结束");
     }
 
     @Override
     public void localCancel(BizAppointmentRecordEditParam bizAppointmentRecordEditParam) {
         BizAppointmentRecord bizAppointmentRecord = this.queryEntity(bizAppointmentRecordEditParam.getId());
+        log.info("地磅端司机取消开始---车牌号:"+bizAppointmentRecord.getLicenseNumber()+",预约id:"+bizAppointmentRecord.getId());
         bizAppointmentRecord.setStatus("6");
         this.updateById(bizAppointmentRecord);
 
@@ -1800,6 +1850,7 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
             updateWrapper.eq(BizRecord::getId,bizRecord.getId()).set(BizRecord::getConfirmUser,null);
             bizRecordService.update(updateWrapper);
         }
+        log.info("地磅端司机取消结束");
     }
 
     @Override

+ 42 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizloadappoint/controller/BizLoadAppointController.java

@@ -152,6 +152,48 @@ public class BizLoadAppointController {
         return CommonResult.ok();
     }
 
+    /**
+     * 客户结束签名
+     *
+     * @author fanzherong
+     * @date  2025/06/25 14:51
+     */
+    @Operation(summary = "客户结束签名")
+    @CommonLog("客户结束签名")
+    @PostMapping("/biz/bizloadappoint/endCustomerSign")
+    public CommonResult<String> endCustomerSign(@RequestBody @Valid BizLoadAppointEditParam bizLoadAppointEditParam) {
+        bizLoadAppointService.endCustomerSign(bizLoadAppointEditParam);
+        return CommonResult.ok();
+    }
+
+    /**
+     * 客户驳回
+     *
+     * @author fanzherong
+     * @date  2025/06/25 14:51
+     */
+    @Operation(summary = "客户驳回")
+    @CommonLog("客户驳回")
+    @PostMapping("/biz/bizloadappoint/rejectOrder")
+    public CommonResult<String> rejectOrder(@RequestBody @Valid BizLoadAppointEditParam bizLoadAppointEditParam) {
+        bizLoadAppointService.rejectOrder(bizLoadAppointEditParam);
+        return CommonResult.ok();
+    }
+
+    /**
+     * 发货确认
+     *
+     * @author fanzherong
+     * @date  2025/06/25 14:51
+     */
+    @Operation(summary = "发货确认")
+    @CommonLog("发货确认")
+    @PostMapping("/biz/bizloadappoint/sendConfirmLoad")
+    public CommonResult<String> sendConfirmLoad(@RequestBody @Valid BizLoadAppointEditParam bizLoadAppointEditParam) {
+        bizLoadAppointService.sendConfirmLoad(bizLoadAppointEditParam);
+        return CommonResult.ok();
+    }
+
     /**
      * 导出起卸预约报表
      */

+ 9 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizloadappoint/entity/BizLoadAppoint.java

@@ -147,4 +147,13 @@ public class BizLoadAppoint extends CommonEntity {
 
     /**已约次数*/
     private Integer alreadyAppointNumber;
+
+    /**场地类型  1:内场   2:外场*/
+    private String loadType;
+
+    /**订单结束客户签名*/
+    private String endSign;
+
+    /**订单结束客户签名时间*/
+    private Date endSignTime;
 }

+ 1 - 1
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizloadappoint/mapper/mapping/BizLoadAppointMapper.xml

@@ -37,7 +37,7 @@
          left join biz_goods bg on bg.id = bla.goods_id
          left join biz_supplier bs on bs.id = bla.supplier_id
          LEFT JOIN (select ba.appoint_id,ba.`STATUS` from biz_load_arrive ba  where ba.delete_flag = 'NOT_DELETE') ba on ba.appoint_id = bla.id
-         LEFT JOIN (select appoint_id,user_id from biz_load_dispatch where load_type = '1' AND delete_flag = 'NOT_DELETE' GROUP BY user_id) bld
+         LEFT JOIN (select appoint_id,user_id from biz_load_dispatch where load_type = '1' AND delete_flag = 'NOT_DELETE' GROUP BY appoint_id,user_id) bld
          on bld.appoint_id = bla.id
          ${ew.customSqlSegment}
     </select>

+ 3 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizloadappoint/param/BizLoadAppointAddParam.java

@@ -81,4 +81,7 @@ public class BizLoadAppointAddParam {
     /**陆运运费单价**/
     private BigDecimal landFreightPrice;
 
+    /**操作类型*/
+    private String loadType;
+
 }

+ 12 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizloadappoint/param/BizLoadAppointEditParam.java

@@ -100,4 +100,16 @@ public class BizLoadAppointEditParam {
     private BigDecimal landFreightPrice;
 
     private Integer appointNumber;
+
+    /**操作类型*/
+    private String loadType;
+
+    /**订单结束客户签名*/
+    private String endSign;
+
+    /**订单结束客户签名时间*/
+    private String endSignTime;
+
+    /**客户驳回说明*/
+    private String rejectRemark;
 }

+ 15 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizloadappoint/service/BizLoadAppointService.java

@@ -90,6 +90,11 @@ public interface BizLoadAppointService extends IService<BizLoadAppoint> {
      */
     void updateCustomerSign(BizLoadAppointEditParam bizLoadAppointEditParam);
 
+    /**
+     * 客户结束签名
+     */
+    void endCustomerSign(BizLoadAppointEditParam bizLoadAppointEditParam);
+
     /**
      * 导出
      */
@@ -111,6 +116,16 @@ public interface BizLoadAppointService extends IService<BizLoadAppoint> {
      */
     void fillLoad(BizLoadAppointEditParam bizLoadAppointEditParam);
 
+    /**
+     * 客户驳回
+     */
+    void rejectOrder(BizLoadAppointEditParam bizLoadAppointEditParam);
+
+    /**
+     * 发货确认
+     */
+    void sendConfirmLoad(BizLoadAppointEditParam bizLoadAppointEditParam);
+
     /**
      * 修改预约次数
      */

+ 69 - 5
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizloadappoint/service/impl/BizLoadAppointServiceImpl.java

@@ -30,6 +30,8 @@ import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import vip.xiaonuo.auth.core.util.StpLoginUserUtil;
+import vip.xiaonuo.biz.modular.bizauditlog.entity.BizAuditLog;
+import vip.xiaonuo.biz.modular.bizauditlog.service.BizAuditLogService;
 import vip.xiaonuo.biz.modular.bizconfig.entity.BizConfig;
 import vip.xiaonuo.biz.modular.bizconfig.service.BizConfigService;
 import vip.xiaonuo.biz.modular.bizloadappoint.param.*;
@@ -39,7 +41,9 @@ import vip.xiaonuo.biz.modular.bizorder.entity.BizOrder;
 import vip.xiaonuo.biz.modular.bizorder.param.BizOrderExportResult;
 import vip.xiaonuo.biz.modular.bizorderconfig.entity.BizOrderConfig;
 import vip.xiaonuo.biz.modular.bizservicecustomer.entity.BizServiceCustomerAccount;
+import vip.xiaonuo.biz.modular.bizservicecustomer.entity.BizServiceCustomerFlow;
 import vip.xiaonuo.biz.modular.bizservicecustomer.service.BizServiceCustomerAccountService;
+import vip.xiaonuo.biz.modular.bizservicecustomer.service.BizServiceCustomerFlowService;
 import vip.xiaonuo.biz.modular.bizsettle.entity.BizSettle;
 import vip.xiaonuo.biz.modular.utils.CommonExportUtil;
 import vip.xiaonuo.common.enums.CommonSortOrderEnum;
@@ -77,9 +81,15 @@ public class BizLoadAppointServiceImpl extends ServiceImpl<BizLoadAppointMapper,
     @Resource
     private BizServiceCustomerAccountService bizServiceCustomerAccountService;
 
+    @Resource
+    private BizServiceCustomerFlowService bizServiceCustomerFlowService;
+
     @Resource
     private BizConfigService bizConfigService;
 
+    @Resource
+    private BizAuditLogService bizAuditLogService;
+
     @Override
     public Page<BizLoadAppoint> page(BizLoadAppointPageParam bizLoadAppointPageParam) {
         QueryWrapper<BizLoadAppoint> queryWrapper = getQueryWrapper(bizLoadAppointPageParam);
@@ -279,21 +289,25 @@ public class BizLoadAppointServiceImpl extends ServiceImpl<BizLoadAppointMapper,
     @Override
     public void delete(List<BizLoadAppointIdParam> bizLoadAppointIdParamList) {
         // 执行删除
-        //删除供应商
         for(BizLoadAppointIdParam bizLoadAppointIdParam : bizLoadAppointIdParamList){
+            //删除供应商
             List<BizLoadAppointSupplier> list = bizLoadAppointSupplierService.list(new QueryWrapper<BizLoadAppointSupplier>().lambda().
                     eq(BizLoadAppointSupplier::getAppointId, bizLoadAppointIdParam.getId()));
             bizLoadAppointSupplierService.removeByIds(CollStreamUtil.toList(list,BizLoadAppointSupplier::getId));
 
+            //释放金额
             BizLoadAppoint bizLoadAppoint = this.queryEntity(bizLoadAppointIdParam.getId());
             BizServiceCustomerAccount oldCustomerAccount = bizServiceCustomerAccountService.getOne(new QueryWrapper<BizServiceCustomerAccount>().lambda().
                     eq(BizServiceCustomerAccount::getServiceCustomerId, bizLoadAppoint.getCustomerId()).
                     last("limit 1"));
             if(ObjectUtil.isNotNull(oldCustomerAccount)){
-                //订单起卸费(起卸单价*订单数量)
-                BigDecimal olderPrice = bizLoadAppoint.getLoadPrice().divide(new BigDecimal(1000)).multiply(bizLoadAppoint.getOrderWeight());
-                oldCustomerAccount.setLockAmount(oldCustomerAccount.getLockAmount().subtract(olderPrice));
-                bizServiceCustomerAccountService.updateById(oldCustomerAccount);
+                if(StringUtils.equals(bizLoadAppoint.getPayType(),"1")){
+                    //预付释放锁定金额
+                    //订单起卸费(起卸单价*订单数量)
+                    BigDecimal olderPrice = bizLoadAppoint.getLoadPrice().multiply(bizLoadAppoint.getOrderWeight()).divide(new BigDecimal(1000));
+                    oldCustomerAccount.setLockAmount(oldCustomerAccount.getLockAmount().subtract(olderPrice));
+                    bizServiceCustomerAccountService.updateById(oldCustomerAccount);
+                }
             }
 
 
@@ -352,6 +366,26 @@ public class BizLoadAppointServiceImpl extends ServiceImpl<BizLoadAppointMapper,
         this.updateById(bizLoadAppoint);
     }
 
+    @Transactional
+    @Override
+    public void endCustomerSign(BizLoadAppointEditParam bizLoadAppointEditParam) {
+        BizLoadAppoint bizLoadAppoint = this.queryEntity(bizLoadAppointEditParam.getId());
+        if(ObjectUtil.isEmpty(bizLoadAppointEditParam.getEndSign())){
+            throw new CommonException("签名不能为空!");
+        }
+        String endSign = bizLoadAppointEditParam.getEndSign();
+        if(bizLoadAppointEditParam.getEndSign().contains(StrUtil.COMMA)) {
+            endSign = StrUtil.split(endSign, StrUtil.COMMA).get(1);
+        }
+        String base64 = ImgUtil.toBase64DataUri(ImgUtil.scale(ImgUtil.toImage(endSign),
+                100, 50, null), ImgUtil.IMAGE_TYPE_PNG);
+
+        bizLoadAppoint.setEndSign(base64);
+        bizLoadAppoint.setStatus("9");
+        bizLoadAppoint.setEndSignTime(new Date());
+        this.updateById(bizLoadAppoint);
+    }
+
     @Override
     public void exportRecord(BizLoadAppointPageParam bizLoadAppointPageParam, HttpServletResponse response) {
         QueryWrapper<BizLoadAppoint> queryWrapper = getQueryWrapper(bizLoadAppointPageParam);
@@ -384,6 +418,7 @@ public class BizLoadAppointServiceImpl extends ServiceImpl<BizLoadAppointMapper,
 
     @Override
     public void endLoad(BizLoadAppointEditParam bizLoadAppointEditParam) {
+        //修改订单状态待填报
         BizLoadAppoint bizLoadAppoint = this.queryEntity(bizLoadAppointEditParam.getId());
         bizLoadAppoint.setEndReason(bizLoadAppointEditParam.getEndReason());
         bizLoadAppoint.setStatus("7");
@@ -392,6 +427,7 @@ public class BizLoadAppointServiceImpl extends ServiceImpl<BizLoadAppointMapper,
 
     @Override
     public void fillLoad(BizLoadAppointEditParam bizLoadAppointEditParam) {
+        //填报成功,待客户确认
         BizLoadAppoint bizLoadAppoint = this.queryEntity(bizLoadAppointEditParam.getId());
         bizLoadAppoint.setStatus("8");
         bizLoadAppoint.setFillWeight(bizLoadAppointEditParam.getFillWeight().multiply(new BigDecimal(1000)));
@@ -399,6 +435,34 @@ public class BizLoadAppointServiceImpl extends ServiceImpl<BizLoadAppointMapper,
         this.updateById(bizLoadAppoint);
     }
 
+    @Override
+    public void rejectOrder(BizLoadAppointEditParam bizLoadAppointEditParam) {
+        BizLoadAppoint bizLoadAppoint = this.queryEntity(bizLoadAppointEditParam.getId());
+        bizLoadAppoint.setStatus("12");
+        this.updateById(bizLoadAppoint);
+
+        //插入审核记录
+        BizAuditLog bizAuditLog = new BizAuditLog();
+        bizAuditLog.setType("QXDD");
+        bizAuditLog.setDataId(bizLoadAppoint.getId());
+        bizAuditLog.setStatus("2");
+        bizAuditLog.setRemark(bizLoadAppointEditParam.getRejectRemark());
+        bizAuditLogService.save(bizAuditLog);
+    }
+
+    @Override
+    public void sendConfirmLoad(BizLoadAppointEditParam bizLoadAppointEditParam) {
+        BizLoadAppoint bizLoadAppoint = this.queryEntity(bizLoadAppointEditParam.getId());
+        if(StringUtils.equals(bizLoadAppoint.getLoadType(),"1")){
+            //内场
+            bizLoadAppoint.setStatus("11");
+        }else{
+            //外场
+            bizLoadAppoint.setStatus("6");
+        }
+        this.updateById(bizLoadAppoint);
+    }
+
     @Override
     public void updateAppointNumber(BizLoadAppointEditParam bizLoadAppointEditParam) {
         BizLoadAppoint bizLoadAppoint = this.queryEntity(bizLoadAppointEditParam.getId());

+ 69 - 5
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizloadarrive/service/impl/BizLoadArriveServiceImpl.java

@@ -36,6 +36,10 @@ import vip.xiaonuo.biz.modular.bizloadappoint.entity.BizLoadAppoint;
 import vip.xiaonuo.biz.modular.bizloadappoint.param.BizLoadAppointExportResult;
 import vip.xiaonuo.biz.modular.bizloadappoint.service.BizLoadAppointService;
 import vip.xiaonuo.biz.modular.bizloadarrive.param.*;
+import vip.xiaonuo.biz.modular.bizservicecustomer.entity.BizServiceCustomerAccount;
+import vip.xiaonuo.biz.modular.bizservicecustomer.entity.BizServiceCustomerFlow;
+import vip.xiaonuo.biz.modular.bizservicecustomer.service.BizServiceCustomerAccountService;
+import vip.xiaonuo.biz.modular.bizservicecustomer.service.BizServiceCustomerFlowService;
 import vip.xiaonuo.biz.modular.bizsettle.entity.BizSettle;
 import vip.xiaonuo.biz.modular.bizsupplier.entity.BizSupplierTransport;
 import vip.xiaonuo.biz.modular.bizsupplier.service.BizSupplierTransportService;
@@ -72,6 +76,12 @@ public class BizLoadArriveServiceImpl extends ServiceImpl<BizLoadArriveMapper, B
     @Resource
     private TransService transService;
 
+    @Resource
+    private BizServiceCustomerAccountService bizServiceCustomerAccountService;
+
+    @Resource
+    private BizServiceCustomerFlowService bizServiceCustomerFlowService;
+
     @Override
     public Page<BizLoadArrive> page(BizLoadArrivePageParam bizLoadArrivePageParam) {
         QueryWrapper<BizLoadArrive> queryWrapper = getQueryWrapper(bizLoadArrivePageParam);
@@ -170,6 +180,13 @@ public class BizLoadArriveServiceImpl extends ServiceImpl<BizLoadArriveMapper, B
     public void checkParam(BizLoadArriveAddParam bizLoadArriveAddParam){
         if(ObjectUtil.isNotEmpty(bizLoadArriveAddParam.getShipNo())){
             bizLoadArriveAddParam.setShipNo(bizLoadArriveAddParam.getShipNo().toUpperCase().trim());
+
+            long count = this.count(new QueryWrapper<BizLoadArrive>().lambda().
+                    eq(BizLoadArrive::getShipNo, bizLoadArriveAddParam.getShipNo()).
+                    ne(BizLoadArrive::getStatus, "4"));
+            if(count>0){
+                throw new CommonException("该船号存在未结束的报港预约!");
+            }
         }
         if(ObjectUtil.isNotEmpty(bizLoadArriveAddParam.getAppointId())){
             //查询起卸预约信息
@@ -241,8 +258,7 @@ public class BizLoadArriveServiceImpl extends ServiceImpl<BizLoadArriveMapper, B
         if(ObjectUtil.isNotEmpty(bizLoadArriveEditParam.getShipNo())){
             bizLoadArriveEditParam.setShipNo(bizLoadArriveEditParam.getShipNo().toUpperCase().trim());
         }
-        if(!StringUtils.equals(bizLoadArrive.getAppointId(),bizLoadArriveEditParam.getAppointId()) ||
-            !StringUtils.equals(bizLoadArrive.getShipNo(),bizLoadArriveEditParam.getShipNo())){
+        if(!StringUtils.equals(bizLoadArrive.getAppointId(),bizLoadArriveEditParam.getAppointId())){
             //如果船号和起卸预约订单有变化,判断船号是否绑定供应商
             //查询起卸预约信息
             BizLoadAppoint bizLoadAppoint = bizLoadAppointService.getById(bizLoadArriveEditParam.getAppointId());
@@ -259,6 +275,14 @@ public class BizLoadArriveServiceImpl extends ServiceImpl<BizLoadArriveMapper, B
             }
 
         }
+        if(!StringUtils.equals(bizLoadArrive.getShipNo(),bizLoadArriveEditParam.getShipNo())){
+            long count = this.count(new QueryWrapper<BizLoadArrive>().lambda().
+                    eq(BizLoadArrive::getShipNo, bizLoadArriveEditParam.getShipNo()).
+                    ne(BizLoadArrive::getStatus, "4"));
+            if(count>0){
+                throw new CommonException("该船号存在未结束的报港预约!");
+            }
+        }
 
         if(!StringUtils.equals(bizLoadArrive.getAppointId(),bizLoadArriveEditParam.getAppointId())){
             //判断起卸预约是否添加过
@@ -299,6 +323,7 @@ public class BizLoadArriveServiceImpl extends ServiceImpl<BizLoadArriveMapper, B
         return bizLoadArrive;
     }
 
+    @Transactional
     @Override
     public void auditArrive(BizLoadArriveEditParam bizLoadArriveEditParam) {
         BizLoadArrive bizLoadArrive = this.queryEntity(bizLoadArriveEditParam.getId());
@@ -367,6 +392,7 @@ public class BizLoadArriveServiceImpl extends ServiceImpl<BizLoadArriveMapper, B
         bizLoadAppointService.updateById(loadAppoint);
     }
 
+    @Transactional
     @Override
     public void arriveSign(BizLoadArriveEditParam bizLoadArriveEditParam) {
         BizLoadArrive bizLoadArrive = this.queryEntity(bizLoadArriveEditParam.getId());
@@ -387,8 +413,46 @@ public class BizLoadArriveServiceImpl extends ServiceImpl<BizLoadArriveMapper, B
 
 
         //修改起卸订单状态
-        BizLoadAppoint loadAppoint = bizLoadAppointService.getById(bizLoadArrive.getAppointId());
-        loadAppoint.setStatus("9");
-        bizLoadAppointService.updateById(loadAppoint);
+        BizLoadAppoint bizLoadAppoint = bizLoadAppointService.getById(bizLoadArrive.getAppointId());
+        if(ObjectUtil.isNotNull(bizLoadAppoint)){
+            bizLoadAppoint.setStatus("13");
+            bizLoadAppointService.updateById(bizLoadAppoint);
+
+
+            //查询客户信息
+            BizServiceCustomerAccount customerAccount = bizServiceCustomerAccountService.getOne(new QueryWrapper<BizServiceCustomerAccount>().
+                    lambda().
+                    eq(BizServiceCustomerAccount::getServiceCustomerId, bizLoadAppoint.getCustomerId()).
+                    last("limit 1"));
+            if(ObjectUtil.isNotNull(customerAccount)){
+                //计算锁定金额 起卸单价*订单数量(单位默认kg)
+                BigDecimal lockAmount = bizLoadAppoint.getLoadPrice().multiply(bizLoadAppoint.getOrderWeight()).divide(new BigDecimal(1000));
+                //计算消费金额 起卸单价*填报的起卸数量(数据库默认存kg,页面传值吨)
+                BigDecimal consumptionAmount = bizLoadAppoint.getLoadPrice().multiply(bizLoadAppoint.getFillWeight()).divide(new BigDecimal(1000));
+                //添加流水记录
+                BizServiceCustomerFlow flow = new BizServiceCustomerFlow();
+                flow.setServiceCustomerId(customerAccount.getServiceCustomerId());
+                flow.setScAccountId(customerAccount.getId());
+                flow.setOperateType("2");
+                flow.setOperateAmountBegin(customerAccount.getAccountAmount());
+                flow.setOperateAmount(consumptionAmount);
+                if(StringUtils.equals(bizLoadAppoint.getPayType(),"1")){
+                    //预付
+                    customerAccount.setConsumptionAmount(customerAccount.getConsumptionAmount().add(consumptionAmount));
+                    customerAccount.setLockAmount(customerAccount.getLockAmount().subtract(lockAmount));
+                    customerAccount.setAccountAmount(customerAccount.getAccountAmount().subtract(consumptionAmount));
+                }else{
+                    //授信
+                    customerAccount.setConsumptionAmount(customerAccount.getConsumptionAmount().add(consumptionAmount));
+                    customerAccount.setCreditAmount(customerAccount.getCreditAmount().add(consumptionAmount));
+                }
+                flow.setOperateAmountAfter(customerAccount.getAccountAmount());
+                flow.setDataStatus("0");
+                flow.setDataId(bizLoadAppoint.getId());
+                bizServiceCustomerFlowService.updateById(flow);
+                bizServiceCustomerAccountService.updateById(customerAccount);
+            }
+        }
+
     }
 }

+ 19 - 26
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizloaddispatch/service/impl/BizLoadDispatchServiceImpl.java

@@ -91,33 +91,27 @@ public class BizLoadDispatchServiceImpl extends ServiceImpl<BizLoadDispatchMappe
         bizLoadDispatch.setLoadType("2");
         this.save(bizLoadDispatch);
 
-        //查询是否存在起卸分配
-        long count = this.count(new QueryWrapper<BizLoadDispatch>().lambda().
-                eq(BizLoadDispatch::getAppointId, bizLoadDispatch.getAppointId()).
-                eq(BizLoadDispatch::getLoadType, "1"));
-        if(count>0){
-            BizLoadAppoint loadAppoint = bizLoadAppointService.getById(bizLoadDispatch.getAppointId());
-            if(ObjectUtil.isNotNull(loadAppoint)){
-                if(StringUtils.equals(loadAppoint.getStatus(),"4")){
-                    loadAppoint.setStatus("5");
-                    bizLoadAppointService.updateById(loadAppoint);
-                }
-            }
+        //添加过装卸调度后,待执行状态,可添加预约
+        BizLoadAppoint loadAppoint = bizLoadAppointService.getById(bizLoadDispatch.getAppointId());
+        if(ObjectUtil.isNotNull(loadAppoint)){
+            loadAppoint.setStatus("5");
+            bizLoadAppointService.updateById(loadAppoint);
         }
     }
 
     public void checkParam(BizLoadDispatchAddParam bizLoadDispatchAddParam,String type){
         //判断起卸点位时间是否添加过
         long count = this.count(new QueryWrapper<BizLoadDispatch>().lambda().
-                eq(BizLoadDispatch::getAppointId, bizLoadDispatchAddParam.getAppointId()).
+                /*eq(BizLoadDispatch::getAppointId, bizLoadDispatchAddParam.getAppointId()).*/
                 eq(BizLoadDispatch::getLoadPointId, bizLoadDispatchAddParam.getLoadPointId()).
                 eq(BizLoadDispatch::getLoadTimeId, bizLoadDispatchAddParam.getLoadTimeId()).
+                eq(BizLoadDispatch::getUserId,bizLoadDispatchAddParam.getUserId()).
                 eq(BizLoadDispatch::getLoadType,type));
         if(count>0){
             if(StringUtils.equals(type,"1")){
-                throw new CommonException("起卸点位和时间已经添加过!");
+                throw new CommonException("该人员起卸点位和时间已经添加过!");
             }else{
-                throw new CommonException("装卸点位和时间已经添加过!");
+                throw new CommonException("该人员装卸点位和时间已经添加过!");
             }
 
         }
@@ -151,18 +145,17 @@ public class BizLoadDispatchServiceImpl extends ServiceImpl<BizLoadDispatchMappe
         bizLoadDispatch.setLoadType("1");
         this.save(bizLoadDispatch);
 
-        //查询是否存在装卸分配
-        long count = this.count(new QueryWrapper<BizLoadDispatch>().lambda().
-                eq(BizLoadDispatch::getAppointId, bizLoadDispatch.getAppointId()).
-                eq(BizLoadDispatch::getLoadType, "2"));
-        if(count>0){
-            BizLoadAppoint loadAppoint = bizLoadAppointService.getById(bizLoadDispatch.getAppointId());
-            if(ObjectUtil.isNotNull(loadAppoint)){
-                if(StringUtils.equals(loadAppoint.getStatus(),"4")){
-                    loadAppoint.setStatus("5");
-                    bizLoadAppointService.updateById(loadAppoint);
-                }
+        //查询起卸订单信息
+        BizLoadAppoint loadAppoint = bizLoadAppointService.getById(bizLoadDispatch.getAppointId());
+        if(ObjectUtil.isNotNull(loadAppoint)){
+            if(StringUtils.equals(loadAppoint.getLoadType(),"2")){
+                //外场  下一个节点装卸调度
+                loadAppoint.setStatus("10");
+            }else{
+                //内场
+                loadAppoint.setStatus("11");
             }
+            bizLoadAppointService.updateById(loadAppoint);
         }
     }
 

+ 3 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizservicecustomer/entity/BizServiceCustomerFlow.java

@@ -68,4 +68,7 @@ public class BizServiceCustomerFlow extends CommonEntity {
     @Schema(description = "取消说明")
     private String operateExplain;
 
+    /**数据id*/
+    private String dataId;
+
 }