成套代码优化

This commit is contained in:
马三炮 2025-03-07 18:13:54 +08:00
parent 6c5a14c811
commit 50874b9974
7 changed files with 53 additions and 13 deletions

View File

@ -291,4 +291,10 @@ public class TmTask implements Serializable {
private String deviceCode; //like CSG-A101-2024061900001
@ApiModelProperty(value = "推送智慧工程定义的门类分类机具编码")
private String intelligentCode;
}
/*
* 是否库存管理
* */
@ApiModelProperty(value = "是否库存管理1是库存管理")
private String isStorage;
}

View File

@ -62,4 +62,21 @@ public class MaWholeVo {
/** 库存数量 */
@ApiModelProperty(value = "库存数量")
private Integer num;
/*
* 是否库存管理
* */
@ApiModelProperty(value = "是否库存管理1是库存管理")
private String isStorage;
/**
* 第一级id
*/
@ApiModelProperty(value = "第一级id")
private Integer oneId;
/**
* 第二级id
*/
@ApiModelProperty(value = "第二级id")
private Integer towId;
}

View File

@ -86,4 +86,16 @@ public class ReturnOfMaterialsInfo {
@ApiModelProperty(value = "关键字")
private String keyWord;
/*
* 是否以大代小
* */
@ApiModelProperty(value = "是否以大代小1是可以")
private String isReplace;
/*
* 是否库存管理
* */
@ApiModelProperty(value = "是否库存管理1是库存管理")
private String isStorage;
}

View File

@ -1081,7 +1081,8 @@
mt.manage_type as manageType,
mt.num as num,
su.nick_name as userName,
lad.type_id as typeId
lad.type_id as typeId,
mt.is_storage as isStorage
FROM
lease_apply_details lad
LEFT JOIN lease_apply_info lai on lad.parennt_id = lai.id

View File

@ -354,7 +354,7 @@
m.holding_time, m.warn_num, mtf.file_name photoName, mtf.file_url photoUrl,
mtf2.file_name documentName, mtf2.file_url documentUrl, mtk.user_id keeperUserId,
su.nick_name keeperUserName, mpi.prop_name, m.del_flag, m.create_by, m.create_time,
m.remark, m.company_id,m.fac_model as facModel,m.intelligent_code
m.remark, m.company_id,m.fac_model as facModel,m.is_replace, m.is_storage, m.intelligent_code
from ma_type m
left join ma_prop_set mps on m.type_id = mps.type_id
left join ma_prop_info mpi on mps.prop_id = mpi.prop_id

View File

@ -40,9 +40,10 @@
</insert>
<insert id="insert">
<foreach item="item" index="index" collection="wholeList" separator=";">
insert into ma_whole_set (type_id,parent_id,part_num,whole_type_name,create_by,ascription_type,create_time,status)
values(#{item.typeId},#{item.parentId},#{item.totalNum},#{item.wholeTypeName},#{item.createBy},#{item.ascriptionType}, now(),1)
insert into ma_whole_set (type_id,parent_id,part_num,whole_type_name,create_by,ascription_type,create_time,status)
values
<foreach item="item" index="index" collection="wholeList" separator=",">
(#{item.typeId},#{item.parentId},#{item.totalNum},#{item.wholeTypeName},#{item.createBy},#{item.ascriptionType}, now(),1)
</foreach>
</insert>
<update id="updateMaType">
@ -71,13 +72,14 @@
SUM(CASE WHEN mws.ascription_type = 2 THEN 1 ELSE 0 END) AS totalNum,
mt2.type_name AS typeName,
mt.type_name AS typeModelName,
su.nick_name AS nickName
su.nick_name AS nickName,
mt3.type_id AS oneId,
mt2.type_id AS towId
FROM ma_whole_set mws
JOIN sys_user su ON su.user_id = mws.create_by
JOIN ma_type mt ON mws.parent_id = mt.type_id
JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
JOIN ma_type mt3 ON mt3.type_id = mt2.parent_id
JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id
WHERE
mt.`status` = '0'
AND mt.del_flag = '0'
@ -108,7 +110,8 @@
END as num,
case when mws.ascription_type = 1 then '主体设备' else '配套设备' end as deviceAscription,
mws.ascription_type as ascriptionType,
mws.part_num AS deviceNum
mws.part_num AS deviceNum,
mt.is_storage AS isStorage
FROM
ma_whole_set mws
JOIN ma_type mt ON mws.type_id = mt.type_id
@ -209,4 +212,4 @@
<select id="selectAllTypeId" resultType="com.bonus.sgzb.material.domain.MaWhole">
select type_id from ma_whole_set
</select>
</mapper>
</mapper>

View File

@ -46,8 +46,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="getInfoListByType" resultType="com.bonus.sgzb.material.domain.ReturnOfMaterialsInfo">
SELECT type_id as typeId,code,model_code as modelCode,type_name as typeName FROM `ma_type`
WHERE `level` = #{level} and parent_id = #{parentId}
SELECT type_id as typeId,code,model_code as modelCode,type_name as typeName,is_replace as isReplace,is_storage as isStorage
FROM `ma_type`
WHERE `level` = #{level} and parent_id = #{parentId} and del_flag ='0'
</select>
<select id="getMaTypeList" resultType="com.bonus.sgzb.material.domain.ReturnOfMaterialsInfo">
SELECT mt.type_id as typeId,mt.type_name as typeName ,mt.manage_type FROM `ma_type` mt
@ -56,4 +57,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
GROUP BY mt.type_id
</select>
</mapper>
</mapper>