jihs 4 years ago
parent
commit
744f0ddbeb

+ 12 - 1
src/main/java/org/jeecg/modules/archives/entity/ProjectManageBusinessOther.java

@@ -49,7 +49,9 @@ public class ProjectManageBusinessOther implements Serializable {
 	private String executor;
 	@ApiModelProperty( "执行人id (来源角色表)")
 	private String executorId;
-	@ApiModelProperty( "实际人天")
+	@ApiModelProperty("项目日志id")
+	private String logicId;
+	@ApiModelProperty( "实际人天(项目日志)")
 	private String realTime;
 	@ApiModelProperty( "创建时间")
 	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@@ -92,4 +94,13 @@ public class ProjectManageBusinessOther implements Serializable {
 		 this.delFlag = "0";
 		 this.pkOrg = pkOrg;
 	 }
+
+	 /**
+	  * @desc 用于项目日志的实际人天回写
+	  */
+	 public ProjectManageBusinessOther(String id, String logicId, String realTime){
+	 	this.id = id;
+	 	this.logicId = logicId;
+	 	this.realTime = realTime;
+	 }
  }

+ 1 - 1
src/main/java/org/jeecg/modules/prowork/entity/ProWorkLogicContent.java

@@ -30,7 +30,7 @@ public class ProWorkLogicContent implements Serializable {
 	private String proPlanId;
 	@ApiModelProperty("日志id")
 	private String logicId;
-	@ApiModelProperty("项目档案id")
+	@ApiModelProperty("项目档案里程碑id")
 	private String proArchivesId;
 	@ApiModelProperty("项目档案里程碑")
 	private String proArchivesMilestone;

+ 12 - 0
src/main/java/org/jeecg/modules/prowork/service/impl/ProWorkLogicServiceImpl.java

@@ -8,6 +8,8 @@ import org.jeecg.common.dto.prowork.ProWorkLogicContentAddReqDTO;
 import org.jeecg.common.dto.prowork.ProWorkLogicContentListRespDTO;
 import org.jeecg.common.dto.prowork.ProWorkLogicRespDTO;
 import org.jeecg.common.exception.JeecgBootException;
+import org.jeecg.modules.archives.entity.ProjectManageBusinessOther;
+import org.jeecg.modules.archives.service.ProjectManageBusinessOtherService;
 import org.jeecg.modules.prowork.entity.ProWorkLogic;
 import org.jeecg.modules.prowork.entity.ProWorkLogicContent;
 import org.jeecg.modules.prowork.mapper.ProWorkLogicMapper;
@@ -34,6 +36,8 @@ public class ProWorkLogicServiceImpl extends ServiceImpl<ProWorkLogicMapper, Pro
     private ProWorkLogicContentService proWorkLogicContentService;
     @Autowired
     private ISysSerialPatternService sysSerialPatternService;
+    @Autowired
+    private ProjectManageBusinessOtherService projectManageBusinessOtherService;
 
     /**
      * @desc 新增
@@ -58,6 +62,11 @@ public class ProWorkLogicServiceImpl extends ServiceImpl<ProWorkLogicMapper, Pro
             ProWorkLogicContent proWorkLogicContent =  new ProWorkLogicContent(detail);
             proWorkLogicContent.setSort(sort++);
             proWorkLogicContentService.save(proWorkLogicContent);
+
+            //回写项目档案计划列表的实际人天
+            projectManageBusinessOtherService.updateById(new ProjectManageBusinessOther(proWorkLogicContent.getProPlanId(),
+            proWorkLogicContent.getId(), proWorkLogicContent.getDuration().toString()));
+
         }
     }
 
@@ -77,6 +86,9 @@ public class ProWorkLogicServiceImpl extends ServiceImpl<ProWorkLogicMapper, Pro
             ProWorkLogicContent proWorkLogicContent =  new ProWorkLogicContent(detail);
             proWorkLogicContent.setSort(sort++);
             proWorkLogicContentService.save(proWorkLogicContent);
+            //回写项目档案计划列表的实际人天
+            projectManageBusinessOtherService.updateById(new ProjectManageBusinessOther(proWorkLogicContent.getProPlanId(),
+                    proWorkLogicContent.getId(), proWorkLogicContent.getDuration().toString()));
         }
         return true;
     }