代码提交

This commit is contained in:
liang.chao 2025-08-24 12:25:38 +08:00
parent 1e6400c0de
commit 58245dd94c
3 changed files with 24 additions and 11 deletions

View File

@ -109,18 +109,29 @@ public class PushProDataUseInfoController extends BaseController {
}
}
@GetMapping(value = "getCompletionNotRefundedDetails")
public AjaxResult getCompletionNotRefundedDetails(ProIdsBean bean) {
//竣工未退预警数量
@GetMapping(value = "getCompletionNotRefundedNum")
public AjaxResult getCompletionNotRefundedNum(ProIdsBean bean) {
try {
HashMap<String, Object> map = new HashMap<>();
List<MachineInfoBean> results = service.getCompletionNotRefundedDetails(bean);
List<MachineInfoBean> results = service.getCompletionNotRefunded(bean);
BigDecimal totalNum = new BigDecimal(0);
for (MachineInfoBean completionNotRefundedDetail : results) {
totalNum.add(completionNotRefundedDetail.getNum());
}
map.put("results", results);
map.put("totalNum", totalNum);
return AjaxResult.success(map);
return AjaxResult.success(totalNum);
} catch (Exception e) {
logger.error(e.toString(), e);
throw new ServiceException("数据查询异常,请联系运维人员查询日志处理");
}
}
//竣工未退预警详情
@GetMapping(value = "getCompletionNotRefundedDetails")
public TableDataInfo getCompletionNotRefundedDetails(ProIdsBean bean) {
try {
List<MachineInfoBean> results = service.getCompletionNotRefundedDetails(bean);
return getDataTable(results);
} catch (Exception e) {
logger.error(e.toString(), e);
throw new ServiceException("数据查询异常,请联系运维人员查询日志处理");
@ -129,10 +140,10 @@ public class PushProDataUseInfoController extends BaseController {
// 施工机具库存预警 (7大类)
@GetMapping(value = "getInventoryAlert")
public AjaxResult getInventoryAlert(ProIdsBean bean) {
public TableDataInfo getInventoryAlert(ProIdsBean bean) {
try {
List<InventoryAlertBean> results = service.getInventoryAlert(bean);
return AjaxResult.success(results);
return getDataTable(results);
} catch (Exception e) {
logger.error(e.toString(), e);
throw new ServiceException("数据查询异常,请联系运维人员查询日志处理");

View File

@ -36,7 +36,7 @@ public class MachineInfoBean {
// 工程名称
private String proName;
// 项目管理部
private String proCemter;
private String proCenter;
// 领用时间
private String leaseTime;
// 到期时间

View File

@ -159,8 +159,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getCompletionNotRefundedDetails" resultType="com.bonus.material.push.domain.MachineInfoBean">
select
bp.pro_name as proName,
bp.pro_center as proCenter,
sum(sai.num) num,
mt2.type_id as typeId,
mt.type_name as typeModelName,
mt2.type_name as typeName,
sd.dept_name as deptName
from slt_agreement_info sai
left join bm_agreement_info bai on sai.agreement_id = bai.agreement_id