|  |  |  | @ -2,200 +2,12 @@ | 
			
		
	
		
			
				
					|  |  |  |  | <!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.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, | 
			
		
	
		
			
				
					|  |  |  |  |                                          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=","> | 
			
		
	
		
			
				
					|  |  |  |  |             (#{item.uuid}, | 
			
		
	
		
			
				
					|  |  |  |  |              #{item.customerId}, | 
			
		
	
		
			
				
					|  |  |  |  |              #{item.createTime}, | 
			
		
	
		
			
				
					|  |  |  |  |              #{item.auditTime}, | 
			
		
	
		
			
				
					|  |  |  |  |              #{item.remark}, | 
			
		
	
		
			
				
					|  |  |  |  |              #{item.auditUser}, | 
			
		
	
		
			
				
					|  |  |  |  |              #{item.status}, | 
			
		
	
		
			
				
					|  |  |  |  |              #{item.thirdSysFk}, | 
			
		
	
		
			
				
					|  |  |  |  |              #{item.code}, | 
			
		
	
		
			
				
					|  |  |  |  |              #{item.sptm}, | 
			
		
	
		
			
				
					|  |  |  |  |              #{item.ybbm}, | 
			
		
	
		
			
				
					|  |  |  |  |              #{item.measname}, | 
			
		
	
		
			
				
					|  |  |  |  |              #{item.manufactory}, | 
			
		
	
		
			
				
					|  |  |  |  |              #{item.spmc}, | 
			
		
	
		
			
				
					|  |  |  |  |              #{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> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     <update id="updateDiProduct" parameterType="com.glxp.api.entity.thrsys.ThrProductsAddDiEntity"> | 
			
		
	
		
			
				
					|  |  |  |  |         update thr_products_add_di | 
			
		
	
		
			
				
					|  |  |  |  |         <trim prefix="set" suffixOverrides=","> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="uuid != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 uuid=#{uuid}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="customerId != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 customerId=#{customerId}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="createTime != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 createTime=#{createTime}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="auditTime != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 auditTime=#{auditTime}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="remark != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 remark=#{remark}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="auditUser != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 auditUser=#{auditUser}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="thirdSysFk != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 `thirdSysFk`=#{thirdSysFk}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="code != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 `code`=#{code}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="sptm != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 `sptm`=#{sptm}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="ybbm != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 `ybbm`=#{ybbm}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="measname != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 `measname`=#{measname}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="manufactory != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 `manufactory`=#{manufactory}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="spmc != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 `spmc`=#{spmc}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="cpms != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 `cpms`=#{cpms}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="status != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 `status`=#{status}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="price != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 `price`=#{price}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="basicPrductRemak1 != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 `basicPrductRemak1`=#{basicPrductRemak1}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="basicPrductRemak2 != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 `basicPrductRemak2`=#{basicPrductRemak2}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="basicPrductRemak3 != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 `basicPrductRemak3`=#{basicPrductRemak3}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="basicPrductRemak4 != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 `basicPrductRemak4`=#{basicPrductRemak4}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="basicPrductRemak5 != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 `basicPrductRemak5`=#{basicPrductRemak5}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="basicPrductRemak6 != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 `basicPrductRemak6`=#{basicPrductRemak6}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="basicPrductRemak7 != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 `basicPrductRemak7`=#{basicPrductRemak7}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="basicPrductRemak8 != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 `basicPrductRemak8`=#{basicPrductRemak8}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="selectThridSysStr != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 `selectThridSysStr`=#{selectThridSysStr}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |         </trim> | 
			
		
	
		
			
				
					|  |  |  |  |         WHERE id = #{id} | 
			
		
	
		
			
				
					|  |  |  |  |     </update> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     <delete id="deleteById"> | 
			
		
	
		
			
				
					|  |  |  |  |         delete | 
			
		
	
		
			
				
					|  |  |  |  |         from thr_products_add_di | 
			
		
	
		
			
				
					|  |  |  |  |         where id = #{id} | 
			
		
	
		
			
				
					|  |  |  |  |     </delete> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     <select id="filterThrProductsGetId" parameterType="integer" | 
			
		
	
		
			
				
					|  |  |  |  |             resultType="com.glxp.api.entity.thrsys.ThrProductsAddDiEntity"> | 
			
		
	
		
			
				
					|  |  |  |  |         select * | 
			
		
	
		
			
				
					|  |  |  |  |         from thr_products_add_di | 
			
		
	
		
			
				
					|  |  |  |  |         where id = #{id} | 
			
		
	
		
			
				
					|  |  |  |  |     </select> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     <select id="filterThrProductsGetUuid" parameterType="string" | 
			
		
	
		
			
				
					|  |  |  |  |             resultType="com.glxp.api.entity.thrsys.ThrProductsAddDiEntity"> | 
			
		
	
		
			
				
					|  |  |  |  |         select * | 
			
		
	
		
			
				
					|  |  |  |  |         from thr_products_add_di | 
			
		
	
		
			
				
					|  |  |  |  |         where uuid = #{uuid} | 
			
		
	
		
			
				
					|  |  |  |  |     </select> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     <select id="filterThrProductsList" parameterType="com.glxp.api.req.thrsys.FilterThrProductsRequest" | 
			
		
	
		
			
				
					|  |  |  |  |             resultType="com.glxp.api.res.thrsys.ThrProductsAddDiResponse"> | 
			
		
	
		
			
				
					|  |  |  |  |         SELECT tdi.*, | 
			
		
	
		
			
				
					|  |  |  |  |                bc.name        companyName | 
			
		
	
		
			
				
					|  |  |  |  |         FROM thr_products_add_di tdi | 
			
		
	
		
			
				
					|  |  |  |  |                  left join basic_corp bc on tdi.customerId = bc.erpId | 
			
		
	
		
			
				
					|  |  |  |  |         <where> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="checkStatus != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND tdi.status = #{checkStatus} | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="id != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND tdi.id = #{id} | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="customerId != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND tdi.customerId = #{customerId} | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="code != '' and code != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND (tdi.sptm = #{code} OR code = #{code} OR tdi.ybbm = #{code}) | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="uuid != '' and uuid != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND tdi.uuid = #{uuid} | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="name != '' and name != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND tdi.name = #{name} | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="spec != '' and spec != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND tdi.spec = #{spec} | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="checkStatus != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND tdi.status = #{checkStatus} | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="customerId != '' and customerId != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND tdi.customerId = #{customerId} | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="registerNo != '' and registerNo != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND tdi.registerNo = #{registerNo} | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |         </where> | 
			
		
	
		
			
				
					|  |  |  |  |         order by tdi.createTime DESC | 
			
		
	
		
			
				
					|  |  |  |  |     </select> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     <select id="getDiProductDetail" resultType="com.glxp.api.res.thrsys.UdiInfoResponse"> | 
			
		
	
		
			
				
					|  |  |  |  |         select * | 
			
		
	
		
			
				
					|  |  |  |  |         from productinfo | 
			
		
	
		
			
				
					|  |  |  |  |         where uuid = #{uuid} | 
			
		
	
		
			
				
					|  |  |  |  |         limit 1 | 
			
		
	
		
			
				
					|  |  |  |  |     </select> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     <insert id="insert" keyColumn="id" keyProperty="id" | 
			
		
	
		
			
				
					|  |  |  |  |             parameterType="com.glxp.api.entity.thrsys.ThrProductsAddDiEntity" useGeneratedKeys="true"> | 
			
		
	
		
			
				
					|  |  |  |  |         <!--@mbg.generated--> | 
			
		
	
	
		
			
				
					|  |  |  | @ -232,39 +44,5 @@ | 
			
		
	
		
			
				
					|  |  |  |  |                 #{type,jdbcType=VARCHAR}) | 
			
		
	
		
			
				
					|  |  |  |  |     </insert> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     <select id="filterThrProductsDiList" parameterType="com.glxp.api.req.thrsys.FilterThrProductsRequest" | 
			
		
	
		
			
				
					|  |  |  |  |             resultType="com.glxp.api.res.thrsys.ThrProductsAddDiResponse"> | 
			
		
	
		
			
				
					|  |  |  |  |         SELECT tdi.* | 
			
		
	
		
			
				
					|  |  |  |  |         FROM thr_products_add_di tdi | 
			
		
	
		
			
				
					|  |  |  |  |         <where> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="thirdSysFk != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND tdi.thirdSysFk = #{thirdSysFk} | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="code != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND tdi.code = #{code} | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="status != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND tdi.status = #{status} | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |         </where> | 
			
		
	
		
			
				
					|  |  |  |  |     </select><select id="filterThrProductsDiLists" parameterType="com.glxp.api.req.thrsys.FilterThrProductsRequest" | 
			
		
	
		
			
				
					|  |  |  |  |                      resultType="com.glxp.api.entity.thrsys.ThrProductsAddDiEntity"> | 
			
		
	
		
			
				
					|  |  |  |  |     SELECT tdi.* | 
			
		
	
		
			
				
					|  |  |  |  |     FROM thr_products_add_di tdi | 
			
		
	
		
			
				
					|  |  |  |  |     <where> | 
			
		
	
		
			
				
					|  |  |  |  |         <if test="thirdSysFk != null"> | 
			
		
	
		
			
				
					|  |  |  |  |             AND tdi.thirdSysFk = #{thirdSysFk} | 
			
		
	
		
			
				
					|  |  |  |  |         </if> | 
			
		
	
		
			
				
					|  |  |  |  |         <if test="code != null"> | 
			
		
	
		
			
				
					|  |  |  |  |             AND tdi.code = #{code} | 
			
		
	
		
			
				
					|  |  |  |  |         </if> | 
			
		
	
		
			
				
					|  |  |  |  |         <if test="status != null"> | 
			
		
	
		
			
				
					|  |  |  |  |             AND tdi.status = #{status} | 
			
		
	
		
			
				
					|  |  |  |  |         </if> | 
			
		
	
		
			
				
					|  |  |  |  |         <if test="diType != null"> | 
			
		
	
		
			
				
					|  |  |  |  |             AND  updateTime <= "2023-04-5 00:00:00" | 
			
		
	
		
			
				
					|  |  |  |  |         </if> | 
			
		
	
		
			
				
					|  |  |  |  |     </where> | 
			
		
	
		
			
				
					|  |  |  |  | </select> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | </mapper> | 
			
		
	
	
		
			
				
					|  |  |  | 
 |