功能优化
This commit is contained in:
parent
8257f1c3bd
commit
c7fc7a0cd2
|
|
@ -162,6 +162,7 @@ public class ComplexQueryServiceImpl implements ComplexQueryService {
|
|||
OutRecordInfo recordInfo = new OutRecordInfo();
|
||||
BeanUtils.copyProperties(outRecordInfo, recordInfo);
|
||||
recordInfo.setMaCode(code);
|
||||
recordInfo.setOutNum(BigDecimal.ONE);
|
||||
list.add(recordInfo);
|
||||
}
|
||||
} else {
|
||||
|
|
@ -386,7 +387,8 @@ public class ComplexQueryServiceImpl implements ComplexQueryService {
|
|||
// 批量查询并缓存结果,减少数据库交互
|
||||
Map<Long, UseStorageInfo> leaseInfoMap = Collections.emptyMap();
|
||||
if (!leaseIds.isEmpty()) {
|
||||
leaseInfoMap = complexQueryMapper.batchSelectInfo(leaseIds).stream()
|
||||
List<UseStorageInfo> queryResults = complexQueryMapper.batchSelectInfo(leaseIds);
|
||||
leaseInfoMap = queryResults.stream()
|
||||
// 先过滤掉null元素,避免后续调用方法时空指针
|
||||
.filter(Objects::nonNull)
|
||||
// 再过滤LeaseId为null的元素
|
||||
|
|
|
|||
|
|
@ -403,10 +403,14 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
|||
if (signedOrgSet.size() == 1) {
|
||||
purchaseCheckInfo.setSignLevel("2");
|
||||
} else {
|
||||
// 获取purchaseSignRecordList中是否存在auditStatus为2,即被驳回的数据
|
||||
boolean isRejected = purchaseSignRecordList.stream().anyMatch(item -> "2".equals(item.getAuditStatus()));
|
||||
if (!isRejected) {
|
||||
purchaseCheckInfo.setSignLevel("3");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 关键字过滤
|
||||
String keyWord = purchaseQueryDto.getKeyWord();
|
||||
|
|
@ -841,6 +845,7 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
|||
extractedFile(details);
|
||||
}
|
||||
} else {
|
||||
if (!CollectionUtils.isEmpty(purchaseVerifyVo.getPurchaseCheckDetailsList())) {
|
||||
// 验收驳回处理流程
|
||||
for (PurchaseCheckDetails details : purchaseVerifyVo.getPurchaseCheckDetailsList()) {
|
||||
details.setStatus(PurchaseTaskStatusEnum.TO_CHECK_AFTER_REJECT.getStatus());
|
||||
|
|
@ -849,14 +854,16 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
|||
return AjaxResult.error("验收驳回失败,请联系管理员");
|
||||
}
|
||||
extractedFile(details);
|
||||
}
|
||||
PurchaseCheckDetails purchaseCheckDetails = purchaseVerifyVo.getPurchaseCheckDetailsList().get(0);
|
||||
PurchaseSignRecord purchaseSignRecord = new PurchaseSignRecord();
|
||||
purchaseSignRecord.setTaskId(details.getTaskId());
|
||||
purchaseSignRecord.setTaskId(purchaseCheckDetails.getTaskId());
|
||||
purchaseSignRecord.setUserId(SecurityUtils.getLoginUser().getUserid());
|
||||
purchaseSignRecord.setOrgId(loginUserDeptId);
|
||||
// 审核驳回
|
||||
purchaseSignRecord.setAuditStatus("2");
|
||||
purchaseSignRecord.setCreateTime(DateUtils.getNowDate());
|
||||
purchaseSignRecord.setAuditRemark(details.getCheckResult());
|
||||
purchaseSignRecord.setAuditRemark(purchaseCheckDetails.getCheckResult());
|
||||
int addPurchaseSignResult = signProcessMapper.insertPurchaseSignRecord(purchaseSignRecord);
|
||||
if (addPurchaseSignResult < 1) {
|
||||
return AjaxResult.error("会签失败,purchase_audit_record表插入0条数据");
|
||||
|
|
|
|||
|
|
@ -42,11 +42,11 @@ public class UseMaintenanceWarningController extends BaseController
|
|||
}
|
||||
|
||||
/**
|
||||
* 查询检修过期列表
|
||||
* 查询安全工器具检修过期列表
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "查询检修过期列表")
|
||||
@ApiOperation(value = "查询安全工器具检修过期列表")
|
||||
@GetMapping("/getOverTimeList")
|
||||
public TableDataInfo getOverTimeList(UseMaintenanceWarningBean bean)
|
||||
{
|
||||
|
|
@ -56,19 +56,19 @@ public class UseMaintenanceWarningController extends BaseController
|
|||
}
|
||||
|
||||
/**
|
||||
* 导出检修过期列表
|
||||
* 导出安全工器具检修过期列表
|
||||
* @param response
|
||||
* @param bean
|
||||
*/
|
||||
@ApiOperation(value = "导出检修过期列表")
|
||||
@ApiOperation(value = "导出安全工器具检修过期列表")
|
||||
@PreventRepeatSubmit
|
||||
@SysLog(title = "检修预警", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出检修过期列表")
|
||||
@SysLog(title = "检修预警", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出安全工器具检修过期列表")
|
||||
@PostMapping("/exportOverTimeList")
|
||||
public void exportOverTimeList(HttpServletResponse response, UseMaintenanceWarningBean bean)
|
||||
{
|
||||
List<UseMaintenanceWarningBean> list = service.getOverTimeListList(bean);
|
||||
ExcelUtil<UseMaintenanceWarningBean> util = new ExcelUtil<UseMaintenanceWarningBean>(UseMaintenanceWarningBean.class);
|
||||
util.exportExcel(response, list, "检修过期数据");
|
||||
util.exportExcel(response, list, "安全工器具检修过期列表");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public interface UseMaintenanceWarningMapper
|
|||
List<UseMaintenanceWarningBean> getUserManger(UseMaintenanceWarningBean bean);
|
||||
|
||||
/**
|
||||
* 查询检修过期列表
|
||||
* 查询安全工器具检修过期列表
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ public interface UseMaintenanceWarningService
|
|||
public List<UseMaintenanceWarningBean> getList(UseMaintenanceWarningBean bean);
|
||||
|
||||
/**
|
||||
* 查询检修过期列表
|
||||
* 查询安全工器具检修过期列表
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public class UseMaintenanceWarningServiceImpl implements UseMaintenanceWarningSe
|
|||
}
|
||||
|
||||
/**
|
||||
* 查询检修过期列表
|
||||
* 查询安全工器具检修过期列表
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -228,7 +228,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN bm_agreement_info bai ON tta.agreement_id = bai.agreement_id
|
||||
LEFT JOIN bm_unit bu ON bai.unit_id = bu.unit_id
|
||||
LEFT JOIN bm_project bp ON bai.project_id = bp.pro_id
|
||||
LEFT JOIN ( SELECT parent_id, type_id, GROUP_CONCAT( DISTINCT create_by ) AS createBy, MAX( create_time ) AS createTime FROM lease_out_details GROUP BY parent_id, type_id ) a ON a.parent_id = lad.parent_id
|
||||
LEFT JOIN ( SELECT lod.parent_id, lod.type_id, GROUP_CONCAT( DISTINCT su.nick_name ) AS createBy, MAX( lod.create_time ) AS createTime FROM lease_out_details lod
|
||||
LEFT JOIN sys_user su ON lod.create_by = su.user_id GROUP BY parent_id, type_id ) a ON a.parent_id = lad.parent_id
|
||||
AND a.type_id = lad.type_id
|
||||
LEFT JOIN ma_type mt3 ON mt3.type_id = mt2.parent_id
|
||||
LEFT JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id
|
||||
|
|
|
|||
|
|
@ -1494,6 +1494,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</select>
|
||||
<select id="batchSelectInfo" resultType="com.bonus.material.basic.domain.UseStorageInfo">
|
||||
SELECT
|
||||
lod.parent_id AS leaseId,
|
||||
lod.create_time AS outTime,
|
||||
GROUP_CONCAT(DISTINCT
|
||||
CASE
|
||||
|
|
|
|||
|
|
@ -230,6 +230,7 @@
|
|||
WHERE
|
||||
mm.ma_status='2' and sai.is_slt = 0
|
||||
AND bp.pro_name is not null
|
||||
AND mt.jiju_type = 2
|
||||
AND mm.next_check_time <= CURDATE()
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
and (
|
||||
|
|
|
|||
Loading…
Reference in New Issue