|
@@ -917,6 +917,27 @@ public class LongYanRepairStrategy extends AbstractRepairBaseStrategy {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void backRepairForm(RepairApplicationFormDTO model) {
|
|
|
+ // 判断是否具有权限
|
|
|
+ String role = getCurrentRoles();
|
|
|
+ if(!role.contains(SysRoleCodeEnum.REPAIR_MANAGE.name()) && !role.contains(SysRoleCodeEnum.Maintenance_Leader.name())){
|
|
|
+ throw new DeniedException("不具备退回工单的权限");
|
|
|
+ }
|
|
|
+ RepairApplicationForm form = repairApplicationFormMapper.selectById(model.getId());
|
|
|
+ if(form.getStatus() != RepairApplicationFormStatusEnum.NOT_ALLOCATED.getValue()){
|
|
|
+ throw new DeniedException("非待接单状态工单,不允许退出");
|
|
|
+ }
|
|
|
+ if(StringUtils.isBlank(model.getBackReason())){
|
|
|
+ throw new DeniedException("退回原因不能为空");
|
|
|
+ }
|
|
|
+ RepairApplicationForm updForm = new RepairApplicationForm();
|
|
|
+ updForm.setId(model.getId());
|
|
|
+ updForm.setBackReason(model.getBackReason());
|
|
|
+ updForm.setStatus(RepairApplicationFormStatusEnum.FORM_BACK.getValue());
|
|
|
+ repairApplicationFormMapper.updateByPrimaryKeySelective(updForm);
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public void recoverRepair(RepairApplicationFormDTO model) {
|
|
|
// 判断是否具有权限
|