Procházet zdrojové kódy

临时预约及优化

fanzherong_v před 10 hodinami
rodič
revize
bde9925652
33 změnil soubory, kde provedl 1189 přidání a 69 odebrání
  1. 8 0
      snowy-admin-web/src/api/biz/bizAppointmentRecordApi.js
  2. 121 0
      snowy-admin-web/src/views/biz/bizAppointmentTemporary/detail.vue
  3. 144 0
      snowy-admin-web/src/views/biz/bizAppointmentTemporary/form.vue
  4. 509 0
      snowy-admin-web/src/views/biz/bizAppointmentTemporary/index.vue
  5. 65 0
      snowy-admin-web/src/views/biz/bizAppointmentTemporary/review.vue
  6. 2 1
      snowy-admin-web/src/views/biz/bizappointmentrecord/index.vue
  7. 10 0
      snowy-admin-web/src/views/biz/bizconfig/form.vue
  8. 8 0
      snowy-admin-web/src/views/biz/bizconfig/index.vue
  9. 1 0
      snowy-admin-web/src/views/biz/bizorder/form.vue
  10. 4 2
      snowy-admin-web/src/views/biz/bizorder/index.vue
  11. 1 1
      snowy-admin-web/src/views/biz/bizsendrecord/index.vue
  12. 1 1
      snowy-admin-web/src/views/biz/record/index.vue
  13. 7 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizaccessrecord/service/impl/BizAccessRecordServiceImpl.java
  14. 44 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/controller/BizAppointmentRecordController.java
  15. 9 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/entity/BizAppointmentRecord.java
  16. 4 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/mapper/mapping/BizAppointmentRecordMapper.xml
  17. 6 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/param/BizAppointmentRecordAddParam.java
  18. 6 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/param/BizAppointmentRecordEditParam.java
  19. 4 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/param/BizAppointmentRecordPageParam.java
  20. 15 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/service/BizAppointmentRecordService.java
  21. 127 5
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/service/impl/BizAppointmentRecordServiceImpl.java
  22. 3 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizconfig/entity/BizConfig.java
  23. 3 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizconfig/param/BizConfigAddParam.java
  24. 3 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizconfig/param/BizConfigEditParam.java
  25. 3 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorder/entity/BizOrder.java
  26. 2 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorder/mapper/mapping/BizOrderMapper.xml
  27. 3 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorder/param/BizOrderAddParam.java
  28. 3 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorder/param/BizOrderEditParam.java
  29. 3 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizsaleorder/entity/BizSaleOrder.java
  30. 3 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizsaleorder/param/BizSaleOrderAddParam.java
  31. 3 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizsaleorder/param/BizSaleOrderEditParam.java
  32. 61 55
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizsaleorder/service/impl/BizSaleOrderServiceImpl.java
  33. 3 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/entity/BizRecord.java

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

@@ -17,6 +17,10 @@ export default {
 	bizAppointmentRecordSubmitForm(data, edit = false) {
 		return request(edit ? 'edit' : 'add', data)
 	},
+	//临时预约
+	bizAppointmentTempSubmitForm(data, edit = false) {
+		return request(edit ? 'editTemp' : 'addTemp', data)
+	},
 	// 删除预约记录
 	bizAppointmentRecordDelete(data) {
 		return request('delete', data)
@@ -29,6 +33,10 @@ export default {
 	auditRecord(data){
 		return request('auditRecord',data)
 	},
+	//审核临时预约
+	auditTemp(data){
+		return request('auditTemp',data)
+	},
 	//导出
 	exportRecord(data){
 		return request('exportRecord', data, 'get', {

+ 121 - 0
snowy-admin-web/src/views/biz/bizAppointmentTemporary/detail.vue

@@ -0,0 +1,121 @@
+<template>
+	<xn-form-container title="详情" :width="900" :visible="visible" :destroy-on-close="true" @close="onClose">
+		<a-form ref="formRef" :model="formData" :label-col="labelCol4" :wrapper-col="wrapperCol20">
+			<a-descriptions :column="4" size="middle" bordered class="mb-2" :label-style="labelStyle" :contentStyle="contentStyle">
+				<a-descriptions-item label="车牌号" :span="2">{{ formData.licenseNumber }}</a-descriptions-item>
+				<a-descriptions-item label="司机姓名" :span="2">{{ formData.driverName }}</a-descriptions-item>
+				<a-descriptions-item label="司机电话" :span="2">{{ formData.driverMobile }}</a-descriptions-item>
+
+				<a-descriptions-item label="预约状态" :span="2">
+					<a-tag
+						:color="
+							formData.status === '1'
+								? 'volcano'
+								: formData.status === '2'
+								  ? 'red'
+								  : formData.status === '3'
+								  ? 'processing'
+								  : formData.status === '4'
+								  ? 'warning'
+								  : formData.status === '5'
+								  ? 'magenta'
+								  : formData.status === '6'
+								  ? 'orange'
+								  : formData.status === '7'
+								  ? 'gold'
+								   : formData.status === '8'
+								  ? 'lime'
+								   : formData.status === '9'
+								  ? 'green'
+								  : formData.status === '10'
+								  ? 'cyan'
+								  : formData.status === '11'
+								  ? 'success'
+								  : formData.status === '12'
+								  ? 'blue'
+								  : formData.status === '13'
+								  ? 'geekblue'
+								  : 'error'
+						"
+					>
+						{{ $TOOL.dictTypeData('appointment_status', formData.status) }}
+					</a-tag>
+				</a-descriptions-item>
+				<a-descriptions-item label="预约分类" :span="4">{{ $TOOL.dictTypeData('appointment_classify', formData.appointmentClassify) }}</a-descriptions-item>
+				<a-descriptions-item label="审核备注" :span="4">{{ formData.appointmentReason }}</a-descriptions-item>
+			</a-descriptions>
+		</a-form>
+	</xn-form-container>
+</template>
+
+<script setup name="recordDoubleForm">
+	import { cloneDeep } from 'lodash-es'
+	import sysConfig from "@/config";
+	// 默认是关闭状态
+	const visible = ref(false)
+	const formData = ref({})
+	const table = ref()
+	const resultJson = ref()
+
+	const labelStyle = {
+		width: '20%'
+	}
+	const contentStyle = {
+		width: '30%'
+	}
+
+	const labelCol4 = ref({span: 4, style: 'width: 26%; line-height: 20px; white-space: normal',})
+	const labelCol8 = ref({span: 8, style: 'width: 26%; line-height: 20px; white-space: normal',})
+	const wrapperCol20 = ref({span: 20})
+
+	const fileList = ref([])
+	// 打开抽屉
+	const onOpen = (record) => {
+		visible.value = true
+		//getRecordDoubleDetail(record)
+		if(record){
+			let recordData = cloneDeep(record)
+			formData.value = Object.assign({}, recordData)
+			fileList.value = []
+			if(formData.value.unloadImg!=null){
+				for (var i=0;i<formData.value.unloadImg.split(',').length;i++){
+					fileList.value.push({
+						name: formData.value.unloadName.split(',')[i],
+						url:sysConfig.PREVIEW_PATH + formData.value.unloadImg.split(',')[i]
+					})
+				}
+			}
+		}
+
+	}
+	const getRecordDoubleDetail = (record) => {
+		const param = {
+			id: record.id
+		}
+		tbRecordDoubleApi.recordDoubleDetailPic(param).then((data) => {
+			Object.assign(record, data)
+			formData.value = record
+		})
+	}
+	// 关闭抽屉
+	const onClose = () => {
+		resultJson.value = ''
+		visible.value = false
+	}
+
+	// 调用这个函数将子组件的一些数据和方法暴露出去
+	defineExpose({
+		onOpen
+	})
+</script>
+
+<style scoped>
+	.imgDiv ::v-deep .ant-image {
+		margin-left: 20px;
+		margin-top: 10px;
+	}
+	.imgDiv ::v-deep .ant-image-mask-info {
+		margin-left: 20px;
+		margin-top: 10px;
+	}
+</style>

+ 144 - 0
snowy-admin-web/src/views/biz/bizAppointmentTemporary/form.vue

@@ -0,0 +1,144 @@
+<template>
+	<xn-form-container
+		:title="formData.id ? '编辑预约记录' : '增加预约记录'"
+		:width="700"
+		v-model:open="open"
+		:destroy-on-close="true"
+		@close="onClose"
+	>
+		<a-form ref="formRef" :model="formData" :rules="formRules" :wrapper-col="wrapperCol" :label-col="labelCol">
+			<a-form-item label="预约分类:" name="appointmentClassify">
+				<a-select v-model:value="formData.appointmentClassify" placeholder="请选择预约分类"
+						  :options="appointmentClassifyList"
+				> </a-select>
+			</a-form-item>
+			<a-form-item label="车牌号:" name="licenseNumber">
+				<a-input v-model:value="formData.licenseNumber" placeholder="请输入车牌号" allow-clear />
+			</a-form-item>
+<!--			<a-form-item label="预约时段:" name="timeId">
+				<a-select v-model:value="formData.timeId" placeholder="请选择预约时段"
+						  :options="timeIdList"
+				> </a-select>
+			</a-form-item>-->
+<!--			<a-form-item label="车辆轴数:" name="overId">
+				<a-select v-model:value="formData.overId" placeholder="请选择车辆轴数"
+						  :options="overIdList"
+				> </a-select>
+			</a-form-item>-->
+			<a-form-item label="司机姓名:" name="driverName">
+				<a-input v-model:value="formData.driverName" placeholder="请输入司机姓名" allow-clear />
+			</a-form-item>
+			<a-form-item label="司机电话:" name="driverMobile">
+				<a-input v-model:value="formData.driverMobile" placeholder="请输入司机电话" 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="bizAppointmentRecordForm">
+	import { cloneDeep } from 'lodash-es'
+	import { required } from '@/utils/formRules'
+	import bizAppointmentRecordApi from '@/api/biz/bizAppointmentRecordApi'
+	import bizAppointmentTimeApi from "@/api/biz/bizAppointmentTimeApi";
+	import bizOrderApi from '@/api/biz/bizOrderApi'
+	import bizExcessConfigApi from "@/api/biz/bizExcessConfigApi";
+	import tool from '@/utils/tool'
+
+	// 抽屉状态
+	const open = ref(false)
+	const emit = defineEmits({ successful: null })
+	const formRef = ref()
+	// 表单数据
+	const formData = ref({})
+	const submitLoading = ref(false)
+	const orderIdList = ref()
+	const timeIdList = ref()
+	const overIdList = ref()
+
+	//设置表单样式
+	const labelCol = ref({ span: 5})
+	const wrapperCol = ref({ span: 16})
+
+	const appointmentClassifyList = tool.dictList('appointment_classify')
+
+	// 打开抽屉
+	const onOpen = (record) => {
+		open.value = true
+		if (record) {
+			let recordData = cloneDeep(record)
+			formData.value = Object.assign({}, recordData)
+		}
+		//查询订单信息
+		bizOrderApi.getList().then((res)=>{
+			orderIdList.value = res.map((item)=>{
+				return{
+					value:item.id,
+					label:item.orderNumber
+				}
+			})
+		})
+
+		//查询预约时段下拉
+		/*bizAppointmentTimeApi.getDownList().then((res)=>{
+			timeIdList.value = res.map((item)=>{
+				return{
+					value:item.id,
+					label:item.beginTime + '-' + item.endTime
+				}
+			})
+		})*/
+
+		//查询车辆轴数
+		bizExcessConfigApi.getList().then((res)=>{
+			overIdList.value = res.map((item)=>{
+				return{
+					value:item.id,
+					label:item.vehicleAxleNumber+'轴'
+				}
+			})
+		})
+	}
+	// 关闭抽屉
+	const onClose = () => {
+		formRef.value.resetFields()
+		formData.value = {}
+		open.value = false
+	}
+	// 默认要校验的
+	const formRules = {
+		appointmentClassify:[required('请选择预约分类')],
+		orderId: [required('请选择订单信息')],
+		licenseNumber: [required('请输入车牌号')],
+		//timeId: [required('请选择预约时段')],
+		overId: [required('请选择车辆轴数')],
+		driverName:[required('请输入司机姓名')],
+		driverMobile:[required('请输入司机电话')],
+	}
+	// 验证并提交数据
+	const onSubmit = () => {
+		formRef.value
+			.validate()
+			.then(() => {
+				submitLoading.value = true
+				const formDataParam = cloneDeep(formData.value)
+				bizAppointmentRecordApi
+					.bizAppointmentTempSubmitForm(formDataParam, formDataParam.id)
+					.then(() => {
+						onClose()
+						emit('successful')
+					})
+					.finally(() => {
+						submitLoading.value = false
+					})
+			})
+			.catch(() => {})
+	}
+	// 抛出函数
+	defineExpose({
+		onOpen
+	})
+</script>

+ 509 - 0
snowy-admin-web/src/views/biz/bizAppointmentTemporary/index.vue

@@ -0,0 +1,509 @@
+<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="licenseNumber">
+						<a-input v-model:value="searchFormState.licenseNumber" placeholder="车牌号码查询" />
+					</a-form-item>
+				</a-col>
+				<a-col :span="6">
+					<a-form-item label="司机电话" name="driverMobile">
+						<a-input v-model:value="searchFormState.driverMobile" placeholder="司机电话查询" />
+					</a-form-item>
+				</a-col>
+				<a-col :span="6">
+					<a-form-item label="预约分类" name="appointmentClassify">
+						<a-select v-model:value="searchFormState.appointmentClassify" placeholder="预约分类查询"
+								  :options="appointmentClassifyList"
+						> </a-select>
+					</a-form-item>
+				</a-col>
+				<template v-if="advanced">
+
+
+
+
+				</template>
+				<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="primary" @click="formRef.onOpen()" v-if="hasPerm('bizAppointmentTempAdd')">
+						<template #icon><plus-outlined /></template>
+						新增
+					</a-button>
+					<a-button @click="exportTotal" v-if="hasPerm('bizAppointmentExport')">
+						<template #icon>
+							<export-outlined/>
+						</template>
+						导出
+					</a-button>
+				</a-space>
+			</template>
+			<template #bodyCell="{ column, record }">
+				<template v-if="column.dataIndex === 'appointmentClassify'">
+					{{$TOOL.dictTypeData('appointment_classify', record.appointmentClassify)}}
+				</template>
+				<template v-if="column.dataIndex === 'status'">
+					<a-tag
+						:color="
+							record.status === '1'
+								? 'volcano'
+								: record.status === '2'
+								  ? 'red'
+								  : record.status === '3'
+								  ? 'processing'
+								  : record.status === '4'
+								  ? 'warning'
+								  : record.status === '5'
+								  ? 'magenta'
+								  : record.status === '6'
+								  ? 'orange'
+								  : record.status === '7'
+								  ? 'gold'
+								   : record.status === '8'
+								  ? 'lime'
+								   : record.status === '9'
+								  ? 'green'
+								  : record.status === '10'
+								  ? 'cyan'
+								  : record.status === '11'
+								  ? 'success'
+								  : record.status === '12'
+								  ? 'blue'
+								  : record.status === '13'
+								  ? 'geekblue'
+								  : 'error'
+						"
+					>
+						{{ $TOOL.dictTypeData('appointment_status', record.status) }}
+					</a-tag>
+				</template>
+				<template v-if="column.dataIndex === 'action'">
+					<a @click="showModal(record)" v-if="record.status!='1'&& record.status!='2' && record.status!='10' && record.status!='11'&&
+						record.status!='12' && record.status!='13' && record.status!='14' && record.status!='15'">二维码</a>
+
+					<a-divider type="vertical" v-if="record.status!='1'&& record.status!='2' && record.status!='10' && record.status!='11'&&
+						record.status!='12' && record.status!='13' && record.status!='14' && record.status!='15'"/>
+
+					<a-space>
+						<a-dropdown>
+							<a class="ant-dropdown-link">
+								更多
+								<DownOutlined />
+							</a>
+
+							<template #overlay>
+								<a-menu>
+									<a-menu-item>
+										<a @click="detailRef.onOpen(record)">详情</a>
+									</a-menu-item>
+									<a-menu-item v-if="hasPerm('bizAppointmentAuditTemp') && (record.status == '1')">
+										<a style="color: #ffaa00" @click="reviewRef.showModal(record.id)">审核</a>
+									</a-menu-item>
+									<a-menu-item v-if="hasPerm('bizAppointmentTempEdit') && (record.status == '2')">
+										<a style="color:blue" @click="formRef.onOpen(record)" >编辑</a>
+									</a-menu-item>
+									<a-menu-item v-if="hasPerm('bizAppointmentTempDelete') && (record.status == '2' || record.status=='4')">
+										<a style="color:red" type="link" danger size="small" @click="deleteConfig(record)">删除</a>
+									</a-menu-item>
+
+
+								</a-menu>
+							</template>
+						</a-dropdown>
+					</a-space>
+				</template>
+			</template>
+		</s-table>
+	</a-card>
+	<Form ref="formRef" @successful="tableRef.refresh()" />
+	<Review ref="reviewRef" @successful="tableRef.refresh(true)" />
+	<Detail ref="detailRef" @successful="tableRef.refresh()" />
+	<Sign ref="signRef" @successful="tableRef.refresh(true)" />
+
+	<XnSignName ref="XnSignNameRef" :image="searchFormState.driverSign" @successful="signSuccess" />
+	<a-modal v-model:visible="open" title="二维码" width="600px" style="height: 700px">
+		<div id="qrcode" style="text-align: center; margin:  15px 5px 15px 5px">
+			<a-row>
+				<a-col :span="13" id="colFlag">
+					<div style="margin-top:10px;font-size:16px;">
+						<p id="projectNameFlag">车牌号:{{nowRecord.licenseNumber}}</p>
+						<p id="projectCodeFlag">司机姓名:{{ nowRecord.driverName }}</p>
+						<p id="projectCodeFlag">司机电话:{{ nowRecord.driverMobile }}</p>
+						<p id="projectCodeFlag">预约分类:{{ $TOOL.dictTypeData('appointment_classify', nowRecord.appointmentClassify) }}</p>
+						<p id="projectCodeFlag">预约状态:{{ $TOOL.dictTypeData('appointment_status', nowRecord.status) }}</p>
+					</div>
+				</a-col>
+				<a-col :span="11">
+					<a-image width="250"  height="100%" :src="qrCodeUrl.codeUrl"></a-image>
+				</a-col>
+			</a-row>
+		</div>
+		<template #footer>
+			<a-button @click="closeQrCode">关闭</a-button>
+			<a-button type="primary" @click="downloadFile">下载</a-button>
+		</template>
+	</a-modal>
+</template>
+
+<script setup name="bizappointmentrecord">
+	import { cloneDeep } from 'lodash-es'
+	import Form from './form.vue'
+	import Detail from './detail.vue'
+	import bizAppointmentRecordApi from '@/api/biz/bizAppointmentRecordApi'
+	import {ExclamationCircleOutlined} from '@ant-design/icons-vue';
+	import {Modal} from 'ant-design-vue';
+	import {createVNode} from 'vue';
+	import tool from '@/utils/tool'
+	import QRCode from 'qrcode'
+	import html2canvas from 'html2canvas'
+	import downloadUtil from '@/utils/downloadUtil'
+	import bizRecordApi from '@/api/biz/bizRecordApi'
+	import bizOrderApi from "@/api/biz/bizOrderApi";
+	import Review from './review.vue'
+
+	const submitLoading = ref(false)
+	const tableRef = ref()
+	const signRef = ref()
+	const formRef = ref()
+	const reviewRef = ref()
+	const detailRef = ref()
+	const toolConfig = { refresh: true, height: true, columnSetting: true, striped: false }
+
+	const nowRecord = ref()
+	const XnSignNameRef = ref()
+
+	const appointmentClassifyList = tool.dictList('appointment_classify')
+
+	//查询数据
+	const searchFormState = ref({})
+	const searchFormRef = ref()
+	const statusList = tool.dictList('appointment_status')
+
+	// 查询区域显示更多控制
+	const advanced = ref(false)
+	const toggleAdvanced = () => {
+		advanced.value = !advanced.value
+	}
+
+	const columns = [
+		/*{
+			title: '订单信息',
+			dataIndex: 'orderInfo',
+			width:200
+		},*/
+		/*{
+			title: '订单编号',
+			dataIndex: 'orderNumber',
+			align:'center',
+			width:150
+		},*/
+		{
+			title: '车牌号',
+			dataIndex: 'licenseNumber',
+			width:150,
+			align: 'center'
+		},
+		/*{
+			title: '提货时间',
+			dataIndex: 'timeInfo',
+			align:'center',
+			width:200
+		},
+		{
+			title: '客户名称',
+			dataIndex: 'customerInfo',
+			align:'center',
+			width:180
+		},
+		{
+			title: '货品信息',
+			dataIndex: 'goodsInfo',
+			width:160
+		},*/
+		{
+			title: '司机姓名',
+			dataIndex: 'driverName',
+			width: 160,
+			align: 'center'
+		},
+		{
+			title: '司机电话',
+			dataIndex: 'driverMobile',
+			width: 160,
+			align: 'center'
+		},
+		{
+			title: '预约分类',
+			dataIndex: 'appointmentClassify',
+			width: 110,
+			align:'center'
+		},
+		{
+			title: '状态',
+			dataIndex: 'status',
+			align: 'center',
+			width:130
+		},
+	]
+	// 操作栏通过权限判断是否显示
+	columns.push({
+		title: '操作',
+		dataIndex: 'action',
+		align: 'center',
+		width: 150,
+
+	})
+
+	const selectedRowKeys = ref([])
+	// 列表选择配置
+	const options = {
+		// columns数字类型字段加入 needTotal: true 可以勾选自动算账
+		alert: {
+			show: true,
+			clear: () => {
+				selectedRowKeys.value = ref([])
+			}
+		},
+		rowSelection: {
+			onChange: (selectedRowKey, selectedRows) => {
+				selectedRowKeys.value = selectedRowKey
+			}
+		}
+	}
+	const loadData = (parameter) => {
+		const searchFormParam = cloneDeep(searchFormState.value)
+		searchFormParam.type = '2'
+		return bizAppointmentRecordApi.bizAppointmentRecordPage(Object.assign(parameter, searchFormParam)).then((data) => {
+			return data
+		})
+	}
+	// 重置
+	const reset = () => {
+		searchFormRef.value.resetFields()
+		tableRef.value.refresh(true)
+	}
+	// 删除
+	const deleteBizAppointmentRecord = (record) => {
+		let params = [
+			{
+				id: record.id
+			}
+		]
+		bizAppointmentRecordApi.bizAppointmentRecordDelete(params).then(() => {
+			tableRef.value.refresh(true)
+		})
+	}
+	// 删除
+	const deleteConfig = (record) => {
+
+		Modal.confirm({
+			title: '确定删除该数据吗?',
+			icon: createVNode(ExclamationCircleOutlined),
+			content: '',
+			onOk() {
+				submitLoading.value = true
+				let params = [
+					{
+						id: record.id
+					}
+				]
+
+				bizAppointmentRecordApi
+					.bizAppointmentRecordDelete(params)
+					.then(() => {
+						tableRef.value.refresh(true)
+					})
+					.finally(() => {
+						submitLoading.value = false
+					})
+			},
+			onCancel() {}
+		})
+	}
+	// 批量删除
+	const deleteBatchBizAppointmentRecord = (params) => {
+		bizAppointmentRecordApi.bizAppointmentRecordDelete(params).then(() => {
+			tableRef.value.clearRefreshSelected()
+		})
+	}
+
+	//二维码
+	const open = ref(false);
+	const qrCodeUrl = ref({})
+	const showModal = (record) => {
+		nowRecord.value = record
+		open.value = true;
+		getQrCode(record)
+
+	};
+
+	const getQrCode = (record) => {
+		//QRCode.toDataURL("id:"+record.id+"saleCode:"+record.saleCode, {
+		let param = {
+			id:record.id,
+			licenseNumber:record.licenseNumber
+		}
+		QRCode.toDataURL(JSON.stringify(param), {
+			errorCorrectionLevel: 'H',
+			margin: 1,
+			height: 206,
+			width: 206,
+			type: '10',
+			scal: 177,
+			color: {
+				dark: '#000' // 二维码背景颜色
+			},
+			rendererOpts: {
+				quality: 0.9
+			}
+		})
+			.then((url) => {
+				qrCodeUrl.value.codeUrl = url
+			})
+			.catch((err) => {
+				console.error(err)
+			})
+	}
+
+	const closeQrCode = () => {
+		open.value = false;
+	}
+
+	// 下载二维码
+	const downloadFile = () => {
+		const qrcodeDiv = document.getElementById('qrcode');
+		html2canvas(qrcodeDiv, {
+			logging: false,
+			allowTaint: true,
+			scale: window.devicePixelRatio,
+			scrollY: 0,
+			scrollX: 0,
+			useCORS: true,
+			backgroundColor: '#ffffff'
+		})
+			.then(function (canvas) {
+				const a = window.document.createElement('a')
+				a.href = canvas.toDataURL('image/png')
+				a.download = '二维码'
+				a.click()
+				this.$message.success('正在进行下载保存')
+			})
+			.catch((err) => {
+				console.log(err)
+			})
+	}
+
+
+	//导出
+	const exportTotal = () => {
+		/*const searchFormParam = cloneDeep(searchFormState.value)
+		bizAppointmentRecordApi.exportRecord(Object.assign(searchFormParam)).then((res)=>{
+			downloadUtil.resultDownload(res)
+		})*/
+		Modal.confirm({
+			title: '确定要导出记录吗?',
+			icon: createVNode(ExclamationCircleOutlined),
+			content: '',
+			onOk() {
+				submitLoading.value = true
+				const searchFormParam = cloneDeep(searchFormState.value)
+
+				bizAppointmentRecordApi
+					.exportRecord(Object.assign(searchFormParam))
+					.then((res) => {
+						downloadUtil.resultDownload(res)
+					})
+					.finally(() => {
+						submitLoading.value = false
+					})
+			},
+			onCancel() {}
+		})
+	}
+
+	// 签名板组件回调
+	const signSuccess = (value) => {
+		const param = {
+			id:value.id,
+			driverSign: value.value
+		}
+		bizRecordApi.updateDriverSign(param).then(() => {
+			tableRef.value.refresh(true)
+		})
+	}
+</script>
+
+<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;
+		}
+	}
+}
+</style>

+ 65 - 0
snowy-admin-web/src/views/biz/bizAppointmentTemporary/review.vue

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

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

@@ -113,7 +113,7 @@
 				<template v-if="column.dataIndex === 'goodsInfo'">
 					<div class="time-list">
 						<p>名称:{{ record.goodsName }}</p>
-						<p style="margin-bottom: 0">规格:{{ record.goodsModel }}</p>
+						<p style="margin-bottom: 0">编码:{{ record.goodsCode }}</p>
 					</div>
 				</template>
 				<template v-if="column.dataIndex === 'axleNumber'">
@@ -348,6 +348,7 @@
 	}
 	const loadData = (parameter) => {
 		const searchFormParam = cloneDeep(searchFormState.value)
+		searchFormParam.type = '1'
 		return bizAppointmentRecordApi.bizAppointmentRecordPage(Object.assign(parameter, searchFormParam)).then((data) => {
 			return data
 		})

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

@@ -62,6 +62,16 @@
 					</a-radio-button>
 				</a-radio-group>
 			</a-form-item>
+			<a-form-item label="临时预约审核开关:" name="temporaryAuditSwitch">
+				<a-radio-group button-style="solid" v-model:value="formData.temporaryAuditSwitch">
+					<a-radio-button value="1">
+						开启
+					</a-radio-button>
+					<a-radio-button value="2">
+						关闭
+					</a-radio-button>
+				</a-radio-group>
+			</a-form-item>
 		</a-form>
 		<template #footer>
 			<a-button style="margin-right: 8px" @click="onClose">关闭</a-button>

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

@@ -50,6 +50,9 @@
 				<template v-if="column.dataIndex === 'lineNoticeSwitch'">
 					{{ $TOOL.dictTypeData('biz_switch', record.lineNoticeSwitch) }}
 				</template>
+				<template v-if="column.dataIndex === 'temporaryAuditSwitch'">
+					{{ $TOOL.dictTypeData('biz_switch', record.temporaryAuditSwitch) }}
+				</template>
 			</template>
 		</s-table>
 	</a-card>
@@ -115,6 +118,11 @@
 			dataIndex: 'lineNoticeSwitch',
 			align:'center'
 		},
+		{
+			title: '临时预约审核开关',
+			dataIndex: 'temporaryAuditSwitch',
+			align:'center'
+		},
 	]
 	// 操作栏通过权限判断是否显示
 	columns.push({

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

@@ -161,6 +161,7 @@
 			formData.value.goodsCode = res.saleGoodsCode
 			formData.value.orderWeight = res.saleOrderWeight
 			formData.value.orderType = res.saleOrderType
+			formData.value.shipAddress = res.shipAddress
 			formData.value.deliveryTimeId = ''
 			//根据货品名称和重量查询提货时间段
 			console.log("goodsName:"+formData.value.goodsName)

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

@@ -213,11 +213,12 @@
 			<a-row>
 				<a-col :span="13" id="colFlag">
 					<div style="margin-top:10px;font-size:16px;">
-						<p id="projectNameFlag">订单名称:{{nowRecord.orderName}}</p>
+<!--						<p id="projectNameFlag">订单名称:{{nowRecord.orderName}}</p>-->
 						<p id="projectCodeFlag">订单编码:{{ nowRecord.orderNumber }}</p>
 						<p id="projectCodeFlag">客户名称:{{ nowRecord.customerName }}</p>
 						<p id="projectCodeFlag">货品名称:{{ nowRecord.goodsName }}</p>
 						<p id="projectCodeFlag">提货时间:{{ nowRecord.confStartTime+'~'+nowRecord.confEndTime }}</p>
+						<p id="projectCodeFlag">送货地址:{{ nowRecord.shipAddress }}</p>
 					</div>
 				</a-col>
 				<a-col :span="11">
@@ -567,7 +568,8 @@
 		//QRCode.toDataURL("id:"+record.id+"saleCode:"+record.saleCode, {
 		let param = {
 			id:record.id,
-			orderName:record.orderName
+			orderName:record.orderName,
+			type:'1'
 		}
 		QRCode.toDataURL(JSON.stringify(param), {
 			errorCorrectionLevel: 'H',

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

@@ -157,7 +157,7 @@
 				<template v-if="column.dataIndex === 'goods'">
 					<div class="time-list">
 						<p>名称:{{ record.goodsName }}</p>
-						<p style="margin-bottom: 0">规格:{{ record.goodsModel }}</p>
+						<p style="margin-bottom: 0">编码:{{ record.goodsModel }}</p>
 					</div>
 				</template>
 

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

@@ -157,7 +157,7 @@
 				<template v-if="column.dataIndex === 'goods'">
 					<div class="time-list">
 						<p>名称:{{ record.goodsName }}</p>
-						<p style="margin-bottom: 0">规格:{{ record.goodsModel }}</p>
+						<p style="margin-bottom: 0">编码:{{ record.goodsModel }}</p>
 					</div>
 				</template>
 

+ 7 - 1
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizaccessrecord/service/impl/BizAccessRecordServiceImpl.java

@@ -76,7 +76,13 @@ public class BizAccessRecordServiceImpl extends ServiceImpl<BizAccessRecordMappe
         if(ObjectUtil.isNotNull(appointmentRecord)){
             if(StringUtils.equals(bizAccessRecord.getInOutFactory(),"1")){
                 //进场 待入场->已入场
-                appointmentRecord.setStatus("5");
+                if(StringUtils.equals(appointmentRecord.getAppointmentType(),"1")){
+                    appointmentRecord.setStatus("5");
+                }else{
+                    //临时预约
+                    appointmentRecord.setStatus("9");
+                }
+
             }else{
                 //出场 待出场->已出场
                 appointmentRecord.setStatus("10");

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

@@ -85,6 +85,22 @@ public class BizAppointmentRecordController {
         return CommonResult.ok();
     }
 
+
+    /**
+     * 添加临时预约记录
+     *
+     * @author fanzherong
+     * @date  2025/03/24 14:47
+     */
+    @Operation(summary = "添加临时预约记录")
+    @CommonLog("添加临时预约记录")
+    @CommonNoRepeat
+    @PostMapping("/biz/bizappointmentrecord/addTemp")
+    public CommonResult<String> addTemp(@RequestBody @Valid BizAppointmentRecordAddParam bizAppointmentRecordAddParam) {
+        bizAppointmentRecordService.addTemp(bizAppointmentRecordAddParam);
+        return CommonResult.ok();
+    }
+
     /**
      * 编辑预约记录
      *
@@ -99,6 +115,20 @@ public class BizAppointmentRecordController {
         return CommonResult.ok();
     }
 
+    /**
+     * 编辑临时预约记录
+     *
+     * @author fanzherong
+     * @date  2025/03/24 14:47
+     */
+    @Operation(summary = "编辑临时预约记录")
+    @CommonLog("编辑临时预约记录")
+    @PostMapping("/biz/bizappointmentrecord/editTemp")
+    public CommonResult<String> editTemp(@RequestBody @Valid BizAppointmentRecordEditParam bizAppointmentRecordEditParam) {
+        bizAppointmentRecordService.editTemp(bizAppointmentRecordEditParam);
+        return CommonResult.ok();
+    }
+
     /**
      * 删除预约记录
      *
@@ -141,6 +171,20 @@ public class BizAppointmentRecordController {
         return CommonResult.ok();
     }
 
+    /**
+     * 审核临时预约
+     *
+     * @author fanzherong
+     * @date  2025/03/24 14:47
+     */
+    @Operation(summary = "审核临时预约")
+    @CommonLog("审核临时预约")
+    @PostMapping("/biz/bizappointmentrecord/auditTemp")
+    public CommonResult<String> auditTemp(@RequestBody @Valid BizAppointmentRecordEditParam bizAppointmentRecordEditParam) {
+        bizAppointmentRecordService.auditTemp(bizAppointmentRecordEditParam);
+        return CommonResult.ok();
+    }
+
 
     /**
      * 导出预约报表

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

@@ -147,4 +147,13 @@ public class BizAppointmentRecord extends CommonEntity {
 
     @TableField(exist = false)
     private String auditSign;
+
+    @TableField(exist = false)
+    private String goodsCode;
+
+    /**预约类型(1:订单预约   2:临时预约)*/
+    private String appointmentType;
+
+    /**预约分类(1、充电预约  2、管桩预约   3、其他预约)*/
+    private String appointmentClassify;
 }

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

@@ -14,6 +14,7 @@
             bc.contact customerContactName,
             bg.GOODS_NAME goodsName,
             bg.GOODS_MODEL goodsModel,
+            bg.GOODS_CODE goodsCode,
             bar.time_id,
             bgc.CONF_START_TIME begin_time,
             bgc.CONF_END_TIME end_time,
@@ -29,7 +30,9 @@
             br.unload_weight/1000 unload_weight,
             br.unload_img,
             br.unload_name,
-            br.audit_sign
+            br.audit_sign,
+            bar.appointment_type,
+            bar.appointment_classify
         from biz_appointment_record bar
          left join biz_order bo on bar.order_id = bo.id
          left join biz_goods bg on bg.id = bo.good_id

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

@@ -33,7 +33,6 @@ public class BizAppointmentRecordAddParam {
 
     /** 订单id */
     @Schema(description = "订单id", requiredMode = Schema.RequiredMode.REQUIRED)
-    @NotBlank(message = "orderId不能为空")
     private String orderId;
 
     /** 车牌号 */
@@ -60,4 +59,10 @@ public class BizAppointmentRecordAddParam {
     /**超限配置id*/
     private String overId;
 
+    /**预约类型(1:订单预约   2:临时预约)*/
+    private String appointmentType;
+
+    /**预约分类(1、充电预约  2、管桩预约   3、其他预约)*/
+    private String appointmentClassify;
+
 }

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

@@ -68,4 +68,10 @@ public class BizAppointmentRecordEditParam {
     /**超限配置id*/
     private String overId;
 
+    /**预约类型(1:订单预约   2:临时预约)*/
+    private String appointmentType;
+
+    /**预约分类(1、充电预约  2、管桩预约   3、其他预约)*/
+    private String appointmentClassify;
+
 }

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

@@ -81,4 +81,8 @@ public class BizAppointmentRecordPageParam {
 
     private String endTime;
 
+    private String type;
+
+    private String appointmentClassify;
+
 }

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

@@ -50,6 +50,12 @@ public interface BizAppointmentRecordService extends IService<BizAppointmentReco
      */
     void add(BizAppointmentRecordAddParam bizAppointmentRecordAddParam);
 
+    /**
+     * 新增临时预约
+     * @param bizAppointmentRecordAddParam
+     */
+    void addTemp(BizAppointmentRecordAddParam bizAppointmentRecordAddParam);
+
     /**
      * 编辑预约记录
      *
@@ -58,6 +64,12 @@ public interface BizAppointmentRecordService extends IService<BizAppointmentReco
      */
     void edit(BizAppointmentRecordEditParam bizAppointmentRecordEditParam);
 
+    /**
+     * 编辑临时预约
+     * @param bizAppointmentRecordEditParam
+     */
+    void editTemp(BizAppointmentRecordEditParam bizAppointmentRecordEditParam);
+
     /**
      * 删除预约记录
      *
@@ -85,6 +97,9 @@ public interface BizAppointmentRecordService extends IService<BizAppointmentReco
     /**审核*/
     void auditRecord(BizAppointmentRecordEditParam bizAppointmentRecordEditParam);
 
+    /**审核临时预约*/
+    void auditTemp(BizAppointmentRecordEditParam bizAppointmentRecordEditParam);
+
     /**导出报表*/
     void exportRecord(BizAppointmentRecordPageParam bizAppointmentRecordPageParam, HttpServletResponse response) throws IOException;
 

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

@@ -122,6 +122,12 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
 
     public QueryWrapper<BizAppointmentRecord> getQueryWrapper(BizAppointmentRecordPageParam bizAppointmentRecordPageParam){
         QueryWrapper<BizAppointmentRecord> queryWrapper = new QueryWrapper<BizAppointmentRecord>().checkSqlInjection();
+        if(ObjectUtil.isNotEmpty(bizAppointmentRecordPageParam.getType())){
+            queryWrapper.eq("bar.appointment_type",bizAppointmentRecordPageParam.getType());
+        }
+        if(ObjectUtil.isNotEmpty(bizAppointmentRecordPageParam.getAppointmentClassify())){
+            queryWrapper.eq("bar.appointment_classify",bizAppointmentRecordPageParam.getAppointmentClassify());
+        }
         if(ObjectUtil.isNotEmpty(bizAppointmentRecordPageParam.getOrderName())){
             queryWrapper.like("bo.order_name",bizAppointmentRecordPageParam.getOrderName());
         }
@@ -168,6 +174,7 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
         BizConfig bizConfig = bizConfigService.getOne(new QueryWrapper<BizConfig>().lambda().last("limit 1"));
         BizAppointmentRecord bizAppointmentRecord = BeanUtil.toBean(bizAppointmentRecordAddParam, BizAppointmentRecord.class);
         bizAppointmentRecord.setTimeId(bizOrderService.queryEntity(bizAppointmentRecordAddParam.getOrderId()).getDeliveryTimeId());
+        bizAppointmentRecord.setAppointmentType("1");
         if(ObjectUtil.isNotNull(bizConfig)){
             if(StringUtils.equals(bizConfig.getAuditSwitch(),"1")){
                 //开启审核,设置待审核状态
@@ -198,6 +205,70 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
         }*/
     }
 
+    @Transactional(rollbackFor = Exception.class)
+    @Override
+    public void addTemp(BizAppointmentRecordAddParam bizAppointmentRecordAddParam) {
+        checkTempParam(bizAppointmentRecordAddParam);
+        //获取流程配置判断预约是否需要审核
+        BizConfig bizConfig = bizConfigService.getOne(new QueryWrapper<BizConfig>().lambda().last("limit 1"));
+        BizAppointmentRecord bizAppointmentRecord = BeanUtil.toBean(bizAppointmentRecordAddParam, BizAppointmentRecord.class);
+        if(ObjectUtil.isNotNull(bizConfig)){
+            if(StringUtils.equals(bizConfig.getTemporaryAuditSwitch(),"1")){
+                //开启审核,设置待审核状态
+                bizAppointmentRecord.setStatus("1");
+            }else{
+                //未开启审核,设置待入场状态
+                bizAppointmentRecord.setStatus("4");
+            }
+        }
+        bizAppointmentRecord.setAppointmentType("2");
+        this.save(bizAppointmentRecord);
+    }
+
+    //临时预约校验
+    public void checkTempParam(BizAppointmentRecordAddParam bizAppointmentRecordAddParam){
+        //校验车牌号
+        if(ObjectUtil.isNotEmpty(bizAppointmentRecordAddParam.getLicenseNumber())){
+            bizAppointmentRecordAddParam.setLicenseNumber(bizAppointmentRecordAddParam.getLicenseNumber().toUpperCase().trim());
+            //校验车牌号是否添加过预约,排除11:已签收、 13:销售已审核  、 14:已取消
+            long count = this.count(new QueryWrapper<BizAppointmentRecord>().lambda().
+                    eq(BizAppointmentRecord::getLicenseNumber,bizAppointmentRecordAddParam.getLicenseNumber()).
+                    notIn(BizAppointmentRecord::getStatus, "10","11","12", "13", "14","15"));
+            if(count>0){
+                throw new CommonException("车牌号:{}已经添加过预约!",bizAppointmentRecordAddParam.getLicenseNumber());
+            }
+        }
+        //校验手机号
+        if(ObjectUtil.isNotEmpty(bizAppointmentRecordAddParam.getDriverMobile())){
+            if(!PhoneUtil.isMobile(bizAppointmentRecordAddParam.getDriverMobile())) {
+                throw new CommonException("手机号码:{}格式错误", bizAppointmentRecordAddParam.getDriverMobile());
+            }
+        }
+    }
+
+    public void checkTempParam(BizAppointmentRecordEditParam bizAppointmentRecordEditParam,BizAppointmentRecord bizAppointmentRecord){
+        //校验车牌号
+        if(ObjectUtil.isNotEmpty(bizAppointmentRecordEditParam.getLicenseNumber())){
+            bizAppointmentRecordEditParam.setLicenseNumber(bizAppointmentRecordEditParam.getLicenseNumber().toUpperCase().trim());
+            if(!StringUtils.equals(bizAppointmentRecordEditParam.getLicenseNumber(),bizAppointmentRecord.getLicenseNumber())){
+                //校验车牌号是否添加过预约,排除11:已签收、 13:销售已审核  、 14:已取消
+                long count = this.count(new QueryWrapper<BizAppointmentRecord>().lambda().
+                        eq(BizAppointmentRecord::getLicenseNumber,bizAppointmentRecordEditParam.getLicenseNumber()).
+                        notIn(BizAppointmentRecord::getStatus, "10","11","12", "13", "14","15"));
+                if(count>0){
+                    throw new CommonException("车牌号:{}已经添加过预约!",bizAppointmentRecordEditParam.getLicenseNumber());
+                }
+            }
+
+        }
+        //校验手机号
+        if(ObjectUtil.isNotEmpty(bizAppointmentRecordEditParam.getDriverMobile())){
+            if(!PhoneUtil.isMobile(bizAppointmentRecordEditParam.getDriverMobile())) {
+                throw new CommonException("手机号码:{}格式错误", bizAppointmentRecordEditParam.getDriverMobile());
+            }
+        }
+    }
+
     public void saveRecord(BizAppointmentRecord bizAppointmentRecord){
         //排队中
         lock.lock();
@@ -375,6 +446,21 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
         this.updateById(bizAppointmentRecord);
     }
 
+    @Override
+    public void editTemp(BizAppointmentRecordEditParam bizAppointmentRecordEditParam) {
+        BizAppointmentRecord bizAppointmentRecord = this.queryEntity(bizAppointmentRecordEditParam.getId());
+        if(ObjectUtil.isEmpty(bizAppointmentRecordEditParam.getStatus())){
+            bizAppointmentRecordEditParam.setStatus(bizAppointmentRecord.getStatus());
+        }
+        checkTempParam(bizAppointmentRecordEditParam, bizAppointmentRecord);
+        BeanUtil.copyProperties(bizAppointmentRecordEditParam, bizAppointmentRecord);
+        if(StringUtils.equals(bizAppointmentRecord.getStatus(),"2")){
+            //如果当前状态是审核不通过的状态,修改后重新提交审核
+            bizAppointmentRecord.setStatus("1");
+        }
+        this.updateById(bizAppointmentRecord);
+    }
+
     @Transactional(rollbackFor = Exception.class)
     @Override
     public void delete(List<BizAppointmentRecordIdParam> bizAppointmentRecordIdParamList) {
@@ -434,6 +520,24 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
         }
     }
 
+    @Override
+    public void auditTemp(BizAppointmentRecordEditParam bizAppointmentRecordEditParam) {
+        BizAppointmentRecord bizAppointmentRecord = this.queryEntity(bizAppointmentRecordEditParam.getId());
+        UpdateWrapper<BizAppointmentRecord> updateWrapper = new UpdateWrapper<>();
+        updateWrapper.eq("id",bizAppointmentRecord.getId());
+        String status = null;
+        if(ObjectUtil.isNotEmpty(bizAppointmentRecordEditParam.getAuditFlag())){
+            if(StringUtils.equals(bizAppointmentRecordEditParam.getAuditFlag(),"true")){
+                status = "2";
+            }else{
+                status = "4";
+            }
+            updateWrapper.set("status",status);
+            updateWrapper.set("appointment_reason",bizAppointmentRecordEditParam.getAppointmentReason());
+            this.update(updateWrapper);
+        }
+    }
+
     @Override
     public void exportRecord(BizAppointmentRecordPageParam bizAppointmentRecordPageParam, HttpServletResponse response) throws IOException {
         QueryWrapper<BizAppointmentRecord> queryWrapper = getQueryWrapper(bizAppointmentRecordPageParam);
@@ -464,7 +568,12 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
                 bizAppointmentRecord = new BizAppointmentRecord();
                 bizAppointmentRecord.setIsFlag("4");
             }else{
-                bizAppointmentRecord = setBizAppointmentRecord(bizAppointmentRecord);
+                if(StringUtils.equals(bizAppointmentRecord.getAppointmentType(),"1")){
+                    //订单预约
+                    bizAppointmentRecord = setBizAppointmentRecord(bizAppointmentRecord);
+                }else{
+                    bizAppointmentRecord.setIsFlag("1");
+                }
             }
         }else if(StringUtils.equals(bizAppointmentRecordPageParam.getStatus(),"5")){
             //已入场,如果为空,没有已入场的记录,不可一次过磅
@@ -472,7 +581,11 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
                 bizAppointmentRecord = new BizAppointmentRecord();
                 bizAppointmentRecord.setIsFlag("5");
             }else{
-                bizAppointmentRecord = setBizAppointmentRecord(bizAppointmentRecord);
+                if(StringUtils.equals(bizAppointmentRecord.getAppointmentType(),"1")){
+                    bizAppointmentRecord = setBizAppointmentRecord(bizAppointmentRecord);
+                }else{
+                    bizAppointmentRecord.setIsFlag("5");
+                }
             }
         }else if(StringUtils.equals(bizAppointmentRecordPageParam.getStatus(),"7")){
             //完成装货,如果为空,没有完成装货的记录,不可二次过磅
@@ -480,7 +593,12 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
                 bizAppointmentRecord = new BizAppointmentRecord();
                 bizAppointmentRecord.setIsFlag("7");
             }else{
-                bizAppointmentRecord = setBizAppointmentRecord(bizAppointmentRecord);
+                if(StringUtils.equals(bizAppointmentRecord.getAppointmentType(),"1")){
+                    bizAppointmentRecord = setBizAppointmentRecord(bizAppointmentRecord);
+                }else{
+                    bizAppointmentRecord.setIsFlag("7");
+                }
+
             }
         }else if(StringUtils.equals(bizAppointmentRecordPageParam.getStatus(),"9")){
             //待出场,如果为空,没有待出场的记录,不可出门禁
@@ -488,7 +606,11 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
                 bizAppointmentRecord = new BizAppointmentRecord();
                 bizAppointmentRecord.setIsFlag("9");
             }else{
-                bizAppointmentRecord = setBizAppointmentRecord(bizAppointmentRecord);
+                if(StringUtils.equals(bizAppointmentRecord.getAppointmentType(),"1")){
+                    bizAppointmentRecord = setBizAppointmentRecord(bizAppointmentRecord);
+                }else{
+                    bizAppointmentRecord.setIsFlag("1");
+                }
             }
         }
         return bizAppointmentRecord;
@@ -623,7 +745,7 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
                     BizGoods bizGoods = bizGoodsService.getById(bizOrder.getGoodId());
                     if(ObjectUtil.isNotNull(bizGoods)){
                         bizAppointmentRecord.setGoodsName(bizGoods.getGoodsName());
-                        bizAppointmentRecord.setGoodsModel(bizGoods.getGoodsModel());
+                        bizAppointmentRecord.setGoodsModel(bizGoods.getGoodsCode());
                     }
                 }
             }

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

@@ -69,4 +69,7 @@ public class BizConfig extends CommonEntity {
 
     /**排队通知开关*/
     private String lineNoticeSwitch;
+
+    /**临时预约审核状态*/
+    private String temporaryAuditSwitch;
 }

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

@@ -70,4 +70,7 @@ public class BizConfigAddParam {
     /**排队通知开关*/
     private String lineNoticeSwitch;
 
+    /**临时预约审核状态*/
+    private String temporaryAuditSwitch;
+
 }

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

@@ -75,4 +75,7 @@ public class BizConfigEditParam {
     /**排队通知开关*/
     private String lineNoticeSwitch;
 
+    /**临时预约审核状态*/
+    private String temporaryAuditSwitch;
+
 }

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

@@ -138,4 +138,7 @@ public class BizOrder extends CommonEntity{
     /**卸货重量*/
     private BigDecimal shippingWeight;
 
+    /**送货地址*/
+    private String shipAddress;
+
 }

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

@@ -27,7 +27,8 @@
             bo.delivery_time_id,
             bo.order_sign,
             bo.order_reason,
-            bo.end_reason
+            bo.end_reason,
+            bo.ship_address
         from biz_order bo
         left join biz_customer bc on bo.customer_id = bc.id
         left join biz_goods bg on bg.id = bo.good_id

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

@@ -77,4 +77,7 @@ public class BizOrderAddParam {
     /**销售订单*/
     private String saleOrderInfo;
 
+    /**送货地址*/
+    private String shipAddress;
+
 }

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

@@ -94,4 +94,7 @@ public class BizOrderEditParam {
     /**结束备注**/
     private String endReason;
 
+    /**送货地址*/
+    private String shipAddress;
+
 }

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

@@ -82,4 +82,7 @@ public class BizSaleOrder extends CommonEntity {
     /**来源*/
     private String saleOrderSouce;
 
+    /**送货地址*/
+    private String shipAddress;
+
 }

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

@@ -57,4 +57,7 @@ public class BizSaleOrderAddParam {
     /**货品编码*/
     private String saleGoodsCode;
 
+    /**送货地址*/
+    private String shipAddress;
+
 }

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

@@ -62,4 +62,7 @@ public class BizSaleOrderEditParam {
     /**货品编码*/
     private String saleGoodsCode;
 
+    /**送货地址*/
+    private String shipAddress;
+
 }

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

@@ -209,71 +209,77 @@ public class BizSaleOrderServiceImpl extends ServiceImpl<BizSaleOrderMapper, Biz
             JSONObject jsonObject = JSONObject.parseObject(result);
             String resData = jsonObject.getString("resData");
             JSONArray jsonArray = JSONObject.parseArray(resData);
-            if(jsonArray.size()>0){
-                for(int i=0; i<jsonArray.size(); i++){
-                    JSONObject object = jsonArray.getJSONObject(i);
-                    String relationId = object.getString("id");
-                    //订单编号
-                    String orderCode = object.getString("cSOCode");
-                    //货品编码
-                    String goodsCode = object.getString("cInvCode");
-                    //货品名称
-                    String goodsName = object.getString("cInvName");
-                    //订单重量
-                    BigDecimal weight = new BigDecimal(object.getString("iQuantity"));
-                    //单价
-                    BigDecimal price = new BigDecimal(object.getString("iTaxUnitPrice"));
-                    //业务员
-                    String businessName = object.getString("cPsn_Name");
-                    //订单类型
-                    String transWay = object.getString("transWay");
-                    //根据关联id查询销售订单是否存在,不存在插入
-                    long count = this.count(new QueryWrapper<BizSaleOrder>().lambda().eq(BizSaleOrder::getRelationId, relationId));
-                    if(count==0){
-                        BizSaleOrder bizSaleOrder = new BizSaleOrder();
-                        bizSaleOrder.setSaleOrderNumber(orderCode);
-                        bizSaleOrder.setSaleGoodsName(goodsName);
-                        bizSaleOrder.setSaleGoodsCode(goodsCode);
-                        bizSaleOrder.setSaleOrderWeight(weight.multiply(new BigDecimal(1000)));
-                        bizSaleOrder.setSaleStatus("1");
-                        if(ObjectUtil.isNotEmpty(transWay)){
-                            if(StringUtils.equals(transWay,"配送")){
-                                bizSaleOrder.setSaleOrderType("1");
-                            }else{
-                                bizSaleOrder.setSaleOrderType("2");
+            if(ObjectUtil.isNotEmpty(jsonObject)){
+                if(jsonArray.size()>0){
+                    for(int i=0; i<jsonArray.size(); i++){
+                        JSONObject object = jsonArray.getJSONObject(i);
+                        String relationId = object.getString("id");
+                        //订单编号
+                        String orderCode = object.getString("cSOCode");
+                        //货品编码
+                        String goodsCode = object.getString("cInvCode");
+                        //货品名称
+                        String goodsName = object.getString("cInvName");
+                        //订单重量
+                        BigDecimal weight = new BigDecimal(object.getString("iQuantity"));
+                        //单价
+                        BigDecimal price = new BigDecimal(object.getString("iTaxUnitPrice"));
+                        //业务员
+                        String businessName = object.getString("cPsn_Name");
+                        //订单类型
+                        String transWay = object.getString("transWay");
+                        //送货地址
+                        String jAddress = object.getString("jAddress");
+                        //根据关联id查询销售订单是否存在,不存在插入
+                        long count = this.count(new QueryWrapper<BizSaleOrder>().lambda().eq(BizSaleOrder::getRelationId, relationId));
+                        if(count==0){
+                            BizSaleOrder bizSaleOrder = new BizSaleOrder();
+                            bizSaleOrder.setSaleOrderNumber(orderCode);
+                            bizSaleOrder.setSaleGoodsName(goodsName);
+                            bizSaleOrder.setSaleGoodsCode(goodsCode);
+                            bizSaleOrder.setSaleOrderWeight(weight.multiply(new BigDecimal(1000)));
+                            bizSaleOrder.setSaleStatus("1");
+                            bizSaleOrder.setShipAddress(jAddress);
+                            if(ObjectUtil.isNotEmpty(transWay)){
+                                if(StringUtils.equals(transWay,"配送")){
+                                    bizSaleOrder.setSaleOrderType("1");
+                                }else{
+                                    bizSaleOrder.setSaleOrderType("2");
+                                }
                             }
+                            bizSaleOrder.setSaleOrderSouce("1");
+                            bizSaleOrder.setCustomerId(bizCustomer.getId());
+                            bizSaleOrder.setRelationId(relationId);
+                            bizSaleOrder.setSalePrice(price);
+                            bizSaleOrder.setBusinessName(businessName);
+                            this.save(bizSaleOrder);
+                        }
+                        //添加货品信息
+                        QueryWrapper<BizGoods> queryWrapper = new QueryWrapper<>();
+                        if(ObjectUtil.isNotEmpty(goodsCode)){
+                            queryWrapper.lambda().eq(BizGoods::getGoodsCode,goodsCode);
+                        }
+                        if(ObjectUtil.isNotEmpty(goodsName)){
+                            queryWrapper.lambda().eq(BizGoods::getGoodsName,goodsName);
+                        }
+                        long goodCount = bizGoodsService.count(queryWrapper);
+                        if(goodCount==0){
+                            BizGoods bizGoods = new BizGoods();
+                            bizGoods.setGoodsCode(goodsCode);
+                            bizGoods.setGoodsName(goodsName);
+                            bizGoodsService.save(bizGoods);
                         }
-                        bizSaleOrder.setSaleOrderSouce("1");
-                        bizSaleOrder.setCustomerId(bizCustomer.getId());
-                        bizSaleOrder.setRelationId(relationId);
-                        bizSaleOrder.setSalePrice(price);
-                        bizSaleOrder.setBusinessName(businessName);
-                        this.save(bizSaleOrder);
-                    }
-                    //添加货品信息
-                    QueryWrapper<BizGoods> queryWrapper = new QueryWrapper<>();
-                    if(ObjectUtil.isNotEmpty(goodsCode)){
-                        queryWrapper.lambda().eq(BizGoods::getGoodsCode,goodsCode);
-                    }
-                    if(ObjectUtil.isNotEmpty(goodsName)){
-                        queryWrapper.lambda().eq(BizGoods::getGoodsName,goodsName);
-                    }
-                    long goodCount = bizGoodsService.count(queryWrapper);
-                    if(goodCount==0){
-                        BizGoods bizGoods = new BizGoods();
-                        bizGoods.setGoodsCode(goodsCode);
-                        bizGoods.setGoodsName(goodsName);
-                        bizGoodsService.save(bizGoods);
                     }
                 }
+                List<BizSaleOrder> list = this.queryByCustomerId(bizSaleOrderIdParam);
+                return list;
             }
-            List<BizSaleOrder> list = this.queryByCustomerId(bizSaleOrderIdParam);
-            return list;
         } catch (HttpException e) {
             throw new CommonException("erp服务网络异常!");
             /*List<BizSaleOrder> list = this.queryByCustomerId(bizSaleOrderIdParam);
             return list;*/
         }
+        return null;
     }
 
     public static String getSign(String appId,String appSecret,String nonce,String timestamp){

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

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