成套代码优化
This commit is contained in:
parent
6c5a14c811
commit
50874b9974
|
|
@ -291,4 +291,10 @@ public class TmTask implements Serializable {
|
||||||
private String deviceCode; //like CSG-A101-2024061900001
|
private String deviceCode; //like CSG-A101-2024061900001
|
||||||
@ApiModelProperty(value = "推送智慧工程定义的门类分类机具编码")
|
@ApiModelProperty(value = "推送智慧工程定义的门类分类机具编码")
|
||||||
private String intelligentCode;
|
private String intelligentCode;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 是否库存管理
|
||||||
|
* */
|
||||||
|
@ApiModelProperty(value = "是否库存管理1是库存管理")
|
||||||
|
private String isStorage;
|
||||||
}
|
}
|
||||||
|
|
@ -62,4 +62,21 @@ public class MaWholeVo {
|
||||||
/** 库存数量 */
|
/** 库存数量 */
|
||||||
@ApiModelProperty(value = "库存数量")
|
@ApiModelProperty(value = "库存数量")
|
||||||
private Integer num;
|
private Integer num;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 是否库存管理
|
||||||
|
* */
|
||||||
|
@ApiModelProperty(value = "是否库存管理1是库存管理")
|
||||||
|
private String isStorage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 第一级id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "第一级id")
|
||||||
|
private Integer oneId;
|
||||||
|
/**
|
||||||
|
* 第二级id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "第二级id")
|
||||||
|
private Integer towId;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -86,4 +86,16 @@ public class ReturnOfMaterialsInfo {
|
||||||
@ApiModelProperty(value = "关键字")
|
@ApiModelProperty(value = "关键字")
|
||||||
private String keyWord;
|
private String keyWord;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 是否以大代小
|
||||||
|
* */
|
||||||
|
@ApiModelProperty(value = "是否以大代小1是可以")
|
||||||
|
private String isReplace;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 是否库存管理
|
||||||
|
* */
|
||||||
|
@ApiModelProperty(value = "是否库存管理1是库存管理")
|
||||||
|
private String isStorage;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1081,7 +1081,8 @@
|
||||||
mt.manage_type as manageType,
|
mt.manage_type as manageType,
|
||||||
mt.num as num,
|
mt.num as num,
|
||||||
su.nick_name as userName,
|
su.nick_name as userName,
|
||||||
lad.type_id as typeId
|
lad.type_id as typeId,
|
||||||
|
mt.is_storage as isStorage
|
||||||
FROM
|
FROM
|
||||||
lease_apply_details lad
|
lease_apply_details lad
|
||||||
LEFT JOIN lease_apply_info lai on lad.parennt_id = lai.id
|
LEFT JOIN lease_apply_info lai on lad.parennt_id = lai.id
|
||||||
|
|
|
||||||
|
|
@ -354,7 +354,7 @@
|
||||||
m.holding_time, m.warn_num, mtf.file_name photoName, mtf.file_url photoUrl,
|
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,
|
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,
|
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
|
from ma_type m
|
||||||
left join ma_prop_set mps on m.type_id = mps.type_id
|
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
|
left join ma_prop_info mpi on mps.prop_id = mpi.prop_id
|
||||||
|
|
|
||||||
|
|
@ -40,9 +40,10 @@
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<insert id="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)
|
||||||
insert into ma_whole_set (type_id,parent_id,part_num,whole_type_name,create_by,ascription_type,create_time,status)
|
values
|
||||||
values(#{item.typeId},#{item.parentId},#{item.totalNum},#{item.wholeTypeName},#{item.createBy},#{item.ascriptionType}, now(),1)
|
<foreach item="item" index="index" collection="wholeList" separator=",">
|
||||||
|
(#{item.typeId},#{item.parentId},#{item.totalNum},#{item.wholeTypeName},#{item.createBy},#{item.ascriptionType}, now(),1)
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
<update id="updateMaType">
|
<update id="updateMaType">
|
||||||
|
|
@ -71,13 +72,14 @@
|
||||||
SUM(CASE WHEN mws.ascription_type = 2 THEN 1 ELSE 0 END) AS totalNum,
|
SUM(CASE WHEN mws.ascription_type = 2 THEN 1 ELSE 0 END) AS totalNum,
|
||||||
mt2.type_name AS typeName,
|
mt2.type_name AS typeName,
|
||||||
mt.type_name AS typeModelName,
|
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
|
FROM ma_whole_set mws
|
||||||
JOIN sys_user su ON su.user_id = mws.create_by
|
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 mt ON mws.parent_id = mt.type_id
|
||||||
JOIN ma_type mt2 ON mt2.type_id = mt.parent_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 mt3 ON mt3.type_id = mt2.parent_id
|
||||||
JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id
|
|
||||||
WHERE
|
WHERE
|
||||||
mt.`status` = '0'
|
mt.`status` = '0'
|
||||||
AND mt.del_flag = '0'
|
AND mt.del_flag = '0'
|
||||||
|
|
@ -108,7 +110,8 @@
|
||||||
END as num,
|
END as num,
|
||||||
case when mws.ascription_type = 1 then '主体设备' else '配套设备' end as deviceAscription,
|
case when mws.ascription_type = 1 then '主体设备' else '配套设备' end as deviceAscription,
|
||||||
mws.ascription_type as ascriptionType,
|
mws.ascription_type as ascriptionType,
|
||||||
mws.part_num AS deviceNum
|
mws.part_num AS deviceNum,
|
||||||
|
mt.is_storage AS isStorage
|
||||||
FROM
|
FROM
|
||||||
ma_whole_set mws
|
ma_whole_set mws
|
||||||
JOIN ma_type mt ON mws.type_id = mt.type_id
|
JOIN ma_type mt ON mws.type_id = mt.type_id
|
||||||
|
|
|
||||||
|
|
@ -46,8 +46,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getInfoListByType" resultType="com.bonus.sgzb.material.domain.ReturnOfMaterialsInfo">
|
<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`
|
SELECT type_id as typeId,code,model_code as modelCode,type_name as typeName,is_replace as isReplace,is_storage as isStorage
|
||||||
WHERE `level` = #{level} and parent_id = #{parentId}
|
FROM `ma_type`
|
||||||
|
WHERE `level` = #{level} and parent_id = #{parentId} and del_flag ='0'
|
||||||
</select>
|
</select>
|
||||||
<select id="getMaTypeList" resultType="com.bonus.sgzb.material.domain.ReturnOfMaterialsInfo">
|
<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
|
SELECT mt.type_id as typeId,mt.type_name as typeName ,mt.manage_type FROM `ma_type` mt
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue