fanzherong_v 1 mese fa
parent
commit
1afbf96ec1
56 ha cambiato i file con 2113 aggiunte e 176 eliminazioni
  1. 3 0
      snowy-admin-web/src/api/biz/bizExcessConfigApi.js
  2. 12 0
      snowy-admin-web/src/api/biz/bizOrderApi.js
  3. 28 0
      snowy-admin-web/src/api/biz/bizOrderConfigApi.js
  4. 4 0
      snowy-admin-web/src/api/biz/goodsConfApi.js
  5. 1 1
      snowy-admin-web/src/views/biz/bizappointmentrecord/detail.vue
  6. 23 3
      snowy-admin-web/src/views/biz/bizappointmentrecord/form.vue
  7. 6 6
      snowy-admin-web/src/views/biz/bizappointmentrecord/index.vue
  8. 4 0
      snowy-admin-web/src/views/biz/bizconfig/form.vue
  9. 8 0
      snowy-admin-web/src/views/biz/bizconfig/index.vue
  10. 19 4
      snowy-admin-web/src/views/biz/bizorder/detail.vue
  11. 337 0
      snowy-admin-web/src/views/biz/bizorder/flow.vue
  12. 50 14
      snowy-admin-web/src/views/biz/bizorder/form.vue
  13. 304 17
      snowy-admin-web/src/views/biz/bizorder/index.vue
  14. 65 0
      snowy-admin-web/src/views/biz/bizorder/review.vue
  15. 4 4
      snowy-admin-web/src/views/biz/bizqueuerecord/index.vue
  16. 6 0
      snowy-admin-web/src/views/biz/record/detail.vue
  17. 65 58
      snowy-admin-web/src/views/biz/record/index.vue
  18. 15 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/entity/BizAppointmentRecord.java
  19. 2 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/mapper/BizAppointmentRecordMapper.java
  20. 23 4
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/mapper/mapping/BizAppointmentRecordMapper.xml
  21. 1 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/param/BizAppointmentExportResult.java
  22. 3 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/param/BizAppointmentRecordAddParam.java
  23. 3 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/param/BizAppointmentRecordEditParam.java
  24. 2 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/param/BizAppointmentRecordPageParam.java
  25. 3 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/service/BizAppointmentRecordService.java
  26. 92 13
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/service/impl/BizAppointmentRecordServiceImpl.java
  27. 3 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizconfig/entity/BizConfig.java
  28. 3 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizconfig/param/BizConfigAddParam.java
  29. 3 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizconfig/param/BizConfigEditParam.java
  30. 12 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizexcessconfig/controller/BizExcessConfigController.java
  31. 6 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizexcessconfig/service/BizExcessConfigService.java
  32. 6 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizexcessconfig/service/impl/BizExcessConfigServiceImpl.java
  33. 61 2
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorder/controller/BizOrderController.java
  34. 20 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorder/entity/BizOrder.java
  35. 10 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorder/mapper/mapping/BizOrderMapper.xml
  36. 9 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorder/param/BizOrderAddParam.java
  37. 15 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorder/param/BizOrderEditParam.java
  38. 11 2
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorder/param/BizOrderExportResult.java
  39. 12 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorder/service/BizOrderService.java
  40. 148 12
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorder/service/impl/BizOrderServiceImpl.java
  41. 119 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorderconfig/controller/BizOrderConfigController.java
  42. 61 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorderconfig/entity/BizOrderConfig.java
  43. 34 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorderconfig/enums/BizOrderConfigEnum.java
  44. 31 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorderconfig/mapper/BizOrderConfigMapper.java
  45. 18 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorderconfig/mapper/mapping/BizOrderConfigMapper.xml
  46. 47 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorderconfig/param/BizOrderConfigAddParam.java
  47. 52 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorderconfig/param/BizOrderConfigEditParam.java
  48. 35 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorderconfig/param/BizOrderConfigIdParam.java
  49. 53 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorderconfig/param/BizOrderConfigPageParam.java
  50. 85 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorderconfig/service/BizOrderConfigService.java
  51. 106 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorderconfig/service/impl/BizOrderConfigServiceImpl.java
  52. 3 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/param/BizRecordPageParam.java
  53. 19 2
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/service/impl/BizRecordServiceImpl.java
  54. 29 16
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/task/AppointmentCallTask.java
  55. 16 15
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/task/AppointmentTimeOutTask.java
  56. 3 0
      snowy-web-app/src/main/java/vip/xiaonuo/core/config/GlobalConfigure.java

+ 3 - 0
snowy-admin-web/src/api/biz/bizExcessConfigApi.js

@@ -24,5 +24,8 @@ export default {
 	// 获取超限配置详情
 	bizExcessConfigDetail(data) {
 		return request('detail', data, 'get')
+	},
+	getList(data){
+		return request('getList',data,'get')
 	}
 }

+ 12 - 0
snowy-admin-web/src/api/biz/bizOrderApi.js

@@ -46,5 +46,17 @@ export default {
 	//订单列表
 	getList(data){
 		return request('getList',data,'get')
+	},
+	//订单签名
+	updateOrderSign(data){
+		return request('updateOrderSign',data)
+	},
+	//订单确认
+	orderConfirm(data){
+		return request('orderConfirm',data)
+	},
+	//订单审核
+	auditOrder(data){
+		return request('auditOrder',data)
 	}
 }

+ 28 - 0
snowy-admin-web/src/api/biz/bizOrderConfigApi.js

@@ -0,0 +1,28 @@
+import { baseRequest } from '@/utils/request'
+
+const request = (url, ...arg) => baseRequest(`/biz/bizorderconfig/` + url, ...arg)
+
+/**
+ * 订单配置Api接口管理器
+ *
+ * @author fanzherong
+ * @date  2025/04/03 15:13
+ **/
+export default {
+	// 获取订单配置分页
+	bizOrderConfigPage(data) {
+		return request('page', data, 'get')
+	},
+	// 提交订单配置表单 edit为true时为编辑,默认为新增
+	bizOrderConfigSubmitForm(data, edit = false) {
+		return request(edit ? 'edit' : 'add', data)
+	},
+	// 删除订单配置
+	bizOrderConfigDelete(data) {
+		return request('delete', data)
+	},
+	// 获取订单配置详情
+	bizOrderConfigDetail(data) {
+		return request('detail', data, 'get')
+	}
+}

+ 4 - 0
snowy-admin-web/src/api/biz/goodsConfApi.js

@@ -24,5 +24,9 @@ export default {
 	// 获取提货时间配置表详情
 	goodsConfDetail(data) {
 		return request('detail', data, 'get')
+	},
+	// 获取提货时间配置列表
+	getList(data){
+		return request('getList',data,'get')
 	}
 }

+ 1 - 1
snowy-admin-web/src/views/biz/bizappointmentrecord/detail.vue

@@ -5,7 +5,7 @@
 				<a-descriptions-item label="订单编号" :span="2">{{ formData.orderNumber }}</a-descriptions-item>
 				<a-descriptions-item label="订单名称" :span="2">{{ formData.orderName }}</a-descriptions-item>
 				<a-descriptions-item label="车牌号" :span="2">{{ formData.licenseNumber }}</a-descriptions-item>
-				<a-descriptions-item label="预约时段" :span="2">{{ formData.beginTime + '~' + formData.endTime }}</a-descriptions-item>
+				<a-descriptions-item label="提货时段" :span="2">{{ formData.beginTime + '~' + formData.endTime }}</a-descriptions-item>
 				<a-descriptions-item label="客户名称" :span="2">{{ formData.customerName }}</a-descriptions-item>
 				<a-descriptions-item label="联系人" :span="2">{{ formData.customerContactName }}</a-descriptions-item>
 				<a-descriptions-item label="货品名称" :span="2">{{ formData.goodsName }}</a-descriptions-item>

+ 23 - 3
snowy-admin-web/src/views/biz/bizappointmentrecord/form.vue

@@ -15,10 +15,15 @@
 			<a-form-item label="车牌号:" name="licenseNumber">
 				<a-input v-model:value="formData.licenseNumber" placeholder="请输入车牌号" allow-clear />
 			</a-form-item>
-			<a-form-item label="预约时段:" name="timeId">
+<!--			<a-form-item label="预约时段:" name="timeId">
 				<a-select v-model:value="formData.timeId" placeholder="请选择预约时段"
 						  :options="timeIdList"
 				> </a-select>
+			</a-form-item>-->
+			<a-form-item label="车辆轴数:" name="overId">
+				<a-select v-model:value="formData.overId" placeholder="请选择车辆轴数"
+						  :options="overIdList"
+				> </a-select>
 			</a-form-item>
 			<a-form-item label="司机姓名:" name="driverName">
 				<a-input v-model:value="formData.driverName" placeholder="请输入司机姓名" allow-clear />
@@ -40,6 +45,7 @@
 	import bizAppointmentRecordApi from '@/api/biz/bizAppointmentRecordApi'
 	import bizAppointmentTimeApi from "@/api/biz/bizAppointmentTimeApi";
 	import bizOrderApi from '@/api/biz/bizOrderApi'
+	import bizExcessConfigApi from "@/api/biz/bizExcessConfigApi";
 
 	// 抽屉状态
 	const open = ref(false)
@@ -50,6 +56,7 @@
 	const submitLoading = ref(false)
 	const orderIdList = ref()
 	const timeIdList = ref()
+	const overIdList = ref()
 
 	//设置表单样式
 	const labelCol = ref({ span: 5})
@@ -73,13 +80,23 @@
 		})
 
 		//查询预约时段下拉
-		bizAppointmentTimeApi.getDownList().then((res)=>{
+		/*bizAppointmentTimeApi.getDownList().then((res)=>{
 			timeIdList.value = res.map((item)=>{
 				return{
 					value:item.id,
 					label:item.beginTime + '-' + item.endTime
 				}
 			})
+		})*/
+
+		//查询车辆轴数
+		bizExcessConfigApi.getList().then((res)=>{
+			overIdList.value = res.map((item)=>{
+				return{
+					value:item.id,
+					label:item.vehicleAxleNumber+'轴'
+				}
+			})
 		})
 	}
 	// 关闭抽屉
@@ -92,7 +109,10 @@
 	const formRules = {
 		orderId: [required('请选择订单信息')],
 		licenseNumber: [required('请输入车牌号')],
-		timeId: [required('请选择预约时段')],
+		//timeId: [required('请选择预约时段')],
+		overId: [required('请选择车辆轴数')],
+		driverName:[required('请输入司机姓名')],
+		driverMobile:[required('请输入司机电话')],
 	}
 	// 验证并提交数据
 	const onSubmit = () => {

+ 6 - 6
snowy-admin-web/src/views/biz/bizappointmentrecord/index.vue

@@ -243,19 +243,19 @@
 		{
 			title: '订单信息',
 			dataIndex: 'orderInfo',
-			width:250
+			width:230
 		},
 		{
 			title: '车牌号',
 			dataIndex: 'licenseNumber',
-			width:160,
+			width:150,
 			align: 'center'
 		},
 		{
-			title: '预约时段',
+			title: '提货时段',
 			dataIndex: 'timeInfo',
 			align:'center',
-			width:200
+			width:360
 		},
 		{
 			title: '客户信息',
@@ -266,12 +266,12 @@
 		{
 			title: '货品信息',
 			dataIndex: 'goodsInfo',
-			width:200
+			width:180
 		},
 		{
 			title: '司机信息',
 			dataIndex: 'driverInfo',
-			width: '200px'
+			width: 180
 		},
 		{
 			title: '状态',

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

@@ -16,6 +16,9 @@
 			<a-form-item label="停留时长:" name="stopDuration">
 				<a-input-number v-model:value="formData.stopDuration" style="width:90%" :precision="0" :min="1" :max="99999" placeholder="请输入停留时长" allow-clear /><span style="margin-left:10px;">分钟</span>
 			</a-form-item>
+			<a-form-item label="装卸损耗预警值:" name="lossWarn">
+				<a-input-number v-model:value="formData.lossWarn" style="width:90%"  :precision="0" :min="1" :max="99999" placeholder="请输入装卸损耗预警值" allow-clear /><span style="margin-left:10px;">%</span>
+			</a-form-item>
 			<a-form-item label="预约审核开关:" name="auditSwitch">
 				<a-radio-group button-style="solid" v-model:value="formData.auditSwitch">
 					<a-radio-button value="1">
@@ -96,6 +99,7 @@
 		auditSwitch: [required('请输入预约审核开关(1:开启   2:关闭)')],
 		orderWeightSwitch: [required('请输入订单重量校验开关(1:开启   2:关闭)')],
 		accessControlSwitch: [required('请输入门禁强制校验开关')],
+		lossWarn: [required('请输入装卸损耗预警值')],
 	}
 	// 验证并提交数据
 	const onSubmit = () => {

+ 8 - 0
snowy-admin-web/src/views/biz/bizconfig/index.vue

@@ -41,6 +41,9 @@
 				<template v-if="column.dataIndex === 'accessControlSwitch'">
 					{{ $TOOL.dictTypeData('biz_switch', record.accessControlSwitch) }}
 				</template>
+				<template v-if="column.dataIndex === 'lossWarn'">
+					{{record.lossWarn}}%
+				</template>
 			</template>
 		</s-table>
 	</a-card>
@@ -91,6 +94,11 @@
 			dataIndex: 'accessControlSwitch',
 			align:'center'
 		},
+		{
+			title: '装卸损耗预警值',
+			dataIndex: 'lossWarn',
+			align:'center'
+		},
 	]
 	// 操作栏通过权限判断是否显示
 	columns.push({

+ 19 - 4
snowy-admin-web/src/views/biz/bizorder/detail.vue

@@ -27,17 +27,32 @@
 					<a-tag
 						:color="
 							formData.orderStatus === '1'
-								? '#2db7f5'
+								? 'blue'
 								: formData.orderStatus === '2'
-								  ? '#f50'
+								  ? 'warning'
+								  : formData.orderStatus === '3'
+								  ? 'processing'
+								  : formData.orderStatus === '4'
+								  ? 'volcano'
+								  : formData.orderStatus === '5'
+								  ? 'purple'
+								  : formData.orderStatus === '6'
+								  ? 'error'
+								  : formData.orderStatus === '7'
+								  ? 'red'
 								  : '#f50'
 						"
 					>
 						{{ $TOOL.dictTypeData('order_status', formData.orderStatus) }}
 					</a-tag>
 				</a-descriptions-item>
-				<a-descriptions-item label="订单重量" :span="2">{{ formData.orderWeight }}</a-descriptions-item>
-				<a-descriptions-item label="过磅重量" :span="2">{{ formData.netWeight }}</a-descriptions-item>
+				<a-descriptions-item label="订单重量" :span="2">{{ formData.orderWeight +'吨'}}</a-descriptions-item>
+				<a-descriptions-item label="过磅重量" :span="2">{{ formData.netWeight +'吨'}}</a-descriptions-item>
+				<a-descriptions-item label="提货开始时间" :span="2">{{ formData.confStartTime}}</a-descriptions-item>
+				<a-descriptions-item label="提货结束时间" :span="2">{{ formData.confEndTime}}</a-descriptions-item>
+				<a-descriptions-item label="签名" :span="4">
+					<a-image v-if="formData.orderSign != null" :width="200" :src="formData.orderSign" />
+				</a-descriptions-item>
 			</a-descriptions>
 		</a-form>
 	</xn-form-container>

+ 337 - 0
snowy-admin-web/src/views/biz/bizorder/flow.vue

@@ -0,0 +1,337 @@
+<template>
+	<xn-form-container title="流水" :width="1200" :visible="visible" :destroy-on-close="true" @close="onClose">
+		<s-table
+			ref="tableRef"
+			:columns="columns"
+			:data="loadData"
+			bordered
+			:row-key="(record) => record.id"
+		>
+			<template #operator class="table-operator">
+<!--				<a-space>
+					<a-button type="dashed" class="snowy-buttom-left" @click="exportData()" v-if="hasPerm('bizRecordBatchExport')"
+					><export-outlined />记录导出</a-button
+					>
+				</a-space>-->
+			</template>
+			<template #bodyCell="{ column, record }">
+				<template v-if="column.dataIndex === 'licensePlate'">
+					<span v-if="record.plateColor === '蓝色'" class="blue-background">{{ record.licensePlate }}</span>
+					<span v-else-if="record.plateColor === '黄色'" class="yellow-background">{{ record.licensePlate }}</span>
+					<span v-else-if="record.plateColor === '绿色'" class="green-background">{{ record.licensePlate }}</span>
+					<span v-else-if="record.plateColor === '白色'" class="white-background">{{ record.licensePlate }}</span>
+					<span v-else-if="record.plateColor === '黑色'" class="black-background">{{ record.licensePlate }}</span>
+					<span v-else class="blue-background">{{ record.licensePlate }}</span>
+				</template>
+
+				<template v-if="column.dataIndex === 'enterTime'">
+					<div class="time-list">
+						<p>
+							<span class="blueTag">过毛</span>
+							<span style="font-weight: normal">{{ record.grossTime }}</span>
+						</p>
+						<p style="margin-bottom: 0">
+							<span class="orangeTag">过皮</span>
+							<span style="font-weight: normal">{{ record.tareTime }}</span>
+						</p>
+					</div>
+				</template>
+
+				<template v-if="column.dataIndex === 'weight'">
+					<div class="time-list">
+						<p>
+							<span class="blueTag">毛重</span>
+							<span class="showNum">{{ record.grossWeight }} </span>
+						</p>
+						<p>
+							<span class="orangeTag">皮重</span>
+							<span class="showNum">{{ record.tareWeight }}</span>
+						</p>
+						<p>
+							<span class="greenTag">净重</span>
+							<span class="showNum">{{ record.netWeight }}</span>
+						</p>
+					</div>
+				</template>
+
+				<template v-if="column.dataIndex === 'company'">
+					<div class="company-list">
+						<p>收货:{{ record.receiptCompany }}</p>
+						<p>发货:{{ record.shippingCompany }}</p>
+						<p style="margin-bottom: 0">运输:{{ record.transportCompany }}</p>
+					</div>
+				</template>
+
+				<template v-if="column.dataIndex === 'goods'">
+					<div class="time-list">
+						<p>名称:{{ record.goodsName }}</p>
+						<p style="margin-bottom: 0">规格:{{ record.goodsModel }}</p>
+					</div>
+				</template>
+
+				<template v-if="column.dataIndex === 'driver'">
+					<div class="time-list">
+						<p>姓名:{{ record.driverName }}</p>
+						<p style="margin-bottom: 0">电话:{{ record.driverMobile }}</p>
+					</div>
+				</template>
+				<template v-if="column.dataIndex === 'orderInfo'">
+					<div class="time-list">
+						<p>名称:{{ record.orderName }}</p>
+						<p style="margin-bottom: 0">编号:{{ record.orderNumber }}</p>
+					</div>
+				</template>
+			</template>
+		</s-table>
+	</xn-form-container>
+</template>
+
+<script setup name="recordDoubleForm">
+	import { cloneDeep } from 'lodash-es'
+	import bizRecordApi from "@/api/biz/bizRecordApi";
+	// 默认是关闭状态
+	const visible = ref(false)
+	const formData = ref({})
+	const table = ref()
+	const resultJson = ref()
+
+	const labelStyle = {
+		width: '20%'
+	}
+	const contentStyle = {
+		width: '30%'
+	}
+
+	const labelCol4 = ref({span: 4, style: 'width: 26%; line-height: 20px; white-space: normal',})
+	const labelCol8 = ref({span: 8, style: 'width: 26%; line-height: 20px; white-space: normal',})
+	const wrapperCol20 = ref({span: 20})
+
+	const columns = [
+		{
+			title: '车次编码',
+			dataIndex: 'carNumber',
+			width: 120,
+			align: 'center'
+		},
+		{
+			title: '车牌号码',
+			dataIndex: 'licensePlate',
+			width: '130px',
+			align: 'center'
+		},
+		{
+			title: '过车时间',
+			dataIndex: 'enterTime',
+			width: '130px'
+		},
+		{
+			title: '重量(KG)',
+			dataIndex: 'weight',
+			align: 'center'
+		},
+		{
+			title: '订单信息',
+			dataIndex: 'orderInfo'
+		},
+		{
+			title: '收发货单位',
+			dataIndex: 'company'
+		},
+		{
+			title: '货品',
+			dataIndex: 'goods'
+		},
+		{
+			title: '司机信息',
+			dataIndex: 'driver',
+			width: '200px'
+		}
+	]
+
+	const orderId = ref()
+	// 打开抽屉
+	const onOpen = (record) => {
+		visible.value = true
+		if(record){
+			let recordData = cloneDeep(record)
+			formData.value = Object.assign({}, recordData)
+			orderId.value = record.id
+		}
+
+	}
+
+	const loadData = (parameter) => {
+		let param = {
+			orderId:orderId.value
+		}
+		return bizRecordApi.bizRecordPage(param).then((data) => {
+			return data
+		})
+	}
+
+	// 关闭抽屉
+	const onClose = () => {
+		resultJson.value = ''
+		visible.value = false
+	}
+	// 调用这个函数将子组件的一些数据和方法暴露出去
+	defineExpose({
+		onOpen
+	})
+</script>
+
+<style scoped>
+	.imgDiv ::v-deep .ant-image {
+		margin-left: 20px;
+		margin-top: 10px;
+	}
+	.imgDiv ::v-deep .ant-image-mask-info {
+		margin-left: 20px;
+		margin-top: 10px;
+	}
+
+	/** 表头居中 */
+	:deep .ant-table-thead > tr > th {
+		text-align: center;
+	}
+
+	.time-list {
+		-webkit-text-size-adjust: none;
+		font-size: 13px;
+		display: flex;
+		flex-direction: column;
+
+		p {
+			white-space: nowrap;
+			span {
+				display: inline-block;
+				font-weight: 600;
+				height: 16px;
+				line-height: 16px;
+				border-radius: 5px;
+				text-align: center;
+				margin-right: 2px;
+				padding: 0 5px;
+			}
+			.blueTag {
+				color: #1890ff;
+				background: rgba(24, 144, 255, 0.1);
+			}
+			.orangeTag {
+				color: #ff7c18;
+				background: rgba(24, 144, 255, 0.1);
+			}
+			.greenTag {
+				color: rgb(82, 196, 26);
+				background: rgba(82, 196, 26, 0.1);
+			}
+			.purpleTag {
+				color: rgb(77, 26, 196);
+				background: rgba(82, 196, 26, 0.1);
+			}
+			.showNum {
+				display: inline-block;
+				height: 16px;
+				line-height: 16px;
+				width: 45px;
+				border-radius: 5px;
+				text-align: center;
+				margin-right: 2px;
+				text-align: right;
+			}
+		}
+	}
+
+	.order-list,
+	.company-list {
+		-webkit-text-size-adjust: none;
+		font-size: 13px;
+		display: flex;
+		flex-direction: column;
+		p {
+			white-space: nowrap;
+			margin-bottom: 5px;
+			.weightSpan,
+			.company {
+				display: inline-block;
+				width: 17px;
+				height: 17px;
+				line-height: 16px;
+				border-radius: 50%;
+				color: #fff;
+				text-align: center;
+			}
+			.company {
+				margin-right: 5px;
+			}
+			.weight,
+			.receiptCompany {
+				background-color: #1890ff;
+			}
+			.tare {
+				background-color: #2f54eb;
+			}
+			.netWeight,
+			.shippingCompany {
+				background-color: #52c41a;
+			}
+			.transportCompany {
+				background-color: #c61263;
+			}
+			.showNum {
+				display: inline-block;
+				height: 16px;
+				line-height: 16px;
+				width: 45px;
+				border-radius: 5px;
+				text-align: center;
+				margin-right: 2px;
+				text-align: right;
+			}
+			em {
+				font-style: normal;
+			}
+		}
+	}
+	.blue-background {
+		background-color: #0d84ff;
+		border-radius: 5px; /* 你可以根据需要调整圆角的大小 */
+		padding: 5px; /* 可选:添加一些内边距 */
+		color: white; /* 可选:设置文字颜色 */
+		font-size: large;
+	}
+	.yellow-background {
+		background-color: yellow;
+		border-radius: 5px;
+		padding: 5px;
+		color: black;
+		font-size: large;
+	}
+	.green-background {
+		background: linear-gradient(to bottom, white, #39b54a);
+		border-radius: 5px;
+		padding: 5px;
+		color: black; /* 文字颜色改为黑色以便在渐变背景上更清晰 */
+		font-size: large;
+		border: 1px solid #ccc; /* 增加边框 */
+		box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 增加阴影 */
+	}
+
+	.white-background {
+		background-color: white;
+		border-radius: 5px;
+		padding: 5px;
+		color: black;
+		font-size: large;
+		border: 1px solid #ccc; /* 增加边框 */
+		box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 增加阴影 */
+	}
+
+	.black-background {
+		background-color: black;
+		border-radius: 5px;
+		padding: 5px;
+		color: white;
+		font-size: large;
+	}
+</style>

+ 50 - 14
snowy-admin-web/src/views/biz/bizorder/form.vue

@@ -8,10 +8,13 @@
 	>
 		<a-form ref="formRef" :model="formData" :rules="formRules" :wrapper-col="wrapperCol" :label-col="labelCol">
 			<a-form-item label="订单编号:" name="orderNumber">
-				<a-input v-model:value="formData.orderNumber" placeholder="请输入订单编号" allow-clear />
+				<a-input v-model:value="formData.orderNumber" placeholder="请输入订单编号" allow-clear disabled/>
 			</a-form-item>
 			<a-form-item label="订单名称:" name="orderName">
-				<a-input v-model:value="formData.orderName" placeholder="请输入订单名称" allow-clear />
+				<a-input v-model:value="formData.orderName" placeholder="请输入订单名称" allow-clear disabled/>
+			</a-form-item>
+			<a-form-item label="货品名称:" name="goodsName">
+				<a-input v-model:value="formData.goodsName" placeholder="请输入货品名称" allow-clear disabled/>
 			</a-form-item>
 			<a-form-item label="客户信息:" name="customerId">
 				<a-select v-model:value="formData.customerId" placeholder="请选择客户信息"
@@ -23,8 +26,10 @@
 						  :options="saleOrderInfoList" @change="onChangeSaleOrder"
 				> </a-select>
 			</a-form-item>
-			<a-form-item label="货品名称:" name="goodsName">
-				<a-input v-model:value="formData.goodsName" placeholder="请输入货品名称" allow-clear />
+			<a-form-item label="提货时间:" name="deliveryTimeId" >
+				<a-select v-model:value="formData.deliveryTimeId" placeholder="请选择提货时间"
+						  :options="deliveryTimeIdList"
+				> </a-select>
 			</a-form-item>
 			<a-form-item label="订单类型:" name="orderType" style="display:none">
 				<a-select v-model:value="formData.orderType" placeholder="请选择订单类型"
@@ -49,6 +54,7 @@
 	import tool from '@/utils/tool'
 	import bizGoodsApi from '@/api/biz/bizGoodsApi'
 	import customerApi from '@/api/biz/customerApi'
+	import goodsConfApi from '@/api/biz/goodsConfApi'
 	// 抽屉状态
 	const open = ref(false)
 	const emit = defineEmits({ successful: null })
@@ -66,6 +72,7 @@
 	const goodIdList = ref()
 	const customerIdList = ref()
 	const saleOrderInfoList = ref()
+	const deliveryTimeIdList = ref()
 
 	// 打开抽屉
 	const onOpen = (record) => {
@@ -84,18 +91,34 @@
 			})
 		})
 
-		bizGoodsApi.getList().then((res)=>{
-			goodIdList.value = res.map((item)=>{
-				return{
-					value:item.id,
-					label:item.model? (item.name+'-'+item.model):item.name
-				}
+		if(formData.value.customerId){
+			customerApi.getOrderByCustomerId({id:formData.value.customerId}).then((res)=>{
+				saleOrderInfoList.value = res.orderList.map((item)=>{
+					return{
+						value:item.orderName+'-'+item.orderNumber+'-'+item.goodsName+'-'+item.orderWeight+'-'+item.orderType,
+						label:item.orderName
+					}
+				})
 			})
-		})
+		}
+
+		if(formData.value.saleOrderInfo){
+			//根据货品名称和重量查询提货时间段
+			goodsConfApi.getList({goodsName:formData.value.saleOrderInfo.split('-')[2],needWeight:formData.value.saleOrderInfo.split('-')[3]}).then((res)=>{
+				deliveryTimeIdList.value = res.map((item)=>{
+					return{
+						value:item.id,
+						label:item.confStartTime+'~'+item.confEndTime
+					}
+				})
+			})
+		}
 	}
 
 	//客户点击时间
 	const onChangeCustomer =(value)=>{
+		formData.value.saleOrderInfo = ''
+		formData.value.deliveryTimeId = ''
 		customerApi.getOrderByCustomerId({id:value}).then((res)=>{
 			saleOrderInfoList.value = res.orderList.map((item)=>{
 				return{
@@ -114,7 +137,16 @@
 		formData.value.orderWeight = value.split('-')[3]
 		formData.value.orderType = value.split('-')[4]
 
+		formData.value.deliveryTimeId = ''
 		//根据货品名称和重量查询提货时间段
+		goodsConfApi.getList({goodsName:value.split('-')[2],needWeight:value.split('-')[3]}).then((res)=>{
+			deliveryTimeIdList.value = res.map((item)=>{
+				return{
+					value:item.id,
+					label:item.confStartTime+'~'+item.confEndTime
+				}
+			})
+		})
 	}
 
 	// 关闭抽屉
@@ -122,14 +154,18 @@
 		formRef.value.resetFields()
 		formData.value = {}
 		open.value = false
+		goodIdList.value = {}
+		customerIdList.value = {}
+		saleOrderInfoList.value = {}
+		deliveryTimeIdList.value = {}
 	}
 	// 默认要校验的
 	const formRules = {
-		orderNumber: [required('请输入订单编号')],
-		orderName: [required('请输入订单名称')],
+		//orderNumber: [required('请输入订单编号')],
+		//orderName: [required('请输入订单名称')],
 		customerId:[required('请选择客户信息')],
 		saleOrderInfo:[required('请选择订单信息')],
-		goodId: [required('请选择货品信息')],
+		deliveryTimeId: [required('请选择提货时间')],
 		orderWeight: [required('请输入订单重量')],
 	}
 	// 验证并提交数据

+ 304 - 17
snowy-admin-web/src/views/biz/bizorder/index.vue

@@ -30,13 +30,13 @@
 							> </a-select>
 						</a-form-item>
 					</a-col>
-					<a-col :span="6">
+<!--					<a-col :span="6">
 						<a-form-item label="订单来源" name="orderSource">
 							<a-select v-model:value="searchFormState.orderSource" placeholder="订单状态查询"
 									  :options="orderSourceList"
 							> </a-select>
 						</a-form-item>
-					</a-col>
+					</a-col>-->
 				</template>
 				<a-col :span="6">
 					<a-button type="primary" @click="tableRef.refresh()">查询</a-button>
@@ -102,9 +102,19 @@
 					<a-tag
 						:color="
 							record.orderStatus === '1'
-								? '#2db7f5'
+								? 'blue'
 								: record.orderStatus === '2'
-								  ? '#f50'
+								  ? 'warning'
+								  : record.orderStatus === '3'
+								  ? 'processing'
+								  : record.orderStatus === '4'
+								  ? 'volcano'
+								  : record.orderStatus === '5'
+								  ? 'purple'
+								  : record.orderStatus === '6'
+								  ? 'error'
+								  : record.orderStatus === '7'
+								  ? 'red'
 								  : '#f50'
 						"
 					>
@@ -119,9 +129,9 @@
 				</template>
 				<template v-if="column.dataIndex === 'action'">
 
-					<a @click="showModal(record)" v-if="record.customerId!=''&& record.customerId!=null">二维码</a>
+					<a @click="showModal(record)" v-if="record.orderStatus == '3' || record.orderStatus == '4'">二维码</a>
 
-					<a-divider type="vertical" v-if="record.customerId!=''&& record.customerId!=null"/>
+					<a-divider type="vertical" v-if="record.orderStatus == '3' || record.orderStatus == '4'"/>
 
 					<a-dropdown v-if="(hasPerm('bizOrderEdit')) || (hasPerm('bizOrderDelete'))
 						">
@@ -135,19 +145,39 @@
 								<a-menu-item>
 									<a size="small" type="link" @click="detailRef.onOpen(record)" >详情</a>
 								</a-menu-item>
-								<a-menu-item v-if="hasPerm('bizOrderEdit') && record.orderSource == '2' && record.orderStatus == '1'">
+								<a-menu-item v-if="hasPerm('bizOrderEdit') && (record.orderStatus == '1' || record.orderStatus == '2')">
 									<a style="color:blue" size="small" type="link" @click="formRef.onOpen(record)" >编辑</a>
 								</a-menu-item>
 
-								<a-menu-item v-if="hasPerm('bizOrderDelete') && record.orderSource == '2'">
+								<a-menu-item v-if="hasPerm('bizOrderDelete') && (record.orderStatus == '1' || record.orderStatus == '2')">
 									<a style="color:red" size="small" type="link" @click="deleteConfig(record)">删除</a>
 								</a-menu-item>
 
-								<a-menu-item v-if="record.orderStatus == '1'">
+<!--								<a-menu-item v-if="record.orderStatus == '1'">
 									<a style="color:orange" @click="selectCustomer(record)">绑定</a>
+								</a-menu-item>-->
+
+								<a-menu-item v-if="hasPerm('bizOrderSign') && record.orderStatus == '1'">
+									<a style="color:orange" @click="XnSignNameRef.show(record.id)">签名</a>
+								</a-menu-item>
+
+								<a-menu-item v-if="hasPerm('bizOrderConfirm') && record.orderStatus == '2'">
+									<a style="color:blue" @click="orderConfirm(record.id)">确认</a>
+								</a-menu-item>
+
+								<a-menu-item v-if="hasPerm('bizOrderAudit') && record.orderStatus == '5'">
+									<a style="color:green" @click="reviewRef.showModal(record.id)">审核</a>
 								</a-menu-item>
 
-								<a-menu-item v-if="record.orderStatus == '1'">
+								<a-menu-item v-if="hasPerm('bizOrderFlow')">
+									<a style="color:deepskyblue" @click="flowRef.onOpen(record)">流水</a>
+								</a-menu-item>
+
+								<a-menu-item v-if="hasPerm('bizOrderConfig') && (record.orderStatus == '3' || record.orderStatus=='4')">
+									<a style="color:forestgreen" @click="showMore(record)">配置</a>
+								</a-menu-item>
+
+								<a-menu-item v-if="hasPerm('bizOrderEnd') && (record.orderStatus != '5' && record.orderStatus != '6' && record.orderStatus != '7')">
 									<a style="color:red" @click="endOrder(record)">结束</a>
 								</a-menu-item>
 							</a-menu>
@@ -166,6 +196,9 @@
 	<Form ref="formRef" @successful="tableRef.refresh()" />
 
 	<Detail ref="detailRef" @successful="tableRef.refresh()" />
+	<Flow ref="flowRef" @successful="tableRef.refresh()" />
+	<Review ref="reviewRef" @successful="tableRef.refresh(true)" />
+	<XnSignName ref="XnSignNameRef" :image="searchFormState.orderSign" @successful="signSuccess" />
 
 
 	<a-modal v-model:visible="open" title="二维码" width="600px" style="height: 700px">
@@ -177,7 +210,7 @@
 						<p id="projectCodeFlag">订单编码:{{ nowRecord.orderNumber }}</p>
 						<p id="projectCodeFlag">客户名称:{{ nowRecord.customerName }}</p>
 						<p id="projectCodeFlag">货品名称:{{ nowRecord.goodsName }}</p>
-						<p id="projectCodeFlag">订单来源:{{ $TOOL.dictTypeData('order_source', nowRecord.orderSource) }}</p>
+						<p id="projectCodeFlag">提货时间:{{ nowRecord.confStartTime+'~'+nowRecord.confEndTime }}</p>
 					</div>
 				</a-col>
 				<a-col :span="11">
@@ -199,6 +232,63 @@
 		:role-global="true"
 		@onBack="customerBack"
 	/>
+
+
+	<a-modal
+		v-model:visible="moreFlag"
+		title="扫码次数配置"
+		:footer="null"
+		width="1100px"
+		:body-style="{
+			height: 'calc(100vh - 300px)',
+			overflow: 'auto'
+		}"
+		@cancel="onCloseAccount"
+	>
+		<a-card :bordered="false">
+			<a-button type="primary" @click="addAccount()" style="margin-bottom:10px;">
+				<template #icon><plus-outlined /></template>
+				新增
+			</a-button>
+			<a-table ref="tableRef" :columns="columns1" :data-source="data1" bordered :row-key="(record) => record.id">
+				<template #bodyCell="{ column, record }">
+					<template v-if="column.dataIndex === 'action'">
+						<a @click="editAccount(record)">编辑</a>
+						<a-divider type="vertical" />
+						<a-popconfirm title="确定要删除吗?" @confirm="removeUser(record)">
+							<a-button type="link" danger size="small">删除</a-button>
+						</a-popconfirm>
+					</template>
+					<template v-if="column.dataIndex === 'remain'">
+						{{record.applyNumber-record.applyNumberAlready}}
+					</template>
+				</template>
+			</a-table>
+		</a-card>
+	</a-modal>
+
+	<a-modal
+		v-model:visible="editAccountFlag"
+		:title="formData.id ? '编辑扫码次数' : '添加扫码次数'"
+		class="custom-modal"
+		width="800px"
+		@ok="handleOk"
+		@cancel="onClose"
+	>
+
+		<a-form ref="formSubmitRef" :model="formData" :rules="formRules" :wrapper-col="wrapperCol" :label-col="labelCol">
+			<a-form-item label="开始时间:" name="beginTime">
+				<a-input v-model:value="formData.beginTime" placeholder="请输入提货开始时间" allow-clear disabled/>
+			</a-form-item>
+			<a-form-item label="结束时间:" name="endTime">
+				<a-input v-model:value="formData.endTime" placeholder="请输入提货结束时间" allow-clear disabled/>
+			</a-form-item>
+			<a-form-item label="申请数量:" name="applyNumber">
+				<a-input-number v-model:value="formData.applyNumber" style="width:90%"  :precision="0" :min="1" :max="99999" placeholder="请输入申请数量" allow-clear /><span style="margin-left:10px;">次</span>
+			</a-form-item>
+		</a-form>
+
+	</a-modal>
 </template>
 
 <script setup name="bizorder">
@@ -214,13 +304,23 @@
 	import userApi from '@/api/sys/userApi'
 	import downloadUtil from '@/utils/downloadUtil'
 	import tool from '@/utils/tool'
+	import Review from './review.vue'
+	import Flow from './flow.vue'
+	import bizOrderConfigApi from "@/api/biz/bizOrderConfigApi";
+	import { required } from '@/utils/formRules'
 
+	const editAccountFlag = ref(false)
+	const moreFlag = ref(false)
 	const selectedRecord = ref({})
 	const CustomerSelectorPlusRef = ref()
 	const nowRecord = ref()
 	const tableRef = ref()
 	const formRef = ref()
+	const configRef = ref()
+	const flowRef = ref()
+	const reviewRef = ref()
 	const detailRef = ref()
+	const XnSignNameRef = ref()
 	const submitLoading = ref(false)
 	const toolConfig = { refresh: true, height: true, columnSetting: true, striped: false }
 
@@ -236,47 +336,62 @@
 		advanced.value = !advanced.value
 	}
 
+	// 表单数据
+	const formData = ref({})
+
 	const columns = [
 		{
 			title: '订单编号',
 			dataIndex: 'orderNumber',
 			align:'center',
-			width: 150
+			width: 130
 		},
 		{
 			title: '订单名称',
 			dataIndex: 'orderName',
 			align:'center',
-			width: 150
+			width: 130
 		},
 		{
 			title: '客户名称',
 			dataIndex: 'customerName',
 			align:'center',
-			width: 150
+			width: 130
 		},
 		{
 			title: '货品名称',
 			dataIndex: 'goodsName',
 			align:'center',
-			width: 150
+			width: 130
 		},
 		/*{
 			title: '订单类型',
 			dataIndex: 'orderType',
 			align:'center'
 		},*/
-		{
+		/*{
 			title: '订单来源',
 			dataIndex: 'orderSource',
 			align:'center',
 			width: 100
+		},*/
+		{
+			title: '提货开始时间',
+			dataIndex: 'confStartTime',
+			align:'center',
+			width: 130
+		},
+		{
+			title: '提货结束时间',
+			dataIndex: 'confEndTime',
+			align:'center',
+			width: 130
 		},
 		{
 			title: '订单状态',
 			dataIndex: 'orderStatus',
 			align:'center',
-			width: 100
+			width: 80
 		},
 		{
 			title: '订单重量',
@@ -326,6 +441,32 @@
 		searchFormRef.value.resetFields()
 		tableRef.value.refresh(true)
 	}
+
+	//确认
+	const orderConfirm = (id) =>{
+		Modal.confirm({
+			title: '提示',
+			icon: createVNode(ExclamationCircleOutlined),
+			content: '是否确认该数据?',
+			onOk() {
+				submitLoading.value = true
+				let params =
+					{
+						id: id
+					}
+
+				bizOrderApi
+					.orderConfirm(params)
+					.then(() => {
+						tableRef.value.refresh(true)
+					})
+					.finally(() => {
+						submitLoading.value = false
+					})
+			},
+			onCancel() {}
+		})
+	}
 	// 删除
 	const deleteBizOrder = (record) => {
 		let params = [
@@ -468,6 +609,17 @@
 		})
 	}
 
+	// 签名板组件回调
+	const signSuccess = (value) => {
+		const param = {
+			id:value.id,
+			orderSign: value.value
+		}
+		bizOrderApi.updateOrderSign(param).then(() => {
+			tableRef.value.refresh(true)
+		})
+	}
+
 	//结束订单
 	const endOrder = (record) => {
 		/*let param = {
@@ -499,4 +651,139 @@
 			onCancel() {}
 		})
 	}
+
+	const data1 = ref([])
+	const orderId = ref()
+	const beginTime = ref()
+	const endTime = ref()
+	const formSubmitRef = ref()
+	//打开扫码次数配置页
+	const showMore = (record) => {
+		orderId.value = record.id
+		beginTime.value = record.confStartTime
+		endTime.value = record.confEndTime
+		loadData1()
+		moreFlag.value = true
+
+	}
+
+	const loadData1 = () => {
+		let param={
+			orderId:orderId.value
+		}
+		bizOrderConfigApi.bizOrderConfigPage(param).then((res)=>{
+			data1.value = res.records
+		})
+	}
+
+	const columns1 = [
+		{
+			title: '提货开始时间',
+			dataIndex: 'beginTime',
+			align: 'center',
+			resizable: true,
+			ellipsis: true,
+			width: 130
+		},
+		{
+			title: '提货结束时间',
+			dataIndex: 'endTime',
+			align: 'center',
+			resizable: true,
+			ellipsis: true,
+			width: 130
+		},
+		{
+			title: '申请数量',
+			dataIndex: 'applyNumber',
+			align: 'center',
+			resizable: true,
+			ellipsis: true,
+			width: 100
+		},
+		{
+			title: '已约数量',
+			dataIndex: 'applyNumberAlready',
+			align: 'center',
+			resizable: true,
+			ellipsis: true,
+			width: 100
+		},
+		{
+			title: '可约数量',
+			dataIndex: 'remain',
+			align: 'center',
+			resizable: true,
+			ellipsis: true,
+			width: 100
+		},
+	]
+	columns1.push({
+		title: '操作',
+		dataIndex: 'action',
+		align: 'center',
+		fixed: 'right',
+		width: 140,
+	})
+
+
+	const addAccount = () =>{
+		formData.value = {}
+		formData.value.orderId = orderId.value
+		formData.value.beginTime = beginTime.value
+		formData.value.endTime = endTime.value
+		editAccountFlag.value = true
+	}
+
+	const formRules = {
+		applyNumber: [required('请输入申请数量')],
+	}
+
+	//表单提交
+	const handleOk = () => {
+		console.log("handleOk")
+		formSubmitRef.value.validate().then(() => {
+			submitLoading.value = true
+			const formDataParam = cloneDeep(formData.value)
+			bizOrderConfigApi
+				.bizOrderConfigSubmitForm(formDataParam, formDataParam.id)
+				.then(() => {
+					onClose()
+					emit('successful')
+				})
+				.finally(() => {
+					submitLoading.value = false
+				})
+		})
+	}
+
+	const onClose = () => {
+		formSubmitRef.value.resetFields()
+		formData.value = {}
+		editAccountFlag.value = false
+		loadData1()
+	}
+
+	const editAccount = (record) => {
+		formData.value = record
+		editAccountFlag.value = true
+	}
+
+
+	const removeUser = (record) => {
+		let params = [
+			{
+				id: record.id
+			}
+		]
+		bizOrderConfigApi.bizOrderConfigDelete(params).then(() => {
+			loadData1()
+		})
+	}
+
+	const onCloseAccount = () => {
+		moreFlag.value = false
+		data1.value = []
+		orderId.value = ''
+	}
 </script>

+ 65 - 0
snowy-admin-web/src/views/biz/bizorder/review.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="auditingRemark"
+            >
+                <a-textarea v-model:value="formData.orderReason" placeholder="请输入审核备注"
+                            :auto-size="{ minRows: 3, maxRows: 5 }"/>
+            </a-form-item>
+        </a-form>
+        <template #footer>
+            <a-spin :spinning="submitLoading">
+                <a-button style="margin-right: 8px" @click="onsubmit(true)" type="primary" danger>审核驳回</a-button>
+                <a-button type="primary" @click="onsubmit(false)">审核通过</a-button>
+            </a-spin>
+        </template>
+    </a-modal>
+</template>
+<script setup>
+import {message} from 'ant-design-vue';
+import bizOrderApi from '@/api/biz/bizOrderApi'
+
+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.orderReason) {
+            message.error('审核驳回时,备注信息不能为空')
+            return
+        }
+    }
+    submitLoading.value = true
+	formData.value.auditFlag = flag
+	bizOrderApi.auditOrder(formData.value).then(() => {
+        onClose()
+        emit('successful', null)
+    }).finally(() => {
+        submitLoading.value = false
+    })
+}
+// 抛出函数
+defineExpose({
+    showModal
+})
+</script>
+<style scoped>
+
+</style>

+ 4 - 4
snowy-admin-web/src/views/biz/bizqueuerecord/index.vue

@@ -141,10 +141,10 @@
 					</a-tag>
 				</template>
 				<template v-if="column.dataIndex === 'action'">
-					<a style="color: #ffaa00" @click="orderRef.onOpen(record)" v-if="hasPerm('bizAppointmentRecordOrder') && (record.status == '3' || record.status == '4' || record.status == '5' || record.status == '6'|| record.status == '7'|| record.status == '8'|| record.status == '9')">调整订单</a>
-					<a-divider type="vertical"  v-if="(hasPerm('bizAppointmentRecordOrder') && (record.status == '3' || record.status == '4' || record.status == '5' || record.status == '6'|| record.status == '7'|| record.status == '8'|| record.status == '9')) && (hasPerm('bizAppointmentRecordTime') && (record.status == '3' || record.status == '4'))" />
-					<a style="color:blue" @click="formRef.onOpen(record)" v-if="hasPerm('bizAppointmentRecordTime') && (record.status == '3' || record.status == '4')">调整时段</a>
-					<a-divider type="vertical"  v-if="(hasPerm('bizAppointmentRecordTime') && (record.status == '3' || record.status == '4')) && (hasPerm('bizAppointmentRecordCancel') && (record.status == '3' || record.status == '4'))" />
+					<a style="color: #ffaa00" @click="orderRef.onOpen(record)" v-if="hasPerm('bizAppointmentRecordOrder') && (record.status == '3' || record.status == '4' || record.status == '5' || record.status == '6'|| record.status == '8'|| record.status == '9')">调整订单</a>
+<!--					<a-divider type="vertical"  v-if="(hasPerm('bizAppointmentRecordOrder') && (record.status == '3' || record.status == '4' || record.status == '5' || record.status == '6'|| record.status == '7'|| record.status == '8'|| record.status == '9')) && (hasPerm('bizAppointmentRecordTime') && (record.status == '3' || record.status == '4'))" />
+					<a style="color:blue" @click="formRef.onOpen(record)" v-if="hasPerm('bizAppointmentRecordTime') && (record.status == '3' || record.status == '4')">调整时段</a>-->
+					<a-divider type="vertical"  v-if="(hasPerm('bizAppointmentRecordOrder') && (record.status == '3' || record.status == '4' || record.status == '5' || record.status == '6'|| record.status == '7'|| record.status == '8'|| record.status == '9')) && (hasPerm('bizAppointmentRecordCancel') && (record.status == '3' || record.status == '4'))" />
 					<a style="color:red" type="link" danger size="small" @click="cancelConfig(record)" v-if="hasPerm('bizAppointmentRecordCancel') && (record.status == '3' || record.status == '4')">取消排队</a>
 				</template>
 			</template>

+ 6 - 0
snowy-admin-web/src/views/biz/record/detail.vue

@@ -70,6 +70,12 @@
 			<a-image v-if="formData.tareCaptureWare != null" :width="200" :src="formData.tareCaptureWare" />
 			<a-image v-if="formData.tareCapturePoundRoom != null" :width="200" :src="formData.tareCapturePoundRoom" />
 		</a-space>
+		<a-divider></a-divider>
+		<a-descriptions title="司机签名确认" style="margin-top: 15px">
+		</a-descriptions>
+		<a-space>
+			<a-image :width="200" :src="formData.driverSign" />
+		</a-space>
 		<template #footer>
 			<a-button style="margin-right: 8px" @click="onClose">关闭</a-button>
 		</template>

+ 65 - 58
snowy-admin-web/src/views/biz/record/index.vue

@@ -2,6 +2,11 @@
 	<a-card :bordered="false" style="margin-bottom: 10px" class="mb-2">
 		<a-form ref="searchFormRef" name="advanced_search" :model="searchFormState" class="ant-advanced-search-form">
 			<a-row :gutter="24">
+				<a-col :span="6">
+					<a-form-item label="车次编码" name="carNumber">
+						<a-input v-model:value="searchFormState.carNumber" placeholder="请输入车次编码" />
+					</a-form-item>
+				</a-col>
 				<a-col :span="6">
 					<a-form-item label="车牌号码" name="licensePlate">
 						<a-input v-model:value="searchFormState.licensePlate" placeholder="请输入车牌号码" />
@@ -15,64 +20,66 @@
 						/>
 					</a-form-item>
 				</a-col>
-				<a-col :span="6">
-					<a-form-item label="过皮时间" name="tareTime">
-						<a-range-picker
-							v-model:value="searchFormState.tareTime"
-							value-format="YYYY-MM-DD"
-						/>
-					</a-form-item>
-				</a-col>
-				<a-col :span="6" v-show="advanced">
-					<a-form-item label="司机姓名" name="driverName">
-						<a-input v-model:value="searchFormState.driverName" placeholder="请输入司机姓名" />
-					</a-form-item>
-				</a-col>
-				<a-col :span="6" v-show="advanced">
-					<a-form-item label="司机电话" name="driverMobile">
-						<a-input v-model:value="searchFormState.driverMobile" placeholder="请输入司机电话" />
-					</a-form-item>
-				</a-col>
-				<a-col :span="6" v-show="advanced">
-					<a-form-item label="货品名称" name="goodsName">
-						<a-input v-model:value="searchFormState.goodsName" placeholder="请输入货品名称" />
-					</a-form-item>
-				</a-col>
-				<a-col :span="6" v-show="advanced">
-					<a-form-item label="规格型号" name="goodsModel">
-						<a-input v-model:value="searchFormState.goodsModel" placeholder="请输入规格型号" />
-					</a-form-item>
-				</a-col>
-				<a-col :span="6" v-show="advanced">
-					<a-form-item label="收货单位" name="receiptCompany">
-						<a-input v-model:value="searchFormState.receiptCompany" placeholder="请输入收货单位" />
-					</a-form-item>
-				</a-col>
-				<a-col :span="6" v-show="advanced">
-					<a-form-item label="发货单位" name="shippingCompany">
-						<a-input v-model:value="searchFormState.shippingCompany" placeholder="请输入发货单位" />
-					</a-form-item>
-				</a-col>
-				<a-col :span="6" v-show="advanced">
-					<a-form-item label="运输单位" name="transportCompany">
-						<a-input v-model:value="searchFormState.transportCompany" placeholder="请输入运输单位" />
-					</a-form-item>
-				</a-col>
-				<a-col :span="6" v-show="advanced">
-					<a-form-item label="订单编号" name="orderNumber">
-						<a-input v-model:value="searchFormState.orderNumber" placeholder="请输入订单编号" />
-					</a-form-item>
-				</a-col>
-				<a-col :span="6" v-show="advanced">
-					<a-form-item label="订单名称" name="orderName">
-						<a-input v-model:value="searchFormState.orderName" placeholder="请输入订单名称" />
-					</a-form-item>
-				</a-col>
-				<a-col :span="6" v-show="advanced">
-					<a-form-item label="客户名称" name="customerName">
-						<a-input v-model:value="searchFormState.customerName" placeholder="请输入客户名称" />
-					</a-form-item>
-				</a-col>
+				<template v-if="advanced">
+					<a-col :span="6">
+						<a-form-item label="过皮时间" name="tareTime">
+							<a-range-picker
+								v-model:value="searchFormState.tareTime"
+								value-format="YYYY-MM-DD"
+							/>
+						</a-form-item>
+					</a-col>
+					<a-col :span="6" v-show="advanced">
+						<a-form-item label="司机姓名" name="driverName">
+							<a-input v-model:value="searchFormState.driverName" placeholder="请输入司机姓名" />
+						</a-form-item>
+					</a-col>
+					<a-col :span="6" v-show="advanced">
+						<a-form-item label="司机电话" name="driverMobile">
+							<a-input v-model:value="searchFormState.driverMobile" placeholder="请输入司机电话" />
+						</a-form-item>
+					</a-col>
+					<a-col :span="6" v-show="advanced">
+						<a-form-item label="货品名称" name="goodsName">
+							<a-input v-model:value="searchFormState.goodsName" placeholder="请输入货品名称" />
+						</a-form-item>
+					</a-col>
+					<a-col :span="6" v-show="advanced">
+						<a-form-item label="规格型号" name="goodsModel">
+							<a-input v-model:value="searchFormState.goodsModel" placeholder="请输入规格型号" />
+						</a-form-item>
+					</a-col>
+					<a-col :span="6" v-show="advanced">
+						<a-form-item label="收货单位" name="receiptCompany">
+							<a-input v-model:value="searchFormState.receiptCompany" placeholder="请输入收货单位" />
+						</a-form-item>
+					</a-col>
+					<a-col :span="6" v-show="advanced">
+						<a-form-item label="发货单位" name="shippingCompany">
+							<a-input v-model:value="searchFormState.shippingCompany" placeholder="请输入发货单位" />
+						</a-form-item>
+					</a-col>
+					<a-col :span="6" v-show="advanced">
+						<a-form-item label="运输单位" name="transportCompany">
+							<a-input v-model:value="searchFormState.transportCompany" placeholder="请输入运输单位" />
+						</a-form-item>
+					</a-col>
+					<a-col :span="6" v-show="advanced">
+						<a-form-item label="订单编号" name="orderNumber">
+							<a-input v-model:value="searchFormState.orderNumber" placeholder="请输入订单编号" />
+						</a-form-item>
+					</a-col>
+					<a-col :span="6" v-show="advanced">
+						<a-form-item label="订单名称" name="orderName">
+							<a-input v-model:value="searchFormState.orderName" placeholder="请输入订单名称" />
+						</a-form-item>
+					</a-col>
+					<a-col :span="6" v-show="advanced">
+						<a-form-item label="客户名称" name="customerName">
+							<a-input v-model:value="searchFormState.customerName" placeholder="请输入客户名称" />
+						</a-form-item>
+					</a-col>
+				</template>
 				<a-col :span="6">
 					<a-button type="primary" @click="tableRef.refresh()">查询</a-button>
 					<a-button style="margin: 0 8px" @click="reset">重置</a-button>

+ 15 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/entity/BizAppointmentRecord.java

@@ -97,4 +97,19 @@ public class BizAppointmentRecord extends CommonEntity {
     /**标识*/
     @TableField(exist = false)
     private String isFlag;
+
+    /**超限配置id*/
+    private String overId;
+
+    /**订单余量*/
+    @TableField(exist = false)
+    private BigDecimal orderBalance;
+
+    /**超限重量*/
+    @TableField(exist = false)
+    private Integer overWeight;
+
+    /**订单重量校验*/
+    @TableField(exist = false)
+    private String orderWeightSwitch;
 }

+ 2 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/mapper/BizAppointmentRecordMapper.java

@@ -30,4 +30,6 @@ public interface BizAppointmentRecordMapper extends BaseMapper<BizAppointmentRec
     Page<BizAppointmentRecord> getPage(@Param("page") Page<BizAppointmentRecord> page, @Param("ew") QueryWrapper<BizAppointmentRecord> ew);
 
     List<BizAppointmentRecord> getPage(@Param("ew") QueryWrapper<BizAppointmentRecord> ew);
+
+    List<BizAppointmentRecord> getRecord(@Param("ew") QueryWrapper<BizAppointmentRecord> ew);
 }

+ 23 - 4
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/mapper/mapping/BizAppointmentRecordMapper.xml

@@ -13,17 +13,36 @@
             bg.GOODS_NAME goodsName,
             bg.GOODS_MODEL goodsModel,
             bar.time_id,
-            bat.begin_time,
-            bat.end_time,
+            bgc.CONF_START_TIME begin_time,
+            bgc.CONF_END_TIME end_time,
             bar.driver_name,
             bar.driver_mobile,
             bar.status,
-            bar.appointment_reason
+            bar.appointment_reason,
+            bar.over_id
         from biz_appointment_record bar
          left join biz_order bo on bar.order_id = bo.id
          left join biz_goods bg on bg.id = bo.good_id
-         left join biz_appointment_time bat on bat.id = bar.time_id
+         left join biz_goods_conf bgc on bgc.id = bar.time_id
          left join biz_customer bc on bc.id = bo.customer_id
         ${ew.customSqlSegment}
     </select>
+    <select id="getRecord"
+            resultType="vip.xiaonuo.biz.modular.bizappointmentrecord.entity.BizAppointmentRecord">
+        SELECT
+            bar.id,
+            bar.order_id,
+            bar.license_number,
+            bar.time_id,
+            bgc.CONF_START_TIME begin_time,
+            bgc.CONF_END_TIME end_time,
+            bar.driver_name,
+            bar.driver_mobile,
+            bar.STATUS,
+            bar.appointment_reason
+        FROM
+            biz_appointment_record bar
+        LEFT JOIN biz_goods_conf bgc ON bgc.id = bar.time_id
+            ${ew.customSqlSegment}
+    </select>
 </mapper>

+ 1 - 1
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/param/BizAppointmentExportResult.java

@@ -26,7 +26,7 @@ public class BizAppointmentExportResult {
 
     /** 预约时段 */
     @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
-    @ExcelProperty({"预约报表", "预约时段"})
+    @ExcelProperty({"预约报表", "提货时段"})
     private String timeInfo;
 
     /** 客户名称 */

+ 3 - 1
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/param/BizAppointmentRecordAddParam.java

@@ -43,7 +43,6 @@ public class BizAppointmentRecordAddParam {
 
     /** 预约时段id */
     @Schema(description = "预约时段id", requiredMode = Schema.RequiredMode.REQUIRED)
-    @NotBlank(message = "timeId不能为空")
     private String timeId;
 
     /** 司机姓名 */
@@ -58,4 +57,7 @@ public class BizAppointmentRecordAddParam {
     @Schema(description = "状态(1:待审核  2:审核不通过   3:排队中  4:可入场  5:已入场  6:一次过磅  7:完成装货   8:二次过磅   9:已出场  10:已签收   11:已审核   12:已取消)")
     private String status;
 
+    /**超限配置id*/
+    private String overId;
+
 }

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

@@ -65,4 +65,7 @@ public class BizAppointmentRecordEditParam {
 
     private String appointmentReason;
 
+    /**超限配置id*/
+    private String overId;
+
 }

+ 2 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/param/BizAppointmentRecordPageParam.java

@@ -75,4 +75,6 @@ public class BizAppointmentRecordPageParam {
     /**标识,判断车辆排队还是预约记录*/
     private String appointmentFlag;
 
+    private String dateNow;
+
 }

+ 3 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/service/BizAppointmentRecordService.java

@@ -95,4 +95,7 @@ public interface BizAppointmentRecordService extends IService<BizAppointmentReco
 
     /**调整订单*/
     void adjustOrder(BizAppointmentRecordEditParam bizAppointmentRecordEditParam);
+
+    /**获取当前时间的预约*/
+    BizAppointmentRecord getAppointmentRecord(BizAppointmentRecordPageParam bizAppointmentRecordPageParam);
 }

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

@@ -12,6 +12,7 @@
  */
 package vip.xiaonuo.biz.modular.bizappointmentrecord.service.impl;
 
+import cn.dev33.satoken.stp.StpUtil;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.collection.CollStreamUtil;
 import cn.hutool.core.util.ObjectUtil;
@@ -27,16 +28,21 @@ import org.apache.commons.compress.utils.Lists;
 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.bizappointmentrecord.param.*;
 import vip.xiaonuo.biz.modular.bizappointmenttime.entity.BizAppointmentTime;
 import vip.xiaonuo.biz.modular.bizappointmenttime.service.BizAppointmentTimeService;
 import vip.xiaonuo.biz.modular.bizconfig.entity.BizConfig;
 import vip.xiaonuo.biz.modular.bizconfig.service.BizConfigService;
+import vip.xiaonuo.biz.modular.bizexcessconfig.entity.BizExcessConfig;
+import vip.xiaonuo.biz.modular.bizexcessconfig.service.BizExcessConfigService;
 import vip.xiaonuo.biz.modular.bizorder.entity.BizOrder;
 import vip.xiaonuo.biz.modular.bizorder.param.BizOrderExportResult;
 import vip.xiaonuo.biz.modular.bizorder.service.BizOrderService;
 import vip.xiaonuo.biz.modular.goods.entity.BizGoods;
 import vip.xiaonuo.biz.modular.goods.service.BizGoodsService;
+import vip.xiaonuo.biz.modular.goodsConf.entity.BizGoodsConf;
+import vip.xiaonuo.biz.modular.goodsConf.service.BizGoodsConfService;
 import vip.xiaonuo.biz.modular.record.entity.BizRecord;
 import vip.xiaonuo.biz.modular.record.service.BizRecordService;
 import vip.xiaonuo.biz.modular.utils.CommonExportUtil;
@@ -48,6 +54,7 @@ import vip.xiaonuo.biz.modular.bizappointmentrecord.mapper.BizAppointmentRecordM
 import vip.xiaonuo.biz.modular.bizappointmentrecord.service.BizAppointmentRecordService;
 
 import java.io.IOException;
+import java.util.Date;
 import java.util.List;
 import java.util.regex.Pattern;
 
@@ -72,6 +79,10 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
     private BizGoodsService bizGoodsService;
     @Resource
     private BizRecordService bizRecordService;
+    @Resource
+    private BizExcessConfigService bizExcessConfigService;
+    @Resource
+    private BizGoodsConfService bizGoodsConfService;
 
     @Override
     public Page<BizAppointmentRecord> page(BizAppointmentRecordPageParam bizAppointmentRecordPageParam) {
@@ -109,6 +120,11 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
         if(ObjectUtil.isNotEmpty(bizAppointmentRecordPageParam.getAppointmentFlag())){
             queryWrapper.notIn("bar.status","1","2");
         }
+        // 校验数据范围
+        List<String> loginUserDataScope = StpLoginUserUtil.getLoginUserDataScope();
+        if(ObjectUtil.isEmpty(loginUserDataScope)) {
+            queryWrapper.eq("bar.create_user", StpUtil.getLoginIdAsString());
+        }
         queryWrapper.eq("bar.delete_flag","NOT_DELETE");
         queryWrapper.orderByDesc("bar.create_time");
         return queryWrapper;
@@ -121,6 +137,7 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
         //获取流程配置判断预约是否需要审核
         BizConfig bizConfig = bizConfigService.getOne(new QueryWrapper<BizConfig>().lambda().last("limit 1"));
         BizAppointmentRecord bizAppointmentRecord = BeanUtil.toBean(bizAppointmentRecordAddParam, BizAppointmentRecord.class);
+        bizAppointmentRecord.setTimeId(bizOrderService.queryEntity(bizAppointmentRecordAddParam.getOrderId()).getDeliveryTimeId());
         if(ObjectUtil.isNotNull(bizConfig)){
             if(StringUtils.equals(bizConfig.getAuditSwitch(),"1")){
                 //开启审核,设置待审核状态
@@ -132,12 +149,16 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
         }
         this.save(bizAppointmentRecord);
 
+        BizOrder bizOrder = bizOrderService.getById(bizAppointmentRecordAddParam.getOrderId());
+        bizOrder.setOrderStatus("4");
+        bizOrderService.updateById(bizOrder);
+
         //更新时间段内已预约数
-        BizAppointmentTime bizAppointmentTime = bizAppointmentTimeService.getById(bizAppointmentRecordAddParam.getTimeId());
+        /*BizAppointmentTime bizAppointmentTime = bizAppointmentTimeService.getById(bizAppointmentRecordAddParam.getTimeId());
         if(ObjectUtil.isNotNull(bizAppointmentTime)){
             bizAppointmentTime.setApplyNumberAlready(bizAppointmentTime.getApplyNumberAlready()+1);
             bizAppointmentTimeService.updateById(bizAppointmentTime);
-        }
+        }*/
     }
 
     public void checkParam(BizAppointmentRecordAddParam bizAppointmentRecordAddParam){
@@ -149,7 +170,7 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
             //校验车牌号是否添加过预约,排除11:已签收、 13:销售已审核  、 14:已取消
             long count = this.count(new QueryWrapper<BizAppointmentRecord>().lambda().
                     eq(BizAppointmentRecord::getLicenseNumber,bizAppointmentRecordAddParam.getLicenseNumber().toUpperCase().trim()).
-                    notIn(BizAppointmentRecord::getStatus, "11", "13", "14"));
+                    notIn(BizAppointmentRecord::getStatus, "11", "13", "14","15"));
             if(count>0){
                 throw new CommonException("车牌号:{}已经添加过预约!",bizAppointmentRecordAddParam.getLicenseNumber().toUpperCase().trim());
             }
@@ -160,7 +181,22 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
                 throw new CommonException("手机号码:{}格式错误", bizAppointmentRecordAddParam.getDriverMobile());
             }
         }
-        if(ObjectUtil.isNotEmpty(bizAppointmentRecordAddParam.getTimeId())){
+        //校验订单
+        if(ObjectUtil.isNotEmpty(bizAppointmentRecordAddParam.getOrderId())){
+            BizOrder bizOrder = bizOrderService.getById(bizAppointmentRecordAddParam.getOrderId());
+            if(ObjectUtil.isNotNull(bizOrder)){
+                if(!StringUtils.equals(bizOrder.getOrderStatus(),"3") && !StringUtils.equals(bizOrder.getOrderStatus(),"4")){
+                    throw new CommonException("当前订单不可预约!");
+                }
+                BizGoodsConf bizGoodsConf = bizGoodsConfService.getById(bizOrder.getDeliveryTimeId());
+                if(ObjectUtil.isNotNull(bizGoodsConf)){
+                    if(new Date().getTime() > bizGoodsConf.getConfEndTime().getTime()){
+                        throw new CommonException("提货时间段已过,不可预约!");
+                    }
+                }
+            }
+        }
+        /*if(ObjectUtil.isNotEmpty(bizAppointmentRecordAddParam.getTimeId())){
             //校验预约时间段是否预约满
             //查询预约时间段内的预约记录,10:已出场   11:已签收   12:自动审核  13:销售已审核   14:已取消这些状态都占用预约名额
             long count = this.count(new QueryWrapper<BizAppointmentRecord>().lambda().
@@ -171,7 +207,7 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
             if(count>=bizAppointmentTime.getApplyNumber()){
                 throw new CommonException("该时间段已经预约满!");
             }
-        }
+        }*/
 
     }
 
@@ -186,7 +222,7 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
                 //校验车牌号是否添加过预约,排除11:已签收、 13:销售已审核  、 14:已取消
                 long count = this.count(new QueryWrapper<BizAppointmentRecord>().lambda().
                         eq(BizAppointmentRecord::getLicenseNumber,bizAppointmentRecordEditParam.getLicenseNumber().toUpperCase().trim()).
-                        notIn(BizAppointmentRecord::getStatus, "11", "13", "14"));
+                        notIn(BizAppointmentRecord::getStatus, "11", "13", "14","15"));
                 if(count>0){
                     throw new CommonException("车牌号:{}已经添加过预约!",bizAppointmentRecordEditParam.getLicenseNumber().toUpperCase().trim());
                 }
@@ -198,7 +234,22 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
                 throw new CommonException("手机号码:{}格式错误", bizAppointmentRecordEditParam.getDriverMobile());
             }
         }
-        if(ObjectUtil.isNotEmpty(bizAppointmentRecordEditParam.getTimeId())){
+        //校验订单
+        if(ObjectUtil.isNotEmpty(bizAppointmentRecordEditParam.getOrderId())){
+            BizOrder bizOrder = bizOrderService.getById(bizAppointmentRecordEditParam.getOrderId());
+            if(ObjectUtil.isNotNull(bizOrder)){
+                if(!StringUtils.equals(bizOrder.getOrderStatus(),"3") && !StringUtils.equals(bizOrder.getOrderStatus(),"4")){
+                    throw new CommonException("当前订单不可预约!");
+                }
+                BizGoodsConf bizGoodsConf = bizGoodsConfService.getById(bizOrder.getDeliveryTimeId());
+                if(ObjectUtil.isNotNull(bizGoodsConf)){
+                    if(new Date().getTime() > bizGoodsConf.getConfEndTime().getTime()){
+                        throw new CommonException("提货时间段已过,不可预约!");
+                    }
+                }
+            }
+        }
+        /*if(ObjectUtil.isNotEmpty(bizAppointmentRecordEditParam.getTimeId())){
             if(!StringUtils.equals(bizAppointmentRecord.getTimeId(),bizAppointmentRecordEditParam.getTimeId())){
                 //校验预约时间段是否预约满
                 //查询预约时间段内的预约记录,10:已出场   11:已签收   12:自动审核  13:销售已审核   14:已取消这些状态都占用预约名额
@@ -212,7 +263,7 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
                 }
             }
 
-        }
+        }*/
 
     }
 
@@ -221,7 +272,7 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
     public void edit(BizAppointmentRecordEditParam bizAppointmentRecordEditParam) {
         BizAppointmentRecord bizAppointmentRecord = this.queryEntity(bizAppointmentRecordEditParam.getId());
         checkParam(bizAppointmentRecordEditParam,bizAppointmentRecord);
-        if(!StringUtils.equals(bizAppointmentRecord.getTimeId(),bizAppointmentRecordEditParam.getTimeId())){
+        /*if(!StringUtils.equals(bizAppointmentRecord.getTimeId(),bizAppointmentRecordEditParam.getTimeId())){
             //调整了预约时段,释放之前预约时段的预约次数
             BizAppointmentTime bizAppointmentTime = bizAppointmentTimeService.getById(bizAppointmentRecord.getTimeId());
             bizAppointmentTime.setApplyNumberAlready(bizAppointmentTime.getApplyNumberAlready()-1);
@@ -231,6 +282,9 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
             BizAppointmentTime time = bizAppointmentTimeService.getById(bizAppointmentRecordEditParam.getTimeId());
             time.setApplyNumberAlready(time.getApplyNumberAlready()+1);
             bizAppointmentTimeService.updateById(time);
+        }*/
+        if(!StringUtils.equals(bizAppointmentRecord.getOrderId(),bizAppointmentRecordEditParam.getOrderId())){
+            bizAppointmentRecordEditParam.setTimeId(bizOrderService.queryEntity(bizAppointmentRecordEditParam.getOrderId()).getDeliveryTimeId());
         }
         BeanUtil.copyProperties(bizAppointmentRecordEditParam, bizAppointmentRecord);
         if(StringUtils.equals(bizAppointmentRecord.getStatus(),"2")){
@@ -244,14 +298,14 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
     @Override
     public void delete(List<BizAppointmentRecordIdParam> bizAppointmentRecordIdParamList) {
         //释放预约数
-        for(BizAppointmentRecordIdParam bizAppointmentRecordIdParam : bizAppointmentRecordIdParamList){
+        /*for(BizAppointmentRecordIdParam bizAppointmentRecordIdParam : bizAppointmentRecordIdParamList){
             BizAppointmentRecord bizAppointmentRecord = this.queryEntity(bizAppointmentRecordIdParam.getId());
             BizAppointmentTime bizAppointmentTime = bizAppointmentTimeService.getById(bizAppointmentRecord.getTimeId());
             if(ObjectUtil.isNotNull(bizAppointmentTime)){
                 bizAppointmentTime.setApplyNumberAlready(bizAppointmentTime.getApplyNumberAlready()-1);
                 bizAppointmentTimeService.updateById(bizAppointmentTime);
             }
-        }
+        }*/
         // 执行删除
         this.removeByIds(CollStreamUtil.toList(bizAppointmentRecordIdParamList, BizAppointmentRecordIdParam::getId));
     }
@@ -353,11 +407,11 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
         this.updateById(bizAppointmentRecord);
 
         //释放预约数
-        BizAppointmentTime bizAppointmentTime = bizAppointmentTimeService.getById(bizAppointmentRecord.getTimeId());
+        /*BizAppointmentTime bizAppointmentTime = bizAppointmentTimeService.getById(bizAppointmentRecord.getTimeId());
         if(ObjectUtil.isNotNull(bizAppointmentTime)){
             bizAppointmentTime.setApplyNumberAlready(bizAppointmentTime.getApplyNumberAlready()-1);
             bizAppointmentTimeService.updateById(bizAppointmentTime);
-        }
+        }*/
     }
 
     @Transactional
@@ -393,11 +447,26 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
         }
     }
 
+    @Override
+    public BizAppointmentRecord getAppointmentRecord(BizAppointmentRecordPageParam bizAppointmentRecordPageParam) {
+        QueryWrapper<BizAppointmentRecord> queryWrapper = new QueryWrapper<>();
+        if(ObjectUtil.isNotEmpty(bizAppointmentRecordPageParam.getDateNow())){
+            queryWrapper.ge("bgc.CONF_START_TIME",bizAppointmentRecordPageParam.getDateNow());
+            queryWrapper.lt("bgc.CONF_END_TIME",bizAppointmentRecordPageParam.getDateNow());
+        }
+        queryWrapper.eq("bar.delete_flag","NOT_DELETE");
+        queryWrapper.orderByAsc("bar.create_time");
+        queryWrapper.last("limit 1");
+        //BizAppointmentRecord record = this.getBaseMapper().getRecord(queryWrapper);
+        return null;
+    }
+
     public BizAppointmentRecord setBizAppointmentRecord(BizAppointmentRecord bizAppointmentRecord){
         bizAppointmentRecord.setIsFlag("1");
         if(ObjectUtil.isNotEmpty(bizAppointmentRecord.getOrderId())){
             BizOrder bizOrder = bizOrderService.getById(bizAppointmentRecord.getOrderId());
             if(ObjectUtil.isNotNull(bizOrder)){
+                bizAppointmentRecord.setOrderBalance(bizOrder.getOrderWeight().subtract(bizOrder.getNetWeight()));
                 if(ObjectUtil.isNotEmpty(bizOrder.getGoodId())){
                     BizGoods bizGoods = bizGoodsService.getById(bizOrder.getGoodId());
                     if(ObjectUtil.isNotNull(bizGoods)){
@@ -407,6 +476,16 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
                 }
             }
         }
+        if(ObjectUtil.isNotEmpty(bizAppointmentRecord.getOverId())){
+            BizExcessConfig excessConfig = bizExcessConfigService.getById(bizAppointmentRecord.getOverId());
+            if(ObjectUtil.isNotNull(excessConfig)){
+                bizAppointmentRecord.setOverWeight(excessConfig.getExcessWeight());
+            }
+        }
+        BizConfig bizConfig = bizConfigService.getOne(new QueryWrapper<BizConfig>().lambda().last("limit 1"));
+        if(ObjectUtil.isNotNull(bizConfig)){
+            bizAppointmentRecord.setOrderWeightSwitch(bizConfig.getOrderWeightSwitch());
+        }
         return bizAppointmentRecord;
     }
 

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

@@ -60,4 +60,7 @@ public class BizConfig extends CommonEntity {
     /** 门禁强制校验开关 */
     @Schema(description = "门禁强制校验开关")
     private String accessControlSwitch;
+
+    /**装卸损耗预警值配置(百分比)*/
+    private Integer lossWarn;
 }

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

@@ -61,4 +61,7 @@ public class BizConfigAddParam {
     @NotBlank(message = "accessControlSwitch不能为空")
     private String accessControlSwitch;
 
+    /**装卸损耗预警值配置(百分比)*/
+    private Integer lossWarn;
+
 }

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

@@ -66,4 +66,7 @@ public class BizConfigEditParam {
     @NotBlank(message = "accessControlSwitch不能为空")
     private String accessControlSwitch;
 
+    /**装卸损耗预警值配置(百分比)*/
+    private Integer lossWarn;
+
 }

+ 12 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizexcessconfig/controller/BizExcessConfigController.java

@@ -116,4 +116,16 @@ public class BizExcessConfigController {
     public CommonResult<BizExcessConfig> detail(@Valid BizExcessConfigIdParam bizExcessConfigIdParam) {
         return CommonResult.data(bizExcessConfigService.detail(bizExcessConfigIdParam));
     }
+
+    /**
+     * 获取超限配置列表
+     *
+     * @author fanzherong
+     * @date  2025/03/20 16:46
+     */
+    @Operation(summary = "获取超限配置列表")
+    @GetMapping("/biz/bizexcessconfig/getList")
+    public CommonResult<List<BizExcessConfig>> getList() {
+        return CommonResult.data(bizExcessConfigService.getList());
+    }
 }

+ 6 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizexcessconfig/service/BizExcessConfigService.java

@@ -77,4 +77,10 @@ public interface BizExcessConfigService extends IService<BizExcessConfig> {
      * @date  2025/03/20 16:46
      **/
     BizExcessConfig queryEntity(String id);
+
+    /**
+     * 超限配置列表
+     * @return
+     */
+    List<BizExcessConfig> getList();
 }

+ 6 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizexcessconfig/service/impl/BizExcessConfigServiceImpl.java

@@ -100,4 +100,10 @@ public class BizExcessConfigServiceImpl extends ServiceImpl<BizExcessConfigMappe
         }
         return bizExcessConfig;
     }
+
+    @Override
+    public List<BizExcessConfig> getList() {
+        List<BizExcessConfig> list = this.list(new QueryWrapper<BizExcessConfig>().lambda().eq(BizExcessConfig::getStatus, "1"));
+        return list;
+    }
 }

+ 61 - 2
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorder/controller/BizOrderController.java

@@ -25,6 +25,7 @@ import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
 import vip.xiaonuo.biz.modular.customer.entity.BizCustomer;
 import vip.xiaonuo.common.annotation.CommonLog;
+import vip.xiaonuo.common.annotation.CommonNoRepeat;
 import vip.xiaonuo.common.pojo.CommonResult;
 import vip.xiaonuo.biz.modular.bizorder.entity.BizOrder;
 import vip.xiaonuo.biz.modular.bizorder.param.BizOrderAddParam;
@@ -76,6 +77,7 @@ public class BizOrderController {
     @Operation(summary = "添加订单管理")
     @CommonLog("添加订单管理")
     @PostMapping("/biz/bizorder/add")
+    @CommonNoRepeat
     public CommonResult<String> add(@RequestBody @Valid BizOrderAddParam bizOrderAddParam) {
         bizOrderService.add(bizOrderAddParam);
         return CommonResult.ok();
@@ -164,13 +166,13 @@ public class BizOrderController {
      * @author fanzherong
      * @date  2025/03/21 17:16
      */
-    @Operation(summary = "结束订单")
+    /*@Operation(summary = "结束订单")
     @CommonLog("结束订单")
     @PostMapping("/biz/bizorder/endOrder")
     public CommonResult<String> endOrder(@RequestBody @Valid BizOrderIdParam bizOrderIdParam) {
         bizOrderService.endOrder(bizOrderIdParam);
         return CommonResult.ok();
-    }
+    }*/
 
     /**
      * 订单列表
@@ -184,4 +186,61 @@ public class BizOrderController {
     public CommonResult<List<BizOrder>> getList() {
         return CommonResult.data(bizOrderService.getList());
     }
+
+
+    /**
+     * 订单签名
+     *
+     * @author fanzherong
+     * @date  2025/03/21 17:16
+     */
+    @Operation(summary = "订单签名")
+    @CommonLog("订单签名")
+    @PostMapping("/biz/bizorder/updateOrderSign")
+    public CommonResult<String> updateOrderSign(@RequestBody @Valid BizOrderEditParam bizOrderEditParam) {
+        bizOrderService.updateOrderSign(bizOrderEditParam);
+        return CommonResult.ok();
+    }
+
+    /**
+     * 订单确认
+     *
+     * @author fanzherong
+     * @date  2025/03/21 17:16
+     */
+    @Operation(summary = "订单确认")
+    @CommonLog("订单确认")
+    @PostMapping("/biz/bizorder/orderConfirm")
+    public CommonResult<String> orderConfirm(@RequestBody @Valid BizOrderEditParam bizOrderEditParam) {
+        bizOrderService.orderConfirm(bizOrderEditParam);
+        return CommonResult.ok();
+    }
+
+    /**
+     * 结束订单
+     *
+     * @author fanzherong
+     * @date  2025/03/21 17:16
+     */
+    @Operation(summary = "结束订单")
+    @CommonLog("结束订单")
+    @PostMapping("/biz/bizorder/endOrder")
+    public CommonResult<String> endOrder(@RequestBody @Valid BizOrderEditParam bizOrderEditParam) {
+        bizOrderService.endOrder(bizOrderEditParam);
+        return CommonResult.ok();
+    }
+
+    /**
+     * 订单审核
+     *
+     * @author fanzherong
+     * @date  2025/03/21 17:16
+     */
+    @Operation(summary = "订单审核")
+    @CommonLog("订单审核")
+    @PostMapping("/biz/bizorder/auditOrder")
+    public CommonResult<String> auditOrder(@RequestBody @Valid BizOrderEditParam bizOrderEditParam) {
+        bizOrderService.auditOrder(bizOrderEditParam);
+        return CommonResult.ok();
+    }
 }

+ 20 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorder/entity/BizOrder.java

@@ -108,4 +108,24 @@ public class BizOrder extends CommonEntity{
     @Schema(description = "客户地址")
     private String customerAddress;
 
+    /**提货时间*/
+    private String deliveryTimeId;
+
+    /**提货开始时间*/
+    @TableField(exist = false)
+    private Date confStartTime;
+
+    /**提货结束时间*/
+    @TableField(exist = false)
+    private Date confEndTime;
+
+    /**签名*/
+    private String orderSign;
+
+    /**销售订单*/
+    private String saleOrderInfo;
+
+    /**审核备注*/
+    private String orderReason;
+
 }

+ 10 - 1
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorder/mapper/mapping/BizOrderMapper.xml

@@ -9,6 +9,9 @@
             bo.order_name,
             bo.customer_id,
             bc.name customerName,
+            bc.contact customerContactName,
+            bc.phone customerPhone,
+            bc.address customerAddress,
             bo.good_id,
             bg.`GOODS_NAME` goodsName,
             bg.GOODS_MODEL goodsModel,
@@ -16,10 +19,16 @@
             bo.order_source,
             bo.order_status,
             bo.order_weight/1000 order_weight,
-            bo.net_weight/1000 net_weight
+            bo.net_weight/1000 net_weight,
+            bgc.CONF_START_TIME,
+            bgc.CONF_END_TIME,
+            bo.sale_order_info,
+            bo.delivery_time_id,
+            bo.order_sign
         from biz_order bo
         left join biz_customer bc on bo.customer_id = bc.id
         left join biz_goods bg on bg.id = bo.good_id
+        left join biz_goods_conf bgc on bgc.id = bo.delivery_time_id
         ${ew.customSqlSegment}
     </select>
 </mapper>

+ 9 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorder/param/BizOrderAddParam.java

@@ -69,4 +69,13 @@ public class BizOrderAddParam {
     @Schema(description = "过磅重量")
     private BigDecimal netWeight;
 
+    /**提货时间*/
+    private String deliveryTimeId;
+
+    /**签名*/
+    private String orderSign;
+
+    /**销售订单*/
+    private String saleOrderInfo;
+
 }

+ 15 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorder/param/BizOrderEditParam.java

@@ -76,4 +76,19 @@ public class BizOrderEditParam {
     /**客户id集合*/
     private List<String> customerIdList;
 
+    /**提货时间*/
+    private String deliveryTimeId;
+
+    /**签名*/
+    private String orderSign;
+
+    /**销售订单*/
+    private String saleOrderInfo;
+
+    /**审核备注*/
+    private String orderReason;
+
+    /**审核标识*/
+    private String auditFlag;
+
 }

+ 11 - 2
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorder/param/BizOrderExportResult.java

@@ -6,6 +6,7 @@ import com.alibaba.excel.enums.poi.FillPatternTypeEnum;
 import lombok.Data;
 
 import java.math.BigDecimal;
+import java.util.Date;
 
 @Data
 public class BizOrderExportResult {
@@ -30,9 +31,17 @@ public class BizOrderExportResult {
     private String goodsName;
 
     /** 订单来源(1:oa推送   2:手动新增) */
-    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
+   /* @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
     @ExcelProperty({"订单报表", "订单来源"})
-    private String orderSourceName;
+    private String orderSourceName;*/
+
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
+    @ExcelProperty({"订单报表", "提货开始时间"})
+    private Date confStartTime;
+
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
+    @ExcelProperty({"订单报表", "提货结束时间"})
+    private Date confEndTime;
 
     /** 订单状态(1:正常  2:终止) */
     @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)

+ 12 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorder/service/BizOrderService.java

@@ -96,4 +96,16 @@ public interface BizOrderService extends IService<BizOrder> {
 
     /**查询订单列表*/
     List<BizOrder> getList();
+
+    /***订单签名*/
+    void updateOrderSign(BizOrderEditParam bizOrderEditParam);
+
+    /**确认*/
+    void orderConfirm(BizOrderEditParam bizOrderEditParam);
+
+    /**结束订单*/
+    void endOrder(BizOrderEditParam bizOrderEditParam);
+
+    /**审核**/
+    void auditOrder(BizOrderEditParam bizOrderEditParam);
 }

+ 148 - 12
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorder/service/impl/BizOrderServiceImpl.java

@@ -14,7 +14,9 @@ package vip.xiaonuo.biz.modular.bizorder.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.collection.CollStreamUtil;
+import cn.hutool.core.img.ImgUtil;
 import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -28,6 +30,9 @@ import org.springframework.transaction.annotation.Transactional;
 import vip.xiaonuo.biz.modular.customer.entity.BizCustomer;
 import vip.xiaonuo.biz.modular.customer.service.BizCustomerService;
 import vip.xiaonuo.biz.modular.bizorder.param.*;
+import vip.xiaonuo.biz.modular.goodsConf.entity.BizGoodsConf;
+import vip.xiaonuo.biz.modular.goodsConf.service.BizGoodsConfService;
+import vip.xiaonuo.biz.modular.record.entity.BizRecord;
 import vip.xiaonuo.biz.modular.utils.CommonExportUtil;
 import vip.xiaonuo.common.exception.CommonException;
 import vip.xiaonuo.common.page.CommonPageRequest;
@@ -35,8 +40,10 @@ import vip.xiaonuo.biz.modular.bizorder.entity.BizOrder;
 import vip.xiaonuo.biz.modular.bizorder.mapper.BizOrderMapper;
 import vip.xiaonuo.biz.modular.bizorder.service.BizOrderService;
 
-import java.io.IOException;
+import java.io.*;
 import java.math.BigDecimal;
+import java.net.URL;
+import java.net.URLConnection;
 import java.util.List;
 
 /**
@@ -54,6 +61,9 @@ public class BizOrderServiceImpl extends ServiceImpl<BizOrderMapper, BizOrder> i
     @Resource
     private TransService transService;
 
+    @Resource
+    private BizGoodsConfService bizGoodsConfService;
+
     @Override
     public Page<BizOrder> page(BizOrderPageParam bizOrderPageParam) {
         QueryWrapper<BizOrder> queryWrapper = getQueryWrapper(bizOrderPageParam);
@@ -94,29 +104,58 @@ public class BizOrderServiceImpl extends ServiceImpl<BizOrderMapper, BizOrder> i
     @Transactional(rollbackFor = Exception.class)
     @Override
     public void add(BizOrderAddParam bizOrderAddParam) {
-        //判断订单编号是否存在
-        long count = this.count(new QueryWrapper<BizOrder>().lambda().eq(BizOrder::getOrderNumber, bizOrderAddParam.getOrderNumber()));
-        if(count>0){
-            throw new CommonException("订单编号已存在!");
+        //查询时间段内货品重量
+        BizGoodsConf bizGoodsConf = bizGoodsConfService.getById(bizOrderAddParam.getDeliveryTimeId());
+        if(ObjectUtil.isNull(bizGoodsConf)){
+            throw new CommonException("未查询到时间段信息!");
+        }
+        if(bizOrderAddParam.getOrderWeight().multiply(new BigDecimal(1000)).compareTo(new BigDecimal(bizGoodsConf.getLastWeight())) > 0 ){
+            throw new CommonException("当前时间段货品余量不足!");
         }
         BizOrder bizOrder = BeanUtil.toBean(bizOrderAddParam, BizOrder.class);
+        bizOrder.setGoodId(bizGoodsConf.getGoodsId());
         //数据库默认存KG,页面展示用吨
         bizOrder.setOrderWeight(bizOrder.getOrderWeight().multiply(new BigDecimal(1000)));
         //来源,手动新增
         bizOrder.setOrderSource("2");
+        bizOrder.setOrderStatus("1");
         this.save(bizOrder);
+
+        //修改时段配置内物品重量
+        bizGoodsConfService.editUsedWeight(bizGoodsConf.getId(),bizOrderAddParam.getOrderWeight().multiply(new BigDecimal(1000)).doubleValue());
     }
 
     @Transactional(rollbackFor = Exception.class)
     @Override
     public void edit(BizOrderEditParam bizOrderEditParam) {
+        //查询时间段内货品重量
+        BizGoodsConf bizGoodsConf = bizGoodsConfService.getById(bizOrderEditParam.getDeliveryTimeId());
+        if(ObjectUtil.isNull(bizGoodsConf)){
+            throw new CommonException("未查询到时间段信息!");
+        }
         BizOrder bizOrder = this.queryEntity(bizOrderEditParam.getId());
-        if(!StringUtils.equals(bizOrder.getOrderNumber(),bizOrderEditParam.getOrderNumber())){
-            //订单编号修改,判断订单编号是否存在
-            long count = this.count(new QueryWrapper<BizOrder>().lambda().eq(BizOrder::getOrderNumber, bizOrderEditParam.getOrderNumber()));
-            if(count>0){
-                throw new CommonException("订单编号已存在!");
+        if(bizOrder.getOrderWeight().compareTo(bizOrderEditParam.getOrderWeight().multiply(new BigDecimal(1000))) != 0 ){
+            if(bizOrderEditParam.getOrderWeight().multiply(new BigDecimal(1000)).
+                    compareTo(new BigDecimal(bizGoodsConf.getLastWeight()).add(bizOrder.getOrderWeight())) > 0 ){
+                throw new CommonException("当前时间段货品余量不足!");
             }
+            //旧的提货时段
+            BizGoodsConf goodsConf = bizGoodsConfService.getById(bizOrder.getDeliveryTimeId());
+            //修改时段配置内物品重量
+            bizGoodsConfService.editUsedWeight(goodsConf.getId(),bizOrder.getOrderWeight().negate().doubleValue());
+
+            //修改新时段
+            bizGoodsConfService.editUsedWeight(bizGoodsConf.getId(),bizOrderEditParam.getOrderWeight().multiply(new BigDecimal(1000)).doubleValue());
+        }
+        if(!StringUtils.equals(bizOrderEditParam.getDeliveryTimeId(),bizOrder.getDeliveryTimeId())){
+            //修改了提货时段,原来时段的货物重量还原,新的提货时段货物扣减
+            //旧的提货时段
+            BizGoodsConf goodsConf = bizGoodsConfService.getById(bizOrder.getDeliveryTimeId());
+            //修改时段配置内物品重量
+            bizGoodsConfService.editUsedWeight(goodsConf.getId(),bizOrder.getOrderWeight().negate().doubleValue());
+
+            //修改新时段
+            bizGoodsConfService.editUsedWeight(bizGoodsConf.getId(),bizOrderEditParam.getOrderWeight().multiply(new BigDecimal(1000)).doubleValue());
         }
         BeanUtil.copyProperties(bizOrderEditParam, bizOrder);
         //设置订单重量
@@ -131,6 +170,15 @@ public class BizOrderServiceImpl extends ServiceImpl<BizOrderMapper, BizOrder> i
     @Transactional(rollbackFor = Exception.class)
     @Override
     public void delete(List<BizOrderIdParam> bizOrderIdParamList) {
+        //执行删除操作前,将重量回写
+        for(BizOrderIdParam bizOrderIdParam : bizOrderIdParamList){
+            BizOrder bizOrder = this.queryEntity(bizOrderIdParam.getId());
+            BizGoodsConf bizGoodsConf = bizGoodsConfService.getById(bizOrder.getDeliveryTimeId());
+            if(ObjectUtil.isNotNull(bizGoodsConf)){
+                //修改时段配置内物品重量
+                bizGoodsConfService.editUsedWeight(bizGoodsConf.getId(),bizOrder.getOrderWeight().negate().doubleValue());
+            }
+        }
         // 执行删除
         this.removeByIds(CollStreamUtil.toList(bizOrderIdParamList, BizOrderIdParam::getId));
     }
@@ -177,7 +225,7 @@ public class BizOrderServiceImpl extends ServiceImpl<BizOrderMapper, BizOrder> i
         for(BizOrder bizOrder : orderList){
             BizOrderExportResult bizOrderExportResult = new BizOrderExportResult();
             BeanUtil.copyProperties(bizOrder, bizOrderExportResult);
-            bizOrderExportResult.setOrderSourceName((String) bizOrder.getTransMap().get("orderSourceName"));
+            //bizOrderExportResult.setOrderSourceName((String) bizOrder.getTransMap().get("orderSourceName"));
             bizOrderExportResult.setOrderStatusName((String) bizOrder.getTransMap().get("orderStatusName"));
             list.add(bizOrderExportResult);
         }
@@ -193,6 +241,94 @@ public class BizOrderServiceImpl extends ServiceImpl<BizOrderMapper, BizOrder> i
 
     @Override
     public List<BizOrder> getList() {
-        return this.list();
+        return this.list(new QueryWrapper<BizOrder>().lambda().in(BizOrder::getOrderStatus,"3","4"));
+    }
+
+    @Override
+    public void updateOrderSign(BizOrderEditParam bizOrderEditParam) {
+        BizOrder bizOrder = this.queryEntity(bizOrderEditParam.getId());
+        if(ObjectUtil.isEmpty(bizOrderEditParam.getOrderSign())){
+            throw new CommonException("签名不能为空!");
+        }
+        String orderSign = bizOrderEditParam.getOrderSign();
+        if(bizOrderEditParam.getOrderSign().contains(StrUtil.COMMA)) {
+            orderSign = StrUtil.split(orderSign, StrUtil.COMMA).get(1);
+        }
+        String base64 = ImgUtil.toBase64DataUri(ImgUtil.scale(ImgUtil.toImage(orderSign),
+                100, 50, null), ImgUtil.IMAGE_TYPE_PNG);
+
+        bizOrder.setOrderSign(base64);
+        bizOrder.setOrderStatus("2");
+        this.updateById(bizOrder);
+    }
+
+    @Override
+    public void orderConfirm(BizOrderEditParam bizOrderEditParam) {
+        BizOrder bizOrder = this.queryEntity(bizOrderEditParam.getId());
+        bizOrder.setOrderStatus("3");
+        this.updateById(bizOrder);
+    }
+
+    @Override
+    public void endOrder(BizOrderEditParam bizOrderEditParam) {
+        BizOrder bizOrder = this.queryEntity(bizOrderEditParam.getId());
+        if(bizOrder.getNetWeight().compareTo(BigDecimal.ZERO) != 0){
+            BigDecimal orderBalance = bizOrder.getOrderWeight().subtract(bizOrder.getNetWeight());
+            BigDecimal result = orderBalance.divide(bizOrder.getOrderWeight()).multiply(new BigDecimal(100));
+            if(result.compareTo(new BigDecimal(80)) >= 0){
+                //大于80%不需要审核
+                bizOrder.setOrderStatus("7");
+            }else{
+                bizOrder.setOrderStatus("5");
+            }
+        }else{
+            bizOrder.setOrderStatus("7");
+        }
+        this.updateById(bizOrder);
+    }
+
+    @Override
+    public void auditOrder(BizOrderEditParam bizOrderEditParam) {
+        BizOrder bizOrder = this.queryEntity(bizOrderEditParam.getId());
+        if(ObjectUtil.isNotEmpty(bizOrderEditParam.getAuditFlag())){
+            if(StringUtils.equals(bizOrderEditParam.getAuditFlag(),"true")){
+                //驳回
+                bizOrder.setOrderStatus("6");
+                bizOrder.setOrderReason(bizOrderEditParam.getOrderReason());
+            }else{
+                bizOrder.setOrderStatus("7");
+            }
+            this.updateById(bizOrder);
+        }
+    }
+
+    public static void main(String[] args) {
+        String result = "";
+        try {
+            URL url = new URL("http://web.duanxinwang.cc/asmx/smsservice.aspx");
+            StringBuilder params = new StringBuilder();
+            params.append("name=").append("13375207977dxw");
+            params.append("&pwd=").append("4AD0C7ED32CDD49C4CC2940B4095");
+            params.append("&mobile=").append("15896183719");
+            params.append("&content=").append("您的登陆密码为:14817030请尽快登录!");
+            params.append("&sign=").append("淮安市保障房建设管理中心");
+            params.append("&type=").append("pt");
+            URLConnection connection = url.openConnection();
+            connection.setDoOutput(true);
+            OutputStreamWriter out = new OutputStreamWriter(connection.getOutputStream(), "utf-8");
+            out.write(params.toString()); //post的关键所在!
+            out.flush();
+            out.close();
+            String temp = "";
+            InputStream is = connection.getInputStream();
+            BufferedReader br = new BufferedReader(new InputStreamReader(is));
+
+            while (( temp = br.readLine()) != null) {
+                result += temp;
+            }
+        } catch (Exception e) {
+            // TODO: handle exception
+        }
+        System.out.printf("result:"+result);
     }
 }

+ 119 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorderconfig/controller/BizOrderConfigController.java

@@ -0,0 +1,119 @@
+/*
+ * Copyright [2022] [https://www.xiaonuo.vip]
+ *
+ * Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
+ *
+ * 1.请不要删除和修改根目录下的LICENSE文件。
+ * 2.请不要删除和修改Snowy源码头部的版权声明。
+ * 3.本项目代码可免费商业使用,商业使用请保留源码和相关描述文件的项目出处,作者声明等。
+ * 4.分发源码时候,请注明软件出处 https://www.xiaonuo.vip
+ * 5.不可二次分发开源参与同类竞品,如有想法可联系团队xiaonuobase@qq.com商议合作。
+ * 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
+ */
+package vip.xiaonuo.biz.modular.bizorderconfig.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+import vip.xiaonuo.common.annotation.CommonLog;
+import vip.xiaonuo.common.pojo.CommonResult;
+import vip.xiaonuo.biz.modular.bizorderconfig.entity.BizOrderConfig;
+import vip.xiaonuo.biz.modular.bizorderconfig.param.BizOrderConfigAddParam;
+import vip.xiaonuo.biz.modular.bizorderconfig.param.BizOrderConfigEditParam;
+import vip.xiaonuo.biz.modular.bizorderconfig.param.BizOrderConfigIdParam;
+import vip.xiaonuo.biz.modular.bizorderconfig.param.BizOrderConfigPageParam;
+import vip.xiaonuo.biz.modular.bizorderconfig.service.BizOrderConfigService;
+
+import jakarta.annotation.Resource;
+import jakarta.validation.Valid;
+import jakarta.validation.constraints.NotEmpty;
+import java.util.List;
+
+/**
+ * 订单配置控制器
+ *
+ * @author fanzherong
+ * @date  2025/04/03 15:13
+ */
+@Tag(name = "订单配置控制器")
+@RestController
+@Validated
+public class BizOrderConfigController {
+
+    @Resource
+    private BizOrderConfigService bizOrderConfigService;
+
+    /**
+     * 获取订单配置分页
+     *
+     * @author fanzherong
+     * @date  2025/04/03 15:13
+     */
+    @Operation(summary = "获取订单配置分页")
+    @SaCheckPermission("/biz/bizorderconfig/page")
+    @GetMapping("/biz/bizorderconfig/page")
+    public CommonResult<Page<BizOrderConfig>> page(BizOrderConfigPageParam bizOrderConfigPageParam) {
+        return CommonResult.data(bizOrderConfigService.page(bizOrderConfigPageParam));
+    }
+
+    /**
+     * 添加订单配置
+     *
+     * @author fanzherong
+     * @date  2025/04/03 15:13
+     */
+    @Operation(summary = "添加订单配置")
+    @CommonLog("添加订单配置")
+    @PostMapping("/biz/bizorderconfig/add")
+    public CommonResult<String> add(@RequestBody @Valid BizOrderConfigAddParam bizOrderConfigAddParam) {
+        bizOrderConfigService.add(bizOrderConfigAddParam);
+        return CommonResult.ok();
+    }
+
+    /**
+     * 编辑订单配置
+     *
+     * @author fanzherong
+     * @date  2025/04/03 15:13
+     */
+    @Operation(summary = "编辑订单配置")
+    @CommonLog("编辑订单配置")
+    @PostMapping("/biz/bizorderconfig/edit")
+    public CommonResult<String> edit(@RequestBody @Valid BizOrderConfigEditParam bizOrderConfigEditParam) {
+        bizOrderConfigService.edit(bizOrderConfigEditParam);
+        return CommonResult.ok();
+    }
+
+    /**
+     * 删除订单配置
+     *
+     * @author fanzherong
+     * @date  2025/04/03 15:13
+     */
+    @Operation(summary = "删除订单配置")
+    @CommonLog("删除订单配置")
+    @PostMapping("/biz/bizorderconfig/delete")
+    public CommonResult<String> delete(@RequestBody @Valid @NotEmpty(message = "集合不能为空")
+                                                   List<BizOrderConfigIdParam> bizOrderConfigIdParamList) {
+        bizOrderConfigService.delete(bizOrderConfigIdParamList);
+        return CommonResult.ok();
+    }
+
+    /**
+     * 获取订单配置详情
+     *
+     * @author fanzherong
+     * @date  2025/04/03 15:13
+     */
+    @Operation(summary = "获取订单配置详情")
+    @GetMapping("/biz/bizorderconfig/detail")
+    public CommonResult<BizOrderConfig> detail(@Valid BizOrderConfigIdParam bizOrderConfigIdParam) {
+        return CommonResult.data(bizOrderConfigService.detail(bizOrderConfigIdParam));
+    }
+}

+ 61 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorderconfig/entity/BizOrderConfig.java

@@ -0,0 +1,61 @@
+/*
+ * Copyright [2022] [https://www.xiaonuo.vip]
+ *
+ * Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
+ *
+ * 1.请不要删除和修改根目录下的LICENSE文件。
+ * 2.请不要删除和修改Snowy源码头部的版权声明。
+ * 3.本项目代码可免费商业使用,商业使用请保留源码和相关描述文件的项目出处,作者声明等。
+ * 4.分发源码时候,请注明软件出处 https://www.xiaonuo.vip
+ * 5.不可二次分发开源参与同类竞品,如有想法可联系团队xiaonuobase@qq.com商议合作。
+ * 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
+ */
+package vip.xiaonuo.biz.modular.bizorderconfig.entity;
+
+import com.baomidou.mybatisplus.annotation.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Getter;
+import lombok.Setter;
+import vip.xiaonuo.common.pojo.CommonEntity;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 订单配置实体
+ *
+ * @author fanzherong
+ * @date  2025/04/03 15:13
+ **/
+@Getter
+@Setter
+@TableName("biz_order_config")
+public class BizOrderConfig extends CommonEntity {
+
+    /** 主键ID */
+    @TableId
+    @Schema(description = "主键ID")
+    private String id;
+
+    /** 订单ID */
+    @Schema(description = "订单ID")
+    private String orderId;
+
+    /** 申请数量 */
+    @Schema(description = "申请数量")
+    private Integer applyNumber;
+
+    /** 已约数量 */
+    @Schema(description = "已约数量")
+    private Integer applyNumberAlready;
+
+    /**提货开始时间*/
+    @TableField(exist = false)
+    private String beginTime;
+
+    /**提货结束时间*/
+    @TableField(exist = false)
+    private String endTime;
+
+
+}

+ 34 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorderconfig/enums/BizOrderConfigEnum.java

@@ -0,0 +1,34 @@
+/*
+ * Copyright [2022] [https://www.xiaonuo.vip]
+ *
+ * Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
+ *
+ * 1.请不要删除和修改根目录下的LICENSE文件。
+ * 2.请不要删除和修改Snowy源码头部的版权声明。
+ * 3.本项目代码可免费商业使用,商业使用请保留源码和相关描述文件的项目出处,作者声明等。
+ * 4.分发源码时候,请注明软件出处 https://www.xiaonuo.vip
+ * 5.不可二次分发开源参与同类竞品,如有想法可联系团队xiaonuobase@qq.com商议合作。
+ * 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
+ */
+package vip.xiaonuo.biz.modular.bizorderconfig.enums;
+
+import lombok.Getter;
+
+/**
+ * 订单配置枚举
+ *
+ * @author fanzherong
+ * @date  2025/04/03 15:13
+ **/
+@Getter
+public enum BizOrderConfigEnum {
+
+    /** 测试 */
+    TEST("TEST");
+
+    private final String value;
+
+    BizOrderConfigEnum(String value) {
+        this.value = value;
+    }
+}

+ 31 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorderconfig/mapper/BizOrderConfigMapper.java

@@ -0,0 +1,31 @@
+/*
+ * Copyright [2022] [https://www.xiaonuo.vip]
+ *
+ * Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
+ *
+ * 1.请不要删除和修改根目录下的LICENSE文件。
+ * 2.请不要删除和修改Snowy源码头部的版权声明。
+ * 3.本项目代码可免费商业使用,商业使用请保留源码和相关描述文件的项目出处,作者声明等。
+ * 4.分发源码时候,请注明软件出处 https://www.xiaonuo.vip
+ * 5.不可二次分发开源参与同类竞品,如有想法可联系团队xiaonuobase@qq.com商议合作。
+ * 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
+ */
+package vip.xiaonuo.biz.modular.bizorderconfig.mapper;
+
+import cn.hutool.extra.qrcode.QrConfig;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import org.apache.ibatis.annotations.Param;
+import vip.xiaonuo.biz.modular.bizorderconfig.entity.BizOrderConfig;
+
+/**
+ * 订单配置Mapper接口
+ *
+ * @author fanzherong
+ * @date  2025/04/03 15:13
+ **/
+public interface BizOrderConfigMapper extends BaseMapper<BizOrderConfig> {
+
+    Page<BizOrderConfig> getConfig(@Param("page") Page<BizOrderConfig> page, @Param("ew") QueryWrapper<BizOrderConfig> ew);
+}

+ 18 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorderconfig/mapper/mapping/BizOrderConfigMapper.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="vip.xiaonuo.biz.modular.bizorderconfig.mapper.BizOrderConfigMapper">
+
+    <select id="getConfig" resultType="vip.xiaonuo.biz.modular.bizorderconfig.entity.BizOrderConfig">
+        select
+            boc.id,
+            boc.order_id,
+            boc.apply_number,
+            boc.apply_number_already,
+            bgc.CONF_START_TIME beginTime,
+            bgc.CONF_END_TIME endTime
+        from biz_order_config boc
+         left join biz_order bo on bo.id = boc.order_id
+         left join biz_goods_conf bgc on bgc.id = bo.delivery_time_id
+            ${ew.customSqlSegment}
+    </select>
+</mapper>

+ 47 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorderconfig/param/BizOrderConfigAddParam.java

@@ -0,0 +1,47 @@
+/*
+ * Copyright [2022] [https://www.xiaonuo.vip]
+ *
+ * Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
+ *
+ * 1.请不要删除和修改根目录下的LICENSE文件。
+ * 2.请不要删除和修改Snowy源码头部的版权声明。
+ * 3.本项目代码可免费商业使用,商业使用请保留源码和相关描述文件的项目出处,作者声明等。
+ * 4.分发源码时候,请注明软件出处 https://www.xiaonuo.vip
+ * 5.不可二次分发开源参与同类竞品,如有想法可联系团队xiaonuobase@qq.com商议合作。
+ * 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
+ */
+package vip.xiaonuo.biz.modular.bizorderconfig.param;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Getter;
+import lombok.Setter;
+
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 订单配置添加参数
+ *
+ * @author fanzherong
+ * @date  2025/04/03 15:13
+ **/
+@Getter
+@Setter
+public class BizOrderConfigAddParam {
+
+    /** 订单ID */
+    @Schema(description = "订单ID")
+    private String orderId;
+
+    /** 申请数量 */
+    @Schema(description = "申请数量", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotNull(message = "applyNumber不能为空")
+    private Integer applyNumber;
+
+    /** 已约数量 */
+    @Schema(description = "已约数量")
+    private Integer applyNumberAlready;
+
+}

+ 52 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorderconfig/param/BizOrderConfigEditParam.java

@@ -0,0 +1,52 @@
+/*
+ * Copyright [2022] [https://www.xiaonuo.vip]
+ *
+ * Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
+ *
+ * 1.请不要删除和修改根目录下的LICENSE文件。
+ * 2.请不要删除和修改Snowy源码头部的版权声明。
+ * 3.本项目代码可免费商业使用,商业使用请保留源码和相关描述文件的项目出处,作者声明等。
+ * 4.分发源码时候,请注明软件出处 https://www.xiaonuo.vip
+ * 5.不可二次分发开源参与同类竞品,如有想法可联系团队xiaonuobase@qq.com商议合作。
+ * 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
+ */
+package vip.xiaonuo.biz.modular.bizorderconfig.param;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Getter;
+import lombok.Setter;
+
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 订单配置编辑参数
+ *
+ * @author fanzherong
+ * @date  2025/04/03 15:13
+ **/
+@Getter
+@Setter
+public class BizOrderConfigEditParam {
+
+    /** 主键ID */
+    @Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotBlank(message = "id不能为空")
+    private String id;
+
+    /** 订单ID */
+    @Schema(description = "订单ID")
+    private String orderId;
+
+    /** 申请数量 */
+    @Schema(description = "申请数量", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotNull(message = "applyNumber不能为空")
+    private Integer applyNumber;
+
+    /** 已约数量 */
+    @Schema(description = "已约数量")
+    private Integer applyNumberAlready;
+
+}

+ 35 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorderconfig/param/BizOrderConfigIdParam.java

@@ -0,0 +1,35 @@
+/*
+ * Copyright [2022] [https://www.xiaonuo.vip]
+ *
+ * Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
+ *
+ * 1.请不要删除和修改根目录下的LICENSE文件。
+ * 2.请不要删除和修改Snowy源码头部的版权声明。
+ * 3.本项目代码可免费商业使用,商业使用请保留源码和相关描述文件的项目出处,作者声明等。
+ * 4.分发源码时候,请注明软件出处 https://www.xiaonuo.vip
+ * 5.不可二次分发开源参与同类竞品,如有想法可联系团队xiaonuobase@qq.com商议合作。
+ * 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
+ */
+package vip.xiaonuo.biz.modular.bizorderconfig.param;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Getter;
+import lombok.Setter;
+
+import jakarta.validation.constraints.NotBlank;
+
+/**
+ * 订单配置Id参数
+ *
+ * @author fanzherong
+ * @date  2025/04/03 15:13
+ **/
+@Getter
+@Setter
+public class BizOrderConfigIdParam {
+
+    /** 主键ID */
+    @Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotBlank(message = "id不能为空")
+    private String id;
+}

+ 53 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorderconfig/param/BizOrderConfigPageParam.java

@@ -0,0 +1,53 @@
+/*
+ * Copyright [2022] [https://www.xiaonuo.vip]
+ *
+ * Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
+ *
+ * 1.请不要删除和修改根目录下的LICENSE文件。
+ * 2.请不要删除和修改Snowy源码头部的版权声明。
+ * 3.本项目代码可免费商业使用,商业使用请保留源码和相关描述文件的项目出处,作者声明等。
+ * 4.分发源码时候,请注明软件出处 https://www.xiaonuo.vip
+ * 5.不可二次分发开源参与同类竞品,如有想法可联系团队xiaonuobase@qq.com商议合作。
+ * 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
+ */
+package vip.xiaonuo.biz.modular.bizorderconfig.param;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Getter;
+import lombok.Setter;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 订单配置查询参数
+ *
+ * @author fanzherong
+ * @date  2025/04/03 15:13
+ **/
+@Getter
+@Setter
+public class BizOrderConfigPageParam {
+
+    /** 当前页 */
+    @Schema(description = "当前页码")
+    private Integer current;
+
+    /** 每页条数 */
+    @Schema(description = "每页条数")
+    private Integer size;
+
+    /** 排序字段 */
+    @Schema(description = "排序字段,字段驼峰名称,如:userName")
+    private String sortField;
+
+    /** 排序方式 */
+    @Schema(description = "排序方式,升序:ASCEND;降序:DESCEND")
+    private String sortOrder;
+
+    /** 关键词 */
+    @Schema(description = "关键词")
+    private String searchKey;
+
+    private String orderId;
+
+}

+ 85 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorderconfig/service/BizOrderConfigService.java

@@ -0,0 +1,85 @@
+/*
+ * Copyright [2022] [https://www.xiaonuo.vip]
+ *
+ * Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
+ *
+ * 1.请不要删除和修改根目录下的LICENSE文件。
+ * 2.请不要删除和修改Snowy源码头部的版权声明。
+ * 3.本项目代码可免费商业使用,商业使用请保留源码和相关描述文件的项目出处,作者声明等。
+ * 4.分发源码时候,请注明软件出处 https://www.xiaonuo.vip
+ * 5.不可二次分发开源参与同类竞品,如有想法可联系团队xiaonuobase@qq.com商议合作。
+ * 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
+ */
+package vip.xiaonuo.biz.modular.bizorderconfig.service;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.IService;
+import vip.xiaonuo.biz.modular.bizorderconfig.entity.BizOrderConfig;
+import vip.xiaonuo.biz.modular.bizorderconfig.param.BizOrderConfigAddParam;
+import vip.xiaonuo.biz.modular.bizorderconfig.param.BizOrderConfigEditParam;
+import vip.xiaonuo.biz.modular.bizorderconfig.param.BizOrderConfigIdParam;
+import vip.xiaonuo.biz.modular.bizorderconfig.param.BizOrderConfigPageParam;
+
+import java.util.List;
+
+/**
+ * 订单配置Service接口
+ *
+ * @author fanzherong
+ * @date  2025/04/03 15:13
+ **/
+public interface BizOrderConfigService extends IService<BizOrderConfig> {
+
+    /**
+     * 获取订单配置分页
+     *
+     * @author fanzherong
+     * @date  2025/04/03 15:13
+     */
+    Page<BizOrderConfig> page(BizOrderConfigPageParam bizOrderConfigPageParam);
+
+    /**
+     * 添加订单配置
+     *
+     * @author fanzherong
+     * @date  2025/04/03 15:13
+     */
+    void add(BizOrderConfigAddParam bizOrderConfigAddParam);
+
+    /**
+     * 编辑订单配置
+     *
+     * @author fanzherong
+     * @date  2025/04/03 15:13
+     */
+    void edit(BizOrderConfigEditParam bizOrderConfigEditParam);
+
+    /**
+     * 删除订单配置
+     *
+     * @author fanzherong
+     * @date  2025/04/03 15:13
+     */
+    void delete(List<BizOrderConfigIdParam> bizOrderConfigIdParamList);
+
+    /**
+     * 获取订单配置详情
+     *
+     * @author fanzherong
+     * @date  2025/04/03 15:13
+     */
+    BizOrderConfig detail(BizOrderConfigIdParam bizOrderConfigIdParam);
+
+    /**
+     * 获取订单配置详情
+     *
+     * @author fanzherong
+     * @date  2025/04/03 15:13
+     **/
+    BizOrderConfig queryEntity(String id);
+
+    /**
+     * 查询订单扫码次数配置
+     */
+    Page<BizOrderConfig> getConfig(BizOrderConfigIdParam bizOrderConfigIdParam);
+}

+ 106 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorderconfig/service/impl/BizOrderConfigServiceImpl.java

@@ -0,0 +1,106 @@
+/*
+ * Copyright [2022] [https://www.xiaonuo.vip]
+ *
+ * Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
+ *
+ * 1.请不要删除和修改根目录下的LICENSE文件。
+ * 2.请不要删除和修改Snowy源码头部的版权声明。
+ * 3.本项目代码可免费商业使用,商业使用请保留源码和相关描述文件的项目出处,作者声明等。
+ * 4.分发源码时候,请注明软件出处 https://www.xiaonuo.vip
+ * 5.不可二次分发开源参与同类竞品,如有想法可联系团队xiaonuobase@qq.com商议合作。
+ * 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
+ */
+package vip.xiaonuo.biz.modular.bizorderconfig.service.impl;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.collection.CollStreamUtil;
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import vip.xiaonuo.common.enums.CommonSortOrderEnum;
+import vip.xiaonuo.common.exception.CommonException;
+import vip.xiaonuo.common.page.CommonPageRequest;
+import vip.xiaonuo.biz.modular.bizorderconfig.entity.BizOrderConfig;
+import vip.xiaonuo.biz.modular.bizorderconfig.mapper.BizOrderConfigMapper;
+import vip.xiaonuo.biz.modular.bizorderconfig.param.BizOrderConfigAddParam;
+import vip.xiaonuo.biz.modular.bizorderconfig.param.BizOrderConfigEditParam;
+import vip.xiaonuo.biz.modular.bizorderconfig.param.BizOrderConfigIdParam;
+import vip.xiaonuo.biz.modular.bizorderconfig.param.BizOrderConfigPageParam;
+import vip.xiaonuo.biz.modular.bizorderconfig.service.BizOrderConfigService;
+
+import java.util.List;
+
+/**
+ * 订单配置Service接口实现类
+ *
+ * @author fanzherong
+ * @date  2025/04/03 15:13
+ **/
+@Service
+public class BizOrderConfigServiceImpl extends ServiceImpl<BizOrderConfigMapper, BizOrderConfig> implements BizOrderConfigService {
+
+    @Override
+    public Page<BizOrderConfig> page(BizOrderConfigPageParam bizOrderConfigPageParam) {
+        QueryWrapper<BizOrderConfig> queryWrapper = new QueryWrapper<>();
+        if(ObjectUtil.isNotEmpty(bizOrderConfigPageParam.getOrderId())){
+            queryWrapper.eq("boc.order_id",bizOrderConfigPageParam.getOrderId());
+        }
+        queryWrapper.eq("boc.delete_flag","NOT_DELETE");
+        Page<BizOrderConfig> config = this.getBaseMapper().getConfig(CommonPageRequest.defaultPage(), queryWrapper);
+        return config;
+    }
+
+    @Transactional(rollbackFor = Exception.class)
+    @Override
+    public void add(BizOrderConfigAddParam bizOrderConfigAddParam) {
+        //根据订单id查询是否添加过
+        long count = this.count(new QueryWrapper<BizOrderConfig>().lambda().eq(BizOrderConfig::getOrderId, bizOrderConfigAddParam.getOrderId()));
+        if(count>0){
+            throw new CommonException("扫码次数配置已添加,无需重复添加!");
+        }
+        BizOrderConfig bizOrderConfig = BeanUtil.toBean(bizOrderConfigAddParam, BizOrderConfig.class);
+        this.save(bizOrderConfig);
+    }
+
+    @Transactional(rollbackFor = Exception.class)
+    @Override
+    public void edit(BizOrderConfigEditParam bizOrderConfigEditParam) {
+        BizOrderConfig bizOrderConfig = this.queryEntity(bizOrderConfigEditParam.getId());
+        BeanUtil.copyProperties(bizOrderConfigEditParam, bizOrderConfig);
+        this.updateById(bizOrderConfig);
+    }
+
+    @Transactional(rollbackFor = Exception.class)
+    @Override
+    public void delete(List<BizOrderConfigIdParam> bizOrderConfigIdParamList) {
+        // 执行删除
+        this.removeByIds(CollStreamUtil.toList(bizOrderConfigIdParamList, BizOrderConfigIdParam::getId));
+    }
+
+    @Override
+    public BizOrderConfig detail(BizOrderConfigIdParam bizOrderConfigIdParam) {
+        return this.queryEntity(bizOrderConfigIdParam.getId());
+    }
+
+    @Override
+    public BizOrderConfig queryEntity(String id) {
+        BizOrderConfig bizOrderConfig = this.getById(id);
+        if(ObjectUtil.isEmpty(bizOrderConfig)) {
+            throw new CommonException("订单配置不存在,id值为:{}", id);
+        }
+        return bizOrderConfig;
+    }
+
+    @Override
+    public Page<BizOrderConfig> getConfig(BizOrderConfigIdParam bizOrderConfigIdParam) {
+        QueryWrapper<BizOrderConfig> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("boc.order_id",bizOrderConfigIdParam.getId()).
+                eq("boc.delete_flag","NOT_DELETE");
+        Page<BizOrderConfig> config = this.getBaseMapper().getConfig(CommonPageRequest.defaultPage(), queryWrapper);
+        return config;
+    }
+}

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

@@ -112,4 +112,7 @@ public class BizRecordPageParam {
     /**客户名称*/
     private String customerName;
 
+    /**订单id*/
+    private String orderId;
+
 }

+ 19 - 2
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/service/impl/BizRecordServiceImpl.java

@@ -12,6 +12,7 @@
  */
 package vip.xiaonuo.biz.modular.record.service.impl;
 
+import cn.dev33.satoken.stp.StpUtil;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.collection.CollStreamUtil;
 import cn.hutool.core.date.DatePattern;
@@ -30,10 +31,12 @@ import com.alibaba.excel.write.style.HorizontalCellStyleStrategy;
 import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy;
 import com.alibaba.excel.write.style.row.AbstractRowHeightStyleStrategy;
 import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.google.common.collect.Maps;
 import jakarta.annotation.Resource;
 import jakarta.servlet.http.HttpServletResponse;
 import org.apache.commons.lang3.StringUtils;
@@ -97,6 +100,9 @@ public class BizRecordServiceImpl extends ServiceImpl<BizRecordMapper, BizRecord
         if (ObjectUtil.isNotEmpty(bizRecordPageParam.getLicensePlate())) {
             queryWrapper.like("br.LICENSE_PLATE", bizRecordPageParam.getLicensePlate());
         }
+        if (ObjectUtil.isNotEmpty(bizRecordPageParam.getCarNumber())){
+            queryWrapper.like("br.CAR_NUMBER",bizRecordPageParam.getCarNumber());
+        }
         if (ObjectUtil.isNotEmpty(bizRecordPageParam.getStartGrossTime()) && ObjectUtil.isNotEmpty(bizRecordPageParam.getEndGrossTime())) {
             queryWrapper.between("br.GROSS_TIME", bizRecordPageParam.getStartGrossTime()+ " 00:00:00", bizRecordPageParam.getEndGrossTime()+" 23:59:59");
         }
@@ -136,6 +142,14 @@ public class BizRecordServiceImpl extends ServiceImpl<BizRecordMapper, BizRecord
         if (ObjectUtil.isNotEmpty(bizRecordPageParam.getCustomerName())){
             queryWrapper.like("bc.customer_name",bizRecordPageParam.getCustomerName());
         }
+        if (ObjectUtil.isNotEmpty(bizRecordPageParam.getOrderId())){
+            queryWrapper.eq("br.order_id",bizRecordPageParam.getOrderId());
+        }
+        // 校验数据范围
+        List<String> loginUserDataScope = StpLoginUserUtil.getLoginUserDataScope();
+        if(ObjectUtil.isEmpty(loginUserDataScope)) {
+            queryWrapper.eq("br.appointment_user", StpUtil.getLoginIdAsString());
+        }
         queryWrapper.eq("br.DELETE_FLAG","NOT_DELETE");
         queryWrapper.orderByDesc("br.create_time");
         return queryWrapper;
@@ -533,7 +547,7 @@ public class BizRecordServiceImpl extends ServiceImpl<BizRecordMapper, BizRecord
     public void updateDriverSign(BizRecordEditParam bizRecordEditParam) {
         BizRecord bizRecord = this.queryEntity(bizRecordEditParam.getId());
         if(ObjectUtil.isEmpty(bizRecordEditParam.getDriverSign())){
-            throw new CommonException("司机签名不能为空!");
+            throw new CommonException("签名不能为空!");
         }
         String driverSign = bizRecordEditParam.getDriverSign();
         if(bizRecordEditParam.getDriverSign().contains(StrUtil.COMMA)) {
@@ -553,8 +567,11 @@ public class BizRecordServiceImpl extends ServiceImpl<BizRecordMapper, BizRecord
             bizAppointmentRecordService.updateById(appointmentRecord);
         }
 
+        Map<String,Object> map = Maps.newHashMap();
+        map.put("id",bizRecord.getRelationId());
+        map.put("type","0");
         //mqtt发送过磅记录id给地磅端,告诉地磅端可打印磅单,抬道闸
-        mqttSubscribeClient.publishMessage("hnzydb", bizRecord.getRelationId());
+        mqttSubscribeClient.publishMessage("hnzydb", JSONObject.toJSONString(map));
 
     }
 }

+ 29 - 16
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/task/AppointmentCallTask.java

@@ -5,11 +5,15 @@ import cn.hutool.core.util.ObjectUtil;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import jakarta.annotation.Resource;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Component;
 import vip.xiaonuo.biz.modular.bizappointmentrecord.entity.BizAppointmentRecord;
+import vip.xiaonuo.biz.modular.bizappointmentrecord.mapper.BizAppointmentRecordMapper;
 import vip.xiaonuo.biz.modular.bizappointmentrecord.service.BizAppointmentRecordService;
 import vip.xiaonuo.biz.modular.bizappointmenttime.entity.BizAppointmentTime;
 import vip.xiaonuo.biz.modular.bizappointmenttime.service.BizAppointmentTimeService;
+import vip.xiaonuo.biz.modular.bizconfig.entity.BizConfig;
+import vip.xiaonuo.biz.modular.bizconfig.service.BizConfigService;
 import vip.xiaonuo.common.timer.CommonTimerTaskRunner;
 
 import java.util.List;
@@ -22,27 +26,36 @@ public class AppointmentCallTask implements CommonTimerTaskRunner {
     private BizAppointmentTimeService bizAppointmentTimeService;
     @Resource
     private BizAppointmentRecordService bizAppointmentRecordService;
+    @Resource
+    private BizAppointmentRecordMapper bizAppointmentRecordMapper;
+    @Resource
+    private BizConfigService bizConfigService;
 
     @Override
     public void action(String extJson) {
-        String format = DateUtil.format(DateUtil.date(), "HH:mm");
-        //查询当前时间点属于时间段
-        BizAppointmentTime bizAppointmentTime = bizAppointmentTimeService.getOne(new QueryWrapper<BizAppointmentTime>().lambda().
-                le(BizAppointmentTime::getBeginTime,format).
-                gt(BizAppointmentTime::getFinishTime,format).
-                last("limit 1"));
-        if(ObjectUtil.isNotNull(bizAppointmentTime)){
-            //根据时间段查询排队中的预约记录
-            BizAppointmentRecord record = bizAppointmentRecordService.getOne(new QueryWrapper<BizAppointmentRecord>().lambda().
-                    eq(BizAppointmentRecord::getTimeId, bizAppointmentTime.getId()).
-                    eq(BizAppointmentRecord::getStatus,"3").
-                    orderByAsc(BizAppointmentRecord::getCreateTime).
-                    last("limit 1"));
-            if(ObjectUtil.isNotNull(record)){
-                record.setStatus("4");
+        String format = DateUtil.format(DateUtil.date(), "yyyy-MM-dd HH:mm:ss");
+        //根据时间段查询排队中的预约记录
+        QueryWrapper<BizAppointmentRecord> queryWrapper = new QueryWrapper<>();
+        queryWrapper.le("bgc.CONF_START_TIME",format)
+                .gt("bgc.CONF_END_TIME",format)
+                .eq("bar.STATUS","3")
+                .eq("bar.delete_flag","NOT_DELETE")
+                .orderByAsc("bar.create_time")
+                .last("limit 1");
+        List<BizAppointmentRecord> list = bizAppointmentRecordMapper.getRecord(queryWrapper);
+        BizConfig bizConfig = bizConfigService.getOne(new QueryWrapper<BizConfig>().lambda().last("limit 1"));
+        if(ObjectUtil.isNotEmpty(list)){
+            for(BizAppointmentRecord record : list){
+                if(StringUtils.equals(bizConfig.getAccessControlSwitch(),"1")){
+                    //开启门禁校验
+                    record.setStatus("4");
+                }else{
+                    record.setStatus("5");
+                }
                 bizAppointmentRecordService.updateById(record);
-                log.info("车牌号:"+record.getLicenseNumber()+"在("+bizAppointmentTime.getBeginTime()+"~"+bizAppointmentTime.getEndTime()+")时间段内叫号成功!");
+                log.info("车牌号:"+record.getLicenseNumber()+"在("+record.getBeginTime()+"~"+record.getEndTime()+")时间段内叫号成功!");
             }
         }
+
     }
 }

+ 16 - 15
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/task/AppointmentTimeOutTask.java

@@ -6,6 +6,7 @@ import jakarta.annotation.Resource;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
 import vip.xiaonuo.biz.modular.bizappointmentrecord.entity.BizAppointmentRecord;
+import vip.xiaonuo.biz.modular.bizappointmentrecord.mapper.BizAppointmentRecordMapper;
 import vip.xiaonuo.biz.modular.bizappointmentrecord.service.BizAppointmentRecordService;
 import vip.xiaonuo.biz.modular.bizappointmenttime.entity.BizAppointmentTime;
 import vip.xiaonuo.biz.modular.bizappointmenttime.service.BizAppointmentTimeService;
@@ -21,24 +22,24 @@ public class AppointmentTimeOutTask implements CommonTimerTaskRunner {
     private BizAppointmentTimeService bizAppointmentTimeService;
     @Resource
     private BizAppointmentRecordService bizAppointmentRecordService;
+    @Resource
+    private BizAppointmentRecordMapper bizAppointmentRecordMapper;
 
     @Override
     public void action(String extJson) {
-        String format = DateUtil.format(DateUtil.date(), "HH:mm");
-        //查询当前时间点之前的预约时段
-        List<BizAppointmentTime> timeList = bizAppointmentTimeService.list(new QueryWrapper<BizAppointmentTime>().lambda().
-                lt(BizAppointmentTime::getFinishTime, format));
-        for(BizAppointmentTime bizAppointmentTime : timeList){
-            //根据时间段查询还未入场预约记录
-            List<BizAppointmentRecord> recordList = bizAppointmentRecordService.list(new QueryWrapper<BizAppointmentRecord>().lambda().
-                    eq(BizAppointmentRecord::getTimeId, bizAppointmentTime.getId()).
-                    in(BizAppointmentRecord::getStatus,"1","2","3","4"));
-            for(BizAppointmentRecord bizAppointmentRecord : recordList){
-                //超期作废
-                bizAppointmentRecord.setStatus("15");
-                bizAppointmentRecordService.updateById(bizAppointmentRecord);
-                log.info("车牌号:"+bizAppointmentRecord.getLicenseNumber()+"的预约记录超期作废成功!");
-            }
+        String format = DateUtil.format(DateUtil.date(), "yyyy-MM-dd HH:mm:ss");
+        //根据时间段查询还未入场预约记录
+        QueryWrapper<BizAppointmentRecord> queryWrapper = new QueryWrapper<>();
+        queryWrapper.lt("bgc.CONF_END_TIME",format)
+                .in("bar.STATUS","1","2","3","4")
+                .eq("bar.delete_flag","NOT_DELETE");
+        List<BizAppointmentRecord> recordList = bizAppointmentRecordMapper.getRecord(queryWrapper);
+        for(BizAppointmentRecord bizAppointmentRecord : recordList){
+            //超期作废
+            bizAppointmentRecord.setStatus("15");
+            bizAppointmentRecordService.updateById(bizAppointmentRecord);
+            log.info("车牌号:"+bizAppointmentRecord.getLicenseNumber()+"的预约记录超期作废成功!");
         }
+
     }
 }

+ 3 - 0
snowy-web-app/src/main/java/vip/xiaonuo/core/config/GlobalConfigure.java

@@ -157,6 +157,9 @@ public class GlobalConfigure implements WebMvcConfigurer {
             "/biz/record/push",
             "/biz/record/edit",
 
+            /*小程序注册账号*/
+            "/biz/user/miniAdd",
+
             /*用友推送客户接口*/
             "/biz/customer/yongAdd"
     };