Forráskód Böngészése

专家抽取逻辑优化

suntianwu 2 éve
szülő
commit
3e19f55d9f

+ 5 - 0
purchase-system/src/main/java/com/ozs/pm/doman/PmDemand.java

@@ -165,6 +165,11 @@ public class PmDemand implements Serializable {
     @TableField("EXTRACT_AGENCY_TIME")
     private Date extractAgencyTime;
 
+
+    @ApiModelProperty("0:没有关联专家,1:有关联专家")
+    @TableField("HAS_EXPERT")
+    private String hasExpert;
+
     /** 调整建议 */
     @ApiModelProperty("是否有质疑,1是,0否")
     @TableField("CALL_QUESTION")

+ 3 - 0
purchase-system/src/main/java/com/ozs/pm/doman/vo/responseVo/PmDemandResVo.java

@@ -266,4 +266,7 @@ public class PmDemandResVo extends BaseEntity
     private Date accessTime;
 
     private Boolean flay;
+
+    @ApiModelProperty("0:没有关联专家,1:有关联专家")
+    private String hasExpert;
 }

+ 13 - 2
purchase-system/src/main/java/com/ozs/pm/service/impl/PmDemandServiceImpl.java

@@ -482,7 +482,6 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
                         vo.setFlay(flay);
                     }
                 }
-
             }
             results.setRecords(pmDemandResVos);
         }
@@ -1009,10 +1008,15 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
                         Integer i = baseExpertMapper.insertBaseUnitInformation(baseUnitInformation);
                     }
                 }
-            }
 
+            }
         }
 
+        PmDemand pmDemandUpdate = new PmDemand();
+        pmDemand.setDemandId(pmDemand.getDemandId());
+        pmDemand.setHasExpert("1");
+        this.updateById(pmDemandUpdate);
+
         return true;
     }
 
@@ -1197,6 +1201,12 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
                 pmDemandExpertRef.setUpdateTime(pmDemandExpertRef.getCreateTime());
                 pmDemandExpertRefList.add(pmDemandExpertRef);
             }
+
+            PmDemand pmDemandUpdate = new PmDemand();
+            pmDemand.setDemandId(pmDemand.getDemandId());
+            pmDemand.setHasExpert("1");
+            this.updateById(pmDemandUpdate);
+
             return pmDemandExpertRefService.saveOrUpdateBatch(pmDemandExpertRefList);
         }
     }
@@ -1494,6 +1504,7 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
             PmDemand pmDemandUpdate = new PmDemand();
             pmDemandUpdate.setDemandId(pmBidFailureReqVo.getDemandId());
             pmDemandUpdate.setProjectStatus(PmProjectStatus.WAIT_ANNOUNCEMENT.getCode());
+            pmDemandUpdate.setHasExpert("0");
             pmDemandUpdate.setUpdateTime(pmBidFailureReqVo.getUpdateTime());
             pmDemandUpdate.setUpdateBy(pmBidFailureReqVo.getUpdateBy());
             return this.updateById(pmDemandUpdate);