修改台账报表机具分包领用在用展示
This commit is contained in:
parent
e8d6125f70
commit
fc24c9d576
|
|
@ -248,6 +248,8 @@ public class MaterialRetainedEquipmentInfo {
|
||||||
|
|
||||||
private String unitValue;
|
private String unitValue;
|
||||||
|
|
||||||
|
private String unitType;
|
||||||
|
|
||||||
@ApiModelProperty(value = "报告编码")
|
@ApiModelProperty(value = "报告编码")
|
||||||
private String reportCode;
|
private String reportCode;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -859,15 +859,30 @@ public class MaterialMachineServiceImpl implements MaterialMachineService {
|
||||||
List<MaterialRetainedEquipmentInfo> recordList = materialMachineMapper.getRetainInfoList(bean);
|
List<MaterialRetainedEquipmentInfo> recordList = materialMachineMapper.getRetainInfoList(bean);
|
||||||
if (CollectionUtils.isNotEmpty(recordList)) {
|
if (CollectionUtils.isNotEmpty(recordList)) {
|
||||||
inCountNum = recordList.stream()
|
inCountNum = recordList.stream()
|
||||||
.filter(item -> "0".equals(item.getUnitValue()))
|
.filter(item -> "0".equals(item.getUnitValue()) && !"32".equals(item.getUnitType()))
|
||||||
.map(MaterialRetainedEquipmentInfo::getAllNum)
|
.map(MaterialRetainedEquipmentInfo::getAllNum)
|
||||||
.reduce(BigDecimal::add)
|
.reduce(BigDecimal::add)
|
||||||
.orElse(BigDecimal.ZERO);
|
.orElse(BigDecimal.ZERO);
|
||||||
inRopeNum = recordList.stream()
|
inRopeNum = recordList.stream()
|
||||||
.filter(item -> "1".equals(item.getUnitValue()))
|
.filter(item -> "1".equals(item.getUnitValue()) && !"32".equals(item.getUnitType()) )
|
||||||
.map(MaterialRetainedEquipmentInfo::getAllNum)
|
.map(MaterialRetainedEquipmentInfo::getAllNum)
|
||||||
.reduce(BigDecimal::add)
|
.reduce(BigDecimal::add)
|
||||||
.orElse(BigDecimal.ZERO);
|
.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类型)
|
// 获取到recordList中externalId不为null且去重的总数(转换为Integer类型)
|
||||||
info.setProNum((int) recordList.stream()
|
info.setProNum((int) recordList.stream()
|
||||||
.map(MaterialRetainedEquipmentInfo::getProName)
|
.map(MaterialRetainedEquipmentInfo::getProName)
|
||||||
|
|
|
||||||
|
|
@ -1311,8 +1311,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
ELSE
|
ELSE
|
||||||
'数量'
|
'数量'
|
||||||
END manageType,
|
END manageType,
|
||||||
'站内库存' AS teamName,
|
subquery1.teamName AS teamName,
|
||||||
'/' AS subUnitName,
|
subquery1.unitType as unitType,
|
||||||
|
IF( subquery1.unitType= 32,"机具分包领用",'/' )AS subUnitName,
|
||||||
mt.unit_value AS unitValue,
|
mt.unit_value AS unitValue,
|
||||||
CASE mt.jiju_type
|
CASE mt.jiju_type
|
||||||
WHEN 2 THEN
|
WHEN 2 THEN
|
||||||
|
|
@ -1339,7 +1340,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
bu.bzz_idcard AS idCard,
|
bu.bzz_idcard AS idCard,
|
||||||
df.project_dept AS proCenter,
|
df.project_dept AS proCenter,
|
||||||
sd.dept_name AS departName,
|
sd.dept_name AS departName,
|
||||||
'站内库存' AS teamName
|
bu.type_id AS unitType,
|
||||||
|
if(bu.type_id=32,bu.unit_name,'站内库存' ) AS teamName
|
||||||
FROM
|
FROM
|
||||||
slt_agreement_info sai
|
slt_agreement_info sai
|
||||||
LEFT JOIN ma_type mt ON mt.type_id = sai.type_id
|
LEFT JOIN ma_type mt ON mt.type_id = sai.type_id
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
WHERE
|
WHERE
|
||||||
mm.ma_status='2' and sai.is_slt = 0
|
mm.ma_status='2' and sai.is_slt = 0
|
||||||
and mt2.type_id not in (6032,6008,6270,6012,6761)
|
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)
|
AND mm.next_check_time BETWEEN CURDATE() AND DATE_ADD(CURDATE(), INTERVAL 1 MONTH)
|
||||||
<if test="keyWord != null and keyWord != ''">
|
<if test="keyWord != null and keyWord != ''">
|
||||||
and (
|
and (
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue