资产修改

main
dongdingding 2 months ago
parent acc6c17fde
commit 514a0874f8

@ -31,7 +31,11 @@ public class AssetCurrentShRequest {
private Integer assetId; private Integer assetId;
/**
*
*/
@ApiModelProperty("不通过原因")
private String btgyy;
/** /**
* 01345 * 01345

@ -165,7 +165,7 @@ public interface AssetTaskMapper extends BaseMapper<AssetTask> {
* @return * @return
*/ */
int updateByTaskId(@Param("taskStatus") Integer taskStatus, @Param("taskId") Integer taskId, @Param("finishTime") LocalDateTime finishTime); int updateByTaskId(@Param("taskStatus") Integer taskStatus, @Param("taskId") Integer taskId, @Param("finishTime") LocalDateTime finishTime,@Param("btgyy")String btgyy);
/** /**

@ -279,6 +279,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
boolean hasRejected = list.stream().anyMatch(item -> item.getStatus() == 4); boolean hasRejected = list.stream().anyMatch(item -> item.getStatus() == 4);
boolean hased = list.stream().anyMatch(item -> item.getStatus() == 5); boolean hased = list.stream().anyMatch(item -> item.getStatus() == 5);
LocalDateTime finishTime = null; LocalDateTime finishTime = null;
String btgyy=null;
if (hasPendingApproval) { if (hasPendingApproval) {
// 资产状态存在待审批,任务状态为进行中 // 资产状态存在待审批,任务状态为进行中
taskStatus = 1; taskStatus = 1;
@ -290,6 +291,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
} else if (allApproved && !hasPendingApproval && !hasRejected && hasExpired) { } else if (allApproved && !hasPendingApproval && !hasRejected && hasExpired) {
// 资产状态全部为已通过,资产完成时间有超期的为超期完成 // 资产状态全部为已通过,资产完成时间有超期的为超期完成
taskStatus = 3; taskStatus = 3;
btgyy=req.getBtgyy();
finishTime = LocalDateTime.now(); finishTime = LocalDateTime.now();
taskSaveOrDelete(req); taskSaveOrDelete(req);
} else if (hasRejected) { } else if (hasRejected) {
@ -310,7 +312,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
taskStatus = 3; taskStatus = 3;
} }
//修改主表任务状态 //修改主表任务状态
assetTaskDao.updateByTaskId(taskStatus, req.getTaskId(), finishTime); assetTaskDao.updateByTaskId(taskStatus, req.getTaskId(), finishTime,btgyy);
return a; return a;
} }

@ -406,6 +406,10 @@
<if test="finishTime != null "> <if test="finishTime != null ">
task_finish_time=#{finishTime} task_finish_time=#{finishTime}
</if> </if>
<if test="btgyy != btgyy and btgyy!='' ">
btgyy=#{btgyy}
</if>
btgyy
</set> </set>
where id =#{taskId} where id =#{taskId}

Loading…
Cancel
Save