Commit dc2eeafa authored by suhuiguang's avatar suhuiguang

reafact(jg): 业务作废

1.作废按钮放开,通过提示进行约束
parent d152d119
...@@ -1994,7 +1994,7 @@ ...@@ -1994,7 +1994,7 @@
</select> </select>
<select id="selectListForInstallNoticeDiscard" resultType="com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq"> <select id="selectListForInstallNoticeDiscard" resultType="com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq">
SELECT SELECT
eq.sequence_nbr, eq.equ_id,
u.apply_no as recUserName u.apply_no as recUserName
FROM "tzs_jg_use_registration_eq" eq, tzs_jg_use_registration u FROM "tzs_jg_use_registration_eq" eq, tzs_jg_use_registration u
where where
......
package com.yeejoin.amos.boot.module.jg.biz.discardOrder.strategy; package com.yeejoin.amos.boot.module.jg.biz.discardOrder.strategy;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq; import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper; import com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper;
import com.yeejoin.amos.boot.module.jg.biz.discardOrder.factory.support.SupportableDiscardOrderCheck; import com.yeejoin.amos.boot.module.jg.biz.discardOrder.factory.support.SupportableDiscardOrderCheck;
...@@ -26,7 +25,7 @@ public class InstallNoticeDiscardOrderCheck implements SupportableDiscardOrderCh ...@@ -26,7 +25,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;
......
package com.yeejoin.amos.boot.module.jg.biz.discardOrder.strategy; package com.yeejoin.amos.boot.module.jg.biz.discardOrder.strategy;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq; import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper; import com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper;
import com.yeejoin.amos.boot.module.jg.biz.discardOrder.factory.support.SupportableDiscardOrderCheck; import com.yeejoin.amos.boot.module.jg.biz.discardOrder.factory.support.SupportableDiscardOrderCheck;
...@@ -26,7 +25,7 @@ public class UseRegisterDiscardOrderCheck implements SupportableDiscardOrderChec ...@@ -26,7 +25,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;
......
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