Przeglądaj źródła

Merge remote-tracking branch 'origin/master'

xuchao 3 tygodni temu
rodzic
commit
da6749d6e6
100 zmienionych plików z 2759 dodań i 410 usunięć
  1. 1 0
      snowy-admin-web/package.json
  2. 4 0
      snowy-admin-web/src/api/biz/bizAppointmentRecordApi.js
  3. 1 1
      snowy-admin-web/src/api/biz/bizAppointmentTimeApi.js
  4. 11 1
      snowy-admin-web/src/api/biz/bizOrderApi.js
  5. 4 3
      snowy-admin-web/src/components/XnSignName/index.vue
  6. 7 0
      snowy-admin-web/src/views/biz/bizaccessrecord/detail.vue
  7. 24 1
      snowy-admin-web/src/views/biz/bizappointmentrecord/detail.vue
  8. 67 18
      snowy-admin-web/src/views/biz/bizappointmentrecord/index.vue
  9. 159 0
      snowy-admin-web/src/views/biz/bizappointmentrecord/sign.vue
  10. 13 2
      snowy-admin-web/src/views/biz/bizconfig/form.vue
  11. 10 2
      snowy-admin-web/src/views/biz/bizconfig/index.vue
  12. 1 1
      snowy-admin-web/src/views/biz/bizexcessconfig/form.vue
  13. 1 1
      snowy-admin-web/src/views/biz/bizexcessconfig/index.vue
  14. 2 0
      snowy-admin-web/src/views/biz/bizorder/detail.vue
  15. 23 4
      snowy-admin-web/src/views/biz/bizorder/flow.vue
  16. 22 17
      snowy-admin-web/src/views/biz/bizorder/form.vue
  17. 28 8
      snowy-admin-web/src/views/biz/bizorder/index.vue
  18. 19 16
      snowy-admin-web/src/views/biz/bizqueuerecord/index.vue
  19. 18 4
      snowy-admin-web/src/views/biz/bizsaleorder/form.vue
  20. 4 4
      snowy-admin-web/src/views/biz/bizsaleorder/index.vue
  21. 52 8
      snowy-admin-web/src/views/biz/bizsendrecord/detail.vue
  22. 38 28
      snowy-admin-web/src/views/biz/bizsendrecord/index.vue
  23. 3 3
      snowy-admin-web/src/views/biz/bizvehicle/index.vue
  24. 30 23
      snowy-admin-web/src/views/biz/count/goodsindex.vue
  25. 171 0
      snowy-admin-web/src/views/biz/count/orderplan.vue
  26. 27 25
      snowy-admin-web/src/views/biz/count/recordindex.vue
  27. 172 0
      snowy-admin-web/src/views/biz/count/vehicle.vue
  28. 28 11
      snowy-admin-web/src/views/biz/customer/accountIndex.vue
  29. 31 19
      snowy-admin-web/src/views/biz/customer/index.vue
  30. 2 2
      snowy-admin-web/src/views/biz/goods/index.vue
  31. 4 1
      snowy-admin-web/src/views/biz/goodsConf/addForm.vue
  32. 5 1
      snowy-admin-web/src/views/biz/goodsConf/editForm.vue
  33. 46 27
      snowy-admin-web/src/views/biz/goodsConf/index.vue
  34. 15 7
      snowy-admin-web/src/views/biz/goodsConf/weightForm.vue
  35. 24 14
      snowy-admin-web/src/views/biz/record/detail.vue
  36. 14 14
      snowy-admin-web/src/views/biz/record/index.vue
  37. 7 5
      snowy-admin-web/src/views/biz/supplier/index.vue
  38. 6 0
      snowy-common/src/main/java/vip/xiaonuo/common/prop/CommonProperties.java
  39. 7 0
      snowy-plugin-api/snowy-plugin-auth-api/src/main/java/vip/xiaonuo/auth/core/pojo/SaBaseLoginUser.java
  40. 54 5
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/api/controller/ApiController.java
  41. 39 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/api/param/WechatTemplateMsg.java
  42. 116 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/api/param/WeiXinRes.java
  43. 23 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/api/param/WxUserMsgParam.java
  44. 16 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/api/param/WxUserParam.java
  45. 126 3
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/api/service/ApiService.java
  46. 12 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/controller/BizAppointmentRecordController.java
  47. 32 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/entity/BizAppointmentRecord.java
  48. 3 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/mapper/BizAppointmentRecordMapper.java
  49. 47 2
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/mapper/mapping/BizAppointmentRecordMapper.xml
  50. 11 2
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/param/BizAppointmentExportResult.java
  51. 4 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/param/BizAppointmentRecordPageParam.java
  52. 6 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/service/BizAppointmentRecordService.java
  53. 148 22
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/service/impl/BizAppointmentRecordServiceImpl.java
  54. 3 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizconfig/entity/BizConfig.java
  55. 3 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizconfig/param/BizConfigAddParam.java
  56. 3 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizconfig/param/BizConfigEditParam.java
  57. 1 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizexcessconfig/entity/BizExcessConfig.java
  58. 1 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizexcessconfig/param/BizExcessConfigAddParam.java
  59. 1 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizexcessconfig/param/BizExcessConfigEditParam.java
  60. 8 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizexcessconfig/service/impl/BizExcessConfigServiceImpl.java
  61. 19 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorder/controller/BizOrderController.java
  62. 4 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorder/entity/BizOrder.java
  63. 4 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorder/mapper/BizOrderMapper.java
  64. 28 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorder/mapper/mapping/BizOrderMapper.xml
  65. 42 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorder/param/BizOrderExportTotal.java
  66. 6 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorder/service/BizOrderService.java
  67. 87 14
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorder/service/impl/BizOrderServiceImpl.java
  68. 3 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorderconfig/service/impl/BizOrderConfigServiceImpl.java
  69. 3 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizsaleorder/entity/BizSaleOrder.java
  70. 2 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizsaleorder/mapper/mapping/BizSaleOrderMapper.xml
  71. 3 5
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizsaleorder/param/BizSaleOrderAddParam.java
  72. 3 5
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizsaleorder/param/BizSaleOrderEditParam.java
  73. 19 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizsaleorder/service/impl/BizSaleOrderServiceImpl.java
  74. 7 5
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizvehicle/service/impl/BizVehicleServiceImpl.java
  75. 1 2
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/customer/param/BizCustomerAddParam.java
  76. 4 3
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/goodsConf/entity/BizGoodsConf.java
  77. 2 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/goodsConf/param/BizGoodsConfEditParam.java
  78. 0 4
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/goodsConf/param/BizGoodsConfPageParam.java
  79. 2 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/goodsConf/service/BizGoodsConfService.java
  80. 14 10
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/goodsConf/service/impl/BizGoodsConfServiceImpl.java
  81. 123 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/oawxsendlog/controller/OaWxSendLogController.java
  82. 51 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/oawxsendlog/entity/OaWxSendLog.java
  83. 34 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/oawxsendlog/enums/OaWxSendLogEnum.java
  84. 25 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/oawxsendlog/mapper/OaWxSendLogMapper.java
  85. 5 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/oawxsendlog/mapper/mapping/OaWxSendLogMapper.xml
  86. 44 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/oawxsendlog/param/OaWxSendLogAddParam.java
  87. 48 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/oawxsendlog/param/OaWxSendLogEditParam.java
  88. 33 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/oawxsendlog/param/OaWxSendLogIdParam.java
  89. 45 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/oawxsendlog/param/OaWxSendLogPageParam.java
  90. 80 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/oawxsendlog/service/OaWxSendLogService.java
  91. 94 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/oawxsendlog/service/impl/OaWxSendLogServiceImpl.java
  92. 4 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/entity/BizRecord.java
  93. 52 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/mapper/mapping/BizRecordMapper.xml
  94. 3 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/param/BizRecordPageParam.java
  95. 39 22
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/result/BizRecordExportResult.java
  96. 6 12
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/result/GoodsResult.java
  97. 45 8
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/service/impl/BizRecordServiceImpl.java
  98. 7 3
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/supplier/param/BizSupplierPageParam.java
  99. 5 2
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/supplier/service/impl/BizSupplierServiceImpl.java
  100. 5 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/task/AppointmentCallTask.java

+ 1 - 0
snowy-admin-web/package.json

@@ -38,6 +38,7 @@
 		"fuse.js": "7.0.0",
 		"highlight.js": "11.10.0",
 		"hotkeys-js": "3.13.7",
+		"html2canvas": "^1.4.1",
 		"js-pinyin": "0.2.7",
 		"lodash-es": "4.17.21",
 		"moment": "^2.30.1",

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

@@ -42,5 +42,9 @@ export default {
 	//调整订单
 	adjustOrder(data){
 		return request('adjustOrder',data)
+	},
+	//车辆执行状态分析
+	gerVehicleTotal(data){
+		return request('gerVehicleTotal',data,'get')
 	}
 }

+ 1 - 1
snowy-admin-web/src/api/biz/bizAppointmentTimeApi.js

@@ -28,5 +28,5 @@ export default {
 	//获取预约时段下拉列表
 	getDownList(data){
 		return request('getDownList',data,'get')
-	}
+	},
 }

+ 11 - 1
snowy-admin-web/src/api/biz/bizOrderApi.js

@@ -62,5 +62,15 @@ export default {
 	//提交
 	submit(data){
 		return request('submit',data)
-	}
+	},
+	//订单计划分析
+	getOrderTotal(data){
+		return request('getOrderTotal',data,'get')
+	},
+	//导出
+	exportRecordTotal(data){
+		return request('exportRecordTotal', data, 'get', {
+			responseType: 'blob'
+		})
+	},
 }

+ 4 - 3
snowy-admin-web/src/components/XnSignName/index.vue

@@ -53,23 +53,24 @@
 	import VueEsign from './vueEsign.vue'
 	const visible = ref(false)
 	const esignRef = ref(false)
-	const resultImg = ref('')
+	const resultImg = ref('https://db.js-whzl.com:8055/preview/zhdbbucket/hnzy/20250412/plateName/17444643281127352.null')
 	const isCrop = ref(false)
 	const lineWidth = ref(10)
 	const lineColor = ref('#000000')
 	const bgColor = ref('')
 	const props = defineProps(['image'])
 	// eslint-disable-next-line vue/no-setup-props-destructure
-	resultImg.value = props.image
+	//resultImg.value = props.image
 	const emit = defineEmits({ successful: null })
 	const recordId = ref()
 	const show = (id) => {
 		visible.value = true
 		recordId.value = id
+		handleReset()
 	}
 	const handleReset = () => {
 		esignRef.value.reset()
-		resultImg.value = ''
+		resultImg.value = 'https://db.js-whzl.com:8055/preview/zhdbbucket/hnzy/20250412/plateName/17444643281127352.null'
 	}
 	const handleGenerate = () => {
 		esignRef.value

+ 7 - 0
snowy-admin-web/src/views/biz/bizaccessrecord/detail.vue

@@ -56,6 +56,7 @@
 
 <script setup name="recordDoubleForm">
 	import { cloneDeep } from 'lodash-es'
+	import sysConfig from "@/config";
 	// 默认是关闭状态
 	const visible = ref(false)
 	const formData = ref({})
@@ -80,6 +81,12 @@
 		if(record){
 			let recordData = cloneDeep(record)
 			formData.value = Object.assign({}, recordData)
+			if(formData.value.cloudPlateName.includes("http://db.js-whzl.com:8065")){
+				formData.value.cloudPlateName = formData.value.cloudPlateName.replace("http://db.js-whzl.com:8065/preview/",sysConfig.PREVIEW_PATH)
+			}
+			if(formData.value.cloudLicenseName.includes("http://db.js-whzl.com:8065")){
+				formData.value.cloudLicenseName = formData.value.cloudLicenseName.replace("http://db.js-whzl.com:8065/preview/",sysConfig.PREVIEW_PATH)
+			}
 		}
 
 	}

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

@@ -50,7 +50,19 @@
 						{{ $TOOL.dictTypeData('appointment_status', formData.status) }}
 					</a-tag>
 				</a-descriptions-item>
-				<a-descriptions-item label="审核备注" :span="2">{{ formData.appointmentReason }}</a-descriptions-item>
+				<a-descriptions-item label="审核备注" :span="4">{{ formData.appointmentReason }}</a-descriptions-item>
+				<a-descriptions-item label="司机确认" :span="4">
+					<a-image :width="200" :src="formData.driverSign" />
+				</a-descriptions-item>
+				<a-descriptions-item label="卸货重量(吨)" :span="4">{{ formData.unloadWeight }}</a-descriptions-item>
+				<a-descriptions-item label="司机回签" :span="4">
+					<div v-for="(item,index) in fileList " :key="item.value">
+						<a-image :width="200" :src="item.url" />
+					</div>
+				</a-descriptions-item>
+				<a-descriptions-item label="签收审核" :span="4" v-if="formData.auditSign!=null && formData.auditSign!=''">
+					<a-image :width="200" :src="formData.auditSign" />
+				</a-descriptions-item>
 			</a-descriptions>
 		</a-form>
 	</xn-form-container>
@@ -58,6 +70,7 @@
 
 <script setup name="recordDoubleForm">
 	import { cloneDeep } from 'lodash-es'
+	import sysConfig from "@/config";
 	// 默认是关闭状态
 	const visible = ref(false)
 	const formData = ref({})
@@ -75,6 +88,7 @@
 	const labelCol8 = ref({span: 8, style: 'width: 26%; line-height: 20px; white-space: normal',})
 	const wrapperCol20 = ref({span: 20})
 
+	const fileList = ref([])
 	// 打开抽屉
 	const onOpen = (record) => {
 		visible.value = true
@@ -82,6 +96,15 @@
 		if(record){
 			let recordData = cloneDeep(record)
 			formData.value = Object.assign({}, recordData)
+			fileList.value = []
+			if(formData.value.unloadImg!=null){
+				for (var i=0;i<formData.value.unloadImg.split(',').length;i++){
+					fileList.value.push({
+						name: formData.value.unloadName.split(',')[i],
+						url:sysConfig.PREVIEW_PATH + formData.value.unloadImg.split(',')[i]
+					})
+				}
+			}
 		}
 
 	}

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

@@ -94,7 +94,11 @@
 					</div>
 				</template>
 				<template v-if="column.dataIndex === 'timeInfo'">
-					<span>{{record.beginTime + '~' + record.endTime}}</span>
+<!--					<span>{{record.beginTime + '~' + record.endTime}}</span>-->
+					<div class="time-list">
+						<p>开始时间:{{ record.beginTime }}</p>
+						<p style="margin-bottom: 0">结束时间:{{ record.endTime }}</p>
+					</div>
 				</template>
 				<template v-if="column.dataIndex === 'customerInfo'">
 					<span>{{record.customerName}}</span>
@@ -150,9 +154,11 @@
 					</a-tag>
 				</template>
 				<template v-if="column.dataIndex === 'action'">
-					<a @click="showModal(record)" v-if="record.status!='1'&& record.status!='2'">二维码</a>
+					<a @click="showModal(record)" v-if="record.status!='1'&& record.status!='2' && record.status!='10' && record.status!='11'&&
+						record.status!='12' && record.status!='13' && record.status!='14' && record.status!='15'">二维码</a>
 
-					<a-divider type="vertical" v-if="record.status!='1'&& record.status!='2'"/>
+					<a-divider type="vertical" v-if="record.status!='1'&& record.status!='2' && record.status!='10' && record.status!='11'&&
+						record.status!='12' && record.status!='13' && record.status!='14' && record.status!='15'"/>
 
 					<a-space>
 						<a-dropdown>
@@ -169,12 +175,19 @@
 									<a-menu-item v-if="hasPerm('bizAppointmentAudit') && (record.status == '1')">
 										<a style="color: #ffaa00" @click="reviewRef.showModal(record.id)">审核</a>
 									</a-menu-item>
-									<a-menu-item v-if="hasPerm('bizAppointmentRecordEdit') && (record.status == '1' || record.status == '2')">
+									<a-menu-item v-if="hasPerm('bizAppointmentRecordEdit') && (record.status == '2')">
 										<a style="color:blue" @click="formRef.onOpen(record)" >编辑</a>
 									</a-menu-item>
-									<a-menu-item v-if="hasPerm('bizAppointmentRecordDelete') && (record.status == '1' || record.status == '2')">
+									<a-menu-item v-if="hasPerm('bizAppointmentRecordDelete') && (record.status == '2')">
 										<a style="color:red" type="link" danger size="small" @click="deleteConfig(record)">删除</a>
 									</a-menu-item>
+									<a-menu-item v-if="hasPerm('bizAppointmentDriverConfim') && record.status == '8'">
+										<a @click="XnSignNameRef.show(record.recordId)" >确认</a>
+									</a-menu-item>
+									<a-menu-item v-if="hasPerm('bizAppointmentDriverSign') && record.status=='10' && record.orderType=='1'">
+										<a  @click="signRef.onOpen(record)" >回签</a>
+									</a-menu-item>
+
 
 								</a-menu>
 							</template>
@@ -187,8 +200,9 @@
 	<Form ref="formRef" @successful="tableRef.refresh()" />
 	<Review ref="reviewRef" @successful="tableRef.refresh(true)" />
 	<Detail ref="detailRef" @successful="tableRef.refresh()" />
+	<Sign ref="signRef" @successful="tableRef.refresh(true)" />
 
-
+	<XnSignName ref="XnSignNameRef" :image="searchFormState.driverSign" @successful="signSuccess" />
 	<a-modal v-model:visible="open" title="二维码" width="600px" style="height: 700px">
 		<div id="qrcode" style="text-align: center; margin:  15px 5px 15px 5px">
 			<a-row>
@@ -227,15 +241,20 @@
 	import QRCode from 'qrcode'
 	import html2canvas from 'html2canvas'
 	import downloadUtil from '@/utils/downloadUtil'
+	import bizRecordApi from '@/api/biz/bizRecordApi'
+	import Sign from './sign.vue'
+	import bizOrderApi from "@/api/biz/bizOrderApi";
 
 	const submitLoading = ref(false)
 	const tableRef = ref()
+	const signRef = ref()
 	const formRef = ref()
 	const reviewRef = ref()
 	const detailRef = ref()
 	const toolConfig = { refresh: true, height: true, columnSetting: true, striped: false }
 
 	const nowRecord = ref()
+	const XnSignNameRef = ref()
 
 	//查询数据
 	const searchFormState = ref({})
@@ -261,19 +280,13 @@
 			align: 'center'
 		},
 		{
-			title: '提货开始时间',
-			dataIndex: 'beginTime',
+			title: '提货时间',
+			dataIndex: 'timeInfo',
 			align:'center',
-			width:180
-		},
-		{
-			title: '提货结束时间',
-			dataIndex: 'endTime',
-			align:'center',
-			width:180
+			width:200
 		},
 		{
-			title: '客户信息',
+			title: '客户名称',
 			dataIndex: 'customerInfo',
 			align:'center',
 			width:180
@@ -288,11 +301,17 @@
 			dataIndex: 'driverInfo',
 			width: 160
 		},
+		{
+			title: '车辆轴数',
+			dataIndex: 'axleNumber',
+			width: 110,
+			align:'center'
+		},
 		{
 			title: '状态',
 			dataIndex: 'status',
 			align: 'center',
-			width:150
+			width:130
 		},
 	]
 	// 操作栏通过权限判断是否显示
@@ -445,9 +464,39 @@
 
 	//导出
 	const exportTotal = () => {
-		const searchFormParam = cloneDeep(searchFormState.value)
+		/*const searchFormParam = cloneDeep(searchFormState.value)
 		bizAppointmentRecordApi.exportRecord(Object.assign(searchFormParam)).then((res)=>{
 			downloadUtil.resultDownload(res)
+		})*/
+		Modal.confirm({
+			title: '确定要导出记录吗?',
+			icon: createVNode(ExclamationCircleOutlined),
+			content: '',
+			onOk() {
+				submitLoading.value = true
+				const searchFormParam = cloneDeep(searchFormState.value)
+
+				bizAppointmentRecordApi
+					.exportRecord(Object.assign(searchFormParam))
+					.then((res) => {
+						downloadUtil.resultDownload(res)
+					})
+					.finally(() => {
+						submitLoading.value = false
+					})
+			},
+			onCancel() {}
+		})
+	}
+
+	// 签名板组件回调
+	const signSuccess = (value) => {
+		const param = {
+			id:value.id,
+			driverSign: value.value
+		}
+		bizRecordApi.updateDriverSign(param).then(() => {
+			tableRef.value.refresh(true)
 		})
 	}
 </script>

+ 159 - 0
snowy-admin-web/src/views/biz/bizappointmentrecord/sign.vue

@@ -0,0 +1,159 @@
+<template>
+	<xn-form-container
+		:title="formData.id ? '司机回签' : '司机回签'"
+		:width="700"
+		v-model:open="open"
+		:destroy-on-close="true"
+		@close="onClose"
+	>
+		<a-form ref="formRef" :model="formData" :rules="formRules" :wrapper-col="wrapperCol" :label-col="labelCol">
+			<a-form-item label="卸货重量:" name="unloadWeight">
+				<a-input-number v-model:value="formData.unloadWeight" style="width:90%"  :precision="2" :min="1" :max="999999"  placeholder="请输入卸货重量" allow-clear /><span style="margin-left:10px;">吨</span>
+			</a-form-item>
+<!--			<a-form-item label="单据图片:" name="licensePlate">
+				<a-input v-model:value="formData.licensePlate" placeholder="请输入车牌号码" allow-clear />
+			</a-form-item>-->
+			<a-form-item label="上传图片:" name="filePathList" :rules="[{ required: true, message: '请上传图片' }]">
+				<a-upload
+					v-model:file-list="fileList"
+					class="avatar-uploader"
+					list-type="picture"
+					:show-upload-list="true"
+					:custom-request="customRequest"
+					:remove="file => removeOtherFile(file,index)"
+					:before-upload="beforeUpload"
+					accept="image/png, image/jpeg, image/jpg"
+
+				>
+					<a-button>
+						<upload-outlined></upload-outlined>
+						upload
+					</a-button>
+				</a-upload>
+			</a-form-item>
+		</a-form>
+		<template #footer>
+			<a-button style="margin-right: 8px" @click="onClose">关闭</a-button>
+			<a-button type="primary" @click="onSubmit" :loading="submitLoading">保存</a-button>
+		</template>
+	</xn-form-container>
+</template>
+
+<script setup name="bizRecordForm">
+	import { cloneDeep } from 'lodash-es'
+	import { required } from '@/utils/formRules'
+	import bizRecordApi from '@/api/biz/bizRecordApi'
+	import fileApi from '@/api/dev/fileApi'
+	import sysConfig from "@/config";
+	import {message, Modal, Upload } from 'ant-design-vue';
+	// 抽屉状态
+	const open = ref(false)
+	const emit = defineEmits({ successful: null })
+	const formRef = ref()
+	// 表单数据
+	const formData = ref({filePathList:[],fileNameList:[]})
+	const submitLoading = ref(false)
+
+	//设置表单样式
+	const labelCol = ref({ span: 5})
+	const wrapperCol = ref({ span: 16})
+
+	const fileList = ref([])
+
+	// 打开抽屉
+	const onOpen = (record) => {
+		open.value = true
+		if (record) {
+			let recordData = cloneDeep(record)
+			formData.value = Object.assign({}, recordData)
+			formData.value.id = record.recordId
+			formData.value.filePathList = []
+			formData.value.fileNameList = []
+			fileList.value = []
+			if(formData.value.unloadImg!=null){
+				for (var i=0;i<formData.value.unloadImg.split(',').length;i++){
+					fileList.value.push({
+						name: formData.value.unloadName.split(',')[i],
+						url:sysConfig.PREVIEW_PATH + formData.value.unloadImg.split(',')[i]
+					})
+					formData.value.filePathList.push(formData.value.unloadImg.split(",")[i])
+					formData.value.fileNameList.push(formData.value.unloadName.split(",")[i])
+				}
+			}
+		}
+	}
+	// 关闭抽屉
+	const onClose = () => {
+		formRef.value.resetFields()
+		formData.value = {}
+		formData.value.fileNameList = []
+		formData.value.filePathList = []
+		fileList.value = []
+		open.value = false
+	}
+	// 默认要校验的
+	const formRules = {
+		unloadWeight: [required('请输入卸货重量')],
+	}
+	// 验证并提交数据
+	const onSubmit = () => {
+		formRef.value
+			.validate()
+			.then(() => {
+				submitLoading.value = true
+				const formDataParam = cloneDeep(formData.value)
+				console.log("formData:"+formDataParam.filePahList)
+				bizRecordApi
+					.updateWeight(formDataParam)
+					.then(() => {
+						onClose()
+						emit('successful')
+					})
+					.finally(() => {
+						submitLoading.value = false
+					})
+			})
+			.catch(() => {})
+	}
+
+	const customRequest = (data) => {
+		console.log("data:"+JSON.stringify(data.file.name))
+		//保存图片
+		const fileData = new FormData()
+		fileData.append('file', data.file)
+		fileApi
+			.uploadImgMap(fileData)
+			.then((result) => {
+				formData.value.filePathList.push(result.imageFile)
+				formData.value.fileNameList.push(data.file.name)
+			}).finally(()=>{
+			data.onSuccess()
+		})
+
+	}
+
+	//文件删除
+	const removeOtherFile = (file) => {
+		fileList.value.forEach((item,index)=>{
+			console.log(item.name+"======="+file.name)
+			if(item.name === file.name){
+
+				fileList.value.splice(index, 1);
+				formData.value.filePathList.splice(index,1)
+				formData.value.fileNameList.splice(index,1)
+			}
+		})
+	}
+
+	const beforeUpload = (file) => {
+		const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png'
+		if (!isJpgOrPng) {
+			message.error('请上传JPG/PNG格式的图片!')
+		}
+		return isJpgOrPng || Upload.LIST_IGNORE
+	}
+	// 抛出函数
+	defineExpose({
+		onOpen
+	})
+</script>

+ 13 - 2
snowy-admin-web/src/views/biz/bizconfig/form.vue

@@ -10,9 +10,9 @@
 			<a-form-item label="排队时效:" name="queueEfficiency">
 				<a-input-number v-model:value="formData.queueEfficiency" 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="pullNumber">
+<!--			<a-form-item label="时段下拉个数:" name="pullNumber">
 				<a-input-number v-model:value="formData.pullNumber" style="width:90%"  :precision="0" :min="1" :max="99999" placeholder="请输入时段下拉个数" allow-clear /><span style="margin-left:10px;">个</span>
-			</a-form-item>
+			</a-form-item>-->
 			<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>
@@ -52,6 +52,16 @@
 					</a-radio-button>
 				</a-radio-group>
 			</a-form-item>
+			<a-form-item label="排队通知开关:" name="lineNoticeSwitch">
+				<a-radio-group button-style="solid" v-model:value="formData.lineNoticeSwitch">
+					<a-radio-button value="1">
+						开启
+					</a-radio-button>
+					<a-radio-button value="2">
+						关闭
+					</a-radio-button>
+				</a-radio-group>
+			</a-form-item>
 		</a-form>
 		<template #footer>
 			<a-button style="margin-right: 8px" @click="onClose">关闭</a-button>
@@ -104,6 +114,7 @@
 		accessControlSwitch: [required('请输入门禁强制校验开关')],
 		lossWarn: [required('请输入装卸损耗预警值')],
 		applyCount: [required('请输入预约申请数量')],
+		lineNoticeSwitch: [required('请选择排队通知开关')],
 	}
 	// 验证并提交数据
 	const onSubmit = () => {

+ 10 - 2
snowy-admin-web/src/views/biz/bizconfig/index.vue

@@ -47,6 +47,9 @@
 				<template v-if="column.dataIndex === 'applyCount'">
 					{{record.applyCount}}个
 				</template>
+				<template v-if="column.dataIndex === 'lineNoticeSwitch'">
+					{{ $TOOL.dictTypeData('biz_switch', record.lineNoticeSwitch) }}
+				</template>
 			</template>
 		</s-table>
 	</a-card>
@@ -72,11 +75,11 @@
 			dataIndex: 'queueEfficiency',
 			align:'center'
 		},
-		{
+		/*{
 			title: '时段下拉个数',
 			dataIndex: 'pullNumber',
 			align:'center'
-		},
+		},*/
 		{
 			title: '停留时长',
 			dataIndex: 'stopDuration',
@@ -107,6 +110,11 @@
 			dataIndex: 'applyCount',
 			align:'center'
 		},
+		{
+			title: '排队通知开关',
+			dataIndex: 'lineNoticeSwitch',
+			align:'center'
+		},
 	]
 	// 操作栏通过权限判断是否显示
 	columns.push({

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

@@ -11,7 +11,7 @@
 				<a-input-number v-model:value="formData.vehicleAxleNumber" 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="excessWeight">
-				<a-input-number v-model:value="formData.excessWeight" style="width:90%"  :precision="0" :min="1" :max="999999" placeholder="请输入超限重量" allow-clear /><span style="margin-left:10px;">KG</span>
+				<a-input-number v-model:value="formData.excessWeight" style="width:90%"  :precision="2" :min="1" :max="999999" placeholder="请输入超限重量" allow-clear /><span style="margin-left:10px;"></span>
 			</a-form-item>
 			<a-form-item label="是否启用:" name="status" v-if="formData.id!=null && formData.id!=''">
 				<a-radio-group button-style="solid" v-model:value="formData.status">

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

@@ -61,7 +61,7 @@
 			align:'center'
 		},
 		{
-			title: '超限重量',
+			title: '超限重量(吨)',
 			dataIndex: 'excessWeight',
 			align:'center'
 		},

+ 2 - 0
snowy-admin-web/src/views/biz/bizorder/detail.vue

@@ -53,6 +53,8 @@
 				<a-descriptions-item label="签名" :span="4">
 					<a-image v-if="formData.orderSign != null" :width="200" :src="formData.orderSign" />
 				</a-descriptions-item>
+				<a-descriptions-item label="结束备注" :span="4">{{ formData.endReason}}</a-descriptions-item>
+				<a-descriptions-item label="审核备注" :span="4">{{ formData.orderReason}}</a-descriptions-item>
 			</a-descriptions>
 		</a-form>
 	</xn-form-container>

+ 23 - 4
snowy-admin-web/src/views/biz/bizorder/flow.vue

@@ -1,5 +1,5 @@
 <template>
-	<xn-form-container title="流水" :width="1200" :visible="visible" :destroy-on-close="true" @close="onClose">
+	<xn-form-container title="流水" :width="1300" :visible="visible" :destroy-on-close="true" @close="onClose">
 		<s-table
 			ref="tableRef"
 			:columns="columns"
@@ -81,19 +81,29 @@
 						<p style="margin-bottom: 0">编号:{{ record.orderNumber }}</p>
 					</div>
 				</template>
+
+				<template v-if="column.dataIndex === 'action'">
+					<a-space>
+						<a @click="detailRef.onOpen(record)">详情</a>
+					</a-space>
+				</template>
 			</template>
 		</s-table>
 	</xn-form-container>
+
+	<Detail ref="detailRef" />
 </template>
 
 <script setup name="recordDoubleForm">
 	import { cloneDeep } from 'lodash-es'
 	import bizRecordApi from "@/api/biz/bizRecordApi";
+	import Detail from "@/views/biz/record/detail.vue";
 	// 默认是关闭状态
 	const visible = ref(false)
 	const formData = ref({})
 	const table = ref()
 	const resultJson = ref()
+	const detailRef = ref()
 
 	const labelStyle = {
 		width: '20%'
@@ -125,7 +135,7 @@
 			width: '130px'
 		},
 		{
-			title: '重量(KG)',
+			title: '重量()',
 			dataIndex: 'weight',
 			align: 'center'
 		},
@@ -134,8 +144,9 @@
 			dataIndex: 'orderInfo'
 		},
 		{
-			title: '收发货单位',
-			dataIndex: 'company'
+			title: '客户名称',
+			dataIndex: 'customerName',
+			align:'center'
 		},
 		{
 			title: '货品',
@@ -148,6 +159,14 @@
 		}
 	]
 
+	// 操作栏通过权限判断是否显示
+	columns.push({
+		title: '操作',
+		dataIndex: 'action',
+		align: 'center',
+		width: 150
+	})
+
 	const orderId = ref()
 	// 打开抽屉
 	const onOpen = (record) => {

+ 22 - 17
snowy-admin-web/src/views/biz/bizorder/form.vue

@@ -37,7 +37,7 @@
 				> </a-select>
 			</a-form-item>
 			<a-form-item label="订单重量:" name="orderWeight">
-				<a-input-number v-model:value="formData.orderWeight" style="width:90%"  :precision="0" :min="1" :max="999999"  placeholder="请输入订单重量" allow-clear /><span style="margin-left:10px;">吨</span>
+				<a-input-number v-model:value="formData.orderWeight" style="width:90%"  :precision="2" :min="1" :max="999999"  placeholder="请输入订单重量" allow-clear disabled/><span style="margin-left:10px;">吨</span>
 			</a-form-item>
 		</a-form>
 		<template #footer>
@@ -114,13 +114,15 @@
 		}
 
 		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
-					}
+			bizSaleOrderApi.detailById({id:formData.value.saleOrderInfo}).then((res)=>{
+				//根据货品名称和重量查询提货时间段
+				goodsConfApi.getList({goodsName:res.saleGoodsName,needWeight:res.saleOrderWeight}).then((res)=>{
+					deliveryTimeIdList.value = res.map((item)=>{
+						return{
+							value:item.id,
+							label:item.confStartTime+'~'+item.confEndTime
+						}
+					})
 				})
 			})
 		}
@@ -148,17 +150,20 @@
 			formData.value.goodsName = res.saleGoodsName
 			formData.value.orderWeight = res.saleOrderWeight
 			formData.value.orderType = res.saleOrderType
-		})
-		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
-				}
+			formData.value.deliveryTimeId = ''
+			//根据货品名称和重量查询提货时间段
+			console.log("goodsName:"+formData.value.goodsName)
+			console.log("needWeight:"+formData.value.orderWeight)
+			goodsConfApi.getList({goodsName:formData.value.goodsName,needWeight:formData.value.orderWeight}).then((res)=>{
+				deliveryTimeIdList.value = res.map((item)=>{
+					return{
+						value:item.id,
+						label:item.confStartTime+'~'+item.confEndTime
+					}
+				})
 			})
 		})
+
 	}
 
 	// 关闭抽屉

+ 28 - 8
snowy-admin-web/src/views/biz/bizorder/index.vue

@@ -133,8 +133,7 @@
 
 					<a-divider type="vertical" v-if="record.orderStatus == '3' || record.orderStatus == '4'"/>
 
-					<a-dropdown v-if="(hasPerm('bizOrderEdit')) || (hasPerm('bizOrderDelete'))
-						">
+					<a-dropdown>
 						<a class="ant-dropdown-link">
 							更多
 							<DownOutlined />
@@ -152,7 +151,7 @@
 									<a style="color:blue" size="small" type="link" @click="formRef.onOpen(record)" >编辑</a>
 								</a-menu-item>
 
-								<a-menu-item v-if="hasPerm('bizOrderDelete') && (record.orderStatus == '0' || record.orderStatus == '1')">
+								<a-menu-item v-if="hasPerm('bizOrderDelete') && (record.orderStatus == '0')">
 									<a style="color:red" size="small" type="link" @click="deleteConfig(record)">删除</a>
 								</a-menu-item>
 
@@ -172,7 +171,7 @@
 									<a style="color:green" @click="reviewRef.showModal(record.id)">审核</a>
 								</a-menu-item>
 
-								<a-menu-item v-if="hasPerm('bizOrderFlow')">
+								<a-menu-item v-if="hasPerm('bizOrderFlow') && (record.orderStatus == '4' || record.orderStatus=='5' || record.orderStatus=='6' || record.orderStatus=='7')">
 									<a style="color:deepskyblue" @click="flowRef.onOpen(record)">流水</a>
 								</a-menu-item>
 
@@ -180,7 +179,7 @@
 									<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-menu-item v-if="hasPerm('bizOrderEnd') && (record.orderStatus == '3' || record.orderStatus == '4')">
 									<a style="color:red" @click="endRef.showModal(record.id)">结束</a>
 								</a-menu-item>
 							</a-menu>
@@ -202,7 +201,7 @@
 	<Flow ref="flowRef" @successful="tableRef.refresh()" />
 	<Review ref="reviewRef" @successful="tableRef.refresh(true)" />
 	<End ref="endRef" @successful="tableRef.refresh(true)" />
-	<XnSignName ref="XnSignNameRef" :image="searchFormState.orderSign" @successful="signSuccess" />
+	<XnSignName ref="XnSignNameRef" @successful="signSuccess" />
 
 
 	<a-modal v-model:visible="open" title="二维码" width="600px" style="height: 700px">
@@ -557,7 +556,8 @@
 	const getQrCode = (record) => {
 		//QRCode.toDataURL("id:"+record.id+"saleCode:"+record.saleCode, {
 		let param = {
-			id:record.id
+			id:record.id,
+			orderName:record.orderName
 		}
 		QRCode.toDataURL(JSON.stringify(param), {
 			errorCorrectionLevel: 'H',
@@ -635,9 +635,29 @@
 
 	//导出
 	const exportTotal = () => {
-		const searchFormParam = cloneDeep(searchFormState.value)
+		/*const searchFormParam = cloneDeep(searchFormState.value)
 		bizOrderApi.exportRecord(Object.assign(searchFormParam)).then((res)=>{
 			downloadUtil.resultDownload(res)
+		})*/
+
+		Modal.confirm({
+			title: '确定要导出记录吗?',
+			icon: createVNode(ExclamationCircleOutlined),
+			content: '',
+			onOk() {
+				submitLoading.value = true
+				const searchFormParam = cloneDeep(searchFormState.value)
+
+				bizOrderApi
+					.exportRecord(Object.assign(searchFormParam))
+					.then((res) => {
+						downloadUtil.resultDownload(res)
+					})
+					.finally(() => {
+						submitLoading.value = false
+					})
+			},
+			onCancel() {}
 		})
 	}
 

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

@@ -88,7 +88,10 @@
 					</div>
 				</template>
 				<template v-if="column.dataIndex === 'timeInfo'">
-					<span>{{record.beginTime + '~' + record.endTime}}</span>
+					<div class="time-list">
+						<p>开始时间:{{ record.beginTime }}</p>
+						<p style="margin-bottom: 0">结束时间:{{ record.endTime }}</p>
+					</div>
 				</template>
 				<template v-if="column.dataIndex === 'customerInfo'">
 					<span>{{record.customerName}}</span>
@@ -181,7 +184,7 @@
 	//查询数据
 	const searchFormState = ref({appointmentFlag:'1'})
 	const searchFormRef = ref()
-	const statusList = tool.dictList('appointment_status')
+	const statusList = tool.dictList('queue_status')
 
 	// 查询区域显示更多控制
 	const advanced = ref(false)
@@ -193,7 +196,7 @@
 		{
 			title: '订单信息',
 			dataIndex: 'orderInfo',
-			width:230
+			width:200
 		},
 		{
 			title: '车牌号',
@@ -202,32 +205,32 @@
 			align: 'center'
 		},
 		{
-			title: '提货开始时间',
-			dataIndex: 'beginTime',
-			align:'center',
-			width:180
-		},
-		{
-			title: '提货结束时间',
-			dataIndex: 'endTime',
+			title: '提货时间',
+			dataIndex: 'timeInfo',
 			align:'center',
-			width:180
+			width:200
 		},
 		{
-			title: '客户信息',
+			title: '客户名称',
 			dataIndex: 'customerInfo',
 			align:'center',
-			width:200
+			width:180
 		},
 		{
 			title: '货品信息',
 			dataIndex: 'goodsInfo',
-			width:180
+			width:160
 		},
 		{
 			title: '司机信息',
 			dataIndex: 'driverInfo',
-			width: 180
+			width: 160
+		},
+		{
+			title: '排队号',
+			dataIndex: 'queueNumber',
+			width: 110,
+			align:'center'
 		},
 		{
 			title: '状态',

+ 18 - 4
snowy-admin-web/src/views/biz/bizsaleorder/form.vue

@@ -15,7 +15,7 @@
 			</a-form-item>
 			<a-form-item label="客户信息:" name="customerId">
 				<a-select v-model:value="formData.customerId" placeholder="请选择客户信息"
-						  :options="customerIdList" @change="onChangeCustomer"
+						  :options="customerIdList"
 				> </a-select>
 			</a-form-item>
 			<a-form-item label="订单类型:" name="saleOrderType">
@@ -28,8 +28,11 @@
 					</a-radio-button>
 				</a-radio-group>
 			</a-form-item>
-			<a-form-item label="货品名称:" name="saleGoodsName">
-				<a-input v-model:value="formData.saleGoodsName" placeholder="请输入货品名称" allow-clear />
+			<a-form-item label="货品信息:" name="saleGoodsCode">
+<!--				<a-input v-model:value="formData.saleGoodsName" placeholder="请输入货品名称" allow-clear />-->
+				<a-select v-model:value="formData.saleGoodsCode" placeholder="请选择货品信息"
+						  :options="saleGoodsCodeList"
+				> </a-select>
 			</a-form-item>
 			<a-form-item label="订单重量:" name="saleOrderWeight">
 				<a-input-number v-model:value="formData.saleOrderWeight" style="width:90%"  :precision="0" :min="1" :max="999999"  placeholder="请输入订单重量" allow-clear /><span style="margin-left:10px;">吨</span>
@@ -47,6 +50,7 @@
 	import { required } from '@/utils/formRules'
 	import bizSaleOrderApi from '@/api/biz/bizSaleOrderApi'
 	import customerApi from '@/api/biz/customerApi'
+	import bizGoodsApi from "@/api/biz/bizGoodsApi";
 	// 抽屉状态
 	const open = ref(false)
 	const emit = defineEmits({ successful: null })
@@ -60,6 +64,7 @@
 	const wrapperCol = ref({ span: 16})
 
 	const customerIdList = ref()
+	const saleGoodsCodeList = ref()
 
 	// 打开抽屉
 	const onOpen = (record) => {
@@ -80,6 +85,15 @@
 				}
 			})
 		})
+		//查询货品信息
+		bizGoodsApi.getList().then((res)=>{
+			saleGoodsCodeList.value = res.map((item)=>{
+				return{
+					value:item.goodsCode,
+					label:item.goodsName+'-'+item.goodsCode
+				}
+			})
+		})
 	}
 	// 关闭抽屉
 	const onClose = () => {
@@ -92,7 +106,7 @@
 		saleOrderNumber: [required('请输入销售订单编号')],
 		saleOrderName: [required('请输入销售订单名称')],
 		saleOrderType: [required('请选择订单类型')],
-		saleGoodsName: [required('请输入货品名称')],
+		saleGoodsCode: [required('请选择货品信息')],
 		saleOrderWeight: [required('请输入销售订单重量')],
 		customerId: [required('请选择客户信息')],
 	}

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

@@ -14,7 +14,7 @@
 				</a-col>
 				<a-col :span="6">
 					<a-form-item label="订单类型" name="saleOrderType">
-						<a-select v-model:value="searchFormState.saleOrderType" placeholder="订单状态查询"
+						<a-select v-model:value="searchFormState.saleOrderType" placeholder="订单类型查询"
 								  :options="orderTypeList"
 						> </a-select>
 					</a-form-item>
@@ -57,9 +57,9 @@
 			<template #bodyCell="{ column, record }">
 				<template v-if="column.dataIndex === 'action'">
 					<a-space>
-						<a @click="formRef.onOpen(record)" v-if="hasPerm('bizSaleOrderEdit')">编辑</a>
-						<a-divider type="vertical" v-if="hasPerm(['bizSaleOrderEdit', 'bizSaleOrderDelete'], 'and')" />
-						<a-button style="color:red" type="link" danger size="small" v-if="hasPerm('bizSaleOrderDelete')" @click="deleteConfig(record)">删除</a-button>
+						<a @click="formRef.onOpen(record)" v-if="hasPerm('bizSaleOrderEdit') && record.saleStatus == '1'">编辑</a>
+						<a-divider type="vertical" v-if="hasPerm(['bizSaleOrderEdit', 'bizSaleOrderDelete'], 'and') && (record.saleStatus == '1' || record.saleStatus == '3')" />
+						<a-button style="color:red" type="link" danger size="small" v-if="hasPerm('bizSaleOrderDelete') && (record.saleStatus == '1' || record.saleStatus == '3')" @click="deleteConfig(record)">删除</a-button>
 					</a-space>
 				</template>
 				<template v-if="column.dataIndex === 'saleOrderType'">

+ 52 - 8
snowy-admin-web/src/views/biz/bizsendrecord/detail.vue

@@ -1,6 +1,6 @@
 <template>
 	<xn-form-container
-		:title="'过磅记录详情'"
+		:title="'详情'"
 		:width="1200"
 		v-model:open="open"
 		:destroy-on-close="true"
@@ -10,9 +10,9 @@
 			<a-descriptions-item span="3" label="车次编码">{{ formData.carNumber }}</a-descriptions-item>
 			<a-descriptions-item label="车牌号码">{{ formData.licensePlate }}</a-descriptions-item>
 			<a-descriptions-item span="2" label="车牌颜色">{{ formData.plateColor }}</a-descriptions-item>
-			<a-descriptions-item label="发货单位">{{ formData.shippingCompany }}</a-descriptions-item>
+<!--			<a-descriptions-item label="发货单位">{{ formData.shippingCompany }}</a-descriptions-item>
 			<a-descriptions-item label="收货单位">{{ formData.receiptCompany }}</a-descriptions-item>
-			<a-descriptions-item label="运输单位">{{ formData.transportCompany }}</a-descriptions-item>
+			<a-descriptions-item label="运输单位">{{ formData.transportCompany }}</a-descriptions-item>-->
 			<!-- <a-descriptions-item label="运输路线">{{ formData.transportRoute }}</a-descriptions-item> -->
 			<a-descriptions-item label="货品名称">{{ formData.goodsName }}</a-descriptions-item>
 			<a-descriptions-item label="货品规格">{{ formData.goodsModel }}</a-descriptions-item>
@@ -21,19 +21,19 @@
 			<a-descriptions-item label="订单编号">{{ formData.orderNumber }}</a-descriptions-item>
 			<a-descriptions-item label="客户名称">{{ formData.customerName }}</a-descriptions-item>
 			<a-descriptions-item label="司机电话">{{ formData.driverMobile }}</a-descriptions-item>
-			<a-descriptions-item label="过磅人">{{ formData.extKey1 }}</a-descriptions-item>
-			<a-descriptions-item label="打印时间">{{ formData.extKey2 }}</a-descriptions-item>
+<!--			<a-descriptions-item label="过磅人">{{ formData.extKey1 }}</a-descriptions-item>
+			<a-descriptions-item label="打印时间">{{ formData.extKey2 }}</a-descriptions-item>-->
 		</a-descriptions>
 		<a-divider></a-divider>
 		<a-descriptions>
 			<a-descriptions-item label="毛重"
-				><a-tag color="blue">{{ formData.grossWeight }} KG</a-tag></a-descriptions-item
+				><a-tag color="blue">{{ formData.grossWeight }} </a-tag></a-descriptions-item
 			>
 			<a-descriptions-item label="皮重"
-				><a-tag color="orange">{{ formData.tareWeight }} KG</a-tag></a-descriptions-item
+				><a-tag color="orange">{{ formData.tareWeight }} </a-tag></a-descriptions-item
 			>
 			<a-descriptions-item label="净重"
-				><a-tag color="green">{{ formData.netWeight }} KG</a-tag></a-descriptions-item
+				><a-tag color="green">{{ formData.netWeight }} </a-tag></a-descriptions-item
 			>
 		</a-descriptions>
 		<a-divider></a-divider>
@@ -80,6 +80,7 @@
 	import tool from '@/utils/tool'
 	import { cloneDeep } from 'lodash-es'
 	import bizRecordApi from '@/api/biz/bizRecordApi'
+	import sysConfig from "@/config";
 
 	// 抽屉状态
 	const open = ref(false)
@@ -103,6 +104,49 @@
 			})*/
 			let recordData = cloneDeep(record)
 			formData.value = Object.assign({}, recordData)
+			if(formData.value.grossPlateName.includes("http://218.2.6.74:8065")){
+				console.log("str:"+formData.value.grossPlateName.indexOf("preview/"))
+				formData.value.grossPlateName = formData.value.grossPlateName.replace("http://218.2.6.74:8065/preview/",sysConfig.PREVIEW_PATH)
+			}
+			if(formData.value.grossLicenseName.includes("http://218.2.6.74:8065")){
+				formData.value.grossLicenseName = formData.value.grossLicenseName.replace("http://218.2.6.74:8065/preview/",sysConfig.PREVIEW_PATH)
+			}
+			if(formData.value.grossCaptureHead.includes("http://218.2.6.74:8065")){
+				formData.value.grossCaptureHead = formData.value.grossCaptureHead.replace("http://218.2.6.74:8065/preview/",sysConfig.PREVIEW_PATH)
+			}
+			if(formData.value.grossCaptureTail.includes("http://218.2.6.74:8065")){
+				formData.value.grossCaptureTail = formData.value.grossCaptureTail.replace("http://218.2.6.74:8065/preview/",sysConfig.PREVIEW_PATH)
+			}
+			if(formData.value.grossCaptureBody.includes("http://218.2.6.74:8065")){
+				formData.value.grossCaptureBody = formData.value.grossCaptureBody.replace("http://218.2.6.74:8065/preview/",sysConfig.PREVIEW_PATH)
+			}
+			if(formData.value.grossCaptureWare.includes("http://218.2.6.74:8065")){
+				formData.value.grossCaptureWare = formData.value.grossCaptureWare.replace("http://218.2.6.74:8065/preview/",sysConfig.PREVIEW_PATH)
+			}
+			if(formData.value.grossCapturePoundRoom.includes("http://218.2.6.74:8065")){
+				formData.value.grossCapturePoundRoom = formData.value.grossCapturePoundRoom.replace("http://218.2.6.74:8065/preview/",sysConfig.PREVIEW_PATH)
+			}
+			if(formData.value.tarePlateName.includes("http://218.2.6.74:8065")){
+				formData.value.tarePlateName = formData.value.tarePlateName.replace("http://218.2.6.74:8065/preview/",sysConfig.PREVIEW_PATH)
+			}
+			if(formData.value.tareLicenseName.includes("http://218.2.6.74:8065")){
+				formData.value.tareLicenseName = formData.value.tareLicenseName.replace("http://218.2.6.74:8065/preview/",sysConfig.PREVIEW_PATH)
+			}
+			if(formData.value.tareCaptureHead.includes("http://218.2.6.74:8065")){
+				formData.value.tareCaptureHead = formData.value.tareCaptureHead.replace("http://218.2.6.74:8065/preview/",sysConfig.PREVIEW_PATH)
+			}
+			if(formData.value.tareCaptureTail.includes("http://218.2.6.74:8065")){
+				formData.value.tareCaptureTail = formData.value.tareCaptureTail.replace("http://218.2.6.74:8065/preview/",sysConfig.PREVIEW_PATH)
+			}
+			if(formData.value.tareCaptureBody.includes("http://218.2.6.74:8065")){
+				formData.value.tareCaptureBody = formData.value.tareCaptureBody.replace("http://218.2.6.74:8065/preview/",sysConfig.PREVIEW_PATH)
+			}
+			if(formData.value.tareCaptureWare.includes("http://218.2.6.74:8065")){
+				formData.value.tareCaptureWare = formData.value.tareCaptureWare.replace("http://218.2.6.74:8065/preview/",sysConfig.PREVIEW_PATH)
+			}
+			if(formData.value.tareCapturePoundRoom.includes("http://218.2.6.74:8065")){
+				formData.value.tareCapturePoundRoom = formData.value.tareCapturePoundRoom.replace("http://218.2.6.74:8065/preview/",sysConfig.PREVIEW_PATH)
+			}
 		}
 	}
 	// 关闭抽屉

+ 38 - 28
snowy-admin-web/src/views/biz/bizsendrecord/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,14 +20,6 @@
 						/>
 					</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="请输入司机姓名" />
@@ -43,7 +40,7 @@
 						<a-input v-model:value="searchFormState.goodsModel" placeholder="请输入规格型号" />
 					</a-form-item>
 				</a-col>
-				<a-col :span="6" v-show="advanced">
+<!--				<a-col :span="6" v-show="advanced">
 					<a-form-item label="收货单位" name="receiptCompany">
 						<a-input v-model:value="searchFormState.receiptCompany" placeholder="请输入收货单位" />
 					</a-form-item>
@@ -57,7 +54,7 @@
 					<a-form-item label="运输单位" name="transportCompany">
 						<a-input v-model:value="searchFormState.transportCompany" placeholder="请输入运输单位" />
 					</a-form-item>
-				</a-col>
+				</a-col>-->
 				<a-col :span="6" v-show="advanced">
 					<a-form-item label="订单编号" name="orderNumber">
 						<a-input v-model:value="searchFormState.orderNumber" placeholder="请输入订单编号" />
@@ -73,6 +70,13 @@
 						<a-input v-model:value="searchFormState.customerName" placeholder="请输入客户名称" />
 					</a-form-item>
 				</a-col>
+				<a-col :span="6" v-show="advanced">
+					<a-form-item label="确认状态" name="sendRecordStatus">
+						<a-select v-model:value="searchFormState.sendRecordStatus" placeholder="确认状态查询"
+								  :options="sendRecordStatusList"
+						> </a-select>
+					</a-form-item>
+				</a-col>
 				<a-col :span="6">
 					<a-button type="primary" @click="tableRef.refresh()">查询</a-button>
 					<a-button style="margin: 0 8px" @click="reset">重置</a-button>
@@ -93,11 +97,14 @@
 			: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>
+<!--				<a-space>
+					<a-button type="primary" @click="formRef.onOpen()" v-if="hasPerm('bizRecordToConfirm')">
+						待确认
+					</a-button>
+					<a-button style="background-color: orange;" type="primary" @click="formRef.onOpen()" v-if="hasPerm('bizRecordAlreadyConfirm')">
+						已确认
+					</a-button>
+				</a-space>-->
 			</template>
 			<template #bodyCell="{ column, record }">
 				<template v-if="column.dataIndex === 'licensePlate'">
@@ -169,8 +176,8 @@
 				<template v-if="column.dataIndex === 'action'">
 					<a-space>
 						<a @click="detailRef.onOpen(record)">详情</a>
-						<a-divider type="vertical"  v-if="hasPerm('bizRecordConfirm') && record.confirmUser==null " />
-						<a  @click="confirmRecord(record)" v-if="hasPerm('bizRecordConfirm') && record.confirmUser==null ">确认</a>
+						<a-divider type="vertical"  v-if="hasPerm('bizRecordConfirm') && record.status=='6' " />
+						<a  @click="confirmRecord(record)" v-if="hasPerm('bizRecordConfirm') && record.status=='6' ">确认</a>
 					</a-space>
 				</template>
 			</template>
@@ -190,6 +197,8 @@
 	import {createVNode} from "vue";
 	import {ExclamationCircleOutlined} from "@ant-design/icons-vue";
 	import bizAppointmentRecordApi from "@/api/biz/bizAppointmentRecordApi";
+	import tool from '@/utils/tool'
+
 	const searchFormState = ref({isFlag:1})
 	const searchFormRef = ref()
 	const tableRef = ref()
@@ -200,6 +209,7 @@
 	const advanced = ref(false)
 
 	const submitLoading = ref(false)
+	const sendRecordStatusList = tool.dictList('send_record_status')
 
 	const toggleAdvanced = () => {
 		advanced.value = !advanced.value
@@ -223,7 +233,7 @@
 			width: '130px'
 		},
 		{
-			title: '重量(KG)',
+			title: '重量()',
 			dataIndex: 'weight',
 			align: 'center'
 		},
@@ -232,8 +242,9 @@
 			dataIndex: 'orderInfo'
 		},
 		{
-			title: '收发货单位',
-			dataIndex: 'company'
+			title: '客户名称',
+			dataIndex: 'customerName',
+			align:'center'
 		},
 		{
 			title: '货品',
@@ -246,14 +257,13 @@
 		}
 	]
 	// 操作栏通过权限判断是否显示
-	if (hasPerm(['bizRecordEdit', 'bizRecordDelete', 'bizRecordDetail'])) {
-		columns.push({
-			title: '操作',
-			dataIndex: 'action',
-			align: 'center',
-			width: 150
-		})
-	}
+	columns.push({
+		title: '操作',
+		dataIndex: 'action',
+		align: 'center',
+		width: 150
+	})
+
 
 	const loadData = (parameter) => {
 		const searchFormParam = cloneDeep(searchFormState.value)

+ 3 - 3
snowy-admin-web/src/views/biz/bizvehicle/index.vue

@@ -4,17 +4,17 @@
 			<a-row :gutter="24">
 				<a-col :span="6">
 					<a-form-item label="车牌号" name="licensePlate">
-						<a-input v-model:value="searchFormState.licensePlate" placeholder="请输入车牌号" />
+						<a-input v-model:value="searchFormState.licensePlate" placeholder="查询车牌号" />
 					</a-form-item>
 				</a-col>
 				<a-col :span="6">
 					<a-form-item label="司机姓名" name="driverName">
-						<a-input v-model:value="searchFormState.driverName" placeholder="请输入司机姓名" />
+						<a-input v-model:value="searchFormState.driverName" placeholder="查询司机姓名" />
 					</a-form-item>
 				</a-col>
 				<a-col :span="6">
 					<a-form-item label="司机电话" name="driverMobile">
-						<a-input v-model:value="searchFormState.driverMobile" placeholder="请输入司机电话" />
+						<a-input v-model:value="searchFormState.driverMobile" placeholder="查询司机电话" />
 					</a-form-item>
 				</a-col>
 				<a-col :span="6">

+ 30 - 23
snowy-admin-web/src/views/biz/count/goodsindex.vue

@@ -7,29 +7,29 @@
 						<a-range-picker v-model:value="searchFormState.times" value-format="YYYY-MM-DD" />
 					</a-form-item>
 				</a-col>
-				<a-col :span="6">
+<!--				<a-col :span="6">
 					<a-form-item label="单位名称" name="companyName">
 						<a-input v-model:value="searchFormState.companyName" placeholder="请输入单位名称" />
 					</a-form-item>
-				</a-col>
+				</a-col>-->
 				<a-col :span="6">
 					<a-form-item label="货品" name="goodsName">
 						<a-input v-model:value="searchFormState.goodsName" placeholder="请输入货品" />
 					</a-form-item>
 				</a-col>
-				<a-col :span="6" v-if="advanced">
+<!--				<a-col :span="6" v-if="advanced">
 					<a-form-item label="车牌号" name="licensePlate">
 						<a-input v-model:value="searchFormState.licensePlate" placeholder="请输入车牌号" />
 					</a-form-item>
-				</a-col>
+				</a-col>-->
 				<a-col :span="6">
 					<a-button type="primary" @click="query()">查询</a-button>
 					<a-button style="margin: 0 8px" @click="reset">重置</a-button>
 					<a-button type="dashed" class="snowy-buttom-left" @click="exportData()"><export-outlined />导出</a-button>
-					<a @click="toggleAdvanced" style="margin-left: 8px">
+<!--					<a @click="toggleAdvanced" style="margin-left: 8px">
 						{{ advanced ? '收起' : '展开' }}
 						<component :is="advanced ? 'up-outlined' : 'down-outlined'" />
-					</a>
+					</a>-->
 				</a-col>
 			</a-row>
 		</a-form>
@@ -48,13 +48,13 @@
 					{{ index + 1 }}
 				</template>
 				<template v-if="column.dataIndex === 'totalNetWeight'">
-					{{ record.totalNetWeight + ' t' }}
+					{{ record.totalNetWeight}}
 				</template>
 				<template v-if="column.dataIndex === 'totalGrossWeight'">
-					{{ record.totalGrossWeight + ' t' }}
+					{{ record.totalGrossWeight}}
 				</template>
 				<template v-if="column.dataIndex === 'totalTareWeight'">
-					{{ record.totalTareWeight + ' t' }}
+					{{ record.totalTareWeight}}
 				</template>
 			</template>
 		</a-table>
@@ -93,32 +93,39 @@
 		{
 			title: '序号',
 			width: 80,
-			dataIndex: 'serial'
+			dataIndex: 'serial',
+			align:'center'
 		},
 		{
-			title: '单位名称',
-			dataIndex: 'goodsName'
+			title: '货品名称',
+			dataIndex: 'goodsName',
+			align:'center'
 		},
 		{
-			title: '规格型号',
-			dataIndex: 'goodsModel'
+			title: '货品规格',
+			dataIndex: 'goodsModel',
+			align:'center'
 		},
 		{
 			title: '总车次',
-			dataIndex: 'totalCarNum'
+			dataIndex: 'totalCarNum',
+			align:'center'
 		},
 		{
-			title: '总净重',
-			dataIndex: 'totalNetWeight'
+			title: '总毛重(吨)',
+			dataIndex: 'totalGrossWeight',
+			align:'center'
 		},
 		{
-			title: '总毛重',
-			dataIndex: 'totalGrossWeight'
+			title: '总皮重(吨)',
+			dataIndex: 'totalTareWeight',
+			align:'center'
 		},
 		{
-			title: '总皮重',
-			dataIndex: 'totalTareWeight'
-		}
+			title: '总净重(吨)',
+			dataIndex: 'totalNetWeight',
+			align:'center'
+		},
 	]
 	const companyData = ref([])
 	const loadData = () => {
@@ -141,7 +148,7 @@
 		const searchFormParam = cloneDeep(searchFormState.value)
 		Modal.confirm({
 			title: '提示',
-			content: '确定要导出运输单位统计记录吗?',
+			content: '确定要导出货品统计记录吗?',
 			maskClosable: true,
 			onOk: () => {
 				bizRecordApi.goodsCountExport(searchFormParam).then((res) => {

+ 171 - 0
snowy-admin-web/src/views/biz/count/orderplan.vue

@@ -0,0 +1,171 @@
+<template>
+	<a-card>
+		<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="orderName">
+						<a-input v-model:value="searchFormState.orderName" placeholder="订单名称查询" />
+					</a-form-item>
+				</a-col>
+				<a-col :span="6">
+					<a-form-item label="订单编号" name="orderNumber">
+						<a-input v-model:value="searchFormState.orderNumber" placeholder="订单编号查询" />
+					</a-form-item>
+				</a-col>
+				<a-col :span="6">
+					<a-form-item label="客户名称" name="customerName">
+						<a-input v-model:value="searchFormState.customerName" placeholder="客户名称查询" />
+					</a-form-item>
+				</a-col>
+				<a-col :span="6">
+					<a-button type="primary" @click="query()">查询</a-button>
+					<a-button style="margin: 0 8px" @click="reset">重置</a-button>
+					<a-button type="dashed" class="snowy-buttom-left" @click="exportData()"><export-outlined />导出</a-button>
+<!--					<a @click="toggleAdvanced" style="margin-left: 8px">
+						{{ advanced ? '收起' : '展开' }}
+						<component :is="advanced ? 'up-outlined' : 'down-outlined'" />
+					</a>-->
+				</a-col>
+			</a-row>
+		</a-form>
+	</a-card>
+	<a-card style="margin-top: 5px">
+		<a-table
+			ref="tableRef"
+			:columns="columns"
+			:data-source="companyData"
+			bordered
+			:row-key="(record) => record.id"
+			:rowClassName="rowClassName"
+		>
+			<!--	:pagination="false"		-->
+			<template #bodyCell="{ column, record, index }">
+				<template v-if="column.dataIndex === 'serial'">
+					{{ index + 1 }}
+				</template>
+<!--				<template v-if="column.dataIndex === 'actualWeight'">
+					<span v-if="record.actualWeight>record.netWeight" style="color:red">{{ record.actualWeight}}</span>
+					<span v-else>{{ record.actualWeight}}</span>
+				</template>-->
+			</template>
+		</a-table>
+	</a-card>
+</template>
+
+<script setup name="receiptcount">
+	import { Modal } from 'ant-design-vue'
+	import { ref, onMounted } from 'vue'
+	import { cloneDeep } from 'lodash-es'
+	import bizRecordApi from '@/api/biz/bizRecordApi'
+	import downloadUtil from '@/utils/downloadUtil'
+	import bizOrderApi from "@/api/biz/bizOrderApi";
+
+
+	const searchFormRef = ref()
+	const searchFormState = ref({
+		times: [],
+		licensePlate: '',
+		goodsName: '',
+		receiptCompany: ''
+	})
+
+	onMounted(() => {
+		loadData()
+	})
+
+	// 查询区域显示更多控制
+	const advanced = ref(false)
+	const toggleAdvanced = () => {
+		advanced.value = !advanced.value
+	}
+	// 重置
+	const reset = () => {
+		searchFormRef.value.resetFields()
+	}
+	//表格相关
+	const columns = [
+		{
+			title: '序号',
+			width: 80,
+			dataIndex: 'serial',
+			align:'center'
+		},
+		{
+			title: '订单名称',
+			dataIndex: 'orderName',
+			align:'center'
+		},
+		{
+			title: '订单编号',
+			dataIndex: 'orderNumber',
+			align:'center'
+		},
+		{
+			title: '客户名称',
+			dataIndex: 'customerName',
+			align:'center'
+		},
+		{
+			title: '订单重量(吨)',
+			dataIndex: 'orderWeight',
+			align:'center'
+		},
+		{
+			title: '过磅重量(吨)',
+			dataIndex: 'netWeight',
+			align:'center'
+		},
+		{
+			title: '实际拖运重量(吨)',
+			dataIndex: 'actualWeight',
+			align:'center'
+		},
+	]
+	const companyData = ref([])
+	const loadData = () => {
+		const searchFormParam = cloneDeep(searchFormState.value)
+		bizOrderApi.getOrderTotal(searchFormParam).then((data) => {
+			companyData.value = data.records
+		})
+	}
+
+	// 根据条件设置行的类名
+	const rowClassName = (record, index) => {
+		// 如果 status 为 'inactive',则标红
+		console.log("record:"+JSON.stringify(record))
+		return record.actualWeight > record.netWeight ? 'highlight' : '';
+	};
+
+	const query = () => {
+		loadData()
+	}
+	// 导出
+	const exportData = () => {
+		const searchFormParam = cloneDeep(searchFormState.value)
+		Modal.confirm({
+			title: '提示',
+			content: '确定要导出订单计划统计记录吗?',
+			maskClosable: true,
+			onOk: () => {
+				bizOrderApi.exportRecordTotal(searchFormParam).then((res) => {
+					downloadUtil.resultDownload(res)
+				})
+			}
+		})
+	}
+</script>
+
+<style>
+/*.highlight {
+	animation: blink 2s infinite;
+}
+@keyframes blink {
+	0%, 100% { background-color: transparent; }
+	50% { background-color: red; }
+}*/
+
+.highlight {
+	background-color: red; /* 设置背景色为红色 */
+	/*color: white;*/ /* 可选:设置文字颜色为白色,以便更好地显示 */
+}
+</style>

+ 27 - 25
snowy-admin-web/src/views/biz/count/recordindex.vue

@@ -24,12 +24,12 @@
 						<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="receiptCompany">
-						<a-input v-model:value="searchFormState.receiptCompany" placeholder="请输入收货单位" />
+<!--				<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-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>
@@ -38,14 +38,14 @@
 					<a-form-item label="运输单位" name="transportCompany">
 						<a-input v-model:value="searchFormState.transportCompany" placeholder="请输入运输单位" />
 					</a-form-item>
-				</a-col>
+				</a-col>-->
 				<a-col :span="6">
 					<a-button type="primary" @click="query()">查询</a-button>
 					<a-button style="margin: 0 8px" @click="reset">重置</a-button>
-					<a @click="toggleAdvanced" style="margin-left: 8px">
+<!--					<a @click="toggleAdvanced" style="margin-left: 8px">
 						{{ advanced ? '收起' : '展开' }}
 						<component :is="advanced ? 'up-outlined' : 'down-outlined'" />
-					</a>
+					</a>-->
 				</a-col>
 			</a-row>
 		</a-form>
@@ -59,27 +59,27 @@
 			</a-col>
 			<a-col :span="6">
 				<a-card>
-					<a-statistic title="总净重" :value="totalNetWeight">
+					<a-statistic title="总毛重" :value="totalGrossWeight">
 						<template #suffix>
-							<span>t</span>
+							<span></span>
 						</template>
 					</a-statistic>
 				</a-card>
 			</a-col>
 			<a-col :span="6">
 				<a-card>
-					<a-statistic title="总毛重" :value="totalGrossWeight">
+					<a-statistic title="总皮重" :value="totalTareWeight">
 						<template #suffix>
-							<span>t</span>
+							<span></span>
 						</template>
 					</a-statistic>
 				</a-card>
 			</a-col>
 			<a-col :span="6">
 				<a-card>
-					<a-statistic title="总皮重" :value="totalTareWeight">
+					<a-statistic title="总净重" :value="totalNetWeight">
 						<template #suffix>
-							<span>t</span>
+							<span></span>
 						</template>
 					</a-statistic>
 				</a-card>
@@ -98,6 +98,7 @@
 	import { onMounted } from 'vue'
 	import { Column } from '@antv/g2plot'
 	import bizRecordApi from '@/api/biz/bizRecordApi'
+	import {cloneDeep} from "lodash-es";
 	const searchFormState = ref({
 		times: [],
 		licensePlate: '',
@@ -161,20 +162,21 @@
 		searchFormState.value.endDay = null
 	}
 	const query = () => {
-		if (Array.isArray(searchFormState.value.times) && searchFormState.value.times.length > 0) {
-			searchFormState.value.times = searchFormState.value.times.map((item) => item.format('YYYY-MM-DD'))
-			searchFormState.value.startDay = searchFormState.value.times[0]
-			searchFormState.value.endDay = searchFormState.value.times[1]
-			delete searchFormState.value.times
+		const searchFormParam = cloneDeep(searchFormState.value)
+		if (Array.isArray(searchFormParam.times) && searchFormParam.times.length > 0) {
+			searchFormParam.times = searchFormParam.times.map((item) => item.format('YYYY-MM-DD'))
+			searchFormParam.startDay = searchFormParam.times[0]
+			searchFormParam.endDay = searchFormParam.times[1]
+			delete searchFormParam.times
 		}
-		countData()
+		countData(searchFormParam)
 		return bizRecordApi
-			.bizRecordSevenDaysList(searchFormState.value)
+			.bizRecordSevenDaysList(Object.assign(searchFormParam))
 			.then((res) => {
 				sevenData.value = res || []
 				renderChart() // 查询成功后重新渲染图表
-				searchFormState.value.startDay = null
-				searchFormState.value.endDay = null
+				//searchFormState.value.startDay = null
+				//searchFormState.value.endDay = null
 			})
 			.catch((err) => {
 				console.error('查询失败:', err)
@@ -207,8 +209,8 @@
 		stackedColumnPlot.render()
 	}
 	// 统计
-	const countData = () => {
-		bizRecordApi.bizRecordCountWeight(searchFormState.value).then((res) => {
+	const countData = (param) => {
+		bizRecordApi.bizRecordCountWeight(param).then((res) => {
 			if (res) {
 				totalCar.value = res.totalCar
 				totalGrossWeight.value = res.totalGrossWeight

+ 172 - 0
snowy-admin-web/src/views/biz/count/vehicle.vue

@@ -0,0 +1,172 @@
+<template>
+	<a-card>
+		<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="times">
+						<a-range-picker
+							v-model:value="searchFormState.times"
+							:disabled-date="disabledDate"
+							format="YYYY-MM-DD"
+							@change="onChange"
+							@openChange="onOpenChange"
+							@calendarChange="onCalendarChange"
+						/>
+					</a-form-item>
+				</a-col>
+<!--				<a-col :span="6">
+					<a-form-item label="车牌号" name="licensePlate">
+						<a-input v-model:value="searchFormState.licensePlate" placeholder="请输入车牌号" />
+					</a-form-item>
+				</a-col>-->
+				<a-col :span="6">
+					<a-button type="primary" @click="query()">查询</a-button>
+					<a-button style="margin: 0 8px" @click="reset">重置</a-button>
+<!--					<a @click="toggleAdvanced" style="margin-left: 8px">
+						{{ advanced ? '收起' : '展开' }}
+						<component :is="advanced ? 'up-outlined' : 'down-outlined'" />
+					</a>-->
+				</a-col>
+			</a-row>
+		</a-form>
+	</a-card>
+	<div style="margin-top: 5px">
+		<a-card title="车辆执行状态分析" :bordered="false">
+			<div id="SevenDays"></div>
+		</a-card>
+	</div>
+</template>
+
+<script setup name="recordcount">
+	import { ref } from 'vue'
+	import { onMounted } from 'vue'
+	import { Column } from '@antv/g2plot'
+	import bizRecordApi from '@/api/biz/bizRecordApi'
+	import bizAppointmentRecordApi from "@/api/biz/bizAppointmentRecordApi";
+	import {cloneDeep} from "lodash-es";
+	const searchFormState = ref({
+		times: [],
+		licensePlate: '',
+		goodsName: '',
+		receiptCompany: '',
+		shippingCompany: '',
+		transportCompany: ''
+	})
+	const totalCar = ref(0)
+	const totalGrossWeight = ref(0)
+	const totalNetWeight = ref(0)
+	const totalTareWeight = ref(0)
+	const searchFormRef = ref()
+
+	// 查询区域显示更多控制
+	const advanced = ref(false)
+	const toggleAdvanced = () => {
+		advanced.value = !advanced.value
+	}
+	// 统计
+	const sevenData = ref([])
+	const loading = ref(true)
+	let stackedColumnPlot = null // 声明图表实例
+
+	onMounted(() => {
+		loadData()
+	})
+
+	//日期选择
+	const dates = ref()
+	const value = ref()
+	const hackValue = ref()
+	const disabledDate = (current) => {
+		if (!dates.value || dates.value.length === 0) {
+			return false
+		}
+		const tooLate = dates.value[0] && current.diff(dates.value[0], 'days') > 7
+		const tooEarly = dates.value[1] && dates.value[1].diff(current, 'days') > 7
+		return tooEarly || tooLate
+	}
+	const onOpenChange = (open) => {
+		if (open) {
+			dates.value = []
+			hackValue.value = []
+		} else {
+			hackValue.value = undefined
+		}
+	}
+	const onChange = (val) => {
+		console.log(val)
+		value.value = val
+	}
+	const onCalendarChange = (val) => {
+		dates.value = val
+	}
+
+	// 重置
+	const reset = () => {
+		searchFormRef.value.resetFields()
+		searchFormState.value.startDay = null
+		searchFormState.value.endDay = null
+	}
+	const query = () => {
+		const searchFormParam = cloneDeep(searchFormState.value)
+		if (Array.isArray(searchFormParam.times) && searchFormParam.times.length > 0) {
+			searchFormParam.times = searchFormParam.times.map((item) => item.format('YYYY-MM-DD'))
+			searchFormParam.beginTime = searchFormParam.times[0]
+			searchFormParam.endTime = searchFormParam.times[1]
+			delete searchFormParam.times
+		}
+		return bizAppointmentRecordApi
+			.gerVehicleTotal(Object.assign(searchFormParam))
+			.then((res) => {
+				sevenData.value = res || []
+				renderChart() // 查询成功后重新渲染图表
+				searchFormState.value.startDay = null
+				searchFormState.value.endDay = null
+			})
+			.catch((err) => {
+				console.error('查询失败:', err)
+				sevenData.value = [] // 如果请求失败,清空数据
+			})
+	}
+
+	const loadData = () => {
+		query().finally(() => {
+			loading.value = false
+			renderChart()
+		})
+	}
+
+	const renderChart = () => {
+		if (stackedColumnPlot) {
+			stackedColumnPlot.destroy() // 销毁旧的图表实例
+		}
+		stackedColumnPlot = new Column('SevenDays', {
+			data: sevenData.value, // 使用 sevenData.value
+			xField: 'status',
+			yField: 'count',
+			label: {
+				position: 'middle',
+				layout: [{ type: 'interval-adjust-position' }, { type: 'interval-hide-overlap' }, { type: 'adjust-color' }]
+			},
+			meta: {
+				status: {
+					alias: '状态'
+				},
+				count: {
+					alias: '车辆数'
+				}
+			}
+		})
+		stackedColumnPlot.render()
+	}
+	// 统计
+	const countData = () => {
+		bizRecordApi.bizRecordCountWeight(searchFormState.value).then((res) => {
+			if (res) {
+				totalCar.value = res.totalCar
+				totalGrossWeight.value = res.totalGrossWeight
+				totalNetWeight.value = res.totalNetWeight
+				totalTareWeight.value = res.totalTareWeight
+			}
+		})
+	}
+</script>

+ 28 - 11
snowy-admin-web/src/views/biz/customer/accountIndex.vue

@@ -22,9 +22,7 @@
 				</template>
 				<template v-if="column.dataIndex === 'action'">
 					<a-space>
-						<a-popconfirm title="确定要删除此账号吗?" v-if="hasPerm('customerAccountDelete')" @confirm="deleteCustomerAccount(record)">
-							<a-button type="link" danger size="small">删除</a-button>
-						</a-popconfirm>
+						<a-button type="link" danger size="small" v-if="hasPerm('customerAccountDelete')" @click="deleteConfig(record)">删除</a-button>
 					</a-space>
 				</template>
 			</template>
@@ -36,6 +34,9 @@
 <script setup name="accountForm">
 	import customerAccountApi from '@/api/biz/customerAccountApi'
 	import AccountAddForm from './accountAdd.vue'
+	import {ExclamationCircleOutlined} from '@ant-design/icons-vue';
+	import {Modal} from 'ant-design-vue';
+	import {createVNode} from 'vue';
 
 	const columns = [
 		{
@@ -50,6 +51,7 @@
 			dataIndex: 'loginAccount'
 		},
 	]
+	const submitLoading = ref(false)
 	const toolConfig = { refresh: true, height: false, columnSetting: false, striped: false }
 	// 默认是关闭状态
 	const visible = ref(false)
@@ -87,14 +89,29 @@
 		visible.value = false
 	}
 	// 删除
-	const deleteCustomerAccount = (record) => {
-		let params = [
-			{
-				id: record.id
-			}
-		]
-		customerAccountApi.customerAccountDelete(params).then(() => {
-			tableRef.value.refresh(true)
+	const deleteConfig = (record) => {
+		Modal.confirm({
+			title: '确定删除该数据吗?',
+			icon: createVNode(ExclamationCircleOutlined),
+			content: '',
+			onOk() {
+				submitLoading.value = true
+				let params = [
+					{
+						id: record.id
+					}
+				]
+
+				customerAccountApi
+					.customerAccountDelete(params)
+					.then(() => {
+						tableRef.value.refresh(true)
+					})
+					.finally(() => {
+						submitLoading.value = false
+					})
+			},
+			onCancel() {}
 		})
 	}
 	// 调用这个函数将子组件的一些数据和方法暴露出去

+ 31 - 19
snowy-admin-web/src/views/biz/customer/index.vue

@@ -4,12 +4,12 @@
 			<a-row :gutter="24">
 				<a-col :span="6">
 					<a-form-item label="客户名称" name="name">
-						<a-input v-model:value="searchFormState.name" placeholder="请输入客户名称" />
+						<a-input v-model:value="searchFormState.name" placeholder="查询客户名称" allow-clear  />
 					</a-form-item>
 				</a-col>
 				<a-col :span="6">
 					<a-form-item label="手机号" name="phone">
-						<a-input v-model:value="searchFormState.phone" placeholder="请输入手机号" />
+						<a-input v-model:value="searchFormState.phone" placeholder="查询手机号" allow-clear  />
 					</a-form-item>
 				</a-col>
 				<a-col :span="6">
@@ -40,9 +40,7 @@
 					<a-space>
 						<a @click="formRef.onOpen(record)" v-if="hasPerm('customerEdit')">编辑</a>
 						<a-divider type="vertical" v-if="hasPerm(['customerEdit', 'customerDelete'], 'and')" />
-						<a-popconfirm title="确定要删除吗?" @confirm="deleteCustomer(record)">
-							<a-button type="link" danger size="small" v-if="hasPerm('customerDelete')">删除</a-button>
-						</a-popconfirm>
+						<a-button type="link" danger size="small" v-if="hasPerm('customerDelete')" @click="deleteConfig(record)">删除</a-button>
 						<a-divider type="vertical" v-if="hasPerm(['customerEdit', 'customerDelete'], 'or') && hasPerm('customerAccount')" />
 						<a @click="accountFormRef.onOpen(record)" v-if="hasPerm('customerAccount')">账号管理</a>
 					</a-space>
@@ -59,11 +57,16 @@
 	import Form from './form.vue'
 	import AccountForm from './accountIndex.vue'
 	import customerApi from '@/api/biz/customerApi'
+	import {ExclamationCircleOutlined} from '@ant-design/icons-vue';
+	import {Modal} from 'ant-design-vue';
+	import {createVNode} from 'vue';
+
 	const searchFormState = ref({})
 	const searchFormRef = ref()
 	const tableRef = ref()
 	const formRef = ref()
 	const accountFormRef = ref()	
+	const submitLoading = ref(false)
 	const toolConfig = { refresh: true, height: true, columnSetting: true, striped: false }
 	const columns = [
 		{
@@ -134,20 +137,29 @@
 		tableRef.value.refresh(true)
 	}
 	// 删除
-	const deleteCustomer = (record) => {
-		let params = [
-			{
-				id: record.id
-			}
-		]
-		customerApi.customerDelete(params).then(() => {
-			tableRef.value.refresh(true)
-		})
-	}
-	// 批量删除
-	const deleteBatchCustomer = (params) => {
-		customerApi.customerDelete(params).then(() => {
-			tableRef.value.clearRefreshSelected()
+	const deleteConfig = (record) => {
+		Modal.confirm({
+			title: '确定删除该数据吗?',
+			icon: createVNode(ExclamationCircleOutlined),
+			content: '',
+			onOk() {
+				submitLoading.value = true
+				let params = [
+					{
+						id: record.id
+					}
+				]
+
+				customerApi
+					.customerDelete(params)
+					.then(() => {
+						tableRef.value.refresh(true)
+					})
+					.finally(() => {
+						submitLoading.value = false
+					})
+			},
+			onCancel() {}
 		})
 	}
 </script>

+ 2 - 2
snowy-admin-web/src/views/biz/goods/index.vue

@@ -4,12 +4,12 @@
 			<a-row :gutter="24">
 				<a-col :span="6">
 					<a-form-item label="货品编码" name="goodsCode">
-						<a-input v-model:value="searchFormState.goodsCode" placeholder="请输入货品编码" />
+						<a-input v-model:value="searchFormState.goodsCode" placeholder="查询货品编码" allow-clear  />
 					</a-form-item>
 				</a-col>
 				<a-col :span="6">
 					<a-form-item label="货品名称" name="goodsName">
-						<a-input v-model:value="searchFormState.goodsName" placeholder="请输入货品名称" />
+						<a-input v-model:value="searchFormState.goodsName" placeholder="查询货品名称" allow-clear  />
 					</a-form-item>
 				</a-col>
 				<a-col :span="6">

+ 4 - 1
snowy-admin-web/src/views/biz/goodsConf/addForm.vue

@@ -19,7 +19,7 @@
 			<a-form-item label="货物信息" name="goodsJson">
 				<a-row :gutter="24" class="form-row">
 					<a-col :span="12" class="form-row-con"> 货物 </a-col>
-					<a-col :span="8" class="form-row-con"> 最大提货重量(KG) </a-col>
+					<a-col :span="8" class="form-row-con"> 最大提货重量() </a-col>
 					<a-col :span="4" class="form-row-con">
 						<a-button type="primary" @click="addDomains()" size="small">
 							<PlusOutlined />
@@ -161,6 +161,9 @@
 					// 判断当前货品列表选择是否存在重复的
 					let goodsId = []
 					formDatas.goodsJson.map((item, index) => {
+						// 重量 吨 转成 公斤
+						let confWeight = Number(item.confWeight) * 1000
+						item.confWeight = confWeight;
 						if(goodsId.indexOf(item.goodsId)==-1){
 							goodsId.push(item.goodsId)
 						}else{

+ 5 - 1
snowy-admin-web/src/views/biz/goodsConf/editForm.vue

@@ -18,7 +18,7 @@
 			<a-form-item label="提货结束时间:" name="confEndTime">
 				<a-date-picker v-model:value="formData.confEndTime" value-format="YYYY-MM-DD HH:mm" show-time :disabled-date="disabledDate" style="width: 100%" />
 			</a-form-item>
-			<a-form-item label="最大提货重量(KG):" name="confWeight">
+			<a-form-item label="最大提货重量():" name="confWeight">
 				<a-input-number v-model:value="formData.confWeight" :min="formData.usedWeight" style="width: 100%;" placeholder="请输入最大提货重量" allow-clear />
 			</a-form-item>
 		</a-form>
@@ -64,6 +64,7 @@
 		if (record) {
 			let recordData = cloneDeep(record)
 			formData.value = Object.assign({}, recordData)
+			formData.value.confWeight = Number(formData.value.confWeight) / 1000
 		}
 	}
 	// 关闭抽屉
@@ -92,6 +93,9 @@
 					message.error('结束时间不得小于开始时间!')
 					return
 				}else{
+					// 重量 吨 转成 公斤
+					let confWeight = Number(formDataParam.confWeight) * 1000
+					formDataParam.confWeight = confWeight;
 					goodsConfApi
 					.goodsConfSubmitForm(formDataParam, formDataParam.id)
 					.then(() => {

+ 46 - 27
snowy-admin-web/src/views/biz/goodsConf/index.vue

@@ -4,24 +4,24 @@
 			<a-row :gutter="24">
 				<a-col :span="6">
 					<a-form-item label="货品名称" name="goodsName">
-						<a-input v-model:value="searchFormState.goodsName" placeholder="请输入货品名称" />
+						<a-input v-model:value="searchFormState.goodsName" placeholder="查询货品名称" allow-clear  />
 					</a-form-item>
 				</a-col>
 				<a-col :span="9">
 					<a-form-item label="提货开始时间" name="confStartTime">
-						<a-range-picker v-model:value="searchFormState.confStartTime" value-format="YYYY-MM-DD HH:mm" show-time />
+						<a-range-picker v-model:value="searchFormState.confStartTime" value-format="YYYY-MM-DD HH:mm" show-time allow-clear  />
 					</a-form-item>
 				</a-col>
 				<a-col :span="9">
 					<a-form-item label="提货结束时间" name="confEndTime">
-						<a-range-picker v-model:value="searchFormState.confEndTime" value-format="YYYY-MM-DD HH:mm" show-time />
+						<a-range-picker v-model:value="searchFormState.confEndTime" value-format="YYYY-MM-DD HH:mm" show-time allow-clear  />
 					</a-form-item>
 				</a-col>
 			</a-row>
 			<a-row :gutter="24">
 				<a-col :span="6">
 					<a-form-item label="货品编码" name="goodsCode">
-						<a-input v-model:value="searchFormState.goodsCode" placeholder="请输入货品名称" />
+						<a-input v-model:value="searchFormState.goodsCode" placeholder="查询货品名称" allow-clear  />
 					</a-form-item>
 				</a-col>
 				<a-col :span="9"></a-col>
@@ -49,17 +49,23 @@
 				<template v-if="column.dataIndex === 'serial'">
 					{{ index + 1 }}
 				</template>
+				<template v-if="column.dataIndex === 'confWeight'">
+					{{ record.confWeight / 1000 }}
+				</template>
+				<template v-if="column.dataIndex === 'usedWeight'">
+					{{ record.usedWeight / 1000 }}
+				</template>
+				<template v-if="column.dataIndex === 'lastWeight'">
+					{{ record.lastWeight / 1000 }}
+				</template>
 				<template v-if="column.dataIndex === 'action'">
 					<a-space>
 						<a @click="editFormRef.onOpen(record)" v-if="hasPerm('goodsConfEdit') && Number(record.usedWeight) == 0">编辑</a>
 
 						<a-divider type="vertical" v-if="hasPerm(['goodsConfEdit', 'goodsConfDelete'], 'and') && Number(record.usedWeight) == 0" />
-						<a-popconfirm title="确定要删除吗?" @confirm="deleteGoodsConf(record)">
-							<a-button type="link" danger size="small" v-if="hasPerm('goodsConfDelete') && Number(record.usedWeight) == 0">删除</a-button>
-						</a-popconfirm>
-
-						<a-divider type="vertical" v-if="(hasPerm(['goodsConfEdit', 'goodsConfDelete'], 'or') && Number(record.usedWeight) == 0) && hasPerm('goodsConfWeight')" />
-						<a @click="weightFormRef.onOpen(record)" v-if="hasPerm('goodsConfWeight')">重量</a>
+						<a-button type="link" danger size="small" v-if="hasPerm('goodsConfDelete') && Number(record.usedWeight) == 0" @click="deleteConfig(record)">删除</a-button>
+						
+						<a @click="weightFormRef.onOpen(record)" v-if="hasPerm('goodsConfWeight') && Number(record.usedWeight) != 0">重量</a>
 					</a-space>
 				</template>
 			</template>
@@ -76,6 +82,9 @@
 	import EditForm from './editForm.vue'
 	import WeightForm from './weightForm.vue'
 	import goodsConfApi from '@/api/biz/goodsConfApi'
+	import {ExclamationCircleOutlined} from '@ant-design/icons-vue';
+	import {Modal} from 'ant-design-vue';
+	import {createVNode} from 'vue';
 
 	const searchFormState = ref({})
 	const searchFormRef = ref()
@@ -83,6 +92,7 @@
 	const addFormRef = ref()
 	const editFormRef = ref()
 	const weightFormRef = ref()
+	const submitLoading = ref(false)
 
 	const toolConfig = { refresh: true, height: true, columnSetting: true, striped: false }
 	const columns = [
@@ -122,19 +132,19 @@
 			align:'center'
 		},
 		{
-			title: '可提重量(KG)',
+			title: '可提重量()',
 			width: 110,
 			dataIndex: 'confWeight',
 			align:'center'
 		},
 		{
-			title: '已提重量(KG)',
+			title: '已提重量()',
 			width: 110,
 			dataIndex: 'usedWeight',
 			align:'center'
 		},
 		{
-			title: '剩余重量(KG)',
+			title: '剩余重量()',
 			width: 110,
 			dataIndex: 'lastWeight',
 			align:'center'
@@ -189,20 +199,29 @@
 		tableRef.value.refresh(true)
 	}
 	// 删除
-	const deleteGoodsConf = (record) => {
-		let params = [
-			{
-				id: record.id
-			}
-		]
-		goodsConfApi.goodsConfDelete(params).then(() => {
-			tableRef.value.refresh(true)
-		})
-	}
-	// 批量删除
-	const deleteBatchGoodsConf = (params) => {
-		goodsConfApi.goodsConfDelete(params).then(() => {
-			tableRef.value.clearRefreshSelected()
+	const deleteConfig = (record) => {
+		Modal.confirm({
+			title: '确定删除该数据吗?',
+			icon: createVNode(ExclamationCircleOutlined),
+			content: '',
+			onOk() {
+				submitLoading.value = true
+				let params = [
+					{
+						id: record.id
+					}
+				]
+
+				goodsConfApi
+					.goodsConfDelete(params)
+					.then(() => {
+						tableRef.value.refresh(true)
+					})
+					.finally(() => {
+						submitLoading.value = false
+					})
+			},
+			onCancel() {}
 		})
 	}
 </script>

+ 15 - 7
snowy-admin-web/src/views/biz/goodsConf/weightForm.vue

@@ -10,18 +10,18 @@
 			<a-descriptions-item label="货品编码" :span="4">{{ formData.goodsCode }}</a-descriptions-item>
 			<a-descriptions-item label="货品信息" :span="4">{{ formData.goodsName }} ( {{ formData.goodsModel }} )</a-descriptions-item>
 			<a-descriptions-item label="提货时间段" :span="4">{{ formData.confStartTime }} ~ {{ formData.confEndTime }}</a-descriptions-item>
-			<a-descriptions-item label="原最大提货重量" :span="4">{{ confWeight }} KG</a-descriptions-item>
-			<a-descriptions-item label="已提货重量" :span="4">{{ formData.usedWeight }} KG</a-descriptions-item>
-			<a-descriptions-item label="剩余提货重量" :span="4">{{ formData.lastWeight }} KG</a-descriptions-item>
+			<a-descriptions-item label="原最大提货重量" :span="4">{{ confWeight }} </a-descriptions-item>
+			<a-descriptions-item label="已提货重量" :span="4">{{ usedWeight }} 吨</a-descriptions-item>
+			<a-descriptions-item label="剩余提货重量" :span="4">{{ lastWeight }} 吨</a-descriptions-item>
 		</a-descriptions>
 
 		<a-form ref="formRef" :model="formData" :rules="formRules" :wrapper-col="wrapperCol" :label-col="labelCol">
-			<a-form-item label="最大提货重量(KG):" name="confWeight">
-				<a-input-number v-model:value="formData.confWeight" :min="formData.usedWeight" style="width: 100%;" placeholder="请输入最大提货重量" allow-clear />
+			<a-form-item label="最大提货重量(吨):" name="confWeight">
+				<a-input-number v-model:value="formData.confWeight" :min="usedWeight" style="width: 100%;" placeholder="请输入最大提货重量" allow-clear />
 			</a-form-item>
 		</a-form>
 
-		<div style="color: red;">提示:不得小于当前已提货重量 {{ formData.usedWeight }} KG</div>
+		<div style="color: red;">提示:不得小于当前已提货重量 {{ usedWeight }} 吨</div>
 
 		<template #footer>
 			<a-button style="margin-right: 8px" @click="onClose">关闭</a-button>
@@ -42,6 +42,8 @@
 	const formData = ref({})
 	const submitLoading = ref(false)
 	const confWeight = ref("")
+	const usedWeight = ref("")
+	const lastWeight = ref("")	
 
 	//设置表单样式
 	const labelCol = ref({ span: 5})
@@ -53,7 +55,10 @@
 		if (record) {
 			let recordData = cloneDeep(record)
 			formData.value = Object.assign({}, recordData)
-			confWeight.value = formData.value.confWeight
+			confWeight.value = Number(formData.value.confWeight) / 1000
+			usedWeight.value = Number(formData.value.usedWeight) / 1000
+			lastWeight.value = Number(formData.value.lastWeight) / 1000
+			formData.value.confWeight = Number(formData.value.confWeight) / 1000
 		}
 	}
 	// 关闭抽屉
@@ -73,6 +78,9 @@
 			.then(() => {
 				submitLoading.value = true
 				const formDataParam = cloneDeep(formData.value)
+				// 重量 吨 转成 公斤
+				let confWeight = Number(formDataParam.confWeight) * 1000
+				formDataParam.confWeight = confWeight;
 				goodsConfApi
 					.goodsConfSubmitForm(formDataParam, formDataParam.id)
 					.then(() => {

+ 24 - 14
snowy-admin-web/src/views/biz/record/detail.vue

@@ -1,6 +1,6 @@
 <template>
 	<xn-form-container
-		:title="'过磅记录详情'"
+		:title="'详情'"
 		:width="1200"
 		v-model:open="open"
 		:destroy-on-close="true"
@@ -10,9 +10,9 @@
 			<a-descriptions-item span="3" label="车次编码">{{ formData.carNumber }}</a-descriptions-item>
 			<a-descriptions-item label="车牌号码">{{ formData.licensePlate }}</a-descriptions-item>
 			<a-descriptions-item span="2" label="车牌颜色">{{ formData.plateColor }}</a-descriptions-item>
-			<a-descriptions-item label="发货单位">{{ formData.shippingCompany }}</a-descriptions-item>
+<!--			<a-descriptions-item label="发货单位">{{ formData.shippingCompany }}</a-descriptions-item>
 			<a-descriptions-item label="收货单位">{{ formData.receiptCompany }}</a-descriptions-item>
-			<a-descriptions-item label="运输单位">{{ formData.transportCompany }}</a-descriptions-item>
+			<a-descriptions-item label="运输单位">{{ formData.transportCompany }}</a-descriptions-item>-->
 			<!-- <a-descriptions-item label="运输路线">{{ formData.transportRoute }}</a-descriptions-item> -->
 			<a-descriptions-item label="货品名称">{{ formData.goodsName }}</a-descriptions-item>
 			<a-descriptions-item label="货品规格">{{ formData.goodsModel }}</a-descriptions-item>
@@ -27,13 +27,13 @@
 		<a-divider></a-divider>
 		<a-descriptions>
 			<a-descriptions-item label="毛重"
-				><a-tag color="blue">{{ formData.grossWeight }} KG</a-tag></a-descriptions-item
+				><a-tag color="blue">{{ formData.grossWeight }} </a-tag></a-descriptions-item
 			>
 			<a-descriptions-item label="皮重"
-				><a-tag color="orange">{{ formData.tareWeight }} KG</a-tag></a-descriptions-item
+				><a-tag color="orange">{{ formData.tareWeight }} </a-tag></a-descriptions-item
 			>
 			<a-descriptions-item label="净重"
-				><a-tag color="green">{{ formData.netWeight }} KG</a-tag></a-descriptions-item
+				><a-tag color="green">{{ formData.netWeight }} </a-tag></a-descriptions-item
 			>
 		</a-descriptions>
 		<a-divider></a-divider>
@@ -71,25 +71,25 @@
 			<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 title="司机确认" style="margin-top: 15px">
 		</a-descriptions>
 		<a-space>
 			<a-image :width="200" :src="formData.driverSign" />
 		</a-space>
-		<a-divider></a-divider>
-		<a-descriptions title="司机回签" style="margin-top: 15px">
-			<a-descriptions-item label="卸货重量"><a-tag color="green">{{ formData.unloadWeight }} KG</a-tag></a-descriptions-item>
+		<a-divider v-if="formData.orderType == '1'"></a-divider>
+		<a-descriptions title="司机回签" style="margin-top: 15px" v-if="formData.orderType == '1'">
+			<a-descriptions-item label="卸货重量"><a-tag color="green">{{ formData.unloadWeight }} </a-tag></a-descriptions-item>
 		</a-descriptions>
-		<a-space>
+		<a-space v-if="formData.orderType == '1'">
 			<div v-for="(item,index) in fileList " :key="item.value">
 				<a-image :width="200" :src="item.url" />
 			</div>
 
 		</a-space>
-		<a-divider></a-divider>
-		<a-descriptions title="平台手签" style="margin-top: 15px">
+		<a-divider v-if="formData.orderType == '1'"></a-divider>
+		<a-descriptions title="签收审核" style="margin-top: 15px" v-if="formData.orderType == '1'">
 		</a-descriptions>
-		<a-space>
+		<a-space v-if="formData.orderType == '1'">
 			<a-image :width="200" :src="formData.auditSign" />
 		</a-space>
 		<template #footer>
@@ -113,6 +113,7 @@
 	// const submitLoading = ref(false)
 	const tareTypeOptions = ref([])
 
+	const fileList = ref([])
 	// 打开抽屉
 	const onOpen = (record) => {
 		open.value = true
@@ -126,6 +127,15 @@
 			})*/
 			let recordData = cloneDeep(record)
 			formData.value = Object.assign({}, recordData)
+			fileList.value = []
+			if(formData.value.unloadImg!=null){
+				for (var i=0;i<formData.value.unloadImg.split(',').length;i++){
+					fileList.value.push({
+						name: formData.value.unloadName.split(',')[i],
+						url:sysConfig.PREVIEW_PATH + formData.value.unloadImg.split(',')[i]
+					})
+				}
+			}
 			if(formData.value.grossPlateName.includes("http://218.2.6.74:8065")){
 				console.log("str:"+formData.value.grossPlateName.indexOf("preview/"))
 				formData.value.grossPlateName = formData.value.grossPlateName.replace("http://218.2.6.74:8065/preview/",sysConfig.PREVIEW_PATH)

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

@@ -49,7 +49,7 @@
 							<a-input v-model:value="searchFormState.goodsModel" placeholder="请输入规格型号" />
 						</a-form-item>
 					</a-col>
-					<a-col :span="6" v-show="advanced">
+<!--					<a-col :span="6" v-show="advanced">
 						<a-form-item label="收货单位" name="receiptCompany">
 							<a-input v-model:value="searchFormState.receiptCompany" placeholder="请输入收货单位" />
 						</a-form-item>
@@ -63,7 +63,7 @@
 						<a-form-item label="运输单位" name="transportCompany">
 							<a-input v-model:value="searchFormState.transportCompany" placeholder="请输入运输单位" />
 						</a-form-item>
-					</a-col>
+					</a-col>-->
 					<a-col :span="6" v-show="advanced">
 						<a-form-item label="订单编号" name="orderNumber">
 							<a-input v-model:value="searchFormState.orderNumber" placeholder="请输入订单编号" />
@@ -177,7 +177,7 @@
 					<a-space>
 						<a @click="detailRef.onOpen(record)">详情</a>
 						<a-divider type="vertical" v-if="hasPerm('bizRecordDriverConfirm')" />
-						<a @click="XnSignNameRef.show(record.id)" v-if="hasPerm('bizRecordDriverConfirm') && record.status == '8'">司机确认</a>
+<!--						<a @click="XnSignNameRef.show(record.id)" v-if="hasPerm('bizRecordDriverConfirm') && record.status == '8'">司机确认</a>-->
 						<XnSignName ref="XnSignNameRef" :image="searchFormState.driverSign" @successful="signSuccess" />
 						<a-divider type="vertical" v-if="hasPerm(['bizGoodsEdit', 'bizGoodsDelete'], 'and')" />
 						<a-popconfirm title="确定要删除吗?" @confirm="cancellationBizRecord(record)">
@@ -230,7 +230,7 @@
 			width: '130px'
 		},
 		{
-			title: '重量(KG)',
+			title: '重量()',
 			dataIndex: 'weight',
 			align: 'center'
 		},
@@ -239,8 +239,9 @@
 			dataIndex: 'orderInfo'
 		},
 		{
-			title: '收发货单位',
-			dataIndex: 'company'
+			title: '客户名称',
+			dataIndex: 'customerName',
+			align:'center'
 		},
 		{
 			title: '货品',
@@ -253,14 +254,13 @@
 		}
 	]
 	// 操作栏通过权限判断是否显示
-	if (hasPerm(['bizRecordEdit', 'bizRecordDelete', 'bizRecordDetail'])) {
-		columns.push({
-			title: '操作',
-			dataIndex: 'action',
-			align: 'center',
-			width: 150
-		})
-	}
+	columns.push({
+		title: '操作',
+		dataIndex: 'action',
+		align: 'center',
+		width: 150
+	})
+
 
 	const loadData = (parameter) => {
 		const searchFormParam = cloneDeep(searchFormState.value)

+ 7 - 5
snowy-admin-web/src/views/biz/supplier/index.vue

@@ -1,15 +1,15 @@
 <template>
-	<a-card :bordered="false">
+	<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="searchKey">
-						<a-input v-model:value="searchFormState.searchKey" placeholder="请输入供货商名称" />
+					<a-form-item label="供货商名称" name="supplierName">
+						<a-input v-model:value="searchFormState.supplierName" placeholder="查询供货商名称" allow-clear  />
 					</a-form-item>
 				</a-col>
 				<a-col :span="6">
-					<a-form-item label="联系方式" name="searchKey">
-						<a-input v-model:value="searchFormState.searchKey" placeholder="请输入联系方式" />
+					<a-form-item label="联系人" name="supplierContactName">
+						<a-input v-model:value="searchFormState.supplierContactName" placeholder="查询联系人" allow-clear  />
 					</a-form-item>
 				</a-col>
 				<a-col :span="6">
@@ -23,6 +23,8 @@
 				</a-col>
 			</a-row>
 		</a-form>
+	</a-card>
+	<a-card :bordered="false">
 		<s-table
 			ref="tableRef"
 			:columns="columns"

+ 6 - 0
snowy-common/src/main/java/vip/xiaonuo/common/prop/CommonProperties.java

@@ -47,6 +47,12 @@ public class CommonProperties {
     private String officialAppId;
     private String officialAeskey;
     private String officialSecret;
+    private String officialTemplete;
+
+    /**小程序*/
+    private String programAppId;
+
+    private String programSecret;
 
 
 }

+ 7 - 0
snowy-plugin-api/snowy-plugin-auth-api/src/main/java/vip/xiaonuo/auth/core/pojo/SaBaseLoginUser.java

@@ -247,6 +247,13 @@ public abstract class SaBaseLoginUser {
     @Schema(description = "用户密码hash值")
     private String password;
 
+    /**客户id*/
+    private String customerId;
+
+    private String openId;
+
+    private String unionId;
+
     /** 是否可登录,由继承类实现 */
     public abstract Boolean getEnabled();
 

+ 54 - 5
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/api/controller/ApiController.java

@@ -1,23 +1,34 @@
 package vip.xiaonuo.biz.modular.api.controller;
 
+import cn.hutool.core.util.ObjectUtil;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import jakarta.annotation.Resource;
 import jakarta.servlet.http.HttpServletRequest;
 import jakarta.servlet.http.HttpServletResponse;
+import lombok.extern.slf4j.Slf4j;
+import org.bouncycastle.asn1.ocsp.ResponseData;
 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.RestController;
+import org.springframework.web.bind.annotation.*;
+import vip.xiaonuo.auth.core.pojo.SaBaseLoginUser;
+import vip.xiaonuo.biz.modular.api.param.WeiXinRes;
+import vip.xiaonuo.biz.modular.api.param.WxUserParam;
 import vip.xiaonuo.biz.modular.api.service.ApiService;
+import vip.xiaonuo.biz.modular.user.entity.BizUser;
+import vip.xiaonuo.biz.modular.user.service.BizUserService;
 import vip.xiaonuo.biz.modular.utils.SignUtil;
+import vip.xiaonuo.common.exception.CommonException;
+import vip.xiaonuo.common.pojo.CommonResult;
 import vip.xiaonuo.common.prop.CommonProperties;
 
 import java.io.IOException;
 import java.io.PrintWriter;
+import java.util.HashMap;
+import java.util.Map;
 
 @Tag(name = "微信公众号")
 @RestController
 @Validated
+@Slf4j
 public class ApiController {
 
     @Resource
@@ -26,12 +37,15 @@ public class ApiController {
     @Resource
     private ApiService apiService;
 
+    @Resource
+    private BizUserService bizUserService;
+
     /***
      * 微信公众号验证接口
      * @param request
      * @param response
      */
-    @GetMapping("/api/wxOpen")
+    @GetMapping("/follow/wxOpen")
     public void get(HttpServletRequest request, HttpServletResponse response) {
         // 微信加密签名,signature结合了开发者填写的token参数和请求中的timestamp参数、nonce参数。
         String signature = request.getParameter("signature");
@@ -64,8 +78,43 @@ public class ApiController {
      * @param request
      * @param response
      */
-    @PostMapping("/api/wxOpen")
+    @PostMapping("/follow/wxOpen")
     public void officialCallback(HttpServletRequest request, HttpServletResponse response) {
         apiService.officialCallback(request, response);
     }
+
+
+    /**
+     * 微信小程序 _绑定公众号操作
+     *
+     * @param
+     * @return
+     */
+    @ResponseBody
+    @PostMapping("/wx/bindingWX")
+    public CommonResult<String> bindingWX(@RequestBody WxUserParam wxUserParam) {
+        log.info("==========用户ID:" + wxUserParam.getId() + "==========");
+        log.info("==========微信js_Code:" + wxUserParam.getJs_code() + "==========");
+
+        BizUser user = bizUserService.queryEntity(wxUserParam.getId());
+
+        //Js_code 去交换 openId
+        String js_code = wxUserParam.getJs_code();
+        Map<String, Object> param = new HashMap<>(1);
+        param.put("js_code", js_code);
+        String res = apiService.weiXinSend(param);
+        log.info("==========微信绑定接口返回:" + res + "==========");
+        //解析微信返回内容
+        WeiXinRes weiXinRes = new WeiXinRes().weixinResgistRes(res);
+        if (!weiXinRes.getErrcode().equals(0)) {
+            throw new CommonException(weiXinRes.getErrcode(), weiXinRes.getErrmsg());
+        }
+        log.info("==========微信绑定接口返回OpenId:" + weiXinRes.getOpenid() + "==========");
+        log.info("==========微信绑定接口返回UnionId:" + weiXinRes.getUnionid() + "==========");
+        user.setOpenId(weiXinRes.getOpenid());
+        user.setUnionId(weiXinRes.getUnionid());
+        bizUserService.updateById(user);
+        return CommonResult.ok();
+    }
+
 }

+ 39 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/api/param/WechatTemplateMsg.java

@@ -0,0 +1,39 @@
+package vip.xiaonuo.biz.modular.api.param;
+
+import lombok.Data;
+
+import java.util.HashMap;
+import java.util.TreeMap;
+
+@Data
+public class WechatTemplateMsg {
+
+    private String touser; //接收者openid
+
+    private String template_id; //模板ID
+
+    private String page; //模板跳转链接
+
+    private String miniprogram_state;
+    // 跳小程序所需数据
+    private HashMap<String, String> miniprogram;
+
+    private TreeMap<String, TreeMap<String, String>> data; //data数据
+
+    /**
+     * 参数
+     *
+     * @param value
+     * @return
+     */
+    public static TreeMap<String, String> item(String value) {
+        TreeMap<String, String> params = new TreeMap<String, String>();
+        params.put("value", value);
+        return params;
+    }
+
+    private String appidReq;
+
+    private String secretReq;
+
+}

+ 116 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/api/param/WeiXinRes.java

@@ -0,0 +1,116 @@
+package vip.xiaonuo.biz.modular.api.param;
+
+import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.fastjson.JSONObject;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @Title: WeiXinRes
+ * @Package cn.stylefeng.guns.sys.modular.member.entity
+ * @Description: (微信获取openid返回结果)
+ * @Author: zhangfuqiang
+ * @Date: 2020/5/18 17:20
+ * @Version V1.0
+ */
+public class WeiXinRes {
+
+    private Integer errcode;
+    private String errmsg;
+    private String openid;
+    private String session_key;
+    private String unionid;
+
+
+    Map<String, Object> param = new HashMap<>();
+
+    public WeiXinRes() {
+        param.put("-1", "系统繁忙,请稍候再试");
+        param.put("0", "请求成功");
+        param.put("40029", "code 无效");
+        param.put("45011", "频率限制,每个用户每分钟100次");
+    }
+
+    /**
+     * 结果转换
+     *
+     * @param res
+     */
+    public WeiXinRes weixinResgistRes(String res) {
+        JSONObject result = JSONObject.parseObject(res);
+        WeiXinRes weiXinRes = new WeiXinRes();
+        if (ObjectUtil.isNotEmpty(result.get("openid"))) {
+            weiXinRes.setOpenid(result.get("openid").toString());
+            weiXinRes.setSession_key(result.get("session_key").toString());
+            weiXinRes.setErrcode(0);
+            if (ObjectUtil.isNotEmpty(result.get("unionid"))) {
+                weiXinRes.setUnionid(result.get("unionid").toString());
+            }
+        } else if (ObjectUtil.isNotEmpty(result.get("errcode"))) {
+            weiXinRes.setErrcode(Integer.parseInt(result.get("errcode").toString()));
+            weiXinRes.setErrmsg(result.get("errmsg").toString());
+        }
+        return weiXinRes;
+    }
+
+    public void setErrcode(Integer errcode) {
+        this.errcode = errcode;
+    }
+
+    public void setErrmsg(String errmsg) {
+        this.errmsg = errmsg;
+    }
+
+    public void setOpenid(String openid) {
+        this.openid = openid;
+    }
+
+    public void setSession_key(String session_key) {
+        this.session_key = session_key;
+    }
+
+    public void setUnionid(String unionid) {
+        this.unionid = unionid;
+    }
+
+    public void setParam(Map<String, Object> param) {
+        this.param = param;
+    }
+
+    public Integer getErrcode() {
+        return errcode;
+    }
+
+    public String getErrmsg() {
+        return errmsg;
+    }
+
+    public String getOpenid() {
+        return openid;
+    }
+
+    public String getSession_key() {
+        return session_key;
+    }
+
+    public String getUnionid() {
+        return unionid;
+    }
+
+    public Map<String, Object> getParam() {
+        return param;
+    }
+
+    @Override
+    public String toString() {
+        return "WeiXinRes{" +
+                "errcode='" + errcode + '\'' +
+                ", errmsg='" + errmsg + '\'' +
+                ", openid='" + openid + '\'' +
+                ", session_key='" + session_key + '\'' +
+                ", unionid='" + unionid + '\'' +
+                ", param=" + param +
+                '}';
+    }
+}

+ 23 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/api/param/WxUserMsgParam.java

@@ -0,0 +1,23 @@
+package vip.xiaonuo.biz.modular.api.param;
+
+import lombok.Data;
+
+@Data
+public class WxUserMsgParam {
+    /**模板id*/
+    private String templateId;
+    /**openId*/
+    private String openId;
+    /**模板参数1*/
+    private String param1;
+    /**模板参数1对应值*/
+    private String paramData1;
+    /**模板参数2*/
+    private String param2;
+    /**模板参数2对应值*/
+    private String paramData2;
+    /**模板参数3*/
+    private String param3;
+    /**模板参数3对应值*/
+    private String paramData3;
+}

+ 16 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/api/param/WxUserParam.java

@@ -0,0 +1,16 @@
+package vip.xiaonuo.biz.modular.api.param;
+
+import lombok.Data;
+
+@Data
+public class WxUserParam {
+
+    private String js_code;
+
+
+    /*
+     * 账号的主键ID
+     *
+     * */
+    private String id;
+}

+ 126 - 3
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/api/service/ApiService.java

@@ -10,16 +10,26 @@ import jakarta.servlet.http.HttpServletRequest;
 import jakarta.servlet.http.HttpServletResponse;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
+import vip.xiaonuo.biz.modular.api.param.WechatTemplateMsg;
+import vip.xiaonuo.biz.modular.api.param.WxUserMsgParam;
+import vip.xiaonuo.biz.modular.oawxsendlog.entity.OaWxSendLog;
+import vip.xiaonuo.biz.modular.oawxsendlog.service.OaWxSendLogService;
 import vip.xiaonuo.biz.modular.officialinfo.entity.OfficialInfo;
 import vip.xiaonuo.biz.modular.officialinfo.service.OfficialInfoService;
+import vip.xiaonuo.biz.modular.utils.HttpClientUtil;
 import vip.xiaonuo.biz.modular.utils.MsgUtil;
 import vip.xiaonuo.biz.modular.utils.XmlUtil;
 import vip.xiaonuo.common.exception.CommonException;
 import vip.xiaonuo.common.prop.CommonProperties;
 
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
 import java.io.PrintWriter;
-import java.util.Date;
-import java.util.Map;
+import java.io.UnsupportedEncodingException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.net.URLEncoder;
+import java.util.*;
 
 @Slf4j
 @Service
@@ -30,6 +40,8 @@ public class ApiService {
 
     @Resource
     private CommonProperties commonProperties;
+    @Resource
+    private OaWxSendLogService oaWxSendLogService;
 
     public static JSONObject wx_token_map = new JSONObject();
 
@@ -108,7 +120,7 @@ public class ApiService {
 
     /**
      * 微信公众号的appid以及sercet
-     *
+     * 获取微信用户信息
      * @param openId
      * @return
      */
@@ -164,4 +176,115 @@ public class ApiService {
         }
         return token;
     }
+
+    public String weiXinSend(Map<String, Object> param) {
+        String newParam = transferParam(param);
+        return sendGet("https://api.weixin.qq.com/sns/jscode2session", newParam);
+    }
+
+    public String transferParam(Map<String, Object> param) {
+        if (param.size() < 0) {
+            return null;
+        }
+        String resultPam = "appid=" + commonProperties.getProgramAppId() + "&secret=" + commonProperties.getProgramSecret() + "&grant_type=" + "authorization_code";
+        System.out.println(resultPam);
+        for (Map.Entry<String, Object> vo : param.entrySet()) {
+            resultPam += "&" + vo.getKey() + "=" + vo.getValue();
+        }
+        return resultPam;
+    }
+
+
+    public String sendGet(String url, String param) {
+        log.info("======绑定微信接口url:" + url + "=======");
+        log.info("======绑定微信接口入参:" + param + "=======");
+        String result = "";
+        BufferedReader in = null;
+        try {
+            String urlNameString = url + "?" + param;
+            log.info("=======绑定微信接口地址:" + urlNameString + "========");
+            URL realUrl = new URL(urlNameString);
+            // 打开和URL之间的连接
+            URLConnection connection = realUrl.openConnection();
+            // 设置通用的请求属性
+            connection.setRequestProperty("accept", "*/*");
+            connection.setRequestProperty("connection", "Keep-Alive");
+            connection.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
+            // 建立实际的连接
+            connection.connect();
+            // 获取所有响应头字段
+            Map<String, List<String>> map = connection.getHeaderFields();
+            // 定义 BufferedReader输入流来读取URL的响应
+            in = new BufferedReader(new InputStreamReader(
+                    connection.getInputStream()));
+            String line;
+            while ((line = in.readLine()) != null) {
+                result += line;
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        // 使用finally块来关闭输入流
+        finally {
+            try {
+                if (in != null)
+                    in.close();
+            } catch (Exception e2) {
+                e2.printStackTrace();
+            }
+        }
+        return result;
+    }
+
+
+    /**
+     * @param
+     * @param
+     * @return
+     */
+    public void sendProjectExpireMsg(OaWxSendLog wxSendLog, WxUserMsgParam wxUserMsgParam) {
+        WechatTemplateMsg wechatTemplateMsg = new WechatTemplateMsg();
+        wechatTemplateMsg.setTemplate_id(wxUserMsgParam.getTemplateId());
+        wechatTemplateMsg.setTouser(wxUserMsgParam.getOpenId());
+        HashMap<String, String> miniprogram = new HashMap<>();
+        miniprogram.put("appid", commonProperties.getProgramAppId());
+        //miniprogram.put("pagepath", "pages/appointment/list");
+        wechatTemplateMsg.setMiniprogram(miniprogram);
+
+        TreeMap<String, TreeMap<String, String>> params = new TreeMap<>();
+        //根据具体模板参数组装
+        if(ObjectUtil.isNotEmpty(wxUserMsgParam.getParam1())){
+            params.put(wxUserMsgParam.getParam1(), WechatTemplateMsg.item(wxUserMsgParam.getParamData1()));
+        }
+        if(ObjectUtil.isNotEmpty(wxUserMsgParam.getParam2())){
+            params.put(wxUserMsgParam.getParam2(), WechatTemplateMsg.item(wxUserMsgParam.getParamData2()));
+        }
+        if(ObjectUtil.isNotEmpty(wxUserMsgParam.getParam3())){
+            params.put(wxUserMsgParam.getParam3(), WechatTemplateMsg.item(wxUserMsgParam.getParamData3()));
+        }
+        wechatTemplateMsg.setData(params);
+        log.info("==========公众号appId:"+commonProperties.getOfficialAppId()+"==========");
+        wechatTemplateMsg.setAppidReq(commonProperties.getOfficialAppId());
+        log.info("==========公众号密钥:"+commonProperties.getOfficialSecret()+"==========");
+        wechatTemplateMsg.setSecretReq(commonProperties.getOfficialSecret());
+
+        log.info(JSONObject.toJSONString(wechatTemplateMsg));
+
+        StringBuffer url = new StringBuffer("https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=");
+        try {
+            url.append(URLEncoder.encode(getAccessToken(
+                    wechatTemplateMsg.getAppidReq(), wechatTemplateMsg.getSecretReq()), "UTF-8"));
+            log.info("==========公众号发送通知url:"+url+"==========");
+            String result = HttpClientUtil.doPostJson(url.toString(), JSONObject.toJSONString(wechatTemplateMsg));
+            log.info("==========send WxMsg :{}", JSONObject.toJSONString(result));
+            if (ObjectUtil.isNotNull(wxSendLog)) {
+                wxSendLog.setSendMsg(JSONObject.toJSONString(wechatTemplateMsg));
+                wxSendLog.setBackMsg(JSONObject.toJSONString(result));
+                oaWxSendLogService.save(wxSendLog);
+            }
+        } catch (UnsupportedEncodingException e) {
+            log.info("----模板消息发送失败-----");
+            e.printStackTrace();
+        }
+    }
 }

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

@@ -41,6 +41,7 @@ import jakarta.validation.constraints.NotEmpty;
 
 import java.io.IOException;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 预约记录控制器
@@ -145,6 +146,7 @@ public class BizAppointmentRecordController {
      * 导出预约报表
      */
     @Operation(summary = "导出预约报表")
+    @SaCheckPermission("/biz/bizappointmentrecord/exportRecord")
     @GetMapping(value = "/biz/bizappointmentrecord/exportRecord", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
     public void exportRecord(BizAppointmentRecordPageParam bizAppointmentRecordPageParam, HttpServletResponse response) throws IOException {
         bizAppointmentRecordService.exportRecord(bizAppointmentRecordPageParam,response);
@@ -196,4 +198,14 @@ public class BizAppointmentRecordController {
         bizAppointmentRecordService.adjustOrder(bizAppointmentRecordEditParam);
         return CommonResult.ok();
     }
+
+    /**
+     * 车辆执行状态分析
+     */
+    @Operation(summary = "车辆执行状态分析")
+    @CommonLog("车辆执行状态分析")
+    @GetMapping("/biz/bizappointmentrecord/gerVehicleTotal")
+    public CommonResult<List<Map<String,Object>>> gerVehicleTotal(BizAppointmentRecordPageParam bizAppointmentRecordPageParam){
+        return CommonResult.data(bizAppointmentRecordService.gerVehicleTotal(bizAppointmentRecordPageParam));
+    }
 }

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

@@ -107,7 +107,7 @@ public class BizAppointmentRecord extends CommonEntity {
 
     /**超限重量*/
     @TableField(exist = false)
-    private Integer overWeight;
+    private BigDecimal overWeight;
 
     /**订单重量校验*/
     @TableField(exist = false)
@@ -116,4 +116,35 @@ public class BizAppointmentRecord extends CommonEntity {
     @TableField(exist = false)
     /**车辆轴数*/
     private Integer axleNumber;
+
+    /**过磅记录id*/
+    @TableField(exist = false)
+    private String recordId;
+
+    /**排队号*/
+    private Integer queueNumber;
+
+    @TableField(exist = false)
+    /**司机签名*/
+    private String driverSign;
+
+    @TableField(exist = false)
+    /**订单类型*/
+    private String orderType;
+
+    @TableField(exist = false)
+    /**卸货重量*/
+    private BigDecimal unloadWeight;
+
+    /**单据图片*/
+    @TableField(exist = false)
+    private String unloadImg;
+    @TableField(exist = false)
+    private String unloadName;
+
+    @TableField(exist = false)
+    private String customerContactName;
+
+    @TableField(exist = false)
+    private String auditSign;
 }

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

@@ -19,6 +19,7 @@ import org.apache.ibatis.annotations.Param;
 import vip.xiaonuo.biz.modular.bizappointmentrecord.entity.BizAppointmentRecord;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 预约记录Mapper接口
@@ -32,4 +33,6 @@ public interface BizAppointmentRecordMapper extends BaseMapper<BizAppointmentRec
     List<BizAppointmentRecord> getPage(@Param("ew") QueryWrapper<BizAppointmentRecord> ew);
 
     List<BizAppointmentRecord> getRecord(@Param("ew") QueryWrapper<BizAppointmentRecord> ew);
+
+    List<Map<String,Object>> gerVehicleTotal(@Param("beginTime") String beginTime,@Param("endTime") String endTime);
 }

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

@@ -9,7 +9,9 @@
             bar.license_number,
             bo.order_number,
             bo.order_name,
+            bo.order_type,
             bc.name customerName,
+            bc.contact customerContactName,
             bg.GOODS_NAME goodsName,
             bg.GOODS_MODEL goodsModel,
             bar.time_id,
@@ -20,13 +22,21 @@
             bar.status,
             bar.appointment_reason,
             bar.over_id,
-            bec.vehicle_axle_number axleNumber
+            bec.vehicle_axle_number axleNumber,
+            br.id recordId,
+            bar.queue_number,
+            br.driver_sign,
+            br.unload_weight/1000 unload_weight,
+            br.unload_img,
+            br.unload_name,
+            br.audit_sign
         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_goods_conf bgc on bgc.id = bar.time_id
          left join biz_customer bc on bc.id = bo.customer_id
          left join biz_excess_config bec on bec.id = bar.over_id
+         left join biz_record br on bar.id = br.appointment_id
         ${ew.customSqlSegment}
     </select>
     <select id="getRecord"
@@ -41,10 +51,45 @@
             bar.driver_name,
             bar.driver_mobile,
             bar.STATUS,
-            bar.appointment_reason
+            bar.appointment_reason,
+            bar.create_user,
+            bar.queue_number
         FROM
             biz_appointment_record bar
         LEFT JOIN biz_goods_conf bgc ON bgc.id = bar.time_id
             ${ew.customSqlSegment}
     </select>
+
+    <select id="gerVehicleTotal" resultType="java.util.Map">
+        SELECT
+            case
+                when a.DICT_VALUE ='1' then '待审核'
+                when a.DICT_VALUE ='2' then '审核不通过'
+                when a.DICT_VALUE ='3' then '排队中'
+                when a.DICT_VALUE ='4' then '可入场'
+                when a.DICT_VALUE ='5' then '已入场'
+                when a.DICT_VALUE ='6' then '一次过磅'
+                when a.DICT_VALUE ='7' then '完成装货'
+                when a.DICT_VALUE ='8' then '二次过磅'
+                when a.DICT_VALUE ='9' then '待出场'
+                when a.DICT_VALUE ='10' then '已出场'
+                when a.DICT_VALUE ='11' then '已签收'
+                when a.DICT_VALUE ='12' then '销售待审核'
+                when a.DICT_VALUE ='13' then '销售已审核'
+                when a.DICT_VALUE ='14' then '已取消'
+                else '超期作废'
+            end as status,
+            ifnull( b.count, 0 ) count
+        FROM
+            ( SELECT DICT_VALUE FROM dev_dict WHERE PARENT_ID = ( SELECT id FROM dev_dict WHERE DICT_VALUE = 'appointment_status' ) ) a
+            LEFT JOIN (
+                SELECT STATUS, count( * ) count
+                FROM biz_appointment_record bar
+                where delete_flag = 'NOT_DELETE'
+                <if test="beginTime!=null and endTime!=null">
+                    and create_time between #{beginTime} and #{endTime}
+                </if>
+                GROUP BY bar.STATUS
+            ) b ON a.DICT_VALUE = b.STATUS
+    </select>
 </mapper>

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

@@ -26,8 +26,12 @@ public class BizAppointmentExportResult {
 
     /** 预约时段 */
     @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
-    @ExcelProperty({"预约报表", "提货时段"})
-    private String timeInfo;
+    @ExcelProperty({"预约报表", "提货开始时间"})
+    private String beginTime;
+    /** 预约时段 */
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
+    @ExcelProperty({"预约报表", "提货结束时间"})
+    private String endTime;
 
     /** 客户名称 */
     @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
@@ -54,6 +58,11 @@ public class BizAppointmentExportResult {
     @ExcelProperty({"预约报表", "司机电话"})
     private String driverMobile;
 
+    /** 司机电话 */
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
+    @ExcelProperty({"预约报表", "车辆轴数"})
+    private String axleNumber;
+
     /** 预约状态*/
     @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
     @ExcelProperty({"预约报表", "预约状态"})

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

@@ -77,4 +77,8 @@ public class BizAppointmentRecordPageParam {
 
     private String dateNow;
 
+    private String beginTime;
+
+    private String endTime;
+
 }

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

@@ -24,6 +24,7 @@ import vip.xiaonuo.biz.modular.bizorder.param.BizOrderPageParam;
 
 import java.io.IOException;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 预约记录Service接口
@@ -98,4 +99,9 @@ public interface BizAppointmentRecordService extends IService<BizAppointmentReco
 
     /**获取当前时间的预约*/
     BizAppointmentRecord getAppointmentRecord(BizAppointmentRecordPageParam bizAppointmentRecordPageParam);
+
+    /**车辆执行状态分析*/
+    List<Map<String,Object>> gerVehicleTotal(BizAppointmentRecordPageParam bizAppointmentRecordPageParam);
+
+    void sendAccount(BizAppointmentRecord bizAppointmentRecord);
 }

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

@@ -15,20 +15,27 @@ 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.date.DateUtil;
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.core.util.PhoneUtil;
 import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.fhs.trans.service.impl.TransService;
+import com.google.common.collect.Maps;
 import jakarta.annotation.Resource;
 import jakarta.servlet.http.HttpServletResponse;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.MapUtils;
 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.api.param.WxUserMsgParam;
+import vip.xiaonuo.biz.modular.api.service.ApiService;
 import vip.xiaonuo.biz.modular.bizappointmentrecord.param.*;
 import vip.xiaonuo.biz.modular.bizappointmenttime.entity.BizAppointmentTime;
 import vip.xiaonuo.biz.modular.bizappointmenttime.service.BizAppointmentTimeService;
@@ -45,8 +52,13 @@ 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.oawxsendlog.entity.OaWxSendLog;
+import vip.xiaonuo.biz.modular.officialinfo.entity.OfficialInfo;
+import vip.xiaonuo.biz.modular.officialinfo.service.OfficialInfoService;
 import vip.xiaonuo.biz.modular.record.entity.BizRecord;
 import vip.xiaonuo.biz.modular.record.service.BizRecordService;
+import vip.xiaonuo.biz.modular.user.entity.BizUser;
+import vip.xiaonuo.biz.modular.user.service.BizUserService;
 import vip.xiaonuo.biz.modular.utils.CommonExportUtil;
 import vip.xiaonuo.common.enums.CommonSortOrderEnum;
 import vip.xiaonuo.common.exception.CommonException;
@@ -54,10 +66,14 @@ import vip.xiaonuo.common.page.CommonPageRequest;
 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.common.prop.CommonProperties;
 
 import java.io.IOException;
+import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
+import java.util.concurrent.locks.ReentrantLock;
 import java.util.regex.Pattern;
 
 /**
@@ -66,9 +82,11 @@ import java.util.regex.Pattern;
  * @author fanzherong
  * @date  2025/03/24 14:47
  **/
+@Slf4j
 @Service
 public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentRecordMapper, BizAppointmentRecord> implements BizAppointmentRecordService {
 
+    private final ReentrantLock lock = new ReentrantLock();
     @Resource
     private BizConfigService bizConfigService;
     @Resource
@@ -87,6 +105,14 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
     private BizGoodsConfService bizGoodsConfService;
     @Resource
     private BizOrderConfigService bizOrderConfigService;
+    @Resource
+    private BizUserService bizUserService;
+    @Resource
+    private OfficialInfoService officialInfoService;
+    @Resource
+    private CommonProperties commonProperties;
+    @Resource
+    private ApiService apiService;
 
     @Override
     public Page<BizAppointmentRecord> page(BizAppointmentRecordPageParam bizAppointmentRecordPageParam) {
@@ -103,7 +129,7 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
             queryWrapper.like("bo.order_number",bizAppointmentRecordPageParam.getOrderNumber());
         }
         if(ObjectUtil.isNotEmpty(bizAppointmentRecordPageParam.getCustomerName())){
-            queryWrapper.like("bc.customer_name",bizAppointmentRecordPageParam.getCustomerName());
+            queryWrapper.like("bc.name",bizAppointmentRecordPageParam.getCustomerName());
         }
         if(ObjectUtil.isNotEmpty(bizAppointmentRecordPageParam.getDriverName())){
             queryWrapper.like("bar.driver_name",bizAppointmentRecordPageParam.getDriverName());
@@ -112,7 +138,7 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
             queryWrapper.like("bar.driver_mobile",bizAppointmentRecordPageParam.getDriverMobile());
         }
         if(ObjectUtil.isNotEmpty(bizAppointmentRecordPageParam.getGoodsName())){
-            queryWrapper.like("bg.NAME",bizAppointmentRecordPageParam.getGoodsName());
+            queryWrapper.like("bg.GOODS_NAME",bizAppointmentRecordPageParam.getGoodsName());
         }
         if(ObjectUtil.isNotEmpty(bizAppointmentRecordPageParam.getLicenseNumber())){
             queryWrapper.like("bar.license_number",bizAppointmentRecordPageParam.getLicenseNumber());
@@ -151,7 +177,8 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
                 bizAppointmentRecord.setStatus("3");
             }
         }
-        this.save(bizAppointmentRecord);
+        //this.save(bizAppointmentRecord);
+        saveRecord(bizAppointmentRecord);
 
         BizOrder bizOrder = bizOrderService.getById(bizAppointmentRecordAddParam.getOrderId());
         bizOrder.setOrderStatus("4");
@@ -165,20 +192,45 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
             bizAppointmentTime.setApplyNumberAlready(bizAppointmentTime.getApplyNumberAlready()+1);
             bizOrderConfigService.updateById(bizAppointmentTime);
         }
+
+        /*if(StringUtils.equals(bizAppointmentRecord.getStatus(),"3")){
+            sendAccount(bizAppointmentRecord,null);
+        }*/
+    }
+
+    public void saveRecord(BizAppointmentRecord bizAppointmentRecord){
+        //排队中
+        lock.lock();
+        try {
+            //查询当天预约记录条数
+            String format = DateUtil.format(DateUtil.date(), "yyyy-MM-dd");
+            BizGoodsConf bizGoodsConf = bizGoodsConfService.getById(bizAppointmentRecord.getTimeId());
+            if(ObjectUtil.isNotNull(bizGoodsConf)){
+                format = DateUtil.format(bizGoodsConf.getConfStartTime(),"yyyy-MM-dd");
+            }
+            long count = this.count(new QueryWrapper<BizAppointmentRecord>().lambda().
+                    between(BizAppointmentRecord::getCreateTime, format + " 00:00:00", format + " 23:59:59"));
+            bizAppointmentRecord.setQueueNumber((int) (count+1));
+            this.save(bizAppointmentRecord);
+        } finally {
+            lock.unlock(); // 释放锁
+        }
+
     }
 
     public void checkParam(BizAppointmentRecordAddParam bizAppointmentRecordAddParam){
         //校验车牌号
         if(ObjectUtil.isNotEmpty(bizAppointmentRecordAddParam.getLicenseNumber())){
-            if(!isCarNumber(bizAppointmentRecordAddParam.getLicenseNumber().toUpperCase().trim())){
-                throw new CommonException("车牌号:{}格式错误",bizAppointmentRecordAddParam.getLicenseNumber().toUpperCase().trim());
+            bizAppointmentRecordAddParam.setLicenseNumber(bizAppointmentRecordAddParam.getLicenseNumber().toUpperCase().trim());
+            if(!isCarNumber(bizAppointmentRecordAddParam.getLicenseNumber())){
+                //throw new CommonException("车牌号:{}格式错误",bizAppointmentRecordAddParam.getLicenseNumber().toUpperCase().trim());
             }
             //校验车牌号是否添加过预约,排除11:已签收、 13:销售已审核  、 14:已取消
             long count = this.count(new QueryWrapper<BizAppointmentRecord>().lambda().
-                    eq(BizAppointmentRecord::getLicenseNumber,bizAppointmentRecordAddParam.getLicenseNumber().toUpperCase().trim()).
-                    notIn(BizAppointmentRecord::getStatus, "11", "13", "14","15"));
+                    eq(BizAppointmentRecord::getLicenseNumber,bizAppointmentRecordAddParam.getLicenseNumber()).
+                    notIn(BizAppointmentRecord::getStatus, "10","11","12", "13", "14","15"));
             if(count>0){
-                throw new CommonException("车牌号:{}已经添加过预约!",bizAppointmentRecordAddParam.getLicenseNumber().toUpperCase().trim());
+                throw new CommonException("车牌号:{}已经添加过预约!",bizAppointmentRecordAddParam.getLicenseNumber());
             }
         }
         //校验手机号
@@ -203,6 +255,7 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
             }
         }
         if(ObjectUtil.isNotEmpty(bizAppointmentRecordAddParam.getOrderId())){
+            bizAppointmentRecordAddParam.setTimeId(bizOrderService.queryEntity(bizAppointmentRecordAddParam.getOrderId()).getDeliveryTimeId());
             //查询预约时间段内可预约次数
             //BizAppointmentTime bizAppointmentTime = bizAppointmentTimeService.getById(bizAppointmentRecordAddParam.getTimeId());
             BizOrderConfig bizOrderConfig = bizOrderConfigService.getOne(new QueryWrapper<BizOrderConfig>().lambda().
@@ -225,17 +278,18 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
     public void checkParam(BizAppointmentRecordEditParam bizAppointmentRecordEditParam,BizAppointmentRecord bizAppointmentRecord){
         //校验车牌号
         if(ObjectUtil.isNotEmpty(bizAppointmentRecordEditParam.getLicenseNumber())){
-            if(!StringUtils.equals(bizAppointmentRecord.getLicenseNumber(),bizAppointmentRecordEditParam.getLicenseNumber().toUpperCase().trim())){
+            bizAppointmentRecordEditParam.setLicenseNumber(bizAppointmentRecordEditParam.getLicenseNumber().toUpperCase().trim());
+            if(!StringUtils.equals(bizAppointmentRecord.getLicenseNumber(),bizAppointmentRecordEditParam.getLicenseNumber())){
                 //车牌号修改过
-                if(!isCarNumber(bizAppointmentRecordEditParam.getLicenseNumber().toUpperCase().trim())){
-                    throw new CommonException("车牌号:{}格式错误",bizAppointmentRecordEditParam.getLicenseNumber().toUpperCase().trim());
+                if(!isCarNumber(bizAppointmentRecordEditParam.getLicenseNumber())){
+                    //throw new CommonException("车牌号:{}格式错误",bizAppointmentRecordEditParam.getLicenseNumber().toUpperCase().trim());
                 }
                 //校验车牌号是否添加过预约,排除11:已签收、 13:销售已审核  、 14:已取消
                 long count = this.count(new QueryWrapper<BizAppointmentRecord>().lambda().
-                        eq(BizAppointmentRecord::getLicenseNumber,bizAppointmentRecordEditParam.getLicenseNumber().toUpperCase().trim()).
-                        notIn(BizAppointmentRecord::getStatus, "11", "13", "14","15"));
+                        eq(BizAppointmentRecord::getLicenseNumber,bizAppointmentRecordEditParam.getLicenseNumber()).
+                        notIn(BizAppointmentRecord::getStatus, "10","11", "12", "13", "14","15"));
                 if(count>0){
-                    throw new CommonException("车牌号:{}已经添加过预约!",bizAppointmentRecordEditParam.getLicenseNumber().toUpperCase().trim());
+                    throw new CommonException("车牌号:{}已经添加过预约!",bizAppointmentRecordEditParam.getLicenseNumber());
                 }
             }
         }
@@ -261,6 +315,7 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
             }
         }
         if(ObjectUtil.isNotEmpty(bizAppointmentRecordEditParam.getOrderId())){
+            bizAppointmentRecordEditParam.setTimeId(bizOrderService.queryEntity(bizAppointmentRecordEditParam.getOrderId()).getDeliveryTimeId());
             //查询预约时间段内可预约次数
             //BizAppointmentTime bizAppointmentTime = bizAppointmentTimeService.getById(bizAppointmentRecordAddParam.getTimeId());
             BizOrderConfig bizOrderConfig = bizOrderConfigService.getOne(new QueryWrapper<BizOrderConfig>().lambda().
@@ -272,7 +327,7 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
                 long count = this.count(new QueryWrapper<BizAppointmentRecord>().lambda().
                         eq(BizAppointmentRecord::getTimeId, bizAppointmentRecordEditParam.getTimeId()).
                         notIn(BizAppointmentRecord::getStatus, "10", "11", "12", "13", "14","15"));
-                if(count>=bizOrderConfig.getApplyNumber()){
+                if(count>=bizOrderConfig.getApplyNumber()+1){
                     throw new CommonException("该订单已经预约满!");
                 }
             }
@@ -284,6 +339,9 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
     @Override
     public void edit(BizAppointmentRecordEditParam bizAppointmentRecordEditParam) {
         BizAppointmentRecord bizAppointmentRecord = this.queryEntity(bizAppointmentRecordEditParam.getId());
+        if(ObjectUtil.isEmpty(bizAppointmentRecordEditParam.getStatus())){
+            bizAppointmentRecordEditParam.setStatus(bizAppointmentRecord.getStatus());
+        }
         checkParam(bizAppointmentRecordEditParam,bizAppointmentRecord);
         if(!StringUtils.equals(bizAppointmentRecord.getOrderId(),bizAppointmentRecordEditParam.getOrderId())){
             //调整了预约时段,释放之前预约时段的预约次数
@@ -353,14 +411,26 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
     @Override
     public void auditRecord(BizAppointmentRecordEditParam bizAppointmentRecordEditParam) {
         BizAppointmentRecord bizAppointmentRecord = this.queryEntity(bizAppointmentRecordEditParam.getId());
+        UpdateWrapper<BizAppointmentRecord> updateWrapper = new UpdateWrapper<>();
+        updateWrapper.eq("id",bizAppointmentRecord.getId());
+        String status = null;
         if(ObjectUtil.isNotEmpty(bizAppointmentRecordEditParam.getAuditFlag())){
             if(StringUtils.equals(bizAppointmentRecordEditParam.getAuditFlag(),"true")){
-                bizAppointmentRecord.setStatus("2");
+                //bizAppointmentRecord.setStatus("2");
+                status = "2";
             }else{
-                bizAppointmentRecord.setStatus("3");
+                //bizAppointmentRecord.setStatus("3");
+                status = "3";
             }
-            bizAppointmentRecord.setAppointmentReason(bizAppointmentRecordEditParam.getAppointmentReason());
-            this.updateById(bizAppointmentRecord);
+            //bizAppointmentRecord.setAppointmentReason(bizAppointmentRecordEditParam.getAppointmentReason());
+            updateWrapper.set("status",status);
+            updateWrapper.set("appointment_reason",bizAppointmentRecordEditParam.getAppointmentReason());
+            //this.updateById(bizAppointmentRecord);
+            this.update(updateWrapper);
+
+            /*if(StringUtils.equals(status,"3")){
+                sendAccount(bizAppointmentRecord,null);
+            }*/
         }
     }
 
@@ -375,7 +445,7 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
             BizAppointmentExportResult bizAppointmentExportResult = new BizAppointmentExportResult();
             BeanUtil.copyProperties(bizAppointmentRecord, bizAppointmentExportResult);
             bizAppointmentExportResult.setStatusName((String) bizAppointmentRecord.getTransMap().get("statusName"));
-            bizAppointmentExportResult.setTimeInfo(bizAppointmentRecord.getBeginTime()+"~"+bizAppointmentRecord.getEndTime());
+            bizAppointmentExportResult.setAxleNumber(bizAppointmentRecord.getAxleNumber()+"轴");
             list.add(bizAppointmentExportResult);
         }
         CommonExportUtil.export(fileName, BizAppointmentExportResult.class,list,response,"预约报表");
@@ -451,12 +521,12 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
             BizOrder bizOrder = bizOrderService.getById(bizAppointmentRecordEditParam.getOrderId());
             if(ObjectUtil.isNotNull(bizOrder)){
                 if(!StringUtils.equals(bizOrder.getOrderStatus(),"3") && !StringUtils.equals(bizOrder.getOrderStatus(),"4")){
-                    throw new CommonException("当前订单不可预约!");
+                    throw new CommonException("当前订单不可调度!");
                 }
                 BizGoodsConf bizGoodsConf = bizGoodsConfService.getById(bizOrder.getDeliveryTimeId());
                 if(ObjectUtil.isNotNull(bizGoodsConf)){
                     if(new Date().getTime() > bizGoodsConf.getConfEndTime().getTime()){
-                        throw new CommonException("提货时间段已过,不可预约!");
+                        throw new CommonException("提货时间段已过,不可调度!");
                     }
                 }
             }
@@ -525,6 +595,24 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
         return null;
     }
 
+    @Override
+    public List<Map<String, Object>> gerVehicleTotal(BizAppointmentRecordPageParam bizAppointmentRecordPageParam) {
+        String beginTime = null;
+        String endTime = null;
+        if(ObjectUtil.isNotEmpty(bizAppointmentRecordPageParam.getBeginTime())){
+            beginTime = bizAppointmentRecordPageParam.getBeginTime()+" 00:00:00";
+        }else{
+            //beginTime = DateUtil.format(DateUtil.date(),"yyyy-MM-dd");
+        }
+        if(ObjectUtil.isNotEmpty(bizAppointmentRecordPageParam.getEndTime())){
+            endTime = bizAppointmentRecordPageParam.getEndTime()+" 23:59:59";
+        }else{
+            //endTime = DateUtil.format(DateUtil.date(),"yyyy-MM-dd");
+        }
+        List<Map<String, Object>> list = this.getBaseMapper().gerVehicleTotal(beginTime, endTime);
+        return list;
+    }
+
     public BizAppointmentRecord setBizAppointmentRecord(BizAppointmentRecord bizAppointmentRecord){
         bizAppointmentRecord.setIsFlag("1");
         if(ObjectUtil.isNotEmpty(bizAppointmentRecord.getOrderId())){
@@ -540,6 +628,7 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
                 }
             }
         }
+        log.info("地磅端对接:overId:"+bizAppointmentRecord.getOverId());
         if(ObjectUtil.isNotEmpty(bizAppointmentRecord.getOverId())){
             BizExcessConfig excessConfig = bizExcessConfigService.getById(bizAppointmentRecord.getOverId());
             if(ObjectUtil.isNotNull(excessConfig)){
@@ -562,4 +651,41 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
         String carNumberPattern = "([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼]{1}(([A-HJ-Z]{1}[A-HJ-NP-Z0-9]{5})|([A-HJ-Z]{1}(([DF]{1}[A-HJ-NP-Z0-9]{1}[0-9]{4})|([0-9]{5}[DF]{1})))|([A-HJ-Z]{1}[A-D0-9]{1}[0-9]{3}警)))|([0-9]{6}使)|((([沪粤川云桂鄂陕蒙藏黑辽渝]{1}A)|鲁B|闽D|蒙E|蒙H)[0-9]{4}领)|(WJ[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼·•]{1}[0-9]{4}[TDSHBXJ0-9]{1})|([VKHBSLJNGCE]{1}[A-DJ-PR-TVY]{1}[0-9]{5})";
         return Pattern.matches(carNumberPattern, carNumber);
     }
+
+
+    /** 发送微信公众号推送消息*/
+    public void sendAccount(BizAppointmentRecord bizAppointmentRecord){
+        BizUser bizUser = bizUserService.queryEntity(bizAppointmentRecord.getCreateUser());
+        if(ObjectUtil.isNotEmpty(bizUser.getUnionId())){
+            log.info("当前用户:"+bizUser.getName()+"存在unionId");
+            //根据unionId查询微信公众号openId
+            OfficialInfo officialInfo = officialInfoService.getOne(new QueryWrapper<OfficialInfo>().lambda().
+                    eq(OfficialInfo::getUnionId, bizUser.getUnionId()).
+                    eq(OfficialInfo::getStatus, "1").last("limit 1"));
+
+            if(ObjectUtil.isNotNull(officialInfo)){
+                log.info("当前用户:"+bizUser.getName()+"存在openId");
+                OaWxSendLog oaWxSendLog = new OaWxSendLog();
+                oaWxSendLog.setSendUserId(bizUser.getId());
+                oaWxSendLog.setSendUserName(bizUser.getName());
+                WxUserMsgParam wxUserMsgParam = new WxUserMsgParam();
+                wxUserMsgParam.setTemplateId(commonProperties.getOfficialTemplete());
+                wxUserMsgParam.setOpenId(officialInfo.getOfficialOpenId());
+                wxUserMsgParam.setParam1("car_number9");
+                wxUserMsgParam.setParamData1(bizAppointmentRecord.getLicenseNumber());
+                wxUserMsgParam.setParam2("time6");
+                String time = null;
+                BizGoodsConf bizGoodsConf = bizGoodsConfService.getById(bizAppointmentRecord.getTimeId());
+                if(ObjectUtil.isNotNull(bizGoodsConf)){
+                    time = DateUtil.format(bizGoodsConf.getConfStartTime(),"yyyy-MM-dd HH:mm:ss")+"~"+DateUtil.format(bizGoodsConf.getConfEndTime(),"yyyy-MM-dd HH:mm:ss");
+                }
+                wxUserMsgParam.setParamData2(time);
+                wxUserMsgParam.setParam3("thing2");
+                wxUserMsgParam.setParamData3(bizAppointmentRecord.getQueueNumber().toString());
+                apiService.sendProjectExpireMsg(oaWxSendLog,wxUserMsgParam);
+            }else{
+                log.info("为查询到用户"+bizUser.getName()+"的关注公众号信息!");
+            }
+        }
+    }
 }

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

@@ -66,4 +66,7 @@ public class BizConfig extends CommonEntity {
 
     /**预约申请次数*/
     private Integer applyCount;
+
+    /**排队通知开关*/
+    private String lineNoticeSwitch;
 }

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

@@ -67,4 +67,7 @@ public class BizConfigAddParam {
     /**预约申请次数*/
     private Integer applyCount;
 
+    /**排队通知开关*/
+    private String lineNoticeSwitch;
+
 }

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

@@ -72,4 +72,7 @@ public class BizConfigEditParam {
     /**预约申请次数*/
     private Integer applyCount;
 
+    /**排队通知开关*/
+    private String lineNoticeSwitch;
+
 }

+ 1 - 1
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizexcessconfig/entity/BizExcessConfig.java

@@ -43,7 +43,7 @@ public class BizExcessConfig extends CommonEntity {
 
     /** 超限重量 */
     @Schema(description = "超限重量")
-    private Integer excessWeight;
+    private BigDecimal excessWeight;
 
     /** 是否启用 */
     @Schema(description = "是否启用")

+ 1 - 1
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizexcessconfig/param/BizExcessConfigAddParam.java

@@ -39,7 +39,7 @@ public class BizExcessConfigAddParam {
     /** 超限重量 */
     @Schema(description = "超限重量", requiredMode = Schema.RequiredMode.REQUIRED)
     @NotNull(message = "excessWeight不能为空")
-    private Integer excessWeight;
+    private BigDecimal excessWeight;
 
     /** 是否启用 */
     @Schema(description = "是否启用")

+ 1 - 1
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizexcessconfig/param/BizExcessConfigEditParam.java

@@ -44,7 +44,7 @@ public class BizExcessConfigEditParam {
     /** 超限重量 */
     @Schema(description = "超限重量", requiredMode = Schema.RequiredMode.REQUIRED)
     @NotNull(message = "excessWeight不能为空")
-    private Integer excessWeight;
+    private BigDecimal excessWeight;
 
     /** 是否启用 */
     @Schema(description = "是否启用")

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

@@ -33,6 +33,7 @@ import vip.xiaonuo.biz.modular.bizexcessconfig.param.BizExcessConfigIdParam;
 import vip.xiaonuo.biz.modular.bizexcessconfig.param.BizExcessConfigPageParam;
 import vip.xiaonuo.biz.modular.bizexcessconfig.service.BizExcessConfigService;
 
+import java.math.BigDecimal;
 import java.util.List;
 
 /**
@@ -48,7 +49,11 @@ public class BizExcessConfigServiceImpl extends ServiceImpl<BizExcessConfigMappe
     public Page<BizExcessConfig> page(BizExcessConfigPageParam bizExcessConfigPageParam) {
         QueryWrapper<BizExcessConfig> queryWrapper = new QueryWrapper<BizExcessConfig>().checkSqlInjection();
         queryWrapper.lambda().orderByDesc(BizExcessConfig::getCreateTime);
-        return this.page(CommonPageRequest.defaultPage(), queryWrapper);
+        Page<BizExcessConfig> page = this.page(CommonPageRequest.defaultPage(), queryWrapper);
+        for(BizExcessConfig bizExcessConfig : page.getRecords()){
+            bizExcessConfig.setExcessWeight(bizExcessConfig.getExcessWeight().divide(new BigDecimal(1000),2,BigDecimal.ROUND_HALF_UP));
+        }
+        return page;
     }
 
     @Transactional(rollbackFor = Exception.class)
@@ -62,6 +67,7 @@ public class BizExcessConfigServiceImpl extends ServiceImpl<BizExcessConfigMappe
             throw new CommonException("该轴数已经添加过超限重量!");
         }
         BizExcessConfig bizExcessConfig = BeanUtil.toBean(bizExcessConfigAddParam, BizExcessConfig.class);
+        bizExcessConfig.setExcessWeight(bizExcessConfig.getExcessWeight().multiply(new BigDecimal(1000)));
         this.save(bizExcessConfig);
     }
 
@@ -89,6 +95,7 @@ public class BizExcessConfigServiceImpl extends ServiceImpl<BizExcessConfigMappe
             }
         }
         BeanUtil.copyProperties(bizExcessConfigEditParam, bizExcessConfig);
+        bizExcessConfig.setExcessWeight(bizExcessConfig.getExcessWeight().multiply(new BigDecimal(1000)));
         this.updateById(bizExcessConfig);
     }
 

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

@@ -154,6 +154,7 @@ public class BizOrderController {
      * 导出订单报表
      */
     @Operation(summary = "导出订单报表")
+    @SaCheckPermission("/biz/bizorder/exportRecord")
     @GetMapping(value = "/biz/bizorder/exportRecord", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
     public void exportRecord(BizOrderPageParam bizOrderPageParam, HttpServletResponse response) throws IOException {
         bizOrderService.exportRecord(bizOrderPageParam,response);
@@ -257,4 +258,22 @@ public class BizOrderController {
         bizOrderService.submit(bizOrderEditParam);
         return CommonResult.ok();
     }
+
+    @Operation(summary = "订单计划分析")
+    @CommonLog("订单计划分析")
+    @GetMapping("/biz/bizorder/getOrderTotal")
+    public CommonResult<Page<BizOrder>> getOrderTotal(BizOrderPageParam bizOrderPageParam) {
+        return CommonResult.data(bizOrderService.getOrderTotal(bizOrderPageParam));
+    }
+
+
+    /**
+     * 导出订单统计
+     */
+    @Operation(summary = "导出订单统计")
+    @SaCheckPermission("/biz/bizorder/exportRecordTotal")
+    @GetMapping(value = "/biz/bizorder/exportRecordTotal", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
+    public void exportRecordTotal(BizOrderPageParam bizOrderPageParam, HttpServletResponse response) throws IOException {
+        bizOrderService.exportRecordTotal(bizOrderPageParam,response);
+    }
 }

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

@@ -131,4 +131,8 @@ public class BizOrder extends CommonEntity{
     /**结束备注**/
     private String endReason;
 
+    /**实际托运重量*/
+    @TableField(exist = false)
+    private BigDecimal actualWeight;
+
 }

+ 4 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorder/mapper/BizOrderMapper.java

@@ -30,4 +30,8 @@ public interface BizOrderMapper extends BaseMapper<BizOrder> {
     Page<BizOrder> getPage(@Param("page")Page<BizOrder> page, @Param("ew") QueryWrapper<BizOrder> ew);
 
     List<BizOrder> getPage(@Param("ew") QueryWrapper<BizOrder> ew);
+
+    Page<BizOrder> getOrderTotal(@Param("page") Page<BizOrder> page,@Param("ew") QueryWrapper<BizOrder> ew);
+
+    List<BizOrder> getOrderTotal(@Param("ew") QueryWrapper<BizOrder> ew);
 }

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

@@ -24,11 +24,38 @@
             bgc.CONF_END_TIME,
             bo.sale_order_info,
             bo.delivery_time_id,
-            bo.order_sign
+            bo.order_sign,
+            bo.order_reason,
+            bo.end_reason
         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>
+
+    <select id="getOrderTotal" resultType="vip.xiaonuo.biz.modular.bizorder.entity.BizOrder">
+        select
+            a.*
+        from(
+            select
+                bo.id,
+                bo.order_number,
+                bo.order_name,
+                bc.name customerName,
+                bo.order_weight/1000 order_weight,
+                bo.net_weight/1000 net_weight,
+                IFNULL(br.actualWeight/1000,0) actualWeight,
+                case
+                    when IFNULL(br.actualWeight,0)>bo.net_weight then '1'
+                    else '0'
+                end as 	orderFlag
+            from biz_order bo
+            left join biz_customer bc on bo.customer_id = bc.id
+            left join (select order_id,IFNULL(sum(net_weight),0) actualWeight from biz_record  where delete_flag = 'NOT_DELETE' group by order_id) br
+            on br.order_id = bo.id
+            ${ew.customSqlSegment}
+        ) a
+        order by a.orderFlag desc
+    </select>
 </mapper>

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

@@ -0,0 +1,42 @@
+package vip.xiaonuo.biz.modular.bizorder.param;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.HeadStyle;
+import com.alibaba.excel.enums.poi.FillPatternTypeEnum;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+public class BizOrderExportTotal {
+    /** 订单名称 */
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
+    @ExcelProperty({"订单计划统计", "订单名称"})
+    private String orderName;
+
+    /** 订单编号 */
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
+    @ExcelProperty({"订单计划统计", "订单编号"})
+    private String orderNumber;
+
+    /** 客户名称 */
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
+    @ExcelProperty({"订单计划统计", "客户名称"})
+    private String customerName;
+
+    /** 订单重量 */
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
+    @ExcelProperty({"订单计划统计", "订单重量(吨)"})
+    private BigDecimal orderWeight;
+
+    /** 过磅重量 */
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
+    @ExcelProperty({"订单计划统计", "过磅重量(吨)"})
+    private BigDecimal netWeight;
+
+    /** 过磅重量 */
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
+    @ExcelProperty({"订单计划统计", "实际托运重量(吨)"})
+    private BigDecimal actualWeight;
+}

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

@@ -15,6 +15,7 @@ package vip.xiaonuo.biz.modular.bizorder.service;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.IService;
 import jakarta.servlet.http.HttpServletResponse;
+import vip.xiaonuo.biz.modular.bizappointmentrecord.param.BizAppointmentRecordPageParam;
 import vip.xiaonuo.biz.modular.customer.entity.BizCustomer;
 import vip.xiaonuo.biz.modular.bizorder.entity.BizOrder;
 import vip.xiaonuo.biz.modular.bizorder.param.BizOrderAddParam;
@@ -111,4 +112,9 @@ public interface BizOrderService extends IService<BizOrder> {
 
     /**提交*/
     void submit(BizOrderEditParam bizOrderEditParam);
+
+    Page<BizOrder> getOrderTotal(BizOrderPageParam bizOrderPageParam);
+
+    /**导出报表*/
+    void exportRecordTotal(BizOrderPageParam bizOrderPageParam, HttpServletResponse response) throws IOException;
 }

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

@@ -12,12 +12,15 @@
  */
 package vip.xiaonuo.biz.modular.bizorder.service.impl;
 
+import cn.dev33.satoken.stp.StpUtil;
 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 cn.hutool.json.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.fhs.trans.service.impl.TransService;
@@ -27,6 +30,10 @@ 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.api.SaBaseLoginUserApi;
+import vip.xiaonuo.auth.core.util.StpLoginUserUtil;
+import vip.xiaonuo.biz.modular.bizappointmentrecord.entity.BizAppointmentRecord;
+import vip.xiaonuo.biz.modular.bizappointmentrecord.param.BizAppointmentExportResult;
 import vip.xiaonuo.biz.modular.bizconfig.entity.BizConfig;
 import vip.xiaonuo.biz.modular.bizconfig.service.BizConfigService;
 import vip.xiaonuo.biz.modular.bizorderconfig.entity.BizOrderConfig;
@@ -51,6 +58,7 @@ import java.math.BigDecimal;
 import java.net.URL;
 import java.net.URLConnection;
 import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * 订单管理Service接口实现类
@@ -79,6 +87,9 @@ public class BizOrderServiceImpl extends ServiceImpl<BizOrderMapper, BizOrder> i
     @Resource
     private BizSaleOrderService bizSaleOrderService;
 
+    @Resource(name = "loginUserApi")
+    private SaBaseLoginUserApi loginUserApi;
+
     @Override
     public Page<BizOrder> page(BizOrderPageParam bizOrderPageParam) {
         QueryWrapper<BizOrder> queryWrapper = getQueryWrapper(bizOrderPageParam);
@@ -97,11 +108,11 @@ public class BizOrderServiceImpl extends ServiceImpl<BizOrderMapper, BizOrder> i
         }
         //客户名称查询
         if(ObjectUtil.isNotEmpty(bizOrderPageParam.getCustomerName())){
-            queryWrapper.like("bc.customer_name",bizOrderPageParam.getCustomerName());
+            queryWrapper.like("bc.name",bizOrderPageParam.getCustomerName());
         }
         //货品名称查询
         if(ObjectUtil.isNotEmpty(bizOrderPageParam.getGoodsName())){
-            queryWrapper.like("bg.`NAME`",bizOrderPageParam.getGoodsName());
+            queryWrapper.like("bg.`GOODS_NAME`",bizOrderPageParam.getGoodsName());
         }
         //状态查询
         if(ObjectUtil.isNotEmpty(bizOrderPageParam.getOrderStatus())){
@@ -111,6 +122,11 @@ public class BizOrderServiceImpl extends ServiceImpl<BizOrderMapper, BizOrder> i
         if(ObjectUtil.isNotEmpty(bizOrderPageParam.getOrderSource())){
             queryWrapper.eq("bo.order_source",bizOrderPageParam.getOrderSource());
         }
+        // 校验数据范围
+        List<String> loginUserDataScope = StpLoginUserUtil.getLoginUserDataScope();
+        if(ObjectUtil.isEmpty(loginUserDataScope)) {
+            queryWrapper.eq("bo.customer_id", StpLoginUserUtil.getLoginUser().getCustomerId());
+        }
         queryWrapper.eq("bo.delete_flag","NOT_DELETE");
         queryWrapper.orderByDesc("bo.create_time");
         return queryWrapper;
@@ -124,7 +140,7 @@ public class BizOrderServiceImpl extends ServiceImpl<BizOrderMapper, BizOrder> i
         if(ObjectUtil.isNull(bizGoodsConf)){
             throw new CommonException("未查询到时间段信息!");
         }
-        if(bizOrderAddParam.getOrderWeight().multiply(new BigDecimal(1000)).compareTo(new BigDecimal(bizGoodsConf.getLastWeight())) > 0 ){
+        if(bizOrderAddParam.getOrderWeight().multiply(new BigDecimal(1000)).compareTo(bizGoodsConf.getLastWeight()) > 0 ){
             throw new CommonException("当前时间段货品余量不足!");
         }
         BizOrder bizOrder = BeanUtil.toBean(bizOrderAddParam, BizOrder.class);
@@ -137,7 +153,7 @@ public class BizOrderServiceImpl extends ServiceImpl<BizOrderMapper, BizOrder> i
         this.save(bizOrder);
 
         //修改时段配置内物品重量
-        bizGoodsConfService.editUsedWeight(bizGoodsConf.getId(),bizOrderAddParam.getOrderWeight().multiply(new BigDecimal(1000)).doubleValue());
+        bizGoodsConfService.editUsedWeight(bizGoodsConf.getId(),bizOrderAddParam.getOrderWeight().multiply(new BigDecimal(1000)));
 
         //修改销售订单状态
         if(ObjectUtil.isNotEmpty(bizOrderAddParam.getSaleOrderInfo())){
@@ -160,7 +176,7 @@ public class BizOrderServiceImpl extends ServiceImpl<BizOrderMapper, BizOrder> i
         BizOrder bizOrder = this.queryEntity(bizOrderEditParam.getId());
         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 ){
+                    compareTo(bizGoodsConf.getLastWeight().add(bizOrder.getOrderWeight())) > 0 ){
                 throw new CommonException("当前时间段货品余量不足!");
             }
 
@@ -168,10 +184,10 @@ public class BizOrderServiceImpl extends ServiceImpl<BizOrderMapper, BizOrder> i
             //旧的提货时段
             BizGoodsConf goodsConf = bizGoodsConfService.getById(bizOrder.getDeliveryTimeId());
             //修改时段配置内物品重量
-            bizGoodsConfService.editUsedWeight(goodsConf.getId(),bizOrder.getOrderWeight().negate().doubleValue());
+            bizGoodsConfService.editUsedWeight(goodsConf.getId(),bizOrder.getOrderWeight().negate());
 
             //修改新时段
-            bizGoodsConfService.editUsedWeight(bizGoodsConf.getId(),bizOrderEditParam.getOrderWeight().multiply(new BigDecimal(1000)).doubleValue());
+            bizGoodsConfService.editUsedWeight(bizGoodsConf.getId(),bizOrderEditParam.getOrderWeight().multiply(new BigDecimal(1000)));
 
         }else{
             if(!StringUtils.equals(bizOrderEditParam.getDeliveryTimeId(),bizOrder.getDeliveryTimeId())){
@@ -179,10 +195,10 @@ public class BizOrderServiceImpl extends ServiceImpl<BizOrderMapper, BizOrder> i
                 //旧的提货时段
                 BizGoodsConf goodsConf = bizGoodsConfService.getById(bizOrder.getDeliveryTimeId());
                 //修改时段配置内物品重量
-                bizGoodsConfService.editUsedWeight(goodsConf.getId(),bizOrder.getOrderWeight().negate().doubleValue());
+                bizGoodsConfService.editUsedWeight(goodsConf.getId(),bizOrder.getOrderWeight().negate());
 
                 //修改新时段
-                bizGoodsConfService.editUsedWeight(bizGoodsConf.getId(),bizOrderEditParam.getOrderWeight().multiply(new BigDecimal(1000)).doubleValue());
+                bizGoodsConfService.editUsedWeight(bizGoodsConf.getId(),bizOrderEditParam.getOrderWeight().multiply(new BigDecimal(1000)));
             }
         }
         //判断是否修改订单
@@ -225,7 +241,7 @@ public class BizOrderServiceImpl extends ServiceImpl<BizOrderMapper, BizOrder> i
             BizGoodsConf bizGoodsConf = bizGoodsConfService.getById(bizOrder.getDeliveryTimeId());
             if(ObjectUtil.isNotNull(bizGoodsConf)){
                 //修改时段配置内物品重量
-                bizGoodsConfService.editUsedWeight(bizGoodsConf.getId(),bizOrder.getOrderWeight().negate().doubleValue());
+                bizGoodsConfService.editUsedWeight(bizGoodsConf.getId(),bizOrder.getOrderWeight().negate());
             }
 
             //查询销售订单信息
@@ -344,6 +360,13 @@ public class BizOrderServiceImpl extends ServiceImpl<BizOrderMapper, BizOrder> i
             if(result.compareTo(new BigDecimal(20)) <= 0){
                 //大于80%不需要审核
                 bizOrder.setOrderStatus("7");
+
+                //销售订单结束
+                BizSaleOrder bizSaleOrder = bizSaleOrderService.getById(bizOrder.getSaleOrderInfo());
+                if(ObjectUtil.isNotNull(bizSaleOrder)){
+                    bizSaleOrder.setSaleStatus("3");
+                    bizSaleOrderService.updateById(bizSaleOrder);
+                }
             }else{
                 bizOrder.setOrderStatus("5");
             }
@@ -357,15 +380,29 @@ public class BizOrderServiceImpl extends ServiceImpl<BizOrderMapper, BizOrder> i
     @Override
     public void auditOrder(BizOrderEditParam bizOrderEditParam) {
         BizOrder bizOrder = this.queryEntity(bizOrderEditParam.getId());
+        UpdateWrapper<BizOrder> updateWrapper = new UpdateWrapper<>();
+        String status = null;
         if(ObjectUtil.isNotEmpty(bizOrderEditParam.getAuditFlag())){
             if(StringUtils.equals(bizOrderEditParam.getAuditFlag(),"true")){
                 //驳回
-                bizOrder.setOrderStatus("4");
-                bizOrder.setOrderReason(bizOrderEditParam.getOrderReason());
+                //bizOrder.setOrderStatus("4");
+                status = "4";
             }else{
-                bizOrder.setOrderStatus("7");
+                status = "7";
+                //bizOrder.setOrderStatus("7");
+
+                //销售订单结束
+                BizSaleOrder bizSaleOrder = bizSaleOrderService.getById(bizOrder.getSaleOrderInfo());
+                if(ObjectUtil.isNotNull(bizSaleOrder)){
+                    bizSaleOrder.setSaleStatus("3");
+                    bizSaleOrderService.updateById(bizSaleOrder);
+                }
             }
-            this.updateById(bizOrder);
+            updateWrapper.eq("id",bizOrder.getId()).
+                    set("order_status",status).
+                    set("order_reason",bizOrderEditParam.getOrderReason());
+            //this.updateById(bizOrder);
+            this.update(updateWrapper);
         }
     }
 
@@ -376,6 +413,42 @@ public class BizOrderServiceImpl extends ServiceImpl<BizOrderMapper, BizOrder> i
         this.updateById(bizOrder);
     }
 
+    @Override
+    public Page<BizOrder> getOrderTotal(BizOrderPageParam bizOrderPageParam) {
+        QueryWrapper<BizOrder> queryWrapper = getTotalQueryWrapper(bizOrderPageParam);
+        Page<BizOrder> orderTotal = this.getBaseMapper().getOrderTotal(CommonPageRequest.defaultPage(), queryWrapper);
+        return orderTotal;
+    }
+
+    @Override
+    public void exportRecordTotal(BizOrderPageParam bizOrderPageParam, HttpServletResponse response) throws IOException {
+        QueryWrapper<BizOrder> queryWrapper = getTotalQueryWrapper(bizOrderPageParam);
+        List<BizOrder> orderList = this.getBaseMapper().getOrderTotal(queryWrapper);
+        String fileName = "订单计划统计.xlsx";
+        List<BizOrderExportTotal> list = Lists.newArrayList();
+        for(BizOrder bizOrder : orderList){
+            BizOrderExportTotal bizOrderExportTotal = new BizOrderExportTotal();
+            BeanUtil.copyProperties(bizOrder, bizOrderExportTotal);
+            list.add(bizOrderExportTotal);
+        }
+        CommonExportUtil.export(fileName, BizOrderExportTotal.class,list,response,"订单计划统计");
+    }
+
+    public QueryWrapper<BizOrder> getTotalQueryWrapper(BizOrderPageParam bizOrderPageParam){
+        QueryWrapper<BizOrder> queryWrapper = new QueryWrapper<>();
+        if(ObjectUtil.isNotEmpty(bizOrderPageParam.getOrderName())){
+            queryWrapper.like("bo.order_name",bizOrderPageParam.getOrderName());
+        }
+        if(ObjectUtil.isNotEmpty(bizOrderPageParam.getOrderNumber())){
+            queryWrapper.like("bo.order_number",bizOrderPageParam.getOrderNumber());
+        }
+        if(ObjectUtil.isNotEmpty(bizOrderPageParam.getCustomerName())){
+            queryWrapper.like("bc.name",bizOrderPageParam.getCustomerName());
+        }
+        queryWrapper.eq("bo.delete_flag","NOT_DELETE");
+        return queryWrapper;
+    }
+
     public static void main(String[] args) {
         String result = "";
         try {

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

@@ -70,6 +70,9 @@ public class BizOrderConfigServiceImpl extends ServiceImpl<BizOrderConfigMapper,
     @Override
     public void edit(BizOrderConfigEditParam bizOrderConfigEditParam) {
         BizOrderConfig bizOrderConfig = this.queryEntity(bizOrderConfigEditParam.getId());
+        if(bizOrderConfigEditParam.getApplyNumber()<=bizOrderConfig.getApplyNumberAlready()){
+            throw new CommonException("申请数量必须大于已约数量!");
+        }
         BeanUtil.copyProperties(bizOrderConfigEditParam, bizOrderConfig);
         this.updateById(bizOrderConfig);
     }

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

@@ -67,4 +67,7 @@ public class BizSaleOrder extends CommonEntity {
     /**客户名称*/
     private String customerName;
 
+    /**货品编码*/
+    private String saleGoodsCode;
+
 }

+ 2 - 1
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizsaleorder/mapper/mapping/BizSaleOrderMapper.xml

@@ -12,7 +12,8 @@
             bso.sale_order_weight/1000 sale_order_weight,
             bso.sale_status,
             bso.customer_id,
-            bc.name customerName
+            bc.name customerName,
+            bso.sale_goods_code
         from biz_sale_order bso
         left join biz_customer bc on bc.id = bso.customer_id
         ${ew.customSqlSegment}

+ 3 - 5
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizsaleorder/param/BizSaleOrderAddParam.java

@@ -33,30 +33,28 @@ public class BizSaleOrderAddParam {
 
     /** 销售订单编号 */
     @Schema(description = "销售订单编号", requiredMode = Schema.RequiredMode.REQUIRED)
-    @NotBlank(message = "saleOrderNumber不能为空")
     private String saleOrderNumber;
 
     /** 销售订单名称 */
     @Schema(description = "销售订单名称", requiredMode = Schema.RequiredMode.REQUIRED)
-    @NotBlank(message = "saleOrderName不能为空")
     private String saleOrderName;
 
     /** 订单类型(1:常规订单   2:服务订单) */
     @Schema(description = "订单类型(1:常规订单   2:服务订单)", requiredMode = Schema.RequiredMode.REQUIRED)
-    @NotBlank(message = "saleOrderType不能为空")
     private String saleOrderType;
 
     /** 货品名称 */
     @Schema(description = "货品名称", requiredMode = Schema.RequiredMode.REQUIRED)
-    @NotBlank(message = "saleGoodsName不能为空")
     private String saleGoodsName;
 
     /** 销售订单重量 */
     @Schema(description = "销售订单重量", requiredMode = Schema.RequiredMode.REQUIRED)
-    @NotNull(message = "saleOrderWeight不能为空")
     private BigDecimal saleOrderWeight;
 
     /***客户id*/
     private String customerId;
 
+    /**货品编码*/
+    private String saleGoodsCode;
+
 }

+ 3 - 5
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizsaleorder/param/BizSaleOrderEditParam.java

@@ -38,30 +38,28 @@ public class BizSaleOrderEditParam {
 
     /** 销售订单编号 */
     @Schema(description = "销售订单编号", requiredMode = Schema.RequiredMode.REQUIRED)
-    @NotBlank(message = "saleOrderNumber不能为空")
     private String saleOrderNumber;
 
     /** 销售订单名称 */
     @Schema(description = "销售订单名称", requiredMode = Schema.RequiredMode.REQUIRED)
-    @NotBlank(message = "saleOrderName不能为空")
     private String saleOrderName;
 
     /** 订单类型(1:常规订单   2:服务订单) */
     @Schema(description = "订单类型(1:常规订单   2:服务订单)", requiredMode = Schema.RequiredMode.REQUIRED)
-    @NotBlank(message = "saleOrderType不能为空")
     private String saleOrderType;
 
     /** 货品名称 */
     @Schema(description = "货品名称", requiredMode = Schema.RequiredMode.REQUIRED)
-    @NotBlank(message = "saleGoodsName不能为空")
     private String saleGoodsName;
 
     /** 销售订单重量 */
     @Schema(description = "销售订单重量", requiredMode = Schema.RequiredMode.REQUIRED)
-    @NotNull(message = "saleOrderWeight不能为空")
     private BigDecimal saleOrderWeight;
 
     /***客户id*/
     private String customerId;
 
+    /**货品编码*/
+    private String saleGoodsCode;
+
 }

+ 19 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizsaleorder/service/impl/BizSaleOrderServiceImpl.java

@@ -20,8 +20,11 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import jakarta.annotation.Resource;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import vip.xiaonuo.biz.modular.goods.entity.BizGoods;
+import vip.xiaonuo.biz.modular.goods.service.BizGoodsService;
 import vip.xiaonuo.common.enums.CommonSortOrderEnum;
 import vip.xiaonuo.common.exception.CommonException;
 import vip.xiaonuo.common.page.CommonPageRequest;
@@ -33,6 +36,7 @@ import vip.xiaonuo.biz.modular.bizsaleorder.param.BizSaleOrderIdParam;
 import vip.xiaonuo.biz.modular.bizsaleorder.param.BizSaleOrderPageParam;
 import vip.xiaonuo.biz.modular.bizsaleorder.service.BizSaleOrderService;
 
+import javax.annotation.RegEx;
 import java.math.BigDecimal;
 import java.util.List;
 
@@ -45,6 +49,9 @@ import java.util.List;
 @Service
 public class BizSaleOrderServiceImpl extends ServiceImpl<BizSaleOrderMapper, BizSaleOrder> implements BizSaleOrderService {
 
+    @Resource
+    private BizGoodsService goodsService;
+
     @Override
     public Page<BizSaleOrder> page(BizSaleOrderPageParam bizSaleOrderPageParam) {
         QueryWrapper<BizSaleOrder> queryWrapper = new QueryWrapper<BizSaleOrder>().checkSqlInjection();
@@ -78,6 +85,12 @@ public class BizSaleOrderServiceImpl extends ServiceImpl<BizSaleOrderMapper, Biz
             throw new CommonException("订单编号已经存在!");
         }
         BizSaleOrder bizSaleOrder = BeanUtil.toBean(bizSaleOrderAddParam, BizSaleOrder.class);
+        BizGoods bizGoods = goodsService.getOne(new QueryWrapper<BizGoods>().lambda()
+                .eq(BizGoods::getGoodsCode, bizSaleOrderAddParam.getSaleGoodsCode()).
+                last("limit 1"));
+        if(ObjectUtil.isNotNull(bizGoods)){
+            bizSaleOrder.setSaleGoodsName(bizGoods.getGoodsName());
+        }
         bizSaleOrder.setSaleOrderWeight(bizSaleOrderAddParam.getSaleOrderWeight().multiply(new BigDecimal(1000)));
         this.save(bizSaleOrder);
     }
@@ -95,6 +108,12 @@ public class BizSaleOrderServiceImpl extends ServiceImpl<BizSaleOrderMapper, Biz
         }
         BeanUtil.copyProperties(bizSaleOrderEditParam, bizSaleOrder);
         bizSaleOrder.setSaleOrderWeight(bizSaleOrderEditParam.getSaleOrderWeight().multiply(new BigDecimal(1000)));
+        BizGoods bizGoods = goodsService.getOne(new QueryWrapper<BizGoods>().lambda()
+                .eq(BizGoods::getGoodsCode, bizSaleOrderEditParam.getSaleGoodsCode()).
+                last("limit 1"));
+        if(ObjectUtil.isNotNull(bizGoods)){
+            bizSaleOrder.setSaleGoodsName(bizGoods.getGoodsName());
+        }
         this.updateById(bizSaleOrder);
     }
 

+ 7 - 5
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizvehicle/service/impl/BizVehicleServiceImpl.java

@@ -96,14 +96,14 @@ public class BizVehicleServiceImpl extends ServiceImpl<BizVehicleMapper, BizVehi
             bizVehicleAddParam.setLicensePlate(bizVehicleAddParam.getLicensePlate().toUpperCase().trim());
             //校验车牌号
             if(!isCarNumber(bizVehicleAddParam.getLicensePlate())){
-                throw new CommonException("车牌号:{}格式错误",bizVehicleAddParam.getLicensePlate());
+                //throw new CommonException("车牌号:{}格式错误",bizVehicleAddParam.getLicensePlate());
             }
             //判断车牌号是否添加过
             long count = this.count(new QueryWrapper<BizVehicle>().lambda().
                     eq(BizVehicle::getLicensePlate, bizVehicleAddParam.getLicensePlate()).
                     eq(BizVehicle::getStatus, "1"));
             if(count>0){
-                throw new CommonException("车牌号:{}已经添加过!",bizVehicleAddParam.getLicensePlate());
+                //throw new CommonException("车牌号:{}已经添加过!",bizVehicleAddParam.getLicensePlate());
             }
         }
         //校验司机电话
@@ -211,9 +211,11 @@ public class BizVehicleServiceImpl extends ServiceImpl<BizVehicleMapper, BizVehi
                 eq(BizVehicle::getStatus, "1").
                 eq(BizVehicle::getCreateUser, StpLoginUserUtil.getLoginUser().getId()).
                 last("limit 1"));
-        BizExcessConfig excessConfig = bizExcessConfigService.getById(bizVehicle.getVehicleAxles());
-        if(ObjectUtil.isNotNull(excessConfig)){
-            bizVehicle.setVehicleAxleNumber(excessConfig.getVehicleAxleNumber().toString());
+        if(ObjectUtil.isNotNull(bizVehicle)){
+            BizExcessConfig excessConfig = bizExcessConfigService.getById(bizVehicle.getVehicleAxles());
+            if(ObjectUtil.isNotNull(excessConfig)){
+                bizVehicle.setVehicleAxleNumber(excessConfig.getVehicleAxleNumber().toString());
+            }
         }
         return bizVehicle;
     }

+ 1 - 2
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/customer/param/BizCustomerAddParam.java

@@ -53,8 +53,7 @@ public class BizCustomerAddParam {
     private String remark;
 
     /** 关联用友平台的ID */
-    @Schema(description = "关联用友平台的ID", requiredMode = Schema.RequiredMode.REQUIRED)
-    @NotBlank(message = "关联用友平台的ID不能为空")
+    @Schema(description = "关联用友平台的ID")
     private String yongId;
 
 }

+ 4 - 3
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/goodsConf/entity/BizGoodsConf.java

@@ -18,6 +18,7 @@ import lombok.Getter;
 import lombok.Setter;
 import vip.xiaonuo.common.pojo.CommonEntity;
 
+import java.math.BigDecimal;
 import java.util.Date;
 
 /**
@@ -62,15 +63,15 @@ public class BizGoodsConf extends CommonEntity {
 
     /** 可提重量(KG) */
     @Schema(description = "可提重量(KG)")
-    private Double confWeight;
+    private BigDecimal confWeight;
 
     /** 已提重量(KG) */
     @Schema(description = "已提重量(KG)")
-    private Double usedWeight;
+    private BigDecimal usedWeight;
 
     /** 剩余提货重量(KG) */
     @Schema(description = "剩余提货重量(KG)")
-    private Double lastWeight;
+    private BigDecimal lastWeight;
 
 
 

+ 2 - 1
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/goodsConf/param/BizGoodsConfEditParam.java

@@ -19,6 +19,7 @@ import lombok.Setter;
 import jakarta.validation.constraints.NotBlank;
 import jakarta.validation.constraints.NotNull;
 
+import java.math.BigDecimal;
 import java.util.Date;
 
 /**
@@ -63,6 +64,6 @@ public class BizGoodsConfEditParam {
     /** 可提重量(KG) */
     @Schema(description = "可提重量", requiredMode = Schema.RequiredMode.REQUIRED)
     @NotNull(message = "可提重量不能为空")
-    private Double confWeight;
+    private BigDecimal confWeight;
 
 }

+ 0 - 4
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/goodsConf/param/BizGoodsConfPageParam.java

@@ -54,10 +54,6 @@ public class BizGoodsConfPageParam {
     @Schema(description = "货品名称")
     private String goodsName;
 
-    /** 重量(KG) */
-    @Schema(description = "重量(KG)")
-    private Double needWeight;
-
     /** 提货开始时间开始 */
     @Schema(description = "提货开始时间开始")
     private String startConfStartTime;

+ 2 - 1
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/goodsConf/service/BizGoodsConfService.java

@@ -20,6 +20,7 @@ import vip.xiaonuo.biz.modular.goodsConf.param.BizGoodsConfEditParam;
 import vip.xiaonuo.biz.modular.goodsConf.param.BizGoodsConfIdParam;
 import vip.xiaonuo.biz.modular.goodsConf.param.BizGoodsConfPageParam;
 
+import java.math.BigDecimal;
 import java.util.List;
 
 /**
@@ -94,7 +95,7 @@ public interface BizGoodsConfService extends IService<BizGoodsConf> {
      * @author sandy
      * @date  2025/03/27 17:54
      **/
-    void editUsedWeight(String goodsConfId, Double newUsedWeight);
+    void editUsedWeight(String goodsConfId, BigDecimal newUsedWeight);
 
     /**
      * 根据订单查询提货时间信息

+ 14 - 10
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/goodsConf/service/impl/BizGoodsConfServiceImpl.java

@@ -44,6 +44,7 @@ import vip.xiaonuo.biz.modular.goodsConf.param.BizGoodsConfIdParam;
 import vip.xiaonuo.biz.modular.goodsConf.param.BizGoodsConfPageParam;
 import vip.xiaonuo.biz.modular.goodsConf.service.BizGoodsConfService;
 
+import java.math.BigDecimal;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
@@ -70,6 +71,9 @@ public class BizGoodsConfServiceImpl extends ServiceImpl<BizGoodsConfMapper, Biz
         if(ObjectUtil.isNotEmpty(goodsConfPageParam.getGoodsName())) {
             queryWrapper.lambda().like(BizGoodsConf::getGoodsName, goodsConfPageParam.getGoodsName());
         }
+        if(ObjectUtil.isNotEmpty(goodsConfPageParam.getGoodsCode())) {
+            queryWrapper.lambda().like(BizGoodsConf::getGoodsCode, goodsConfPageParam.getGoodsCode());
+        }
         if(ObjectUtil.isNotEmpty(goodsConfPageParam.getStartConfStartTime()) && ObjectUtil.isNotEmpty(goodsConfPageParam.getEndConfStartTime())) {
             queryWrapper.lambda().between(BizGoodsConf::getConfStartTime, goodsConfPageParam.getStartConfStartTime(), goodsConfPageParam.getEndConfStartTime());
         }
@@ -118,7 +122,7 @@ public class BizGoodsConfServiceImpl extends ServiceImpl<BizGoodsConfMapper, Biz
             JSONUtil.parseArray(goodsJson).forEach(object -> {
                 JSONObject jsonObject = JSONUtil.parseObj(object);
                 String goodsId = jsonObject.getStr("goodsId");
-                Double confWeight = jsonObject.getDouble("confWeight");
+                BigDecimal confWeight = jsonObject.getBigDecimal("confWeight");
                 if (ObjectUtil.isNotEmpty(goodsId)) {
                     // 查询货品
                     BizGoods bizGoods = this.bizGoodsService.queryEntity(goodsId);
@@ -147,7 +151,7 @@ public class BizGoodsConfServiceImpl extends ServiceImpl<BizGoodsConfMapper, Biz
                             /** 可提重量(KG) */
                             goodsConf.setConfWeight(confWeight);
                             /** 已提重量(KG) */
-                            goodsConf.setUsedWeight(0.0);
+                            goodsConf.setUsedWeight(BigDecimal.ZERO);
                             /** 剩余提货重量(KG) */
                             goodsConf.setLastWeight(goodsConf.getConfWeight());
 
@@ -175,11 +179,11 @@ public class BizGoodsConfServiceImpl extends ServiceImpl<BizGoodsConfMapper, Biz
         }
 
         /** 可提重量(KG) */
-        Double confWeight = goodsConf.getConfWeight();
+        BigDecimal confWeight = goodsConf.getConfWeight();
         /** 已提重量(KG) */
-        Double usedWeight = goodsConf.getUsedWeight();
+        BigDecimal usedWeight = goodsConf.getUsedWeight();
         /** 剩余提货重量(KG) */
-        goodsConf.setLastWeight(confWeight-usedWeight);
+        goodsConf.setLastWeight(confWeight.subtract(usedWeight));
         this.updateById(goodsConf);
     }
 
@@ -223,18 +227,18 @@ public class BizGoodsConfServiceImpl extends ServiceImpl<BizGoodsConfMapper, Biz
 
     @Transactional(rollbackFor = Exception.class)
     @Override
-    public void editUsedWeight(String goodsConfId, Double newUsedWeight) {
+    public void editUsedWeight(String goodsConfId, BigDecimal newUsedWeight) {
         BizGoodsConf goodsConf = this.queryEntity(goodsConfId);
         if(null != goodsConf){
             /** 最大可提货重量(KG) */
-            Double confWeight = goodsConf.getConfWeight();
+            BigDecimal confWeight = goodsConf.getConfWeight();
             /** 原已提重量(KG) */
-            Double usedWeight = goodsConf.getUsedWeight();
-            usedWeight = usedWeight + newUsedWeight;
+            BigDecimal usedWeight = goodsConf.getUsedWeight();
+            usedWeight = usedWeight.add(newUsedWeight);
             // 更新已提货重量
             goodsConf.setUsedWeight(usedWeight);
             /** 剩余提货重量(KG) */
-            goodsConf.setLastWeight(confWeight-usedWeight);
+            goodsConf.setLastWeight(confWeight.subtract(usedWeight));
             this.updateById(goodsConf);
         }
     }

+ 123 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/oawxsendlog/controller/OaWxSendLogController.java

@@ -0,0 +1,123 @@
+/*
+ * 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.oawxsendlog.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import com.github.xiaoymin.knife4j.annotations.ApiSupport;
+import jakarta.annotation.Resource;
+import jakarta.validation.constraints.NotEmpty;
+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.oawxsendlog.entity.OaWxSendLog;
+import vip.xiaonuo.biz.modular.oawxsendlog.param.OaWxSendLogAddParam;
+import vip.xiaonuo.biz.modular.oawxsendlog.param.OaWxSendLogEditParam;
+import vip.xiaonuo.biz.modular.oawxsendlog.param.OaWxSendLogIdParam;
+import vip.xiaonuo.biz.modular.oawxsendlog.param.OaWxSendLogPageParam;
+import vip.xiaonuo.biz.modular.oawxsendlog.service.OaWxSendLogService;
+
+import javax.validation.Valid;
+import java.util.List;
+
+/**
+ * 微信消息推送日志控制器
+ *
+ * @author xiaofan
+ * @date  2023/12/18 15:24
+ */
+@ApiSupport(author = "SNOWY_TEAM", order = 1)
+@RestController
+@Validated
+public class OaWxSendLogController {
+
+    @Resource
+    private OaWxSendLogService oaWxSendLogService;
+
+    /**
+     * 获取微信消息推送日志分页
+     *
+     * @author xiaofan
+     * @date  2023/12/18 15:24
+     */
+    @ApiOperationSupport(order = 1)
+    @SaCheckPermission("/biz/oawxsendlog/page")
+    @GetMapping("/biz/oawxsendlog/page")
+    public CommonResult<Page<OaWxSendLog>> page(OaWxSendLogPageParam oaWxSendLogPageParam) {
+        return CommonResult.data(oaWxSendLogService.page(oaWxSendLogPageParam));
+    }
+
+    /**
+     * 添加微信消息推送日志
+     *
+     * @author xiaofan
+     * @date  2023/12/18 15:24
+     */
+    @ApiOperationSupport(order = 2)
+    @CommonLog("添加微信消息推送日志")
+    @SaCheckPermission("/biz/oawxsendlog/add")
+    @PostMapping("/biz/oawxsendlog/add")
+    public CommonResult<String> add(@RequestBody @Valid OaWxSendLogAddParam oaWxSendLogAddParam) {
+        oaWxSendLogService.add(oaWxSendLogAddParam);
+        return CommonResult.ok();
+    }
+
+    /**
+     * 编辑微信消息推送日志
+     *
+     * @author xiaofan
+     * @date  2023/12/18 15:24
+     */
+    @ApiOperationSupport(order = 3)
+    @CommonLog("编辑微信消息推送日志")
+    @SaCheckPermission("/biz/oawxsendlog/edit")
+    @PostMapping("/biz/oawxsendlog/edit")
+    public CommonResult<String> edit(@RequestBody @Valid OaWxSendLogEditParam oaWxSendLogEditParam) {
+        oaWxSendLogService.edit(oaWxSendLogEditParam);
+        return CommonResult.ok();
+    }
+
+    /**
+     * 删除微信消息推送日志
+     *
+     * @author xiaofan
+     * @date  2023/12/18 15:24
+     */
+    @ApiOperationSupport(order = 4)
+    @CommonLog("删除微信消息推送日志")
+    @SaCheckPermission("/biz/oawxsendlog/delete")
+    @PostMapping("/biz/oawxsendlog/delete")
+    public CommonResult<String> delete(@RequestBody @Valid @NotEmpty(message = "集合不能为空")
+                                       List<OaWxSendLogIdParam> oaWxSendLogIdParamList) {
+        oaWxSendLogService.delete(oaWxSendLogIdParamList);
+        return CommonResult.ok();
+    }
+
+    /**
+     * 获取微信消息推送日志详情
+     *
+     * @author xiaofan
+     * @date  2023/12/18 15:24
+     */
+    @ApiOperationSupport(order = 5)
+    @SaCheckPermission("/biz/oawxsendlog/detail")
+    @GetMapping("/biz/oawxsendlog/detail")
+    public CommonResult<OaWxSendLog> detail(@Valid OaWxSendLogIdParam oaWxSendLogIdParam) {
+        return CommonResult.data(oaWxSendLogService.detail(oaWxSendLogIdParam));
+    }
+}

+ 51 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/oawxsendlog/entity/OaWxSendLog.java

@@ -0,0 +1,51 @@
+/*
+ * 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.oawxsendlog.entity;
+
+import com.baomidou.mybatisplus.annotation.*;
+import lombok.Getter;
+import lombok.Setter;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 微信消息推送日志实体
+ *
+ * @author xiaofan
+ * @date  2023/12/18 15:24
+ **/
+@Getter
+@Setter
+@TableName("oa_wx_send_log")
+public class OaWxSendLog {
+
+    /** 微信推送消息记录表id */
+    @TableId
+    private String id;
+
+    /** 发送人 */
+    private String sendUserId;
+
+    /** 发送人姓名 */
+    private String sendUserName;
+
+    /** 发送的消息 */
+    private String sendMsg;
+
+    /** 微信返回的消息 */
+    private String backMsg;
+
+    /** 创建时间 */
+    @TableField(fill = FieldFill.INSERT)
+    private Date createTime;
+}

+ 34 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/oawxsendlog/enums/OaWxSendLogEnum.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.oawxsendlog.enums;
+
+import lombok.Getter;
+
+/**
+ * 微信消息推送日志枚举
+ *
+ * @author xiaofan
+ * @date  2023/12/18 15:24
+ **/
+@Getter
+public enum OaWxSendLogEnum {
+
+    /** 测试 */
+    TEST("TEST");
+
+    private final String value;
+
+    OaWxSendLogEnum(String value) {
+        this.value = value;
+    }
+}

+ 25 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/oawxsendlog/mapper/OaWxSendLogMapper.java

@@ -0,0 +1,25 @@
+/*
+ * 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.oawxsendlog.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import vip.xiaonuo.biz.modular.oawxsendlog.entity.OaWxSendLog;
+
+/**
+ * 微信消息推送日志Mapper接口
+ *
+ * @author xiaofan
+ * @date  2023/12/18 15:24
+ **/
+public interface OaWxSendLogMapper extends BaseMapper<OaWxSendLog> {
+}

+ 5 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/oawxsendlog/mapper/mapping/OaWxSendLogMapper.xml

@@ -0,0 +1,5 @@
+<?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.oawxsendlog.mapper.OaWxSendLogMapper">
+
+</mapper>

+ 44 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/oawxsendlog/param/OaWxSendLogAddParam.java

@@ -0,0 +1,44 @@
+/*
+ * 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.oawxsendlog.param;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotNull;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 微信消息推送日志添加参数
+ *
+ * @author xiaofan
+ * @date  2023/12/18 15:24
+ **/
+@Getter
+@Setter
+public class OaWxSendLogAddParam {
+
+    /** 发送人 */
+    private Long sendUserId;
+
+    /** 发送人姓名 */
+    private String sendUserName;
+
+    /** 发送的消息 */
+    private String sendMsg;
+
+    /** 微信返回的消息 */
+    private String backMsg;
+
+}

+ 48 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/oawxsendlog/param/OaWxSendLogEditParam.java

@@ -0,0 +1,48 @@
+/*
+ * 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.oawxsendlog.param;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotNull;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 微信消息推送日志编辑参数
+ *
+ * @author xiaofan
+ * @date  2023/12/18 15:24
+ **/
+@Getter
+@Setter
+public class OaWxSendLogEditParam {
+
+    /** 微信推送消息记录表id */
+    @NotNull(message = "id不能为空")
+    private String id;
+
+    /** 发送人 */
+    private Long sendUserId;
+
+    /** 发送人姓名 */
+    private String sendUserName;
+
+    /** 发送的消息 */
+    private String sendMsg;
+
+    /** 微信返回的消息 */
+    private String backMsg;
+
+}

+ 33 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/oawxsendlog/param/OaWxSendLogIdParam.java

@@ -0,0 +1,33 @@
+/*
+ * 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.oawxsendlog.param;
+
+import jakarta.validation.constraints.NotBlank;
+import lombok.Getter;
+import lombok.Setter;
+
+
+/**
+ * 微信消息推送日志Id参数
+ *
+ * @author xiaofan
+ * @date  2023/12/18 15:24
+ **/
+@Getter
+@Setter
+public class OaWxSendLogIdParam {
+
+    /** 微信推送消息记录表id */
+    @NotBlank(message = "id不能为空")
+    private String id;
+}

+ 45 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/oawxsendlog/param/OaWxSendLogPageParam.java

@@ -0,0 +1,45 @@
+/*
+ * 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.oawxsendlog.param;
+
+import lombok.Getter;
+import lombok.Setter;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 微信消息推送日志查询参数
+ *
+ * @author xiaofan
+ * @date  2023/12/18 15:24
+ **/
+@Getter
+@Setter
+public class OaWxSendLogPageParam {
+
+    /** 当前页 */
+    private Integer current;
+
+    /** 每页条数 */
+    private Integer size;
+
+    /** 排序字段 */
+    private String sortField;
+
+    /** 排序方式 */
+    private String sortOrder;
+
+    /** 关键词 */
+    private String searchKey;
+
+}

+ 80 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/oawxsendlog/service/OaWxSendLogService.java

@@ -0,0 +1,80 @@
+/*
+ * 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.oawxsendlog.service;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.IService;
+import vip.xiaonuo.biz.modular.oawxsendlog.entity.OaWxSendLog;
+import vip.xiaonuo.biz.modular.oawxsendlog.param.OaWxSendLogAddParam;
+import vip.xiaonuo.biz.modular.oawxsendlog.param.OaWxSendLogEditParam;
+import vip.xiaonuo.biz.modular.oawxsendlog.param.OaWxSendLogIdParam;
+import vip.xiaonuo.biz.modular.oawxsendlog.param.OaWxSendLogPageParam;
+
+import java.util.List;
+
+/**
+ * 微信消息推送日志Service接口
+ *
+ * @author xiaofan
+ * @date  2023/12/18 15:24
+ **/
+public interface OaWxSendLogService extends IService<OaWxSendLog> {
+
+    /**
+     * 获取微信消息推送日志分页
+     *
+     * @author xiaofan
+     * @date  2023/12/18 15:24
+     */
+    Page<OaWxSendLog> page(OaWxSendLogPageParam oaWxSendLogPageParam);
+
+    /**
+     * 添加微信消息推送日志
+     *
+     * @author xiaofan
+     * @date  2023/12/18 15:24
+     */
+    void add(OaWxSendLogAddParam oaWxSendLogAddParam);
+
+    /**
+     * 编辑微信消息推送日志
+     *
+     * @author xiaofan
+     * @date  2023/12/18 15:24
+     */
+    void edit(OaWxSendLogEditParam oaWxSendLogEditParam);
+
+    /**
+     * 删除微信消息推送日志
+     *
+     * @author xiaofan
+     * @date  2023/12/18 15:24
+     */
+    void delete(List<OaWxSendLogIdParam> oaWxSendLogIdParamList);
+
+    /**
+     * 获取微信消息推送日志详情
+     *
+     * @author xiaofan
+     * @date  2023/12/18 15:24
+     */
+    OaWxSendLog detail(OaWxSendLogIdParam oaWxSendLogIdParam);
+
+    /**
+     * 获取微信消息推送日志详情
+     *
+     * @author xiaofan
+     * @date  2023/12/18 15:24
+     **/
+    OaWxSendLog queryEntity(String id);
+}

+ 94 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/oawxsendlog/service/impl/OaWxSendLogServiceImpl.java

@@ -0,0 +1,94 @@
+/*
+ * 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.oawxsendlog.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.oawxsendlog.entity.OaWxSendLog;
+import vip.xiaonuo.biz.modular.oawxsendlog.mapper.OaWxSendLogMapper;
+import vip.xiaonuo.biz.modular.oawxsendlog.param.OaWxSendLogAddParam;
+import vip.xiaonuo.biz.modular.oawxsendlog.param.OaWxSendLogEditParam;
+import vip.xiaonuo.biz.modular.oawxsendlog.param.OaWxSendLogIdParam;
+import vip.xiaonuo.biz.modular.oawxsendlog.param.OaWxSendLogPageParam;
+import vip.xiaonuo.biz.modular.oawxsendlog.service.OaWxSendLogService;
+
+import java.util.List;
+
+/**
+ * 微信消息推送日志Service接口实现类
+ *
+ * @author xiaofan
+ * @date  2023/12/18 15:24
+ **/
+@Service
+public class OaWxSendLogServiceImpl extends ServiceImpl<OaWxSendLogMapper, OaWxSendLog> implements OaWxSendLogService {
+
+    @Override
+    public Page<OaWxSendLog> page(OaWxSendLogPageParam oaWxSendLogPageParam) {
+        QueryWrapper<OaWxSendLog> queryWrapper = new QueryWrapper<>();
+        if(ObjectUtil.isAllNotEmpty(oaWxSendLogPageParam.getSortField(), oaWxSendLogPageParam.getSortOrder())) {
+            CommonSortOrderEnum.validate(oaWxSendLogPageParam.getSortOrder());
+            queryWrapper.orderBy(true, oaWxSendLogPageParam.getSortOrder().equals(CommonSortOrderEnum.ASC.getValue()),
+                    StrUtil.toUnderlineCase(oaWxSendLogPageParam.getSortField()));
+        } else {
+            queryWrapper.lambda().orderByAsc(OaWxSendLog::getId);
+        }
+        return this.page(CommonPageRequest.defaultPage(), queryWrapper);
+    }
+
+    @Transactional(rollbackFor = Exception.class)
+    @Override
+    public void add(OaWxSendLogAddParam oaWxSendLogAddParam) {
+        OaWxSendLog oaWxSendLog = BeanUtil.toBean(oaWxSendLogAddParam, OaWxSendLog.class);
+        this.save(oaWxSendLog);
+    }
+
+    @Transactional(rollbackFor = Exception.class)
+    @Override
+    public void edit(OaWxSendLogEditParam oaWxSendLogEditParam) {
+        OaWxSendLog oaWxSendLog = this.queryEntity(oaWxSendLogEditParam.getId());
+        BeanUtil.copyProperties(oaWxSendLogEditParam, oaWxSendLog);
+        this.updateById(oaWxSendLog);
+    }
+
+    @Transactional(rollbackFor = Exception.class)
+    @Override
+    public void delete(List<OaWxSendLogIdParam> oaWxSendLogIdParamList) {
+        // 执行删除
+        this.removeByIds(CollStreamUtil.toList(oaWxSendLogIdParamList, OaWxSendLogIdParam::getId));
+    }
+
+    @Override
+    public OaWxSendLog detail(OaWxSendLogIdParam oaWxSendLogIdParam) {
+        return this.queryEntity(oaWxSendLogIdParam.getId());
+    }
+
+    @Override
+    public OaWxSendLog queryEntity(String id) {
+        OaWxSendLog oaWxSendLog = this.getById(id);
+        if(ObjectUtil.isEmpty(oaWxSendLog)) {
+            throw new CommonException("微信消息推送日志不存在,id值为:{}", id);
+        }
+        return oaWxSendLog;
+    }
+}

+ 4 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/entity/BizRecord.java

@@ -220,4 +220,8 @@ public class BizRecord extends CommonEntity {
     private String unloadName;
 
     private String auditSign;
+
+    @TableField(exist = false)
+    /**订单类型*/
+    private String orderType;
 }

+ 52 - 1
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/mapper/mapping/BizRecordMapper.xml

@@ -267,9 +267,60 @@
 
     <select id="getPage" resultType="vip.xiaonuo.biz.modular.record.entity.BizRecord">
         select
-            br.*,
+            br.ID,
+            br.RELATION_ID,
+            br.LICENSE_PLATE,
+            br.PLATE_COLOR,
+            br.CAR_NUMBER,
+            br.GROSS_TIME,
+            br.TARE_TIME,
+            br.TARE_TYPE,
+            br.GROSS_WEIGHT/1000 GROSS_WEIGHT,
+            br.TARE_WEIGHT/1000 TARE_WEIGHT,
+            br.NET_WEIGHT/1000 NET_WEIGHT,
+            br.KF_WEIGHT/1000 KF_WEIGHT,
+            br.DRIVER_NAME,
+            br.DRIVER_MOBILE,
+            br.GOODS_NAME,
+            br.GOODS_MODEL,
+            br.RECEIPT_COMPANY,
+            br.SHIPPING_COMPANY,
+            br.TRANSPORT_COMPANY,
+            br.TRANSPORT_ROUTE,
+            br.GROSS_PLATE_NAME,
+            br.GROSS_LICENSE_NAME,
+            br.GROSS_CAPTURE_HEAD,
+            br.GROSS_CAPTURE_TAIL,
+            br.GROSS_CAPTURE_WARE,
+            br.GROSS_CAPTURE_BODY,
+            br.GROSS_CAPTURE_POUND_ROOM,
+            br.TARE_PLATE_NAME,
+            br.TARE_LICENSE_NAME,
+            br.TARE_CAPTURE_HEAD,
+            br.TARE_CAPTURE_TAIL,
+            br.TARE_CAPTURE_WARE,
+            br.TARE_CAPTURE_BODY,
+            br.TARE_CAPTURE_POUND_ROOM,
+            br.EXT_KEY1,
+            br.EXT_KEY2,
+            br.DELETE_FLAG,
+            br.CREATE_TIME,
+            br.CREATE_USER,
+            br.UPDATE_TIME,
+            br.UPDATE_USER,
+            br.weighing_type,
+            br.appointment_id,
+            br.order_id,
+            br.confirm_user,
+            br.appointment_user,
+            br.driver_sign,
+            br.unload_weight/1000 unload_weight,
+            br.unload_img,
+            br.unload_name,
+            br.audit_sign,
             bo.order_name,
             bo.order_number,
+            bo.order_type,
             bc.name customerName,
             bar.status
         from biz_record br

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

@@ -118,4 +118,7 @@ public class BizRecordPageParam {
     /**签收审核标识*/
     private String signFlag;
 
+    /**发货确认状态*/
+    private String sendRecordStatus;
+
 }

+ 39 - 22
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/result/BizRecordExportResult.java

@@ -41,30 +41,17 @@ public class BizRecordExportResult {
     private String carNumber;
 
     /** 车牌号码 */
+    @ColumnWidth(20)
     @HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL)
     @ExcelProperty({"过磅记录", "车牌号码"})
     private String licensePlate;
 
     /** 车牌颜色 */
+    @ColumnWidth(20)
     @HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL)
     @ExcelProperty({"过磅记录", "车牌颜色"})
     private String plateColor;
 
-    /** 毛重 */
-    @HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL)
-    @ExcelProperty({"过磅记录", "称重信息", "毛重(KG)"})
-    private BigDecimal grossWeight;
-
-    /** 皮重 */
-    @HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL)
-    @ExcelProperty({"过磅记录", "称重信息", "皮重(KG)"})
-    private BigDecimal tareWeight;
-
-    /** 净重 */
-    @HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL)
-    @ExcelProperty({"过磅记录", "称重信息", "净重(KG)"})
-    private BigDecimal netWeight;
-
     /** 过毛时间 */
     @ColumnWidth(30)
     @HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL)
@@ -79,62 +66,92 @@ public class BizRecordExportResult {
     @ExcelProperty({"过磅记录", "称重信息", "过皮时间"})
     private Date tareTime;
 
+    /** 毛重 */
+    @ColumnWidth(20)
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL)
+    @ExcelProperty({"过磅记录", "称重信息", "毛重(吨)"})
+    private BigDecimal grossWeight;
+
+    /** 皮重 */
+    @ColumnWidth(20)
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL)
+    @ExcelProperty({"过磅记录", "称重信息", "皮重(吨)"})
+    private BigDecimal tareWeight;
+
+    /** 净重 */
+    @ColumnWidth(20)
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL)
+    @ExcelProperty({"过磅记录", "称重信息", "净重(吨)"})
+    private BigDecimal netWeight;
+
 
     /** 订单名称 */
+    @ColumnWidth(20)
     @HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL)
     @ExcelProperty({"过磅记录", "订单信息", "订单名称"})
     private String orderName;
 
     /** 订单编号 */
+    @ColumnWidth(20)
     @HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL)
     @ExcelProperty({"过磅记录", "订单信息", "订单编号"})
     private String orderNumber;
 
+    /** 客户名称 */
+    @ColumnWidth(20)
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL)
+    @ExcelProperty({"过磅记录", "客户名称"})
+    private String customerName;
+
     /** 货品名称 */
+    @ColumnWidth(20)
     @HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL)
     @ExcelProperty({"过磅记录", "货品信息", "货品名称"})
     private String goodsName;
 
     /** 货品规格 */
+    @ColumnWidth(20)
     @HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL)
     @ExcelProperty({"过磅记录", "货品信息", "货品规格"})
     private String goodsModel;
 
-    /** 收货单位 */
+    /** 收货单位 *//*
     @ColumnWidth(50)
     @HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL)
     @ExcelProperty({"过磅记录", "货品信息", "收货单位"})
     private String receiptCompany;
 
-    /** 发货单位 */
+    *//** 发货单位 *//*
     @ColumnWidth(50)
     @HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL)
     @ExcelProperty({"过磅记录", "货品信息", "发货单位"})
     private String shippingCompany;
 
-    /** 运输单位 */
+    *//** 运输单位 *//*
     @ColumnWidth(50)
     @HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL)
     @ExcelProperty({"过磅记录", "货品信息", "运输单位"})
-    private String transportCompany;
+    private String transportCompany;*/
 
     /** 司机姓名 */
+    @ColumnWidth(20)
     @HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL)
     @ExcelProperty({"过磅记录", "司机信息", "司机姓名"})
     private String driverName;
 
     /** 司机电话 */
+    @ColumnWidth(20)
     @HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL)
     @ExcelProperty({"过磅记录", "司机信息", "司机电话"})
     private String driverMobile;
 
-    /** 人员状态 */
+   /* *//** 人员状态 *//*
     @HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL)
     @ExcelProperty({"过磅记录", "备注1"})
     private String extKey1;
 
-    /** 人员状态 */
+    *//** 人员状态 *//*
     @HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL)
     @ExcelProperty({"过磅记录", "备注2"})
-    private String extKey2;
+    private String extKey2;*/
 }

+ 6 - 12
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/result/GoodsResult.java

@@ -20,40 +20,34 @@ import java.math.BigDecimal;
 @Getter
 public class GoodsResult {
 
-    @Schema(description = "货品名称")
     @ColumnWidth(20)
     @HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL)
     @ExcelProperty({"统计分析", "货品名称"})
     private String goodsName;
 
-    @Schema(description = "规格型号")
     @ColumnWidth(20)
     @HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL)
-    @ExcelProperty({"统计分析", "规格型号"})
+    @ExcelProperty({"统计分析", "货品规格"})
     private String goodsModel;
 
-    @Schema(description = "总车次")
     @ColumnWidth(20)
     @HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL)
     @ExcelProperty({"统计分析", "总车次"})
     private Integer totalCarNum;
 
-    @Schema(description = "总净重")
-    @ColumnWidth(20)
-    @HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL)
-    @ExcelProperty({"统计分析", "总净重(吨)"})
-    private BigDecimal totalNetWeight;
-
-    @Schema(description = "总毛重")
     @ColumnWidth(20)
     @HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL)
     @ExcelProperty({"统计分析", "总毛重(吨)"})
     private BigDecimal totalGrossWeight;
 
-    @Schema(description = "总皮重")
     @ColumnWidth(20)
     @HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL)
     @ExcelProperty({"统计分析", "总皮重(吨)"})
     private BigDecimal totalTareWeight;
 
+    @ColumnWidth(20)
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL)
+    @ExcelProperty({"统计分析", "总净重(吨)"})
+    private BigDecimal totalNetWeight;
+
 }

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

@@ -39,6 +39,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.google.common.collect.Maps;
 import jakarta.annotation.Resource;
 import jakarta.servlet.http.HttpServletResponse;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.poi.ss.usermodel.*;
 import org.springframework.stereotype.Service;
@@ -83,6 +84,7 @@ import java.util.stream.Collectors;
  * @date 2025/01/02 16:34
  **/
 @Service
+@Slf4j
 public class BizRecordServiceImpl extends ServiceImpl<BizRecordMapper, BizRecord> implements BizRecordService {
 
     @Resource
@@ -149,6 +151,16 @@ public class BizRecordServiceImpl extends ServiceImpl<BizRecordMapper, BizRecord
             queryWrapper.in("bar.status","10","11","12","13");
             queryWrapper.eq("bo.order_type","1");
         }
+        //发货确认状态查询
+        if (ObjectUtil.isNotEmpty(bizRecordPageParam.getSendRecordStatus())){
+            if(StringUtils.equals(bizRecordPageParam.getSendRecordStatus(),"1")){
+                //待确认
+                queryWrapper.isNull("br.confirm_user");
+            }else{
+                //已确认
+                queryWrapper.isNotNull("br.confirm_user");
+            }
+        }
         if (ObjectUtil.isNotEmpty(bizRecordPageParam.getOrderName())){
             queryWrapper.like("bo.order_name",bizRecordPageParam.getOrderName());
         }
@@ -156,7 +168,7 @@ public class BizRecordServiceImpl extends ServiceImpl<BizRecordMapper, BizRecord
             queryWrapper.like("bo.order_number",bizRecordPageParam.getOrderNumber());
         }
         if (ObjectUtil.isNotEmpty(bizRecordPageParam.getCustomerName())){
-            queryWrapper.like("bc.customer_name",bizRecordPageParam.getCustomerName());
+            queryWrapper.like("bc.name",bizRecordPageParam.getCustomerName());
         }
         if (ObjectUtil.isNotEmpty(bizRecordPageParam.getOrderId())){
             queryWrapper.eq("br.order_id",bizRecordPageParam.getOrderId());
@@ -579,8 +591,14 @@ public class BizRecordServiceImpl extends ServiceImpl<BizRecordMapper, BizRecord
         //修改预约记录状态
         BizAppointmentRecord appointmentRecord = bizAppointmentRecordService.getById(bizRecord.getAppointmentId());
         if(ObjectUtil.isNotNull(appointmentRecord)){
-            //司机签名后修改为可入场状态
-            appointmentRecord.setStatus("9");
+            BizConfig bizConfig = bizConfigService.getOne(new QueryWrapper<BizConfig>().lambda().last("limit 1"));
+            if(StringUtils.equals(bizConfig.getAccessControlSwitch(),"1")){
+                //开启门禁校验
+                //司机签名后修改为可入场状态
+                appointmentRecord.setStatus("9");
+            }else{
+                appointmentRecord.setStatus("10");
+            }
             bizAppointmentRecordService.updateById(appointmentRecord);
         }
 
@@ -616,21 +634,26 @@ public class BizRecordServiceImpl extends ServiceImpl<BizRecordMapper, BizRecord
 
         //净重和卸货重量进行对比
         BigDecimal weight = new BigDecimal(0);
-        if(bizRecord.getNetWeight().compareTo(bizRecordEditParam.getUnloadWeight()) > 0){
-            weight = bizRecord.getNetWeight().subtract(bizRecordEditParam.getUnloadWeight());
+        if(bizRecord.getNetWeight().compareTo(bizRecordEditParam.getUnloadWeight()) >= 0){
+            weight = bizRecord.getNetWeight().subtract(bizRecordEditParam.getUnloadWeight().multiply(new BigDecimal(1000)));
         }else{
-            weight = bizRecordEditParam.getUnloadWeight().subtract(bizRecord.getNetWeight());
+            weight = bizRecord.getNetWeight().subtract(bizRecordEditParam.getUnloadWeight().multiply(new BigDecimal(1000))).negate();
         }
+
         //如果差值等于0说明没有误差,预约状态修改为11,已签收
-        //查询预约记录
+        //查询预约记录run
         BizAppointmentRecord appointmentRecord = bizAppointmentRecordService.getById(bizRecord.getAppointmentId());
         if(ObjectUtil.isNotNull(appointmentRecord)){
             if(weight.compareTo(BigDecimal.ZERO) == 0){
                 appointmentRecord.setStatus("11");
+            }else if(bizRecord.getNetWeight().compareTo(BigDecimal.ZERO) == 0){
+                appointmentRecord.setStatus("12");
             }else{
                 //计算差值百分比
-                BigDecimal decimal = weight.divide(bizRecord.getNetWeight()).multiply(new BigDecimal(100));
+                BigDecimal decimal = weight.divide(bizRecord.getNetWeight(),2,BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100));
+                log.info("司机回签卸货百分比:"+decimal);
                 BizConfig bizConfig = bizConfigService.getOne(new QueryWrapper<BizConfig>().lambda().last("limit 1"));
+                log.info("配置卸货百分比:"+bizConfig.getLossWarn());
                 if(decimal.compareTo(bizConfig.getLossWarn()) > 0){
                     appointmentRecord.setStatus("12");
                 }else{
@@ -641,6 +664,20 @@ public class BizRecordServiceImpl extends ServiceImpl<BizRecordMapper, BizRecord
         }
     }
 
+    public static void main(String[] args) {
+        BigDecimal subtract = new BigDecimal(15400).subtract(new BigDecimal(15).multiply(new BigDecimal(1000)));
+        BigDecimal decimal = subtract.divide(new BigDecimal(15000), 2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100));
+        if(decimal.compareTo(new BigDecimal(2)) > 0){
+            System.out.printf("大于2");
+        }else{
+            System.out.printf("小于等于2");
+        }
+
+        BigDecimal subtract1 = new BigDecimal(15000).subtract(new BigDecimal(15.3).multiply(new BigDecimal(1000))).negate();
+        System.out.printf("sbu:"+subtract1);
+
+    }
+
     @Override
     public void auditRecord(BizRecordEditParam bizRecordEditParam) {
         BizRecord bizRecord = this.queryEntity(bizRecordEditParam.getId());

+ 7 - 3
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/supplier/param/BizSupplierPageParam.java

@@ -42,8 +42,12 @@ public class BizSupplierPageParam {
     @Schema(description = "排序方式,升序:ASCEND;降序:DESCEND")
     private String sortOrder;
 
-    /** 关键词 */
-    @Schema(description = "关键词")
-    private String searchKey;
+    /** 供货商名称 */
+    @Schema(description = "供货商名称")
+    private String supplierName;
+
+    /** 联系人 */
+    @Schema(description = "联系人")
+    private String supplierContactName;
 
 }

+ 5 - 2
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/supplier/service/impl/BizSupplierServiceImpl.java

@@ -46,8 +46,11 @@ public class BizSupplierServiceImpl extends ServiceImpl<BizSupplierMapper, BizSu
     @Override
     public Page<BizSupplier> page(BizSupplierPageParam bizSupplierPageParam) {
         QueryWrapper<BizSupplier> queryWrapper = new QueryWrapper<BizSupplier>().checkSqlInjection();
-        if(ObjectUtil.isNotEmpty(bizSupplierPageParam.getSearchKey())){
-            queryWrapper.lambda().like(BizSupplier::getSupplierName,bizSupplierPageParam.getSearchKey());
+        if(ObjectUtil.isNotEmpty(bizSupplierPageParam.getSupplierName())){
+            queryWrapper.lambda().like(BizSupplier::getSupplierName,bizSupplierPageParam.getSupplierName());
+        }
+        if(ObjectUtil.isNotEmpty(bizSupplierPageParam.getSupplierContactName())){
+            queryWrapper.lambda().like(BizSupplier::getSupplierContactName,bizSupplierPageParam.getSupplierContactName());
         }
         queryWrapper.lambda().orderByDesc(BizSupplier::getCreateTime);
         return this.page(CommonPageRequest.defaultPage(), queryWrapper);

+ 5 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/task/AppointmentCallTask.java

@@ -54,6 +54,11 @@ public class AppointmentCallTask implements CommonTimerTaskRunner {
                 }
                 bizAppointmentRecordService.updateById(record);
                 log.info("车牌号:"+record.getLicenseNumber()+"在("+record.getBeginTime()+"~"+record.getEndTime()+")时间段内叫号成功!");
+
+                if(StringUtils.equals(bizConfig.getLineNoticeSwitch(),"1")){
+                    bizAppointmentRecordService.sendAccount(record);
+                }
+
             }
         }
 

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików