From a6c2271fc67508c41f680856e24744e4eebb78c0 Mon Sep 17 00:00:00 2001
From: wujianwei <wjw@11.com>
Date: 星期四, 04 九月 2025 15:39:37 +0800
Subject: [PATCH] 修改接口
---
service/src/main/java/com/ruoyi/cwgl/service/impl/KeyCollectionInfoServiceImpl.java | 3 +++
api/src/main/java/com/ruoyi/api/third/controller/LockerApiController.java | 8 +++++++-
service/src/main/resources/mapper/cwgl/KeyCollectionInfoMapper.xml | 6 +++++-
3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/api/src/main/java/com/ruoyi/api/third/controller/LockerApiController.java b/api/src/main/java/com/ruoyi/api/third/controller/LockerApiController.java
index 3a26bca..1e67639 100644
--- a/api/src/main/java/com/ruoyi/api/third/controller/LockerApiController.java
+++ b/api/src/main/java/com/ruoyi/api/third/controller/LockerApiController.java
@@ -2,6 +2,7 @@
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.cwgl.domain.KeyCollectionInfo;
import com.ruoyi.cwgl.domain.RequestLog;
import com.ruoyi.cwgl.domain.dto.ReturnReportDto;
@@ -42,13 +43,18 @@
@PostMapping("/takeReview")
public AjaxResult takeReview(@Valid @RequestBody TakeReviewDto takeReviewDto){
+ logger.info("璇锋眰涓婃姤鍙傛暟{}",takeReviewDto);
KeyCollectionInfo keyCollectionInfo = keyCollectionInfoService.selectCwData(takeReviewDto);
//娣诲姞璇锋眰鏃ュ織
RequestLog requestLog = new RequestLog();
requestLog.setDriverCode(takeReviewDto.getDriverCode());
requestLog.setDriverName(takeReviewDto.getDriverName());
requestLog.setReqTime(takeReviewDto.getHandleTime());
- requestLog.setBoxNum(keyCollectionInfo.getBoxNum());
+ if (keyCollectionInfo!=null){
+ String boxNum = keyCollectionInfo.getBoxNum();
+ requestLog.setBoxNum(boxNum);
+
+ }
requestLog.setType(0);
logService.insertRequestLog(requestLog);
diff --git a/service/src/main/java/com/ruoyi/cwgl/service/impl/KeyCollectionInfoServiceImpl.java b/service/src/main/java/com/ruoyi/cwgl/service/impl/KeyCollectionInfoServiceImpl.java
index 5ebdba2..31c195c 100644
--- a/service/src/main/java/com/ruoyi/cwgl/service/impl/KeyCollectionInfoServiceImpl.java
+++ b/service/src/main/java/com/ruoyi/cwgl/service/impl/KeyCollectionInfoServiceImpl.java
@@ -204,6 +204,7 @@
//璋冨害瓒呮椂
Integer schedulingTimeout = keyCollectionInfo.getSchedulingTimeout();
if(schedulingTimeout>5){
+ logger.info("璋冨害瓒呮椂涓嬪崟锛岃秴鏃�"+schedulingTimeout+"涓皬鏃�");
return AjaxResult.error("璋冨害瓒呮椂涓嬪崟锛岃秴鏃�"+schedulingTimeout+"涓皬鏃�",3);
}
@@ -211,10 +212,12 @@
if (keyTimeout!=null && keyTimeout>24){
Date estimatedDepartureTime = keyCollectionInfo.getEstimatedDepartureTime();
String dateToStr = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, estimatedDepartureTime);
+ logger.info("瑕佹眰鍑哄彂鏃堕棿"+ dateToStr+"锛岄鍙栭挜鍖欒秴鏃�"+keyTimeout+"涓皬鏃�");
return AjaxResult.error("瑕佹眰鍑哄彂鏃堕棿"+ dateToStr+"锛岄鍙栭挜鍖欒秴鏃�"+keyTimeout+"涓皬鏃�");
}
AjaxResult success = new AjaxResult(0, "鎴愬姛",2);
success.put("boxNum",keyCollectionInfo.getBoxNum());
+ logger.info("鎴愬姛杩斿洖{}",success);
return success;
}
}
diff --git a/service/src/main/resources/mapper/cwgl/KeyCollectionInfoMapper.xml b/service/src/main/resources/mapper/cwgl/KeyCollectionInfoMapper.xml
index 6c711f7..782eda6 100644
--- a/service/src/main/resources/mapper/cwgl/KeyCollectionInfoMapper.xml
+++ b/service/src/main/resources/mapper/cwgl/KeyCollectionInfoMapper.xml
@@ -27,10 +27,11 @@
<result property="quantity" column="quantity" />
<result property="dispatchQuantity" column="dispatch_quantity" />
<result property="remark" column="remark" />
+ <result property="boxNum" column="box_num" />
</resultMap>
<sql id="selectKeyCollectionInfoVo">
- select thisTab.id, thisTab.customer_name, thisTab.carrier, thisTab.dispatch_no, thisTab.driver_name, thisTab.driver_mobile, thisTab.license_plate_number, thisTab.order_time, thisTab.order_created_time, thisTab.dispatch_created_time, thisTab.key_collection_time, thisTab.estimated_departure_time, thisTab.required_arrival_time, thisTab.consignor_address, thisTab.consignee_address, thisTab.main_driver, thisTab.point_num, thisTab.transport_mode, thisTab.assistant_driver, thisTab.quantity, thisTab.dispatch_quantity, thisTab.remark from key_collection_info AS thisTab
+ select thisTab.id, thisTab.customer_name, thisTab.carrier, thisTab.dispatch_no, thisTab.driver_name, thisTab.driver_mobile, thisTab.license_plate_number, thisTab.order_time, thisTab.order_created_time, thisTab.dispatch_created_time, thisTab.key_collection_time, thisTab.estimated_departure_time, thisTab.required_arrival_time, thisTab.consignor_address, thisTab.consignee_address, thisTab.main_driver, thisTab.point_num, thisTab.transport_mode, thisTab.assistant_driver, thisTab.quantity, thisTab.dispatch_quantity, thisTab.remark, thisTab.box_num from key_collection_info AS thisTab
</sql>
<sql id="selectKeyCollectionInfoVoCount">
select count(0) from key_collection_info as thisTab
@@ -56,6 +57,7 @@
<if test="transportMode != null and transportMode != ''"> and thisTab.transport_mode = #{transportMode}</if>
<if test="assistantDriver != null and assistantDriver != ''"> and thisTab.assistant_driver = #{assistantDriver}</if>
<if test="quantity != null "> and thisTab.quantity = #{quantity}</if>
+ <if test="boxNum != null "> and thisTab.box_num = #{boxNum}</if>
<if test="dispatchQuantity != null "> and thisTab.dispatch_quantity = #{dispatchQuantity}</if>
</sql>
@@ -153,6 +155,7 @@
<if test="quantity != null">quantity,</if>
<if test="dispatchQuantity != null">dispatch_quantity,</if>
<if test="remark != null">remark,</if>
+ <if test="boxNum != null">box_num,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="customerName != null">#{customerName},</if>
@@ -176,6 +179,7 @@
<if test="quantity != null">#{quantity},</if>
<if test="dispatchQuantity != null">#{dispatchQuantity},</if>
<if test="remark != null">#{remark},</if>
+ <if test="boxNum != null">#{boxNum},</if>
</trim>
</insert>
--
Gitblit v1.8.0