|
|
|
@ -4,10 +4,20 @@
|
|
|
|
|
<mapper namespace="com.glxp.api.dao.thrsys.ThrProductsAddDiDao">
|
|
|
|
|
|
|
|
|
|
<insert id="insertThrDiProducts" keyProperty="id" parameterType="java.util.List">
|
|
|
|
|
insert into thr_products_add_di (uuid, customerId, createTime, auditTime, remark, auditUser, `status`
|
|
|
|
|
, thirdSysFk, code, sptm, ybbm, measname,manufactory,spmc,cpms,selectThridSysStr,price,
|
|
|
|
|
basicPrductRemak1,basicPrductRemak2,basicPrductRemak3,basicPrductRemak4,
|
|
|
|
|
basicPrductRemak5,basicPrductRemak6,basicPrductRemak7,basicPrductRemak8
|
|
|
|
|
insert into thr_products_add_di (uuid, customerId, createTime,
|
|
|
|
|
auditTime, remark, auditUser,
|
|
|
|
|
`status`, thirdSysFk, code,
|
|
|
|
|
sptm, ybbm, measname,
|
|
|
|
|
manufactory, spmc, cpms,
|
|
|
|
|
price, selectThridSysStr, basicPrductRemak1,
|
|
|
|
|
basicPrductRemak2, basicPrductRemak3, basicPrductRemak4,
|
|
|
|
|
basicPrductRemak5, basicPrductRemak6, basicPrductRemak7,
|
|
|
|
|
basicPrductRemak8, `name`, spec,
|
|
|
|
|
registerNo, cplb, flbm,
|
|
|
|
|
qxlb, tyshxydm, zczbhhzbapzbh,
|
|
|
|
|
ylqxzcrbarmc, ylqxzcrbarywmc, updateTime,
|
|
|
|
|
supName, model, `standard`,
|
|
|
|
|
qtbm, zczyxqz, relId,type
|
|
|
|
|
)
|
|
|
|
|
values
|
|
|
|
|
<foreach collection="list" index="index" item="item" separator=",">
|
|
|
|
@ -25,9 +35,13 @@
|
|
|
|
|
#{item.measname},
|
|
|
|
|
#{item.manufactory},
|
|
|
|
|
#{item.spmc},
|
|
|
|
|
#{item.cpms},#{item.selectThridSysStr},#{item.price}
|
|
|
|
|
#{item.cpms},#{item.price},#{item.selectThridSysStr}
|
|
|
|
|
,#{item.basicPrductRemak1},#{item.basicPrductRemak2},#{item.basicPrductRemak3},#{item.basicPrductRemak4}
|
|
|
|
|
,#{item.basicPrductRemak5},#{item.basicPrductRemak6},#{item.basicPrductRemak7},#{item.basicPrductRemak8}
|
|
|
|
|
,#{item.name},#{item.spec},#{item.registerNo},#{item.cplb}
|
|
|
|
|
,#{item.flbm},#{item.qxlb},#{item.tyshxydm},#{item.zczbhhzbapzbh}
|
|
|
|
|
,#{item.ylqxzcrbarmc},#{item.ylqxzcrbarywmc},#{item.updateTime},#{item.supName},#{item.model}
|
|
|
|
|
,#{item.standard},#{item.qtbm} ,#{item.standard},#{item.zczyxqz},#{item.type}
|
|
|
|
|
)
|
|
|
|
|
</foreach>
|
|
|
|
|
</insert>
|
|
|
|
@ -88,15 +102,8 @@
|
|
|
|
|
|
|
|
|
|
<select id="filterThrProductsList" parameterType="com.glxp.api.req.thrsys.FilterThrProductsRequest"
|
|
|
|
|
resultType="com.glxp.api.res.thrsys.ThrProductsAddDiResponse">
|
|
|
|
|
SELECT tdi.*,
|
|
|
|
|
p.nameCode,
|
|
|
|
|
p.cpmctymc,
|
|
|
|
|
p.ggxh,
|
|
|
|
|
p.ylqxzcrbarmc,
|
|
|
|
|
p.zczbhhzbapzbh
|
|
|
|
|
SELECT tdi.*
|
|
|
|
|
FROM thr_products_add_di tdi
|
|
|
|
|
LEFT JOIN productinfo p ON tdi.uuid = p.uuid
|
|
|
|
|
LEFT JOIN sup_company c on c.customerId=tdi.customerId
|
|
|
|
|
<where>
|
|
|
|
|
<if test="checkStatus != null">
|
|
|
|
|
AND tdi.status = #{checkStatus}
|
|
|
|
@ -107,33 +114,12 @@
|
|
|
|
|
<if test="customerId != null">
|
|
|
|
|
AND tdi.customerId = #{customerId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="name != '' and name != null">
|
|
|
|
|
AND p.cpmctymc like concat('%', #{name}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="registerNo != '' and registerNo != null">
|
|
|
|
|
AND p.zczbhhzbapzbh LIKE concat('%',#{registerNo},'%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="spec != '' and spec != null">
|
|
|
|
|
AND p.ggxh LIKE concat('%',#{spec},'%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="code != '' and code != null">
|
|
|
|
|
AND ( tdi.sptm = #{code} OR p.nameCode = #{code} OR tdi.ybbm=#{code})
|
|
|
|
|
</if>
|
|
|
|
|
<if test="uuid != '' and uuid != null">
|
|
|
|
|
AND tdi.uuid = #{uuid}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="diType != '' and diType != null">
|
|
|
|
|
AND p.diType = #{diType}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="diType != '' and diType != null">
|
|
|
|
|
AND p.diType = #{diType}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="companyName != '' and companyName != null">
|
|
|
|
|
AND c.companyName = #{companyName}
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</where>
|
|
|
|
|
order by tdi.createTime DESC
|
|
|
|
|
|
|
|
|
@ -145,4 +131,39 @@
|
|
|
|
|
where uuid = #{uuid} limit 1
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.glxp.api.entity.thrsys.ThrProductsAddDiEntity" useGeneratedKeys="true">
|
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
insert into thr_products_add_di (uuid, customerId, createTime,
|
|
|
|
|
auditTime, remark, auditUser,
|
|
|
|
|
`status`, thirdSysFk, code,
|
|
|
|
|
sptm, ybbm, measname,
|
|
|
|
|
manufactory, spmc, cpms,
|
|
|
|
|
price, selectThridSysStr, basicPrductRemak1,
|
|
|
|
|
basicPrductRemak2, basicPrductRemak3, basicPrductRemak4,
|
|
|
|
|
basicPrductRemak5, basicPrductRemak6, basicPrductRemak7,
|
|
|
|
|
basicPrductRemak8, `name`, spec,
|
|
|
|
|
registerNo, cplb, flbm,
|
|
|
|
|
qxlb, tyshxydm, zczbhhzbapzbh,
|
|
|
|
|
ylqxzcrbarmc, ylqxzcrbarywmc, updateTime,
|
|
|
|
|
supName, model, `standard`,
|
|
|
|
|
qtbm, zczyxqz, relId,type
|
|
|
|
|
)
|
|
|
|
|
values (#{uuid,jdbcType=VARCHAR}, #{customerId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
#{auditTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, #{auditUser,jdbcType=VARCHAR},
|
|
|
|
|
#{status,jdbcType=INTEGER}, #{thirdSysFk,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR},
|
|
|
|
|
#{sptm,jdbcType=VARCHAR}, #{ybbm,jdbcType=VARCHAR}, #{measname,jdbcType=VARCHAR},
|
|
|
|
|
#{manufactory,jdbcType=VARCHAR}, #{spmc,jdbcType=VARCHAR}, #{cpms,jdbcType=VARCHAR},
|
|
|
|
|
#{price,jdbcType=VARCHAR}, #{selectThridSysStr,jdbcType=VARCHAR}, #{basicPrductRemak1,jdbcType=VARCHAR},
|
|
|
|
|
#{basicPrductRemak2,jdbcType=VARCHAR}, #{basicPrductRemak3,jdbcType=VARCHAR}, #{basicPrductRemak4,jdbcType=VARCHAR},
|
|
|
|
|
#{basicPrductRemak5,jdbcType=VARCHAR}, #{basicPrductRemak6,jdbcType=VARCHAR}, #{basicPrductRemak7,jdbcType=VARCHAR},
|
|
|
|
|
#{basicPrductRemak8,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{spec,jdbcType=VARCHAR},
|
|
|
|
|
#{registerNo,jdbcType=VARCHAR}, #{cplb,jdbcType=VARCHAR}, #{flbm,jdbcType=VARCHAR},
|
|
|
|
|
#{qxlb,jdbcType=VARCHAR}, #{tyshxydm,jdbcType=VARCHAR}, #{zczbhhzbapzbh,jdbcType=VARCHAR},
|
|
|
|
|
#{ylqxzcrbarmc,jdbcType=VARCHAR}, #{ylqxzcrbarywmc,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
#{supName,jdbcType=VARCHAR}, #{model,jdbcType=VARCHAR}, #{standard,jdbcType=VARCHAR},
|
|
|
|
|
#{qtbm,jdbcType=VARCHAR}, #{zczyxqz,jdbcType=VARCHAR}, #{relId,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}
|
|
|
|
|
)
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</mapper>
|