master
xhj 2 years ago
parent a5e0502127
commit 8ab61396ed

@ -1492,6 +1492,7 @@ public class BomUploadServiceImpl {
}
// 跨位
System.out.println("tzbh = " + tzbh);
String s = kwxxMap.get(tzbh.substring(4,7));
String zl = this.getZL(tzbh);

@ -1,5 +1,6 @@
package com.dsic.gj_erp.service.jcsj.impl;
import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -78,13 +79,20 @@ public class DmBomServiceImpl extends ServiceImpl<DmBomMapper, DmBom> implements
@Override
public void insertBoms(List<DmBom> map) throws CustomException {
map.forEach(e->{
if(StringUtils.isBlank(e.getZt())){
e.setZt("02");
dmBomMapper.insertBom(e);
}
});
// dmBomMapper.insertBoms(map);
List<List<DmBom>> partition = ListUtil.partition(map, 50);
for (List<DmBom> users : partition) {
dmBomMapper.insertBoms(users);
}
// map.forEach(e->{
// if(StringUtils.isBlank(e.getZt())){
// e.setZt("02");
// dmBomMapper.insertBom(e);
// }
//
// });
}
}

@ -98,6 +98,41 @@
,pkcd,dmbs,dmcd
,zpsx,ljbh,ljsl
,ljsx,djmj,ljdz
,type,fds
,hxcd,lqbs,tjBs,cs
)values
<foreach collection="list" index="index" item="item" separator=",">
(#{item.pid,jdbcType=INTEGER},#{item.dcch,jdbcType=VARCHAR},#{item.mbch,jdbcType=VARCHAR}
,#{item.sjch,jdbcType=VARCHAR},#{item.pl,jdbcType=VARCHAR},#{item.fd,jdbcType=VARCHAR}
,#{item.xqdd,jdbcType=VARCHAR},#{item.pw,jdbcType=VARCHAR},#{item.lqlb,jdbcType=VARCHAR}
,#{item.kw,jdbcType=VARCHAR},#{item.sbbh,jdbcType=VARCHAR},#{item.sclx,jdbcType=VARCHAR}
,#{item.zl,jdbcType=VARCHAR},#{item.wpcz,jdbcType=VARCHAR},#{item.wpgg,jdbcType=VARCHAR}
,#{item.bh,jdbcType=DECIMAL},#{item.bc,jdbcType=DECIMAL},#{item.yqyl,jdbcType=DECIMAL}
,#{item.qgcd,jdbcType=DECIMAL},#{item.tzbh,jdbcType=VARCHAR},#{item.tlsl,jdbcType=DECIMAL}
,#{item.pklx,jdbcType=VARCHAR},#{item.qbs,jdbcType=VARCHAR},#{item.pkbs,jdbcType=VARCHAR}
,#{item.pkcd,jdbcType=DECIMAL},#{item.dmbs,jdbcType=VARCHAR},#{item.dmcd,jdbcType=DECIMAL}
,#{item.zpsx,jdbcType=INTEGER},#{item.ljbh,jdbcType=VARCHAR},#{item.ljsl,jdbcType=DECIMAL}
,#{item.ljsx,jdbcType=VARCHAR},#{item.djmj,jdbcType=DECIMAL},#{item.ljdz,jdbcType=DECIMAL}
,#{item.type,jdbcType=VARCHAR},#{item.fds,jdbcType=VARCHAR}
,#{item.hxcd,jdbcType=DECIMAL},#{item.lqbs,jdbcType=VARCHAR},#{item.tjbs,jdbcType=VARCHAR},#{item.cs,jdbcType=INTEGER}
)
</foreach>
</insert>
<insert id="insertBoms111" parameterType="java.util.List">
insert into dm_bom
( pid,dcch,mbch
,sjch,pl,fd
,xqdd,pw,lqlb
,kw,sbbh,sclx
,zl,wpcz,wpgg
,bh,bc,yqyl
,qgcd,tzbh,tlsl
,pklx,qbs,pkbs
,pkcd,dmbs,dmcd
,zpsx,ljbh,ljsl
,ljsx,djmj,ljdz
,blgs,pwgs,llgs
,hxgs,qggs,pkgs
,qgs,dmgs,zpgs
@ -130,8 +165,6 @@
)
</foreach>
</insert>
<insert id="insertBom" parameterType="com.dsic.gj_erp.bean.jcsj.DmBom">
insert into dm_bom

Loading…
Cancel
Save