yzc пре 1 година
родитељ
комит
e4d86ad332

+ 5 - 4
hx-customer/src/main/java/com/fjhx/customer/service/customer/impl/CustomerServiceImpl.java

@@ -304,8 +304,8 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
 
         // 修改客户表的信息
         this.updateById(customerDto);
-        // 删除客户-用户表的信息
-        customerUserService.remove(Wrappers.<CustomerUser>lambdaQuery().eq(CustomerUser::getCustomerId, customerDto.getId()));
+//        // 删除客户-用户表的信息
+//        customerUserService.remove(Wrappers.<CustomerUser>lambdaQuery().eq(CustomerUser::getCustomerId, customerDto.getId()));
         // 添加客户-联系人表的信息
         saveCustomerUse(customerDto);
     }
@@ -352,8 +352,9 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
     private void saveCustomerUse(CustomerDto customerDto) {
         List<CustomerUser> customerUserDtoList = customerDto.getCustomerUserList();
         customerUserDtoList.forEach(customerUserDto -> customerUserDto.setCustomerId(customerDto.getId()));
-        customerUserDtoList.forEach(customerUserDto -> customerUserDto.setId(null));//防止传id过来导致key冲突
-        customerUserService.saveBatch(customerUserDtoList);
+//        customerUserDtoList.forEach(customerUserDto -> customerUserDto.setId(null));//防止传id过来导致key冲突
+//        customerUserService.saveBatch(customerUserDtoList);
+        customerUserService.editLinked(customerUserDtoList, CustomerUser::getCustomerId, customerDto.getId());
     }
 
     /**

+ 5 - 0
hx-sale/src/main/java/com/fjhx/sale/entity/after/po/AfterSales.java

@@ -87,4 +87,9 @@ public class AfterSales extends BasePo {
      */
     private Long contractId;
 
+    /**
+     * 币种
+     */
+    private String currency;
+
 }

+ 4 - 0
hx-sale/src/main/java/com/fjhx/sale/flow/AfterSalesFlow.java

@@ -61,6 +61,10 @@ public class AfterSalesFlow extends FlowDelegate {
         afterSalesDto.setCode(codingRuleService.createCode(CodingRuleEnum.AFTER_SALES.getKey(), null));
         afterSalesService.addOrEdit(afterSalesDto);
 
+        //回填数据
+        submitData.put("code", afterSalesDto.getCode());
+        submitData.put("amount", afterSalesDto.getAmount());
+
         return afterSalesDto.getId();
     }
 

+ 1 - 1
hx-sale/src/main/java/com/fjhx/sale/service/after/impl/AfterSalesServiceImpl.java

@@ -59,7 +59,7 @@ public class AfterSalesServiceImpl extends ServiceImpl<AfterSalesMapper, AfterSa
     public Page<AfterSalesVo> getPage(AfterSalesSelectDto dto) {
         IWrapper<AfterSales> wrapper = getWrapper();
 
-        wrapper.keyword(dto.getKeyword(), new SqlField("c.code"));
+        wrapper.keyword(dto.getKeyword(), new SqlField("c.code"), new SqlField("as1", AfterSales::getCode));
 
         wrapper.eq("as1", AfterSales::getStatus, dto.getStatus());
         wrapper.eq("as1", AfterSales::getType, dto.getType());

+ 1 - 0
hx-sale/src/main/resources/mapper/after/AfterSalesMapper.xml

@@ -23,6 +23,7 @@
                as1.create_time,
                as1.update_user,
                as1.update_time,
+               as1.currency,
                c.`code` as contractCode
         FROM after_sales as1
                  left join contract c on c.id = as1.contract_id

+ 2 - 1
hx-sale/src/main/resources/mapper/contract/ContractProductMapper.xml

@@ -15,7 +15,8 @@
                t2.user_name            AS userName,
                t2.create_user          AS salesmanId,
                t2.version              AS contractVersion,
-               t2.contract_template_id AS contractTemplateId
+               t2.contract_template_id AS contractTemplateId,
+               t2.currency
         FROM contract_product t1
                  JOIN contract t2 ON t1.contract_id = t2.id
             ${ew.customSqlSegment}