第三方产品审核

master
anthonywj 2 years ago
parent acc8533a34
commit 6e5b5e7490

@ -65,7 +65,6 @@ public class IoGenInvService {
List<IoCodeEntity> codeEnttities = codeService.findByOrderId(orderId); List<IoCodeEntity> codeEnttities = codeService.findByOrderId(orderId);
//生成库存产品表 //生成库存产品表
List<InvProductEntity> invProductEntities = new ArrayList<>();
for (IoOrderDetailResultEntity orderDetailResultEntity : orderDetailResultEntities) { for (IoOrderDetailResultEntity orderDetailResultEntity : orderDetailResultEntities) {
InvProductEntity invProductEntity = invProductService.selectByUnique(orderDetailResultEntity.getBindRlFk(), orderDetailResultEntity.getBatchNo(), orderDetailResultEntity.getSupId(), orderEntity.getDeptCode(), orderEntity.getInvCode()); InvProductEntity invProductEntity = invProductService.selectByUnique(orderDetailResultEntity.getBindRlFk(), orderDetailResultEntity.getBatchNo(), orderDetailResultEntity.getSupId(), orderEntity.getDeptCode(), orderEntity.getInvCode());
if (invProductEntity == null) { if (invProductEntity == null) {

@ -2,79 +2,127 @@
<!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.ThrProductsAddDiDao"> <mapper namespace="com.glxp.api.dao.thrsys.ThrProductsAddDiDao">
<insert id="insertThrDiProducts" keyProperty="id" parameterType="java.util.List"> <insert id="insertThrDiProducts" keyProperty="id" parameterType="java.util.List">
insert into thr_products_add_di (uuid, customerId, createTime, insert into thr_products_add_di (uuid, customerId, createTime,
auditTime, remark, auditUser, auditTime, remark, auditUser,
`status`, thirdSysFk, code, `status`, thirdSysFk, code,
sptm, ybbm, measname, sptm, ybbm, measname,
manufactory, spmc, cpms, manufactory, spmc, cpms,
price, selectThridSysStr, basicPrductRemak1, price, selectThridSysStr, basicPrductRemak1,
basicPrductRemak2, basicPrductRemak3, basicPrductRemak4, basicPrductRemak2, basicPrductRemak3, basicPrductRemak4,
basicPrductRemak5, basicPrductRemak6, basicPrductRemak7, basicPrductRemak5, basicPrductRemak6, basicPrductRemak7,
basicPrductRemak8, `name`, spec, basicPrductRemak8, `name`, spec,
registerNo, cplb, flbm, registerNo, cplb, flbm,
qxlb, tyshxydm, zczbhhzbapzbh, qxlb, tyshxydm, zczbhhzbapzbh,
ylqxzcrbarmc, ylqxzcrbarywmc, updateTime, ylqxzcrbarmc, ylqxzcrbarywmc, updateTime,
supName, model, `standard`, supName, model, `standard`,
qtbm, zczyxqz, relId,type qtbm, zczyxqz, relId, type)
) values
values
<foreach collection="list" index="index" item="item" separator=","> <foreach collection="list" index="index" item="item" separator=",">
( #{item.uuid}, (#{item.uuid},
#{item.customerId}, #{item.customerId},
#{item.createTime}, #{item.createTime},
#{item.auditTime}, #{item.auditTime},
#{item.remark}, #{item.remark},
#{item.auditUser}, #{item.auditUser},
#{item.status}, #{item.status},
#{item.thirdSysFk}, #{item.thirdSysFk},
#{item.code}, #{item.code},
#{item.sptm}, #{item.sptm},
#{item.ybbm}, #{item.ybbm},
#{item.measname}, #{item.measname},
#{item.manufactory}, #{item.manufactory},
#{item.spmc}, #{item.spmc},
#{item.cpms},#{item.price},#{item.selectThridSysStr} #{item.cpms}, #{item.price}, #{item.selectThridSysStr}
,#{item.basicPrductRemak1},#{item.basicPrductRemak2},#{item.basicPrductRemak3},#{item.basicPrductRemak4} , #{item.basicPrductRemak1}, #{item.basicPrductRemak2}, #{item.basicPrductRemak3},
,#{item.basicPrductRemak5},#{item.basicPrductRemak6},#{item.basicPrductRemak7},#{item.basicPrductRemak8} #{item.basicPrductRemak4}
,#{item.name},#{item.spec},#{item.registerNo},#{item.cplb} , #{item.basicPrductRemak5}, #{item.basicPrductRemak6}, #{item.basicPrductRemak7},
,#{item.flbm},#{item.qxlb},#{item.tyshxydm},#{item.zczbhhzbapzbh} #{item.basicPrductRemak8}
,#{item.ylqxzcrbarmc},#{item.ylqxzcrbarywmc},#{item.updateTime},#{item.supName},#{item.model} , #{item.name}, #{item.spec}, #{item.registerNo}, #{item.cplb}
,#{item.standard},#{item.qtbm} ,#{item.standard},#{item.zczyxqz},#{item.type} , #{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> </foreach>
</insert> </insert>
<update id="updateDiProduct" parameterType="com.glxp.api.entity.thrsys.ThrProductsAddDiEntity"> <update id="updateDiProduct" parameterType="com.glxp.api.entity.thrsys.ThrProductsAddDiEntity">
update thr_products_add_di update thr_products_add_di
<trim prefix="set" suffixOverrides=","> <trim prefix="set" suffixOverrides=",">
<if test="uuid != null">uuid=#{uuid},</if> <if test="uuid != null">
<if test="customerId != null">customerId=#{customerId},</if> uuid=#{uuid},
<if test="createTime != null">createTime=#{createTime},</if> </if>
<if test="auditTime != null">auditTime=#{auditTime},</if> <if test="customerId != null">
<if test="remark != null">remark=#{remark},</if> customerId=#{customerId},
<if test="auditUser != null">auditUser=#{auditUser},</if> </if>
<if test="thirdSysFk != null">`thirdSysFk`=#{thirdSysFk},</if> <if test="createTime != null">
<if test="code != null">`code`=#{code},</if> createTime=#{createTime},
<if test="sptm != null">`sptm`=#{sptm},</if> </if>
<if test="ybbm != null">`ybbm`=#{ybbm},</if> <if test="auditTime != null">
<if test="measname != null">`measname`=#{measname},</if> auditTime=#{auditTime},
<if test="manufactory != null">`manufactory`=#{manufactory},</if> </if>
<if test="spmc != null">`spmc`=#{spmc},</if> <if test="remark != null">
<if test="cpms != null">`cpms`=#{cpms},</if> remark=#{remark},
<if test="status != null">`status`=#{status},</if> </if>
<if test="price != null">`price`=#{price},</if> <if test="auditUser != null">
<if test="basicPrductRemak1 != null">`basicPrductRemak1`=#{basicPrductRemak1},</if> auditUser=#{auditUser},
<if test="basicPrductRemak2 != null">`basicPrductRemak2`=#{basicPrductRemak2},</if> </if>
<if test="basicPrductRemak3 != null">`basicPrductRemak3`=#{basicPrductRemak3},</if> <if test="thirdSysFk != null">
<if test="basicPrductRemak4 != null">`basicPrductRemak4`=#{basicPrductRemak4},</if> `thirdSysFk`=#{thirdSysFk},
<if test="basicPrductRemak5 != null">`basicPrductRemak5`=#{basicPrductRemak5},</if> </if>
<if test="basicPrductRemak6 != null">`basicPrductRemak6`=#{basicPrductRemak6},</if> <if test="code != null">
<if test="basicPrductRemak7 != null">`basicPrductRemak7`=#{basicPrductRemak7},</if> `code`=#{code},
<if test="basicPrductRemak8 != null">`basicPrductRemak8`=#{basicPrductRemak8},</if> </if>
<if test="selectThridSysStr != null">`selectThridSysStr`=#{selectThridSysStr},</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> </trim>
WHERE id = #{id} WHERE id = #{id}
</update> </update>
@ -102,8 +150,9 @@
<select id="filterThrProductsList" parameterType="com.glxp.api.req.thrsys.FilterThrProductsRequest" <select id="filterThrProductsList" parameterType="com.glxp.api.req.thrsys.FilterThrProductsRequest"
resultType="com.glxp.api.res.thrsys.ThrProductsAddDiResponse"> resultType="com.glxp.api.res.thrsys.ThrProductsAddDiResponse">
SELECT tdi.* SELECT tdi.*, bc.name companyName
FROM thr_products_add_di tdi FROM thr_products_add_di tdi
left join basic_corp bc on tdi.customerId = bc.erpId
<where> <where>
<if test="checkStatus != null"> <if test="checkStatus != null">
AND tdi.status = #{checkStatus} AND tdi.status = #{checkStatus}
@ -115,7 +164,7 @@
AND tdi.customerId = #{customerId} AND tdi.customerId = #{customerId}
</if> </if>
<if test="code != '' and code != null"> <if test="code != '' and code != null">
AND ( tdi.sptm = #{code} OR code = #{code} OR tdi.ybbm=#{code}) AND (tdi.sptm = #{code} OR code = #{code} OR tdi.ybbm = #{code})
</if> </if>
<if test="uuid != '' and uuid != null"> <if test="uuid != '' and uuid != null">
AND tdi.uuid = #{uuid} AND tdi.uuid = #{uuid}
@ -126,7 +175,7 @@
<if test="spec != '' and spec != null"> <if test="spec != '' and spec != null">
AND tdi.spec = #{spec} AND tdi.spec = #{spec}
</if> </if>
<if test=" checkStatus != null"> <if test="checkStatus != null">
AND tdi.status = #{checkStatus} AND tdi.status = #{checkStatus}
</if> </if>
<if test="customerId != '' and customerId != null"> <if test="customerId != '' and customerId != null">
@ -135,55 +184,51 @@
<if test="registerNo != '' and registerNo != null"> <if test="registerNo != '' and registerNo != null">
AND tdi.registerNo = #{registerNo} AND tdi.registerNo = #{registerNo}
</if> </if>
</where> </where>
order by tdi.createTime DESC order by tdi.createTime DESC
</select> </select>
<select id="getDiProductDetail" resultType="com.glxp.api.res.thrsys.UdiInfoResponse"> <select id="getDiProductDetail" resultType="com.glxp.api.res.thrsys.UdiInfoResponse">
select * select *
from productinfo from productinfo
where uuid = #{uuid} limit 1 where uuid = #{uuid}
limit 1
</select> </select>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.glxp.api.entity.thrsys.ThrProductsAddDiEntity" useGeneratedKeys="true"> <insert id="insert" keyColumn="id" keyProperty="id"
parameterType="com.glxp.api.entity.thrsys.ThrProductsAddDiEntity" useGeneratedKeys="true">
<!--@mbg.generated--> <!--@mbg.generated-->
insert into thr_products_add_di (uuid, customerId, createTime, insert into thr_products_add_di (uuid, customerId, createTime,
auditTime, remark, auditUser, auditTime, remark, auditUser,
`status`, thirdSysFk, code, `status`, thirdSysFk, code,
sptm, ybbm, measname, sptm, ybbm, measname,
manufactory, spmc, cpms, manufactory, spmc, cpms,
price, selectThridSysStr, basicPrductRemak1, price, selectThridSysStr, basicPrductRemak1,
basicPrductRemak2, basicPrductRemak3, basicPrductRemak4, basicPrductRemak2, basicPrductRemak3, basicPrductRemak4,
basicPrductRemak5, basicPrductRemak6, basicPrductRemak7, basicPrductRemak5, basicPrductRemak6, basicPrductRemak7,
basicPrductRemak8, `name`, spec, basicPrductRemak8, `name`, spec,
registerNo, cplb, flbm, registerNo, cplb, flbm,
qxlb, tyshxydm, zczbhhzbapzbh, qxlb, tyshxydm, zczbhhzbapzbh,
ylqxzcrbarmc, ylqxzcrbarywmc, updateTime, ylqxzcrbarmc, ylqxzcrbarywmc, updateTime,
supName, model, `standard`, supName, model, `standard`,
qtbm, zczyxqz, relId,type qtbm, zczyxqz, relId, type)
)
values (#{uuid,jdbcType=VARCHAR}, #{customerId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, values (#{uuid,jdbcType=VARCHAR}, #{customerId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
#{auditTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, #{auditUser,jdbcType=VARCHAR}, #{auditTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, #{auditUser,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{thirdSysFk,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{thirdSysFk,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR},
#{sptm,jdbcType=VARCHAR}, #{ybbm,jdbcType=VARCHAR}, #{measname,jdbcType=VARCHAR}, #{sptm,jdbcType=VARCHAR}, #{ybbm,jdbcType=VARCHAR}, #{measname,jdbcType=VARCHAR},
#{manufactory,jdbcType=VARCHAR}, #{spmc,jdbcType=VARCHAR}, #{cpms,jdbcType=VARCHAR}, #{manufactory,jdbcType=VARCHAR}, #{spmc,jdbcType=VARCHAR}, #{cpms,jdbcType=VARCHAR},
#{price,jdbcType=VARCHAR}, #{selectThridSysStr,jdbcType=VARCHAR}, #{basicPrductRemak1,jdbcType=VARCHAR}, #{price,jdbcType=VARCHAR}, #{selectThridSysStr,jdbcType=VARCHAR}, #{basicPrductRemak1,jdbcType=VARCHAR},
#{basicPrductRemak2,jdbcType=VARCHAR}, #{basicPrductRemak3,jdbcType=VARCHAR}, #{basicPrductRemak4,jdbcType=VARCHAR}, #{basicPrductRemak2,jdbcType=VARCHAR}, #{basicPrductRemak3,jdbcType=VARCHAR},
#{basicPrductRemak5,jdbcType=VARCHAR}, #{basicPrductRemak6,jdbcType=VARCHAR}, #{basicPrductRemak7,jdbcType=VARCHAR}, #{basicPrductRemak4,jdbcType=VARCHAR},
#{basicPrductRemak8,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{spec,jdbcType=VARCHAR}, #{basicPrductRemak5,jdbcType=VARCHAR}, #{basicPrductRemak6,jdbcType=VARCHAR},
#{registerNo,jdbcType=VARCHAR}, #{cplb,jdbcType=VARCHAR}, #{flbm,jdbcType=VARCHAR}, #{basicPrductRemak7,jdbcType=VARCHAR},
#{qxlb,jdbcType=VARCHAR}, #{tyshxydm,jdbcType=VARCHAR}, #{zczbhhzbapzbh,jdbcType=VARCHAR}, #{basicPrductRemak8,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{spec,jdbcType=VARCHAR},
#{ylqxzcrbarmc,jdbcType=VARCHAR}, #{ylqxzcrbarywmc,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{registerNo,jdbcType=VARCHAR}, #{cplb,jdbcType=VARCHAR}, #{flbm,jdbcType=VARCHAR},
#{supName,jdbcType=VARCHAR}, #{model,jdbcType=VARCHAR}, #{standard,jdbcType=VARCHAR}, #{qxlb,jdbcType=VARCHAR}, #{tyshxydm,jdbcType=VARCHAR}, #{zczbhhzbapzbh,jdbcType=VARCHAR},
#{qtbm,jdbcType=VARCHAR}, #{zczyxqz,jdbcType=VARCHAR}, #{relId,jdbcType=VARCHAR}, #{type,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> </insert>
<select id="filterThrProductsDiList" parameterType="com.glxp.api.req.thrsys.FilterThrProductsRequest" <select id="filterThrProductsDiList" parameterType="com.glxp.api.req.thrsys.FilterThrProductsRequest"
@ -199,6 +244,4 @@
</if> </if>
</where> </where>
</select> </select>
</mapper> </mapper>

Loading…
Cancel
Save