This commit is contained in:
mashuai 2025-08-12 17:29:47 +08:00
parent 2089c4eb12
commit 2a91ea8e48
6 changed files with 51 additions and 3 deletions

View File

@ -51,4 +51,10 @@ public class TypeTreeNode {
@ApiModelProperty(value = "领料方式 0材料领料 1工器具领料 2数据同步")
private Integer leaseStyle;
@ApiModelProperty("机具类型1机具2安全工器具")
private int jiJuType;
@ApiModelProperty(value = "是否检验0不检验1检验")
private String isCheck;
}

View File

@ -1319,7 +1319,7 @@ public class MaterialLeaseInfoServiceImpl implements MaterialLeaseInfoService {
if (!CollectionUtils.isEmpty(bean.getAgreementIdList())) {
for (Long agreementId : bean.getAgreementIdList()) {
backApplyInfo.setAgreementId(agreementId);
listL4 = mapper.getUseTypeTreeL4(backApplyInfo);
listL4 = mapper.getUseTypeClzTree(backApplyInfo);
if (!CollectionUtils.isEmpty(listL4)) {
listL4 = listL4.stream()
.filter(item -> StringUtils.isNotBlank(item.getMaterialName()) && StringUtils.isNotBlank(item.getTypeName()))

View File

@ -283,4 +283,11 @@ public interface SelectMapper {
* @return
*/
BmUnit selectUnitByLeaseId(BmUnit bmUnit);
/**
* 获取部门项目
* @param backApplyInfo
* @return
*/
List<TypeTreeNode> getUseTypeClzTree(BackApplyInfo backApplyInfo);
}

View File

@ -193,6 +193,12 @@ public class LeaseApplyDetails extends BaseEntity {
@ApiModelProperty(value = "编号")
private String code;
@ApiModelProperty("机具类型1机具2安全工器具")
private int jiJuType;
@ApiModelProperty(value = "是否检验0不检验1检验")
private String isCheck;
@ApiModelProperty(value = "领料物资名称汇总")
private String maTypeNames;
public LeaseApplyDetails(Long id, Long parentId, Long typeId, BigDecimal preNum, BigDecimal auditNum, BigDecimal alNum, String status, Long companyId) {

View File

@ -847,4 +847,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE bu.del_flag = '0'
and bzgl_bz.project_id = #{externalId}
</select>
<select id="getUseTypeClzTree" resultType="com.bonus.common.biz.domain.TypeTreeNode">
SELECT
mt.type_id as typeId,
mt1.type_name as materialName,
mt.type_name as typeName,
mt.parent_id as parentId,
mt.unit_name as unitName,
mt.unit_value as unitValue,
mt.manage_type as manageType,
SUM(sai.num) AS num,
mt.LEVEL as level,
mt.jiju_type as jijuType,
mt.is_check as isCheck
FROM
ma_type mt
LEFT JOIN slt_agreement_info sai ON mt.type_id = sai.type_id
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id and mt1.del_flag = '0'
WHERE
sai.STATUS = '0' and sai.agreement_id = #{agreementId}
GROUP BY
mt.type_id
HAVING
num > 0
</select>
</mapper>

View File

@ -451,7 +451,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
lad.update_by as updateBy,
lad.update_time as updateTime,
lad.remark as remark,
lad.company_id as companyId
lad.company_id as companyId,
mt.jiju_type as jijuType,
mt.is_check as isCheck
from lease_apply_details lad
left join
ma_type mt on lad.type_id = mt.type_id and mt.`level` = '4' and mt.del_flag = '0'
@ -605,7 +607,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
IFNULL(subquery0.num, 0)
ELSE
IFNULL(mt.storage_num, 0)
END as storageNum
END as storageNum,
mt.jiju_type as jijuType,
mt.is_check as isCheck
FROM
lease_publish_details lpd
LEFT JOIN ma_type mt ON lpd.new_type = mt.type_id