|
|
@ -1,11 +1,10 @@
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
<mapper namespace="com.glxp.api.dao.thrsys.ThrProductsDao">
|
|
|
|
<mapper namespace="com.glxp.api.dao.thrsys.ThrProductsDao">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="filterThrProducts" parameterType="com.glxp.api.req.thrsys.FilterThrProductsRequest"
|
|
|
|
<select id="filterThrProducts" parameterType="com.glxp.api.req.thrsys.FilterThrProductsRequest"
|
|
|
|
resultType="com.glxp.api.entity.thrsys.ThrProductsEntity">
|
|
|
|
resultType="com.glxp.api.entity.thrsys.ThrProductsEntity">
|
|
|
|
SELECT * FROM thr_products
|
|
|
|
SELECT *
|
|
|
|
|
|
|
|
FROM thr_products
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="name != '' and name != null">
|
|
|
|
<if test="name != '' and name != null">
|
|
|
|
AND name LIKE concat('%', #{name}, '%')
|
|
|
|
AND name LIKE concat('%', #{name}, '%')
|
|
|
@ -29,7 +28,9 @@
|
|
|
|
AND spec LIKE concat('%', #{spec}, '%')
|
|
|
|
AND spec LIKE concat('%', #{spec}, '%')
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="unionCode != '' and unionCode != null">
|
|
|
|
<if test="unionCode != '' and unionCode != null">
|
|
|
|
or code LIKE concat('%',#{unionCode},'%') or sptm LIKE concat('%',#{unionCode},'%') or ybbm LIKE
|
|
|
|
or code LIKE concat('%', #{unionCode}, '%')
|
|
|
|
|
|
|
|
or sptm LIKE concat('%', #{unionCode}, '%')
|
|
|
|
|
|
|
|
or ybbm LIKE
|
|
|
|
concat('%', #{unionCode}, '%')
|
|
|
|
concat('%', #{unionCode}, '%')
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="thirdSysFk != '' and thirdSysFk != null">
|
|
|
|
<if test="thirdSysFk != '' and thirdSysFk != null">
|
|
|
@ -42,13 +43,16 @@
|
|
|
|
AND supName LIKE concat('%', #{supName}, '%')
|
|
|
|
AND supName LIKE concat('%', #{supName}, '%')
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="lastUpdateTime != null and lastUpdateTime != ''">
|
|
|
|
<if test="lastUpdateTime != null and lastUpdateTime != ''">
|
|
|
|
<![CDATA[ and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]>
|
|
|
|
<![CDATA[
|
|
|
|
|
|
|
|
and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S') >= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S')
|
|
|
|
|
|
|
|
]]>
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
<select id="filterThrProducts1" parameterType="com.glxp.api.req.thrsys.FilterThrProductsRequest"
|
|
|
|
<select id="filterThrProducts1" parameterType="com.glxp.api.req.thrsys.FilterThrProductsRequest"
|
|
|
|
resultType="com.glxp.api.entity.thrsys.ThrProductsEntity">
|
|
|
|
resultType="com.glxp.api.entity.thrsys.ThrProductsEntity">
|
|
|
|
SELECT * FROM thr_products
|
|
|
|
SELECT *
|
|
|
|
|
|
|
|
FROM thr_products
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="name != '' and name != null">
|
|
|
|
<if test="name != '' and name != null">
|
|
|
|
AND name = #{name}
|
|
|
|
AND name = #{name}
|
|
|
@ -72,7 +76,9 @@
|
|
|
|
AND spec = #{spec}
|
|
|
|
AND spec = #{spec}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="unionCode != '' and unionCode != null">
|
|
|
|
<if test="unionCode != '' and unionCode != null">
|
|
|
|
or code LIKE = #{unionCode} or sptm = #{unionCode} or ybbm LIKE
|
|
|
|
or code LIKE = #{unionCode}
|
|
|
|
|
|
|
|
or sptm = #{unionCode}
|
|
|
|
|
|
|
|
or ybbm LIKE
|
|
|
|
= #{unionCode}
|
|
|
|
= #{unionCode}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="thirdSysFk != '' and thirdSysFk != null">
|
|
|
|
<if test="thirdSysFk != '' and thirdSysFk != null">
|
|
|
@ -85,7 +91,9 @@
|
|
|
|
AND supName LIKE = #{supName}
|
|
|
|
AND supName LIKE = #{supName}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="lastUpdateTime != null and lastUpdateTime != ''">
|
|
|
|
<if test="lastUpdateTime != null and lastUpdateTime != ''">
|
|
|
|
<![CDATA[ and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]>
|
|
|
|
<![CDATA[
|
|
|
|
|
|
|
|
and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S') >= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S')
|
|
|
|
|
|
|
|
]]>
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
@ -93,7 +101,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
<select id="filterJoinThrProducts" parameterType="com.glxp.api.req.thrsys.FilterThrProductsRequest"
|
|
|
|
<select id="filterJoinThrProducts" parameterType="com.glxp.api.req.thrsys.FilterThrProductsRequest"
|
|
|
|
resultType="com.glxp.api.res.thrsys.ThrProductsResponse">
|
|
|
|
resultType="com.glxp.api.res.thrsys.ThrProductsResponse">
|
|
|
|
SELECT thr_products.*,thr_system.thirdName thirdSysName FROM thr_products
|
|
|
|
SELECT thr_products.*, thr_system.thirdName thirdSysName
|
|
|
|
|
|
|
|
FROM thr_products
|
|
|
|
LEFT JOIN thr_system on thr_products.thirdSysFk = thr_system.thirdId
|
|
|
|
LEFT JOIN thr_system on thr_products.thirdSysFk = thr_system.thirdId
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="name != '' and name != null">
|
|
|
|
<if test="name != '' and name != null">
|
|
|
@ -118,7 +127,9 @@
|
|
|
|
AND spec LIKE concat('%', #{spec}, '%')
|
|
|
|
AND spec LIKE concat('%', #{spec}, '%')
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="unionCode != '' and unionCode != null">
|
|
|
|
<if test="unionCode != '' and unionCode != null">
|
|
|
|
or code LIKE concat('%',#{unionCode},'%') or sptm LIKE concat('%',#{unionCode},'%') or ybbm LIKE
|
|
|
|
or code LIKE concat('%', #{unionCode}, '%')
|
|
|
|
|
|
|
|
or sptm LIKE concat('%', #{unionCode}, '%')
|
|
|
|
|
|
|
|
or ybbm LIKE
|
|
|
|
concat('%', #{unionCode}, '%')
|
|
|
|
concat('%', #{unionCode}, '%')
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="thirdSysFk != '' and thirdSysFk != null">
|
|
|
|
<if test="thirdSysFk != '' and thirdSysFk != null">
|
|
|
@ -131,7 +142,9 @@
|
|
|
|
AND supName LIKE concat('%', #{supName}, '%')
|
|
|
|
AND supName LIKE concat('%', #{supName}, '%')
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="lastUpdateTime != null and lastUpdateTime != ''">
|
|
|
|
<if test="lastUpdateTime != null and lastUpdateTime != ''">
|
|
|
|
<![CDATA[ and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]>
|
|
|
|
<![CDATA[
|
|
|
|
|
|
|
|
and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S') >= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S')
|
|
|
|
|
|
|
|
]]>
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
@ -156,9 +169,9 @@
|
|
|
|
INTO thr_products
|
|
|
|
INTO thr_products
|
|
|
|
(code, `name`, measname, spec, registerNo, manufactory,
|
|
|
|
(code, `name`, measname, spec, registerNo, manufactory,
|
|
|
|
cplb, flbm, qxlb, ybbm, sptm, tyshxydm, zczbhhzbapzbh, ylqxzcrbarmc, ylqxzcrbarywmc, cpms,
|
|
|
|
cplb, flbm, qxlb, ybbm, sptm, tyshxydm, zczbhhzbapzbh, ylqxzcrbarmc, ylqxzcrbarywmc, cpms,
|
|
|
|
thirdSysFk, updateTime, supName, model, standard, qtbm, zczyxqz, remark, remark1, remark2, remark3,price,createUser,createTime,updateUser)
|
|
|
|
thirdSysFk, updateTime, supName, model, standard, qtbm, zczyxqz, remark, remark1, remark2, remark3, price,
|
|
|
|
values (
|
|
|
|
createUser, createTime, updateUser)
|
|
|
|
#{code},
|
|
|
|
values (#{code},
|
|
|
|
#{name},
|
|
|
|
#{name},
|
|
|
|
#{measname},
|
|
|
|
#{measname},
|
|
|
|
#{spec},
|
|
|
|
#{spec},
|
|
|
@ -188,13 +201,13 @@
|
|
|
|
#{price},
|
|
|
|
#{price},
|
|
|
|
#{createUser},
|
|
|
|
#{createUser},
|
|
|
|
#{createTime},
|
|
|
|
#{createTime},
|
|
|
|
#{updateUser}
|
|
|
|
#{updateUser})
|
|
|
|
)
|
|
|
|
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectThrProducts" parameterType="com.glxp.api.req.thrsys.FilterThrProductsRequest"
|
|
|
|
<select id="selectThrProducts" parameterType="com.glxp.api.req.thrsys.FilterThrProductsRequest"
|
|
|
|
resultType="com.glxp.api.entity.thrsys.ThrProductsEntity">
|
|
|
|
resultType="com.glxp.api.entity.thrsys.ThrProductsEntity">
|
|
|
|
SELECT * FROM thr_products
|
|
|
|
SELECT *
|
|
|
|
|
|
|
|
FROM thr_products
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="name != '' and name != null">
|
|
|
|
<if test="name != '' and name != null">
|
|
|
|
AND name = #{name}
|
|
|
|
AND name = #{name}
|
|
|
@ -215,4 +228,119 @@
|
|
|
|
ORDER BY updateTime DESC
|
|
|
|
ORDER BY updateTime DESC
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id"
|
|
|
|
|
|
|
|
parameterType="com.glxp.api.entity.system.ThrProductsEntity" useGeneratedKeys="true">
|
|
|
|
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
|
|
|
insert into thr_products
|
|
|
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
|
|
|
<if test="id != null">
|
|
|
|
|
|
|
|
id,
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
code,
|
|
|
|
|
|
|
|
`name`,
|
|
|
|
|
|
|
|
measname,
|
|
|
|
|
|
|
|
spec,
|
|
|
|
|
|
|
|
registerNo,
|
|
|
|
|
|
|
|
manufactory,
|
|
|
|
|
|
|
|
thirdSysFk,
|
|
|
|
|
|
|
|
cplb,
|
|
|
|
|
|
|
|
flbm,
|
|
|
|
|
|
|
|
qxlb,
|
|
|
|
|
|
|
|
ybbm,
|
|
|
|
|
|
|
|
sptm,
|
|
|
|
|
|
|
|
tyshxydm,
|
|
|
|
|
|
|
|
zczbhhzbapzbh,
|
|
|
|
|
|
|
|
ylqxzcrbarmc,
|
|
|
|
|
|
|
|
ylqxzcrbarywmc,
|
|
|
|
|
|
|
|
cpms,
|
|
|
|
|
|
|
|
updateTime,
|
|
|
|
|
|
|
|
supName,
|
|
|
|
|
|
|
|
model,
|
|
|
|
|
|
|
|
`standard`,
|
|
|
|
|
|
|
|
qtbm,
|
|
|
|
|
|
|
|
zczyxqz,
|
|
|
|
|
|
|
|
remark,
|
|
|
|
|
|
|
|
remark1,
|
|
|
|
|
|
|
|
remark2,
|
|
|
|
|
|
|
|
remark3,
|
|
|
|
|
|
|
|
price,
|
|
|
|
|
|
|
|
`createUser`,
|
|
|
|
|
|
|
|
createTime,
|
|
|
|
|
|
|
|
updateUser,
|
|
|
|
|
|
|
|
</trim>
|
|
|
|
|
|
|
|
values
|
|
|
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
|
|
|
<if test="id != null">
|
|
|
|
|
|
|
|
#{id,jdbcType=INTEGER},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
#{code,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
#{name,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
#{measname,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
#{spec,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
#{registerNo,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
#{manufactory,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
#{thirdSysFk,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
#{cplb,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
#{flbm,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
#{qxlb,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
#{ybbm,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
#{sptm,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
#{tyshxydm,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
#{zczbhhzbapzbh,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
#{ylqxzcrbarmc,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
#{ylqxzcrbarywmc,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
#{cpms,jdbcType=LONGVARCHAR},
|
|
|
|
|
|
|
|
#{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
|
|
|
#{supName,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
#{model,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
#{standard,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
#{qtbm,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
#{zczyxqz,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
#{remark,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
#{remark1,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
#{remark2,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
#{remark3,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
#{price,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
#{createUser,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
|
|
|
#{updateUser,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
</trim>
|
|
|
|
|
|
|
|
on duplicate key update
|
|
|
|
|
|
|
|
<trim suffixOverrides=",">
|
|
|
|
|
|
|
|
<if test="id != null">
|
|
|
|
|
|
|
|
id = #{id,jdbcType=INTEGER},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
code = #{code,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
`name` = #{name,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
measname = #{measname,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
spec = #{spec,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
registerNo = #{registerNo,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
manufactory = #{manufactory,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
thirdSysFk = #{thirdSysFk,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
cplb = #{cplb,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
flbm = #{flbm,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
qxlb = #{qxlb,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
ybbm = #{ybbm,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
sptm = #{sptm,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
tyshxydm = #{tyshxydm,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
zczbhhzbapzbh = #{zczbhhzbapzbh,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
ylqxzcrbarmc = #{ylqxzcrbarmc,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
ylqxzcrbarywmc = #{ylqxzcrbarywmc,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
cpms = #{cpms,jdbcType=LONGVARCHAR},
|
|
|
|
|
|
|
|
updateTime = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
|
|
|
supName = #{supName,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
model = #{model,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
`standard` = #{standard,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
qtbm = #{qtbm,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
zczyxqz = #{zczyxqz,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
remark = #{remark,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
remark1 = #{remark1,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
remark2 = #{remark2,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
remark3 = #{remark3,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
price = #{price,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
`createUser` = #{createUser,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
createTime = #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
|
|
|
updateUser = #{updateUser,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
</trim>
|
|
|
|
|
|
|
|
</insert>
|
|
|
|
</mapper>
|
|
|
|
</mapper>
|
|
|
|