|
|
|
@ -17,6 +17,54 @@
|
|
|
|
|
where recordProductName = #{recordProductName}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="filterProducts" parameterType="com.glxp.sale.admin.req.purchase.FilterPoductRequest"
|
|
|
|
|
resultType="com.glxp.sale.admin.entity.purchase.SupProductEntity">
|
|
|
|
|
SELECT sup_product.* FROM sup_product
|
|
|
|
|
<where>
|
|
|
|
|
<if test="id != null and id != ''">
|
|
|
|
|
and sup_product.id = #{id}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="productId != null and productId != ''">
|
|
|
|
|
and sup_product.productId = #{productId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="enterpriseId != null and enterpriseId != ''">
|
|
|
|
|
and sup_product.enterpriseId = #{enterpriseId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="recordCode != null and recordCode != ''">
|
|
|
|
|
and sup_product.recordCode like concat('%',#{recordCode},'%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="recordProductName != null and recordProductName != ''">
|
|
|
|
|
and sup_product.recordProductName like concat('%',#{recordProductName},'%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="recordPeopleName != null and recordPeopleName != ''">
|
|
|
|
|
and sup_product.recordPeopleName like concat('%',#{recordPeopleName},'%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="manufacturerIdFk != null and manufacturerIdFk != ''">
|
|
|
|
|
and sup_product.manufacturerIdFk = #{manufacturerIdFk}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="customerId != null and customerId != ''">
|
|
|
|
|
and sup_product.customerId = #{customerId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="auditStatus != null and auditStatus !=20 and auditStatus !=22 and auditStatus !=21">
|
|
|
|
|
and sup_product.auditStatus = #{auditStatus}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="auditStatus ==20">
|
|
|
|
|
and (sup_product.auditStatus = 0 or sup_product.auditStatus=5 or
|
|
|
|
|
sup_product.auditStatus=2)
|
|
|
|
|
</if>
|
|
|
|
|
<if test="auditStatus ==21">
|
|
|
|
|
and <![CDATA[ sup_product.auditStatus <> 0 ]]>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="auditStatus ==22">
|
|
|
|
|
and (sup_product.auditStatus = 1 or sup_product.auditStatus=4 )
|
|
|
|
|
</if>
|
|
|
|
|
<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') ]]>
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="getRegistration" parameterType="com.glxp.api.admin.req.purchase.FilterPoductRequest"
|
|
|
|
|
resultType="com.glxp.api.admin.res.purchase.SupProductResponse">
|
|
|
|
|
SELECT sup_product.* ,sup_company.companyName
|
|
|
|
@ -56,7 +104,6 @@
|
|
|
|
|
<if test="auditStatus != null and auditStatus !=20 and auditStatus !=22 and auditStatus !=21">
|
|
|
|
|
and sup_product.auditStatus = #{auditStatus}
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test="auditStatus ==20">
|
|
|
|
|
and (sup_product.auditStatus = 0 or sup_product.auditStatus=5 or
|
|
|
|
|
sup_product.auditStatus=2)
|
|
|
|
@ -102,8 +149,8 @@
|
|
|
|
|
<if test="other != null">other=#{other},</if>
|
|
|
|
|
<if test="filePath != null">filePath=#{filePath},</if>
|
|
|
|
|
<if test="remark != null">remark=#{remark},</if>
|
|
|
|
|
<if test="create_date != null">create_date=#{create_date},</if>
|
|
|
|
|
<if test="update_date != null">update_date=#{update_date},</if>
|
|
|
|
|
<if test="createTime != null">createTime=#{createTime},</if>
|
|
|
|
|
<if test="updateTime != null">updateTime=#{updateTime},</if>
|
|
|
|
|
<if test="manufacturerIdFk != null">manufacturerIdFk=#{manufacturerIdFk},</if>
|
|
|
|
|
<if test="customerId != null">customerId=#{customerId},</if>
|
|
|
|
|
<if test="productId != null">productId=#{productId},</if>
|
|
|
|
@ -124,16 +171,16 @@
|
|
|
|
|
|
|
|
|
|
<insert id="insertRegistration" parameterType="com.glxp.api.admin.entity.purchase.SupProductEntity">
|
|
|
|
|
INSERT INTO sup_product(enterpriseId, recordCode, recordProductName,
|
|
|
|
|
productManageType, recordPeopleName, recordPeopleArea,
|
|
|
|
|
recordPeopleAreaCode, recordPeopleAddress, productType,
|
|
|
|
|
productDirectoryCode, agentName, agentArea,
|
|
|
|
|
agentAreaCode, agentAddress, instructions,
|
|
|
|
|
productAddress, recordText, placeOrigin,
|
|
|
|
|
productionRegion, productionCompanyName, afterSale,
|
|
|
|
|
specification, structure, `scope`,
|
|
|
|
|
other, filePath, remark,
|
|
|
|
|
create_date, update_date, manufacturerIdFk, customerId, productId
|
|
|
|
|
, auditStatus, auditComment, sptm, ybbm, measname, cpms,hchzsb,relIdFk)
|
|
|
|
|
productManageType, recordPeopleName, recordPeopleArea,
|
|
|
|
|
recordPeopleAreaCode, recordPeopleAddress, productType,
|
|
|
|
|
productDirectoryCode, agentName, agentArea,
|
|
|
|
|
agentAreaCode, agentAddress, instructions,
|
|
|
|
|
productAddress, recordText, placeOrigin,
|
|
|
|
|
productionRegion, productionCompanyName, afterSale,
|
|
|
|
|
specification, structure, `scope`,
|
|
|
|
|
other, filePath, remark,
|
|
|
|
|
createTime, updateTime, manufacturerIdFk, customerId, productId
|
|
|
|
|
, auditStatus, auditComment, sptm, ybbm, measname, cpms, hchzsb)
|
|
|
|
|
values (#{enterpriseId}, #{recordCode}, #{recordProductName},
|
|
|
|
|
#{productManageType}, #{recordPeopleName}, #{recordPeopleArea},
|
|
|
|
|
#{recordPeopleAreaCode}, #{recordPeopleAddress}, #{productType},
|
|
|
|
@ -143,8 +190,8 @@
|
|
|
|
|
#{productionRegion}, #{productionCompanyName}, #{afterSale},
|
|
|
|
|
#{specification}, #{structure}, #{scope},
|
|
|
|
|
#{other}, #{filePath}, #{remark},
|
|
|
|
|
#{create_date}, #{update_date}, #{manufacturerIdFk}, #{customerId}, #{productId}
|
|
|
|
|
, #{auditStatus}, #{auditComment}, #{sptm}, #{ybbm}, #{measname}, #{cpms},#{hchzsb},#{relIdFk})
|
|
|
|
|
#{createTime}, #{updateTime}, #{manufacturerIdFk}, #{customerId}, #{productId}
|
|
|
|
|
, #{auditStatus}, #{auditComment}, #{sptm}, #{ybbm}, #{measname}, #{cpms}, #{hchzsb})
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteById" parameterType="Map">
|
|
|
|
|