Преглед на файлове

1、车辆运单新增单证更新审核中状态;

zk преди 2 години
родител
ревизия
c5ffcdb0c8

+ 3 - 3
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/controller/KwtWaybillOrderController.java

@@ -59,9 +59,9 @@ public class KwtWaybillOrderController {
      * @date 2023/8/1
      **/
     @PostMapping("/findSumByDriver")
-    public HttpResult findSumByDriver(@RequestBody Map params){
+    public HttpResult findSumByDriver(@RequestBody Map<String, Object> params){
         params.put("driverId", LoginUserHolder.getUserId());
-        Map count = waybillOrderService.findStatisticsSumByDriver(params);
+        Map<String, Object> count = waybillOrderService.findStatisticsSumByDriver(params);
         return HttpResult.ok(count);
     }
 
@@ -72,7 +72,7 @@ public class KwtWaybillOrderController {
      * @date 2023/8/1
      **/
     @PostMapping("/findWaybillOrderByDriver")
-    public HttpResult findWaybillOrderByDriver(@RequestBody Map params){
+    public HttpResult findWaybillOrderByDriver(@RequestBody Map<String, Object> params){
         params.put("driverId", LoginUserHolder.getUserId());
         /**校验**/
         if (StringUtils.isBlank(params.get("busStatus"))) {

+ 8 - 4
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/KwtWaybillOrderService.java

@@ -99,7 +99,7 @@ public class KwtWaybillOrderService {
      * @author zk
      * @date 2023/8/1
      **/
-    public Map findStatisticsCountByDriver(Long driverId) {
+    public Map<String, Object> findStatisticsCountByDriver(Long driverId) {
         return waybillOrderDao.findStatisticsCountByDriver(driverId);
     }
 
@@ -109,7 +109,7 @@ public class KwtWaybillOrderService {
      * @author zk
      * @date 2023/8/1
      **/
-    public Map findStatisticsSumByDriver(Map params) {
+    public Map<String, Object> findStatisticsSumByDriver(Map params) {
         return waybillOrderDao.findStatisticsSumByDriver(params);
     }
 
@@ -1935,6 +1935,7 @@ public class KwtWaybillOrderService {
         BigDecimal deficitPrice = deficitPrice(waybillOrder.getLoadAmount(), waybillOrder.getDeficitAmount(),
                 logisticsOrder.getLoss(), logisticsOrder.getLossUnit(), logisticsOrder.getGoodsPrice());
         waybillOrder.setDeficitPrice(deficitPrice);
+        waybillOrder.setStatus(CarWaybillEnum.APPROVAL_IN.getCode());
         waybillOrderDao.updateById(waybillOrder);
 
         /**3更新榜单信息**/
@@ -1949,7 +1950,10 @@ public class KwtWaybillOrderService {
         unloadTicket.setOperateTime(params.getUnloadOperateTime());
         waybillOrderTicketDao.updateById(unloadTicket);
 
-        /**4Mongodb数据更新**/
+        /**4新增运单状态记录**/
+        setWaybillOrderTrack(waybillOrder.getId(), waybillOrder.getUpdateTime(), waybillOrder.getStatus(), params.getRemark());
+
+        /**5Mongodb数据更新**/
         //1车辆运单
         SckwWaybillOrder wOrder = new SckwWaybillOrder();
         wOrder.set_id(waybillOrder.getId());
@@ -1965,7 +1969,7 @@ public class KwtWaybillOrderService {
 
         /**5发送消息**/
 
-        return HttpResult.ok("车辆运单审核完成!");
+        return HttpResult.ok("车辆运单单证更新完成!");
     }
 
     /**

+ 17 - 5
sckw-modules/sckw-transport/src/main/resources/mapper/KwtWaybillOrderMapper.xml

@@ -178,10 +178,10 @@
             and wo.status = 8
         </if>
         <if test="loadCountStatus != null and loadCountStatus != ''">
-            and wo.status in (5, 6, 7, 8, 12)
+            and wo.status in (5, 6, 7, 8, 12, 13)
         </if>
         <if test="unloadCountStatus != null and unloadCountStatus != ''">
-            and wo.status in (7, 8, 12)
+            and wo.status in (7, 8, 12, 13)
         </if>
         <if test="upperlOrderId != null and upperlOrderId != ''">
             and FIND_IN_SET(#{upperlOrderId, jdbcType=BIGINT}, pids)
@@ -271,7 +271,7 @@
                        LEFT JOIN kwt_logistics_order lo on lo.id = wo.l_order_id
               where wo.del_flag = 0
                 and lo.del_flag = 0
-                and wo.status in (7, 8, 9, 10, 11, 12)
+                and wo.status in (7, 8, 9, 10, 11, 12, 13)
                 and wo.driver_id = #{driverId, jdbcType=BIGINT}) tabE on tabE.indexNum = tabA.indexNum
     </select>
 
@@ -284,7 +284,7 @@
         LEFT JOIN kwt_logistics_order lo on lo.id = wo.l_order_id
         where wo.del_flag = 0 and lo.del_flag = 0
         <if test="busStatus != null and busStatus == 4">
-            and wo.status in (7, 8, 9, 10, 11, 12)
+            and wo.status in (7, 8, 9, 10, 11, 12, 13)
         </if>
         <if test="driverId != null and driverId != ''">
             and wo.driver_id = #{driverId, jdbcType=BIGINT}
@@ -292,6 +292,12 @@
         <if test="month != null and month != ''">
             and LEFT(wo.create_time, 7) = #{month, jdbcType=TIMESTAMP}
         </if>
+        <if test="month != null and month != ''">
+            and DATE(wo.create_time) <![CDATA[ >= ]]> #{startTime,jdbcType=TIMESTAMP}
+        </if>
+        <if test="month != null and month != ''">
+            and DATE(wo.create_time) <![CDATA[ <= ]]> #{endTime,jdbcType=TIMESTAMP}
+        </if>
     </select>
 
     <select id="findWaitWaybillOrderByDriver" resultType="com.sckw.transport.model.vo.WaybillOrderDriverVo"
@@ -403,11 +409,17 @@
             and wo.status in (3, 4, 5, 6)
         </if>
         <if test="busStatus != null and busStatus == 4">
-            and wo.status in (7, 8, 9, 10, 11, 12)
+            and wo.status in (7, 8, 9, 10, 11, 12, 13)
         </if>
         <if test="month != null and month != ''">
             and LEFT(wo.create_time, 7) = #{month, jdbcType=TIMESTAMP}
         </if>
+        <if test="month != null and month != ''">
+            and DATE(wo.create_time) <![CDATA[ >= ]]> #{startTime,jdbcType=TIMESTAMP}
+        </if>
+        <if test="month != null and month != ''">
+            and DATE(wo.create_time) <![CDATA[ <= ]]> #{endTime,jdbcType=TIMESTAMP}
+        </if>
     </select>
     <select id="selectWaybillOrderCarListNotPage" resultType="com.sckw.transport.model.dto.OrderCarDTO">
         SELECT a.id            as wOrderId,