代码提交
This commit is contained in:
parent
e4e6e9d962
commit
34a369201a
|
|
@ -43,10 +43,11 @@ public class ToolLedgerEntity implements Serializable {
|
||||||
private String typeName;
|
private String typeName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 管理方式:1-编码管理;2-数量管理(非空)
|
* 管理方式:0-编码管理;1-数量管理(非空)
|
||||||
* 建议后续用枚举
|
* 建议后续用枚举
|
||||||
*/
|
*/
|
||||||
private Integer manageMode;
|
private Integer manageMode;
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 装备原值(仅编码设备)
|
* 装备原值(仅编码设备)
|
||||||
|
|
@ -206,4 +207,9 @@ public class ToolLedgerEntity implements Serializable {
|
||||||
private List<DevInfoPropertyVo> propertyVoList = new ArrayList<>();
|
private List<DevInfoPropertyVo> propertyVoList = new ArrayList<>();
|
||||||
|
|
||||||
private String proName;
|
private String proName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关键字
|
||||||
|
*/
|
||||||
|
private String keyWord;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -277,15 +277,31 @@
|
||||||
WHERE tool_id = #{toolId}
|
WHERE tool_id = #{toolId}
|
||||||
</select>
|
</select>
|
||||||
<select id="getToolByTypeId" resultType="com.bonus.material.toolLedger.domain.ToolLedgerEntity">
|
<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,
|
SELECT tl.tool_code AS toolCode,
|
||||||
tl.available_num AS totalNum,
|
tl.available_num AS totalNum,
|
||||||
tt.type_name AS typeName,
|
tt.type_name AS typeName,
|
||||||
tt1.type_name AS parentTypeName
|
tt1.type_name AS parentTypeName
|
||||||
FROM tool_ledger tl
|
FROM tool_ledger tl
|
||||||
INNER JOIN tool_type tt ON tt.type_id = tl.type_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
|
INNER JOIN tool_type tt1 ON tt1.type_id = tt.parent_id
|
||||||
WHERE tl.status = #{status}
|
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>
|
||||||
<select id="getToolByPro" resultType="com.bonus.material.toolLedger.domain.ToolLedgerEntity">
|
<select id="getToolByPro" resultType="com.bonus.material.toolLedger.domain.ToolLedgerEntity">
|
||||||
SELECT cdc.pro_name AS proName, -- 工程名称
|
SELECT cdc.pro_name AS proName, -- 工程名称
|
||||||
|
|
@ -314,7 +330,7 @@
|
||||||
AND cdcd.dev_type_id = #{typeId}
|
AND cdcd.dev_type_id = #{typeId}
|
||||||
AND cdc.lease_type = #{status}
|
AND cdc.lease_type = #{status}
|
||||||
GROUP BY cdc.pro_name, cdc.pro_code, cdcd.dev_code, cdcd.dev_type_id, tt.type_name
|
GROUP BY cdc.pro_name, cdc.pro_code, cdcd.dev_code, cdcd.dev_type_id, tt.type_name
|
||||||
HAVING totalNum > 0
|
HAVING totalNum > 0
|
||||||
ORDER BY cdc.pro_name ASC, cdcd.dev_code ASC
|
ORDER BY cdc.pro_name ASC, cdcd.dev_code ASC
|
||||||
</select>
|
</select>
|
||||||
<insert id="insertDevInfoProperties">
|
<insert id="insertDevInfoProperties">
|
||||||
|
|
@ -339,6 +355,7 @@
|
||||||
<if test="originCost != null">origin_cost = #{originCost},</if>
|
<if test="originCost != null">origin_cost = #{originCost},</if>
|
||||||
<if test="totalNum != null">total_num = #{totalNum},</if>
|
<if test="totalNum != null">total_num = #{totalNum},</if>
|
||||||
<if test="availableNum != null">available_num = #{availableNum},</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="inNum != null">in_num = #{inNum},</if>
|
||||||
<if test="repairNum != null">repair_num = #{repairNum},</if>
|
<if test="repairNum != null">repair_num = #{repairNum},</if>
|
||||||
<if test="scrapNum != null">scrap_num = #{scrapNum},</if>
|
<if test="scrapNum != null">scrap_num = #{scrapNum},</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue