Commit b3deeb2b by zhu.zewen

修复更新关联数据状态为“已销毁”

parent 2b902308
...@@ -61,5 +61,9 @@ public class PhysicStorageAmpoule extends BaseVersionEntity { ...@@ -61,5 +61,9 @@ public class PhysicStorageAmpoule extends BaseVersionEntity {
@ApiModelProperty(value = "退回人") @ApiModelProperty(value = "退回人")
private String thUser; private String thUser;
@ApiModelProperty(value = "关联检查ID")
private Long relatedCheckId;
@ApiModelProperty(value = "备注")
private String remark; private String remark;
} }
...@@ -214,8 +214,9 @@ public class PhysicDestroyCheckServiceImpl extends BaseServiceImpl<PhysicDestroy ...@@ -214,8 +214,9 @@ public class PhysicDestroyCheckServiceImpl extends BaseServiceImpl<PhysicDestroy
} }
// 2.3)更新关联数据状态为“已销毁” // 2.3)更新关联数据状态为“已销毁”
LocalDateTime checkCreateTime = physicDestroyCheck.getCreateTime(); Long checkId = physicDestroyCheck.getId();
Long checkDeptId = physicDestroyCheck.getApplyDeptId(); Long checkDeptId = physicDestroyCheck.getApplyDeptId();
LocalDateTime checkCreateTime = physicDestroyCheck.getCreateTime();
for (PhysicDestroyCheckDetail detail : list) { for (PhysicDestroyCheckDetail detail : list) {
LambdaUpdateWrapper<PhysicStorageAmpoule> updateWrapper = Wrappers.lambdaUpdate(PhysicStorageAmpoule.class) LambdaUpdateWrapper<PhysicStorageAmpoule> updateWrapper = Wrappers.lambdaUpdate(PhysicStorageAmpoule.class)
.eq(PhysicStorageAmpoule::getAcceptDeptId, checkDeptId) .eq(PhysicStorageAmpoule::getAcceptDeptId, checkDeptId)
...@@ -225,7 +226,9 @@ public class PhysicDestroyCheckServiceImpl extends BaseServiceImpl<PhysicDestroy ...@@ -225,7 +226,9 @@ public class PhysicDestroyCheckServiceImpl extends BaseServiceImpl<PhysicDestroy
.eq(PhysicStorageAmpoule::getBatchNo, detail.getBatchNo()) .eq(PhysicStorageAmpoule::getBatchNo, detail.getBatchNo())
// 按照提交销毁审批的创建时间,之前的全部标记已销毁 // 按照提交销毁审批的创建时间,之前的全部标记已销毁
.lt(PhysicStorageAmpoule::getCreateTime, checkCreateTime) .lt(PhysicStorageAmpoule::getCreateTime, checkCreateTime)
.set(PhysicStorageAmpoule::getDestroyStatus, 1); .set(PhysicStorageAmpoule::getDestroyStatus, 1)
.set(PhysicStorageAmpoule::getRelatedCheckId, checkId)
.setSql("remark = CONCAT(IFNULL(remark, ''), '销毁审批通过')");
physicStorageAmpouleMapper.update(null, updateWrapper); physicStorageAmpouleMapper.update(null, updateWrapper);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment