Commit d152d119 authored by suhuiguang's avatar suhuiguang

reafact(jg): 业务作废

1.作废按钮放开,通过提示进行约束
parent eeca047d
...@@ -26,7 +26,7 @@ public class InstallNoticeDiscardOrderCheck implements SupportableDiscardOrderCh ...@@ -26,7 +26,7 @@ public class InstallNoticeDiscardOrderCheck implements SupportableDiscardOrderCh
public Boolean check(List<String> records) { public Boolean check(List<String> records) {
List<JgUseRegistrationEq> useRegistrationEqs = useRegistrationMapper.selectListForInstallNoticeDiscard(records); List<JgUseRegistrationEq> useRegistrationEqs = useRegistrationMapper.selectListForInstallNoticeDiscard(records);
if (!useRegistrationEqs.isEmpty()) { if (!useRegistrationEqs.isEmpty()) {
String msg = String.format("存在设备正在办理或已办理使用登记,登记单:%s,不能进行作废!", String.join(",", useRegistrationEqs.stream().map(u->GenericDiscardOrderCheck.buildErrorMsg(u.getRecUserName())).collect(Collectors.toSet()))); String msg = String.format("存在设备正在办理或已办理业务:%s,不能进行作废!", String.join(",", useRegistrationEqs.stream().map(u->GenericDiscardOrderCheck.buildErrorMsg(u.getRecUserName())).collect(Collectors.toSet())));
throw new RuntimeException(msg); throw new RuntimeException(msg);
} }
return true; return true;
......
...@@ -26,7 +26,7 @@ public class UseRegisterDiscardOrderCheck implements SupportableDiscardOrderChec ...@@ -26,7 +26,7 @@ public class UseRegisterDiscardOrderCheck implements SupportableDiscardOrderChec
public Boolean check(List<String> records) { public Boolean check(List<String> records) {
List<JgUseRegistrationEq> useRegistrationEqs = useRegistrationMapper.selectListForSelfDiscard(records); List<JgUseRegistrationEq> useRegistrationEqs = useRegistrationMapper.selectListForSelfDiscard(records);
if (!useRegistrationEqs.isEmpty()) { if (!useRegistrationEqs.isEmpty()) {
String msg = String.format("存在设备正在办理或已办理后续业务,单据:%s,不能进行作废!", String.join(",", useRegistrationEqs.stream().map(u->GenericDiscardOrderCheck.buildErrorMsg(u.getRecUserName())).collect(Collectors.toSet()))); String msg = String.format("存在设备正在办理或已办理后续业务:%s,不能进行作废!", String.join(",", useRegistrationEqs.stream().map(u->GenericDiscardOrderCheck.buildErrorMsg(u.getRecUserName())).collect(Collectors.toSet())));
throw new RuntimeException(msg); throw new RuntimeException(msg);
} }
return true; return true;
......
...@@ -26,7 +26,7 @@ public class VehicleInformationDiscardOrderCheck implements SupportableDiscardOr ...@@ -26,7 +26,7 @@ public class VehicleInformationDiscardOrderCheck implements SupportableDiscardOr
public Boolean check(List<String> records) { public Boolean check(List<String> records) {
List<JgVehicleInformationEq> eqs = jgVehicleInformationMapper.selectListForSelfDiscard(records); List<JgVehicleInformationEq> eqs = jgVehicleInformationMapper.selectListForSelfDiscard(records);
if (!eqs.isEmpty()) { if (!eqs.isEmpty()) {
String msg = String.format("存在设备正在办理或已办理后续业务,单据:%s,不能进行作废!", String.join(",", eqs.stream().map(u -> GenericDiscardOrderCheck.buildErrorMsg(u.getRecUserName())).collect(Collectors.toSet()))); String msg = String.format("存在设备正在办理或已办理后续业务:%s,不能进行作废!", String.join(",", eqs.stream().map(u -> GenericDiscardOrderCheck.buildErrorMsg(u.getRecUserName())).collect(Collectors.toSet())));
throw new RuntimeException(msg); throw new RuntimeException(msg);
} }
return true; return true;
......
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 to comment