修改台账报表机具分包领用在用展示

This commit is contained in:
bonus 2025-09-25 17:44:57 +08:00
parent e8d6125f70
commit fc24c9d576
4 changed files with 25 additions and 6 deletions

View File

@ -248,6 +248,8 @@ public class MaterialRetainedEquipmentInfo {
private String unitValue;
private String unitType;
@ApiModelProperty(value = "报告编码")
private String reportCode;

View File

@ -859,15 +859,30 @@ public class MaterialMachineServiceImpl implements MaterialMachineService {
List<MaterialRetainedEquipmentInfo> recordList = materialMachineMapper.getRetainInfoList(bean);
if (CollectionUtils.isNotEmpty(recordList)) {
inCountNum = recordList.stream()
.filter(item -> "0".equals(item.getUnitValue()))
.filter(item -> "0".equals(item.getUnitValue()) && !"32".equals(item.getUnitType()))
.map(MaterialRetainedEquipmentInfo::getAllNum)
.reduce(BigDecimal::add)
.orElse(BigDecimal.ZERO);
inRopeNum = recordList.stream()
.filter(item -> "1".equals(item.getUnitValue()))
.filter(item -> "1".equals(item.getUnitValue()) && !"32".equals(item.getUnitType()) )
.map(MaterialRetainedEquipmentInfo::getAllNum)
.reduce(BigDecimal::add)
.orElse(BigDecimal.ZERO);
useCountNum = recordList.stream()
.filter(item -> "0".equals(item.getUnitValue()) && "32".equals(item.getUnitType()))
.map(MaterialRetainedEquipmentInfo::getAllNum)
.reduce(BigDecimal::add)
.orElse(BigDecimal.ZERO);
useRopeNum = recordList.stream()
.filter(item -> "1".equals(item.getUnitValue()) && "32".equals(item.getUnitType()))
.map(MaterialRetainedEquipmentInfo::getAllNum)
.reduce(BigDecimal::add)
.orElse(BigDecimal.ZERO);
// 获取到recordList中externalId不为null且去重的总数转换为Integer类型
info.setProNum((int) recordList.stream()
.map(MaterialRetainedEquipmentInfo::getProName)

View File

@ -1311,8 +1311,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ELSE
'数量'
END manageType,
'站内库存' AS teamName,
'/' AS subUnitName,
subquery1.teamName AS teamName,
subquery1.unitType as unitType,
IF( subquery1.unitType= 32,"机具分包领用",'/' )AS subUnitName,
mt.unit_value AS unitValue,
CASE mt.jiju_type
WHEN 2 THEN
@ -1339,7 +1340,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bu.bzz_idcard AS idCard,
df.project_dept AS proCenter,
sd.dept_name AS departName,
'站内库存' AS teamName
bu.type_id AS unitType,
if(bu.type_id=32,bu.unit_name,'站内库存' ) AS teamName
FROM
slt_agreement_info sai
LEFT JOIN ma_type mt ON mt.type_id = sai.type_id

View File

@ -34,7 +34,7 @@
WHERE
mm.ma_status='2' and sai.is_slt = 0
and mt2.type_id not in (6032,6008,6270,6012,6761)
and bp.external_id is not null
and bp.pro_name is not null
AND mm.next_check_time BETWEEN CURDATE() AND DATE_ADD(CURDATE(), INTERVAL 1 MONTH)
<if test="keyWord != null and keyWord != ''">
and (