Răsfoiți Sursa

1、4.2接口调整;

zk 1 an în urmă
părinte
comite
93163ba466

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

@@ -42,7 +42,6 @@ public class KwtWaybillOrderController {
     @Autowired
     KwtWaybillOrderV1Service waybillOrderV1Service;
 
-
     /**
      * @param params 请求参数
      * @desc 统计
@@ -120,6 +119,16 @@ public class KwtWaybillOrderController {
         return waybillOrderV1Service.waybillSubtaskDetail(wSubtaskId);
     }
 
+    /**
+     * @desc 获取企业地址信息
+     * @author zk
+     * @date 2023/9/1
+     **/
+    @GetMapping("/findAddressList")
+    public HttpResult findAddressList(){
+        return HttpResult.ok(waybillOrderV1Service.findAddressList());
+    }
+
     /**
      * @desc 统计司机任务数(待接单/出车/执行/完结)
      * @author zk

+ 2 - 6
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/KwtTransportCommonService.java

@@ -172,14 +172,10 @@ public class KwtTransportCommonService {
      * @return
      */
     private OrderDetailVO getOrderData(DocumentParamDTO dto) {
-        KwtLogisticsOrder logisticsOrder = logisticsOrderMapper.selectOne(new LambdaQueryWrapper<KwtLogisticsOrder>()
-                .eq(KwtLogisticsOrder::getId, dto.getId())
-                .eq(StringUtils.isNotBlank(dto.getDocumentNo()), KwtLogisticsOrder::getLOrderNo, dto.getDocumentNo())
-        );
+        KwtLogisticsOrder logisticsOrder = logisticsOrderMapper.selectById(dto.getId());
         if (logisticsOrder == null) {
             log.info("查无单据:{}", JSONObject.toJSONString(dto));
             throw new RuntimeException("查无单据");
-
         }
         KwtLogisticsOrderContract contract = logisticsOrderContractMapper.selectOne(new LambdaQueryWrapper<KwtLogisticsOrderContract>()
                 .eq(StringUtils.isNotBlank(dto.getId()), KwtLogisticsOrderContract::getLOrderId, dto.getId()));
@@ -401,7 +397,7 @@ public class KwtTransportCommonService {
                 orderDetailVO.setOrderAmount(new BigDecimal(count).multiply(price).subtract(fineValue));
             }
         } else {
-            orderDetailVO.setOrderAmount(logisticsOrder.getAmount().multiply(logisticsOrder.getPrice()));
+            orderDetailVO.setOrderAmount(NumberUtils.parseBigDecimal(logisticsOrder.getAmount()).multiply(NumberUtils.parseBigDecimal(logisticsOrder.getPrice())));
         }
         return orderDetailVO;
     }

+ 22 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/KwtWaybillOrderV1Service.java

@@ -23,6 +23,7 @@ import com.sckw.fleet.api.model.vo.RTruckVo;
 import com.sckw.mongo.model.SckwWaybillOrder;
 import com.sckw.order.api.dubbo.TradeOrderInfoService;
 import com.sckw.system.api.RemoteSystemService;
+import com.sckw.system.api.model.dto.res.AreaTreeFrontResDto;
 import com.sckw.system.api.model.dto.res.EntCacheResDto;
 import com.sckw.system.api.model.dto.res.SysDictResDto;
 import com.sckw.system.api.model.dto.res.UserCacheResDto;
@@ -676,6 +677,27 @@ public class KwtWaybillOrderV1Service {
         return list;
     }
 
+    /**
+     * @desc 获取企业地址信息
+     * @author zk
+     * @date 2023/9/1
+     **/
+    public AddressDropListDTO findAddressList() {
+        AddressDropListDTO res = new AddressDropListDTO();
+        //装货地址树
+        List<Integer> loadAddressList = waybillOrderAddressDao.findAddressCodeList(LoginUserHolder.getEntId(), Global.NUMERICAL_ONE);
+        //卸货地址树
+        List<Integer> unloadAddressList = waybillOrderAddressDao.findAddressCodeList(LoginUserHolder.getEntId(), Global.NUMERICAL_TWO);
+
+        //装货地址下拉列表树
+        List<AreaTreeFrontResDto> loadTree = remoteSystemService.queryAreaTreeFrontByCodeList(loadAddressList);
+        res.setLoadAddressList(loadTree);
+        //卸货地址下拉列表树
+        List<AreaTreeFrontResDto> unloadTree = remoteSystemService.queryAreaTreeFrontByCodeList(unloadAddressList);
+        res.setUnloadAddressList(unloadTree);
+        return res;
+    }
+
     /**
      * @param params 派车参数
      * @desc 派车-多装多卸

+ 13 - 5
sckw-modules/sckw-transport/src/main/resources/mapper/KwtWaybillOrderAddressMapper.xml

@@ -9,8 +9,12 @@
         update_by updateBy, update_time updateTime
         from kwt_waybill_order_address
         where del_flag = 0
-        and w_order_id = #{wOrderId, jdbcType=BIGINT}
-        and address_type = #{addressType, jdbcType=INTEGER}
+        <if test="wOrderId != null and wOrderId != ''">
+            and w_order_id = #{wOrderId, jdbcType=BIGINT}
+        </if>
+        <if test="addressType != null and addressType != ''">
+            and address_type = #{addressType, jdbcType=INTEGER}
+        </if>
         order by sort
     </select>
 
@@ -22,9 +26,11 @@
         `status`, create_by createBy, create_time createTime, update_by updateBy, update_time updateTime
         from kwt_waybill_order_address
         where del_flag = 0
-        and w_order_id = #{wOrderId, jdbcType=BIGINT}
+        <if test="wOrderId != null and wOrderId != ''">
+            and w_order_id = #{wOrderId, jdbcType=BIGINT}
+        </if>
         <if test="addressType != null and addressType != ''">
-            and address_type = #{addressType, jdbcType=BIGINT}
+            and address_type = #{addressType, jdbcType=INTEGER}
         </if>
         order by sort
     </select>
@@ -37,7 +43,9 @@
         `status`, create_by createBy, create_time createTime, update_by updateBy, update_time updateTime
         from kwt_waybill_order_address
         where del_flag = 0
-        and w_subtask_id = #{wSubtaskId, jdbcType=BIGINT}
+        <if test="wSubtaskId != null and wSubtaskId != ''">
+            and w_subtask_id = #{wSubtaskId, jdbcType=BIGINT}
+        </if>
         <if test="addressType != null and addressType != ''">
             and address_type = #{addressType, jdbcType=BIGINT}
         </if>