fanzherong_v 2 mesi fa
parent
commit
7fc156dd46
25 ha cambiato i file con 440 aggiunte e 68 eliminazioni
  1. 8 0
      snowy-admin-web/src/api/biz/bizRecordApi.js
  2. 4 0
      snowy-admin-web/src/api/biz/goodsConfApi.js
  3. 4 0
      snowy-admin-web/src/api/dev/fileApi.js
  4. 11 1
      snowy-admin-web/src/views/biz/bizqueuerecord/editOrder.vue
  5. 10 10
      snowy-admin-web/src/views/biz/bizqueuerecord/index.vue
  6. 66 0
      snowy-admin-web/src/views/biz/bizsignrecord/review.vue
  7. 1 1
      snowy-admin-web/src/views/biz/record/detail.vue
  8. 2 2
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizaccessrecord/entity/BizAccessRecord.java
  9. 2 2
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizaccessrecord/param/BizAccessRecordAddParam.java
  10. 101 37
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/service/impl/BizAppointmentRecordServiceImpl.java
  11. 1 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizconfig/entity/BizConfig.java
  12. 13 8
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizorder/service/impl/BizOrderServiceImpl.java
  13. 12 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/goodsConf/controller/BizGoodsConfController.java
  14. 5 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/goodsConf/service/BizGoodsConfService.java
  15. 15 2
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/goodsConf/service/impl/BizGoodsConfServiceImpl.java
  16. 28 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/controller/BizRecordController.java
  17. 10 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/entity/BizRecord.java
  18. 7 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/param/BizRecordAddParam.java
  19. 12 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/param/BizRecordEditParam.java
  20. 3 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/param/BizRecordPageParam.java
  21. 8 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/service/BizRecordService.java
  22. 81 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/record/service/impl/BizRecordServiceImpl.java
  23. 14 0
      snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/controller/DevFileController.java
  24. 3 0
      snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/service/DevFileService.java
  25. 19 3
      snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/service/impl/DevFileServiceImpl.java

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

@@ -96,5 +96,13 @@ export default {
 	//二次过磅司机签名确认
 	updateDriverSign(data){
 		return request('updateDriverSign',data)
+	},
+	//修改卸货重量
+	updateWeight(data){
+		return request('updateWeight',data)
+	},
+	//审核
+	auditRecord(data){
+		return request('auditRecord',data)
 	}
 }

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

@@ -28,5 +28,9 @@ export default {
 	// 获取提货时间配置列表
 	getList(data){
 		return request('getList',data,'get')
+	},
+	// 根据订单id查询提货时间配置
+	queryByOrderId(data){
+		return request('queryByOrderId',data,'get')
 	}
 }

+ 4 - 0
snowy-admin-web/src/api/dev/fileApi.js

@@ -30,6 +30,10 @@ export default {
 	fileUploadReturnId(data) {
 		return request('uploadLocalReturnId', data)
 	},
+	// 本地文件上传,返回文件Map
+	fileUploadReturnMap(data) {
+		return request('uploadReturnMap', data)
+	},
 	// 阿里云文件上传,返回文件id
 	fileUploadAliyunReturnId(data) {
 		return request('uploadAliyunReturnId', data)

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

@@ -9,7 +9,7 @@
 		<a-form ref="formRef" :model="formData" :rules="formRules" :wrapper-col="wrapperCol" :label-col="labelCol">
 			<a-form-item label="订单信息:" name="orderId">
 				<a-select v-model:value="formData.orderId" placeholder="请选择订单信息"
-						  :options="orderIdList"
+						  :options="orderIdList" @change="onChange"
 				> </a-select>
 			</a-form-item>
 			<a-form-item label="车牌号:" name="licenseNumber">
@@ -41,6 +41,7 @@
 	import bizAppointmentRecordApi from '@/api/biz/bizAppointmentRecordApi'
 	import bizAppointmentTimeApi from "@/api/biz/bizAppointmentTimeApi";
 	import bizOrderApi from '@/api/biz/bizOrderApi'
+	import goodsConfApi from "@/api/biz/goodsConfApi";
 
 	// 抽屉状态
 	const open = ref(false)
@@ -115,6 +116,15 @@
 			})
 			.catch(() => {})
 	}
+
+	const onChange = (value) => {
+		let param = {
+			id:value
+		}
+		goodsConfApi.queryByOrderId(param).then((res)=>{
+			formData.value.timeInfo = res.confStartTime + '~' + res.confEndTime
+		})
+	}
 	// 抛出函数
 	defineExpose({
 		onOpen

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

@@ -141,10 +141,10 @@
 					</a-tag>
 				</template>
 				<template v-if="column.dataIndex === 'action'">
-					<a style="color: #ffaa00" @click="orderRef.onOpen(record)" v-if="hasPerm('bizAppointmentRecordOrder') && (record.status == '3' || record.status == '4' || record.status == '5' || record.status == '6'|| record.status == '8'|| record.status == '9')">调整订单</a>
+					<a style="color: #ffaa00" @click="orderRef.onOpen(record)" v-if="hasPerm('bizAppointmentRecordOrder') && (record.status == '3' || record.status == '4' || record.status == '5' || record.status == '6')">车辆调度</a>
 <!--					<a-divider type="vertical"  v-if="(hasPerm('bizAppointmentRecordOrder') && (record.status == '3' || record.status == '4' || record.status == '5' || record.status == '6'|| record.status == '7'|| record.status == '8'|| record.status == '9')) && (hasPerm('bizAppointmentRecordTime') && (record.status == '3' || record.status == '4'))" />
 					<a style="color:blue" @click="formRef.onOpen(record)" v-if="hasPerm('bizAppointmentRecordTime') && (record.status == '3' || record.status == '4')">调整时段</a>-->
-					<a-divider type="vertical"  v-if="(hasPerm('bizAppointmentRecordOrder') && (record.status == '3' || record.status == '4' || record.status == '5' || record.status == '6'|| record.status == '7'|| record.status == '8'|| record.status == '9')) && (hasPerm('bizAppointmentRecordCancel') && (record.status == '3' || record.status == '4'))" />
+					<a-divider type="vertical"  v-if="(hasPerm('bizAppointmentRecordOrder') && (record.status == '3' || record.status == '4' || record.status == '5' || record.status == '6')) && (hasPerm('bizAppointmentRecordCancel') && (record.status == '3' || record.status == '4'))" />
 					<a style="color:red" type="link" danger size="small" @click="cancelConfig(record)" v-if="hasPerm('bizAppointmentRecordCancel') && (record.status == '3' || record.status == '4')">取消排队</a>
 				</template>
 			</template>
@@ -193,41 +193,41 @@
 		{
 			title: '订单信息',
 			dataIndex: 'orderInfo',
-			width:200
+			width:230
 		},
 		{
 			title: '车牌号',
 			dataIndex: 'licenseNumber',
-			width:130,
+			width:150,
 			align: 'center'
 		},
 		{
-			title: '预约时段',
+			title: '提货时段',
 			dataIndex: 'timeInfo',
 			align:'center',
-			width:130
+			width:360
 		},
 		{
 			title: '客户信息',
 			dataIndex: 'customerInfo',
 			align:'center',
-			width:150
+			width:200
 		},
 		{
 			title: '货品信息',
 			dataIndex: 'goodsInfo',
-			width:150
+			width:180
 		},
 		{
 			title: '司机信息',
 			dataIndex: 'driverInfo',
-			width: 150
+			width: 180
 		},
 		{
 			title: '状态',
 			dataIndex: 'status',
 			align: 'center',
-			width:100
+			width:120
 		},
 	]
 	// 操作栏通过权限判断是否显示

+ 66 - 0
snowy-admin-web/src/views/biz/bizsignrecord/review.vue

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

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

@@ -71,7 +71,7 @@
 			<a-image v-if="formData.tareCapturePoundRoom != null" :width="200" :src="formData.tareCapturePoundRoom" />
 		</a-space>
 		<a-divider></a-divider>
-		<a-descriptions title="司机签名确认" style="margin-top: 15px">
+		<a-descriptions title="司机签名" style="margin-top: 15px">
 		</a-descriptions>
 		<a-space>
 			<a-image :width="200" :src="formData.driverSign" />

+ 2 - 2
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizaccessrecord/entity/BizAccessRecord.java

@@ -111,11 +111,11 @@ public class BizAccessRecord extends CommonEntity {
 
     /** 所属设备分类 1-门禁端设备 2-签样区设备 */
     @Schema(description = "所属设备分类 1-门禁端设备 2-签样区设备")
-    private Boolean weighbridgeType;
+    private Integer weighbridgeType;
 
     /** 设备组(1:一组,2:二组) */
     @Schema(description = "设备组(1:一组,2:二组)")
-    private Boolean deviceGroup;
+    private Integer deviceGroup;
 
     /** 抓拍1 */
     @Schema(description = "抓拍1")

+ 2 - 2
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizaccessrecord/param/BizAccessRecordAddParam.java

@@ -105,11 +105,11 @@ public class BizAccessRecordAddParam {
 
     /** 所属设备分类 1-门禁端设备 2-签样区设备 */
     @Schema(description = "所属设备分类 1-门禁端设备 2-签样区设备")
-    private Boolean weighbridgeType;
+    private Integer weighbridgeType;
 
     /** 设备组(1:一组,2:二组) */
     @Schema(description = "设备组(1:一组,2:二组)")
-    private Boolean deviceGroup;
+    private Integer deviceGroup;
 
     /** 抓拍1 */
     @Schema(description = "抓拍1")

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

@@ -39,6 +39,8 @@ import vip.xiaonuo.biz.modular.bizexcessconfig.service.BizExcessConfigService;
 import vip.xiaonuo.biz.modular.bizorder.entity.BizOrder;
 import vip.xiaonuo.biz.modular.bizorder.param.BizOrderExportResult;
 import vip.xiaonuo.biz.modular.bizorder.service.BizOrderService;
+import vip.xiaonuo.biz.modular.bizorderconfig.entity.BizOrderConfig;
+import vip.xiaonuo.biz.modular.bizorderconfig.service.BizOrderConfigService;
 import vip.xiaonuo.biz.modular.goods.entity.BizGoods;
 import vip.xiaonuo.biz.modular.goods.service.BizGoodsService;
 import vip.xiaonuo.biz.modular.goodsConf.entity.BizGoodsConf;
@@ -83,6 +85,8 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
     private BizExcessConfigService bizExcessConfigService;
     @Resource
     private BizGoodsConfService bizGoodsConfService;
+    @Resource
+    private BizOrderConfigService bizOrderConfigService;
 
     @Override
     public Page<BizAppointmentRecord> page(BizAppointmentRecordPageParam bizAppointmentRecordPageParam) {
@@ -154,11 +158,13 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
         bizOrderService.updateById(bizOrder);
 
         //更新时间段内已预约数
-        /*BizAppointmentTime bizAppointmentTime = bizAppointmentTimeService.getById(bizAppointmentRecordAddParam.getTimeId());
+        BizOrderConfig bizAppointmentTime = bizOrderConfigService.getOne(new QueryWrapper<BizOrderConfig>().lambda().
+                eq(BizOrderConfig::getOrderId, bizAppointmentRecordAddParam.getOrderId()).
+                last("limit 1"));
         if(ObjectUtil.isNotNull(bizAppointmentTime)){
             bizAppointmentTime.setApplyNumberAlready(bizAppointmentTime.getApplyNumberAlready()+1);
-            bizAppointmentTimeService.updateById(bizAppointmentTime);
-        }*/
+            bizOrderConfigService.updateById(bizAppointmentTime);
+        }
     }
 
     public void checkParam(BizAppointmentRecordAddParam bizAppointmentRecordAddParam){
@@ -196,18 +202,23 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
                 }
             }
         }
-        /*if(ObjectUtil.isNotEmpty(bizAppointmentRecordAddParam.getTimeId())){
-            //校验预约时间段是否预约满
-            //查询预约时间段内的预约记录,10:已出场   11:已签收   12:自动审核  13:销售已审核   14:已取消这些状态都占用预约名额
-            long count = this.count(new QueryWrapper<BizAppointmentRecord>().lambda().
-                    eq(BizAppointmentRecord::getTimeId, bizAppointmentRecordAddParam.getTimeId()).
-                    notIn(BizAppointmentRecord::getStatus, "10", "11", "12", "13", "14"));
+        if(ObjectUtil.isNotEmpty(bizAppointmentRecordAddParam.getOrderId())){
             //查询预约时间段内可预约次数
-            BizAppointmentTime bizAppointmentTime = bizAppointmentTimeService.getById(bizAppointmentRecordAddParam.getTimeId());
-            if(count>=bizAppointmentTime.getApplyNumber()){
-                throw new CommonException("该时间段已经预约满!");
+            //BizAppointmentTime bizAppointmentTime = bizAppointmentTimeService.getById(bizAppointmentRecordAddParam.getTimeId());
+            BizOrderConfig bizOrderConfig = bizOrderConfigService.getOne(new QueryWrapper<BizOrderConfig>().lambda().
+                    eq(BizOrderConfig::getOrderId, bizAppointmentRecordAddParam.getOrderId()).
+                    last("limit 1"));
+            if(ObjectUtil.isNotNull(bizOrderConfig)){
+                //校验预约时间段是否预约满
+                //查询预约时间段内的预约记录,10:已出场   11:已签收   12:自动审核  13:销售已审核   14:已取消这些状态都占用预约名额
+                long count = this.count(new QueryWrapper<BizAppointmentRecord>().lambda().
+                        eq(BizAppointmentRecord::getTimeId, bizAppointmentRecordAddParam.getTimeId()).
+                        notIn(BizAppointmentRecord::getStatus, "10", "11", "12", "13", "14","15"));
+                if(count>=bizOrderConfig.getApplyNumber()){
+                    throw new CommonException("该订单已经预约满!");
+                }
             }
-        }*/
+        }
 
     }
 
@@ -249,21 +260,23 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
                 }
             }
         }
-        /*if(ObjectUtil.isNotEmpty(bizAppointmentRecordEditParam.getTimeId())){
-            if(!StringUtils.equals(bizAppointmentRecord.getTimeId(),bizAppointmentRecordEditParam.getTimeId())){
+        if(ObjectUtil.isNotEmpty(bizAppointmentRecordEditParam.getOrderId())){
+            //查询预约时间段内可预约次数
+            //BizAppointmentTime bizAppointmentTime = bizAppointmentTimeService.getById(bizAppointmentRecordAddParam.getTimeId());
+            BizOrderConfig bizOrderConfig = bizOrderConfigService.getOne(new QueryWrapper<BizOrderConfig>().lambda().
+                    eq(BizOrderConfig::getOrderId, bizAppointmentRecordEditParam.getOrderId()).
+                    last("limit 1"));
+            if(ObjectUtil.isNotNull(bizOrderConfig)){
                 //校验预约时间段是否预约满
                 //查询预约时间段内的预约记录,10:已出场   11:已签收   12:自动审核  13:销售已审核   14:已取消这些状态都占用预约名额
                 long count = this.count(new QueryWrapper<BizAppointmentRecord>().lambda().
                         eq(BizAppointmentRecord::getTimeId, bizAppointmentRecordEditParam.getTimeId()).
-                        notIn(BizAppointmentRecord::getStatus, "10", "11", "12", "13", "14"));
-                //查询预约时间段内可预约次数
-                BizAppointmentTime bizAppointmentTime = bizAppointmentTimeService.getById(bizAppointmentRecordEditParam.getTimeId());
-                if(count>=bizAppointmentTime.getApplyNumber()){
-                    throw new CommonException("该时间段已经预约满!");
+                        notIn(BizAppointmentRecord::getStatus, "10", "11", "12", "13", "14","15"));
+                if(count>=bizOrderConfig.getApplyNumber()){
+                    throw new CommonException("该订单已经预约满!");
                 }
             }
-
-        }*/
+        }
 
     }
 
@@ -272,17 +285,27 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
     public void edit(BizAppointmentRecordEditParam bizAppointmentRecordEditParam) {
         BizAppointmentRecord bizAppointmentRecord = this.queryEntity(bizAppointmentRecordEditParam.getId());
         checkParam(bizAppointmentRecordEditParam,bizAppointmentRecord);
-        /*if(!StringUtils.equals(bizAppointmentRecord.getTimeId(),bizAppointmentRecordEditParam.getTimeId())){
+        if(!StringUtils.equals(bizAppointmentRecord.getOrderId(),bizAppointmentRecordEditParam.getOrderId())){
             //调整了预约时段,释放之前预约时段的预约次数
-            BizAppointmentTime bizAppointmentTime = bizAppointmentTimeService.getById(bizAppointmentRecord.getTimeId());
-            bizAppointmentTime.setApplyNumberAlready(bizAppointmentTime.getApplyNumberAlready()-1);
-            bizAppointmentTimeService.updateById(bizAppointmentTime);
+            BizOrderConfig bizAppointmentTime = bizOrderConfigService.getOne(new QueryWrapper<BizOrderConfig>().lambda().
+                    eq(BizOrderConfig::getOrderId, bizAppointmentRecord.getOrderId()).
+                    last("limit 1"));
+            if(ObjectUtil.isNotNull(bizAppointmentTime)){
+                bizAppointmentTime.setApplyNumberAlready(bizAppointmentTime.getApplyNumberAlready()-1);
+                bizOrderConfigService.updateById(bizAppointmentTime);
+            }
+
 
             //新的预约时段,增加已约次数
-            BizAppointmentTime time = bizAppointmentTimeService.getById(bizAppointmentRecordEditParam.getTimeId());
-            time.setApplyNumberAlready(time.getApplyNumberAlready()+1);
-            bizAppointmentTimeService.updateById(time);
-        }*/
+            BizOrderConfig time = bizOrderConfigService.getOne(new QueryWrapper<BizOrderConfig>().lambda().
+                    eq(BizOrderConfig::getOrderId, bizAppointmentRecordEditParam.getOrderId()).
+                    last("limit 1"));
+            if(ObjectUtil.isNotNull(time)){
+                time.setApplyNumberAlready(time.getApplyNumberAlready()+1);
+                bizOrderConfigService.updateById(time);
+            }
+
+        }
         if(!StringUtils.equals(bizAppointmentRecord.getOrderId(),bizAppointmentRecordEditParam.getOrderId())){
             bizAppointmentRecordEditParam.setTimeId(bizOrderService.queryEntity(bizAppointmentRecordEditParam.getOrderId()).getDeliveryTimeId());
         }
@@ -298,14 +321,17 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
     @Override
     public void delete(List<BizAppointmentRecordIdParam> bizAppointmentRecordIdParamList) {
         //释放预约数
-        /*for(BizAppointmentRecordIdParam bizAppointmentRecordIdParam : bizAppointmentRecordIdParamList){
+        for(BizAppointmentRecordIdParam bizAppointmentRecordIdParam : bizAppointmentRecordIdParamList){
             BizAppointmentRecord bizAppointmentRecord = this.queryEntity(bizAppointmentRecordIdParam.getId());
-            BizAppointmentTime bizAppointmentTime = bizAppointmentTimeService.getById(bizAppointmentRecord.getTimeId());
+            BizOrderConfig bizAppointmentTime = bizOrderConfigService.getOne(new QueryWrapper<BizOrderConfig>().lambda().
+                    eq(BizOrderConfig::getOrderId, bizAppointmentRecord.getOrderId()).
+                    last("limit 1"));
+            //BizAppointmentTime bizAppointmentTime = bizAppointmentTimeService.getById(bizAppointmentRecord.getTimeId());
             if(ObjectUtil.isNotNull(bizAppointmentTime)){
                 bizAppointmentTime.setApplyNumberAlready(bizAppointmentTime.getApplyNumberAlready()-1);
-                bizAppointmentTimeService.updateById(bizAppointmentTime);
+                bizOrderConfigService.updateById(bizAppointmentTime);
             }
-        }*/
+        }
         // 执行删除
         this.removeByIds(CollStreamUtil.toList(bizAppointmentRecordIdParamList, BizAppointmentRecordIdParam::getId));
     }
@@ -407,18 +433,54 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
         this.updateById(bizAppointmentRecord);
 
         //释放预约数
-        /*BizAppointmentTime bizAppointmentTime = bizAppointmentTimeService.getById(bizAppointmentRecord.getTimeId());
+        BizOrderConfig bizAppointmentTime = bizOrderConfigService.getOne(new QueryWrapper<BizOrderConfig>().lambda().
+                eq(BizOrderConfig::getOrderId, bizAppointmentRecord.getOrderId()).
+                last("limit 1"));
         if(ObjectUtil.isNotNull(bizAppointmentTime)){
             bizAppointmentTime.setApplyNumberAlready(bizAppointmentTime.getApplyNumberAlready()-1);
-            bizAppointmentTimeService.updateById(bizAppointmentTime);
-        }*/
+            bizOrderConfigService.updateById(bizAppointmentTime);
+        }
     }
 
     @Transactional
     @Override
     public void adjustOrder(BizAppointmentRecordEditParam bizAppointmentRecordEditParam) {
         BizAppointmentRecord bizAppointmentRecord = this.queryEntity(bizAppointmentRecordEditParam.getId());
+        //校验订单
+        if(ObjectUtil.isNotEmpty(bizAppointmentRecordEditParam.getOrderId())){
+            BizOrder bizOrder = bizOrderService.getById(bizAppointmentRecordEditParam.getOrderId());
+            if(ObjectUtil.isNotNull(bizOrder)){
+                if(!StringUtils.equals(bizOrder.getOrderStatus(),"3") && !StringUtils.equals(bizOrder.getOrderStatus(),"4")){
+                    throw new CommonException("当前订单不可预约!");
+                }
+                BizGoodsConf bizGoodsConf = bizGoodsConfService.getById(bizOrder.getDeliveryTimeId());
+                if(ObjectUtil.isNotNull(bizGoodsConf)){
+                    if(new Date().getTime() > bizGoodsConf.getConfEndTime().getTime()){
+                        throw new CommonException("提货时间段已过,不可预约!");
+                    }
+                }
+            }
+        }
         if(!StringUtils.equals(bizAppointmentRecord.getOrderId(),bizAppointmentRecordEditParam.getOrderId())){
+            //调整了预约时段,释放之前预约时段的预约次数
+            BizOrderConfig bizAppointmentTime = bizOrderConfigService.getOne(new QueryWrapper<BizOrderConfig>().lambda().
+                    eq(BizOrderConfig::getOrderId, bizAppointmentRecord.getOrderId()).
+                    last("limit 1"));
+            if(ObjectUtil.isNotNull(bizAppointmentTime)){
+                bizAppointmentTime.setApplyNumberAlready(bizAppointmentTime.getApplyNumberAlready()-1);
+                bizOrderConfigService.updateById(bizAppointmentTime);
+            }
+
+
+            //新的预约时段,增加已约次数
+            BizOrderConfig time = bizOrderConfigService.getOne(new QueryWrapper<BizOrderConfig>().lambda().
+                    eq(BizOrderConfig::getOrderId, bizAppointmentRecordEditParam.getOrderId()).
+                    last("limit 1"));
+            if(ObjectUtil.isNotNull(time)){
+                time.setApplyNumberAlready(time.getApplyNumberAlready()+1);
+                bizOrderConfigService.updateById(time);
+            }
+
             //调整过订单
             if(StringUtils.equals(bizAppointmentRecord.getStatus(),"8") || StringUtils.equals(bizAppointmentRecord.getStatus(),"9")){
                 //查询过磅记录重量
@@ -443,6 +505,8 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
             }else{
                 bizAppointmentRecord.setOrderId(bizAppointmentRecordEditParam.getOrderId());
             }
+
+            bizAppointmentRecord.setTimeId(bizOrderService.queryEntity(bizAppointmentRecordEditParam.getOrderId()).getDeliveryTimeId());
             this.updateById(bizAppointmentRecord);
         }
     }

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

@@ -62,5 +62,5 @@ public class BizConfig extends CommonEntity {
     private String accessControlSwitch;
 
     /**装卸损耗预警值配置(百分比)*/
-    private Integer lossWarn;
+    private BigDecimal lossWarn;
 }

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

@@ -139,15 +139,7 @@ public class BizOrderServiceImpl extends ServiceImpl<BizOrderMapper, BizOrder> i
                     compareTo(new BigDecimal(bizGoodsConf.getLastWeight()).add(bizOrder.getOrderWeight())) > 0 ){
                 throw new CommonException("当前时间段货品余量不足!");
             }
-            //旧的提货时段
-            BizGoodsConf goodsConf = bizGoodsConfService.getById(bizOrder.getDeliveryTimeId());
-            //修改时段配置内物品重量
-            bizGoodsConfService.editUsedWeight(goodsConf.getId(),bizOrder.getOrderWeight().negate().doubleValue());
 
-            //修改新时段
-            bizGoodsConfService.editUsedWeight(bizGoodsConf.getId(),bizOrderEditParam.getOrderWeight().multiply(new BigDecimal(1000)).doubleValue());
-        }
-        if(!StringUtils.equals(bizOrderEditParam.getDeliveryTimeId(),bizOrder.getDeliveryTimeId())){
             //修改了提货时段,原来时段的货物重量还原,新的提货时段货物扣减
             //旧的提货时段
             BizGoodsConf goodsConf = bizGoodsConfService.getById(bizOrder.getDeliveryTimeId());
@@ -156,8 +148,21 @@ public class BizOrderServiceImpl extends ServiceImpl<BizOrderMapper, BizOrder> i
 
             //修改新时段
             bizGoodsConfService.editUsedWeight(bizGoodsConf.getId(),bizOrderEditParam.getOrderWeight().multiply(new BigDecimal(1000)).doubleValue());
+
+        }else{
+            if(!StringUtils.equals(bizOrderEditParam.getDeliveryTimeId(),bizOrder.getDeliveryTimeId())){
+                //修改了提货时段,原来时段的货物重量还原,新的提货时段货物扣减
+                //旧的提货时段
+                BizGoodsConf goodsConf = bizGoodsConfService.getById(bizOrder.getDeliveryTimeId());
+                //修改时段配置内物品重量
+                bizGoodsConfService.editUsedWeight(goodsConf.getId(),bizOrder.getOrderWeight().negate().doubleValue());
+
+                //修改新时段
+                bizGoodsConfService.editUsedWeight(bizGoodsConf.getId(),bizOrderEditParam.getOrderWeight().multiply(new BigDecimal(1000)).doubleValue());
+            }
         }
         BeanUtil.copyProperties(bizOrderEditParam, bizOrder);
+        bizOrder.setGoodId(bizGoodsConf.getGoodsId());
         //设置订单重量
         if(bizOrder.getOrderWeight().compareTo(bizOrderEditParam.getOrderWeight()) != 0){
             bizOrder.setOrderWeight(bizOrderEditParam.getOrderWeight().multiply(new BigDecimal(1000)));

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

@@ -132,4 +132,16 @@ public class BizGoodsConfController {
     public CommonResult<List<BizGoodsConf>> getList(BizGoodsConfPageParam goodsConfPageParam) {
         return CommonResult.data(goodsConfService.list(goodsConfPageParam));
     }
+
+    /**
+     * 根据订单id查询提货时间信息
+     *
+     * @author sandy
+     * @date  2025/03/27 10:54
+     */
+    @Operation(summary = "根据订单id查询提货时间信息")
+    @GetMapping("/biz/goodsConf/queryByOrderId")
+    public CommonResult<BizGoodsConf> queryByOrderId(@Valid BizGoodsConfIdParam goodsConfIdParam) {
+        return CommonResult.data(goodsConfService.queryByOrderId(goodsConfIdParam));
+    }
 }

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

@@ -96,4 +96,9 @@ public interface BizGoodsConfService extends IService<BizGoodsConf> {
      **/
     void editUsedWeight(String goodsConfId, Double newUsedWeight);
 
+    /**
+     * 根据订单查询提货时间信息
+     */
+    BizGoodsConf queryByOrderId(BizGoodsConfIdParam goodsConfIdParam);
+
 }

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

@@ -28,6 +28,8 @@ import io.swagger.v3.oas.annotations.media.Schema;
 import jakarta.annotation.Resource;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import vip.xiaonuo.biz.modular.bizorder.entity.BizOrder;
+import vip.xiaonuo.biz.modular.bizorder.service.BizOrderService;
 import vip.xiaonuo.biz.modular.goods.entity.BizGoods;
 import vip.xiaonuo.biz.modular.goods.service.BizGoodsService;
 import vip.xiaonuo.biz.modular.goodsConf.enums.BizGoodsConfEnum;
@@ -59,6 +61,8 @@ public class BizGoodsConfServiceImpl extends ServiceImpl<BizGoodsConfMapper, Biz
 
     @Resource
     private BizGoodsService bizGoodsService;
+    @Resource
+    private BizOrderService bizOrderService;
 
     @Override
     public Page<BizGoodsConf> page(BizGoodsConfPageParam goodsConfPageParam) {
@@ -94,11 +98,11 @@ public class BizGoodsConfServiceImpl extends ServiceImpl<BizGoodsConfMapper, Biz
         }
         queryWrapper.lambda().gt(BizGoodsConf::getConfEndTime, DateUtil.date());
 
-        if(ObjectUtil.isNotEmpty(goodsConfPageParam.getNeedWeight())) {
+        /*if(ObjectUtil.isNotEmpty(goodsConfPageParam.getNeedWeight())) {
             queryWrapper.lambda().ge(BizGoodsConf::getLastWeight, goodsConfPageParam.getNeedWeight());
         }else{
             queryWrapper.lambda().gt(BizGoodsConf::getLastWeight, 0);
-        }
+        }*/
         queryWrapper.lambda().eq(BizGoodsConf::getDeleteFlag, BizGoodsConfEnum.NOT_DELETE.getValue());
         queryWrapper.lambda().orderByAsc(BizGoodsConf::getConfStartTime).orderByAsc(BizGoodsConf::getConfEndTime).orderByAsc(BizGoodsConf::getId);
         return this.list(queryWrapper);
@@ -235,4 +239,13 @@ public class BizGoodsConfServiceImpl extends ServiceImpl<BizGoodsConfMapper, Biz
         }
     }
 
+    @Override
+    public BizGoodsConf queryByOrderId(BizGoodsConfIdParam goodsConfIdParam) {
+        //查询订单信息
+        BizOrder bizOrder = bizOrderService.queryEntity(goodsConfIdParam.getId());
+        //查询提货时间信息
+        BizGoodsConf bizGoodsConf = this.queryEntity(bizOrder.getDeliveryTimeId());
+        return bizGoodsConf;
+    }
+
 }

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

@@ -316,4 +316,32 @@ public class BizRecordController {
         return CommonResult.ok();
     }
 
+    /**
+     * 修改卸货重量
+     *
+     * @author
+     * @date 2025/01/02 16:34
+     */
+    @Operation(summary = "修改卸货重量")
+    @CommonLog("修改卸货重量")
+    @PostMapping("/biz/record/updateWeight")
+    public CommonResult<String> updateWeight(@RequestBody @Valid BizRecordEditParam bizRecordEditParam) {
+        bizRecordService.updateWeight(bizRecordEditParam);
+        return CommonResult.ok();
+    }
+
+
+    /**
+     * 签收审核
+     *
+     * @author
+     * @date 2025/01/02 16:34
+     */
+    @Operation(summary = "签收审核")
+    @CommonLog("签收审核")
+    @PostMapping("/biz/record/auditRecord")
+    public CommonResult<String> auditRecord(@RequestBody @Valid BizRecordEditParam bizRecordEditParam) {
+        bizRecordService.auditRecord(bizRecordEditParam);
+        return CommonResult.ok();
+    }
 }

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

@@ -20,6 +20,7 @@ import vip.xiaonuo.common.pojo.CommonEntity;
 
 import java.math.BigDecimal;
 import java.util.Date;
+import java.util.List;
 
 /**
  * 过磅记录实体
@@ -210,4 +211,13 @@ public class BizRecord extends CommonEntity {
 
     /**二次过磅司机签名确认*/
     private String driverSign;
+
+    /**卸货重量*/
+    private BigDecimal unloadWeight;
+
+    /***单据图片*/
+    private String unloadImg;
+    private String unloadName;
+
+    private String auditReason;
 }

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

@@ -20,6 +20,7 @@ import jakarta.validation.constraints.NotBlank;
 import jakarta.validation.constraints.NotNull;
 import java.math.BigDecimal;
 import java.util.Date;
+import java.util.List;
 
 /**
  * 过磅记录添加参数
@@ -181,4 +182,10 @@ public class BizRecordAddParam {
 
     /**订单id*/
     private String orderId;
+
+    /**卸货重量*/
+    private BigDecimal unloadWeight;
+
+    /***单据图片*/
+    private List<String> fileIdList;
 }

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

@@ -20,6 +20,7 @@ import jakarta.validation.constraints.NotBlank;
 import jakarta.validation.constraints.NotNull;
 import java.math.BigDecimal;
 import java.util.Date;
+import java.util.List;
 
 /**
  * 过磅记录编辑参数
@@ -188,4 +189,15 @@ public class BizRecordEditParam {
     /**司机签名*/
     private String driverSign;
 
+    /**卸货重量*/
+    private BigDecimal unloadWeight;
+
+    /***单据图片*/
+    private List<String> filePathList;
+    private List<String> fileNameList;
+
+    private String auditFlag;
+
+    private String auditReason;
+
 }

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

@@ -115,4 +115,7 @@ public class BizRecordPageParam {
     /**订单id*/
     private String orderId;
 
+    /**签收审核标识*/
+    private String signFlag;
+
 }

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

@@ -15,6 +15,7 @@ package vip.xiaonuo.biz.modular.record.service;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.IService;
 import jakarta.servlet.http.HttpServletResponse;
+import vip.xiaonuo.biz.modular.bizorder.param.BizOrderEditParam;
 import vip.xiaonuo.biz.modular.record.entity.BizRecord;
 import vip.xiaonuo.biz.modular.record.param.*;
 import vip.xiaonuo.biz.modular.record.result.CarResult;
@@ -190,6 +191,13 @@ public interface BizRecordService extends IService<BizRecord> {
     /**发货确认*/
     void confirmRecord(BizRecordIdParam bizRecordIdParam);
 
+    /**司机确认*/
     void updateDriverSign(BizRecordEditParam bizRecordEditParam);
 
+    /**修改卸货重量*/
+    void updateWeight(BizRecordEditParam bizRecordEditParam);
+
+    /**审核**/
+    void auditRecord(BizRecordEditParam bizRecordEditParam);
+
 }

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

@@ -46,7 +46,10 @@ import org.springframework.transaction.annotation.Transactional;
 import vip.xiaonuo.auth.core.util.StpLoginUserUtil;
 import vip.xiaonuo.biz.modular.bizappointmentrecord.entity.BizAppointmentRecord;
 import vip.xiaonuo.biz.modular.bizappointmentrecord.service.BizAppointmentRecordService;
+import vip.xiaonuo.biz.modular.bizconfig.entity.BizConfig;
+import vip.xiaonuo.biz.modular.bizconfig.service.BizConfigService;
 import vip.xiaonuo.biz.modular.bizorder.entity.BizOrder;
+import vip.xiaonuo.biz.modular.bizorder.param.BizOrderEditParam;
 import vip.xiaonuo.biz.modular.bizorder.service.BizOrderService;
 import vip.xiaonuo.biz.modular.mq.MqttSubscribeClient;
 import vip.xiaonuo.biz.modular.record.param.*;
@@ -63,9 +66,11 @@ import vip.xiaonuo.biz.modular.record.mapper.BizRecordMapper;
 import vip.xiaonuo.biz.modular.record.service.BizRecordService;
 import vip.xiaonuo.common.util.CommonDownloadUtil;
 import vip.xiaonuo.common.util.CommonResponseUtil;
+import vip.xiaonuo.dev.api.DevConfigApi;
 
 import java.io.File;
 import java.io.IOException;
+import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
@@ -89,10 +94,17 @@ public class BizRecordServiceImpl extends ServiceImpl<BizRecordMapper, BizRecord
     @Resource
     private MqttSubscribeClient mqttSubscribeClient;
 
+    @Resource
+    private DevConfigApi devConfigApi;
+
+    @Resource
+    private BizConfigService bizConfigService;
+
     @Override
     public Page<BizRecord> page(BizRecordPageParam bizRecordPageParam) {
         QueryWrapper<BizRecord> queryWrapper = getQueryWrapper(bizRecordPageParam);
-        return this.getBaseMapper().getPage(CommonPageRequest.defaultPage(), queryWrapper);
+        Page<BizRecord> page = this.getBaseMapper().getPage(CommonPageRequest.defaultPage(), queryWrapper);
+        return page;
     }
 
     public QueryWrapper<BizRecord> getQueryWrapper(BizRecordPageParam bizRecordPageParam){
@@ -133,6 +145,10 @@ public class BizRecordServiceImpl extends ServiceImpl<BizRecordMapper, BizRecord
         if (ObjectUtil.isNotEmpty(bizRecordPageParam.getIsFlag())){
             queryWrapper.eq("br.weighing_type","1");
         }
+        if (ObjectUtil.isNotEmpty(bizRecordPageParam.getSignFlag())){
+            queryWrapper.in("bar.status","10","11","12","13");
+            queryWrapper.eq("bo.order_type","1");
+        }
         if (ObjectUtil.isNotEmpty(bizRecordPageParam.getOrderName())){
             queryWrapper.like("bo.order_name",bizRecordPageParam.getOrderName());
         }
@@ -574,4 +590,68 @@ public class BizRecordServiceImpl extends ServiceImpl<BizRecordMapper, BizRecord
         mqttSubscribeClient.publishMessage("hnzydb", JSONObject.toJSONString(map));
 
     }
+
+    @Transactional
+    @Override
+    public void updateWeight(BizRecordEditParam bizRecordEditParam) {
+        //修改地磅卸货重量和图片信息
+        BizRecord bizRecord = this.queryEntity(bizRecordEditParam.getId());
+        bizRecord.setUnloadWeight(bizRecordEditParam.getUnloadWeight().multiply(new BigDecimal(1000)));
+        if(ObjectUtil.isNotEmpty(bizRecordEditParam.getFilePathList())){
+            StringBuffer buffer = new StringBuffer();
+            for(String url : bizRecordEditParam.getFilePathList()){
+                buffer.append(url.replace(devConfigApi.getValueByKey("BACKEND_URL"),"")+",");
+            }
+            bizRecord.setUnloadImg(buffer.substring(0,buffer.length()-1));
+        }
+        if(ObjectUtil.isNotEmpty(bizRecordEditParam.getFileNameList())){
+            StringBuffer buffer = new StringBuffer();
+            for(String name : bizRecordEditParam.getFileNameList()){
+                buffer.append(name+",");
+            }
+            bizRecord.setUnloadName(buffer.substring(0,buffer.length()-1));
+        }
+        this.updateById(bizRecord);
+
+        //净重和卸货重量进行对比
+        BigDecimal weight = new BigDecimal(0);
+        if(bizRecord.getNetWeight().compareTo(bizRecordEditParam.getUnloadWeight()) > 0){
+            weight = bizRecord.getNetWeight().subtract(bizRecordEditParam.getUnloadWeight());
+        }else{
+            weight = bizRecordEditParam.getUnloadWeight().subtract(bizRecord.getNetWeight());
+        }
+        //如果差值等于0说明没有误差,预约状态修改为11,已签收
+        //查询预约记录
+        BizAppointmentRecord appointmentRecord = bizAppointmentRecordService.getById(bizRecord.getAppointmentId());
+        if(ObjectUtil.isNotNull(appointmentRecord)){
+            if(weight.compareTo(BigDecimal.ZERO) == 0){
+                appointmentRecord.setStatus("11");
+            }else{
+                //计算差值百分比
+                BigDecimal decimal = weight.divide(bizRecord.getNetWeight()).multiply(new BigDecimal(100));
+                BizConfig bizConfig = bizConfigService.getOne(new QueryWrapper<BizConfig>().lambda().last("limit 1"));
+                if(decimal.compareTo(bizConfig.getLossWarn()) > 0){
+                    appointmentRecord.setStatus("12");
+                }else{
+                    appointmentRecord.setStatus("11");
+                }
+            }
+            bizAppointmentRecordService.updateById(appointmentRecord);
+        }
+    }
+
+    @Override
+    public void auditRecord(BizRecordEditParam bizRecordEditParam) {
+        BizRecord bizRecord = this.queryEntity(bizRecordEditParam.getId());
+        bizRecord.setAuditReason(bizRecordEditParam.getAuditReason());
+        this.updateById(bizRecord);
+        if(ObjectUtil.isNotEmpty(bizRecordEditParam.getAuditFlag())){
+            //查询预约记录
+            BizAppointmentRecord appointmentRecord = bizAppointmentRecordService.getById(bizRecord.getAppointmentId());
+            if(ObjectUtil.isNotNull(appointmentRecord)){
+                appointmentRecord.setStatus("13");
+                bizAppointmentRecordService.updateById(appointmentRecord);
+            }
+        }
+    }
 }

+ 14 - 0
snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/controller/DevFileController.java

@@ -36,6 +36,7 @@ import vip.xiaonuo.dev.modular.file.service.DevFileService;
 
 import java.io.IOException;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 文件控制器
@@ -109,6 +110,19 @@ public class DevFileController {
         return CommonResult.data(devFileService.uploadReturnUrl(DevFileEngineTypeEnum.LOCAL.getValue(), file));
     }
 
+    /**
+     * 本地文件上传,返回文件map
+     *
+     * @author xuyuxiang
+     * @date 2021/10/13 14:01
+     **/
+    @Operation(summary = "上传本地文件返回map")
+    @CommonLog("上传本地文件返回map")
+    @PostMapping("/dev/file/uploadReturnMap")
+    public CommonResult<Map<String,Object>> uploadReturnMap(@RequestPart("file") MultipartFile file) {
+        return CommonResult.data(devFileService.uploadReturnMap(DevFileEngineTypeEnum.LOCAL.getValue(), file));
+    }
+
     /**
      * 阿里云文件上传,返回文件id
      *

+ 3 - 0
snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/service/DevFileService.java

@@ -24,6 +24,7 @@ import vip.xiaonuo.dev.modular.file.param.DevFileUrlListParam;
 
 import java.io.IOException;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 文件Service接口
@@ -49,6 +50,8 @@ public interface DevFileService extends IService<DevFile> {
      **/
     String uploadReturnUrl(String engine, MultipartFile file);
 
+    Map<String,Object> uploadReturnMap(String engine, MultipartFile file);
+
     /**
      * 文件分页列表接口
      *

+ 19 - 3
snowy-plugin/snowy-plugin-dev/src/main/java/vip/xiaonuo/dev/modular/file/service/impl/DevFileServiceImpl.java

@@ -26,6 +26,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.IdWorker;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.google.common.collect.Maps;
 import jakarta.annotation.Resource;
 import jakarta.servlet.http.HttpServletResponse;
 import org.springframework.stereotype.Service;
@@ -35,6 +36,7 @@ import vip.xiaonuo.common.page.CommonPageRequest;
 import vip.xiaonuo.common.prop.CommonProperties;
 import vip.xiaonuo.common.util.CommonDownloadUtil;
 import vip.xiaonuo.common.util.CommonResponseUtil;
+import vip.xiaonuo.dev.api.DevConfigApi;
 import vip.xiaonuo.dev.modular.file.entity.DevFile;
 import vip.xiaonuo.dev.modular.file.enums.DevFileEngineTypeEnum;
 import vip.xiaonuo.dev.modular.file.mapper.DevFileMapper;
@@ -53,6 +55,7 @@ import java.io.IOException;
 import java.math.BigDecimal;
 import java.math.RoundingMode;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 文件Service接口实现类
@@ -65,6 +68,8 @@ public class DevFileServiceImpl extends ServiceImpl<DevFileMapper, DevFile> impl
 
     @Resource
     private CommonProperties commonProperties;
+    @Resource
+    private DevConfigApi devConfigApi;
 
     @Override
     public String uploadReturnId(String engine, MultipartFile file) {
@@ -76,6 +81,16 @@ public class DevFileServiceImpl extends ServiceImpl<DevFileMapper, DevFile> impl
         return this.storageFile(engine, file, false);
     }
 
+    @Override
+    public Map<String, Object> uploadReturnMap(String engine, MultipartFile file) {
+        String fileId = this.storageFile(engine, file, true);
+        DevFile devFile = this.queryEntity(fileId);
+        Map<String,Object> map = Maps.newHashMap();
+        map.put("name",devFile.getName());
+        map.put("url",devFile.getDownloadPath());
+        return map;
+    }
+
     @Override
     public Page<DevFile> page(DevFilePageParam devFilePageParam) {
         QueryWrapper<DevFile> queryWrapper = new QueryWrapper<DevFile>().checkSqlInjection();
@@ -208,11 +223,12 @@ public class DevFileServiceImpl extends ServiceImpl<DevFileMapper, DevFile> impl
 
         // 下载路径,注意:本地文件下载地址设置为下载接口地址 + 文件id
         if(engine.equals(DevFileEngineTypeEnum.LOCAL.getValue())) {
-            String apiUrl = commonProperties.getBackendUrl();
+            //String apiUrl = commonProperties.getBackendUrl();
+            String apiUrl = devConfigApi.getValueByKey("BACKEND_URL");
             if(ObjectUtil.isEmpty(apiUrl)) {
                 throw new CommonException("后端域名地址未正确配置:snowy.config.common.backend-url为空");
             }
-            downloadUrl= apiUrl + "/dev/file/download?id=" + fileId;
+            downloadUrl= "/dev/file/download?id=" + fileId;
             devFile.setDownloadPath(downloadUrl);
         } else {
             // 阿里云、腾讯云、MINIO可以直接使用存储地址(公网)作为下载地址
@@ -227,7 +243,7 @@ public class DevFileServiceImpl extends ServiceImpl<DevFileMapper, DevFile> impl
             return fileId;
         } else {
             // 否则返回下载地址
-            return downloadUrl;
+            return devConfigApi.getValueByKey("BACKEND_URL") + downloadUrl;
         }
     }