Procházet zdrojové kódy

电梯序列号输入特殊字符置为空
合同的附加费用 list取值采用浅拷贝

chenj před 1 týdnem
rodič
revize
2d09097040

+ 5 - 11
RuoYi-Vue-fast-master/src/main/java/com/ruoyi/project/business/service/impl/TqContractServiceImpl.java

@@ -307,27 +307,20 @@ public class TqContractServiceImpl implements ITqContractService
       **/
     private List<TqContractLift>  attachTqContractLift(TqContractDto tqContractDto, List<TqContractLift>  tqContractLiftList){
         //根据实际排产日期查询汇率
-        List<ContractCurrencyTime> scheduleList = tqContractLiftList.stream()
-                .filter(tqContractLift -> tqContractLift.getSigningDate() != null) // Filter out null signing dates
+        List<ContractCurrencyTime> scheduleList = tqContractLiftList.stream().filter(tqContractLift -> tqContractLift.getActualProductionScheduleDate() != null) // Filter out null signing dates
                 .map(tqContractLift -> new ContractCurrencyTime(
-                        Long.parseLong(tqContractLift.getCurrencyId()), // Assuming this returns a long
-                        tqContractLift.getActualProductionScheduleDate()
+                        Long.parseLong(tqContractLift.getCurrencyId()), tqContractLift.getActualProductionScheduleDate()
                 ))
                 .collect(Collectors.toList());
         Map<Long, BigDecimal> scheduleListIdAndRateMap = tbContractCurrencyService.selectExchangeRateByCurrencyId(scheduleList);
         //根据实际发货排产日期查询汇率
-        List<ContractCurrencyTime> deliveryList = tqContractLiftList.stream()
-                .filter(tqContractLift -> tqContractLift.getSigningDate() != null) // Filter out null signing dates
+        List<ContractCurrencyTime> deliveryList = tqContractLiftList.stream().filter(tqContractLift -> tqContractLift.getActualDeliveryDate() != null) // Filter out null signing dates
                 .map(tqContractLift -> new ContractCurrencyTime(
-                        Long.parseLong(tqContractLift.getCurrencyId()), // Assuming this returns a long
-                        tqContractLift.getActualDeliveryDate()
+                        Long.parseLong(tqContractLift.getCurrencyId()), tqContractLift.getActualDeliveryDate()
                 ))
                 .collect(Collectors.toList());
         Map<Long, BigDecimal> deliveryListIdAndRateMap = tbContractCurrencyService.selectExchangeRateByCurrencyId(deliveryList);
 
-//        //获取版本
-//        Long version = tqContractLiftHistoryMapper.selectVersionMaxFromHistory(tqContractDto.getContractNo());
-//        String contractNoVersionNo = version == null ? "1": String.valueOf(version+1L);
         tqContractLiftList.forEach(item -> {
             item.setContractNo(tqContractDto.getContractNo());
             item.setContractName(tqContractDto.getContractName());
@@ -351,6 +344,7 @@ public class TqContractServiceImpl implements ITqContractService
             if(scheduleListIdAndRateMap.containsKey(Long.parseLong(item.getCurrencyId()))){
                 item.setRate4ProductionScheduling(scheduleListIdAndRateMap.get(Long.parseLong(item.getCurrencyId())));
             }
+            //发货汇率
             if(deliveryListIdAndRateMap.containsKey(Long.parseLong(item.getCurrencyId()))){
                 item.setRate4Shipment(deliveryListIdAndRateMap.get(Long.parseLong(item.getCurrencyId())));
             }

+ 1 - 1
ruoyi-ui-vue2/src/views/contract/edit.vue

@@ -1067,7 +1067,7 @@ export default {
     async equipmentAddFees() {
       // 查询汇率
       this.additionalCostOpen = true;
-      this.additionalCostList = [...this.equipmentList]
+      this.additionalCostList = JSON.parse(JSON.stringify(this.equipmentList))
       this.additionalCostList.some(item=>{
         item.planInlandFreightCost = comdify(delcommafy(item.planInlandFreightCost?item.planInlandFreightCost:0), 2);
         item.planOceanFreight = comdify(delcommafy(item.planOceanFreight?item.planOceanFreight:0), 2);

+ 1 - 1
ruoyi-ui-vue2/src/views/contract/lift/index.vue

@@ -624,7 +624,7 @@ export default {
     validateInput() {
       var regex = /\D/
       if(regex.test(this.valueInput)){
-        this.valueInput = '1';
+        this.valueInput = '';
       }else{
         //含有特殊字符返回true, 没有特殊字符返回false
         const value = parseInt(this.valueInput, 10);