diff --git a/src/main/java/com/dsic/gj_erp/service/jcsj/impl/BomUploadServiceImpl.java b/src/main/java/com/dsic/gj_erp/service/jcsj/impl/BomUploadServiceImpl.java index 0de6693..a81d1fb 100644 --- a/src/main/java/com/dsic/gj_erp/service/jcsj/impl/BomUploadServiceImpl.java +++ b/src/main/java/com/dsic/gj_erp/service/jcsj/impl/BomUploadServiceImpl.java @@ -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); diff --git a/src/main/java/com/dsic/gj_erp/service/jcsj/impl/DmBomServiceImpl.java b/src/main/java/com/dsic/gj_erp/service/jcsj/impl/DmBomServiceImpl.java index 806d96d..8420a68 100644 --- a/src/main/java/com/dsic/gj_erp/service/jcsj/impl/DmBomServiceImpl.java +++ b/src/main/java/com/dsic/gj_erp/service/jcsj/impl/DmBomServiceImpl.java @@ -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 implements @Override public void insertBoms(List map) throws CustomException { - map.forEach(e->{ - if(StringUtils.isBlank(e.getZt())){ - e.setZt("02"); - dmBomMapper.insertBom(e); - } - - }); +// dmBomMapper.insertBoms(map); + + List> partition = ListUtil.partition(map, 50); + for (List users : partition) { + dmBomMapper.insertBoms(users); + } + +// map.forEach(e->{ +// if(StringUtils.isBlank(e.getZt())){ +// e.setZt("02"); +// dmBomMapper.insertBom(e); +// } +// +// }); } } diff --git a/src/main/resources/mappers/jcsj/DmBomMapper.xml b/src/main/resources/mappers/jcsj/DmBomMapper.xml index 2881ebb..2bc08c1 100644 --- a/src/main/resources/mappers/jcsj/DmBomMapper.xml +++ b/src/main/resources/mappers/jcsj/DmBomMapper.xml @@ -98,6 +98,41 @@ ,pkcd,dmbs,dmcd ,zpsx,ljbh,ljsl ,ljsx,djmj,ljdz + + ,type,fds + ,hxcd,lqbs,tjBs,cs + )values + + (#{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} + ) + + + + + 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 @@ ) - - insert into dm_bom