Commit eeca047d authored by suhuiguang's avatar suhuiguang

reafact(jg): 业务作废

1.作废逻辑修正
parent 3903155b
...@@ -2148,20 +2148,5 @@ ...@@ -2148,20 +2148,5 @@
</foreach>]) </foreach>])
and (a.notice_status <![CDATA[ <> ]]> '6617') and (a.notice_status <![CDATA[ <> ]]> '6617')
and a.is_delete = 0 and a.is_delete = 0
union all
select
a.apply_no as recUserName,
b.equip_transfer_id as equId
from
tzs_jg_equip_transfer a,
tzs_jg_equip_transfer_eq b
where
a.sequence_nbr = b.equip_transfer_id
and b.equ_id = ANY(ARRAY[
<foreach collection="records" item="record" separator=",">
#{record}
</foreach>])
and (a.apply_status <![CDATA[ <> ]]> '6617')
</select> </select>
</mapper> </mapper>
...@@ -381,7 +381,6 @@ ...@@ -381,7 +381,6 @@
<foreach collection="records" item="record" separator=","> <foreach collection="records" item="record" separator=",">
#{record} #{record}
</foreach>]) </foreach>])
and a.is_delete = 0
and (a.status <![CDATA[ <> ]]> '已作废') and (a.status <![CDATA[ <> ]]> '已作废')
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -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