领料模块优化
This commit is contained in:
parent
cdc46024fe
commit
c7b3e2f7f8
|
|
@ -186,6 +186,12 @@ public class LeaseApplyInfo extends BaseEntity {
|
||||||
@Excel(name = "领料工程", sort = 3)
|
@Excel(name = "领料工程", sort = 3)
|
||||||
private String projectName;
|
private String projectName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 领料物资名称汇总
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "领料物资名称汇总")
|
||||||
|
private String maTypeNames;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 预领料合计数
|
* 预领料合计数
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -76,4 +76,6 @@ public interface LeaseApplyDetailsMapper {
|
||||||
int updateLeaseApplyDetailsByLeaseOutRecord(@Param("record") LeaseOutDetails record);
|
int updateLeaseApplyDetailsByLeaseOutRecord(@Param("record") LeaseOutDetails record);
|
||||||
|
|
||||||
LeaseApplyDetails getOutboundNum(LeaseOutDetails record);
|
LeaseApplyDetails getOutboundNum(LeaseOutDetails record);
|
||||||
|
|
||||||
|
String selectMaTypeNameByParentId(Long parentId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,11 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<LeaseApplyInfo> selectLeaseApplyInfoList(LeaseApplyInfo leaseApplyInfo) {
|
public List<LeaseApplyInfo> selectLeaseApplyInfoList(LeaseApplyInfo leaseApplyInfo) {
|
||||||
return leaseApplyInfoMapper.selectLeaseApplyInfoList(leaseApplyInfo);
|
List<LeaseApplyInfo> list = leaseApplyInfoMapper.selectLeaseApplyInfoList(leaseApplyInfo);
|
||||||
|
for (LeaseApplyInfo applyInfo : list) {
|
||||||
|
applyInfo.setMaTypeNames(leaseApplyDetailsMapper.selectMaTypeNameByParentId(applyInfo.getId()));
|
||||||
|
}
|
||||||
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -194,4 +194,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
FROM lease_apply_details
|
FROM lease_apply_details
|
||||||
WHERE id = #{id} AND (pre_num - IFNULL(al_num, 0)) > 0
|
WHERE id = #{id} AND (pre_num - IFNULL(al_num, 0)) > 0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectMaTypeNameByParentId" resultType="java.lang.String">
|
||||||
|
select
|
||||||
|
GROUP_CONCAT(type_name) typeName
|
||||||
|
from
|
||||||
|
(
|
||||||
|
select
|
||||||
|
distinct lad.parent_id, mt1.type_name
|
||||||
|
from
|
||||||
|
lease_apply_details lad
|
||||||
|
left join ma_type mt on lad.type_id = mt.type_id
|
||||||
|
left join ma_type mt1 on mt.parent_id = mt1.type_id
|
||||||
|
where
|
||||||
|
1=1
|
||||||
|
<if test="parentId != null">
|
||||||
|
and lad.parent_id = #{parentId}
|
||||||
|
</if>
|
||||||
|
) t
|
||||||
|
GROUP BY parent_id
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue