fanzherong_v 1 hónapja
szülő
commit
6406014290
34 módosított fájl, 1247 hozzáadás és 137 törlés
  1. 4 0
      snowy-admin-web/src/api/biz/bizRecordApi.js
  2. 1 1
      snowy-admin-web/src/views/biz/bizappointmentrecord/detail.vue
  3. 2 2
      snowy-admin-web/src/views/biz/bizappointmentrecord/form.vue
  4. 5 4
      snowy-admin-web/src/views/biz/bizappointmentrecord/index.vue
  5. 1 1
      snowy-admin-web/src/views/biz/bizqueuerecord/detail.vue
  6. 2 2
      snowy-admin-web/src/views/biz/bizqueuerecord/editOrder.vue
  7. 2 2
      snowy-admin-web/src/views/biz/bizqueuerecord/form.vue
  8. 3 3
      snowy-admin-web/src/views/biz/bizqueuerecord/index.vue
  9. 118 0
      snowy-admin-web/src/views/biz/bizsendrecord/detail.vue
  10. 177 0
      snowy-admin-web/src/views/biz/bizsendrecord/form.vue
  11. 495 0
      snowy-admin-web/src/views/biz/bizsendrecord/index.vue
  12. 7 4
      snowy-admin-web/src/views/biz/record/detail.vue
  13. 61 12
      snowy-admin-web/src/views/biz/record/index.vue
  14. 1 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/entity/BizAppointmentRecord.java
  15. 1 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/mapper/mapping/BizAppointmentRecordMapper.xml
  16. 1 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/param/BizAppointmentExportResult.java
  17. 1 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/param/BizAppointmentRecordAddParam.java
  18. 1 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/param/BizAppointmentRecordEditParam.java
  19. 1 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/param/BizAppointmentRecordPageParam.java
  20. 27 9
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/service/impl/BizAppointmentRecordServiceImpl.java
  21. 2 2
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmenttime/service/impl/BizAppointmentTimeServiceImpl.java
  22. 28 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/controller/BizRecordController.java
  23. 29 26
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/entity/BizRecord.java
  24. 7 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/mapper/BizRecordMapper.java
  25. 14 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/mapper/mapping/BizRecordMapper.xml
  26. 8 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/param/BizRecordAddParam.java
  27. 9 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/param/BizRecordEditParam.java
  28. 13 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/param/BizRecordPageParam.java
  29. 21 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/result/BizRecordExportResult.java
  30. 10 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/service/BizRecordService.java
  31. 101 57
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/service/impl/BizRecordServiceImpl.java
  32. 48 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/task/AppointmentCallTask.java
  33. 44 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/task/AppointmentTimeOutTask.java
  34. 2 1
      snowy-web-app/src/main/java/vip/xiaonuo/core/config/GlobalConfigure.java

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

@@ -88,5 +88,9 @@ export default {
 		return request('carCountExport', data, 'post', {
 			responseType: 'blob'
 		})
+	},
+	//发货确认
+	confirmRecord(data){
+		return request('confirmRecord',data)
 	}
 }

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

@@ -11,7 +11,7 @@
 				<a-descriptions-item label="货品名称" :span="2">{{ formData.goodsName }}</a-descriptions-item>
 				<a-descriptions-item label="货品规格" :span="2">{{ formData.goodsModel }}</a-descriptions-item>
 				<a-descriptions-item label="司机姓名" :span="2">{{ formData.driverName }}</a-descriptions-item>
-				<a-descriptions-item label="司机电话" :span="2">{{ formData.driverPhone }}</a-descriptions-item>
+				<a-descriptions-item label="司机电话" :span="2">{{ formData.driverMobile }}</a-descriptions-item>
 
 				<a-descriptions-item label="预约状态" :span="4">
 					<a-tag

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

@@ -23,8 +23,8 @@
 			<a-form-item label="司机姓名:" name="driverName">
 				<a-input v-model:value="formData.driverName" placeholder="请输入司机姓名" allow-clear />
 			</a-form-item>
-			<a-form-item label="司机电话:" name="driverPhone">
-				<a-input v-model:value="formData.driverPhone" placeholder="请输入司机电话" allow-clear />
+			<a-form-item label="司机电话:" name="driverMobile">
+				<a-input v-model:value="formData.driverMobile" placeholder="请输入司机电话" allow-clear />
 			</a-form-item>
 		</a-form>
 		<template #footer>

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

@@ -34,8 +34,8 @@
 						</a-form-item>
 					</a-col>
 					<a-col :span="6">
-						<a-form-item label="司机电话" name="driverPhone">
-							<a-input v-model:value="searchFormState.driverPhone" placeholder="司机电话查询" />
+						<a-form-item label="司机电话" name="driverMobile">
+							<a-input v-model:value="searchFormState.driverMobile" placeholder="司机电话查询" />
 						</a-form-item>
 					</a-col>
 
@@ -96,7 +96,7 @@
 				<template v-if="column.dataIndex === 'driverInfo'">
 					<div class="time-list">
 						<p>姓名:{{ record.driverName }}</p>
-						<p style="margin-bottom: 0">电话:{{ record.driverPhone }}</p>
+						<p style="margin-bottom: 0">电话:{{ record.driverMobile }}</p>
 					</div>
 				</template>
 				<template v-if="column.dataIndex === 'goodsInfo'">
@@ -373,7 +373,8 @@
 	const getQrCode = (record) => {
 		//QRCode.toDataURL("id:"+record.id+"saleCode:"+record.saleCode, {
 		let param = {
-			id:record.id
+			id:record.id,
+			licenseNumber:record.licenseNumber
 		}
 		QRCode.toDataURL(JSON.stringify(param), {
 			errorCorrectionLevel: 'H',

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

@@ -11,7 +11,7 @@
 				<a-descriptions-item label="货品名称" :span="2">{{ formData.goodsName }}</a-descriptions-item>
 				<a-descriptions-item label="货品规格" :span="2">{{ formData.goodsModel }}</a-descriptions-item>
 				<a-descriptions-item label="司机姓名" :span="2">{{ formData.driverName }}</a-descriptions-item>
-				<a-descriptions-item label="司机电话" :span="2">{{ formData.driverPhone }}</a-descriptions-item>
+				<a-descriptions-item label="司机电话" :span="2">{{ formData.driverMobile }}</a-descriptions-item>
 
 				<a-descriptions-item label="预约状态" :span="4">
 					<a-tag

+ 2 - 2
snowy-admin-web/src/views/biz/bizqueuerecord/editOrder.vue

@@ -24,8 +24,8 @@
 			<a-form-item label="司机姓名:" name="driverName">
 				<a-input v-model:value="formData.driverName" placeholder="请输入司机姓名" allow-clear disabled/>
 			</a-form-item>
-			<a-form-item label="司机电话:" name="driverPhone">
-				<a-input v-model:value="formData.driverPhone" placeholder="请输入司机电话" allow-clear disabled/>
+			<a-form-item label="司机电话:" name="driverMobile">
+				<a-input v-model:value="formData.driverMobile" placeholder="请输入司机电话" allow-clear disabled/>
 			</a-form-item>
 		</a-form>
 		<template #footer>

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

@@ -23,8 +23,8 @@
 			<a-form-item label="司机姓名:" name="driverName">
 				<a-input v-model:value="formData.driverName" placeholder="请输入司机姓名" allow-clear disabled/>
 			</a-form-item>
-			<a-form-item label="司机电话:" name="driverPhone">
-				<a-input v-model:value="formData.driverPhone" placeholder="请输入司机电话" allow-clear disabled/>
+			<a-form-item label="司机电话:" name="driverMobile">
+				<a-input v-model:value="formData.driverMobile" placeholder="请输入司机电话" allow-clear disabled/>
 			</a-form-item>
 		</a-form>
 		<template #footer>

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

@@ -34,8 +34,8 @@
 						</a-form-item>
 					</a-col>
 					<a-col :span="6">
-						<a-form-item label="司机电话" name="driverPhone">
-							<a-input v-model:value="searchFormState.driverPhone" placeholder="司机电话查询" />
+						<a-form-item label="司机电话" name="driverMobile">
+							<a-input v-model:value="searchFormState.driverMobile" placeholder="司机电话查询" />
 						</a-form-item>
 					</a-col>
 
@@ -96,7 +96,7 @@
 				<template v-if="column.dataIndex === 'driverInfo'">
 					<div class="time-list">
 						<p>姓名:{{ record.driverName }}</p>
-						<p style="margin-bottom: 0">电话:{{ record.driverPhone }}</p>
+						<p style="margin-bottom: 0">电话:{{ record.driverMobile }}</p>
 					</div>
 				</template>
 				<template v-if="column.dataIndex === 'goodsInfo'">

+ 118 - 0
snowy-admin-web/src/views/biz/bizsendrecord/detail.vue

@@ -0,0 +1,118 @@
+<template>
+	<xn-form-container
+		:title="'过磅记录详情'"
+		:width="1200"
+		v-model:open="open"
+		:destroy-on-close="true"
+		@close="onClose"
+	>
+		<a-descriptions>
+			<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.receiptCompany }}</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>
+			<a-descriptions-item label="司机姓名">{{ formData.driverName }}</a-descriptions-item>
+			<a-descriptions-item label="订单名称">{{ formData.orderName }}</a-descriptions-item>
+			<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>
+		<a-divider></a-divider>
+		<a-descriptions>
+			<a-descriptions-item label="毛重"
+				><a-tag color="blue">{{ formData.grossWeight }} KG</a-tag></a-descriptions-item
+			>
+			<a-descriptions-item label="皮重"
+				><a-tag color="orange">{{ formData.tareWeight }} KG</a-tag></a-descriptions-item
+			>
+			<a-descriptions-item label="净重"
+				><a-tag color="green">{{ formData.netWeight }} KG</a-tag></a-descriptions-item
+			>
+		</a-descriptions>
+		<a-divider></a-divider>
+		<a-descriptions title="过毛">
+			<a-descriptions-item label="过磅时间">{{ formData.grossTime }}</a-descriptions-item>
+		</a-descriptions>
+		<a-space>
+			<a-image :width="200" :src="formData.grossPlateName" />
+			<a-image :width="200" :src="formData.grossLicenseName" />
+		</a-space>
+		<a-space style="margin-top: 15px; margin-left: 10px">
+			<a-image v-if="formData.grossCaptureHead != null" :width="200" :src="formData.grossCaptureHead" />
+			<a-image v-if="formData.grossCaptureTail != null" :width="200" :src="formData.grossCaptureTail" />
+			<a-image v-if="formData.grossCaptureBody != null" :width="200" :src="formData.grossCaptureBody" />
+		</a-space>
+		<a-space style="margin-top: 15px; margin-left: 10px">
+			<a-image v-if="formData.grossCaptureWare != null" :width="200" :src="formData.grossCaptureWare" />
+			<a-image v-if="formData.grossCapturePoundRoom != null" :width="200" :src="formData.grossCapturePoundRoom" />
+		</a-space>
+		<a-divider></a-divider>
+		<a-descriptions title="过皮" style="margin-top: 15px">
+			<a-descriptions-item label="过磅时间">{{ formData.tareTime }}</a-descriptions-item>
+		</a-descriptions>
+		<a-space>
+			<a-image :width="200" :src="formData.tarePlateName" />
+			<a-image :width="200" :src="formData.tareLicenseName" />
+		</a-space>
+		<a-space style="margin-top: 15px; margin-left: 10px">
+			<a-image v-if="formData.tareCaptureHead != null" :width="200" :src="formData.tareCaptureHead" />
+			<a-image v-if="formData.tareCaptureTail != null" :width="200" :src="formData.tareCaptureTail" />
+			<a-image v-if="formData.tareCaptureBody != null" :width="200" :src="formData.tareCaptureBody" />
+		</a-space>
+		<a-space style="margin-top: 15px; margin-left: 10px">
+			<a-image v-if="formData.tareCaptureWare != null" :width="200" :src="formData.tareCaptureWare" />
+			<a-image v-if="formData.tareCapturePoundRoom != null" :width="200" :src="formData.tareCapturePoundRoom" />
+		</a-space>
+		<template #footer>
+			<a-button style="margin-right: 8px" @click="onClose">关闭</a-button>
+		</template>
+	</xn-form-container>
+</template>
+
+<script setup name="bizRecordForm">
+	import tool from '@/utils/tool'
+	import { cloneDeep } from 'lodash-es'
+	import bizRecordApi from '@/api/biz/bizRecordApi'
+
+	// 抽屉状态
+	const open = ref(false)
+	const emit = defineEmits({ successful: null })
+	// const formRef = ref()
+	// 表单数据
+	const formData = ref({})
+	// const submitLoading = ref(false)
+	const tareTypeOptions = ref([])
+
+	// 打开抽屉
+	const onOpen = (record) => {
+		open.value = true
+		tareTypeOptions.value = tool.dictList('TARE_TYPE')
+		if (record) {
+			/*const param = {
+				id: record.id
+			}
+			bizRecordApi.bizRecordDetail(param).then((data) => {
+				formData.value = Object.assign({}, data)
+			})*/
+			let recordData = cloneDeep(record)
+			formData.value = Object.assign({}, recordData)
+		}
+	}
+	// 关闭抽屉
+	const onClose = () => {
+		// formRef.value.resetFields()
+		formData.value = {}
+		open.value = false
+	}
+	// 抛出函数
+	defineExpose({
+		onOpen
+	})
+</script>

+ 177 - 0
snowy-admin-web/src/views/biz/bizsendrecord/form.vue

@@ -0,0 +1,177 @@
+<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" layout="vertical">
+			<a-form-item label="关联本地数据ID:" name="relationId">
+				<a-input v-model:value="formData.relationId" placeholder="请输入关联本地数据ID" allow-clear />
+			</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="plateColor">
+				<a-input v-model:value="formData.plateColor" placeholder="请输入车牌颜色" allow-clear />
+			</a-form-item>
+			<a-form-item label="车次编码:" name="carNumber">
+				<a-input v-model:value="formData.carNumber" placeholder="请输入车次编码" allow-clear />
+			</a-form-item>
+			<a-form-item label="过毛时间:" name="grossTime">
+				<a-date-picker v-model:value="formData.grossTime" value-format="YYYY-MM-DD HH:mm:ss" show-time placeholder="请选择过毛时间" style="width: 100%" />
+			</a-form-item>
+			<a-form-item label="过皮时间:" name="tareTime">
+				<a-date-picker v-model:value="formData.tareTime" value-format="YYYY-MM-DD HH:mm:ss" show-time placeholder="请选择过皮时间" style="width: 100%" />
+			</a-form-item>
+			<a-form-item label="皮重类型:" name="tareType">
+				<a-input v-model:value="formData.tareType" placeholder="请输入皮重类型" allow-clear />
+			</a-form-item>
+			<a-form-item label="毛量:" name="grossWeight">
+				<a-input v-model:value="formData.grossWeight" placeholder="请输入毛量" allow-clear />
+			</a-form-item>
+			<a-form-item label="皮重:" name="tareWeight">
+				<a-input v-model:value="formData.tareWeight" placeholder="请输入皮重" allow-clear />
+			</a-form-item>
+			<a-form-item label="净重:" name="netWeight">
+				<a-input v-model:value="formData.netWeight" placeholder="请输入净重" allow-clear />
+			</a-form-item>
+			<a-form-item label="矿发重量:" name="kfWeight">
+				<a-input v-model:value="formData.kfWeight" placeholder="请输入矿发重量" allow-clear />
+			</a-form-item>
+			<a-form-item label="司机姓名:" name="driverName">
+				<a-input v-model:value="formData.driverName" placeholder="请输入司机姓名" allow-clear />
+			</a-form-item>
+			<a-form-item label="司机电话:" name="driverMobile">
+				<a-input v-model:value="formData.driverMobile" placeholder="请输入司机电话" allow-clear />
+			</a-form-item>
+			<a-form-item label="货品名称:" name="goodsName">
+				<a-input v-model:value="formData.goodsName" placeholder="请输入货品名称" allow-clear />
+			</a-form-item>
+			<a-form-item label="规格型号:" name="goodsModel">
+				<a-input v-model:value="formData.goodsModel" placeholder="请输入规格型号" allow-clear />
+			</a-form-item>
+			<a-form-item label="收货单位:" name="receiptCompany">
+				<a-input v-model:value="formData.receiptCompany" placeholder="请输入收货单位" allow-clear />
+			</a-form-item>
+			<a-form-item label="发货单位:" name="shippingCompany">
+				<a-input v-model:value="formData.shippingCompany" placeholder="请输入发货单位" allow-clear />
+			</a-form-item>
+			<a-form-item label="运输路线:" name="transportCompany">
+				<a-input v-model:value="formData.transportCompany" placeholder="请输入运输路线" allow-clear />
+			</a-form-item>
+			<a-form-item label="运输单位:" name="transportRoute">
+				<a-input v-model:value="formData.transportRoute" placeholder="请输入运输单位" allow-clear />
+			</a-form-item>
+			<a-form-item label="过毛车牌图片:" name="grossPlateName">
+				<a-input v-model:value="formData.grossPlateName" placeholder="请输入过毛车牌图片" allow-clear />
+			</a-form-item>
+			<a-form-item label="过毛车图片:" name="grossLicenseName">
+				<a-input v-model:value="formData.grossLicenseName" placeholder="请输入过毛车图片" allow-clear />
+			</a-form-item>
+			<a-form-item label="过毛车头相机抓拍:" name="grossCaptureHead">
+				<a-input v-model:value="formData.grossCaptureHead" placeholder="请输入过毛车头相机抓拍" allow-clear />
+			</a-form-item>
+			<a-form-item label="过毛车尾相机抓拍:" name="grossCaptureTail">
+				<a-input v-model:value="formData.grossCaptureTail" placeholder="请输入过毛车尾相机抓拍" allow-clear />
+			</a-form-item>
+			<a-form-item label="过毛车仓相机抓拍:" name="grossCaptureWare">
+				<a-input v-model:value="formData.grossCaptureWare" placeholder="请输入过毛车仓相机抓拍" allow-clear />
+			</a-form-item>
+			<a-form-item label="过毛车身相机抓拍:" name="grossCaptureBody">
+				<a-input v-model:value="formData.grossCaptureBody" placeholder="请输入过毛车身相机抓拍" allow-clear />
+			</a-form-item>
+			<a-form-item label="过毛磅房相机抓拍:" name="grossCapturePoundRoom">
+				<a-input v-model:value="formData.grossCapturePoundRoom" placeholder="请输入过毛磅房相机抓拍" allow-clear />
+			</a-form-item>
+			<a-form-item label="过皮车牌图片:" name="tarePlateName">
+				<a-input v-model:value="formData.tarePlateName" placeholder="请输入过皮车牌图片" allow-clear />
+			</a-form-item>
+			<a-form-item label="过皮车图片:" name="tareLicenseName">
+				<a-input v-model:value="formData.tareLicenseName" placeholder="请输入过皮车图片" allow-clear />
+			</a-form-item>
+			<a-form-item label="过皮车头相机抓拍:" name="tareCaptureHead">
+				<a-input v-model:value="formData.tareCaptureHead" placeholder="请输入过皮车头相机抓拍" allow-clear />
+			</a-form-item>
+			<a-form-item label="过皮车尾相机抓拍:" name="tareCaptureTail">
+				<a-input v-model:value="formData.tareCaptureTail" placeholder="请输入过皮车尾相机抓拍" allow-clear />
+			</a-form-item>
+			<a-form-item label="过皮车仓相机抓拍:" name="tareCaptureWare">
+				<a-input v-model:value="formData.tareCaptureWare" placeholder="请输入过皮车仓相机抓拍" allow-clear />
+			</a-form-item>
+			<a-form-item label="过皮车身相机抓拍:" name="tareCaptureBody">
+				<a-input v-model:value="formData.tareCaptureBody" placeholder="请输入过皮车身相机抓拍" allow-clear />
+			</a-form-item>
+			<a-form-item label="过皮磅房相机抓拍:" name="tareCapturePoundRoom">
+				<a-input v-model:value="formData.tareCapturePoundRoom" placeholder="请输入过皮磅房相机抓拍" allow-clear />
+			</a-form-item>
+			<a-form-item label="备注1:" name="extKey1">
+				<a-input v-model:value="formData.extKey1" placeholder="请输入备注1" allow-clear />
+			</a-form-item>
+			<a-form-item label="备注2:" name="extKey2">
+				<a-input v-model:value="formData.extKey2" placeholder="请输入备注2" allow-clear />
+			</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'
+	// 抽屉状态
+	const open = ref(false)
+	const emit = defineEmits({ successful: null })
+	const formRef = ref()
+	// 表单数据
+	const formData = ref({})
+	const submitLoading = ref(false)
+
+	// 打开抽屉
+	const onOpen = (record) => {
+		open.value = true
+		if (record) {
+			let recordData = cloneDeep(record)
+			formData.value = Object.assign({}, recordData)
+		}
+	}
+	// 关闭抽屉
+	const onClose = () => {
+		formRef.value.resetFields()
+		formData.value = {}
+		open.value = false
+	}
+	// 默认要校验的
+	const formRules = {
+		relationId: [required('请输入关联本地数据ID')],
+		licensePlate: [required('请输入车牌号码')],
+	}
+	// 验证并提交数据
+	const onSubmit = () => {
+		formRef.value
+			.validate()
+			.then(() => {
+				submitLoading.value = true
+				const formDataParam = cloneDeep(formData.value)
+				bizRecordApi
+					.bizRecordSubmitForm(formDataParam, formDataParam.id)
+					.then(() => {
+						onClose()
+						emit('successful')
+					})
+					.finally(() => {
+						submitLoading.value = false
+					})
+			})
+			.catch(() => {})
+	}
+	// 抛出函数
+	defineExpose({
+		onOpen
+	})
+</script>

+ 495 - 0
snowy-admin-web/src/views/biz/bizsendrecord/index.vue

@@ -0,0 +1,495 @@
+<template>
+	<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="licensePlate">
+						<a-input v-model:value="searchFormState.licensePlate" placeholder="请输入车牌号码" />
+					</a-form-item>
+				</a-col>
+				<a-col :span="6">
+					<a-form-item label="过毛时间" name="grossTime">
+						<a-range-picker
+							v-model:value="searchFormState.grossTime"
+							value-format="YYYY-MM-DD"
+						/>
+					</a-form-item>
+				</a-col>
+				<a-col :span="6">
+					<a-form-item label="过皮时间" name="tareTime">
+						<a-range-picker
+							v-model:value="searchFormState.tareTime"
+							value-format="YYYY-MM-DD"
+						/>
+					</a-form-item>
+				</a-col>
+				<a-col :span="6" v-show="advanced">
+					<a-form-item label="司机姓名" name="driverName">
+						<a-input v-model:value="searchFormState.driverName" placeholder="请输入司机姓名" />
+					</a-form-item>
+				</a-col>
+				<a-col :span="6" v-show="advanced">
+					<a-form-item label="司机电话" name="driverMobile">
+						<a-input v-model:value="searchFormState.driverMobile" placeholder="请输入司机电话" />
+					</a-form-item>
+				</a-col>
+				<a-col :span="6" v-show="advanced">
+					<a-form-item label="货品名称" name="goodsName">
+						<a-input v-model:value="searchFormState.goodsName" placeholder="请输入货品名称" />
+					</a-form-item>
+				</a-col>
+				<a-col :span="6" v-show="advanced">
+					<a-form-item label="规格型号" name="goodsModel">
+						<a-input v-model:value="searchFormState.goodsModel" placeholder="请输入规格型号" />
+					</a-form-item>
+				</a-col>
+				<a-col :span="6" v-show="advanced">
+					<a-form-item label="收货单位" name="receiptCompany">
+						<a-input v-model:value="searchFormState.receiptCompany" placeholder="请输入收货单位" />
+					</a-form-item>
+				</a-col>
+				<a-col :span="6" v-show="advanced">
+					<a-form-item label="发货单位" name="shippingCompany">
+						<a-input v-model:value="searchFormState.shippingCompany" placeholder="请输入发货单位" />
+					</a-form-item>
+				</a-col>
+				<a-col :span="6" v-show="advanced">
+					<a-form-item label="运输单位" name="transportCompany">
+						<a-input v-model:value="searchFormState.transportCompany" placeholder="请输入运输单位" />
+					</a-form-item>
+				</a-col>
+				<a-col :span="6" v-show="advanced">
+					<a-form-item label="订单编号" name="orderNumber">
+						<a-input v-model:value="searchFormState.orderNumber" placeholder="请输入订单编号" />
+					</a-form-item>
+				</a-col>
+				<a-col :span="6" v-show="advanced">
+					<a-form-item label="订单名称" name="orderName">
+						<a-input v-model:value="searchFormState.orderName" placeholder="请输入订单名称" />
+					</a-form-item>
+				</a-col>
+				<a-col :span="6" v-show="advanced">
+					<a-form-item label="客户名称" name="customerName">
+						<a-input v-model:value="searchFormState.customerName" placeholder="请输入客户名称" />
+					</a-form-item>
+				</a-col>
+				<a-col :span="6">
+					<a-button type="primary" @click="tableRef.refresh()">查询</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>
+	<a-card :bordered="false">
+		<s-table
+			ref="tableRef"
+			:columns="columns"
+			:data="loadData"
+			bordered
+			:row-key="(record) => record.id"
+		>
+			<template #operator class="table-operator">
+				<a-space>
+<!--					<a-button type="dashed" class="snowy-buttom-left" @click="exportData()" v-if="hasPerm('bizRecordBatchExport')"
+						><export-outlined />记录导出</a-button
+					>-->
+				</a-space>
+			</template>
+			<template #bodyCell="{ column, record }">
+				<template v-if="column.dataIndex === 'licensePlate'">
+					<span v-if="record.plateColor === '蓝色'" class="blue-background">{{ record.licensePlate }}</span>
+					<span v-else-if="record.plateColor === '黄色'" class="yellow-background">{{ record.licensePlate }}</span>
+					<span v-else-if="record.plateColor === '绿色'" class="green-background">{{ record.licensePlate }}</span>
+					<span v-else-if="record.plateColor === '白色'" class="white-background">{{ record.licensePlate }}</span>
+					<span v-else-if="record.plateColor === '黑色'" class="black-background">{{ record.licensePlate }}</span>
+					<span v-else class="blue-background">{{ record.licensePlate }}</span>
+				</template>
+
+				<template v-if="column.dataIndex === 'enterTime'">
+					<div class="time-list">
+						<p>
+							<span class="blueTag">过毛</span>
+							<span style="font-weight: normal">{{ record.grossTime }}</span>
+						</p>
+						<p style="margin-bottom: 0">
+							<span class="orangeTag">过皮</span>
+							<span style="font-weight: normal">{{ record.tareTime }}</span>
+						</p>
+					</div>
+				</template>
+
+				<template v-if="column.dataIndex === 'weight'">
+					<div class="time-list">
+						<p>
+							<span class="blueTag">毛重</span>
+							<span class="showNum">{{ record.grossWeight }} </span>
+						</p>
+						<p>
+							<span class="orangeTag">皮重</span>
+							<span class="showNum">{{ record.tareWeight }}</span>
+						</p>
+						<p>
+							<span class="greenTag">净重</span>
+							<span class="showNum">{{ record.netWeight }}</span>
+						</p>
+					</div>
+				</template>
+
+				<template v-if="column.dataIndex === 'company'">
+					<div class="company-list">
+						<p>收货:{{ record.receiptCompany }}</p>
+						<p>发货:{{ record.shippingCompany }}</p>
+						<p style="margin-bottom: 0">运输:{{ record.transportCompany }}</p>
+					</div>
+				</template>
+
+				<template v-if="column.dataIndex === 'goods'">
+					<div class="time-list">
+						<p>名称:{{ record.goodsName }}</p>
+						<p style="margin-bottom: 0">规格:{{ record.goodsModel }}</p>
+					</div>
+				</template>
+
+				<template v-if="column.dataIndex === 'driver'">
+					<div class="time-list">
+						<p>姓名:{{ record.driverName }}</p>
+						<p style="margin-bottom: 0">电话:{{ record.driverMobile }}</p>
+					</div>
+				</template>
+				<template v-if="column.dataIndex === 'orderInfo'">
+					<div class="time-list">
+						<p>名称:{{ record.orderName }}</p>
+						<p style="margin-bottom: 0">编号:{{ record.orderNumber }}</p>
+					</div>
+				</template>
+				<template 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-space>
+				</template>
+			</template>
+		</s-table>
+	</a-card>
+	<Form ref="formRef" @successful="tableRef.refresh()" />
+	<Detail ref="detailRef" />
+</template>
+
+<script setup name="record">
+	import { message, Modal } from 'ant-design-vue'
+	import { cloneDeep } from 'lodash-es'
+	import Form from './form.vue'
+	import Detail from './detail.vue'
+	import bizRecordApi from '@/api/biz/bizRecordApi'
+	import downloadUtil from '@/utils/downloadUtil'
+	import {createVNode} from "vue";
+	import {ExclamationCircleOutlined} from "@ant-design/icons-vue";
+	import bizAppointmentRecordApi from "@/api/biz/bizAppointmentRecordApi";
+	const searchFormState = ref({isFlag:1})
+	const searchFormRef = ref()
+	const tableRef = ref()
+	const formRef = ref()
+	const detailRef = ref()
+	const toolConfig = { refresh: true, height: true, columnSetting: true, striped: false }
+	// 查询区域显示更多控制
+	const advanced = ref(false)
+
+	const submitLoading = ref(false)
+
+	const toggleAdvanced = () => {
+		advanced.value = !advanced.value
+	}
+	const columns = [
+		{
+			title: '车次编码',
+			dataIndex: 'carNumber',
+			width: 120,
+			align: 'center'
+		},
+		{
+			title: '车牌号码',
+			dataIndex: 'licensePlate',
+			width: '130px',
+			align: 'center'
+		},
+		{
+			title: '过车时间',
+			dataIndex: 'enterTime',
+			width: '130px'
+		},
+		{
+			title: '重量(KG)',
+			dataIndex: 'weight',
+			align: 'center'
+		},
+		{
+			title: '订单信息',
+			dataIndex: 'orderInfo'
+		},
+		{
+			title: '收发货单位',
+			dataIndex: 'company'
+		},
+		{
+			title: '货品',
+			dataIndex: 'goods'
+		},
+		{
+			title: '司机信息',
+			dataIndex: 'driver',
+			width: '200px'
+		}
+	]
+	// 操作栏通过权限判断是否显示
+	if (hasPerm(['bizRecordEdit', 'bizRecordDelete', 'bizRecordDetail'])) {
+		columns.push({
+			title: '操作',
+			dataIndex: 'action',
+			align: 'center',
+			width: 150
+		})
+	}
+
+	const loadData = (parameter) => {
+		const searchFormParam = cloneDeep(searchFormState.value)
+		// grossTime范围查询条件重载
+		if (searchFormParam.grossTime) {
+			searchFormParam.startGrossTime = searchFormParam.grossTime[0]
+			searchFormParam.endGrossTime = searchFormParam.grossTime[1]
+			delete searchFormParam.grossTime
+		}
+		// tareTime范围查询条件重载
+		if (searchFormParam.tareTime) {
+			searchFormParam.startTareTime = searchFormParam.tareTime[0]
+			searchFormParam.endTareTime = searchFormParam.tareTime[1]
+			delete searchFormParam.tareTime
+		}
+		return bizRecordApi.bizRecordPage(Object.assign(parameter, searchFormParam)).then((data) => {
+			return data
+		})
+	}
+	const dateRangeOnChange = (date, dateString) => {
+		searchFormState.startGrossTime = dateString[0]
+		searchFormState.endGrossTime = dateString[1]
+	}
+	const dateRangeOnChangeTare = (date, dateString) => {
+		searchFormState.startTareTime = dateString[0]
+		searchFormState.endTareTime = dateString[1]
+	}
+	// 重置
+	const reset = () => {
+		searchFormRef.value.resetFields()
+		searchFormState.startGrossTime = null
+		searchFormState.endGrossTime = null
+		searchFormState.startTareTime = null
+		searchFormState.endTareTime = null
+		tableRef.value.refresh(true)
+	}
+	const exportData = () => {
+		const paramData = {
+			licensePlate: searchFormState.value.licensePlate,
+			carNumber: searchFormState.value.carNumber,
+			goodsName: searchFormState.value.goodsName,
+			goodsModel: searchFormState.value.goodsModel,
+			receiptCompany: searchFormState.value.receiptCompany,
+			shippingCompany: searchFormState.value.shippingCompany,
+			transportCompany: searchFormState.value.transportCompany,
+			driverName: searchFormState.value.driverName,
+			driverMobile: searchFormState.value.driverMobile,
+			startGrossTime: searchFormState.startGrossTime,
+			endGrossTime: searchFormState.endGrossTime,
+			startTareTime: searchFormState.startTareTime,
+			endTareTime: searchFormState.endTareTime
+		}
+		Modal.confirm({
+			title: '提示',
+			content: '确定要导出过磅记录?',
+			maskClosable: true,
+			onOk: () => {
+				bizRecordApi.bizRecordExport(paramData).then((res) => {
+					downloadUtil.resultDownload(res)
+					tableRef.value.clearSelected()
+				})
+			}
+		})
+	}
+
+	//确认
+	const confirmRecord = (record) => {
+
+		Modal.confirm({
+			title: '提示',
+			content: '确定完成发货吗?',
+			onOk() {
+				submitLoading.value = true
+				let params =
+					{
+						id: record.id
+					}
+
+
+				bizRecordApi
+					.confirmRecord(params)
+					.then(() => {
+						tableRef.value.refresh(true)
+					})
+					.finally(() => {
+						submitLoading.value = false
+					})
+			},
+			onCancel() {}
+		})
+	}
+</script>
+
+<style lang="less" scoped>
+	/** 表头居中 */
+	:deep .ant-table-thead > tr > th {
+		text-align: center;
+	}
+
+	.time-list {
+		-webkit-text-size-adjust: none;
+		font-size: 13px;
+		display: flex;
+		flex-direction: column;
+
+		p {
+			white-space: nowrap;
+			span {
+				display: inline-block;
+				font-weight: 600;
+				height: 16px;
+				line-height: 16px;
+				border-radius: 5px;
+				text-align: center;
+				margin-right: 2px;
+				padding: 0 5px;
+			}
+			.blueTag {
+				color: #1890ff;
+				background: rgba(24, 144, 255, 0.1);
+			}
+			.orangeTag {
+				color: #ff7c18;
+				background: rgba(24, 144, 255, 0.1);
+			}
+			.greenTag {
+				color: rgb(82, 196, 26);
+				background: rgba(82, 196, 26, 0.1);
+			}
+			.purpleTag {
+				color: rgb(77, 26, 196);
+				background: rgba(82, 196, 26, 0.1);
+			}
+			.showNum {
+				display: inline-block;
+				height: 16px;
+				line-height: 16px;
+				width: 45px;
+				border-radius: 5px;
+				text-align: center;
+				margin-right: 2px;
+				text-align: right;
+			}
+		}
+	}
+
+	.order-list,
+	.company-list {
+		-webkit-text-size-adjust: none;
+		font-size: 13px;
+		display: flex;
+		flex-direction: column;
+		p {
+			white-space: nowrap;
+			margin-bottom: 5px;
+			.weightSpan,
+			.company {
+				display: inline-block;
+				width: 17px;
+				height: 17px;
+				line-height: 16px;
+				border-radius: 50%;
+				color: #fff;
+				text-align: center;
+			}
+			.company {
+				margin-right: 5px;
+			}
+			.weight,
+			.receiptCompany {
+				background-color: #1890ff;
+			}
+			.tare {
+				background-color: #2f54eb;
+			}
+			.netWeight,
+			.shippingCompany {
+				background-color: #52c41a;
+			}
+			.transportCompany {
+				background-color: #c61263;
+			}
+			.showNum {
+				display: inline-block;
+				height: 16px;
+				line-height: 16px;
+				width: 45px;
+				border-radius: 5px;
+				text-align: center;
+				margin-right: 2px;
+				text-align: right;
+			}
+			em {
+				font-style: normal;
+			}
+		}
+	}
+	.blue-background {
+		background-color: #0d84ff;
+		border-radius: 5px; /* 你可以根据需要调整圆角的大小 */
+		padding: 5px; /* 可选:添加一些内边距 */
+		color: white; /* 可选:设置文字颜色 */
+		font-size: large;
+	}
+	.yellow-background {
+		background-color: yellow;
+		border-radius: 5px;
+		padding: 5px;
+		color: black;
+		font-size: large;
+	}
+	.green-background {
+		background: linear-gradient(to bottom, white, #39b54a);
+		border-radius: 5px;
+		padding: 5px;
+		color: black; /* 文字颜色改为黑色以便在渐变背景上更清晰 */
+		font-size: large;
+		border: 1px solid #ccc; /* 增加边框 */
+		box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 增加阴影 */
+	}
+
+	.white-background {
+		background-color: white;
+		border-radius: 5px;
+		padding: 5px;
+		color: black;
+		font-size: large;
+		border: 1px solid #ccc; /* 增加边框 */
+		box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 增加阴影 */
+	}
+
+	.black-background {
+		background-color: black;
+		border-radius: 5px;
+		padding: 5px;
+		color: white;
+		font-size: large;
+	}
+</style>

+ 7 - 4
snowy-admin-web/src/views/biz/record/detail.vue

@@ -17,6 +17,9 @@
 			<a-descriptions-item label="货品名称">{{ formData.goodsName }}</a-descriptions-item>
 			<a-descriptions-item label="货品规格">{{ formData.goodsModel }}</a-descriptions-item>
 			<a-descriptions-item label="司机姓名">{{ formData.driverName }}</a-descriptions-item>
+			<a-descriptions-item label="订单名称">{{ formData.orderName }}</a-descriptions-item>
+			<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>
@@ -92,14 +95,14 @@
 		open.value = true
 		tareTypeOptions.value = tool.dictList('TARE_TYPE')
 		if (record) {
-			const param = {
+			/*const param = {
 				id: record.id
 			}
 			bizRecordApi.bizRecordDetail(param).then((data) => {
 				formData.value = Object.assign({}, data)
-			})
-			// let recordData = cloneDeep(record)
-			// formData.value = Object.assign({}, recordData)
+			})*/
+			let recordData = cloneDeep(record)
+			formData.value = Object.assign({}, recordData)
 		}
 	}
 	// 关闭抽屉

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

@@ -1,5 +1,5 @@
 <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">
@@ -11,8 +11,7 @@
 					<a-form-item label="过毛时间" name="grossTime">
 						<a-range-picker
 							v-model:value="searchFormState.grossTime"
-							value-format="YYYY-MM-DD HH:mm:ss"
-							@change="dateRangeOnChange"
+							value-format="YYYY-MM-DD"
 						/>
 					</a-form-item>
 				</a-col>
@@ -20,8 +19,7 @@
 					<a-form-item label="过皮时间" name="tareTime">
 						<a-range-picker
 							v-model:value="searchFormState.tareTime"
-							value-format="YYYY-MM-DD HH:mm:ss"
-							@change="dateRangeOnChangeTare"
+							value-format="YYYY-MM-DD"
 						/>
 					</a-form-item>
 				</a-col>
@@ -60,6 +58,21 @@
 						<a-input v-model:value="searchFormState.transportCompany" placeholder="请输入运输单位" />
 					</a-form-item>
 				</a-col>
+				<a-col :span="6" v-show="advanced">
+					<a-form-item label="订单编号" name="orderNumber">
+						<a-input v-model:value="searchFormState.orderNumber" placeholder="请输入订单编号" />
+					</a-form-item>
+				</a-col>
+				<a-col :span="6" v-show="advanced">
+					<a-form-item label="订单名称" name="orderName">
+						<a-input v-model:value="searchFormState.orderName" placeholder="请输入订单名称" />
+					</a-form-item>
+				</a-col>
+				<a-col :span="6" v-show="advanced">
+					<a-form-item label="客户名称" name="customerName">
+						<a-input v-model:value="searchFormState.customerName" placeholder="请输入客户名称" />
+					</a-form-item>
+				</a-col>
 				<a-col :span="6">
 					<a-button type="primary" @click="tableRef.refresh()">查询</a-button>
 					<a-button style="margin: 0 8px" @click="reset">重置</a-button>
@@ -70,13 +83,14 @@
 				</a-col>
 			</a-row>
 		</a-form>
+	</a-card>
+	<a-card :bordered="false">
 		<s-table
 			ref="tableRef"
 			:columns="columns"
 			:data="loadData"
 			bordered
 			:row-key="(record) => record.id"
-			:tool-config="toolConfig"
 		>
 			<template #operator class="table-operator">
 				<a-space>
@@ -146,6 +160,12 @@
 						<p style="margin-bottom: 0">电话:{{ record.driverMobile }}</p>
 					</div>
 				</template>
+				<template v-if="column.dataIndex === 'orderInfo'">
+					<div class="time-list">
+						<p>名称:{{ record.orderName }}</p>
+						<p style="margin-bottom: 0">编号:{{ record.orderNumber }}</p>
+					</div>
+				</template>
 				<template v-if="column.dataIndex === 'action'">
 					<a-space>
 						<a @click="detailRef.onOpen(record)">详情</a>
@@ -202,6 +222,10 @@
 			dataIndex: 'weight',
 			align: 'center'
 		},
+		{
+			title: '订单信息',
+			dataIndex: 'orderInfo'
+		},
 		{
 			title: '收发货单位',
 			dataIndex: 'company'
@@ -228,6 +252,18 @@
 
 	const loadData = (parameter) => {
 		const searchFormParam = cloneDeep(searchFormState.value)
+		// grossTime范围查询条件重载
+		if (searchFormParam.grossTime) {
+			searchFormParam.startGrossTime = searchFormParam.grossTime[0]
+			searchFormParam.endGrossTime = searchFormParam.grossTime[1]
+			delete searchFormParam.grossTime
+		}
+		// tareTime范围查询条件重载
+		if (searchFormParam.tareTime) {
+			searchFormParam.startTareTime = searchFormParam.tareTime[0]
+			searchFormParam.endTareTime = searchFormParam.tareTime[1]
+			delete searchFormParam.tareTime
+		}
 		return bizRecordApi.bizRecordPage(Object.assign(parameter, searchFormParam)).then((data) => {
 			return data
 		})
@@ -250,7 +286,7 @@
 		tableRef.value.refresh(true)
 	}
 	const exportData = () => {
-		const paramData = {
+		/*const paramData = {
 			licensePlate: searchFormState.value.licensePlate,
 			carNumber: searchFormState.value.carNumber,
 			goodsName: searchFormState.value.goodsName,
@@ -260,17 +296,30 @@
 			transportCompany: searchFormState.value.transportCompany,
 			driverName: searchFormState.value.driverName,
 			driverMobile: searchFormState.value.driverMobile,
-			startGrossTime: searchFormState.startGrossTime,
-			endGrossTime: searchFormState.endGrossTime,
-			startTareTime: searchFormState.startTareTime,
-			endTareTime: searchFormState.endTareTime
+			startGrossTime: searchFormState.value.startGrossTime,
+			endGrossTime: searchFormState.value.endGrossTime,
+			startTareTime: searchFormState.value.startTareTime,
+			endTareTime: searchFormState.value.endTareTime
+		}*/
+		const searchFormParam = cloneDeep(searchFormState.value)
+		// grossTime范围查询条件重载
+		if (searchFormParam.grossTime) {
+			searchFormParam.startGrossTime = searchFormParam.grossTime[0]
+			searchFormParam.endGrossTime = searchFormParam.grossTime[1]
+			delete searchFormParam.grossTime
+		}
+		// tareTime范围查询条件重载
+		if (searchFormParam.tareTime) {
+			searchFormParam.startTareTime = searchFormParam.tareTime[0]
+			searchFormParam.endTareTime = searchFormParam.tareTime[1]
+			delete searchFormParam.tareTime
 		}
 		Modal.confirm({
 			title: '提示',
 			content: '确定要导出过磅记录?',
 			maskClosable: true,
 			onOk: () => {
-				bizRecordApi.bizRecordExport(paramData).then((res) => {
+				bizRecordApi.bizRecordExport(searchFormParam).then((res) => {
 					downloadUtil.resultDownload(res)
 					tableRef.value.clearSelected()
 				})

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

@@ -57,7 +57,7 @@ public class BizAppointmentRecord extends CommonEntity {
 
     /** 司机电话 */
     @Schema(description = "司机电话")
-    private String driverPhone;
+    private String driverMobile;
 
     /** 状态(1:待审核  2:审核不通过   3:排队中  4:可入场  5:已入场  6:一次过磅  7:完成装货   8:二次过磅   9:待出场  10:已出场   11:已签收   12:自动审核   13:销售已审核   14:已取消) */
     @Trans(type = TransType.DICTIONARY, key = "appointment_status")

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

@@ -16,7 +16,7 @@
             bat.begin_time,
             bat.end_time,
             bar.driver_name,
-            bar.driver_phone,
+            bar.driver_mobile,
             bar.status,
             bar.appointment_reason
         from biz_appointment_record bar

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

@@ -52,7 +52,7 @@ public class BizAppointmentExportResult {
     /** 司机电话 */
     @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
     @ExcelProperty({"预约报表", "司机电话"})
-    private String driverPhone;
+    private String driverMobile;
 
     /** 预约状态*/
     @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)

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

@@ -52,7 +52,7 @@ public class BizAppointmentRecordAddParam {
 
     /** 司机电话 */
     @Schema(description = "司机电话")
-    private String driverPhone;
+    private String driverMobile;
 
     /** 状态(1:待审核  2:审核不通过   3:排队中  4:可入场  5:已入场  6:一次过磅  7:完成装货   8:二次过磅   9:已出场  10:已签收   11:已审核   12:已取消) */
     @Schema(description = "状态(1:待审核  2:审核不通过   3:排队中  4:可入场  5:已入场  6:一次过磅  7:完成装货   8:二次过磅   9:已出场  10:已签收   11:已审核   12:已取消)")

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

@@ -54,7 +54,7 @@ public class BizAppointmentRecordEditParam {
 
     /** 司机电话 */
     @Schema(description = "司机电话")
-    private String driverPhone;
+    private String driverMobile;
 
     /** 状态(1:待审核  2:审核不通过   3:排队中  4:可入场  5:已入场  6:一次过磅  7:完成装货   8:二次过磅   9:已出场  10:已签收   11:已审核   12:已取消) */
     @Schema(description = "状态(1:待审核  2:审核不通过   3:排队中  4:可入场  5:已入场  6:一次过磅  7:完成装货   8:二次过磅   9:已出场  10:已签收   11:已审核   12:已取消)")

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

@@ -61,7 +61,7 @@ public class BizAppointmentRecordPageParam {
     private String driverName;
 
     /**司机电话*/
-    private String driverPhone;
+    private String driverMobile;
 
     /***货品名称*/
     private String goodsName;

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

@@ -37,6 +37,8 @@ import vip.xiaonuo.biz.modular.bizorder.param.BizOrderExportResult;
 import vip.xiaonuo.biz.modular.bizorder.service.BizOrderService;
 import vip.xiaonuo.biz.modular.goods.entity.BizGoods;
 import vip.xiaonuo.biz.modular.goods.service.BizGoodsService;
+import vip.xiaonuo.biz.modular.record.entity.BizRecord;
+import vip.xiaonuo.biz.modular.record.service.BizRecordService;
 import vip.xiaonuo.biz.modular.utils.CommonExportUtil;
 import vip.xiaonuo.common.enums.CommonSortOrderEnum;
 import vip.xiaonuo.common.exception.CommonException;
@@ -68,6 +70,8 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
     private BizOrderService bizOrderService;
     @Resource
     private BizGoodsService bizGoodsService;
+    @Resource
+    private BizRecordService bizRecordService;
 
     @Override
     public Page<BizAppointmentRecord> page(BizAppointmentRecordPageParam bizAppointmentRecordPageParam) {
@@ -89,8 +93,8 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
         if(ObjectUtil.isNotEmpty(bizAppointmentRecordPageParam.getDriverName())){
             queryWrapper.like("bar.driver_name",bizAppointmentRecordPageParam.getDriverName());
         }
-        if(ObjectUtil.isNotEmpty(bizAppointmentRecordPageParam.getDriverPhone())){
-            queryWrapper.like("bar.driver_phone",bizAppointmentRecordPageParam.getDriverPhone());
+        if(ObjectUtil.isNotEmpty(bizAppointmentRecordPageParam.getDriverMobile())){
+            queryWrapper.like("bar.driver_mobile",bizAppointmentRecordPageParam.getDriverMobile());
         }
         if(ObjectUtil.isNotEmpty(bizAppointmentRecordPageParam.getGoodsName())){
             queryWrapper.like("bg.NAME",bizAppointmentRecordPageParam.getGoodsName());
@@ -151,9 +155,9 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
             }
         }
         //校验手机号
-        if(ObjectUtil.isNotEmpty(bizAppointmentRecordAddParam.getDriverPhone())){
-            if(!PhoneUtil.isMobile(bizAppointmentRecordAddParam.getDriverPhone())) {
-                throw new CommonException("手机号码:{}格式错误", bizAppointmentRecordAddParam.getDriverPhone());
+        if(ObjectUtil.isNotEmpty(bizAppointmentRecordAddParam.getDriverMobile())){
+            if(!PhoneUtil.isMobile(bizAppointmentRecordAddParam.getDriverMobile())) {
+                throw new CommonException("手机号码:{}格式错误", bizAppointmentRecordAddParam.getDriverMobile());
             }
         }
         if(ObjectUtil.isNotEmpty(bizAppointmentRecordAddParam.getTimeId())){
@@ -189,9 +193,9 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
             }
         }
         //校验手机号
-        if(ObjectUtil.isNotEmpty(bizAppointmentRecordEditParam.getDriverPhone())){
-            if(!PhoneUtil.isMobile(bizAppointmentRecordEditParam.getDriverPhone())) {
-                throw new CommonException("手机号码:{}格式错误", bizAppointmentRecordEditParam.getDriverPhone());
+        if(ObjectUtil.isNotEmpty(bizAppointmentRecordEditParam.getDriverMobile())){
+            if(!PhoneUtil.isMobile(bizAppointmentRecordEditParam.getDriverMobile())) {
+                throw new CommonException("手机号码:{}格式错误", bizAppointmentRecordEditParam.getDriverMobile());
             }
         }
         if(ObjectUtil.isNotEmpty(bizAppointmentRecordEditParam.getTimeId())){
@@ -361,10 +365,24 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
         if(!StringUtils.equals(bizAppointmentRecord.getOrderId(),bizAppointmentRecordEditParam.getOrderId())){
             //调整过订单
             if(StringUtils.equals(bizAppointmentRecord.getStatus(),"8") || StringUtils.equals(bizAppointmentRecord.getStatus(),"9")){
+                //查询过磅记录重量
+                BizRecord bizRecord = bizRecordService.getOne(new QueryWrapper<BizRecord>().lambda().
+                        eq(BizRecord::getAppointmentId, bizAppointmentRecord.getId()).
+                        last("limit 1"));
                 //当前状态已完成二次过磅,重量已经添加到订单中,要扣去添加的重量
                 BizOrder bizOrder = bizOrderService.getById(bizAppointmentRecord.getOrderId());
                 if(ObjectUtil.isNotNull(bizOrder)){
-                    //bizOrder.setNetWeight(bi);
+                    if(ObjectUtil.isNotNull(bizRecord)){
+                        bizOrder.setNetWeight(bizOrder.getNetWeight().subtract(bizRecord.getNetWeight()));
+                    }
+                }
+
+                //修改后的订单加上净重
+                BizOrder order = bizOrderService.getById(bizAppointmentRecordEditParam.getOrderId());
+                if(ObjectUtil.isNotNull(order)){
+                    if(ObjectUtil.isNotNull(bizRecord)){
+                        order.setNetWeight(order.getNetWeight().add(bizRecord.getNetWeight()));
+                    }
                 }
             }else{
                 bizAppointmentRecord.setOrderId(bizAppointmentRecordEditParam.getOrderId());

+ 2 - 2
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmenttime/service/impl/BizAppointmentTimeServiceImpl.java

@@ -195,10 +195,10 @@ public class BizAppointmentTimeServiceImpl extends ServiceImpl<BizAppointmentTim
         List<BizAppointmentTime> timeList = Lists.newArrayList();
         //获取配置的时段下拉个数
         BizConfig bizConfig = bizConfigService.getOne(new QueryWrapper<BizConfig>().lambda().last("limit 1"));
-        String format = DateUtil.format(DateUtil.date(), "HH");
+        String format = DateUtil.format(DateUtil.date(), "HH:mm");
         //查询大于等于当前时间的时间段个数
         List<BizAppointmentTime> list = this.list(new QueryWrapper<BizAppointmentTime>().lambda().
-                and(wrapper->wrapper.ge(BizAppointmentTime::getBeginTime, format + ":00").or().gt(BizAppointmentTime::getFinishTime,format + ":00")).
+                and(wrapper->wrapper.ge(BizAppointmentTime::getBeginTime, format).or().gt(BizAppointmentTime::getFinishTime,format)).
                 orderByAsc(BizAppointmentTime::getBeginTime));
         //如果查询到的时段个数大于等于配置的下拉个数,直接返回,反之,从前面查询补上
         if(list.size()>= bizConfig.getPullNumber()){

+ 28 - 1
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/controller/BizRecordController.java

@@ -82,6 +82,20 @@ public class BizRecordController {
         return CommonResult.ok();
     }
 
+    /**
+     * 地磅端推送过磅记录
+     *
+     * @author
+     * @date 2025/01/02 16:34
+     */
+    @Operation(summary = "地磅端推送过磅记录")
+    @CommonLog("地磅端推送过磅记录")
+    @PostMapping("/biz/record/push")
+    public CommonResult<String> push(@RequestBody @Valid BizRecordEditParam bizRecordEditParam) {
+        bizRecordService.push(bizRecordEditParam);
+        return CommonResult.ok();
+    }
+
     /**
      * 编辑过磅记录
      *
@@ -132,7 +146,7 @@ public class BizRecordController {
     @Operation(summary = "过磅记录导出")
     @SaCheckPermission("/biz/record/export")
     @PostMapping(value = "/biz/record/export", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
-    public void export(@RequestBody BizRecordExportParam exportParam, HttpServletResponse response) throws IOException {
+    public void export(@RequestBody BizRecordPageParam exportParam, HttpServletResponse response) throws IOException {
         bizRecordService.export(exportParam, response);
     }
 
@@ -276,4 +290,17 @@ public class BizRecordController {
         bizRecordService.carCountExport(sevenDaysCountParam, response);
     }
 
+    /**
+     * 发货确认
+     *
+     * @author
+     * @date 2025/01/02 16:34
+     */
+    @Operation(summary = "发货确认")
+    @PostMapping("/biz/record/confirmRecord")
+    public CommonResult<BizRecord> confirmRecord(@RequestBody @Valid BizRecordIdParam bizRecordIdParam) {
+        bizRecordService.confirmRecord(bizRecordIdParam);
+        return CommonResult.ok();
+    }
+
 }

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

@@ -16,6 +16,8 @@ import com.baomidou.mybatisplus.annotation.*;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Getter;
 import lombok.Setter;
+import vip.xiaonuo.common.pojo.CommonEntity;
+
 import java.math.BigDecimal;
 import java.util.Date;
 
@@ -28,7 +30,7 @@ import java.util.Date;
 @Getter
 @Setter
 @TableName("BIZ_RECORD")
-public class BizRecord {
+public class BizRecord extends CommonEntity {
 
     /** 主键 */
     @TableId
@@ -175,29 +177,30 @@ public class BizRecord {
     @Schema(description = "备注2")
     private String extKey2;
 
-    /** 删除标志 */
-    @Schema(description = "删除标志")
-    @TableLogic
-    @TableField(fill = FieldFill.INSERT)
-    private String deleteFlag;
-
-    /** 创建时间 */
-    @Schema(description = "创建时间")
-    @TableField(fill = FieldFill.INSERT)
-    private Date createTime;
-
-    /** 创建用户 */
-    @Schema(description = "创建用户")
-    @TableField(fill = FieldFill.INSERT)
-    private String createUser;
-
-    /** 更新时间 */
-    @Schema(description = "更新时间")
-    @TableField(fill = FieldFill.UPDATE)
-    private Date updateTime;
-
-    /** 更新用户 */
-    @Schema(description = "更新用户")
-    @TableField(fill = FieldFill.UPDATE)
-    private String updateUser;
+    /**过磅次数*/
+    private String weighingType;
+
+    /**预约id**/
+    private String appointmentId;
+
+    /**订单id*/
+    private String orderId;
+
+    /**订单名称*/
+    @TableField(exist = false)
+    private String orderName;
+
+    /**订单编号*/
+    @TableField(exist = false)
+    private String orderNumber;
+
+    /**客户名称*/
+    @TableField(exist = false)
+    private String customerName;
+
+    /**确认用户*/
+    private String confirmUser;
+
+    /**预约创建人*/
+    private String appointmentUser;
 }

+ 7 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/mapper/BizRecordMapper.java

@@ -12,7 +12,10 @@
  */
 package vip.xiaonuo.biz.modular.record.mapper;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import org.apache.ibatis.annotations.Param;
 import vip.xiaonuo.biz.modular.record.entity.BizRecord;
 import vip.xiaonuo.biz.modular.record.param.SevenDaysCountParam;
 import vip.xiaonuo.biz.modular.record.result.CarResult;
@@ -30,6 +33,10 @@ import java.util.Map;
  **/
 public interface BizRecordMapper extends BaseMapper<BizRecord> {
 
+    Page<BizRecord> getPage(@Param("page") Page<BizRecord> page, @Param("ew") QueryWrapper<BizRecord> ew);
+
+    List<BizRecord> getPage(@Param("ew") QueryWrapper<BizRecord> ew);
+
     // 查询7天总净重数据
     List<Map<String, Object>> sevenDaysTotalNetWeight(SevenDaysCountParam sevenDaysCountParam);
 

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

@@ -264,4 +264,17 @@
         <include refid="queryparam"/>
         GROUP BY LICENSE_PLATE, PLATE_COLOR
     </select>
-</mapper>
+
+    <select id="getPage" resultType="vip.xiaonuo.biz.modular.record.entity.BizRecord">
+        select
+            br.*,
+            bo.order_name,
+            bo.order_number,
+            bc.customer_name
+        from biz_record br
+         left join biz_appointment_record bar on bar.id = br.appointment_id
+         left join biz_order bo on bo.id = br.order_id
+         left join biz_customer bc on bo.customer_id = bc.id
+        ${ew.customSqlSegment}
+    </select>
+</mapper>

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

@@ -173,4 +173,12 @@ public class BizRecordAddParam {
     @Schema(description = "备注2")
     private String extKey2;
 
+    /**过磅次数*/
+    private String weighingType;
+
+    /**预约id**/
+    private String appointmentId;
+
+    /**订单id*/
+    private String orderId;
 }

+ 9 - 1
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/param/BizRecordEditParam.java

@@ -38,7 +38,6 @@ public class BizRecordEditParam {
 
     /** 关联本地数据ID */
     @Schema(description = "关联本地数据ID", requiredMode = Schema.RequiredMode.REQUIRED)
-    @NotBlank(message = "relationId不能为空")
     private String relationId;
 
     /** 车牌号码 */
@@ -178,4 +177,13 @@ public class BizRecordEditParam {
     @Schema(description = "备注2")
     private String extKey2;
 
+    /**过磅次数*/
+    private String weighingType;
+
+    /**预约id**/
+    private String appointmentId;
+
+    /**订单id*/
+    private String orderId;
+
 }

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

@@ -98,6 +98,18 @@ public class BizRecordPageParam {
 
     /** 运输单位 */
     @Schema(description = "运输单位")
-    private String transportRoute;
+    private String transportCompany;
+
+    /**标识,区分发货确认和过磅记录模块*/
+    private String isFlag;
+
+    /***订单编号*/
+    private String orderNumber;
+
+    /**订单名称*/
+    private String orderName;
+
+    /**客户名称*/
+    private String customerName;
 
 }

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

@@ -79,6 +79,17 @@ public class BizRecordExportResult {
     @ExcelProperty({"过磅记录", "称重信息", "过皮时间"})
     private Date tareTime;
 
+
+    /** 订单名称 */
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL)
+    @ExcelProperty({"过磅记录", "订单信息", "订单名称"})
+    private String orderName;
+
+    /** 订单编号 */
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL)
+    @ExcelProperty({"过磅记录", "订单信息", "订单编号"})
+    private String orderNumber;
+
     /** 货品名称 */
     @HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL)
     @ExcelProperty({"过磅记录", "货品信息", "货品名称"})
@@ -107,6 +118,16 @@ public class BizRecordExportResult {
     @ExcelProperty({"过磅记录", "货品信息", "运输单位"})
     private String transportCompany;
 
+    /** 司机姓名 */
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL)
+    @ExcelProperty({"过磅记录", "司机信息", "司机姓名"})
+    private String driverName;
+
+    /** 司机电话 */
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL)
+    @ExcelProperty({"过磅记录", "司机信息", "司机电话"})
+    private String driverMobile;
+
     /** 人员状态 */
     @HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL)
     @ExcelProperty({"过磅记录", "备注1"})

+ 10 - 1
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/service/BizRecordService.java

@@ -49,6 +49,12 @@ public interface BizRecordService extends IService<BizRecord> {
      */
     void add(BizRecordAddParam bizRecordAddParam);
 
+    /**
+     * 地磅端推送过磅记录
+     * @param bizRecordEditParam
+     */
+    void push(BizRecordEditParam bizRecordEditParam);
+
     /**
      * 编辑过磅记录
      *
@@ -88,7 +94,7 @@ public interface BizRecordService extends IService<BizRecord> {
      * @param response
      * @throws IOException
      */
-    void export(BizRecordExportParam exportParam, HttpServletResponse response) throws IOException;
+    void export(BizRecordPageParam exportParam, HttpServletResponse response) throws IOException;
 
     /**
      * 近七天统计
@@ -181,4 +187,7 @@ public interface BizRecordService extends IService<BizRecord> {
      */
     void carCountExport(SevenDaysCountParam sevenDaysCountParam, HttpServletResponse response) throws IOException;
 
+    /**发货确认*/
+    void confirmRecord(BizRecordIdParam bizRecordIdParam);
+
 }

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

@@ -31,10 +31,17 @@ import com.alibaba.excel.write.style.row.AbstractRowHeightStyleStrategy;
 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 jakarta.annotation.Resource;
 import jakarta.servlet.http.HttpServletResponse;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.poi.ss.usermodel.*;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import vip.xiaonuo.auth.core.util.StpLoginUserUtil;
+import vip.xiaonuo.biz.modular.bizappointmentrecord.entity.BizAppointmentRecord;
+import vip.xiaonuo.biz.modular.bizappointmentrecord.service.BizAppointmentRecordService;
+import vip.xiaonuo.biz.modular.bizorder.entity.BizOrder;
+import vip.xiaonuo.biz.modular.bizorder.service.BizOrderService;
 import vip.xiaonuo.biz.modular.record.param.*;
 import vip.xiaonuo.biz.modular.record.result.BizRecordExportResult;
 import vip.xiaonuo.biz.modular.record.result.CarResult;
@@ -66,51 +73,65 @@ import java.util.stream.Collectors;
 @Service
 public class BizRecordServiceImpl extends ServiceImpl<BizRecordMapper, BizRecord> implements BizRecordService {
 
+    @Resource
+    private BizAppointmentRecordService bizAppointmentRecordService;
+
+    @Resource
+    private BizOrderService bizOrderService;
+
     @Override
     public Page<BizRecord> page(BizRecordPageParam bizRecordPageParam) {
+        QueryWrapper<BizRecord> queryWrapper = getQueryWrapper(bizRecordPageParam);
+        return this.getBaseMapper().getPage(CommonPageRequest.defaultPage(), queryWrapper);
+    }
+
+    public QueryWrapper<BizRecord> getQueryWrapper(BizRecordPageParam bizRecordPageParam){
         QueryWrapper<BizRecord> queryWrapper = new QueryWrapper<BizRecord>().checkSqlInjection();
         if (ObjectUtil.isNotEmpty(bizRecordPageParam.getLicensePlate())) {
-            queryWrapper.lambda().like(BizRecord::getLicensePlate, bizRecordPageParam.getLicensePlate());
-        }
-        if (ObjectUtil.isNotEmpty(bizRecordPageParam.getCarNumber())) {
-            queryWrapper.lambda().like(BizRecord::getCarNumber, bizRecordPageParam.getCarNumber());
+            queryWrapper.like("br.LICENSE_PLATE", bizRecordPageParam.getLicensePlate());
         }
         if (ObjectUtil.isNotEmpty(bizRecordPageParam.getStartGrossTime()) && ObjectUtil.isNotEmpty(bizRecordPageParam.getEndGrossTime())) {
-            queryWrapper.lambda().between(BizRecord::getGrossTime, bizRecordPageParam.getStartGrossTime(), bizRecordPageParam.getEndGrossTime());
+            queryWrapper.between("br.GROSS_TIME", bizRecordPageParam.getStartGrossTime()+ " 00:00:00", bizRecordPageParam.getEndGrossTime()+" 23:59:59");
         }
         if (ObjectUtil.isNotEmpty(bizRecordPageParam.getStartTareTime()) && ObjectUtil.isNotEmpty(bizRecordPageParam.getEndTareTime())) {
-            queryWrapper.lambda().between(BizRecord::getTareTime, bizRecordPageParam.getStartTareTime(), bizRecordPageParam.getEndTareTime());
+            queryWrapper.between("br.TARE_TIME", bizRecordPageParam.getStartTareTime()+" 00:00:00", bizRecordPageParam.getEndTareTime()+" 23:59:59");
         }
         if (ObjectUtil.isNotEmpty(bizRecordPageParam.getDriverName())) {
-            queryWrapper.lambda().like(BizRecord::getDriverName, bizRecordPageParam.getDriverName());
+            queryWrapper.like("br.DRIVER_NAME", bizRecordPageParam.getDriverName());
         }
         if (ObjectUtil.isNotEmpty(bizRecordPageParam.getDriverMobile())) {
-            queryWrapper.lambda().like(BizRecord::getDriverMobile, bizRecordPageParam.getDriverMobile());
+            queryWrapper.like("br.DRIVER_MOBILE", bizRecordPageParam.getDriverMobile());
         }
         if (ObjectUtil.isNotEmpty(bizRecordPageParam.getGoodsName())) {
-            queryWrapper.lambda().like(BizRecord::getGoodsName, bizRecordPageParam.getGoodsName());
+            queryWrapper.like("br.GOODS_NAME", bizRecordPageParam.getGoodsName());
         }
         if (ObjectUtil.isNotEmpty(bizRecordPageParam.getGoodsModel())) {
-            queryWrapper.lambda().like(BizRecord::getGoodsModel, bizRecordPageParam.getGoodsModel());
+            queryWrapper.like("br.GOODS_MODEL", bizRecordPageParam.getGoodsModel());
         }
         if (ObjectUtil.isNotEmpty(bizRecordPageParam.getReceiptCompany())) {
-            queryWrapper.lambda().like(BizRecord::getReceiptCompany, bizRecordPageParam.getReceiptCompany());
+            queryWrapper.like("br.RECEIPT_COMPANY", bizRecordPageParam.getReceiptCompany());
         }
         if (ObjectUtil.isNotEmpty(bizRecordPageParam.getShippingCompany())) {
-            queryWrapper.lambda().like(BizRecord::getShippingCompany, bizRecordPageParam.getShippingCompany());
+            queryWrapper.like("br.SHIPPING_COMPANY", bizRecordPageParam.getShippingCompany());
         }
-        if (ObjectUtil.isNotEmpty(bizRecordPageParam.getTransportRoute())) {
-            queryWrapper.lambda().like(BizRecord::getTransportRoute, bizRecordPageParam.getTransportRoute());
+        if (ObjectUtil.isNotEmpty(bizRecordPageParam.getTransportCompany())){
+            queryWrapper.like("br.TRANSPORT_COMPANY",bizRecordPageParam.getTransportCompany());
         }
-        if (ObjectUtil.isAllNotEmpty(bizRecordPageParam.getSortField(), bizRecordPageParam.getSortOrder())) {
-            CommonSortOrderEnum.validate(bizRecordPageParam.getSortOrder());
-            queryWrapper.orderBy(true, bizRecordPageParam.getSortOrder().equals(CommonSortOrderEnum.ASC.getValue()),
-                    StrUtil.toUnderlineCase(bizRecordPageParam.getSortField()));
-        } else {
-            queryWrapper.lambda().orderByAsc(BizRecord::getId);
+        if (ObjectUtil.isNotEmpty(bizRecordPageParam.getIsFlag())){
+            queryWrapper.eq("br.weighing_type","1");
         }
-        queryWrapper.lambda().eq(BizRecord::getDeleteFlag, CommonDeleteFlagEnum.NOT_DELETE);
-        return this.page(CommonPageRequest.defaultPage(), queryWrapper);
+        if (ObjectUtil.isNotEmpty(bizRecordPageParam.getOrderName())){
+            queryWrapper.like("bo.order_name",bizRecordPageParam.getOrderName());
+        }
+        if (ObjectUtil.isNotEmpty(bizRecordPageParam.getOrderNumber())){
+            queryWrapper.like("bo.order_number",bizRecordPageParam.getOrderNumber());
+        }
+        if (ObjectUtil.isNotEmpty(bizRecordPageParam.getCustomerName())){
+            queryWrapper.like("bc.customer_name",bizRecordPageParam.getCustomerName());
+        }
+        queryWrapper.eq("br.DELETE_FLAG","NOT_DELETE");
+        queryWrapper.orderByDesc("br.create_time");
+        return queryWrapper;
     }
 
     @Transactional(rollbackFor = Exception.class)
@@ -120,6 +141,45 @@ public class BizRecordServiceImpl extends ServiceImpl<BizRecordMapper, BizRecord
         this.save(bizRecord);
     }
 
+    @Override
+    public void push(BizRecordEditParam bizRecordEditParam) {
+        if(StringUtils.equals(bizRecordEditParam.getWeighingType(),"1")){
+            BizAppointmentRecord appointmentRecord = bizAppointmentRecordService.getById(bizRecordEditParam.getAppointmentId());
+            //一次过磅
+            BizRecord bizRecord = BeanUtil.toBean(bizRecordEditParam, BizRecord.class);
+            bizRecord.setRelationId(bizRecord.getId());
+            bizRecord.setId(null);
+            bizRecord.setAppointmentUser(appointmentRecord.getCreateUser());
+            this.save(bizRecord);
+
+            //修改预约状态
+            if(ObjectUtil.isNotNull(appointmentRecord)){
+                appointmentRecord.setStatus("6");
+                bizAppointmentRecordService.updateById(appointmentRecord);
+            }
+        }else{
+            //二次过磅
+            BizRecord bizRecord = this.queryEntity(bizRecordEditParam.getId());
+            bizRecordEditParam.setId(null);
+            BeanUtil.copyProperties(bizRecordEditParam, bizRecord);
+            this.updateById(bizRecord);
+
+            //修改预约状态
+            BizAppointmentRecord appointmentRecord = bizAppointmentRecordService.getById(bizRecord.getAppointmentId());
+            if(ObjectUtil.isNotNull(appointmentRecord)){
+                appointmentRecord.setStatus("8");
+                bizAppointmentRecordService.updateById(appointmentRecord);
+            }
+
+            //修改订单重量
+            BizOrder bizOrder = bizOrderService.getById(bizRecord.getOrderId());
+            if(ObjectUtil.isNotNull(bizOrder)){
+                bizOrder.setNetWeight(bizOrder.getNetWeight().add(bizRecord.getNetWeight()));
+                bizOrderService.updateById(bizOrder);
+            }
+        }
+    }
+
     @Transactional(rollbackFor = Exception.class)
     @Override
     public void edit(BizRecordEditParam bizRecordEditParam) {
@@ -151,44 +211,13 @@ public class BizRecordServiceImpl extends ServiceImpl<BizRecordMapper, BizRecord
 
 
     @Override
-    public void export(BizRecordExportParam exportParam, HttpServletResponse response) throws IOException {
+    public void export(BizRecordPageParam exportParam, HttpServletResponse response) throws IOException {
         File tempFile = null;
         try {
-            QueryWrapper<BizRecord> queryWrapper = new QueryWrapper<BizRecord>().checkSqlInjection();
-            if (ObjectUtil.isNotEmpty(exportParam.getLicensePlate())) {
-                queryWrapper.lambda().like(BizRecord::getLicensePlate, exportParam.getLicensePlate());
-            }
-            if (ObjectUtil.isNotEmpty(exportParam.getStartGrossTime()) && ObjectUtil.isNotEmpty(exportParam.getEndGrossTime())) {
-                queryWrapper.lambda().between(BizRecord::getGrossTime, exportParam.getStartGrossTime(), exportParam.getEndGrossTime());
-            }
-            if (ObjectUtil.isNotEmpty(exportParam.getStartTareTime()) && ObjectUtil.isNotEmpty(exportParam.getEndTareTime())) {
-                queryWrapper.lambda().between(BizRecord::getTareTime, exportParam.getStartTareTime(), exportParam.getEndTareTime());
-            }
-            if (ObjectUtil.isNotEmpty(exportParam.getDriverName())) {
-                queryWrapper.lambda().like(BizRecord::getDriverName, exportParam.getDriverName());
-            }
-            if (ObjectUtil.isNotEmpty(exportParam.getDriverMobile())) {
-                queryWrapper.lambda().like(BizRecord::getDriverMobile, exportParam.getDriverMobile());
-            }
-            if (ObjectUtil.isNotEmpty(exportParam.getGoodsName())) {
-                queryWrapper.lambda().like(BizRecord::getGoodsName, exportParam.getGoodsName());
-            }
-            if (ObjectUtil.isNotEmpty(exportParam.getGoodsModel())) {
-                queryWrapper.lambda().like(BizRecord::getGoodsModel, exportParam.getGoodsModel());
-            }
-            if (ObjectUtil.isNotEmpty(exportParam.getReceiptCompany())) {
-                queryWrapper.lambda().like(BizRecord::getReceiptCompany, exportParam.getReceiptCompany());
-            }
-            if (ObjectUtil.isNotEmpty(exportParam.getShippingCompany())) {
-                queryWrapper.lambda().like(BizRecord::getShippingCompany, exportParam.getShippingCompany());
-            }
-            if (ObjectUtil.isNotEmpty(exportParam.getTransportCompany())) {
-                queryWrapper.lambda().like(BizRecord::getTransportCompany, exportParam.getTransportCompany());
-            }
-            queryWrapper.lambda().orderByDesc(BizRecord::getGrossTime);
+            QueryWrapper<BizRecord> queryWrapper = getQueryWrapper(exportParam);
             String fileName = "过磅记录导出.xlsx";
-            List<BizRecord> recordList = this.baseMapper.selectList(queryWrapper);
-            //List<BizRecord> list = this.getBaseMapper().selectList(queryWrapper);
+            //List<BizRecord> recordList = this.baseMapper.selectList(queryWrapper);
+            List<BizRecord> recordList = this.getBaseMapper().getPage(queryWrapper);
             if (ObjectUtil.isEmpty(recordList)) {
                 throw new CommonException("无数据可导出");
             }
@@ -467,4 +496,19 @@ public class BizRecordServiceImpl extends ServiceImpl<BizRecordMapper, BizRecord
             CommonResponseUtil.renderError(response, e.getMessage());
         }
     }
+
+    @Override
+    public void confirmRecord(BizRecordIdParam bizRecordIdParam) {
+        //设置确认人
+        BizRecord bizRecord = this.queryEntity(bizRecordIdParam.getId());
+        bizRecord.setConfirmUser(StpLoginUserUtil.getLoginUser().getName());
+        this.updateById(bizRecord);
+
+        //预约记录修改成完成装货
+        BizAppointmentRecord appointmentRecord = bizAppointmentRecordService.getById(bizRecord.getAppointmentId());
+        if(ObjectUtil.isNotNull(appointmentRecord)){
+            appointmentRecord.setStatus("7");
+            bizAppointmentRecordService.updateById(appointmentRecord);
+        }
+    }
 }

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

@@ -0,0 +1,48 @@
+package vip.xiaonuo.biz.modular.task;
+
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import jakarta.annotation.Resource;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+import vip.xiaonuo.biz.modular.bizappointmentrecord.entity.BizAppointmentRecord;
+import vip.xiaonuo.biz.modular.bizappointmentrecord.service.BizAppointmentRecordService;
+import vip.xiaonuo.biz.modular.bizappointmenttime.entity.BizAppointmentTime;
+import vip.xiaonuo.biz.modular.bizappointmenttime.service.BizAppointmentTimeService;
+import vip.xiaonuo.common.timer.CommonTimerTaskRunner;
+
+import java.util.List;
+
+@Slf4j
+@Component
+public class AppointmentCallTask implements CommonTimerTaskRunner {
+
+    @Resource
+    private BizAppointmentTimeService bizAppointmentTimeService;
+    @Resource
+    private BizAppointmentRecordService bizAppointmentRecordService;
+
+    @Override
+    public void action(String extJson) {
+        String format = DateUtil.format(DateUtil.date(), "HH:mm");
+        //查询当前时间点属于时间段
+        BizAppointmentTime bizAppointmentTime = bizAppointmentTimeService.getOne(new QueryWrapper<BizAppointmentTime>().lambda().
+                le(BizAppointmentTime::getBeginTime,format).
+                gt(BizAppointmentTime::getFinishTime,format).
+                last("limit 1"));
+        if(ObjectUtil.isNotNull(bizAppointmentTime)){
+            //根据时间段查询排队中的预约记录
+            BizAppointmentRecord record = bizAppointmentRecordService.getOne(new QueryWrapper<BizAppointmentRecord>().lambda().
+                    eq(BizAppointmentRecord::getTimeId, bizAppointmentTime.getId()).
+                    eq(BizAppointmentRecord::getStatus,"3").
+                    orderByAsc(BizAppointmentRecord::getCreateTime).
+                    last("limit 1"));
+            if(ObjectUtil.isNotNull(record)){
+                record.setStatus("4");
+                bizAppointmentRecordService.updateById(record);
+                log.info("车牌号:"+record.getLicenseNumber()+"在("+bizAppointmentTime.getBeginTime()+"~"+bizAppointmentTime.getEndTime()+")时间段内叫号成功!");
+            }
+        }
+    }
+}

+ 44 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/task/AppointmentTimeOutTask.java

@@ -0,0 +1,44 @@
+package vip.xiaonuo.biz.modular.task;
+
+import cn.hutool.core.date.DateUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import jakarta.annotation.Resource;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+import vip.xiaonuo.biz.modular.bizappointmentrecord.entity.BizAppointmentRecord;
+import vip.xiaonuo.biz.modular.bizappointmentrecord.service.BizAppointmentRecordService;
+import vip.xiaonuo.biz.modular.bizappointmenttime.entity.BizAppointmentTime;
+import vip.xiaonuo.biz.modular.bizappointmenttime.service.BizAppointmentTimeService;
+import vip.xiaonuo.common.timer.CommonTimerTaskRunner;
+
+import java.util.List;
+
+@Slf4j
+@Component
+public class AppointmentTimeOutTask implements CommonTimerTaskRunner {
+
+    @Resource
+    private BizAppointmentTimeService bizAppointmentTimeService;
+    @Resource
+    private BizAppointmentRecordService bizAppointmentRecordService;
+
+    @Override
+    public void action(String extJson) {
+        String format = DateUtil.format(DateUtil.date(), "HH:mm");
+        //查询当前时间点之前的预约时段
+        List<BizAppointmentTime> timeList = bizAppointmentTimeService.list(new QueryWrapper<BizAppointmentTime>().lambda().
+                lt(BizAppointmentTime::getFinishTime, format));
+        for(BizAppointmentTime bizAppointmentTime : timeList){
+            //根据时间段查询还未入场预约记录
+            List<BizAppointmentRecord> recordList = bizAppointmentRecordService.list(new QueryWrapper<BizAppointmentRecord>().lambda().
+                    eq(BizAppointmentRecord::getTimeId, bizAppointmentTime.getId()).
+                    in(BizAppointmentRecord::getStatus,"1","2","3","4"));
+            for(BizAppointmentRecord bizAppointmentRecord : recordList){
+                //超期作废
+                bizAppointmentRecord.setStatus("15");
+                bizAppointmentRecordService.updateById(bizAppointmentRecord);
+                log.info("车牌号:"+bizAppointmentRecord.getLicenseNumber()+"的预约记录超期作废成功!");
+            }
+        }
+    }
+}

+ 2 - 1
snowy-web-app/src/main/java/vip/xiaonuo/core/config/GlobalConfigure.java

@@ -153,7 +153,8 @@ public class GlobalConfigure implements WebMvcConfigurer {
 
             /*地磅端预约记录校验*/
             "/biz/bizappointmentrecord/checkAppointmentRecord",
-            "/biz/bizaccessrecord/add"
+            "/biz/bizaccessrecord/add",
+            "/biz/record/push"
     };
 
     /**