Commit 85a63dba authored by 韩桐桐's avatar 韩桐桐

fix(jg):1、业务删除接口调整,2、压力管道查询恢复到覆盖前

parent e5a6bb8f
...@@ -45,14 +45,6 @@ public interface IJgMaintainNoticeService extends IService<JgMaintainNotice> { ...@@ -45,14 +45,6 @@ public interface IJgMaintainNoticeService extends IService<JgMaintainNotice> {
Page<Map<String,Object>> queryForJgMaintainNoticePage(Page<JgMaintainNotice> page,String sort, JgMaintainNoticeDto model, ReginParams reginParams); Page<Map<String,Object>> queryForJgMaintainNoticePage(Page<JgMaintainNotice> page,String sort, JgMaintainNoticeDto model, ReginParams reginParams);
/** /**
* 批量删除
*
* @param sequenceNbrs 主键
* @return 是否删除成功
*/
Boolean deleteForBatch(Long[] sequenceNbrs);
/**
* 保存维修告知单 * 保存维修告知单
* *
* @param model 数据 * @param model 数据
......
...@@ -406,22 +406,18 @@ ...@@ -406,22 +406,18 @@
and ui."DATA_SOURCE" like 'jg%' and ui."DATA_SOURCE" like 'jg%'
and NOT(ui."EQU_STATE" is not null ) and NOT(ui."EQU_STATE" is not null )
and NOT(ri."USE_ORG_CODE" is not null ) and NOT(ri."USE_ORG_CODE" is not null )
<if test="jsonObject.useUnitCreditCode != null and jsonObject.useUnitCreditCode != ''" > -- 保证使用单位选择设备时(record为null) 能选择到本单位的设备 并且 监管单位在查看时(record 不为null)可以匹配到所有的设备
<if test="jsonObject.useUnitCreditCode != null and jsonObject.useUnitCreditCode != '' and jsonObject.record == null">
and ui."USE_UNIT_CREDIT_CODE" = #{jsonObject.useUnitCreditCode} and ui."USE_UNIT_CREDIT_CODE" = #{jsonObject.useUnitCreditCode}
</if> </if>
<choose> <if test="jsonObject.record != null and jsonObject.record != ''">
<when test="jsonObject.record != null and jsonObject.record != ''">
and ui."RECORD" = #{jsonObject.record} and ui."RECORD" = #{jsonObject.record}
</when>
<otherwise>
<if test="records != null and records.size() > 0">
and ui."RECORD" not in
<foreach collection="records" item="record" separator="," open="(" close=")">
#{record}
</foreach>
</if> </if>
</otherwise> <if test="jsonObject.record == null">
</choose> and not exists(SELECT 1 FROM tzs_jg_vehicle_information v, tzs_jg_vehicle_information_eq ve WHERE
v.sequence_nbr = ve.vehicle_id AND ve.equ_id = ui."RECORD" and v.status !='使用单位待提交' and v.status
!='一级受理已驳回' and v.status !='使用单位已撤回' and v.status !='已作废' )
</if>
ORDER BY ui.REC_DATE DESC ORDER BY ui.REC_DATE DESC
</select> </select>
......
...@@ -94,7 +94,8 @@ public class JgInstallationNoticeController extends BaseController { ...@@ -94,7 +94,8 @@ public class JgInstallationNoticeController extends BaseController {
// 删除待办 + 中止流程 // 删除待办 + 中止流程
JgInstallationNotice jgInstallationNotice = iJgInstallationNoticeService.getBaseMapper().selectById(sequenceNbr); JgInstallationNotice jgInstallationNotice = iJgInstallationNoticeService.getBaseMapper().selectById(sequenceNbr);
commonService.deleteTaskModel(String.valueOf(sequenceNbr),jgInstallationNotice.getInstanceId()); commonService.deleteTaskModel(String.valueOf(sequenceNbr),jgInstallationNotice.getInstanceId());
return ResponseHelper.buildResponse(iJgInstallationNoticeService.removeById(sequenceNbr)); jgInstallationNotice.setIsDelete(true);
return ResponseHelper.buildResponse(iJgInstallationNoticeService.updateById(jgInstallationNotice));
} }
/** /**
......
...@@ -95,7 +95,7 @@ public class JgMaintainNoticeController extends BaseController { ...@@ -95,7 +95,7 @@ public class JgMaintainNoticeController extends BaseController {
@ApiOperation(value = "根据sequenceNbr删除维保合同备案", notes = "根据sequenceNbr删除维保合同备案") @ApiOperation(value = "根据sequenceNbr删除维保合同备案", notes = "根据sequenceNbr删除维保合同备案")
public ResponseModel<Boolean> deleteForBatch(@RequestParam("sequenceNbrs") Long[] sequenceNbrs) { public ResponseModel<Boolean> deleteForBatch(@RequestParam("sequenceNbrs") Long[] sequenceNbrs) {
try { try {
return ResponseHelper.buildResponse(iJgMaintainNoticeService.deleteForBatch(sequenceNbrs)); return ResponseHelper.buildResponse(iJgMaintainNoticeService.deleteBySequenceNbr(sequenceNbrs));
} catch (Exception e) { } catch (Exception e) {
return CommonResponseUtil.failure(e.getMessage()); return CommonResponseUtil.failure(e.getMessage());
} }
......
...@@ -1294,8 +1294,10 @@ public class CommonServiceImpl implements ICommonService { ...@@ -1294,8 +1294,10 @@ public class CommonServiceImpl implements ICommonService {
// 删除暂存的代办 // 删除暂存的代办
deleteTasksByRelationId(businessId); deleteTasksByRelationId(businessId);
// 删除流程中的代办 及 中止流程 // 删除流程中的代办 及 中止流程
if(!ObjectUtils.isEmpty(instanceId)){
deleteTasksAndStopProcess(instanceId, "发起人主动删除业务单"); deleteTasksAndStopProcess(instanceId, "发起人主动删除业务单");
} }
}
/** /**
* 删除代办 -根据任务关联 * 删除代办 -根据任务关联
......
...@@ -707,8 +707,9 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto, ...@@ -707,8 +707,9 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
LambdaQueryWrapper<JgEnableDisableEq> lambda = new QueryWrapper<JgEnableDisableEq>().lambda(); LambdaQueryWrapper<JgEnableDisableEq> lambda = new QueryWrapper<JgEnableDisableEq>().lambda();
lambda.eq(JgEnableDisableEq::getEnableDisableApplyId, sequenceNbr); lambda.eq(JgEnableDisableEq::getEnableDisableApplyId, sequenceNbr);
jgEnableDisableEqService.getBaseMapper().delete(lambda); jgEnableDisableEqService.getBaseMapper().delete(lambda);
// 删除暂存时生成的待办 // 删除待办
commonService.deleteTasksByRelationId(sequenceNbr + ""); JgEnableDisable jgEnableDisable = this.baseMapper.selectById(sequenceNbr);
commonService.deleteTaskModel(sequenceNbr + "",jgEnableDisable.getInstanceId());
} }
public Map<String, Object> getDetail(Long sequenceNbr) { public Map<String, Object> getDetail(Long sequenceNbr) {
......
...@@ -746,7 +746,7 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto, ...@@ -746,7 +746,7 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
Collection<JgEquipTransfer> jgEquipTransfers = this.listByIds(Arrays.asList(ids)); Collection<JgEquipTransfer> jgEquipTransfers = this.listByIds(Arrays.asList(ids));
for (JgEquipTransfer notice : jgEquipTransfers) { for (JgEquipTransfer notice : jgEquipTransfers) {
notice.setIsDelete(true); notice.setIsDelete(true);
commonService.deleteTasksByRelationId(String.valueOf(notice.getSequenceNbr())); commonService.deleteTaskModel(String.valueOf(notice.getSequenceNbr()),notice.getInstanceId());
} }
return this.updateBatchById(jgEquipTransfers); return this.updateBatchById(jgEquipTransfers);
} }
......
...@@ -432,6 +432,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -432,6 +432,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
// }); // });
// 删除暂存的待办 // 删除暂存的待办
jgInstallationNotices.forEach(installationNotice -> { jgInstallationNotices.forEach(installationNotice -> {
installationNotice.setIsDelete(true);
commonService.deleteTaskModel(String.valueOf(installationNotice.getSequenceNbr()),installationNotice.getInstanceId()); commonService.deleteTaskModel(String.valueOf(installationNotice.getSequenceNbr()),installationNotice.getInstanceId());
}); });
return this.updateBatchById(jgInstallationNotices); return this.updateBatchById(jgInstallationNotices);
......
...@@ -337,27 +337,6 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto ...@@ -337,27 +337,6 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
return this.queryForList("", false); return this.queryForList("", false);
} }
/**
* 批量删除
*
* @param sequenceNbrs 主键
* @return 是否删除成功
*/
@Override
@Transactional(rollbackFor = Exception.class)
public Boolean deleteForBatch(Long[] sequenceNbrs) {
if (Objects.isNull(sequenceNbrs) || sequenceNbrs.length == 0) {
return false;
}
Collection<JgMaintainNotice> jgMaintainNotices = this.listByIds(Arrays.asList(sequenceNbrs));
jgMaintainNotices.forEach(notice -> {
if (StringUtils.hasText(notice.getInspectionUnitCreditCode())) {
throw new IllegalStateException("所选数据已存在流程,不能删除!");
}
notice.setIsDelete(true);
});
return this.updateBatchById(jgMaintainNotices);
}
/** /**
* 打印维修告知单 * 打印维修告知单
......
...@@ -202,7 +202,10 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto ...@@ -202,7 +202,10 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
// notice.setIsDelete(true); // notice.setIsDelete(true);
// }); // });
// 删除待办及中止流程 // 删除待办及中止流程
jgTransferNotices.forEach(jgTransferNotice -> commonService.deleteTaskModel(String.valueOf(jgTransferNotice.getSequenceNbr()),jgTransferNotice.getInstanceId())); jgTransferNotices.forEach(jgTransferNotice -> {
jgTransferNotice.setIsDelete(true);
commonService.deleteTaskModel(String.valueOf(jgTransferNotice.getSequenceNbr()),jgTransferNotice.getInstanceId());
});
return this.updateBatchById(jgTransferNotices); return this.updateBatchById(jgTransferNotices);
} }
......
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