代码提交

This commit is contained in:
itcast 2025-12-16 13:41:49 +08:00
parent e4e6e9d962
commit 34a369201a
2 changed files with 31 additions and 8 deletions

View File

@ -43,10 +43,11 @@ public class ToolLedgerEntity implements Serializable {
private String typeName;
/**
* 管理方式1-编码管理2-数量管理非空
* 管理方式0-编码管理1-数量管理非空
* 建议后续用枚举
*/
private Integer manageMode;
private Integer type;
/**
* 装备原值仅编码设备
@ -206,4 +207,9 @@ public class ToolLedgerEntity implements Serializable {
private List<DevInfoPropertyVo> propertyVoList = new ArrayList<>();
private String proName;
/**
* 关键字
*/
private String keyWord;
}

View File

@ -277,15 +277,31 @@
WHERE tool_id = #{toolId}
</select>
<select id="getToolByTypeId" resultType="com.bonus.material.toolLedger.domain.ToolLedgerEntity">
SELECT a.toolCode,
a.totalNum,
a.typeName,
a.parentTypeName
FROM (
SELECT tl.tool_code AS toolCode,
tl.available_num AS totalNum,
tt.type_name AS typeName,
tt1.type_name AS parentTypeName
tl.available_num AS totalNum,
tt.type_name AS typeName,
tt1.type_name AS parentTypeName
FROM tool_ledger tl
INNER JOIN tool_type tt ON tt.type_id = tl.type_id
INNER JOIN tool_type tt1 ON tt1.type_id = tt.parent_id
INNER JOIN tool_type tt ON tt.type_id = tl.type_id
INNER JOIN tool_type tt1 ON tt1.type_id = tt.parent_id
WHERE tl.status = #{status}
AND tl.type_id = #{typeId}
AND tl.type_id = #{typeId}
AND tl.manage_mode = #{type}
) a
WHERE 1=1
<if test="keyWord != null and keyWord != ''">
AND (
a.toolCode LIKE CONCAT('%', #{keyWord}, '%')
OR a.typeName LIKE CONCAT('%', #{keyWord}, '%')
OR a.parentTypeName LIKE CONCAT('%', #{keyWord}, '%')
)
</if>
</select>
<select id="getToolByPro" resultType="com.bonus.material.toolLedger.domain.ToolLedgerEntity">
SELECT cdc.pro_name AS proName, -- 工程名称
@ -314,7 +330,7 @@
AND cdcd.dev_type_id = #{typeId}
AND cdc.lease_type = #{status}
GROUP BY cdc.pro_name, cdc.pro_code, cdcd.dev_code, cdcd.dev_type_id, tt.type_name
HAVING totalNum &gt; 0
HAVING totalNum > 0
ORDER BY cdc.pro_name ASC, cdcd.dev_code ASC
</select>
<insert id="insertDevInfoProperties">
@ -339,6 +355,7 @@
<if test="originCost != null">origin_cost = #{originCost},</if>
<if test="totalNum != null">total_num = #{totalNum},</if>
<if test="availableNum != null">available_num = #{availableNum},</if>
<if test="identifyCode != null">identify_code=#{identifyCode},</if>
<if test="inNum != null">in_num = #{inNum},</if>
<if test="repairNum != null">repair_num = #{repairNum},</if>
<if test="scrapNum != null">scrap_num = #{scrapNum},</if>