第三方产品审核

master
anthonywj 2 years ago
parent acc8533a34
commit 6e5b5e7490

@ -65,7 +65,6 @@ public class IoGenInvService {
List<IoCodeEntity> codeEnttities = codeService.findByOrderId(orderId);
//生成库存产品表
List<InvProductEntity> invProductEntities = new ArrayList<>();
for (IoOrderDetailResultEntity orderDetailResultEntity : orderDetailResultEntities) {
InvProductEntity invProductEntity = invProductService.selectByUnique(orderDetailResultEntity.getBindRlFk(), orderDetailResultEntity.getBatchNo(), orderDetailResultEntity.getSupId(), orderEntity.getDeptCode(), orderEntity.getInvCode());
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" >
<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
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}
)
(#{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>
<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>
@ -102,8 +150,9 @@
<select id="filterThrProductsList" parameterType="com.glxp.api.req.thrsys.FilterThrProductsRequest"
resultType="com.glxp.api.res.thrsys.ThrProductsAddDiResponse">
SELECT tdi.*
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}
@ -115,7 +164,7 @@
AND tdi.customerId = #{customerId}
</if>
<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 test="uuid != '' and uuid != null">
AND tdi.uuid = #{uuid}
@ -126,7 +175,7 @@
<if test="spec != '' and spec != null">
AND tdi.spec = #{spec}
</if>
<if test=" checkStatus != null">
<if test="checkStatus != null">
AND tdi.status = #{checkStatus}
</if>
<if test="customerId != '' and customerId != null">
@ -135,55 +184,51 @@
<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
where uuid = #{uuid}
limit 1
</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-->
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
)
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}
)
#{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>
<select id="filterThrProductsDiList" parameterType="com.glxp.api.req.thrsys.FilterThrProductsRequest"
@ -199,6 +244,4 @@
</if>
</where>
</select>
</mapper>

Loading…
Cancel
Save