Pārlūkot izejas kodu

1、起卸预约导出 2、管桩预约导出 3、物流订单预约导出修改 4、起卸订单起卸分配和装货分配调整

fanzherong_v 16 stundas atpakaļ
vecāks
revīzija
7522241a4b
18 mainītis faili ar 872 papildinājumiem un 44 dzēšanām
  1. 12 0
      snowy-admin-web/src/api/biz/bizAppointmentRecordApi.js
  2. 9 9
      snowy-admin-web/src/views/biz/bizappointload/index.vue
  3. 1 1
      snowy-admin-web/src/views/biz/bizappointmentrecord/index.vue
  4. 19 6
      snowy-admin-web/src/views/biz/bizloadappoint/dispatch.vue
  5. 282 0
      snowy-admin-web/src/views/biz/bizloadappoint/dispatchadd.vue
  6. 20 21
      snowy-admin-web/src/views/biz/bizloadappoint/dispatchload.vue
  7. 316 0
      snowy-admin-web/src/views/biz/bizloadappoint/dispatchloadadd.vue
  8. 2 2
      snowy-admin-web/src/views/biz/bizloadarrive/index.vue
  9. 1 1
      snowy-admin-web/src/views/biz/bizorder/form.vue
  10. 30 0
      snowy-admin-web/src/views/biz/bizpipeappoint/index.vue
  11. 20 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/controller/BizAppointmentRecordController.java
  12. 4 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/mapper/BizAppointmentRecordMapper.java
  13. 4 4
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/param/BizAppointmentExportResult.java
  14. 54 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/param/BizLoadAppointmentExportResult.java
  15. 46 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/param/BizPipeAppointmentExportResult.java
  16. 6 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/service/BizAppointmentRecordService.java
  17. 35 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/service/impl/BizAppointmentRecordServiceImpl.java
  18. 11 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizloaddispatch/service/impl/BizLoadDispatchServiceImpl.java

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

@@ -71,6 +71,18 @@ export default {
 			responseType: 'blob'
 		})
 	},
+	//导出起卸预约
+	exportLoadRecord(data){
+		return request('exportLoadRecord', data, 'get', {
+			responseType: 'blob'
+		})
+	},
+	//导出管桩预约
+	exportPipeRecord(data){
+		return request('exportPipeRecord', data, 'get', {
+			responseType: 'blob'
+		})
+	},
 	//取消排队
 	cancelAppointmentRecord(data){
 		return request('cancelAppointmentRecord',data)

+ 9 - 9
snowy-admin-web/src/views/biz/bizappointload/index.vue

@@ -64,11 +64,11 @@
 		>
 			<template #operator class="table-operator">
 				<a-space>
-					<a-button type="primary" @click="formRef.onOpen()" v-if="hasPerm('bizAppointmentRecordAdd')">
+					<a-button type="primary" @click="formRef.onOpen()" v-if="hasPerm('bizAppointLoadAdd')">
 						<template #icon><plus-outlined /></template>
 						新增
 					</a-button>
-					<a-button @click="exportTotal" v-if="hasPerm('bizAppointmentExport')">
+					<a-button @click="exportTotal" v-if="hasPerm('bizAppointLoadExport')">
 						<template #icon>
 							<export-outlined/>
 						</template>
@@ -171,22 +171,22 @@
 									<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 == '2' || record.status == '4')">
+									<a-menu-item v-if="hasPerm('bizAppointLoadEdit') && (record.status == '2' || record.status == '4')">
 										<a style="color:blue" @click="formRef.onOpen(record)" >编辑</a>
 									</a-menu-item>
-									<a-menu-item v-if="hasPerm('bizAppointmentRecordDelete') && (record.status == '2' || record.status == '4')">
+									<a-menu-item v-if="hasPerm('bizAppointLoadDelete') && (record.status == '2' || record.status == '4')">
 										<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-menu-item v-if="hasPerm('bizAppointLoadconfirm') && 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-menu-item v-if="hasPerm('bizAppointLoadDriverSign') && record.status=='10' && record.orderType=='1'">
 										<a  @click="signRef.onOpen(record)" >回签</a>
 									</a-menu-item>
 									<a-menu-item v-if="record.status=='4'">
 										<a style="color:green"  @click="cancel(record)" >取消</a>
 									</a-menu-item>
-									<a-menu-item v-if="hasPerm('bizAppointmentDriverExit') && (record.status=='5' || record.status=='6' || record.status=='7' || record.status=='8')">
+									<a-menu-item v-if="hasPerm('bizAppointLoadExit') && (record.status=='5' || record.status=='6' || record.status=='7' || record.status=='8')">
 										<a style="color:orange"  @click="exit(record)" >授权出场</a>
 									</a-menu-item>
 
@@ -542,9 +542,9 @@
 			onOk() {
 				submitLoading.value = true
 				const searchFormParam = cloneDeep(searchFormState.value)
-
+				searchFormParam.type = '3'
 				bizAppointmentRecordApi
-					.exportRecord(Object.assign(searchFormParam))
+					.exportLoadRecord(Object.assign(searchFormParam))
 					.then((res) => {
 						downloadUtil.resultDownload(res)
 					})

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

@@ -553,7 +553,7 @@
 			onOk() {
 				submitLoading.value = true
 				const searchFormParam = cloneDeep(searchFormState.value)
-
+				searchFormParam.type = '1'
 				bizAppointmentRecordApi
 					.exportRecord(Object.assign(searchFormParam))
 					.then((res) => {

+ 19 - 6
snowy-admin-web/src/views/biz/bizloadappoint/dispatch.vue

@@ -1,12 +1,12 @@
 <template>
 	<xn-form-container
-		:title="formData.id ? '装载车调度' : '装载车调度'"
+		:title="formData.id ? '装载车调度详情' : '装载车调度详情'"
 		:width="900"
 		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 ref="formRef" :model="formData" :rules="formRules" :wrapper-col="wrapperCol" :label-col="labelCol">
 			<a-form-item label="预约单号:" name="loadNumber">
 				<a-input v-model:value="formData.loadNumber" placeholder="请输入预约单号" allow-clear disabled/>
 			</a-form-item>
@@ -26,7 +26,7 @@
 			<a-form-item label="已约次数:" name="alreadyNumber" v-show="numberFlag">
 				<a-input v-model:value="formData.alreadyNumber" placeholder="请输入已约次数" allow-clear disabled/>
 			</a-form-item>
-		</a-form>
+		</a-form>-->
 
 		<s-table
 			ref="tableRef"
@@ -35,6 +35,14 @@
 			bordered
 			:row-key="(record) => record.id"
 		>
+			<template #operator class="table-operator">
+				<a-space>
+					<a-button type="primary" @click="dispatchAddRef.onOpen(appointId)">
+						<template #icon><plus-outlined /></template>
+						新增
+					</a-button>
+				</a-space>
+			</template>
 			<template #bodyCell="{ column, record }">
 				<template v-if="column.dataIndex === 'action'">
 					<a-space>
@@ -47,12 +55,13 @@
 			</template>
 		</s-table>
 
-		<template #footer>
+<!--		<template #footer>
 			<a-button style="margin-right: 8px" @click="onClose">关闭</a-button>
 			<a-button type="primary" @click="onSubmit" :loading="submitLoading">保存</a-button>
-		</template>
+		</template>-->
 
 		<Replace ref="replaceRef" @successful="tableRef.refresh(true)" />
+		<DispatchAdd ref="dispatchAddRef" @successful="tableRef.refresh(true)" />
 	</xn-form-container>
 </template>
 
@@ -70,6 +79,7 @@
 	import {createVNode} from 'vue';
 	import Replace from './replace.vue'
 	import bizLoadDispatchApi from "@/api/biz/bizLoadDispatchApi";
+	import DispatchAdd from './dispatchadd.vue'
 
 
 	// 抽屉状态
@@ -78,6 +88,7 @@
 	const formRef = ref()
 	const tableRef = ref()
 	const replaceRef = ref()
+	const dispatchAddRef = ref()
 
 	const numberFlag = ref(false)
 	// 表单数据
@@ -98,12 +109,14 @@
 	const loadPointIdList = ref()
 	const loadTimeIdList = ref()
 
+	const appointId = ref()
 	// 打开抽屉
 	const onOpen = (record) => {
 		open.value = true
 		if (record) {
 			let recordData = cloneDeep(record)
 			formData.value = Object.assign({}, recordData)
+			appointId.value = formData.value.id
 		}
 
 		//装货点位查询
@@ -158,7 +171,7 @@
 	}
 
 	const loadData = (parameter) => {
-		return bizLoadDispatchApi.getPageList({appointId:formData.value.id,loadType:'2'}).then((data) => {
+		return bizLoadDispatchApi.getPageList({appointId:formData.value.id,appointType:'2'}).then((data) => {
 			return data
 		})
 	}

+ 282 - 0
snowy-admin-web/src/views/biz/bizloadappoint/dispatchadd.vue

@@ -0,0 +1,282 @@
+<template>
+	<xn-form-container
+		:title="formData.id ? '装载车调度更换' : '装载车调度新增'"
+		:width="900"
+		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="loadNumber">
+				<a-input v-model:value="formData.loadNumber" placeholder="请输入预约单号" allow-clear disabled/>
+			</a-form-item>
+			<a-form-item label="装卸点位:" name="loadPointId">
+				<a-select v-model:value="formData.loadPointId" placeholder="请选择装卸点位"
+						  :options="loadPointIdList" @change="onChangePoint"
+				> </a-select>
+			</a-form-item>
+			<a-form-item label="装卸时间:" name="loadTimeId" >
+				<a-select v-model:value="formData.loadTimeId" placeholder="请选择装卸时间"
+						  :options="loadTimeIdList" @change="onChangeLoadTime"
+				> </a-select>
+			</a-form-item>
+			<a-form-item label="可约次数:" name="availableNumber" v-show="numberFlag">
+				<a-input v-model:value="formData.availableNumber" placeholder="请输入可约次数" allow-clear disabled/>
+			</a-form-item>
+			<a-form-item label="已约次数:" name="alreadyNumber" v-show="numberFlag">
+				<a-input v-model:value="formData.alreadyNumber" placeholder="请输入已约次数" allow-clear disabled/>
+			</a-form-item>
+		</a-form>
+
+<!--		<s-table
+			ref="tableRef"
+			:columns="columns"
+			:data="loadData"
+			bordered
+			:row-key="(record) => record.id"
+		>
+			<template #operator class="table-operator">
+				<a-space>
+					<a-button type="primary" @click="formRef.onOpen()">
+						<template #icon><plus-outlined /></template>
+						新增
+					</a-button>
+				</a-space>
+			</template>
+			<template #bodyCell="{ column, record }">
+				<template v-if="column.dataIndex === 'action'">
+					<a-space>
+						<a-button type="link" size="small" v-if="hasPerm('bizDispatchReplace')" @click="replaceRef.onOpen(record)">更换</a-button>
+					</a-space>
+					<a-space>
+						<a-button type="link" danger size="small" v-if="hasPerm('bizOrderDispatchDelete')" @click="deleteConfig(record)">删除</a-button>
+					</a-space>
+				</template>
+			</template>
+		</s-table>-->
+
+		<template #footer>
+			<a-button style="margin-right: 8px" @click="onClose">关闭</a-button>
+			<a-button type="primary" @click="onSubmit" :loading="submitLoading">保存</a-button>
+		</template>
+
+		<Replace ref="replaceRef" @successful="tableRef.refresh(true)" />
+	</xn-form-container>
+</template>
+
+<script setup name="bizOrderForm">
+	import { cloneDeep } from 'lodash-es'
+	import { required } from '@/utils/formRules'
+	import tool from '@/utils/tool'
+	import goodsConfApi from '@/api/biz/goodsConfApi'
+	import bizSaleOrderApi from "@/api/biz/bizSaleOrderApi";
+	import bizLoadPointApi from "@/api/biz/bizLoadPointApi";
+	import bizLoadTimeApi from "@/api/biz/bizLoadTimeApi"
+	import bizOrderLoadApi from "@/api/biz/bizOrderLoadApi";
+	import {ExclamationCircleOutlined} from '@ant-design/icons-vue';
+	import {Modal} from 'ant-design-vue';
+	import {createVNode} from 'vue';
+	import Replace from './replace.vue'
+	import bizLoadDispatchApi from "@/api/biz/bizLoadDispatchApi";
+
+
+	// 抽屉状态
+	const open = ref(false)
+	const emit = defineEmits({ successful: null })
+	const formRef = ref()
+	const tableRef = ref()
+	const replaceRef = ref()
+
+	const numberFlag = ref(false)
+	// 表单数据
+	const formData = ref({})
+	const submitLoading = ref(false)
+
+	//设置表单样式
+	const labelCol = ref({ span: 5})
+	const wrapperCol = ref({ span: 16})
+
+	//订单类型
+	const orderTypeList = tool.dictList('order_type')
+	const goodIdList = ref()
+	const customerIdList = ref()
+	const saleOrderInfoList = ref()
+	const deliveryTimeIdList = ref()
+	const supplierIdList = ref()
+	const loadPointIdList = ref()
+	const loadTimeIdList = ref()
+
+	// 打开抽屉
+	const onOpen = (record) => {
+		open.value = true
+		if (record) {
+			let recordData = cloneDeep(record)
+			formData.value.appointId = record
+		}
+
+		//装货点位查询
+		bizLoadPointApi.getList({appointType:'2'}).then((res)=>{
+			loadPointIdList.value = res.map((item)=>{
+				return{
+					value:item.id,
+					label:item.loadPoint
+				}
+			})
+		})
+
+
+	}
+
+	//卸货点位点击事件
+	const onChangePoint =(value)=>{
+		formData.value.loadTimeId = ''
+		loadTimeIdList.value = ''
+		formData.value.availableNumber = ''
+		formData.value.alreadyNumber = ''
+		bizLoadTimeApi.searchNow({pointId:formData.value.loadPointId}).then((res)=>{
+			loadTimeIdList.value = res.map((item)=>{
+				return{
+					value:item.id,
+					label:item.beginTime+'~'+item.endTime
+				}
+			})
+		})
+	}
+
+	const onChangeLoadTime = (value) => {
+		bizLoadTimeApi.bizLoadTimeDetail({id:value}).then((res)=>{
+			formData.value.availableNumber = res.availableNumber
+			formData.value.alreadyNumber = res.alreadyNumber
+			numberFlag.value = true
+		})
+	}
+
+	const loadData = (parameter) => {
+		return bizLoadDispatchApi.getPageList({appointId:formData.value.id,appointType:'2'}).then((data) => {
+			return data
+		})
+	}
+
+	const columns = [
+		{
+			title: '装卸点位',
+			dataIndex: 'loadPoint',
+			align:'center'
+		},
+		{
+			title: '开始时间',
+			dataIndex: 'beginTime',
+			align:'center'
+		},
+		{
+			title: '结束时间',
+			dataIndex: 'endTime',
+			align:'center'
+		},
+		{
+			title: '可约次数',
+			dataIndex: 'availableNumber',
+			align:'center'
+		},
+		{
+			title: '已约次数',
+			dataIndex: 'alreadyNumber',
+			align:'center'
+		},
+	]
+	// 操作栏通过权限判断是否显示
+	columns.push({
+		title: '操作',
+		dataIndex: 'action',
+		align: 'center',
+		width: 150
+	})
+
+
+
+
+	// 关闭抽屉
+	const onClose = () => {
+		formRef.value.resetFields()
+		formData.value = {}
+		open.value = false
+		loadTimeIdList.value = ''
+		numberFlag.value = false
+		emit('successful')
+
+	}
+	// 默认要校验的
+	const formRules = {
+		//orderNumber: [required('请输入订单编号')],
+		//orderName: [required('请输入订单名称')],
+		//customerId:[required('请选择客户信息')],
+		loadPointId:[required('请选择装卸点位')],
+		loadTimeId: [required('请选择装卸时间')],
+	}
+
+
+	// 删除
+	const deleteConfig = (record) => {
+
+		Modal.confirm({
+			title: '确定删除该数据吗?',
+			icon: createVNode(ExclamationCircleOutlined),
+			content: '',
+			onOk() {
+				submitLoading.value = true
+				let params = [
+					{
+						id: record.id
+					}
+				]
+
+				bizLoadDispatchApi
+					.deleteDispatch(params)
+					.then(() => {
+						tableRef.value.refresh(true)
+					})
+					.finally(() => {
+						submitLoading.value = false
+					})
+			},
+			onCancel() {}
+		})
+	}
+
+	// 验证并提交数据
+	const onSubmit = () => {
+		formRef.value
+			.validate()
+			.then(() => {
+				submitLoading.value = true
+				const formDataParam = cloneDeep(formData.value)
+				bizLoadDispatchApi
+					.bizLoadDispatchSubmitDispatch(formDataParam, formDataParam.id)
+					.then(() => {
+						onClose()
+					})
+					.finally(() => {
+						submitLoading.value = false
+					})
+			})
+			.catch(() => {})
+	}
+	// 抛出函数
+	defineExpose({
+		onOpen
+	})
+</script>
+
+<style>
+/* 修改禁用状态下的颜色 */
+.ant-radio-button-wrapper-disabled {
+	color: black !important; /* 设置文字颜色 */
+	background-color: #f0f0f0 !important; /* 设置背景颜色 */
+}
+
+/* 修改禁用状态下选中项的颜色 */
+.ant-radio-button-wrapper-checked.ant-radio-button-wrapper-disabled {
+	color: white !important; /* 设置文字颜色 */
+	background-color: blue !important; /* 设置选中项的背景颜色 */
+}
+</style>

+ 20 - 21
snowy-admin-web/src/views/biz/bizloadappoint/dispatchload.vue

@@ -1,12 +1,12 @@
 <template>
 	<xn-form-container
-		:title="formData.id ? '起卸调度' : '起卸调度'"
+		:title="formData.id ? '起卸调度详情' : '起卸调度详情'"
 		:width="900"
 		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 ref="formRef" :model="formData" :rules="formRules" :wrapper-col="wrapperCol" :label-col="labelCol">
 			<a-form-item label="预约单号:" name="loadNumber">
 				<a-input v-model:value="formData.loadNumber" placeholder="请输入预约单号" allow-clear disabled/>
 			</a-form-item>
@@ -29,7 +29,7 @@
 					v-model:value="formData.userId"
 				/>
 			</a-form-item>
-		</a-form>
+		</a-form>-->
 
 		<s-table
 			ref="tableRef"
@@ -38,6 +38,14 @@
 			bordered
 			:row-key="(record) => record.id"
 		>
+			<template #operator class="table-operator">
+				<a-space>
+					<a-button type="primary" @click="dispatchLoadAddRef.onOpen(appointId)">
+						<template #icon><plus-outlined /></template>
+						新增
+					</a-button>
+				</a-space>
+			</template>
 			<template #bodyCell="{ column, record }">
 				<template v-if="column.dataIndex === 'action'">
 					<a-space>
@@ -50,12 +58,13 @@
 			</template>
 		</s-table>
 
-		<template #footer>
+<!--		<template #footer>
 			<a-button style="margin-right: 8px" @click="onClose">关闭</a-button>
 			<a-button type="primary" @click="onSubmit" :loading="submitLoading">保存</a-button>
-		</template>
+		</template>-->
 
 		<Replace ref="replaceRef" @successful="tableRef.refresh(true)" />
+		<DispatchLoadAdd ref="dispatchLoadAddRef" @successful="tableRef.refresh(true)" />
 	</xn-form-container>
 </template>
 
@@ -74,6 +83,7 @@
 	import Replace from './replaceload.vue'
 	import bizLoadDispatchApi from "@/api/biz/bizLoadDispatchApi";
 	import userApi from '@/api/biz/bizUserApi'
+	import DispatchLoadAdd from './dispatchloadadd.vue'
 
 
 	// 抽屉状态
@@ -82,6 +92,7 @@
 	const formRef = ref()
 	const tableRef = ref()
 	const replaceRef = ref()
+	const dispatchLoadAddRef = ref()
 
 	const numberFlag = ref(false)
 	// 表单数据
@@ -102,16 +113,18 @@
 	const loadPointIdList = ref()
 	const loadTimeIdList = ref()
 
+	const appointId = ref()
 	// 打开抽屉
 	const onOpen = (record) => {
 		open.value = true
 		if (record) {
 			let recordData = cloneDeep(record)
 			formData.value = Object.assign({}, recordData)
+			appointId.value = formData.value.id
 		}
 
 		//装货点位查询
-		bizLoadPointApi.getList({loadType:'1'}).then((res)=>{
+		bizLoadPointApi.getList({appointType:'1'}).then((res)=>{
 			loadPointIdList.value = res.map((item)=>{
 				return{
 					value:item.id,
@@ -120,20 +133,6 @@
 			})
 		})
 
-		if(formData.value.saleOrderInfo){
-			bizSaleOrderApi.detailById({id:formData.value.saleOrderInfo}).then((res)=>{
-				//根据货品名称和重量查询提货时间段
-				goodsConfApi.getList({goodsName:res.saleGoodsName,goodsCode:res.goodsCode,needWeight:res.saleOrderWeight}).then((res)=>{
-					deliveryTimeIdList.value = res.map((item)=>{
-						return{
-							value:item.id,
-							label:item.confStartTime+'~'+item.confEndTime
-						}
-					})
-				})
-			})
-		}
-
 
 	}
 
@@ -177,7 +176,7 @@
 	}
 
 	const loadData = (parameter) => {
-		return bizLoadDispatchApi.getPageList({appointId:formData.value.id,loadType:'1'}).then((data) => {
+		return bizLoadDispatchApi.getPageList({appointId:formData.value.id,appointType:'1'}).then((data) => {
 			return data
 		})
 	}

+ 316 - 0
snowy-admin-web/src/views/biz/bizloadappoint/dispatchloadadd.vue

@@ -0,0 +1,316 @@
+<template>
+	<xn-form-container
+		:title="formData.id ? '起卸调度更换' : '起卸调度新增'"
+		:width="900"
+		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="loadNumber">
+				<a-input v-model:value="formData.loadNumber" placeholder="请输入预约单号" allow-clear disabled/>
+			</a-form-item>
+			<a-form-item label="起卸点位:" name="loadPointId">
+				<a-select v-model:value="formData.loadPointId" placeholder="请选择装卸点位"
+						  :options="loadPointIdList" @change="onChangePoint"
+				> </a-select>
+			</a-form-item>
+			<a-form-item label="起卸时间:" name="loadTimeId" >
+				<a-select v-model:value="formData.loadTimeId" placeholder="请选择装卸时间"
+						  :options="loadTimeIdList" @change="onChangeLoadTime"
+				> </a-select>
+			</a-form-item>
+			<a-form-item label="执行人员:" name="userId">
+				<xn-user-selector
+					:org-tree-api="selectorApiFunction.orgTreeApi"
+					:user-page-api="selectorApiFunction.userPageApi"
+					:radio-model="true"
+					placeholder="请选择执行人员"
+					v-model:value="formData.userId"
+				/>
+			</a-form-item>
+		</a-form>
+
+<!--		<s-table
+			ref="tableRef"
+			:columns="columns"
+			:data="loadData"
+			bordered
+			:row-key="(record) => record.id"
+		>
+			<template #bodyCell="{ column, record }">
+				<template v-if="column.dataIndex === 'action'">
+					<a-space>
+						<a-button type="link" size="small" v-if="hasPerm('bizLoadReplace')" @click="replaceRef.onOpen(record)">更换</a-button>
+					</a-space>
+					<a-space>
+						<a-button type="link" danger size="small" v-if="hasPerm('bizOrderDispatchDelete')" @click="deleteConfig(record)">删除</a-button>
+					</a-space>
+				</template>
+			</template>
+		</s-table>-->
+
+		<template #footer>
+			<a-button style="margin-right: 8px" @click="onClose">关闭</a-button>
+			<a-button type="primary" @click="onSubmit" :loading="submitLoading">保存</a-button>
+		</template>
+
+		<Replace ref="replaceRef" @successful="tableRef.refresh(true)" />
+	</xn-form-container>
+</template>
+
+<script setup name="bizOrderForm">
+	import { cloneDeep } from 'lodash-es'
+	import { required } from '@/utils/formRules'
+	import tool from '@/utils/tool'
+	import goodsConfApi from '@/api/biz/goodsConfApi'
+	import bizSaleOrderApi from "@/api/biz/bizSaleOrderApi";
+	import bizLoadPointApi from "@/api/biz/bizLoadPointApi";
+	import bizLoadTimeApi from "@/api/biz/bizLoadTimeApi"
+	import bizOrderLoadApi from "@/api/biz/bizOrderLoadApi";
+	import {ExclamationCircleOutlined} from '@ant-design/icons-vue';
+	import {Modal} from 'ant-design-vue';
+	import {createVNode} from 'vue';
+	import Replace from './replaceload.vue'
+	import bizLoadDispatchApi from "@/api/biz/bizLoadDispatchApi";
+	import userApi from '@/api/biz/bizUserApi'
+
+
+	// 抽屉状态
+	const open = ref(false)
+	const emit = defineEmits({ successful: null })
+	const formRef = ref()
+	const tableRef = ref()
+	const replaceRef = ref()
+
+	const numberFlag = ref(false)
+	// 表单数据
+	const formData = ref({})
+	const submitLoading = ref(false)
+
+	//设置表单样式
+	const labelCol = ref({ span: 5})
+	const wrapperCol = ref({ span: 16})
+
+	//订单类型
+	const orderTypeList = tool.dictList('order_type')
+	const goodIdList = ref()
+	const customerIdList = ref()
+	const saleOrderInfoList = ref()
+	const deliveryTimeIdList = ref()
+	const supplierIdList = ref()
+	const loadPointIdList = ref()
+	const loadTimeIdList = ref()
+
+	// 打开抽屉
+	const onOpen = (record) => {
+		console.log("record:"+JSON.stringify(record))
+		open.value = true
+		if (record) {
+			let recordData = cloneDeep(record)
+			formData.value.appointId = record
+			console.log("formData:"+JSON.stringify(formData.value))
+		}
+
+		//装货点位查询
+		bizLoadPointApi.getList({appointType:'1'}).then((res)=>{
+			loadPointIdList.value = res.map((item)=>{
+				return{
+					value:item.id,
+					label:item.loadPoint
+				}
+			})
+		})
+
+		if(formData.value.saleOrderInfo){
+			bizSaleOrderApi.detailById({id:formData.value.saleOrderInfo}).then((res)=>{
+				//根据货品名称和重量查询提货时间段
+				goodsConfApi.getList({goodsName:res.saleGoodsName,goodsCode:res.goodsCode,needWeight:res.saleOrderWeight}).then((res)=>{
+					deliveryTimeIdList.value = res.map((item)=>{
+						return{
+							value:item.id,
+							label:item.confStartTime+'~'+item.confEndTime
+						}
+					})
+				})
+			})
+		}
+
+
+	}
+
+	// 传递设计器需要的API
+	const selectorApiFunction = {
+		orgTreeApi: (param) => {
+			return userApi.userOrgTreeSelector(param).then((data) => {
+				return Promise.resolve(data)
+			})
+		},
+		userPageApi: (param) => {
+			param.roleName = '起卸员'
+			return userApi.userSelectorByRole(param).then((data) => {
+				return Promise.resolve(data)
+			})
+		}
+	}
+
+	//卸货点位点击事件
+	const onChangePoint =(value)=>{
+		formData.value.loadTimeId = ''
+		loadTimeIdList.value = ''
+		formData.value.availableNumber = ''
+		formData.value.alreadyNumber = ''
+		bizLoadTimeApi.searchNow({pointId:formData.value.loadPointId}).then((res)=>{
+			loadTimeIdList.value = res.map((item)=>{
+				return{
+					value:item.id,
+					label:item.beginTime+'~'+item.endTime
+				}
+			})
+		})
+	}
+
+	const onChangeLoadTime = (value) => {
+		bizLoadTimeApi.bizLoadTimeDetail({id:value}).then((res)=>{
+			formData.value.availableNumber = res.availableNumber
+			formData.value.alreadyNumber = res.alreadyNumber
+			//numberFlag.value = true
+		})
+	}
+
+	const loadData = (parameter) => {
+		return bizLoadDispatchApi.getPageList({appointId:formData.value.id,loadType:'1'}).then((data) => {
+			return data
+		})
+	}
+
+	const columns = [
+		{
+			title: '起卸点位',
+			dataIndex: 'loadPoint',
+			align:'center'
+		},
+		{
+			title: '执行人员',
+			dataIndex: 'userName',
+			align:'center'
+		},
+		{
+			title: '开始时间',
+			dataIndex: 'beginTime',
+			align:'center'
+		},
+		{
+			title: '结束时间',
+			dataIndex: 'endTime',
+			align:'center'
+		},
+		/*{
+			title: '可约次数',
+			dataIndex: 'availableNumber',
+			align:'center'
+		},
+		{
+			title: '已约次数',
+			dataIndex: 'alreadyNumber',
+			align:'center'
+		},*/
+	]
+	// 操作栏通过权限判断是否显示
+	columns.push({
+		title: '操作',
+		dataIndex: 'action',
+		align: 'center',
+		width: 150
+	})
+
+
+
+
+	// 关闭抽屉
+	const onClose = () => {
+		formRef.value.resetFields()
+		formData.value = {}
+		open.value = false
+		loadTimeIdList.value = ''
+		numberFlag.value = false
+		emit('successful')
+
+	}
+	// 默认要校验的
+	const formRules = {
+		//orderNumber: [required('请输入订单编号')],
+		//orderName: [required('请输入订单名称')],
+		//customerId:[required('请选择客户信息')],
+		loadPointId:[required('请选择装卸点位')],
+		loadTimeId: [required('请选择装卸时间')],
+		userId: [required('请选择执行人员')],
+	}
+
+
+	// 删除
+	const deleteConfig = (record) => {
+
+		Modal.confirm({
+			title: '确定删除该数据吗?',
+			icon: createVNode(ExclamationCircleOutlined),
+			content: '',
+			onOk() {
+				submitLoading.value = true
+				let params = [
+					{
+						id: record.id
+					}
+				]
+
+				bizLoadDispatchApi
+					.bizLoadDispatchDelete(params)
+					.then(() => {
+						tableRef.value.refresh(true)
+					})
+					.finally(() => {
+						submitLoading.value = false
+					})
+			},
+			onCancel() {}
+		})
+	}
+
+	// 验证并提交数据
+	const onSubmit = () => {
+		formRef.value
+			.validate()
+			.then(() => {
+				submitLoading.value = true
+				const formDataParam = cloneDeep(formData.value)
+				console.log("formDataParam:"+JSON.stringify(formDataParam))
+				bizLoadDispatchApi
+					.bizLoadDispatchSubmitLoad(formDataParam, formDataParam.id)
+					.then(() => {
+						onClose()
+					})
+					.finally(() => {
+						submitLoading.value = false
+					})
+			})
+			.catch(() => {})
+	}
+	// 抛出函数
+	defineExpose({
+		onOpen
+	})
+</script>
+
+<style>
+/* 修改禁用状态下的颜色 */
+.ant-radio-button-wrapper-disabled {
+	color: black !important; /* 设置文字颜色 */
+	background-color: #f0f0f0 !important; /* 设置背景颜色 */
+}
+
+/* 修改禁用状态下选中项的颜色 */
+.ant-radio-button-wrapper-checked.ant-radio-button-wrapper-disabled {
+	color: white !important; /* 设置文字颜色 */
+	background-color: blue !important; /* 设置选中项的背景颜色 */
+}
+</style>

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

@@ -207,11 +207,11 @@
 			dataIndex: 'arriveTime',
 			align:'center'
 		},
-		{
+		/*{
 			title: '起卸数量(吨)',
 			dataIndex: 'fillWeight',
 			align:'center'
-		},
+		},*/
 		{
 			title: '状态',
 			dataIndex: 'status',

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

@@ -230,7 +230,7 @@
 		customerId:[required('请选择客户信息')],
 		saleOrderInfo:[required('请选择订单信息')],
 		deliveryTimeId: [required('请选择提货时间')],
-		orderWeight: [required('请输入订单重量')],
+		//orderWeight: [required('请输入订单重量')],
 		orderType: [required('请选择订单类型')],
 		supplierIdList: [required('请选择供货商信息')],
 		freightPrice: [required('请输入运费单价')],

+ 30 - 0
snowy-admin-web/src/views/biz/bizpipeappoint/index.vue

@@ -57,6 +57,12 @@
 						<template #icon><plus-outlined /></template>
 						新增
 					</a-button>
+					<a-button @click="exportTotal" v-if="hasPerm('bizPipeAppointExport')">
+						<template #icon>
+							<export-outlined/>
+						</template>
+						导出
+					</a-button>
 				</a-space>
 			</template>
 			<template #bodyCell="{ column, record }">
@@ -147,6 +153,7 @@
 	import {Modal} from 'ant-design-vue';
 	import {createVNode} from 'vue';
 	import Detail from "./detail.vue";
+	import downloadUtil from '@/utils/downloadUtil'
 
 	//查询数据
 	const searchFormState = ref({})
@@ -233,6 +240,29 @@
 			return data
 		})
 	}
+
+	//导出
+	const exportTotal = () => {
+		Modal.confirm({
+			title: '确定要导出记录吗?',
+			icon: createVNode(ExclamationCircleOutlined),
+			content: '',
+			onOk() {
+				submitLoading.value = true
+				const searchFormParam = cloneDeep(searchFormState.value)
+				searchFormParam.type = '5'
+				bizAppointmentRecordApi
+					.exportPipeRecord(Object.assign(searchFormParam))
+					.then((res) => {
+						downloadUtil.resultDownload(res)
+					})
+					.finally(() => {
+						submitLoading.value = false
+					})
+			},
+			onCancel() {}
+		})
+	}
 	// 重置
 	const reset = () => {
 		searchFormRef.value.resetFields()

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

@@ -326,6 +326,26 @@ public class BizAppointmentRecordController {
         return CommonResult.data(bizAppointmentRecordService.getLoadPage(bizAppointmentRecordPageParam));
     }
 
+    /**
+     * 导出起卸预约报表
+     */
+    @Operation(summary = "导出起卸预约报表")
+    @SaCheckPermission("/biz/bizappointmentrecord/exportLoadRecord")
+    @GetMapping(value = "/biz/bizappointmentrecord/exportLoadRecord", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
+    public void exportLoadRecord(BizAppointmentRecordPageParam bizAppointmentRecordPageParam, HttpServletResponse response) throws IOException {
+        bizAppointmentRecordService.exportLoadRecord(bizAppointmentRecordPageParam,response);
+    }
+
+    /**
+     * 导出管桩预约报表
+     */
+    @Operation(summary = "导出管桩预约报表")
+    @SaCheckPermission("/biz/bizappointmentrecord/exportPipeRecord")
+    @GetMapping(value = "/biz/bizappointmentrecord/exportPipeRecord", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
+    public void exportPipeRecord(BizAppointmentRecordPageParam bizAppointmentRecordPageParam, HttpServletResponse response) throws IOException {
+        bizAppointmentRecordService.exportPipeRecord(bizAppointmentRecordPageParam,response);
+    }
+
     /**
      * 添加管桩预约
      *

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

@@ -40,5 +40,9 @@ public interface BizAppointmentRecordMapper extends BaseMapper<BizAppointmentRec
 
     Page<BizAppointmentRecord> getLoadPage(@Param("page") Page<BizAppointmentRecord> page,@Param("ew") QueryWrapper<BizAppointmentRecord> ew);
 
+    List<BizAppointmentRecord> getLoadPage(@Param("ew") QueryWrapper<BizAppointmentRecord> ew);
+
     Page<BizAppointmentRecord> getPipePage(@Param("page") Page<BizAppointmentRecord> page,@Param("ew") QueryWrapper<BizAppointmentRecord> ew);
+
+    List<BizAppointmentRecord> getPipePage(@Param("ew") QueryWrapper<BizAppointmentRecord> ew);
 }

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

@@ -15,9 +15,9 @@ public class BizAppointmentExportResult {
     private String orderNumber;
 
     /** 订单名称 */
-    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
+    /*@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
     @ExcelProperty({"预约报表", "订单名称"})
-    private String orderName;
+    private String orderName;*/
 
     /** 车牌号 */
     @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
@@ -45,8 +45,8 @@ public class BizAppointmentExportResult {
 
     /** 货品规格*/
     @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
-    @ExcelProperty({"预约报表", "货品规格"})
-    private String goodsModel;
+    @ExcelProperty({"预约报表", "货品编码"})
+    private String goodsCode;
 
     /** 司机姓名 */
     @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)

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

@@ -0,0 +1,54 @@
+package vip.xiaonuo.biz.modular.bizappointmentrecord.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;
+
+@Data
+public class BizLoadAppointmentExportResult {
+    /** 订单编号 */
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
+    @ExcelProperty({"起卸预约报表", "起卸单号"})
+    private String loadNumber;
+
+    /** 车牌号 */
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
+    @ExcelProperty({"起卸预约报表", "车牌号"})
+    private String licenseNumber;
+
+    /** 客户名称 */
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
+    @ExcelProperty({"起卸预约报表", "客户名称"})
+    private String customerName;
+
+    /** 货品名称*/
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
+    @ExcelProperty({"起卸预约报表", "货品名称"})
+    private String goodsName;
+
+    /** 货品规格*/
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
+    @ExcelProperty({"起卸预约报表", "货品编码"})
+    private String goodsCode;
+
+    /** 司机姓名 */
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
+    @ExcelProperty({"起卸预约报表", "司机姓名"})
+    private String driverName;
+
+    /** 司机电话 */
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
+    @ExcelProperty({"起卸预约报表", "司机电话"})
+    private String driverMobile;
+
+    /** 司机电话 */
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
+    @ExcelProperty({"起卸预约报表", "车辆轴数"})
+    private String axleNumber;
+
+    /** 预约状态*/
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
+    @ExcelProperty({"起卸预约报表", "预约状态"})
+    private String statusName;
+}

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

@@ -0,0 +1,46 @@
+package vip.xiaonuo.biz.modular.bizappointmentrecord.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.util.Date;
+
+@Data
+public class BizPipeAppointmentExportResult {
+    /** 订单编号 */
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
+    @ExcelProperty({"管桩预约报表", "管桩计划单号"})
+    private String planNumber;
+
+    /** 车牌号 */
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
+    @ExcelProperty({"管桩预约报表", "车牌号"})
+    private String licenseNumber;
+
+    /** 司机姓名 */
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
+    @ExcelProperty({"管桩预约报表", "司机姓名"})
+    private String driverName;
+
+    /** 司机电话 */
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
+    @ExcelProperty({"管桩预约报表", "司机电话"})
+    private String driverMobile;
+
+    /** 入场时间 */
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
+    @ExcelProperty({"管桩预约报表", "入场时间"})
+    private Date enterTime;
+
+    /** 出场时间 */
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
+    @ExcelProperty({"管桩预约报表", "出场时间"})
+    private Date leaveTime;
+
+    /** 预约状态*/
+    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 120)
+    @ExcelProperty({"管桩预约报表", "预约状态"})
+    private String statusName;
+}

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

@@ -132,6 +132,9 @@ public interface BizAppointmentRecordService extends IService<BizAppointmentReco
     /**起卸预约编辑*/
     void editLoad(BizAppointmentRecordEditParam bizAppointmentRecordEditParam);
 
+    /**导出起卸报表*/
+    void exportLoadRecord(BizAppointmentRecordPageParam bizAppointmentRecordPageParam, HttpServletResponse response) throws IOException;
+
     /**管桩预约新增*/
     void addPipeAppoint(BizAppointmentRecordAddParam bizAppointmentRecordAddParam);
 
@@ -144,6 +147,9 @@ public interface BizAppointmentRecordService extends IService<BizAppointmentReco
     /**取消管桩预约*/
     void replacePipeAppoint(BizAppointmentRecordEditParam bizAppointmentRecordEditParam);
 
+    /**导出管桩预约报表*/
+    void exportPipeRecord(BizAppointmentRecordPageParam bizAppointmentRecordPageParam, HttpServletResponse response) throws IOException;
+
 
     /**
      * 其他预约_新增

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

@@ -1314,6 +1314,24 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
 
     }
 
+
+    @Override
+    public void exportLoadRecord(BizAppointmentRecordPageParam bizAppointmentRecordPageParam, HttpServletResponse response) throws IOException {
+        QueryWrapper<BizAppointmentRecord> queryWrapper = getQueryWrapper(bizAppointmentRecordPageParam);
+        List<BizAppointmentRecord> recordList = this.getBaseMapper().getLoadPage(queryWrapper);
+        String fileName = "起卸预约报表.xlsx";
+        List<BizLoadAppointmentExportResult> list = Lists.newArrayList();
+        transService.transBatch(recordList);
+        for (BizAppointmentRecord bizAppointmentRecord : recordList) {
+            BizLoadAppointmentExportResult bizAppointmentExportResult = new BizLoadAppointmentExportResult();
+            BeanUtil.copyProperties(bizAppointmentRecord, bizAppointmentExportResult);
+            bizAppointmentExportResult.setStatusName((String) bizAppointmentRecord.getTransMap().get("statusName"));
+            bizAppointmentExportResult.setAxleNumber(bizAppointmentRecord.getAxleNumber() + "轴");
+            list.add(bizAppointmentExportResult);
+        }
+        CommonExportUtil.export(fileName, BizLoadAppointmentExportResult.class, list, response, "起卸预约报表");
+    }
+
     @Transactional
     @Override
     public void addPipeAppoint(BizAppointmentRecordAddParam bizAppointmentRecordAddParam) {
@@ -1552,6 +1570,23 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
 
     }
 
+    @Override
+    public void exportPipeRecord(BizAppointmentRecordPageParam bizAppointmentRecordPageParam, HttpServletResponse response) throws IOException {
+        QueryWrapper<BizAppointmentRecord> queryWrapper = getQueryWrapper(bizAppointmentRecordPageParam);
+        List<BizAppointmentRecord> recordList = this.getBaseMapper().getPipePage(queryWrapper);
+        String fileName = "管桩预约报表.xlsx";
+        List<BizPipeAppointmentExportResult> list = Lists.newArrayList();
+        transService.transBatch(recordList);
+        for (BizAppointmentRecord bizAppointmentRecord : recordList) {
+            BizPipeAppointmentExportResult bizAppointmentExportResult = new BizPipeAppointmentExportResult();
+            BeanUtil.copyProperties(bizAppointmentRecord, bizAppointmentExportResult);
+            bizAppointmentExportResult.setStatusName((String) bizAppointmentRecord.getTransMap().get("statusName"));
+            list.add(bizAppointmentExportResult);
+        }
+        CommonExportUtil.export(fileName, BizPipeAppointmentExportResult.class, list, response, "管桩预约报表");
+    }
+
+
     @Override
     public void bizOtherAppointmentExit(BizAppointmentRecordIdParam bizAppointmentRecordIdParam) {
         BizAppointmentRecord bizAppointmentRecord = this.queryEntity(bizAppointmentRecordIdParam.getId());

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

@@ -122,6 +122,17 @@ public class BizLoadDispatchServiceImpl extends ServiceImpl<BizLoadDispatchMappe
 
         }
 
+        long count1 = this.count(new QueryWrapper<BizLoadDispatch>().lambda().
+                eq(BizLoadDispatch::getAppointId, bizLoadDispatchAddParam.getAppointId()).
+                eq(BizLoadDispatch::getLoadType, type));
+        if(count1>0){
+            if(StringUtils.equals(type,"1")){
+                throw new CommonException("已添加过起卸调度!");
+            }else{
+                throw new CommonException("已添加过装卸调度!");
+            }
+        }
+
         //判断是否添加过多个执行人员
         long userCount = this.count(new QueryWrapper<BizLoadDispatch>().lambda().
                 eq(BizLoadDispatch::getAppointId, bizLoadDispatchAddParam.getAppointId()).