Commit d94d22eb authored by suhuiguang's avatar suhuiguang

reafact(jg): 业务作废

1.作废按钮放开,通过提示进行约束
parent dc2eeafa
...@@ -54,9 +54,9 @@ public class ManageStatusDataUpdateService { ...@@ -54,9 +54,9 @@ public class ManageStatusDataUpdateService {
* @param record 设备唯一标识 * @param record 设备唯一标识
*/ */
public void cancelAndGrade(String record) { public void cancelAndGrade(String record) {
// 所有业务单据(除去作废、删除状态单据),有在引用设备的则不修改设备纳管状态 // 查询使该设备变为已纳管的业务的数量 [> 0,则纳管状态不需要更新][< =0,则纳管状态需要更新]
Integer inUsedNum = commonMapper.countEquipInUseTimesForDiscard(record); Integer inUsedNum = commonMapper.countEquipInUseTimesForDiscard(record);
// 无引用则进行修改纳管状态为未纳管 // [< =0,则纳管状态需要更新]
if (inUsedNum == 0) { if (inUsedNum == 0) {
try { try {
// 更新已纳管为未纳管 - 数据库 // 更新已纳管为未纳管 - 数据库
...@@ -74,9 +74,9 @@ public class ManageStatusDataUpdateService { ...@@ -74,9 +74,9 @@ public class ManageStatusDataUpdateService {
*/ */
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void dealDataAndAsyncEs(String record) { public void dealDataAndAsyncEs(String record) {
// 所有业务单据(除去作废、删除状态单据),有在引用设备的则不修改设备纳管状态 // 查询使该设备变为已纳管的业务的数量 [> 0,则纳管状态不需要更新][< =0,则纳管状态需要更新]
Integer inUsedNum = commonMapper.countEquipInUseTimesForDiscard(record); Integer inUsedNum = commonMapper.countEquipInUseTimesForDiscard(record);
// 无引用则进行修改纳管状态为未纳管 // [< =0,则纳管状态需要更新]
if (inUsedNum == 0) { if (inUsedNum == 0) {
try { try {
updateEquipData(idxBizJgUseInfoService, record, idxBizJgRegisterInfoService, esEquipmentCategoryDao); updateEquipData(idxBizJgUseInfoService, record, idxBizJgRegisterInfoService, esEquipmentCategoryDao);
......
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