Преглед на файлове

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

jiakai преди 4 месеца
родител
ревизия
9dd1b467e2

+ 0 - 1
platform/src/main/resources/mapper/PtlAgreementAttributionMapper.xml

@@ -37,7 +37,6 @@
         <if test="ptlAgreementAttributionQueryVo.username != null and ptlAgreementAttributionQueryVo.username != ''">
             and paa.username like concat('%',#{ptlAgreementAttributionQueryVo.username},'%')
             or paa.user_abbr like concat('%',#{ptlAgreementAttributionQueryVo.username},'%')
-            or eic.name_simple like concat('%',#{ptlAgreementAttributionQueryVo.username},'%')
         </if>
         <if test="ptlAgreementAttributionQueryVo.quoteStatus != null and ptlAgreementAttributionQueryVo.quoteStatus != ''">
             and paa.quote_status = #{ptlAgreementAttributionQueryVo.quoteStatus}

+ 1 - 1
tenant/organization/src/main/java/com/jzg/organization/controller/PtlAgreementCostController.java

@@ -38,7 +38,7 @@ public class PtlAgreementCostController {
     @OperatorTrajectory(moduleName = "报价配置/费用管理/新增费用",OperationDict = OperationTypeEnum.IN_AGREEMENT,mapperClass = PtlAgreementCostMapper.class,entityClass = PtlAgreemenCostAdd.class)
     @Operation(summary = "协议费用管理新增")
     @PostMapping("save")
-    public HttpResult add(@RequestBody @Valid PtlAgreemenCostAdd ptlAgreemenCostAdd){
+    public HttpResult<String> add(@RequestBody @Valid PtlAgreemenCostAdd ptlAgreemenCostAdd){
         return ptlAgreementCostService.save(ptlAgreemenCostAdd);
     }
 

+ 1 - 1
tenant/organization/src/main/java/com/jzg/organization/service/PtlAgreementCostService.java

@@ -19,7 +19,7 @@ public interface PtlAgreementCostService extends IService<PtlAgreementCost> {
      * @author lipf
      * @date 2026/4/13 14:16
      */
-    HttpResult save(PtlAgreemenCostAdd ptlAgreemenCostAdd);
+    HttpResult<String> save(PtlAgreemenCostAdd ptlAgreemenCostAdd);
 
 
     /**

+ 9 - 3
tenant/organization/src/main/java/com/jzg/organization/service/impl/PtlAgreementCostServiceImpl.java

@@ -35,7 +35,6 @@ import com.jzg.organization.state.listener.CostStateListener;
 import io.seata.spring.annotation.GlobalTransactional;
 import jakarta.annotation.Resource;
 import lombok.extern.slf4j.Slf4j;
-import org.redisson.api.IdGenerator;
 import org.redisson.api.RList;
 import org.redisson.api.RedissonClient;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -48,7 +47,6 @@ import org.springframework.util.CollectionUtils;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
 import java.util.Arrays;
-import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;
@@ -99,8 +97,12 @@ public class PtlAgreementCostServiceImpl extends ServiceImpl<PtlAgreementCostMap
      */
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public HttpResult save(PtlAgreemenCostAdd ptlAgreemenCostAdd) {
+    public HttpResult<String> save(PtlAgreemenCostAdd ptlAgreemenCostAdd) {
         log.info("报价配置/费用管理/新增费用. ptlAgreemenCostAdd=[{}]", JSONUtil.toJsonStr(ptlAgreemenCostAdd));
+//        if(StrUtil.isEmpty(ptlAgreemenCostAdd.getPtlAgreementId()) || StrUtil.isEmpty(ptlAgreemenCostAdd.getPtlAgreementCode())){
+//            log.info("新增费用的时候,需要指定关联的协议信息。ptlAgreemenCostAdd=[{}]", JSONUtil.toJsonStr(ptlAgreemenCostAdd));
+//            return HttpResult.error("新增费用的时候,需要指定关联的协议信息");
+//        }
         List<CostAdd> costAddList = ptlAgreemenCostAdd.getCostAddList();
         if (costAddList.isEmpty()) {
             log.info("费用管理:保存数据不能为空");
@@ -111,6 +113,10 @@ public class PtlAgreementCostServiceImpl extends ServiceImpl<PtlAgreementCostMap
                 if (ListUtils.hasDuplicates(ptlAgreementCostAdd.getRuleConditions())){
                     throw new SystemException("添加数据存在相同费用规则,请检查");
                 }
+                if(StrUtil.isEmpty(costAdd.getPtlAgreementId())){
+                    log.info("新增费用的时候,需要指定关联的协议信息。ptlAgreemenCostAdd=[{}]", JSONUtil.toJsonStr(ptlAgreemenCostAdd));
+                    return HttpResult.error("新增费用的时候,需要指定关联的协议信息");
+                }
                 ptlAgreementCostAdd.setPtlAgreementId(costAdd.getPtlAgreementId());
                 ptlAgreementCostAdd.setProductId(costAdd.getProductId());
                 ptlAgreementCostAdd.setProductName(costAdd.getProductName());

+ 11 - 9
tenant/organization/src/main/java/com/jzg/organization/service/impl/PtlAgreementDispatchServiceImpl.java

@@ -202,20 +202,22 @@ public class PtlAgreementDispatchServiceImpl extends ServiceImpl<PtlAgreementDis
                                 }
                             }
                         }else if("change_bs_account".equals(action.getActionCode())){
-                            String accountId = action.getActionJson().get("accountId").toString();
-                            if(Objects.nonNull(accountId)){
-                                HttpResult<PtlAgreementAttribution> agreementAttribution = platformClient.getAgreementAttribution2(accountId);
-                                //HttpResult<PtlAgreementAttribution> agreementAttribution = esmInsCompanyClient.getAgreementAttribution(accountId);
-                                if (agreementAttribution.getCode() == 200) {
-                                    PtlAgreementAttribution data = agreementAttribution.getData();
-                                    action.getActionJson().put("userName", data.getUsername());
-                                    action.getActionJson().put("companyName", data.getInsCompanyName());
+                            if (action.getActionJson() != null && !action.getActionJson().isEmpty()) {
+                                // 修改这里:直接使用 getString,即使值为 null 也不会报错
+                                String accountId = action.getActionJson().getString("accountId");
+                                // 你的 Objects.nonNull 判断依然有效且非常规范
+                                if (Objects.nonNull(accountId)) {
+                                    HttpResult<PtlAgreementAttribution> agreementAttribution = platformClient.getAgreementAttribution2(accountId);
+                                    if (agreementAttribution.getCode() == 200) {
+                                        PtlAgreementAttribution data = agreementAttribution.getData();
+                                        action.getActionJson().put("userName", data.getUsername());
+                                        action.getActionJson().put("companyName", data.getInsCompanyName());
+                                    }
                                 }
                             }
                         }
                     }
                 }
-
                 PtlAgreementDispatchVo.DispatchVo vo = new PtlAgreementDispatchVo.DispatchVo(dispatch,attrLinks,actions);
                 dispatchVos.getDispatchVos().add(vo);
             }

+ 4 - 1
tenant/organization/src/main/resources/mapper/ReceivableMapper.xml

@@ -711,7 +711,10 @@
         LEFT JOIN ins_ply_income ipi ON ipi.id = ipil.income_id
         LEFT JOIN ins_orders io ON ipi.order_no = io.id
         WHERE
-        1=1
+        1 = 1
+        <if test="settlementQueryVo.settlementId != null and settlementQueryVo.settlementId != ''">
+            and ipiis.id = #{settlementQueryVo.settlementId}
+        </if>
         <if test="settlementQueryVo.settlementIds != null and settlementQueryVo.settlementIds != ''">
             AND ipiis.id IN
             <foreach collection="settlementQueryVo.settlementIds" item="settlementId" open="(" separator="," close=")">