|
@@ -127,17 +127,23 @@ public class ZhcxInsideInspectionServiceImpl extends ServiceImpl<ZhcxInsideInspe
|
|
|
//修改操作
|
|
|
if(ObjectUtil.isEmpty(req.getOperType()) || "updateInspection".equals(req.getOperType())) {
|
|
|
ZhcxInsideInspectionDo inspection = this.getById(req.getId());//报验单
|
|
|
- //生成修改记录
|
|
|
- //报验单中编码不存在,为首次提交,不需要生成修改记录
|
|
|
- if(ObjectUtil.isNotEmpty(inspection.getInspectioncode())) {
|
|
|
- saveEditHistory(inspection, req);
|
|
|
- }
|
|
|
|
|
|
//只有待报验状态才能修改
|
|
|
if(!"20".equals(inspection.getInspectionstatus()) && !"10".equals(inspection.getInspectionstatus())) {
|
|
|
throw new CustomException("只有待报验状态才能修改");
|
|
|
}
|
|
|
|
|
|
+ SysUserVo user = zhcxCommon.getCurrentUser();
|
|
|
+ if("20".equals(inspection.getInspectionstatus()) && !user.getId().equals(inspection.getSelftesterid())) {
|
|
|
+ throw new CustomException("对不起该数据暂无修改权限,请刷新页面!");
|
|
|
+ }
|
|
|
+
|
|
|
+ //生成修改记录
|
|
|
+ //报验单中编码不存在,为首次提交,不需要生成修改记录
|
|
|
+ if(ObjectUtil.isNotEmpty(inspection.getInspectioncode())) {
|
|
|
+ saveEditHistory(inspection, req);
|
|
|
+ }
|
|
|
+
|
|
|
//保存单据
|
|
|
try {
|
|
|
generalCRUDService.generalMsUpdate(req.getUpdate());
|