zxz 2 年之前
父節點
當前提交
6609979f05

+ 26 - 5
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/ContractManagementInfoServiceImpl.java

@@ -48,11 +48,13 @@ import java.math.BigInteger;
 import java.net.URL;
 
 import javax.servlet.http.HttpServletResponse;
+import javax.swing.text.html.parser.Entity;
 import java.text.DecimalFormat;
 import java.text.SimpleDateFormat;
 import java.util.*;
 import java.io.*;
 import java.net.URLDecoder;
+import java.util.stream.Collectors;
 
 /**
  * <p>
@@ -263,6 +265,8 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
         contractProcessInfo.setId(IdGenerator.generateUUID());
         contractProcessInfo.setContractId(contractManagementInfo.getId());
         boolean one = this.insert(contractManagementInfo);
+        boolean two = contractGoodsInfoService.insert(contractGoodsInfo);
+        boolean three = contractProcessInfoService.insert(contractProcessInfo);
         // 根据类型进入审核
         if ("1".equals(contractManagementInfo.getGoodsType())) {
             //销售合同
@@ -462,8 +466,7 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
             }
         }
 
-        boolean two = contractGoodsInfoService.insert(contractGoodsInfo);
-        boolean three = contractProcessInfoService.insert(contractProcessInfo);
+
         cacheComponent.delPrefixKey(Const.ADMIN_CONTRACTINFO, contractManagementInfo.getCompId());
         // 假如 都成功返回ok
         if (one && two && three) {
@@ -2996,8 +2999,17 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
                 //查合同下的车牌号,出库只能查到未出库的
                 List<TranCarInfo> tranCarInfoList = tranCarInfoService.selectList(new EntityWrapper<TranCarInfo>()
                         .eq("info_id", tranTaskInfo.getId()).eq("fleet_flag", "0").eq("tran_type", "1").eq("submit", "0")
-                        .last("ORDER BY CONVERT ( car_no USING gbk ) ASC"));
+//                        .last("ORDER BY CONVERT ( car_no USING gbk ) ASC")
+                        .orderBy("tran_car_no",true));
                 if (!CollectionUtils.isEmpty(tranCarInfoList)) {
+                    List<String> carList = new ArrayList<>();
+                    List<TranCarInfo> newCarList = new ArrayList<>();
+                    for(int i = 0; i < tranCarInfoList.size(); i++){
+                        if(!carList.contains(tranCarInfoList.get(i).getCarNo())){
+                            carList.add(tranCarInfoList.get(i).getCarNo());
+                            newCarList.add(tranCarInfoList.get(i));
+                        }
+                    }
                     contractManagementInfo.setTranCarInfoList(tranCarInfoList);
                 }
                 List<TranCarInfo> tranCarInfoList1 = tranCarInfoService.selectList(new EntityWrapper<TranCarInfo>()
@@ -3054,9 +3066,18 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
                     //查移库任务编号下的车牌号,移库出库只能查到未出库的
                     List<TranCarInfo> tranCarInfoList = tranCarInfoService.selectList(new EntityWrapper<TranCarInfo>()
                             .eq("info_id", tranTaskInfo.getId()).eq("fleet_flag", "0").eq("tran_type", "1").eq("submit", "0")
-                            .last("ORDER BY CONVERT ( car_no USING gbk ) ASC"));
+//                            .last("ORDER BY CONVERT ( car_no USING gbk ) ASC")
+                            .orderBy("tran_car_no",true));
                     if (!CollectionUtils.isEmpty(tranCarInfoList)) {
-                        contractManagementInfo1.setTranCarInfoList(tranCarInfoList);
+                        List<String> carList = new ArrayList<>();
+                        List<TranCarInfo> newCarList = new ArrayList<>();
+                        for(int i = 0; i < tranCarInfoList.size(); i++){
+                            if(!carList.contains(tranCarInfoList.get(i).getCarNo())){
+                                carList.add(tranCarInfoList.get(i).getCarNo());
+                                newCarList.add(tranCarInfoList.get(i));
+                            }
+                       }
+                        contractManagementInfo1.setTranCarInfoList(newCarList);
                     }
                     List<TranCarInfo> tranCarInfoList1 = tranCarInfoService.selectList(new EntityWrapper<TranCarInfo>()
                             .eq("info_id", tranTaskInfo.getId())

+ 4 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/TranProcessInfoServiceImpl.java

@@ -1008,6 +1008,8 @@ public class TranProcessInfoServiceImpl extends ServiceImpl<TranProcessInfoMappe
             tranProcessInfo.setPriceStatusCar("审核中");
             tranProcessInfo.setTranPriceCar(0.0f);
             TranProcessInfo tranProcessInfo1=this.selectById(tranProcessInfo.getId());
+            tranProcessInfo1.setTranPriceIng(tranProcessInfo.getTranPriceIng());
+            tranProcessInfo1.setBillingMethod(tranProcessInfo.getBillingMethod());
             TranTaskInfo tranTaskInfo=tranTaskInfoService.selectById(tranProcessInfo1.getInfoId());
             boolean isStartWorkflow = org.apache.commons.lang3.StringUtils.isBlank(tranProcessInfo1.getWorkflowId());
             // 不是退回的单子
@@ -1075,6 +1077,8 @@ public class TranProcessInfoServiceImpl extends ServiceImpl<TranProcessInfoMappe
             tranProcessInfo.setPriceStatus("审核中");
             tranProcessInfo.setTranPrice(0.0f);
             TranProcessInfo tranProcessInfo1=this.selectById(tranProcessInfo.getId());
+            tranProcessInfo1.setTranPriceIngCar(tranProcessInfo.getTranPriceIngCar());
+            tranProcessInfo1.setBillingMethod(tranProcessInfo.getBillingMethod());
             TranTaskInfo tranTaskInfo=tranTaskInfoService.selectById(tranProcessInfo1.getInfoId());
             boolean isStartWorkflow = org.apache.commons.lang3.StringUtils.isBlank(tranProcessInfo1.getWorkflowId());
             // 不是退回的单子