Преглед изворни кода

Merge remote-tracking branch 'origin/dev' into dev

xucaiqin пре 2 година
родитељ
комит
a870a9da53

+ 1 - 1
sckw-modules/sckw-product/src/main/java/com/sckw/product/model/vo/res/OperationGoodsList.java

@@ -28,7 +28,7 @@ public class OperationGoodsList{
     /**
     /**
      * 商品编号
      * 商品编号
      */
      */
-    private Long code;
+    private String code;
 
 
 
 
     /**
     /**

+ 4 - 2
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/dao/KwtLogisticsOrderMapper.java

@@ -237,7 +237,8 @@ public interface KwtLogisticsOrderMapper extends BaseMapper<KwtLogisticsOrder> {
                                                          @Param("type") String type,
                                                          @Param("type") String type,
                                                          @Param("entId") Long entId,
                                                          @Param("entId") Long entId,
                                                          @Param("contactsIds") List<Long> contactsIds,
                                                          @Param("contactsIds") List<Long> contactsIds,
-                                                         @Param("userIds") List<Long> userIds
+                                                         @Param("userIds") List<Long> userIds,
+                                                         @Param("idsList") List<Long> idsList
     );
     );
 
 
     /**
     /**
@@ -269,7 +270,8 @@ public interface KwtLogisticsOrderMapper extends BaseMapper<KwtLogisticsOrder> {
                                                     @Param("type") String type,
                                                     @Param("type") String type,
                                                     @Param("entId") Long entId,
                                                     @Param("entId") Long entId,
                                                     @Param("contactsIds") List<Long> contactsIds,
                                                     @Param("contactsIds") List<Long> contactsIds,
-                                                    @Param("userIds") List<Long> userIds
+                                                    @Param("userIds") List<Long> userIds,
+                                                    @Param("idsList") List<Long> idsList
     );
     );
 
 
 
 

+ 2 - 1
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/AcceptCarriageOrderService.java

@@ -2435,7 +2435,8 @@ public class AcceptCarriageOrderService {
         List<Long> longs = LoginUserHolder.getAuthUserIdList();
         List<Long> longs = LoginUserHolder.getAuthUserIdList();
         longs.add(LoginUserHolder.getUserId());
         longs.add(LoginUserHolder.getUserId());
         List<Long> longList = longs.stream().distinct().collect(Collectors.toList());
         List<Long> longList = longs.stream().distinct().collect(Collectors.toList());
-        List<TableTops> list = logisticsOrderMapper.countLogisticsOrderListByStatus(query, orderList, type, entId, longList, longList);
+        List<Long> idsList = StringUtils.splitStrToList(query.getIds(), Long.class);
+        List<TableTops> list = logisticsOrderMapper.countLogisticsOrderListByStatus(query, orderList, type, entId, longList, longList,idsList);
         List<TableTops> arrayList = new ArrayList<>();
         List<TableTops> arrayList = new ArrayList<>();
         arrayList.addAll(list);
         arrayList.addAll(list);
         /**补全数据状态不齐的情况*/
         /**补全数据状态不齐的情况*/

+ 4 - 2
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/ConsignOrderService.java

@@ -1770,7 +1770,8 @@ public class ConsignOrderService {
         List<Long> longs = LoginUserHolder.getAuthUserIdList();
         List<Long> longs = LoginUserHolder.getAuthUserIdList();
         longs.add(LoginUserHolder.getUserId());
         longs.add(LoginUserHolder.getUserId());
         List<Long> longList = longs.stream().distinct().collect(Collectors.toList());
         List<Long> longList = longs.stream().distinct().collect(Collectors.toList());
-        List<TableTops> list = kwtLogisticsOrderMapper.countLogisticsOrderListByStatus(query, orderList, type, entId, longList, longList);
+        List<Long> idsList = StringUtils.splitStrToList(query.getIds(), Long.class);
+        List<TableTops> list = kwtLogisticsOrderMapper.countLogisticsOrderListByStatus(query, orderList, type, entId, longList, longList,idsList);
         List<TableTops> arrayList = new ArrayList<>();
         List<TableTops> arrayList = new ArrayList<>();
         arrayList.addAll(list);
         arrayList.addAll(list);
         /**补全数据状态不齐的情况*/
         /**补全数据状态不齐的情况*/
@@ -1864,7 +1865,8 @@ public class ConsignOrderService {
         List<Long> longs = LoginUserHolder.getAuthUserIdList();
         List<Long> longs = LoginUserHolder.getAuthUserIdList();
         longs.add(LoginUserHolder.getUserId());
         longs.add(LoginUserHolder.getUserId());
         List<Long> longList = longs.stream().distinct().collect(Collectors.toList());
         List<Long> longList = longs.stream().distinct().collect(Collectors.toList());
-        List<ConsignOrderVO> list = kwtLogisticsOrderMapper.selectConsignLogisticsOrderList(query, orderList, type, entId, longList, longList);
+        List<Long> idsList = StringUtils.splitStrToList(query.getIds(), Long.class);
+        List<ConsignOrderVO> list = kwtLogisticsOrderMapper.selectConsignLogisticsOrderList(query, orderList, type, entId, longList, longList,idsList);
         /**计费方式*/
         /**计费方式*/
         Map<String, String> chargingDictData = commonService.getDictData(DictTypeEnum.CHARGING_TYPE.getType());
         Map<String, String> chargingDictData = commonService.getDictData(DictTypeEnum.CHARGING_TYPE.getType());
         /**结算周期*/
         /**结算周期*/

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

@@ -625,9 +625,9 @@ public class TransportCommonService {
                  */
                  */
                 BigDecimal actualAmount = new BigDecimal("0.00");
                 BigDecimal actualAmount = new BigDecimal("0.00");
                 if (DictEnum.CHARGING_TYPE_1.getValue().equals(billingMode)) {
                 if (DictEnum.CHARGING_TYPE_1.getValue().equals(billingMode)) {
-                    actualAmount = logisticsOrderDTO.getTotalLoadAmount().multiply(price);
+                    actualAmount = (logisticsOrderDTO.getTotalLoadAmount()==null?new BigDecimal("0.00"):logisticsOrderDTO.getTotalLoadAmount()).multiply(price);
                 } else if (DictEnum.CHARGING_TYPE_2.getValue().equals(billingMode)) {
                 } else if (DictEnum.CHARGING_TYPE_2.getValue().equals(billingMode)) {
-                    actualAmount = logisticsOrderDTO.getTotalUnloadAmount().multiply(price).subtract(fineValue);
+                    actualAmount = (logisticsOrderDTO.getTotalUnloadAmount()==null?new BigDecimal("0.00"):logisticsOrderDTO.getTotalUnloadAmount()).multiply(price).subtract(fineValue);
                 }
                 }
                 logisticsOrderDTO.setTaxMoney(actualAmount);
                 logisticsOrderDTO.setTaxMoney(actualAmount);
 //                logisticsOrderDTO.setContractId();
 //                logisticsOrderDTO.setContractId();

+ 3 - 3
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/dubbo/TransportDubboServiceImpl.java

@@ -216,7 +216,7 @@ public class TransportDubboServiceImpl implements TransportDubboService {
                 //罚款值
                 //罚款值
                 BigDecimal fineValue = (logisticsOrderDTO.getGoodsPrice() == null ? new BigDecimal("0.00") : logisticsOrderDTO.getGoodsPrice()).multiply(deductWeighNumber);
                 BigDecimal fineValue = (logisticsOrderDTO.getGoodsPrice() == null ? new BigDecimal("0.00") : logisticsOrderDTO.getGoodsPrice()).multiply(deductWeighNumber);
                 /**
                 /**
-                *
+                 *
                  * 二、运价计算:
                  * 二、运价计算:
                  * 1、按装货量:总运价=实装量*运价
                  * 1、按装货量:总运价=实装量*运价
                  * 2、按卸货量:总运价=实卸量*运价-罚款值
                  * 2、按卸货量:总运价=实卸量*运价-罚款值
@@ -224,9 +224,9 @@ public class TransportDubboServiceImpl implements TransportDubboService {
                  */
                  */
                 BigDecimal actualAmount = new BigDecimal("0.00");
                 BigDecimal actualAmount = new BigDecimal("0.00");
                 if (DictEnum.CHARGING_TYPE_1.getValue().equals(billingMode)) {
                 if (DictEnum.CHARGING_TYPE_1.getValue().equals(billingMode)) {
-                    actualAmount = logisticsOrderDTO.getTotalLoadAmount().multiply(price);
+                    actualAmount = (logisticsOrderDTO.getTotalLoadAmount() == null ? new BigDecimal("0.00") : logisticsOrderDTO.getTotalLoadAmount()).multiply(price);
                 } else if (DictEnum.CHARGING_TYPE_2.getValue().equals(billingMode)) {
                 } else if (DictEnum.CHARGING_TYPE_2.getValue().equals(billingMode)) {
-                    actualAmount = logisticsOrderDTO.getTotalUnloadAmount().multiply(price).subtract(fineValue);
+                    actualAmount = (logisticsOrderDTO.getTotalUnloadAmount() == null ? new BigDecimal("0.00") : logisticsOrderDTO.getTotalUnloadAmount()).multiply(price).subtract(fineValue);
                 }
                 }
                 logisticsOrderDTO.setTaxMoney(actualAmount);
                 logisticsOrderDTO.setTaxMoney(actualAmount);
 //                logisticsOrderDTO.setContractId();
 //                logisticsOrderDTO.setContractId();

+ 94 - 82
sckw-modules/sckw-transport/src/main/resources/mapper/KwtLogisticsOrderMapper.xml

@@ -881,7 +881,7 @@
             a.del_flag = 0
             a.del_flag = 0
             <if test="type == 1">
             <if test="type == 1">
 <!--                and (d.top_ent_id = #{entId} or d.ent_id = #{entId})-->
 <!--                and (d.top_ent_id = #{entId} or d.ent_id = #{entId})-->
-                                AND (
+                                AND ((
                                 a.ent_id = #{entId}
                                 a.ent_id = #{entId}
                                 <if test="userIds != null and userIds.size()>0">
                                 <if test="userIds != null and userIds.size()>0">
                                     AND a.create_by IN
                                     AND a.create_by IN
@@ -898,11 +898,11 @@
                                         #{item}
                                         #{item}
                                     </foreach>
                                     </foreach>
                                 </if>
                                 </if>
-                                 )
+                                 ))
             </if>
             </if>
             <if test="type == 2">
             <if test="type == 2">
 <!--                and (e.top_ent_id = #{entId} or e.ent_id = #{entId})-->
 <!--                and (e.top_ent_id = #{entId} or e.ent_id = #{entId})-->
-                                AND (
+                                AND ((
                                 a.ent_id = #{entId}
                                 a.ent_id = #{entId}
                                 <if test="userIds != null and userIds.size()>0">
                                 <if test="userIds != null and userIds.size()>0">
                                     AND a.create_by IN
                                     AND a.create_by IN
@@ -912,14 +912,14 @@
                                 </if>
                                 </if>
                                 )
                                 )
                                 OR (
                                 OR (
-                                d.top_ent_id = #{entId}
+                                e.top_ent_id = #{entId}
                                 <if test="contactsIds != null and contactsIds.size()>0">
                                 <if test="contactsIds != null and contactsIds.size()>0">
-                                    AND d.contacts_id IN
+                                    AND e.contacts_id IN
                                     <foreach collection="contactsIds" separator="," item="item" close=")" open="(">
                                     <foreach collection="contactsIds" separator="," item="item" close=")" open="(">
                                         #{item}
                                         #{item}
                                     </foreach>
                                     </foreach>
                                 </if>
                                 </if>
-                                )
+                                ))
             </if>
             </if>
             <if test="query.keywords != null and query.keywords != ''">
             <if test="query.keywords != null and query.keywords != ''">
                 and (
                 and (
@@ -1105,46 +1105,46 @@
         <where>
         <where>
             a.del_flag = 0
             a.del_flag = 0
             <if test="type == 1">
             <if test="type == 1">
-                and (d.top_ent_id = #{entId} or d.ent_id = #{entId})
-                <!--                AND (-->
-                <!--                a.ent_id = #{entId}-->
-                <!--                <if test="userIds != null and userIds.size()>0">-->
-                <!--                    AND a.create_by IN-->
-                <!--                    <foreach collection="userIds" open="(" close=")" item="item" separator=",">-->
-                <!--                        #{item}-->
-                <!--                    </foreach>-->
-                <!--                </if>-->
-                <!--                )-->
-                <!--                OR (-->
-                <!--                d.top_ent_id = #{entId}-->
-                <!--                <if test="contactsIds != null and contactsIds.size()>0">-->
-                <!--                    AND d.contacts_id IN-->
-                <!--                    <foreach collection="contactsIds" separator="," item="item" close=")" open="(">-->
-                <!--                        #{item}-->
-                <!--                    </foreach>-->
-                <!--                </if>-->
-                <!--                )-->
+<!--                and (d.top_ent_id = #{entId} or d.ent_id = #{entId})-->
+                                AND ((
+                                a.ent_id = #{entId}
+                                <if test="userIds != null and userIds.size()>0">
+                                    AND a.create_by IN
+                                    <foreach collection="userIds" open="(" close=")" item="item" separator=",">
+                                        #{item}
+                                    </foreach>
+                                </if>
+                                )
+                                OR (
+                                d.top_ent_id = #{entId}
+                                <if test="contactsIds != null and contactsIds.size()>0">
+                                    AND d.contacts_id IN
+                                    <foreach collection="contactsIds" separator="," item="item" close=")" open="(">
+                                        #{item}
+                                    </foreach>
+                                </if>
+                                ))
             </if>
             </if>
             <if test="type == 2">
             <if test="type == 2">
-                and (e.top_ent_id = #{entId} or e.ent_id = #{entId})
-                <!--                AND (-->
-                <!--                a.ent_id = #{entId}-->
-                <!--                <if test="userIds != null and userIds.size()>0">-->
-                <!--                    AND a.create_by IN-->
-                <!--                    <foreach collection="userIds" open="(" close=")" item="item" separator=",">-->
-                <!--                        #{item}-->
-                <!--                    </foreach>-->
-                <!--                </if>-->
-                <!--                )-->
-                <!--                OR (-->
-                <!--                d.top_ent_id = #{entId}-->
-                <!--                <if test="contactsIds != null and contactsIds.size()>0">-->
-                <!--                    AND d.contacts_id IN-->
-                <!--                    <foreach collection="contactsIds" separator="," item="item" close=")" open="(">-->
-                <!--                        #{item}-->
-                <!--                    </foreach>-->
-                <!--                </if>-->
-                <!--                )-->
+<!--                and (e.top_ent_id = #{entId} or e.ent_id = #{entId})-->
+                                AND ((
+                                a.ent_id = #{entId}
+                                <if test="userIds != null and userIds.size()>0">
+                                    AND a.create_by IN
+                                    <foreach collection="userIds" open="(" close=")" item="item" separator=",">
+                                        #{item}
+                                    </foreach>
+                                </if>
+                                )
+                                OR (
+                                e.top_ent_id = #{entId}
+                                <if test="contactsIds != null and contactsIds.size()>0">
+                                    AND e.contacts_id IN
+                                    <foreach collection="contactsIds" separator="," item="item" close=")" open="(">
+                                        #{item}
+                                    </foreach>
+                                </if>
+                                ))
             </if>
             </if>
             <if test="query.keywords != null and query.keywords != ''">
             <if test="query.keywords != null and query.keywords != ''">
                 and (
                 and (
@@ -1160,6 +1160,12 @@
                     #{status}
                     #{status}
                 </foreach>
                 </foreach>
             </if>
             </if>
+            <if test="idsList != null and idsList.size() > 0 ">
+                and a.id in
+                <foreach collection="idsList" item="item" open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
             <if test="query.endBeginDateTime != null and query.endBeginDateTime != '' ">
             <if test="query.endBeginDateTime != null and query.endBeginDateTime != '' ">
                 and DATE( a.end_time) <![CDATA[ >= ]]> #{query.endBeginDateTime}
                 and DATE( a.end_time) <![CDATA[ >= ]]> #{query.endBeginDateTime}
             </if>
             </if>
@@ -1425,46 +1431,46 @@
         <where>
         <where>
             a.del_flag = 0
             a.del_flag = 0
             <if test="type == 1">
             <if test="type == 1">
-                and (d.top_ent_id = #{entId} or d.ent_id = #{entId})
-                <!--                AND (-->
-                <!--                a.ent_id = #{entId}-->
-                <!--                <if test="userIds != null and userIds.size()>0">-->
-                <!--                    AND a.create_by IN-->
-                <!--                    <foreach collection="userIds" open="(" close=")" item="item" separator=",">-->
-                <!--                        #{item}-->
-                <!--                    </foreach>-->
-                <!--                </if>-->
-                <!--                )-->
-                <!--                OR (-->
-                <!--                d.top_ent_id = #{entId}-->
-                <!--                <if test="contactsIds != null and contactsIds.size()>0">-->
-                <!--                    AND d.contacts_id IN-->
-                <!--                    <foreach collection="contactsIds" separator="," item="item" close=")" open="(">-->
-                <!--                        #{item}-->
-                <!--                    </foreach>-->
-                <!--                </if>-->
-                <!--                )-->
+<!--                and (d.top_ent_id = #{entId} or d.ent_id = #{entId})-->
+                                AND ((
+                                a.ent_id = #{entId}
+                                <if test="userIds != null and userIds.size()>0">
+                                    AND a.create_by IN
+                                    <foreach collection="userIds" open="(" close=")" item="item" separator=",">
+                                        #{item}
+                                    </foreach>
+                                </if>
+                                )
+                                OR (
+                                d.top_ent_id = #{entId}
+                                <if test="contactsIds != null and contactsIds.size()>0">
+                                    AND d.contacts_id IN
+                                    <foreach collection="contactsIds" separator="," item="item" close=")" open="(">
+                                        #{item}
+                                    </foreach>
+                                </if>
+                                ))
             </if>
             </if>
             <if test="type == 2">
             <if test="type == 2">
-                and (e.top_ent_id = #{entId} or e.ent_id = #{entId})
-                <!--                AND (-->
-                <!--                a.ent_id = #{entId}-->
-                <!--                <if test="userIds != null and userIds.size()>0">-->
-                <!--                    AND a.create_by IN-->
-                <!--                    <foreach collection="userIds" open="(" close=")" item="item" separator=",">-->
-                <!--                        #{item}-->
-                <!--                    </foreach>-->
-                <!--                </if>-->
-                <!--                )-->
-                <!--                OR (-->
-                <!--                d.top_ent_id = #{entId}-->
-                <!--                <if test="contactsIds != null and contactsIds.size()>0">-->
-                <!--                    AND d.contacts_id IN-->
-                <!--                    <foreach collection="contactsIds" separator="," item="item" close=")" open="(">-->
-                <!--                        #{item}-->
-                <!--                    </foreach>-->
-                <!--                </if>-->
-                <!--                )-->
+<!--                and (e.top_ent_id = #{entId} or e.ent_id = #{entId})-->
+                                AND ((
+                                a.ent_id = #{entId}
+                                <if test="userIds != null and userIds.size()>0">
+                                    AND a.create_by IN
+                                    <foreach collection="userIds" open="(" close=")" item="item" separator=",">
+                                        #{item}
+                                    </foreach>
+                                </if>
+                                )
+                                OR (
+                                e.top_ent_id = #{entId}
+                                <if test="contactsIds != null and contactsIds.size()>0">
+                                    AND e.contacts_id IN
+                                    <foreach collection="contactsIds" separator="," item="item" close=")" open="(">
+                                        #{item}
+                                    </foreach>
+                                </if>
+                                ))
             </if>
             </if>
             <if test="query.keywords != null and query.keywords != ''">
             <if test="query.keywords != null and query.keywords != ''">
                 and (
                 and (
@@ -1480,6 +1486,12 @@
                     #{status}
                     #{status}
                 </foreach>
                 </foreach>
             </if>
             </if>
+            <if test="idsList != null and idsList.size() > 0 ">
+                and a.status in
+                <foreach collection="idsList" item="status" open="(" close=")" separator=",">
+                    #{status}
+                </foreach>
+            </if>
             <if test="query.endBeginDateTime != null and query.endBeginDateTime != '' ">
             <if test="query.endBeginDateTime != null and query.endBeginDateTime != '' ">
                 and DATE( a.end_time) <![CDATA[ >= ]]> #{query.endBeginDateTime}
                 and DATE( a.end_time) <![CDATA[ >= ]]> #{query.endBeginDateTime}
             </if>
             </if>