类型管理

This commit is contained in:
sxu 2024-11-27 17:03:03 +08:00
parent 23a4edc63f
commit aa1eed41d9
1 changed files with 11 additions and 17 deletions

View File

@ -7,7 +7,6 @@
<result property="typeId" column="type_id" /> <result property="typeId" column="type_id" />
<result property="typeName" column="type_name" /> <result property="typeName" column="type_name" />
<result property="parentId" column="parent_id" /> <result property="parentId" column="parent_id" />
<result property="status" column="status" />
<result property="storageNum" column="storage_num" /> <result property="storageNum" column="storage_num" />
<result property="companyId" column="company_id" /> <result property="companyId" column="company_id" />
<result property="code" column="code" /> <result property="code" column="code" />
@ -37,7 +36,7 @@
</resultMap> </resultMap>
<sql id="selectMaTypeVo"> <sql id="selectMaTypeVo">
select type_id, type_name, parent_id, status, storage_num, company_id, code, unit_id, unit_name, manage_type, lease_price, eff_time, rent_price, buy_price, pay_price, level, rated_load, test_load, holding_time, warn_num, del_flag, create_by, create_time, update_by, update_time, is_plan, is_ancuo, remark,intelligent_code ,fac_model, child_photo from ma_type select type_id, type_name, parent_id, storage_num, company_id, code, unit_id, unit_name, manage_type, lease_price, eff_time, rent_price, buy_price, pay_price, level, rated_load, test_load, holding_time, warn_num, del_flag, create_by, create_time, update_by, update_time, is_plan, is_ancuo, remark,intelligent_code ,fac_model, child_photo from ma_type
</sql> </sql>
<insert id="insertType" parameterType="com.bonus.material.ma.vo.MaType" useGeneratedKeys="true" keyProperty="typeId"> <insert id="insertType" parameterType="com.bonus.material.ma.vo.MaType" useGeneratedKeys="true" keyProperty="typeId">
@ -45,7 +44,6 @@
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="typeName != null and typeName != ''">type_name,</if> <if test="typeName != null and typeName != ''">type_name,</if>
<if test="parentId != null">parent_id,</if> <if test="parentId != null">parent_id,</if>
<if test="status != null">status,</if>
<if test="storageNum != null">storage_num,</if> <if test="storageNum != null">storage_num,</if>
<if test="companyId != null">company_id,</if> <if test="companyId != null">company_id,</if>
<if test="code != null">code,</if> <if test="code != null">code,</if>
@ -76,7 +74,6 @@
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="typeName != null and typeName != ''">#{typeName},</if> <if test="typeName != null and typeName != ''">#{typeName},</if>
<if test="parentId != null">#{parentId},</if> <if test="parentId != null">#{parentId},</if>
<if test="status != null">#{status},</if>
<if test="storageNum != null">#{storageNum},</if> <if test="storageNum != null">#{storageNum},</if>
<if test="companyId != null">#{companyId},</if> <if test="companyId != null">#{companyId},</if>
<if test="code != null">#{code},</if> <if test="code != null">#{code},</if>
@ -135,7 +132,6 @@
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="typeName != null and typeName != ''">type_name = #{typeName},</if> <if test="typeName != null and typeName != ''">type_name = #{typeName},</if>
<if test="parentId != null">parent_id = #{parentId},</if> <if test="parentId != null">parent_id = #{parentId},</if>
<if test="status != null">status = #{status},</if>
<if test="storageNum != null">storage_num = #{storageNum},</if> <if test="storageNum != null">storage_num = #{storageNum},</if>
<if test="unitId != null">unit_id = #{unitId},</if> <if test="unitId != null">unit_id = #{unitId},</if>
<if test="unitName != null">unit_name = #{unitName},</if> <if test="unitName != null">unit_name = #{unitName},</if>
@ -179,7 +175,7 @@
</delete> </delete>
<select id="selectMaTypeList" parameterType="String" resultMap="MaTypeResult"> <select id="selectMaTypeList" parameterType="String" resultMap="MaTypeResult">
select DISTINCT m.type_id, m.type_name, m.parent_id, m.status, m.storage_num, m.unit_id, m.unit_name, m.manage_type, select DISTINCT m.type_id, m.type_name, m.parent_id, m.storage_num, m.unit_id, m.unit_name, m.manage_type,
m.lease_price,m.eff_time, m.rent_price, m.buy_price, m.pay_price, m.level, m.rated_load, m.test_load, m.lease_price,m.eff_time, m.rent_price, m.buy_price, m.pay_price, m.level, m.rated_load, m.test_load,
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,
@ -193,8 +189,7 @@
left join ma_type_keeper mtk on mtf.type_id = mtk.type_id left join ma_type_keeper mtk on mtf.type_id = mtk.type_id
left join sys_user su on mtk.user_id = su.user_id left join sys_user su on mtk.user_id = su.user_id
<where> <where>
m.status = '0' m.del_flag = '0'
and m.del_flag = '0'
<if test="typeName != null and typeName !=''"> <if test="typeName != null and typeName !=''">
AND type_name like concat('%',#{typeName},'%') AND type_name like concat('%',#{typeName},'%')
</if> </if>
@ -285,7 +280,7 @@
</insert> </insert>
<select id="selectMaTypeByTypeId" resultMap="MaTypeResult"> <select id="selectMaTypeByTypeId" resultMap="MaTypeResult">
select m.type_id, m.type_name, m.parent_id, m.status, m.storage_num, m.unit_id,m.unit_name, m.manage_type, select m.type_id, m.type_name, m.parent_id, m.storage_num, m.unit_id,m.unit_name, m.manage_type,
m.lease_price, m.eff_time, m.rent_price, m.buy_price, m.pay_price, m.level, m.rated_load, m.test_load, m.lease_price, m.eff_time, m.rent_price, m.buy_price, m.pay_price, m.level, m.rated_load, m.test_load,
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,
@ -301,7 +296,7 @@
left join sys_user su on mtk.user_id = su.user_id left join sys_user su on mtk.user_id = su.user_id
left join ma_type_repair mtr on m.type_id = mtr.type_id left join ma_type_repair mtr on m.type_id = mtr.type_id
left join sys_user su1 on mtr.user_id = su1.user_id left join sys_user su1 on mtr.user_id = su1.user_id
where m.type_id = #{typeId} and m.status = '0' where m.type_id = #{typeId} and m.del_flag = '0'
</select> </select>
<update id="updateKeeperByTypeId"> <update id="updateKeeperByTypeId">
@ -322,26 +317,26 @@
</select> </select>
<select id="selectMaTypeTree" resultMap="MaTypeResult" parameterType="java.lang.String"> <select id="selectMaTypeTree" resultMap="MaTypeResult" parameterType="java.lang.String">
select m.type_id, m.type_name, m.parent_id, m.status, m.storage_num, m.unit_id, m.manage_type, select m.type_id, m.type_name, m.parent_id, m.storage_num, m.unit_id, m.manage_type,
m.lease_price, m.eff_time, m.rent_price, m.buy_price, m.pay_price, m.level, m.rated_load, m.test_load, m.lease_price, m.eff_time, m.rent_price, m.buy_price, m.pay_price, m.level, m.rated_load, m.test_load,
m.holding_time, m.warn_num, m.del_flag, m.create_by, m.create_time, m.holding_time, m.warn_num, m.del_flag, m.create_by, m.create_time,
m.remark, m.company_id m.remark, m.company_id
from ma_type m from ma_type m
where level != 4 and m.status = '0' and del_flag = '0' where level != 4 and del_flag = '0'
</select> </select>
<select id="getMaTypeSelect" resultType="com.bonus.material.ma.vo.MaType"> <select id="getMaTypeSelect" resultType="com.bonus.material.ma.vo.MaType">
select m.type_id, m.type_name, m.parent_id, m.status, m.storage_num, m.unit_id, m.manage_type, select m.type_id, m.type_name, m.parent_id, m.storage_num, m.unit_id, m.manage_type,
m.lease_price,m.eff_time, m.rent_price, m.buy_price, m.pay_price, m.level, m.rated_load, m.test_load, m.lease_price,m.eff_time, m.rent_price, m.buy_price, m.pay_price, m.level, m.rated_load, m.test_load,
m.holding_time, m.warn_num, m.del_flag, m.create_by, m.create_time, m.holding_time, m.warn_num, m.del_flag, m.create_by, m.create_time,
m.remark, m.company_id m.remark, m.company_id
from ma_type m from ma_type m
<where> <where>
m.status = '0' m.del_flag = '0'
</where> </where>
</select> </select>
<select id="getListByParentId" resultMap="MaTypeResult"> <select id="getListByParentId" resultMap="MaTypeResult">
select DISTINCT m.type_id, m.type_name, m.parent_id, m.status, m.storage_num, m.unit_id, m.unit_name, m.manage_type, select DISTINCT m.type_id, m.type_name, m.parent_id, m.storage_num, m.unit_id, m.unit_name, m.manage_type,
m.lease_price,m.rent_price, m.eff_time, m.buy_price, m.pay_price, m.level, m.rated_load, m.test_load, m.lease_price,m.rent_price, m.eff_time, m.buy_price, m.pay_price, m.level, m.rated_load, m.test_load,
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,
@ -361,7 +356,7 @@
</select> </select>
<select id="selectMaTypeTreeByLevel" resultMap="MaTypeResult" parameterType="java.lang.String"> <select id="selectMaTypeTreeByLevel" resultMap="MaTypeResult" parameterType="java.lang.String">
select m.type_id, m.type_name, m.parent_id, m.status, m.storage_num, m.unit_id, m.manage_type, select m.type_id, m.type_name, m.parent_id, m.storage_num, m.unit_id, m.manage_type,
m.lease_price, m.eff_time, m.rent_price, m.buy_price, m.pay_price, m.level, m.rated_load, m.test_load, m.lease_price, m.eff_time, m.rent_price, m.buy_price, m.pay_price, m.level, m.rated_load, m.test_load,
m.holding_time, m.warn_num, m.del_flag, m.create_by, m.create_time, m.holding_time, m.warn_num, m.del_flag, m.create_by, m.create_time,
m.remark, m.company_id,mtf.file_url photoUrl m.remark, m.company_id,mtf.file_url photoUrl
@ -377,7 +372,6 @@
m.type_id, m.type_id,
m.type_name, m.type_name,
m.parent_id, m.parent_id,
m.STATUS,
m.storage_num, m.storage_num,
m.unit_id, m.unit_id,
m.manage_type, m.manage_type,