优化插件性能

This commit is contained in:
liuy 2024-09-03 10:42:07 +08:00
parent 3cad1b92db
commit 480cefba68
28 changed files with 3128 additions and 549 deletions

View File

@ -0,0 +1,22 @@
package com.hzya.frame.plugin.lets.dao;
import com.hzya.frame.plugin.lets.entity.BdBomEntity;
import com.hzya.frame.basedao.dao.IBaseDao;
import java.util.List;
/**
* (BD_BOM: table)表数据库访问层
*
* @author makejava
* @since 2024-09-02 14:56:24
*/
public interface IBdBomDao extends IBaseDao<BdBomEntity, String> {
/**
* 查询BOM版本
*
* @author liuyang
*/
List<BdBomEntity> queryBomVersion(BdBomEntity bdBomEntity) throws Exception;
}

View File

@ -0,0 +1,22 @@
package com.hzya.frame.plugin.lets.dao.impl;
import com.hzya.frame.plugin.lets.entity.BdBomEntity;
import com.hzya.frame.plugin.lets.dao.IBdBomDao;
import org.springframework.stereotype.Repository;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import java.util.List;
/**
* (BdBom)表数据库访问层
*
* @author makejava
* @since 2024-09-02 14:56:24
*/
public class BdBomDaoImpl extends MybatisGenericDao<BdBomEntity, String> implements IBdBomDao {
@Override
public List<BdBomEntity> queryBomVersion(BdBomEntity bdBomEntity) throws Exception {
return query("com.hzya.frame.plugin.lets.dao.impl.BdBomDaoImpl.queryBomVersion", bdBomEntity);
}
}

View File

@ -0,0 +1,610 @@
package com.hzya.frame.plugin.lets.entity;
import com.hzya.frame.web.entity.BaseEntity;
/**
* (BdBom)实体类
*
* @author makejava
* @since 2024-09-02 14:57:03
*/
public class BdBomEntity extends BaseEntity {
private String bblx;
private String bomlx;
private String clf;
private String creat;
private String dr;
private String fsl;
private String fslsx;
private String fslxx;
private String gcbm;
private String gdfsl;
private String gdsl;
private String hsl;
private String jldwid;
private String memo;
private String mver;
private String pkBomid;
private String pkCorp;
private String pkProduce;
private String rgf;
private String sfmr;
private String sftpmr;
private String sl;
private String slsx;
private String slxx;
private String ts;
private String version;
private String wlbmid;
private String zdy1;
private String zdy10;
private String zdy11;
private String zdy12;
private String zdy13;
private String zdy14;
private String zdy15;
private String zdy16;
private String zdy17;
private String zdy18;
private String zdy19;
private String zdy2;
private String zdy20;
private String zdy3;
private String zdy4;
private String zdy5;
private String zdy6;
private String zdy7;
private String zdy8;
private String zdy9;
private String zt;
private String zyx1;
private String zyx2;
private String zyx3;
private String zyx4;
private String zyx5;
private String zzf;
private String bomtypeFrom;
private String cjrq;
private String cjsj;
private String createtype;
private String gcbmFrom;
private String modifiedtime;
private String modifier;
private String pkBomidFrom;
private String pkCorpFrom;
private String qrrid;
private String qrrq;
private String qrsj;
public String getBblx() {
return bblx;
}
public void setBblx(String bblx) {
this.bblx = bblx;
}
public String getBomlx() {
return bomlx;
}
public void setBomlx(String bomlx) {
this.bomlx = bomlx;
}
public String getClf() {
return clf;
}
public void setClf(String clf) {
this.clf = clf;
}
public String getCreat() {
return creat;
}
public void setCreat(String creat) {
this.creat = creat;
}
public String getDr() {
return dr;
}
public void setDr(String dr) {
this.dr = dr;
}
public String getFsl() {
return fsl;
}
public void setFsl(String fsl) {
this.fsl = fsl;
}
public String getFslsx() {
return fslsx;
}
public void setFslsx(String fslsx) {
this.fslsx = fslsx;
}
public String getFslxx() {
return fslxx;
}
public void setFslxx(String fslxx) {
this.fslxx = fslxx;
}
public String getGcbm() {
return gcbm;
}
public void setGcbm(String gcbm) {
this.gcbm = gcbm;
}
public String getGdfsl() {
return gdfsl;
}
public void setGdfsl(String gdfsl) {
this.gdfsl = gdfsl;
}
public String getGdsl() {
return gdsl;
}
public void setGdsl(String gdsl) {
this.gdsl = gdsl;
}
public String getHsl() {
return hsl;
}
public void setHsl(String hsl) {
this.hsl = hsl;
}
public String getJldwid() {
return jldwid;
}
public void setJldwid(String jldwid) {
this.jldwid = jldwid;
}
public String getMemo() {
return memo;
}
public void setMemo(String memo) {
this.memo = memo;
}
public String getMver() {
return mver;
}
public void setMver(String mver) {
this.mver = mver;
}
public String getPkBomid() {
return pkBomid;
}
public void setPkBomid(String pkBomid) {
this.pkBomid = pkBomid;
}
public String getPkCorp() {
return pkCorp;
}
public void setPkCorp(String pkCorp) {
this.pkCorp = pkCorp;
}
public String getPkProduce() {
return pkProduce;
}
public void setPkProduce(String pkProduce) {
this.pkProduce = pkProduce;
}
public String getRgf() {
return rgf;
}
public void setRgf(String rgf) {
this.rgf = rgf;
}
public String getSfmr() {
return sfmr;
}
public void setSfmr(String sfmr) {
this.sfmr = sfmr;
}
public String getSftpmr() {
return sftpmr;
}
public void setSftpmr(String sftpmr) {
this.sftpmr = sftpmr;
}
public String getSl() {
return sl;
}
public void setSl(String sl) {
this.sl = sl;
}
public String getSlsx() {
return slsx;
}
public void setSlsx(String slsx) {
this.slsx = slsx;
}
public String getSlxx() {
return slxx;
}
public void setSlxx(String slxx) {
this.slxx = slxx;
}
public String getTs() {
return ts;
}
public void setTs(String ts) {
this.ts = ts;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getWlbmid() {
return wlbmid;
}
public void setWlbmid(String wlbmid) {
this.wlbmid = wlbmid;
}
public String getZdy1() {
return zdy1;
}
public void setZdy1(String zdy1) {
this.zdy1 = zdy1;
}
public String getZdy10() {
return zdy10;
}
public void setZdy10(String zdy10) {
this.zdy10 = zdy10;
}
public String getZdy11() {
return zdy11;
}
public void setZdy11(String zdy11) {
this.zdy11 = zdy11;
}
public String getZdy12() {
return zdy12;
}
public void setZdy12(String zdy12) {
this.zdy12 = zdy12;
}
public String getZdy13() {
return zdy13;
}
public void setZdy13(String zdy13) {
this.zdy13 = zdy13;
}
public String getZdy14() {
return zdy14;
}
public void setZdy14(String zdy14) {
this.zdy14 = zdy14;
}
public String getZdy15() {
return zdy15;
}
public void setZdy15(String zdy15) {
this.zdy15 = zdy15;
}
public String getZdy16() {
return zdy16;
}
public void setZdy16(String zdy16) {
this.zdy16 = zdy16;
}
public String getZdy17() {
return zdy17;
}
public void setZdy17(String zdy17) {
this.zdy17 = zdy17;
}
public String getZdy18() {
return zdy18;
}
public void setZdy18(String zdy18) {
this.zdy18 = zdy18;
}
public String getZdy19() {
return zdy19;
}
public void setZdy19(String zdy19) {
this.zdy19 = zdy19;
}
public String getZdy2() {
return zdy2;
}
public void setZdy2(String zdy2) {
this.zdy2 = zdy2;
}
public String getZdy20() {
return zdy20;
}
public void setZdy20(String zdy20) {
this.zdy20 = zdy20;
}
public String getZdy3() {
return zdy3;
}
public void setZdy3(String zdy3) {
this.zdy3 = zdy3;
}
public String getZdy4() {
return zdy4;
}
public void setZdy4(String zdy4) {
this.zdy4 = zdy4;
}
public String getZdy5() {
return zdy5;
}
public void setZdy5(String zdy5) {
this.zdy5 = zdy5;
}
public String getZdy6() {
return zdy6;
}
public void setZdy6(String zdy6) {
this.zdy6 = zdy6;
}
public String getZdy7() {
return zdy7;
}
public void setZdy7(String zdy7) {
this.zdy7 = zdy7;
}
public String getZdy8() {
return zdy8;
}
public void setZdy8(String zdy8) {
this.zdy8 = zdy8;
}
public String getZdy9() {
return zdy9;
}
public void setZdy9(String zdy9) {
this.zdy9 = zdy9;
}
public String getZt() {
return zt;
}
public void setZt(String zt) {
this.zt = zt;
}
public String getZyx1() {
return zyx1;
}
public void setZyx1(String zyx1) {
this.zyx1 = zyx1;
}
public String getZyx2() {
return zyx2;
}
public void setZyx2(String zyx2) {
this.zyx2 = zyx2;
}
public String getZyx3() {
return zyx3;
}
public void setZyx3(String zyx3) {
this.zyx3 = zyx3;
}
public String getZyx4() {
return zyx4;
}
public void setZyx4(String zyx4) {
this.zyx4 = zyx4;
}
public String getZyx5() {
return zyx5;
}
public void setZyx5(String zyx5) {
this.zyx5 = zyx5;
}
public String getZzf() {
return zzf;
}
public void setZzf(String zzf) {
this.zzf = zzf;
}
public String getBomtypeFrom() {
return bomtypeFrom;
}
public void setBomtypeFrom(String bomtypeFrom) {
this.bomtypeFrom = bomtypeFrom;
}
public String getCjrq() {
return cjrq;
}
public void setCjrq(String cjrq) {
this.cjrq = cjrq;
}
public String getCjsj() {
return cjsj;
}
public void setCjsj(String cjsj) {
this.cjsj = cjsj;
}
public String getCreatetype() {
return createtype;
}
public void setCreatetype(String createtype) {
this.createtype = createtype;
}
public String getGcbmFrom() {
return gcbmFrom;
}
public void setGcbmFrom(String gcbmFrom) {
this.gcbmFrom = gcbmFrom;
}
public String getModifiedtime() {
return modifiedtime;
}
public void setModifiedtime(String modifiedtime) {
this.modifiedtime = modifiedtime;
}
public String getModifier() {
return modifier;
}
public void setModifier(String modifier) {
this.modifier = modifier;
}
public String getPkBomidFrom() {
return pkBomidFrom;
}
public void setPkBomidFrom(String pkBomidFrom) {
this.pkBomidFrom = pkBomidFrom;
}
public String getPkCorpFrom() {
return pkCorpFrom;
}
public void setPkCorpFrom(String pkCorpFrom) {
this.pkCorpFrom = pkCorpFrom;
}
public String getQrrid() {
return qrrid;
}
public void setQrrid(String qrrid) {
this.qrrid = qrrid;
}
public String getQrrq() {
return qrrq;
}
public void setQrrq(String qrrq) {
this.qrrq = qrrq;
}
public String getQrsj() {
return qrsj;
}
public void setQrsj(String qrsj) {
this.qrsj = qrsj;
}
}

View File

@ -0,0 +1,927 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hzya.frame.plugin.lets.dao.impl.BdBomDaoImpl">
<resultMap id="get-BdBomEntity-result" type="com.hzya.frame.plugin.lets.entity.BdBomEntity" >
<result property="bblx" column="BBLX" jdbcType="VARCHAR"/>
<result property="bomlx" column="BOMLX" jdbcType="VARCHAR"/>
<result property="clf" column="CLF" jdbcType="VARCHAR"/>
<result property="creat" column="CREAT" jdbcType="VARCHAR"/>
<result property="dr" column="DR" jdbcType="VARCHAR"/>
<result property="fsl" column="FSL" jdbcType="VARCHAR"/>
<result property="fslsx" column="FSLSX" jdbcType="VARCHAR"/>
<result property="fslxx" column="FSLXX" jdbcType="VARCHAR"/>
<result property="gcbm" column="GCBM" jdbcType="VARCHAR"/>
<result property="gdfsl" column="GDFSL" jdbcType="VARCHAR"/>
<result property="gdsl" column="GDSL" jdbcType="VARCHAR"/>
<result property="hsl" column="HSL" jdbcType="VARCHAR"/>
<result property="jldwid" column="JLDWID" jdbcType="VARCHAR"/>
<result property="memo" column="MEMO" jdbcType="VARCHAR"/>
<result property="mver" column="MVER" jdbcType="VARCHAR"/>
<result property="pkBomid" column="PK_BOMID" jdbcType="VARCHAR"/>
<result property="pkCorp" column="PK_CORP" jdbcType="VARCHAR"/>
<result property="pkProduce" column="PK_PRODUCE" jdbcType="VARCHAR"/>
<result property="rgf" column="RGF" jdbcType="VARCHAR"/>
<result property="sfmr" column="SFMR" jdbcType="VARCHAR"/>
<result property="sftpmr" column="SFTPMR" jdbcType="VARCHAR"/>
<result property="sl" column="SL" jdbcType="VARCHAR"/>
<result property="slsx" column="SLSX" jdbcType="VARCHAR"/>
<result property="slxx" column="SLXX" jdbcType="VARCHAR"/>
<result property="ts" column="TS" jdbcType="VARCHAR"/>
<result property="version" column="VERSION" jdbcType="VARCHAR"/>
<result property="wlbmid" column="WLBMID" jdbcType="VARCHAR"/>
<result property="zdy1" column="ZDY1" jdbcType="VARCHAR"/>
<result property="zdy10" column="ZDY10" jdbcType="VARCHAR"/>
<result property="zdy11" column="ZDY11" jdbcType="VARCHAR"/>
<result property="zdy12" column="ZDY12" jdbcType="VARCHAR"/>
<result property="zdy13" column="ZDY13" jdbcType="VARCHAR"/>
<result property="zdy14" column="ZDY14" jdbcType="VARCHAR"/>
<result property="zdy15" column="ZDY15" jdbcType="VARCHAR"/>
<result property="zdy16" column="ZDY16" jdbcType="VARCHAR"/>
<result property="zdy17" column="ZDY17" jdbcType="VARCHAR"/>
<result property="zdy18" column="ZDY18" jdbcType="VARCHAR"/>
<result property="zdy19" column="ZDY19" jdbcType="VARCHAR"/>
<result property="zdy2" column="ZDY2" jdbcType="VARCHAR"/>
<result property="zdy20" column="ZDY20" jdbcType="VARCHAR"/>
<result property="zdy3" column="ZDY3" jdbcType="VARCHAR"/>
<result property="zdy4" column="ZDY4" jdbcType="VARCHAR"/>
<result property="zdy5" column="ZDY5" jdbcType="VARCHAR"/>
<result property="zdy6" column="ZDY6" jdbcType="VARCHAR"/>
<result property="zdy7" column="ZDY7" jdbcType="VARCHAR"/>
<result property="zdy8" column="ZDY8" jdbcType="VARCHAR"/>
<result property="zdy9" column="ZDY9" jdbcType="VARCHAR"/>
<result property="zt" column="ZT" jdbcType="VARCHAR"/>
<result property="zyx1" column="ZYX1" jdbcType="VARCHAR"/>
<result property="zyx2" column="ZYX2" jdbcType="VARCHAR"/>
<result property="zyx3" column="ZYX3" jdbcType="VARCHAR"/>
<result property="zyx4" column="ZYX4" jdbcType="VARCHAR"/>
<result property="zyx5" column="ZYX5" jdbcType="VARCHAR"/>
<result property="zzf" column="ZZF" jdbcType="VARCHAR"/>
<result property="bomtypeFrom" column="BOMTYPE_FROM" jdbcType="VARCHAR"/>
<result property="cjrq" column="CJRQ" jdbcType="VARCHAR"/>
<result property="cjsj" column="CJSJ" jdbcType="VARCHAR"/>
<result property="createtype" column="CREATETYPE" jdbcType="VARCHAR"/>
<result property="gcbmFrom" column="GCBM_FROM" jdbcType="VARCHAR"/>
<result property="modifiedtime" column="MODIFIEDTIME" jdbcType="VARCHAR"/>
<result property="modifier" column="MODIFIER" jdbcType="VARCHAR"/>
<result property="pkBomidFrom" column="PK_BOMID_FROM" jdbcType="VARCHAR"/>
<result property="pkCorpFrom" column="PK_CORP_FROM" jdbcType="VARCHAR"/>
<result property="qrrid" column="QRRID" jdbcType="VARCHAR"/>
<result property="qrrq" column="QRRQ" jdbcType="VARCHAR"/>
<result property="qrsj" column="QRSJ" jdbcType="VARCHAR"/>
</resultMap>
<!-- 查询的字段-->
<sql id = "BdBomEntity_Base_Column_List">
BBLX
,BOMLX
,CLF
,CREAT
,DR
,FSL
,FSLSX
,FSLXX
,GCBM
,GDFSL
,GDSL
,HSL
,JLDWID
,MEMO
,MVER
,PK_BOMID
,PK_CORP
,PK_PRODUCE
,RGF
,SFMR
,SFTPMR
,SL
,SLSX
,SLXX
,TS
,VERSION
,WLBMID
,ZDY1
,ZDY10
,ZDY11
,ZDY12
,ZDY13
,ZDY14
,ZDY15
,ZDY16
,ZDY17
,ZDY18
,ZDY19
,ZDY2
,ZDY20
,ZDY3
,ZDY4
,ZDY5
,ZDY6
,ZDY7
,ZDY8
,ZDY9
,ZT
,ZYX1
,ZYX2
,ZYX3
,ZYX4
,ZYX5
,ZZF
,BOMTYPE_FROM
,CJRQ
,CJSJ
,CREATETYPE
,GCBM_FROM
,MODIFIEDTIME
,MODIFIER
,PK_BOMID_FROM
,PK_CORP_FROM
,QRRID
,QRRQ
,QRSJ
</sql>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-BdBomEntity-result" parameterType = "com.hzya.frame.plugin.lets.entity.BdBomEntity">
select
<include refid="BdBomEntity_Base_Column_List" />
from BD_BOM
<trim prefix="where" prefixOverrides="and">
<if test="bblx != null and bblx != ''"> and BBLX = #{bblx} </if>
<if test="bomlx != null and bomlx != ''"> and BOMLX = #{bomlx} </if>
<if test="clf != null and clf != ''"> and CLF = #{clf} </if>
<if test="creat != null and creat != ''"> and CREAT = #{creat} </if>
<if test="dr != null and dr != ''"> and DR = #{dr} </if>
<if test="fsl != null and fsl != ''"> and FSL = #{fsl} </if>
<if test="fslsx != null and fslsx != ''"> and FSLSX = #{fslsx} </if>
<if test="fslxx != null and fslxx != ''"> and FSLXX = #{fslxx} </if>
<if test="gcbm != null and gcbm != ''"> and GCBM = #{gcbm} </if>
<if test="gdfsl != null and gdfsl != ''"> and GDFSL = #{gdfsl} </if>
<if test="gdsl != null and gdsl != ''"> and GDSL = #{gdsl} </if>
<if test="hsl != null and hsl != ''"> and HSL = #{hsl} </if>
<if test="jldwid != null and jldwid != ''"> and JLDWID = #{jldwid} </if>
<if test="memo != null and memo != ''"> and MEMO = #{memo} </if>
<if test="mver != null and mver != ''"> and MVER = #{mver} </if>
<if test="pkBomid != null and pkBomid != ''"> and PK_BOMID = #{pkBomid} </if>
<if test="pkCorp != null and pkCorp != ''"> and PK_CORP = #{pkCorp} </if>
<if test="pkProduce != null and pkProduce != ''"> and PK_PRODUCE = #{pkProduce} </if>
<if test="rgf != null and rgf != ''"> and RGF = #{rgf} </if>
<if test="sfmr != null and sfmr != ''"> and SFMR = #{sfmr} </if>
<if test="sftpmr != null and sftpmr != ''"> and SFTPMR = #{sftpmr} </if>
<if test="sl != null and sl != ''"> and SL = #{sl} </if>
<if test="slsx != null and slsx != ''"> and SLSX = #{slsx} </if>
<if test="slxx != null and slxx != ''"> and SLXX = #{slxx} </if>
<if test="ts != null and ts != ''"> and TS = #{ts} </if>
<if test="version != null and version != ''"> and VERSION = #{version} </if>
<if test="wlbmid != null and wlbmid != ''"> and WLBMID = #{wlbmid} </if>
<if test="zdy1 != null and zdy1 != ''"> and ZDY1 = #{zdy1} </if>
<if test="zdy10 != null and zdy10 != ''"> and ZDY10 = #{zdy10} </if>
<if test="zdy11 != null and zdy11 != ''"> and ZDY11 = #{zdy11} </if>
<if test="zdy12 != null and zdy12 != ''"> and ZDY12 = #{zdy12} </if>
<if test="zdy13 != null and zdy13 != ''"> and ZDY13 = #{zdy13} </if>
<if test="zdy14 != null and zdy14 != ''"> and ZDY14 = #{zdy14} </if>
<if test="zdy15 != null and zdy15 != ''"> and ZDY15 = #{zdy15} </if>
<if test="zdy16 != null and zdy16 != ''"> and ZDY16 = #{zdy16} </if>
<if test="zdy17 != null and zdy17 != ''"> and ZDY17 = #{zdy17} </if>
<if test="zdy18 != null and zdy18 != ''"> and ZDY18 = #{zdy18} </if>
<if test="zdy19 != null and zdy19 != ''"> and ZDY19 = #{zdy19} </if>
<if test="zdy2 != null and zdy2 != ''"> and ZDY2 = #{zdy2} </if>
<if test="zdy20 != null and zdy20 != ''"> and ZDY20 = #{zdy20} </if>
<if test="zdy3 != null and zdy3 != ''"> and ZDY3 = #{zdy3} </if>
<if test="zdy4 != null and zdy4 != ''"> and ZDY4 = #{zdy4} </if>
<if test="zdy5 != null and zdy5 != ''"> and ZDY5 = #{zdy5} </if>
<if test="zdy6 != null and zdy6 != ''"> and ZDY6 = #{zdy6} </if>
<if test="zdy7 != null and zdy7 != ''"> and ZDY7 = #{zdy7} </if>
<if test="zdy8 != null and zdy8 != ''"> and ZDY8 = #{zdy8} </if>
<if test="zdy9 != null and zdy9 != ''"> and ZDY9 = #{zdy9} </if>
<if test="zt != null and zt != ''"> and ZT = #{zt} </if>
<if test="zyx1 != null and zyx1 != ''"> and ZYX1 = #{zyx1} </if>
<if test="zyx2 != null and zyx2 != ''"> and ZYX2 = #{zyx2} </if>
<if test="zyx3 != null and zyx3 != ''"> and ZYX3 = #{zyx3} </if>
<if test="zyx4 != null and zyx4 != ''"> and ZYX4 = #{zyx4} </if>
<if test="zyx5 != null and zyx5 != ''"> and ZYX5 = #{zyx5} </if>
<if test="zzf != null and zzf != ''"> and ZZF = #{zzf} </if>
<if test="bomtypeFrom != null and bomtypeFrom != ''"> and BOMTYPE_FROM = #{bomtypeFrom} </if>
<if test="cjrq != null and cjrq != ''"> and CJRQ = #{cjrq} </if>
<if test="cjsj != null and cjsj != ''"> and CJSJ = #{cjsj} </if>
<if test="createtype != null and createtype != ''"> and CREATETYPE = #{createtype} </if>
<if test="gcbmFrom != null and gcbmFrom != ''"> and GCBM_FROM = #{gcbmFrom} </if>
<if test="modifiedtime != null and modifiedtime != ''"> and MODIFIEDTIME = #{modifiedtime} </if>
<if test="modifier != null and modifier != ''"> and MODIFIER = #{modifier} </if>
<if test="pkBomidFrom != null and pkBomidFrom != ''"> and PK_BOMID_FROM = #{pkBomidFrom} </if>
<if test="pkCorpFrom != null and pkCorpFrom != ''"> and PK_CORP_FROM = #{pkCorpFrom} </if>
<if test="qrrid != null and qrrid != ''"> and QRRID = #{qrrid} </if>
<if test="qrrq != null and qrrq != ''"> and QRRQ = #{qrrq} </if>
<if test="qrsj != null and qrsj != ''"> and QRSJ = #{qrsj} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询符合条件的数量 -->
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.plugin.lets.entity.BdBomEntity">
select count(1) from BD_BOM
<trim prefix="where" prefixOverrides="and">
<if test="bblx != null and bblx != ''"> and BBLX = #{bblx} </if>
<if test="bomlx != null and bomlx != ''"> and BOMLX = #{bomlx} </if>
<if test="clf != null and clf != ''"> and CLF = #{clf} </if>
<if test="creat != null and creat != ''"> and CREAT = #{creat} </if>
<if test="dr != null and dr != ''"> and DR = #{dr} </if>
<if test="fsl != null and fsl != ''"> and FSL = #{fsl} </if>
<if test="fslsx != null and fslsx != ''"> and FSLSX = #{fslsx} </if>
<if test="fslxx != null and fslxx != ''"> and FSLXX = #{fslxx} </if>
<if test="gcbm != null and gcbm != ''"> and GCBM = #{gcbm} </if>
<if test="gdfsl != null and gdfsl != ''"> and GDFSL = #{gdfsl} </if>
<if test="gdsl != null and gdsl != ''"> and GDSL = #{gdsl} </if>
<if test="hsl != null and hsl != ''"> and HSL = #{hsl} </if>
<if test="jldwid != null and jldwid != ''"> and JLDWID = #{jldwid} </if>
<if test="memo != null and memo != ''"> and MEMO = #{memo} </if>
<if test="mver != null and mver != ''"> and MVER = #{mver} </if>
<if test="pkBomid != null and pkBomid != ''"> and PK_BOMID = #{pkBomid} </if>
<if test="pkCorp != null and pkCorp != ''"> and PK_CORP = #{pkCorp} </if>
<if test="pkProduce != null and pkProduce != ''"> and PK_PRODUCE = #{pkProduce} </if>
<if test="rgf != null and rgf != ''"> and RGF = #{rgf} </if>
<if test="sfmr != null and sfmr != ''"> and SFMR = #{sfmr} </if>
<if test="sftpmr != null and sftpmr != ''"> and SFTPMR = #{sftpmr} </if>
<if test="sl != null and sl != ''"> and SL = #{sl} </if>
<if test="slsx != null and slsx != ''"> and SLSX = #{slsx} </if>
<if test="slxx != null and slxx != ''"> and SLXX = #{slxx} </if>
<if test="ts != null and ts != ''"> and TS = #{ts} </if>
<if test="version != null and version != ''"> and VERSION = #{version} </if>
<if test="wlbmid != null and wlbmid != ''"> and WLBMID = #{wlbmid} </if>
<if test="zdy1 != null and zdy1 != ''"> and ZDY1 = #{zdy1} </if>
<if test="zdy10 != null and zdy10 != ''"> and ZDY10 = #{zdy10} </if>
<if test="zdy11 != null and zdy11 != ''"> and ZDY11 = #{zdy11} </if>
<if test="zdy12 != null and zdy12 != ''"> and ZDY12 = #{zdy12} </if>
<if test="zdy13 != null and zdy13 != ''"> and ZDY13 = #{zdy13} </if>
<if test="zdy14 != null and zdy14 != ''"> and ZDY14 = #{zdy14} </if>
<if test="zdy15 != null and zdy15 != ''"> and ZDY15 = #{zdy15} </if>
<if test="zdy16 != null and zdy16 != ''"> and ZDY16 = #{zdy16} </if>
<if test="zdy17 != null and zdy17 != ''"> and ZDY17 = #{zdy17} </if>
<if test="zdy18 != null and zdy18 != ''"> and ZDY18 = #{zdy18} </if>
<if test="zdy19 != null and zdy19 != ''"> and ZDY19 = #{zdy19} </if>
<if test="zdy2 != null and zdy2 != ''"> and ZDY2 = #{zdy2} </if>
<if test="zdy20 != null and zdy20 != ''"> and ZDY20 = #{zdy20} </if>
<if test="zdy3 != null and zdy3 != ''"> and ZDY3 = #{zdy3} </if>
<if test="zdy4 != null and zdy4 != ''"> and ZDY4 = #{zdy4} </if>
<if test="zdy5 != null and zdy5 != ''"> and ZDY5 = #{zdy5} </if>
<if test="zdy6 != null and zdy6 != ''"> and ZDY6 = #{zdy6} </if>
<if test="zdy7 != null and zdy7 != ''"> and ZDY7 = #{zdy7} </if>
<if test="zdy8 != null and zdy8 != ''"> and ZDY8 = #{zdy8} </if>
<if test="zdy9 != null and zdy9 != ''"> and ZDY9 = #{zdy9} </if>
<if test="zt != null and zt != ''"> and ZT = #{zt} </if>
<if test="zyx1 != null and zyx1 != ''"> and ZYX1 = #{zyx1} </if>
<if test="zyx2 != null and zyx2 != ''"> and ZYX2 = #{zyx2} </if>
<if test="zyx3 != null and zyx3 != ''"> and ZYX3 = #{zyx3} </if>
<if test="zyx4 != null and zyx4 != ''"> and ZYX4 = #{zyx4} </if>
<if test="zyx5 != null and zyx5 != ''"> and ZYX5 = #{zyx5} </if>
<if test="zzf != null and zzf != ''"> and ZZF = #{zzf} </if>
<if test="bomtypeFrom != null and bomtypeFrom != ''"> and BOMTYPE_FROM = #{bomtypeFrom} </if>
<if test="cjrq != null and cjrq != ''"> and CJRQ = #{cjrq} </if>
<if test="cjsj != null and cjsj != ''"> and CJSJ = #{cjsj} </if>
<if test="createtype != null and createtype != ''"> and CREATETYPE = #{createtype} </if>
<if test="gcbmFrom != null and gcbmFrom != ''"> and GCBM_FROM = #{gcbmFrom} </if>
<if test="modifiedtime != null and modifiedtime != ''"> and MODIFIEDTIME = #{modifiedtime} </if>
<if test="modifier != null and modifier != ''"> and MODIFIER = #{modifier} </if>
<if test="pkBomidFrom != null and pkBomidFrom != ''"> and PK_BOMID_FROM = #{pkBomidFrom} </if>
<if test="pkCorpFrom != null and pkCorpFrom != ''"> and PK_CORP_FROM = #{pkCorpFrom} </if>
<if test="qrrid != null and qrrid != ''"> and QRRID = #{qrrid} </if>
<if test="qrrq != null and qrrq != ''"> and QRRQ = #{qrrq} </if>
<if test="qrsj != null and qrsj != ''"> and QRSJ = #{qrsj} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if>
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="entity_list_like" resultMap="get-BdBomEntity-result" parameterType = "com.hzya.frame.plugin.lets.entity.BdBomEntity">
select
<include refid="BdBomEntity_Base_Column_List" />
from BD_BOM
<trim prefix="where" prefixOverrides="and">
<if test="bblx != null and bblx != ''"> and BBLX like concat('%',#{bblx},'%') </if>
<if test="bomlx != null and bomlx != ''"> and BOMLX like concat('%',#{bomlx},'%') </if>
<if test="clf != null and clf != ''"> and CLF like concat('%',#{clf},'%') </if>
<if test="creat != null and creat != ''"> and CREAT like concat('%',#{creat},'%') </if>
<if test="dr != null and dr != ''"> and DR like concat('%',#{dr},'%') </if>
<if test="fsl != null and fsl != ''"> and FSL like concat('%',#{fsl},'%') </if>
<if test="fslsx != null and fslsx != ''"> and FSLSX like concat('%',#{fslsx},'%') </if>
<if test="fslxx != null and fslxx != ''"> and FSLXX like concat('%',#{fslxx},'%') </if>
<if test="gcbm != null and gcbm != ''"> and GCBM like concat('%',#{gcbm},'%') </if>
<if test="gdfsl != null and gdfsl != ''"> and GDFSL like concat('%',#{gdfsl},'%') </if>
<if test="gdsl != null and gdsl != ''"> and GDSL like concat('%',#{gdsl},'%') </if>
<if test="hsl != null and hsl != ''"> and HSL like concat('%',#{hsl},'%') </if>
<if test="jldwid != null and jldwid != ''"> and JLDWID like concat('%',#{jldwid},'%') </if>
<if test="memo != null and memo != ''"> and MEMO like concat('%',#{memo},'%') </if>
<if test="mver != null and mver != ''"> and MVER like concat('%',#{mver},'%') </if>
<if test="pkBomid != null and pkBomid != ''"> and PK_BOMID like concat('%',#{pkBomid},'%') </if>
<if test="pkCorp != null and pkCorp != ''"> and PK_CORP like concat('%',#{pkCorp},'%') </if>
<if test="pkProduce != null and pkProduce != ''"> and PK_PRODUCE like concat('%',#{pkProduce},'%') </if>
<if test="rgf != null and rgf != ''"> and RGF like concat('%',#{rgf},'%') </if>
<if test="sfmr != null and sfmr != ''"> and SFMR like concat('%',#{sfmr},'%') </if>
<if test="sftpmr != null and sftpmr != ''"> and SFTPMR like concat('%',#{sftpmr},'%') </if>
<if test="sl != null and sl != ''"> and SL like concat('%',#{sl},'%') </if>
<if test="slsx != null and slsx != ''"> and SLSX like concat('%',#{slsx},'%') </if>
<if test="slxx != null and slxx != ''"> and SLXX like concat('%',#{slxx},'%') </if>
<if test="ts != null and ts != ''"> and TS like concat('%',#{ts},'%') </if>
<if test="version != null and version != ''"> and VERSION like concat('%',#{version},'%') </if>
<if test="wlbmid != null and wlbmid != ''"> and WLBMID like concat('%',#{wlbmid},'%') </if>
<if test="zdy1 != null and zdy1 != ''"> and ZDY1 like concat('%',#{zdy1},'%') </if>
<if test="zdy10 != null and zdy10 != ''"> and ZDY10 like concat('%',#{zdy10},'%') </if>
<if test="zdy11 != null and zdy11 != ''"> and ZDY11 like concat('%',#{zdy11},'%') </if>
<if test="zdy12 != null and zdy12 != ''"> and ZDY12 like concat('%',#{zdy12},'%') </if>
<if test="zdy13 != null and zdy13 != ''"> and ZDY13 like concat('%',#{zdy13},'%') </if>
<if test="zdy14 != null and zdy14 != ''"> and ZDY14 like concat('%',#{zdy14},'%') </if>
<if test="zdy15 != null and zdy15 != ''"> and ZDY15 like concat('%',#{zdy15},'%') </if>
<if test="zdy16 != null and zdy16 != ''"> and ZDY16 like concat('%',#{zdy16},'%') </if>
<if test="zdy17 != null and zdy17 != ''"> and ZDY17 like concat('%',#{zdy17},'%') </if>
<if test="zdy18 != null and zdy18 != ''"> and ZDY18 like concat('%',#{zdy18},'%') </if>
<if test="zdy19 != null and zdy19 != ''"> and ZDY19 like concat('%',#{zdy19},'%') </if>
<if test="zdy2 != null and zdy2 != ''"> and ZDY2 like concat('%',#{zdy2},'%') </if>
<if test="zdy20 != null and zdy20 != ''"> and ZDY20 like concat('%',#{zdy20},'%') </if>
<if test="zdy3 != null and zdy3 != ''"> and ZDY3 like concat('%',#{zdy3},'%') </if>
<if test="zdy4 != null and zdy4 != ''"> and ZDY4 like concat('%',#{zdy4},'%') </if>
<if test="zdy5 != null and zdy5 != ''"> and ZDY5 like concat('%',#{zdy5},'%') </if>
<if test="zdy6 != null and zdy6 != ''"> and ZDY6 like concat('%',#{zdy6},'%') </if>
<if test="zdy7 != null and zdy7 != ''"> and ZDY7 like concat('%',#{zdy7},'%') </if>
<if test="zdy8 != null and zdy8 != ''"> and ZDY8 like concat('%',#{zdy8},'%') </if>
<if test="zdy9 != null and zdy9 != ''"> and ZDY9 like concat('%',#{zdy9},'%') </if>
<if test="zt != null and zt != ''"> and ZT like concat('%',#{zt},'%') </if>
<if test="zyx1 != null and zyx1 != ''"> and ZYX1 like concat('%',#{zyx1},'%') </if>
<if test="zyx2 != null and zyx2 != ''"> and ZYX2 like concat('%',#{zyx2},'%') </if>
<if test="zyx3 != null and zyx3 != ''"> and ZYX3 like concat('%',#{zyx3},'%') </if>
<if test="zyx4 != null and zyx4 != ''"> and ZYX4 like concat('%',#{zyx4},'%') </if>
<if test="zyx5 != null and zyx5 != ''"> and ZYX5 like concat('%',#{zyx5},'%') </if>
<if test="zzf != null and zzf != ''"> and ZZF like concat('%',#{zzf},'%') </if>
<if test="bomtypeFrom != null and bomtypeFrom != ''"> and BOMTYPE_FROM like concat('%',#{bomtypeFrom},'%') </if>
<if test="cjrq != null and cjrq != ''"> and CJRQ like concat('%',#{cjrq},'%') </if>
<if test="cjsj != null and cjsj != ''"> and CJSJ like concat('%',#{cjsj},'%') </if>
<if test="createtype != null and createtype != ''"> and CREATETYPE like concat('%',#{createtype},'%') </if>
<if test="gcbmFrom != null and gcbmFrom != ''"> and GCBM_FROM like concat('%',#{gcbmFrom},'%') </if>
<if test="modifiedtime != null and modifiedtime != ''"> and MODIFIEDTIME like concat('%',#{modifiedtime},'%') </if>
<if test="modifier != null and modifier != ''"> and MODIFIER like concat('%',#{modifier},'%') </if>
<if test="pkBomidFrom != null and pkBomidFrom != ''"> and PK_BOMID_FROM like concat('%',#{pkBomidFrom},'%') </if>
<if test="pkCorpFrom != null and pkCorpFrom != ''"> and PK_CORP_FROM like concat('%',#{pkCorpFrom},'%') </if>
<if test="qrrid != null and qrrid != ''"> and QRRID like concat('%',#{qrrid},'%') </if>
<if test="qrrq != null and qrrq != ''"> and QRRQ like concat('%',#{qrrq},'%') </if>
<if test="qrsj != null and qrsj != ''"> and QRSJ like concat('%',#{qrsj},'%') </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询列表 字段采用or格式 -->
<select id="BdBomentity_list_or" resultMap="get-BdBomEntity-result" parameterType = "com.hzya.frame.plugin.lets.entity.BdBomEntity">
select
<include refid="BdBomEntity_Base_Column_List" />
from BD_BOM
<trim prefix="where" prefixOverrides="and">
<if test="bblx != null and bblx != ''"> or BBLX = #{bblx} </if>
<if test="bomlx != null and bomlx != ''"> or BOMLX = #{bomlx} </if>
<if test="clf != null and clf != ''"> or CLF = #{clf} </if>
<if test="creat != null and creat != ''"> or CREAT = #{creat} </if>
<if test="dr != null and dr != ''"> or DR = #{dr} </if>
<if test="fsl != null and fsl != ''"> or FSL = #{fsl} </if>
<if test="fslsx != null and fslsx != ''"> or FSLSX = #{fslsx} </if>
<if test="fslxx != null and fslxx != ''"> or FSLXX = #{fslxx} </if>
<if test="gcbm != null and gcbm != ''"> or GCBM = #{gcbm} </if>
<if test="gdfsl != null and gdfsl != ''"> or GDFSL = #{gdfsl} </if>
<if test="gdsl != null and gdsl != ''"> or GDSL = #{gdsl} </if>
<if test="hsl != null and hsl != ''"> or HSL = #{hsl} </if>
<if test="jldwid != null and jldwid != ''"> or JLDWID = #{jldwid} </if>
<if test="memo != null and memo != ''"> or MEMO = #{memo} </if>
<if test="mver != null and mver != ''"> or MVER = #{mver} </if>
<if test="pkBomid != null and pkBomid != ''"> or PK_BOMID = #{pkBomid} </if>
<if test="pkCorp != null and pkCorp != ''"> or PK_CORP = #{pkCorp} </if>
<if test="pkProduce != null and pkProduce != ''"> or PK_PRODUCE = #{pkProduce} </if>
<if test="rgf != null and rgf != ''"> or RGF = #{rgf} </if>
<if test="sfmr != null and sfmr != ''"> or SFMR = #{sfmr} </if>
<if test="sftpmr != null and sftpmr != ''"> or SFTPMR = #{sftpmr} </if>
<if test="sl != null and sl != ''"> or SL = #{sl} </if>
<if test="slsx != null and slsx != ''"> or SLSX = #{slsx} </if>
<if test="slxx != null and slxx != ''"> or SLXX = #{slxx} </if>
<if test="ts != null and ts != ''"> or TS = #{ts} </if>
<if test="version != null and version != ''"> or VERSION = #{version} </if>
<if test="wlbmid != null and wlbmid != ''"> or WLBMID = #{wlbmid} </if>
<if test="zdy1 != null and zdy1 != ''"> or ZDY1 = #{zdy1} </if>
<if test="zdy10 != null and zdy10 != ''"> or ZDY10 = #{zdy10} </if>
<if test="zdy11 != null and zdy11 != ''"> or ZDY11 = #{zdy11} </if>
<if test="zdy12 != null and zdy12 != ''"> or ZDY12 = #{zdy12} </if>
<if test="zdy13 != null and zdy13 != ''"> or ZDY13 = #{zdy13} </if>
<if test="zdy14 != null and zdy14 != ''"> or ZDY14 = #{zdy14} </if>
<if test="zdy15 != null and zdy15 != ''"> or ZDY15 = #{zdy15} </if>
<if test="zdy16 != null and zdy16 != ''"> or ZDY16 = #{zdy16} </if>
<if test="zdy17 != null and zdy17 != ''"> or ZDY17 = #{zdy17} </if>
<if test="zdy18 != null and zdy18 != ''"> or ZDY18 = #{zdy18} </if>
<if test="zdy19 != null and zdy19 != ''"> or ZDY19 = #{zdy19} </if>
<if test="zdy2 != null and zdy2 != ''"> or ZDY2 = #{zdy2} </if>
<if test="zdy20 != null and zdy20 != ''"> or ZDY20 = #{zdy20} </if>
<if test="zdy3 != null and zdy3 != ''"> or ZDY3 = #{zdy3} </if>
<if test="zdy4 != null and zdy4 != ''"> or ZDY4 = #{zdy4} </if>
<if test="zdy5 != null and zdy5 != ''"> or ZDY5 = #{zdy5} </if>
<if test="zdy6 != null and zdy6 != ''"> or ZDY6 = #{zdy6} </if>
<if test="zdy7 != null and zdy7 != ''"> or ZDY7 = #{zdy7} </if>
<if test="zdy8 != null and zdy8 != ''"> or ZDY8 = #{zdy8} </if>
<if test="zdy9 != null and zdy9 != ''"> or ZDY9 = #{zdy9} </if>
<if test="zt != null and zt != ''"> or ZT = #{zt} </if>
<if test="zyx1 != null and zyx1 != ''"> or ZYX1 = #{zyx1} </if>
<if test="zyx2 != null and zyx2 != ''"> or ZYX2 = #{zyx2} </if>
<if test="zyx3 != null and zyx3 != ''"> or ZYX3 = #{zyx3} </if>
<if test="zyx4 != null and zyx4 != ''"> or ZYX4 = #{zyx4} </if>
<if test="zyx5 != null and zyx5 != ''"> or ZYX5 = #{zyx5} </if>
<if test="zzf != null and zzf != ''"> or ZZF = #{zzf} </if>
<if test="bomtypeFrom != null and bomtypeFrom != ''"> or BOMTYPE_FROM = #{bomtypeFrom} </if>
<if test="cjrq != null and cjrq != ''"> or CJRQ = #{cjrq} </if>
<if test="cjsj != null and cjsj != ''"> or CJSJ = #{cjsj} </if>
<if test="createtype != null and createtype != ''"> or CREATETYPE = #{createtype} </if>
<if test="gcbmFrom != null and gcbmFrom != ''"> or GCBM_FROM = #{gcbmFrom} </if>
<if test="modifiedtime != null and modifiedtime != ''"> or MODIFIEDTIME = #{modifiedtime} </if>
<if test="modifier != null and modifier != ''"> or MODIFIER = #{modifier} </if>
<if test="pkBomidFrom != null and pkBomidFrom != ''"> or PK_BOMID_FROM = #{pkBomidFrom} </if>
<if test="pkCorpFrom != null and pkCorpFrom != ''"> or PK_CORP_FROM = #{pkCorpFrom} </if>
<if test="qrrid != null and qrrid != ''"> or QRRID = #{qrrid} </if>
<if test="qrrq != null and qrrq != ''"> or QRRQ = #{qrrq} </if>
<if test="qrsj != null and qrsj != ''"> or QRSJ = #{qrsj} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.plugin.lets.entity.BdBomEntity" keyProperty="pkBomid" useGeneratedKeys="true">
insert into BD_BOM(
<trim suffix="" suffixOverrides=",">
<if test="bblx != null and bblx != ''"> BBLX , </if>
<if test="bomlx != null and bomlx != ''"> BOMLX , </if>
<if test="clf != null and clf != ''"> CLF , </if>
<if test="creat != null and creat != ''"> CREAT , </if>
<if test="dr != null and dr != ''"> DR , </if>
<if test="fsl != null and fsl != ''"> FSL , </if>
<if test="fslsx != null and fslsx != ''"> FSLSX , </if>
<if test="fslxx != null and fslxx != ''"> FSLXX , </if>
<if test="gcbm != null and gcbm != ''"> GCBM , </if>
<if test="gdfsl != null and gdfsl != ''"> GDFSL , </if>
<if test="gdsl != null and gdsl != ''"> GDSL , </if>
<if test="hsl != null and hsl != ''"> HSL , </if>
<if test="jldwid != null and jldwid != ''"> JLDWID , </if>
<if test="memo != null and memo != ''"> MEMO , </if>
<if test="mver != null and mver != ''"> MVER , </if>
<if test="pkBomid != null and pkBomid != ''"> PK_BOMID , </if>
<if test="pkCorp != null and pkCorp != ''"> PK_CORP , </if>
<if test="pkProduce != null and pkProduce != ''"> PK_PRODUCE , </if>
<if test="rgf != null and rgf != ''"> RGF , </if>
<if test="sfmr != null and sfmr != ''"> SFMR , </if>
<if test="sftpmr != null and sftpmr != ''"> SFTPMR , </if>
<if test="sl != null and sl != ''"> SL , </if>
<if test="slsx != null and slsx != ''"> SLSX , </if>
<if test="slxx != null and slxx != ''"> SLXX , </if>
<if test="ts != null and ts != ''"> TS , </if>
<if test="version != null and version != ''"> VERSION , </if>
<if test="wlbmid != null and wlbmid != ''"> WLBMID , </if>
<if test="zdy1 != null and zdy1 != ''"> ZDY1 , </if>
<if test="zdy10 != null and zdy10 != ''"> ZDY10 , </if>
<if test="zdy11 != null and zdy11 != ''"> ZDY11 , </if>
<if test="zdy12 != null and zdy12 != ''"> ZDY12 , </if>
<if test="zdy13 != null and zdy13 != ''"> ZDY13 , </if>
<if test="zdy14 != null and zdy14 != ''"> ZDY14 , </if>
<if test="zdy15 != null and zdy15 != ''"> ZDY15 , </if>
<if test="zdy16 != null and zdy16 != ''"> ZDY16 , </if>
<if test="zdy17 != null and zdy17 != ''"> ZDY17 , </if>
<if test="zdy18 != null and zdy18 != ''"> ZDY18 , </if>
<if test="zdy19 != null and zdy19 != ''"> ZDY19 , </if>
<if test="zdy2 != null and zdy2 != ''"> ZDY2 , </if>
<if test="zdy20 != null and zdy20 != ''"> ZDY20 , </if>
<if test="zdy3 != null and zdy3 != ''"> ZDY3 , </if>
<if test="zdy4 != null and zdy4 != ''"> ZDY4 , </if>
<if test="zdy5 != null and zdy5 != ''"> ZDY5 , </if>
<if test="zdy6 != null and zdy6 != ''"> ZDY6 , </if>
<if test="zdy7 != null and zdy7 != ''"> ZDY7 , </if>
<if test="zdy8 != null and zdy8 != ''"> ZDY8 , </if>
<if test="zdy9 != null and zdy9 != ''"> ZDY9 , </if>
<if test="zt != null and zt != ''"> ZT , </if>
<if test="zyx1 != null and zyx1 != ''"> ZYX1 , </if>
<if test="zyx2 != null and zyx2 != ''"> ZYX2 , </if>
<if test="zyx3 != null and zyx3 != ''"> ZYX3 , </if>
<if test="zyx4 != null and zyx4 != ''"> ZYX4 , </if>
<if test="zyx5 != null and zyx5 != ''"> ZYX5 , </if>
<if test="zzf != null and zzf != ''"> ZZF , </if>
<if test="bomtypeFrom != null and bomtypeFrom != ''"> BOMTYPE_FROM , </if>
<if test="cjrq != null and cjrq != ''"> CJRQ , </if>
<if test="cjsj != null and cjsj != ''"> CJSJ , </if>
<if test="createtype != null and createtype != ''"> CREATETYPE , </if>
<if test="gcbmFrom != null and gcbmFrom != ''"> GCBM_FROM , </if>
<if test="modifiedtime != null and modifiedtime != ''"> MODIFIEDTIME , </if>
<if test="modifier != null and modifier != ''"> MODIFIER , </if>
<if test="pkBomidFrom != null and pkBomidFrom != ''"> PK_BOMID_FROM , </if>
<if test="pkCorpFrom != null and pkCorpFrom != ''"> PK_CORP_FROM , </if>
<if test="qrrid != null and qrrid != ''"> QRRID , </if>
<if test="qrrq != null and qrrq != ''"> QRRQ , </if>
<if test="qrsj != null and qrsj != ''"> QRSJ , </if>
<if test="sorts == null ">sorts,</if>
<if test="sts == null ">sts,</if>
</trim>
)values(
<trim suffix="" suffixOverrides=",">
<if test="bblx != null and bblx != ''"> #{bblx} ,</if>
<if test="bomlx != null and bomlx != ''"> #{bomlx} ,</if>
<if test="clf != null and clf != ''"> #{clf} ,</if>
<if test="creat != null and creat != ''"> #{creat} ,</if>
<if test="dr != null and dr != ''"> #{dr} ,</if>
<if test="fsl != null and fsl != ''"> #{fsl} ,</if>
<if test="fslsx != null and fslsx != ''"> #{fslsx} ,</if>
<if test="fslxx != null and fslxx != ''"> #{fslxx} ,</if>
<if test="gcbm != null and gcbm != ''"> #{gcbm} ,</if>
<if test="gdfsl != null and gdfsl != ''"> #{gdfsl} ,</if>
<if test="gdsl != null and gdsl != ''"> #{gdsl} ,</if>
<if test="hsl != null and hsl != ''"> #{hsl} ,</if>
<if test="jldwid != null and jldwid != ''"> #{jldwid} ,</if>
<if test="memo != null and memo != ''"> #{memo} ,</if>
<if test="mver != null and mver != ''"> #{mver} ,</if>
<if test="pkBomid != null and pkBomid != ''"> #{pkBomid} ,</if>
<if test="pkCorp != null and pkCorp != ''"> #{pkCorp} ,</if>
<if test="pkProduce != null and pkProduce != ''"> #{pkProduce} ,</if>
<if test="rgf != null and rgf != ''"> #{rgf} ,</if>
<if test="sfmr != null and sfmr != ''"> #{sfmr} ,</if>
<if test="sftpmr != null and sftpmr != ''"> #{sftpmr} ,</if>
<if test="sl != null and sl != ''"> #{sl} ,</if>
<if test="slsx != null and slsx != ''"> #{slsx} ,</if>
<if test="slxx != null and slxx != ''"> #{slxx} ,</if>
<if test="ts != null and ts != ''"> #{ts} ,</if>
<if test="version != null and version != ''"> #{version} ,</if>
<if test="wlbmid != null and wlbmid != ''"> #{wlbmid} ,</if>
<if test="zdy1 != null and zdy1 != ''"> #{zdy1} ,</if>
<if test="zdy10 != null and zdy10 != ''"> #{zdy10} ,</if>
<if test="zdy11 != null and zdy11 != ''"> #{zdy11} ,</if>
<if test="zdy12 != null and zdy12 != ''"> #{zdy12} ,</if>
<if test="zdy13 != null and zdy13 != ''"> #{zdy13} ,</if>
<if test="zdy14 != null and zdy14 != ''"> #{zdy14} ,</if>
<if test="zdy15 != null and zdy15 != ''"> #{zdy15} ,</if>
<if test="zdy16 != null and zdy16 != ''"> #{zdy16} ,</if>
<if test="zdy17 != null and zdy17 != ''"> #{zdy17} ,</if>
<if test="zdy18 != null and zdy18 != ''"> #{zdy18} ,</if>
<if test="zdy19 != null and zdy19 != ''"> #{zdy19} ,</if>
<if test="zdy2 != null and zdy2 != ''"> #{zdy2} ,</if>
<if test="zdy20 != null and zdy20 != ''"> #{zdy20} ,</if>
<if test="zdy3 != null and zdy3 != ''"> #{zdy3} ,</if>
<if test="zdy4 != null and zdy4 != ''"> #{zdy4} ,</if>
<if test="zdy5 != null and zdy5 != ''"> #{zdy5} ,</if>
<if test="zdy6 != null and zdy6 != ''"> #{zdy6} ,</if>
<if test="zdy7 != null and zdy7 != ''"> #{zdy7} ,</if>
<if test="zdy8 != null and zdy8 != ''"> #{zdy8} ,</if>
<if test="zdy9 != null and zdy9 != ''"> #{zdy9} ,</if>
<if test="zt != null and zt != ''"> #{zt} ,</if>
<if test="zyx1 != null and zyx1 != ''"> #{zyx1} ,</if>
<if test="zyx2 != null and zyx2 != ''"> #{zyx2} ,</if>
<if test="zyx3 != null and zyx3 != ''"> #{zyx3} ,</if>
<if test="zyx4 != null and zyx4 != ''"> #{zyx4} ,</if>
<if test="zyx5 != null and zyx5 != ''"> #{zyx5} ,</if>
<if test="zzf != null and zzf != ''"> #{zzf} ,</if>
<if test="bomtypeFrom != null and bomtypeFrom != ''"> #{bomtypeFrom} ,</if>
<if test="cjrq != null and cjrq != ''"> #{cjrq} ,</if>
<if test="cjsj != null and cjsj != ''"> #{cjsj} ,</if>
<if test="createtype != null and createtype != ''"> #{createtype} ,</if>
<if test="gcbmFrom != null and gcbmFrom != ''"> #{gcbmFrom} ,</if>
<if test="modifiedtime != null and modifiedtime != ''"> #{modifiedtime} ,</if>
<if test="modifier != null and modifier != ''"> #{modifier} ,</if>
<if test="pkBomidFrom != null and pkBomidFrom != ''"> #{pkBomidFrom} ,</if>
<if test="pkCorpFrom != null and pkCorpFrom != ''"> #{pkCorpFrom} ,</if>
<if test="qrrid != null and qrrid != ''"> #{qrrid} ,</if>
<if test="qrrq != null and qrrq != ''"> #{qrrq} ,</if>
<if test="qrsj != null and qrsj != ''"> #{qrsj} ,</if>
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from BD_BOM a WHERE a.sts = 'Y' ),</if>
<if test="sts == null ">'Y',</if>
</trim>
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="pkBomid" useGeneratedKeys="true">
insert into BD_BOM(BBLX, BOMLX, CLF, CREAT, DR, FSL, FSLSX, FSLXX, GCBM, GDFSL, GDSL, HSL, JLDWID, MEMO, MVER, PK_CORP, PK_PRODUCE, RGF, SFMR, SFTPMR, SL, SLSX, SLXX, TS, VERSION, WLBMID, ZDY1, ZDY10, ZDY11, ZDY12, ZDY13, ZDY14, ZDY15, ZDY16, ZDY17, ZDY18, ZDY19, ZDY2, ZDY20, ZDY3, ZDY4, ZDY5, ZDY6, ZDY7, ZDY8, ZDY9, ZT, ZYX1, ZYX2, ZYX3, ZYX4, ZYX5, ZZF, BOMTYPE_FROM, CJRQ, CJSJ, CREATETYPE, GCBM_FROM, MODIFIEDTIME, MODIFIER, PK_BOMID_FROM, PK_CORP_FROM, QRRID, QRRQ, QRSJ, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.bblx},#{entity.bomlx},#{entity.clf},#{entity.creat},#{entity.dr},#{entity.fsl},#{entity.fslsx},#{entity.fslxx},#{entity.gcbm},#{entity.gdfsl},#{entity.gdsl},#{entity.hsl},#{entity.jldwid},#{entity.memo},#{entity.mver},#{entity.pkCorp},#{entity.pkProduce},#{entity.rgf},#{entity.sfmr},#{entity.sftpmr},#{entity.sl},#{entity.slsx},#{entity.slxx},#{entity.ts},#{entity.version},#{entity.wlbmid},#{entity.zdy1},#{entity.zdy10},#{entity.zdy11},#{entity.zdy12},#{entity.zdy13},#{entity.zdy14},#{entity.zdy15},#{entity.zdy16},#{entity.zdy17},#{entity.zdy18},#{entity.zdy19},#{entity.zdy2},#{entity.zdy20},#{entity.zdy3},#{entity.zdy4},#{entity.zdy5},#{entity.zdy6},#{entity.zdy7},#{entity.zdy8},#{entity.zdy9},#{entity.zt},#{entity.zyx1},#{entity.zyx2},#{entity.zyx3},#{entity.zyx4},#{entity.zyx5},#{entity.zzf},#{entity.bomtypeFrom},#{entity.cjrq},#{entity.cjsj},#{entity.createtype},#{entity.gcbmFrom},#{entity.modifiedtime},#{entity.modifier},#{entity.pkBomidFrom},#{entity.pkCorpFrom},#{entity.qrrid},#{entity.qrrq},#{entity.qrsj}, 'Y')
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="pkBomid" useGeneratedKeys="true">
insert into BD_BOM(BBLX, BOMLX, CLF, CREAT, DR, FSL, FSLSX, FSLXX, GCBM, GDFSL, GDSL, HSL, JLDWID, MEMO, MVER, PK_CORP, PK_PRODUCE, RGF, SFMR, SFTPMR, SL, SLSX, SLXX, TS, VERSION, WLBMID, ZDY1, ZDY10, ZDY11, ZDY12, ZDY13, ZDY14, ZDY15, ZDY16, ZDY17, ZDY18, ZDY19, ZDY2, ZDY20, ZDY3, ZDY4, ZDY5, ZDY6, ZDY7, ZDY8, ZDY9, ZT, ZYX1, ZYX2, ZYX3, ZYX4, ZYX5, ZZF, BOMTYPE_FROM, CJRQ, CJSJ, CREATETYPE, GCBM_FROM, MODIFIEDTIME, MODIFIER, PK_BOMID_FROM, PK_CORP_FROM, QRRID, QRRQ, QRSJ)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.bblx},#{entity.bomlx},#{entity.clf},#{entity.creat},#{entity.dr},#{entity.fsl},#{entity.fslsx},#{entity.fslxx},#{entity.gcbm},#{entity.gdfsl},#{entity.gdsl},#{entity.hsl},#{entity.jldwid},#{entity.memo},#{entity.mver},#{entity.pkCorp},#{entity.pkProduce},#{entity.rgf},#{entity.sfmr},#{entity.sftpmr},#{entity.sl},#{entity.slsx},#{entity.slxx},#{entity.ts},#{entity.version},#{entity.wlbmid},#{entity.zdy1},#{entity.zdy10},#{entity.zdy11},#{entity.zdy12},#{entity.zdy13},#{entity.zdy14},#{entity.zdy15},#{entity.zdy16},#{entity.zdy17},#{entity.zdy18},#{entity.zdy19},#{entity.zdy2},#{entity.zdy20},#{entity.zdy3},#{entity.zdy4},#{entity.zdy5},#{entity.zdy6},#{entity.zdy7},#{entity.zdy8},#{entity.zdy9},#{entity.zt},#{entity.zyx1},#{entity.zyx2},#{entity.zyx3},#{entity.zyx4},#{entity.zyx5},#{entity.zzf},#{entity.bomtypeFrom},#{entity.cjrq},#{entity.cjsj},#{entity.createtype},#{entity.gcbmFrom},#{entity.modifiedtime},#{entity.modifier},#{entity.pkBomidFrom},#{entity.pkCorpFrom},#{entity.qrrid},#{entity.qrrq},#{entity.qrsj})
</foreach>
on duplicate key update
BBLX = values(BBLX),
BOMLX = values(BOMLX),
CLF = values(CLF),
CREAT = values(CREAT),
DR = values(DR),
FSL = values(FSL),
FSLSX = values(FSLSX),
FSLXX = values(FSLXX),
GCBM = values(GCBM),
GDFSL = values(GDFSL),
GDSL = values(GDSL),
HSL = values(HSL),
JLDWID = values(JLDWID),
MEMO = values(MEMO),
MVER = values(MVER),
PK_CORP = values(PK_CORP),
PK_PRODUCE = values(PK_PRODUCE),
RGF = values(RGF),
SFMR = values(SFMR),
SFTPMR = values(SFTPMR),
SL = values(SL),
SLSX = values(SLSX),
SLXX = values(SLXX),
TS = values(TS),
VERSION = values(VERSION),
WLBMID = values(WLBMID),
ZDY1 = values(ZDY1),
ZDY10 = values(ZDY10),
ZDY11 = values(ZDY11),
ZDY12 = values(ZDY12),
ZDY13 = values(ZDY13),
ZDY14 = values(ZDY14),
ZDY15 = values(ZDY15),
ZDY16 = values(ZDY16),
ZDY17 = values(ZDY17),
ZDY18 = values(ZDY18),
ZDY19 = values(ZDY19),
ZDY2 = values(ZDY2),
ZDY20 = values(ZDY20),
ZDY3 = values(ZDY3),
ZDY4 = values(ZDY4),
ZDY5 = values(ZDY5),
ZDY6 = values(ZDY6),
ZDY7 = values(ZDY7),
ZDY8 = values(ZDY8),
ZDY9 = values(ZDY9),
ZT = values(ZT),
ZYX1 = values(ZYX1),
ZYX2 = values(ZYX2),
ZYX3 = values(ZYX3),
ZYX4 = values(ZYX4),
ZYX5 = values(ZYX5),
ZZF = values(ZZF),
BOMTYPE_FROM = values(BOMTYPE_FROM),
CJRQ = values(CJRQ),
CJSJ = values(CJSJ),
CREATETYPE = values(CREATETYPE),
GCBM_FROM = values(GCBM_FROM),
MODIFIEDTIME = values(MODIFIEDTIME),
MODIFIER = values(MODIFIER),
PK_BOMID_FROM = values(PK_BOMID_FROM),
PK_CORP_FROM = values(PK_CORP_FROM),
QRRID = values(QRRID),
QRRQ = values(QRRQ),
QRSJ = values(QRSJ)</insert>
<!--通过主键修改方法-->
<update id="entity_update" parameterType = "com.hzya.frame.plugin.lets.entity.BdBomEntity" >
update BD_BOM set
<trim suffix="" suffixOverrides=",">
<if test="bblx != null and bblx != ''"> BBLX = #{bblx},</if>
<if test="bomlx != null and bomlx != ''"> BOMLX = #{bomlx},</if>
<if test="clf != null and clf != ''"> CLF = #{clf},</if>
<if test="creat != null and creat != ''"> CREAT = #{creat},</if>
<if test="dr != null and dr != ''"> DR = #{dr},</if>
<if test="fsl != null and fsl != ''"> FSL = #{fsl},</if>
<if test="fslsx != null and fslsx != ''"> FSLSX = #{fslsx},</if>
<if test="fslxx != null and fslxx != ''"> FSLXX = #{fslxx},</if>
<if test="gcbm != null and gcbm != ''"> GCBM = #{gcbm},</if>
<if test="gdfsl != null and gdfsl != ''"> GDFSL = #{gdfsl},</if>
<if test="gdsl != null and gdsl != ''"> GDSL = #{gdsl},</if>
<if test="hsl != null and hsl != ''"> HSL = #{hsl},</if>
<if test="jldwid != null and jldwid != ''"> JLDWID = #{jldwid},</if>
<if test="memo != null and memo != ''"> MEMO = #{memo},</if>
<if test="mver != null and mver != ''"> MVER = #{mver},</if>
<if test="pkCorp != null and pkCorp != ''"> PK_CORP = #{pkCorp},</if>
<if test="pkProduce != null and pkProduce != ''"> PK_PRODUCE = #{pkProduce},</if>
<if test="rgf != null and rgf != ''"> RGF = #{rgf},</if>
<if test="sfmr != null and sfmr != ''"> SFMR = #{sfmr},</if>
<if test="sftpmr != null and sftpmr != ''"> SFTPMR = #{sftpmr},</if>
<if test="sl != null and sl != ''"> SL = #{sl},</if>
<if test="slsx != null and slsx != ''"> SLSX = #{slsx},</if>
<if test="slxx != null and slxx != ''"> SLXX = #{slxx},</if>
<if test="ts != null and ts != ''"> TS = #{ts},</if>
<if test="version != null and version != ''"> VERSION = #{version},</if>
<if test="wlbmid != null and wlbmid != ''"> WLBMID = #{wlbmid},</if>
<if test="zdy1 != null and zdy1 != ''"> ZDY1 = #{zdy1},</if>
<if test="zdy10 != null and zdy10 != ''"> ZDY10 = #{zdy10},</if>
<if test="zdy11 != null and zdy11 != ''"> ZDY11 = #{zdy11},</if>
<if test="zdy12 != null and zdy12 != ''"> ZDY12 = #{zdy12},</if>
<if test="zdy13 != null and zdy13 != ''"> ZDY13 = #{zdy13},</if>
<if test="zdy14 != null and zdy14 != ''"> ZDY14 = #{zdy14},</if>
<if test="zdy15 != null and zdy15 != ''"> ZDY15 = #{zdy15},</if>
<if test="zdy16 != null and zdy16 != ''"> ZDY16 = #{zdy16},</if>
<if test="zdy17 != null and zdy17 != ''"> ZDY17 = #{zdy17},</if>
<if test="zdy18 != null and zdy18 != ''"> ZDY18 = #{zdy18},</if>
<if test="zdy19 != null and zdy19 != ''"> ZDY19 = #{zdy19},</if>
<if test="zdy2 != null and zdy2 != ''"> ZDY2 = #{zdy2},</if>
<if test="zdy20 != null and zdy20 != ''"> ZDY20 = #{zdy20},</if>
<if test="zdy3 != null and zdy3 != ''"> ZDY3 = #{zdy3},</if>
<if test="zdy4 != null and zdy4 != ''"> ZDY4 = #{zdy4},</if>
<if test="zdy5 != null and zdy5 != ''"> ZDY5 = #{zdy5},</if>
<if test="zdy6 != null and zdy6 != ''"> ZDY6 = #{zdy6},</if>
<if test="zdy7 != null and zdy7 != ''"> ZDY7 = #{zdy7},</if>
<if test="zdy8 != null and zdy8 != ''"> ZDY8 = #{zdy8},</if>
<if test="zdy9 != null and zdy9 != ''"> ZDY9 = #{zdy9},</if>
<if test="zt != null and zt != ''"> ZT = #{zt},</if>
<if test="zyx1 != null and zyx1 != ''"> ZYX1 = #{zyx1},</if>
<if test="zyx2 != null and zyx2 != ''"> ZYX2 = #{zyx2},</if>
<if test="zyx3 != null and zyx3 != ''"> ZYX3 = #{zyx3},</if>
<if test="zyx4 != null and zyx4 != ''"> ZYX4 = #{zyx4},</if>
<if test="zyx5 != null and zyx5 != ''"> ZYX5 = #{zyx5},</if>
<if test="zzf != null and zzf != ''"> ZZF = #{zzf},</if>
<if test="bomtypeFrom != null and bomtypeFrom != ''"> BOMTYPE_FROM = #{bomtypeFrom},</if>
<if test="cjrq != null and cjrq != ''"> CJRQ = #{cjrq},</if>
<if test="cjsj != null and cjsj != ''"> CJSJ = #{cjsj},</if>
<if test="createtype != null and createtype != ''"> CREATETYPE = #{createtype},</if>
<if test="gcbmFrom != null and gcbmFrom != ''"> GCBM_FROM = #{gcbmFrom},</if>
<if test="modifiedtime != null and modifiedtime != ''"> MODIFIEDTIME = #{modifiedtime},</if>
<if test="modifier != null and modifier != ''"> MODIFIER = #{modifier},</if>
<if test="pkBomidFrom != null and pkBomidFrom != ''"> PK_BOMID_FROM = #{pkBomidFrom},</if>
<if test="pkCorpFrom != null and pkCorpFrom != ''"> PK_CORP_FROM = #{pkCorpFrom},</if>
<if test="qrrid != null and qrrid != ''"> QRRID = #{qrrid},</if>
<if test="qrrq != null and qrrq != ''"> QRRQ = #{qrrq},</if>
<if test="qrsj != null and qrsj != ''"> QRSJ = #{qrsj},</if>
</trim>
where PK_BOMID = #{pkBomid}
</update>
<!-- 逻辑删除 -->
<update id="entity_logicDelete" parameterType = "com.hzya.frame.plugin.lets.entity.BdBomEntity" >
update BD_BOM set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
where PK_BOMID = #{pkBomid}
</update>
<!-- 多条件逻辑删除 -->
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.plugin.lets.entity.BdBomEntity" >
update BD_BOM set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
<trim prefix="where" prefixOverrides="and">
<if test="bblx != null and bblx != ''"> and BBLX = #{bblx} </if>
<if test="bomlx != null and bomlx != ''"> and BOMLX = #{bomlx} </if>
<if test="clf != null and clf != ''"> and CLF = #{clf} </if>
<if test="creat != null and creat != ''"> and CREAT = #{creat} </if>
<if test="dr != null and dr != ''"> and DR = #{dr} </if>
<if test="fsl != null and fsl != ''"> and FSL = #{fsl} </if>
<if test="fslsx != null and fslsx != ''"> and FSLSX = #{fslsx} </if>
<if test="fslxx != null and fslxx != ''"> and FSLXX = #{fslxx} </if>
<if test="gcbm != null and gcbm != ''"> and GCBM = #{gcbm} </if>
<if test="gdfsl != null and gdfsl != ''"> and GDFSL = #{gdfsl} </if>
<if test="gdsl != null and gdsl != ''"> and GDSL = #{gdsl} </if>
<if test="hsl != null and hsl != ''"> and HSL = #{hsl} </if>
<if test="jldwid != null and jldwid != ''"> and JLDWID = #{jldwid} </if>
<if test="memo != null and memo != ''"> and MEMO = #{memo} </if>
<if test="mver != null and mver != ''"> and MVER = #{mver} </if>
<if test="pkBomid != null and pkBomid != ''"> and PK_BOMID = #{pkBomid} </if>
<if test="pkCorp != null and pkCorp != ''"> and PK_CORP = #{pkCorp} </if>
<if test="pkProduce != null and pkProduce != ''"> and PK_PRODUCE = #{pkProduce} </if>
<if test="rgf != null and rgf != ''"> and RGF = #{rgf} </if>
<if test="sfmr != null and sfmr != ''"> and SFMR = #{sfmr} </if>
<if test="sftpmr != null and sftpmr != ''"> and SFTPMR = #{sftpmr} </if>
<if test="sl != null and sl != ''"> and SL = #{sl} </if>
<if test="slsx != null and slsx != ''"> and SLSX = #{slsx} </if>
<if test="slxx != null and slxx != ''"> and SLXX = #{slxx} </if>
<if test="ts != null and ts != ''"> and TS = #{ts} </if>
<if test="version != null and version != ''"> and VERSION = #{version} </if>
<if test="wlbmid != null and wlbmid != ''"> and WLBMID = #{wlbmid} </if>
<if test="zdy1 != null and zdy1 != ''"> and ZDY1 = #{zdy1} </if>
<if test="zdy10 != null and zdy10 != ''"> and ZDY10 = #{zdy10} </if>
<if test="zdy11 != null and zdy11 != ''"> and ZDY11 = #{zdy11} </if>
<if test="zdy12 != null and zdy12 != ''"> and ZDY12 = #{zdy12} </if>
<if test="zdy13 != null and zdy13 != ''"> and ZDY13 = #{zdy13} </if>
<if test="zdy14 != null and zdy14 != ''"> and ZDY14 = #{zdy14} </if>
<if test="zdy15 != null and zdy15 != ''"> and ZDY15 = #{zdy15} </if>
<if test="zdy16 != null and zdy16 != ''"> and ZDY16 = #{zdy16} </if>
<if test="zdy17 != null and zdy17 != ''"> and ZDY17 = #{zdy17} </if>
<if test="zdy18 != null and zdy18 != ''"> and ZDY18 = #{zdy18} </if>
<if test="zdy19 != null and zdy19 != ''"> and ZDY19 = #{zdy19} </if>
<if test="zdy2 != null and zdy2 != ''"> and ZDY2 = #{zdy2} </if>
<if test="zdy20 != null and zdy20 != ''"> and ZDY20 = #{zdy20} </if>
<if test="zdy3 != null and zdy3 != ''"> and ZDY3 = #{zdy3} </if>
<if test="zdy4 != null and zdy4 != ''"> and ZDY4 = #{zdy4} </if>
<if test="zdy5 != null and zdy5 != ''"> and ZDY5 = #{zdy5} </if>
<if test="zdy6 != null and zdy6 != ''"> and ZDY6 = #{zdy6} </if>
<if test="zdy7 != null and zdy7 != ''"> and ZDY7 = #{zdy7} </if>
<if test="zdy8 != null and zdy8 != ''"> and ZDY8 = #{zdy8} </if>
<if test="zdy9 != null and zdy9 != ''"> and ZDY9 = #{zdy9} </if>
<if test="zt != null and zt != ''"> and ZT = #{zt} </if>
<if test="zyx1 != null and zyx1 != ''"> and ZYX1 = #{zyx1} </if>
<if test="zyx2 != null and zyx2 != ''"> and ZYX2 = #{zyx2} </if>
<if test="zyx3 != null and zyx3 != ''"> and ZYX3 = #{zyx3} </if>
<if test="zyx4 != null and zyx4 != ''"> and ZYX4 = #{zyx4} </if>
<if test="zyx5 != null and zyx5 != ''"> and ZYX5 = #{zyx5} </if>
<if test="zzf != null and zzf != ''"> and ZZF = #{zzf} </if>
<if test="bomtypeFrom != null and bomtypeFrom != ''"> and BOMTYPE_FROM = #{bomtypeFrom} </if>
<if test="cjrq != null and cjrq != ''"> and CJRQ = #{cjrq} </if>
<if test="cjsj != null and cjsj != ''"> and CJSJ = #{cjsj} </if>
<if test="createtype != null and createtype != ''"> and CREATETYPE = #{createtype} </if>
<if test="gcbmFrom != null and gcbmFrom != ''"> and GCBM_FROM = #{gcbmFrom} </if>
<if test="modifiedtime != null and modifiedtime != ''"> and MODIFIEDTIME = #{modifiedtime} </if>
<if test="modifier != null and modifier != ''"> and MODIFIER = #{modifier} </if>
<if test="pkBomidFrom != null and pkBomidFrom != ''"> and PK_BOMID_FROM = #{pkBomidFrom} </if>
<if test="pkCorpFrom != null and pkCorpFrom != ''"> and PK_CORP_FROM = #{pkCorpFrom} </if>
<if test="qrrid != null and qrrid != ''"> and QRRID = #{qrrid} </if>
<if test="qrrq != null and qrrq != ''"> and QRRQ = #{qrrq} </if>
<if test="qrsj != null and qrsj != ''"> and QRSJ = #{qrsj} </if>
and sts='Y'
</trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
delete from BD_BOM where PK_BOMID = #{pkBomid}
</delete>
<select id="queryBomVersion" parameterType="com.hzya.frame.plugin.lets.entity.BdBomEntity" resultMap="get-BdBomEntity-result">
SELECT
a.zt,
a.cjsj,
a.cjrq,
a.qrrid,
a.qrrq,
a.qrsj,
su2.user_name shrmc,
a.modifier,
a.modifiedtime,
a.pk_corp,
gcbm,
pk_bomid,
wlbmid,
version,
bblx,
sfmr,
sl,
jldwid,
rgf,
clf,
zzf,
mver,
bomlx,
a.memo,
zdy1,
zdy2,
zdy3,
zdy4,
zdy5,
zdy6,
zdy7,
zdy8,
zdy9,
zdy10,
zdy11,
zdy12,
zdy13,
zdy14,
zdy15,
zdy16,
zdy17,
zdy18,
zdy19,
zdy20,
b.invcode,
b.invname,
b.invspec,
b.invtype,
b.graphid,
c.measname,
pk_produce,
a.ts,
a.slsx,
a.slxx,
a.gdsl,
a.sftpmr,
a.fsl,
a.fslxx,
a.fslsx,
a.gdfsl,
a.hsl,
d.pk_measdoc zjldwid,
d.measname zjldwmc,
a.creat,
su.user_name,
a.zyx1,
a.zyx2,
a.zyx3,
a.zyx4,
a.zyx5,
pk_corp_from,
gcbm_from,
pk_bomid_from,
bomtype_from,
createtype
FROM
bd_bom a
INNER JOIN bd_invbasdoc b ON a.wlbmid = b.pk_invbasdoc
INNER JOIN bd_measdoc d ON b.pk_measdoc = d.pk_measdoc LEFT outer
JOIN bd_measdoc c ON a.jldwid = c.pk_measdoc LEFT outer
JOIN sm_user su ON a.creat = su.user_code LEFT outer
JOIN sm_user su2 ON a.qrrid = su2.cuserid
WHERE
a.dr = 0
AND wlbmid = #{wlbmid}
AND gcbm = #{gcbm}
ORDER BY
version desc
</select>
</mapper>

View File

@ -56,7 +56,7 @@ public class AdjustInPluginInitializer extends PluginBaseEntity {
@Override @Override
public String getPluginId() { public String getPluginId() {
return "com.hzya.frame.plugin.lets.plugin.adjust.AdjustInPluginInitializer"; return "adjust.AdjustInPluginInitializer";
} }
@Override @Override

View File

@ -64,7 +64,7 @@ public class AdjustOutPluginInitializer extends PluginBaseEntity {
@Override @Override
public String getPluginId() { public String getPluginId() {
return "com.hzya.frame.plugin.lets.plugin.adjust.AdjustOutPluginInitializer"; return "adjust.AdjustOutPluginInitializer";
} }
@Override @Override

View File

@ -50,7 +50,7 @@ public class CustdocAutoAllotPluginInitializer extends PluginBaseEntity {
@Override @Override
public String getPluginId() { public String getPluginId() {
return "com.hzya.frame.plugin.lets.plugin.base.CustdocAutoAllotPluginInitializer"; return "base.CustdocAutoAllotPluginInitializer";
} }
@Override @Override
@ -99,10 +99,9 @@ public class CustdocAutoAllotPluginInitializer extends PluginBaseEntity {
} }
/** /**
* 查询客商基本档案 * 查询客商基本档案
*
* @return * @return
*/ */
private List<CustdocRequestVo> queryCustDoc() { private List<CustdocRequestVo> queryCustDoc() {

View File

@ -51,7 +51,7 @@ public class GoodsAutoAllotPluginInitializer extends PluginBaseEntity {
@Override @Override
public String getPluginId() { public String getPluginId() {
return "com.hzya.frame.plugin.lets.plugin.base.GoodsAutoAllotPluginInitializer"; return "base.GoodsAutoAllotPluginInitializer";
} }
@Override @Override

View File

@ -72,7 +72,7 @@ public class SKUClassPluginInitializer extends PluginBaseEntity {
@Override @Override
public String getPluginId() { public String getPluginId() {
return "com.hzya.frame.plugin.lets.plugin.base.SKUClassPluginInitializer"; return "base.SKUClassPluginInitializer";
} }
@Override @Override

View File

@ -63,7 +63,7 @@ public class SKUPluginInitializer extends PluginBaseEntity {
@Override @Override
public String getPluginId() { public String getPluginId() {
return "com.hzya.frame.plugin.lets.plugin.base.GoodsPluginInitializer"; return "base.GoodsPluginInitializer";
} }
@Override @Override
@ -239,6 +239,7 @@ public class SKUPluginInitializer extends PluginBaseEntity {
* 过滤成功日志 * 过滤成功日志
* rootAppPk * rootAppPk
* [code]_[lastUpdated] * [code]_[lastUpdated]
*
* @param ofsskuList * @param ofsskuList
* @return * @return
*/ */
@ -420,6 +421,7 @@ public class SKUPluginInitializer extends PluginBaseEntity {
/** /**
* 按code分组并按lastUpdated排序 * 按code分组并按lastUpdated排序
*
* @param ofsskuList * @param ofsskuList
* @return * @return
*/ */
@ -427,13 +429,11 @@ public class SKUPluginInitializer extends PluginBaseEntity {
List<OFSSKUSearchResponse.OFSSKU> sortSkus = new ArrayList<>(); List<OFSSKUSearchResponse.OFSSKU> sortSkus = new ArrayList<>();
//根据code进行分组 //根据code进行分组
Map<String, List<OFSSKUSearchResponse.OFSSKU>> collectMapByCode = Map<String, List<OFSSKUSearchResponse.OFSSKU>> collectMapByCode = ofsskuList.stream().collect(Collectors.groupingBy(OFSSKUSearchResponse.OFSSKU::getCode));
ofsskuList.stream().collect(Collectors.groupingBy(OFSSKUSearchResponse.OFSSKU::getCode));
collectMapByCode.forEach((k, v) -> { collectMapByCode.forEach((k, v) -> {
//降序排序 (从新到旧),根据最后修改时间倒排 //降序排序 (从新到旧),根据最后修改时间倒排
List<OFSSKUSearchResponse.OFSSKU> sorted = List<OFSSKUSearchResponse.OFSSKU> sorted = v.stream().sorted(Comparator.comparing(OFSSKUSearchResponse.OFSSKU::getLastUpdated).reversed()).collect(Collectors.toList());
v.stream().sorted(Comparator.comparing(OFSSKUSearchResponse.OFSSKU::getLastUpdated).reversed()).collect(Collectors.toList());
//排除status==0的 //排除status==0的
for (int i = 0; i < sorted.size(); i++) { for (int i = 0; i < sorted.size(); i++) {
@ -493,6 +493,7 @@ public class SKUPluginInitializer extends PluginBaseEntity {
} }
return all; return all;
} }
private InvBasDocVO resultDataHandle(String resultData) { private InvBasDocVO resultDataHandle(String resultData) {
try { try {
if (resultData != null && !"".equals(resultData)) { if (resultData != null && !"".equals(resultData)) {

View File

@ -58,7 +58,7 @@ public class ShopPluginInitializer extends PluginBaseEntity {
@Override @Override
public String getPluginId() { public String getPluginId() {
return "ShopPluginInitializer"; return "base.ShopPluginInitializer";
} }
@Override @Override

View File

@ -63,7 +63,7 @@ public class SupplierPluginInitializer extends PluginBaseEntity {
@Override @Override
public String getPluginId() { public String getPluginId() {
return "SupplierPluginInitializer"; return "base.SupplierPluginInitializer";
} }
@Override @Override

View File

@ -13,10 +13,8 @@ import com.hzya.frame.plugin.lets.dao.*;
import com.hzya.frame.plugin.lets.entity.*; import com.hzya.frame.plugin.lets.entity.*;
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo; import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo;
import com.hzya.frame.plugin.lets.u8cdto.*; import com.hzya.frame.plugin.lets.u8cdto.*;
import com.hzya.frame.plugin.lets.util.OfsStandardUtil; import com.hzya.frame.plugin.lets.util.*;
import com.hzya.frame.plugin.lets.util.OnlyImplementProxyOrderUtil; import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
import com.hzya.frame.plugin.lets.util.QueryBdBusitypeUtil;
import com.hzya.frame.plugin.lets.util.RdclUtil;
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderData; import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderData;
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderDetails; import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderDetails;
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderHeader; import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderHeader;
@ -70,9 +68,27 @@ public class ConsignmachiningIn extends PluginBaseEntity {
@Autowired @Autowired
private IScOrderBDao iScOrderBDao; private IScOrderBDao iScOrderBDao;
@Autowired
private IBdPurorgDao iBdPurorgDao;
@Autowired
private IBdCubasdocDao iBdCubasdocDao;
@Autowired
private IBdCumandocDao iBdCumandocDao;
@Autowired
private IBdInvbasdocDao iBdInvbasdocDao;
@Autowired @Autowired
private OnlyImplementProxyOrderUtil onlyImplementProxyOrder; private OnlyImplementProxyOrderUtil onlyImplementProxyOrder;
@Autowired
private IBdBomDao iBdBomDao;
@Autowired
private SaveOrUpdateBusinessLogUtil saveOrUpdateBusinessLogUtil;
@Override @Override
public void initialize() { public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()"); logger.info(getPluginLabel() + "執行初始化方法initialize()");
@ -85,17 +101,17 @@ public class ConsignmachiningIn extends PluginBaseEntity {
@Override @Override
public String getPluginId() { public String getPluginId() {
return "com.hzya.frame.plugin.lets.plugin.outsourc.ConsignmachiningIn"; return "outsourc.ConsignmachiningIn";
} }
@Override @Override
public String getPluginName() { public String getPluginName() {
return "OFS采购入库单生成U8C委外加工入库(委外采购入库)"; return "OFS采购入库单生成U8C委外订单(委外采购入库)";
} }
@Override @Override
public String getPluginLabel() { public String getPluginLabel() {
return "OFS采购入库单生成U8C委外加工入库(委外采购入库)"; return "OFS采购入库单生成U8C委外订单(委外采购入库)";
} }
@Override @Override
@ -114,6 +130,7 @@ public class ConsignmachiningIn extends PluginBaseEntity {
* @author liuyang * @author liuyang
*/ */
public void startImplement(String startTime, String endTime) { public void startImplement(String startTime, String endTime) {
long startMillis = System.currentTimeMillis();
String threadNameStrStart = StrUtil.format("开始委外采购OFS采购入库单生成U8C委外加工入库 开始时间:{} 结束时间:{}", startTime, endTime); String threadNameStrStart = StrUtil.format("开始委外采购OFS采购入库单生成U8C委外加工入库 开始时间:{} 结束时间:{}", startTime, endTime);
logger.info(threadNameStrStart); logger.info(threadNameStrStart);
@ -148,7 +165,8 @@ public class ConsignmachiningIn extends PluginBaseEntity {
} catch (Exception e) { } catch (Exception e) {
logger.error("thread.join()异常", e); logger.error("thread.join()异常", e);
} }
String threadNameStrEnd = StrUtil.format("结束委外采购OFS采购入库单生成U8C委外加工入库 开始时间:{} 结束时间:{}", startTime, endTime); long endMillis = System.currentTimeMillis();
String threadNameStrEnd = StrUtil.format("结束委外采购OFS采购入库单生成U8C委外加工入库 开始时间:{} 结束时间:{} 耗时:{}", startTime, endTime, (endMillis - startMillis));
logger.info(threadNameStrEnd); logger.info(threadNameStrEnd);
} }
@ -158,6 +176,7 @@ public class ConsignmachiningIn extends PluginBaseEntity {
* @author liuyang * @author liuyang
*/ */
public void startImplement(String code) { public void startImplement(String code) {
long startMillis = System.currentTimeMillis();
String threadNameStrStart = StrUtil.format("开始委外采购OFS采购入库单生成U8C委外加工入库 OFS采购入库单号{}", code); String threadNameStrStart = StrUtil.format("开始委外采购OFS采购入库单生成U8C委外加工入库 OFS采购入库单号{}", code);
logger.info(threadNameStrStart); logger.info(threadNameStrStart);
@ -191,7 +210,8 @@ public class ConsignmachiningIn extends PluginBaseEntity {
} catch (Exception e) { } catch (Exception e) {
logger.error("thread.join()异常", e); logger.error("thread.join()异常", e);
} }
String threadNameStrEnd = StrUtil.format("结束委外采购OFS采购入库单生成U8C委外加工入库 OFS采购入库单号{}", code); long endMillis = System.currentTimeMillis();
String threadNameStrEnd = StrUtil.format("结束委外采购OFS采购入库单生成U8C委外加工入库 OFS采购入库单号{}", code, (endMillis - startMillis));
logger.info(threadNameStrEnd); logger.info(threadNameStrEnd);
} }
@ -234,49 +254,65 @@ public class ConsignmachiningIn extends PluginBaseEntity {
List<ConsignmachiningInSonDto> consignmachiningInSonDtos = queryBasicArchives(returnGoodHeaderDetailsDataDtoList); List<ConsignmachiningInSonDto> consignmachiningInSonDtos = queryBasicArchives(returnGoodHeaderDetailsDataDtoList);
// 查询采购收发类别 // 查询采购收发类别
BdRdclEntity bdRdclEntity = rdclUtil.queryRdClObject("105"); BdRdclEntity bdRdclEntity = rdclUtil.queryRdClObject("105");
//代理委外入库业务流程
BdBusitypeEntity bdBusitypeEntity = u8cOperationFlow();
if (consignmachiningInSonDtos != null && consignmachiningInSonDtos.size() > 0) { if (consignmachiningInSonDtos != null && consignmachiningInSonDtos.size() > 0) {
for (int i = 0; i < consignmachiningInSonDtos.size(); i++) { for (int i = 0; i < consignmachiningInSonDtos.size(); i++) {
ConsignmachiningInSonDto consignmachiningInSonDto = consignmachiningInSonDtos.get(i); ConsignmachiningInSonDto consignmachiningInSonDto = consignmachiningInSonDtos.get(i);
String generateBusinessDate = null;
try {
// StockinOrderSearchResponse.StockinOrder.StockinH header = consignmachiningInSonDto.getHeader(); // StockinOrderSearchResponse.StockinOrder.StockinH header = consignmachiningInSonDto.getHeader();
List<StockinOrderSearchResponse.StockinOrder.StockinB> details = consignmachiningInSonDto.getDetails(); List<StockinOrderSearchResponse.StockinOrder.StockinB> details = consignmachiningInSonDto.getDetails();
String generateBusinessDate = createGenerateBusinessDate(consignmachiningInSonDto); //生成业务日期 generateBusinessDate = createGenerateBusinessDate(consignmachiningInSonDto); //生成业务日期
OfsPoOrderData ofsPoOrderData = consignmachiningInSonDto.getOfsPoOrderData();//OFS采购订单 OfsPoOrderData ofsPoOrderData = consignmachiningInSonDto.getOfsPoOrderData();//OFS采购订单
ScOrderEntity scOrderEntity = consignmachiningInSonDto.getScOrderEntity();//U8C委外订单
BdCorpEntity bdCorpEntity = consignmachiningInSonDto.getBdCorpEntity();//公司
BdCalbodyEntity bdCalbodyEntity = consignmachiningInSonDto.getBdCalbodyEntity();//库存组织
BdStordocEntity bdStordocEntity = consignmachiningInSonDto.getBdStordocEntity();//仓库
// StockinOrderSearchResponse.StockinOrder.StockinH header1 = consignmachiningInSonDto.getHeader();
List<StockinOrderSearchResponse.StockinOrder.StockinB> details1 = consignmachiningInSonDto.getDetails();//OFS采购入库单
List<ScOrderBEntity> scOrderBEntityList = consignmachiningInSonDto.getScOrderBEntityList();//U8C委外订单明细行主键
OfsPoOrderHeader ofsPoOrderDataHeader = ofsPoOrderData.getHeader(); OfsPoOrderHeader ofsPoOrderDataHeader = ofsPoOrderData.getHeader();
List<OfsPoOrderDetails> ofsPoOrderDataDetails = ofsPoOrderData.getDetails(); List<OfsPoOrderDetails> ofsPoOrderDataDetails = ofsPoOrderData.getDetails();
// 代理委外入库业务流程 // ScOrderEntity scOrderEntity = consignmachiningInSonDto.getScOrderEntity();//U8C委外订单
BdBusitypeEntity bdBusitypeEntity = u8cOperationFlow(bdCorpEntity.getPkCorp()); BdCorpEntity bdCorpEntity = consignmachiningInSonDto.getBdCorpEntity();//公司
BdCalbodyEntity bdCalbodyEntity = consignmachiningInSonDto.getBdCalbodyEntity();//库存组织
BdPurorgEntity bdPurorgEntity = consignmachiningInSonDto.getBdPurorgEntity();//采购组织
// BdStordocEntity bdStordocEntity = consignmachiningInSonDto.getBdStordocEntity();//仓库
// StockinOrderSearchResponse.StockinOrder.StockinH header1 = consignmachiningInSonDto.getHeader();
List<StockinOrderSearchResponse.StockinOrder.StockinB> details1 = consignmachiningInSonDto.getDetails();//OFS采购入库单明细行
// List<ScOrderBEntity> scOrderBEntityList = consignmachiningInSonDto.getScOrderBEntityList();//U8C委外订单明细行主键
BdCubasdocEntity bdCubasdocEntity = consignmachiningInSonDto.getBdCubasdocEntity();//客商基本档案
BdCumandocEntity bdCumandocEntity = consignmachiningInSonDto.getBdCumandocEntity();//客商管理档案
BdStordocEntity bdStordocEntity = consignmachiningInSonDto.getBdStordocEntity();//表体仓库
//委外入库表头 //委外订单表头
ConsignmachiningInHeadDto poOrderParentDto = new ConsignmachiningInHeadDto(); ScorderHeadDto poOrderParentDto = new ScorderHeadDto();
poOrderParentDto.setPk_corp(bdCorpEntity.getPkCorp()); poOrderParentDto.setPk_corp(bdCorpEntity.getPkCorp());
poOrderParentDto.setCoperatorid("0001A110000000000U3D");
poOrderParentDto.setCwarehouseid(bdStordocEntity.getPkStordoc());
poOrderParentDto.setPk_calbody(bdCalbodyEntity.getPkCalbody());
poOrderParentDto.setCbiztype(bdBusitypeEntity.getPkBusitype()); poOrderParentDto.setCbiztype(bdBusitypeEntity.getPkBusitype());
poOrderParentDto.setCdispatcherid(bdRdclEntity.getPkRdcl());//收发类别 poOrderParentDto.setCoperator("0001A110000000000U3D");
poOrderParentDto.setDbilldate(generateBusinessDate);//入库日期 poOrderParentDto.setCpurorganization(bdPurorgEntity.getPkPurorg());
poOrderParentDto.setCgiveinvoicevendor(bdCumandocEntity.getPkCumandoc());
poOrderParentDto.setCvendormangid(bdCumandocEntity.getPkCumandoc());
poOrderParentDto.setDorderdate(generateBusinessDate);
poOrderParentDto.setPk_defdoc3(bdRdclEntity.getPkRdcl());//收发类别
poOrderParentDto.setVdef3(bdRdclEntity.getRdname());
poOrderParentDto.setVdef17(ProfilesActiveConstant.sourceSystem1);//来源系统
poOrderParentDto.setVdef19(consignmachiningInSonDto.getCode());//原单单号
poOrderParentDto.setVdef20(consignmachiningInSonDto.getId());//原单主键
//委外入库表头明细行 //委外入库表头明细行
List<ConsignmachiningInBodyDto> consignmachiningInBodyDtoArrayList = new ArrayList<>(); List<ScorderBodyDto> scorderBodyDtoArrayList = new ArrayList<>();
for (int j = 0; j < details.size(); j++) { for (int j = 0; j < details.size(); j++) {
StockinOrderSearchResponse.StockinOrder.StockinB stockinB = details.get(j); StockinOrderSearchResponse.StockinOrder.StockinB stockinB = details.get(j);
//匹配U8C采购订单明细行 //匹配U8C采购订单明细行
ScOrderBEntity u8cPoOrderDetail = findOfsPoOrderDetailAndU8cPoOrderDetail(stockinB, ofsPoOrderData, scOrderBEntityList); // ScOrderBEntity u8cPoOrderDetail = findOfsPoOrderDetailAndU8cPoOrderDetail(stockinB, ofsPoOrderData, scOrderBEntityList);
//通过O采购订单入库单明细行联查OFS采购订单明细行 //通过O采购订单入库单明细行联查OFS采购订单明细行
OfsPoOrderDetails ofsPoOrderDetailRowTraget = findOfsPoOrderDetailRowTraget(stockinB, ofsPoOrderData); OfsPoOrderDetails ofsPoOrderDetailRowTraget = findOfsPoOrderDetailRowTraget(stockinB, ofsPoOrderData);
//查询存货管理档案 //查询存货管理档案
BdInvmandocEntity bdInvmandocEntity = queryInventoryMan(stockinB, bdCorpEntity.getPkCorp()); BdInvmandocEntity bdInvmandocEntity = queryInventoryMan(stockinB, bdCorpEntity.getPkCorp());
//存货基础档案
BdInvbasdocEntity bdInvbasdocEntity = queryStockBasicArchives(bdInvmandocEntity.getPkInvmandoc(), bdCorpEntity.getPkCorp());
//存货对应的BOM
List<BdBomEntity> bomVersion = getBomVersion(bdCalbodyEntity.getPkCalbody(), bdInvbasdocEntity.getPkInvbasdoc());
//计算含税单价 //计算含税单价
BigDecimal noriginalcurprice = null; BigDecimal noriginalcurprice = null;
@ -285,35 +321,29 @@ public class ConsignmachiningIn extends PluginBaseEntity {
try { try {
noriginalcurprice = new BigDecimal(fulfillAmount).divide(new BigDecimal(receivedQty), 20, BigDecimal.ROUND_HALF_UP).setScale(4, BigDecimal.ROUND_HALF_UP); noriginalcurprice = new BigDecimal(fulfillAmount).divide(new BigDecimal(receivedQty), 20, BigDecimal.ROUND_HALF_UP).setScale(4, BigDecimal.ROUND_HALF_UP);
} catch (Exception e) { } catch (Exception e) {
logger.error("计算采购入库单原币含税单价失败", e); logger.error("计算委外订单原币含税单价失败", e);
Assert.state(false, "计算采购入库单原币含税单价失败 原因:{}", e.getMessage()); Assert.state(false, "计算采购入库单原币含税单价失败 原因:{}", e.getMessage());
} }
ConsignmachiningInBodyDto consignmachiningInBodyDto = new ConsignmachiningInBodyDto(); ScorderBodyDto scorderBodyDto = new ScorderBodyDto();
consignmachiningInBodyDto.setCinventoryid(bdInvmandocEntity.getPkInvmandoc());//存货 scorderBodyDto.setCmangid(bdInvmandocEntity.getPkInvmandoc());//存货
//TODO 测试 scorderBodyDto.setNordernum(stockinB.getReceivedQty());//数量
consignmachiningInBodyDto.setNinnum("1"); scorderBodyDto.setNoriginalnetprice(noriginalcurprice.stripTrailingZeros().toPlainString());//净单价
// consignmachiningInBodyDto.setNinnum(new BigDecimal(stockinB.getReceivedQty()).stripTrailingZeros().toPlainString());//实收数量 scorderBodyDto.setCwarehouseid(bdStordocEntity.getPkStordoc());//仓库
consignmachiningInBodyDto.setNprice(noriginalcurprice.stripTrailingZeros().toPlainString());//单价含税单价 scorderBodyDto.setBomversion(bomVersion.get(0).getVersion());//BOM版本
consignmachiningInBodyDto.setCsourcetype("61");//来源单据类型 scorderBodyDto.setDplanarrvdate(generateBusinessDate);//计划到货日期
consignmachiningInBodyDto.setVsourcerowno(u8cPoOrderDetail.getCrowno());//来源单据行号 scorderBodyDtoArrayList.add(scorderBodyDto);
consignmachiningInBodyDto.setVsourcebillcode(scOrderEntity.getVordercode());//来源单据号
consignmachiningInBodyDto.setWriteofftype("按备料发料核销");//核销方式
consignmachiningInBodyDtoArrayList.add(consignmachiningInBodyDto);
} }
List<ConsignmachiningInHeadBodyDto> consignmachiningInHeadBodyDtoArrayList = new ArrayList<>(); List<ScorderDto> scorderDtoArrayList = new ArrayList<>();
ScorderDto scorderDto = new ScorderDto();
scorderDto.setParentvo(poOrderParentDto);
scorderDto.setChildrenvo(scorderBodyDtoArrayList);
scorderDtoArrayList.add(scorderDto);
ConsignmachiningInHeadBodyDto consignmachiningInHeadBodyDto = new ConsignmachiningInHeadBodyDto(); Map<String, List<ScorderDto>> stringStringMap = new HashMap<>();
consignmachiningInHeadBodyDto.setParentvo(poOrderParentDto); stringStringMap.put("OrderVO", scorderDtoArrayList);
consignmachiningInHeadBodyDto.setChildrenvo(consignmachiningInBodyDtoArrayList); IcGeneralHResultDto icGeneralHResultDto = sendU8cScorder(JSON.toJSONString(stringStringMap));
consignmachiningInHeadBodyDtoArrayList.add(consignmachiningInHeadBodyDto);
Map<String, List<ConsignmachiningInHeadBodyDto>> stringStringMap = new HashMap<>();
stringStringMap.put("GeneralBillVO", consignmachiningInHeadBodyDtoArrayList);
//TODO 2024年8月26日 14:41:46 委外入库核销方式传不了已经提交总部
//TODO 2024年8月26日 14:42:19 无法超委外订单数量入库已经提交给总部
IcGeneralHResultDto icGeneralHResultDto = sendU8cConsignmachiningIn(JSON.toJSONString(stringStringMap));
String cgeneralhid = null; String cgeneralhid = null;
String vbillcode = null; String vbillcode = null;
@ -326,6 +356,37 @@ public class ConsignmachiningIn extends PluginBaseEntity {
vbillcode = parentvo.getVbillcode(); vbillcode = parentvo.getVbillcode();
} }
logger.info("推送U8C委外入库成功委外入库单主键{} 委外入库单编码:{}", cgeneralhid, vbillcode); logger.info("推送U8C委外入库成功委外入库单主键{} 委外入库单编码:{}", cgeneralhid, vbillcode);
// 成功记录日志
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
integrationTaskLivingDetailsEntity.setNewState(ProfilesActiveConstant.LOG_STATUS_Y);
integrationTaskLivingDetailsEntity.setRootAppNewData(JSON.toJSONString(consignmachiningInSonDto));//原始数据json
integrationTaskLivingDetailsEntity.setNewTransmitInfo(JSON.toJSONString(icGeneralHResultDto));//返回结果
integrationTaskLivingDetailsEntity.setNewPushDate(new Date());
integrationTaskLivingDetailsEntity.setBusinessDate(generateBusinessDate);
integrationTaskLivingDetailsEntity.setRootAppPk(consignmachiningInSonDto.getId());
integrationTaskLivingDetailsEntity.setRootAppBill(consignmachiningInSonDto.getCode());
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
} catch (Exception e) {
logger.error("推送U8C委外订单失败", e);
String message = e.getMessage();
if (message == null) {
message = "未知错误";
}
// 失败记录日志
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
integrationTaskLivingDetailsEntity.setNewState(ProfilesActiveConstant.LOG_STATUS_N);
integrationTaskLivingDetailsEntity.setRootAppNewData(JSON.toJSONString(consignmachiningInSonDto));//原始数据json
integrationTaskLivingDetailsEntity.setNewTransmitInfo(JSON.toJSONString(message));//返回结果
integrationTaskLivingDetailsEntity.setNewPushDate(new Date());
integrationTaskLivingDetailsEntity.setBusinessDate(generateBusinessDate);
integrationTaskLivingDetailsEntity.setRootAppPk(consignmachiningInSonDto.getId());
integrationTaskLivingDetailsEntity.setRootAppBill(consignmachiningInSonDto.getCode());
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
}
} }
} else { } else {
logger.info("poOrderSonDto.size为0"); logger.info("poOrderSonDto.size为0");
@ -365,27 +426,84 @@ public class ConsignmachiningIn extends PluginBaseEntity {
} }
//2024年8月25日 09:42:58 查询委外订单如果这一步报错后续的逻辑就没有必要执行了 //2024年8月25日 09:42:58 查询委外订单如果这一步报错后续的逻辑就没有必要执行了
String ofsId = ofsPoOrderDataHeader.getId(); // String ofsId = ofsPoOrderDataHeader.getId();
Assert.notNull(ofsId, "通过接口查询到OFS采购订单但是没有采购订单主键业务逻辑无法完成"); // Assert.notNull(ofsId, "通过接口查询到OFS采购订单但是没有采购订单主键业务逻辑无法完成");
ScOrderEntity scOrderEntity = queryScOrder(ofsId); // ScOrderEntity scOrderEntity = queryScOrder(ofsId);
//2024年8月25日 14:15:45 根据委外订单id查询委外订单表体明细行 //2024年8月25日 14:15:45 根据委外订单id查询委外订单表体明细行
List<ScOrderBEntity> scOrderBEntityList = queryScOrderDetail(scOrderEntity.getCorderid()); // List<ScOrderBEntity> scOrderBEntityList = queryScOrderDetail(scOrderEntity.getCorderid());
//2024年8月25日 10:09:20 委外入库公司取委外订单上的公司已经和妮姐确认没有必要通过O的公司转换因为不存在跨组织的问题 //委外订单表头公司
Assert.notNull(scOrderEntity.getPkCorp(), "O表头公司不能为空"); String companyCode = header.getCompanyCode();
Assert.notNull(companyCode, "O表头公司不能为空(物理货主)");
BdCorpEntity bdCorpEntity = new BdCorpEntity(); BdCorpEntity bdCorpEntity = new BdCorpEntity();
bdCorpEntity.setDr(0); bdCorpEntity.setDr(0);
bdCorpEntity.setDataSourceCode("lets_u8c"); bdCorpEntity.setDataSourceCode("lets_u8c");
bdCorpEntity.setPkCorp(scOrderEntity.getPkCorp()); bdCorpEntity.setUnitcode(companyCode);
List<BdCorpEntity> bdCorpEntityList = iBdCorpDao.query(bdCorpEntity); List<BdCorpEntity> bdCorpEntityList = iBdCorpDao.query(bdCorpEntity);
if (bdCorpEntityList.size() == 0) { if (bdCorpEntityList.size() == 0) {
Assert.state(false, "根据委外订单公司主键:{},无法匹配到委外入库单", scOrderEntity.getPkCorp()); Assert.state(false, "根据O货主编码{}无法匹配到U8C委外订单公司", companyCode);
} else if (bdCorpEntityList.size() >= 2) { } else if (bdCorpEntityList.size() >= 2) {
Assert.state(false, "根据委外订单公司主键:{},匹配到{}个委外入库单", scOrderEntity.getPkCorp(), bdCorpEntityList.size()); Assert.state(false, "根据O货主编码{}匹配到U8C委外订单公司{}个", companyCode, bdCorpEntityList.size());
} }
// 2024年8月20日 23:51:56 收货库存组织应该是通过收货公司查询得出收货库存组织目前收货公司和采购公司保持一致那么就以采购公司带出这个逻辑已经和佳妮确认 //采购组织
BdPurorgEntity bdPurorgEntity = new BdPurorgEntity();
bdPurorgEntity.setDr("0");
bdPurorgEntity.setDataSourceCode("lets_u8c");
bdPurorgEntity.setOwnercorp(bdCorpEntityList.get(0).getPkCorp());
List<BdPurorgEntity> bdPurorgEntityList = iBdPurorgDao.query(bdPurorgEntity);
if (bdPurorgEntityList.size() == 0) {
Assert.state(false, "根据委外订单公司主键:{} 无法匹配到采购组织", bdCorpEntityList.get(0).getPkCorp());
} else if (bdPurorgEntityList.size() >= 2) {
Assert.state(false, "根据委外订单公司主键:{} 匹配到多个采购组织", bdCorpEntityList.get(0).getPkCorp());
}
//客商基本档案(供应商类型)
//2024年8月20日 14:47:55 丽知商城OFS 供应商客商档案传递到U8C的客商
//其中自定义项1作为原系统编码因此统一传到自定义项一已经和大家确认好了没有关系的放心大胆传吧宝贝
String shipFromCode = header.getShipFromCode();
Assert.notNull(shipFromCode, "O供应商编码不能为空没有办法完成业务逻辑请配置供应商编码(采退)");
Assert.state(!"".equals(shipFromCode.trim()), "O供应商编码不能为空没有办法完成业务逻辑请配置供应商编码");
BdCubasdocEntity bdCubasdocEntity = new BdCubasdocEntity();
bdCubasdocEntity.setDataSourceCode("lets_u8c");
bdCubasdocEntity.setDr(0L);
bdCubasdocEntity.setDef1(shipFromCode);
List<BdCubasdocEntity> bdCubasdocEntityList = iBdCubasdocDao.query(bdCubasdocEntity);
if (bdCubasdocEntityList == null || bdCubasdocEntityList.size() == 0) {
Assert.state(false, "根据OFS供应商业务编码{}无法查询到U8C客商档案信息(供应商)", shipFromCode);
} else if (bdCubasdocEntityList.size() >= 2) {
Assert.state(false, "根据OFS供应商业务编码{}查询到多个U8C客商档案信息(供应商)", shipFromCode);
}
//客商管理档案
BdCumandocEntity bdCumandocEntity1 = new BdCumandocEntity();
bdCumandocEntity1.setDataSourceCode("lets_u8c");
bdCumandocEntity1.setDr(0L);
bdCumandocEntity1.setPkCorp(bdCorpEntityList.get(0).getPkCorp());
bdCumandocEntity1.setCustflags(ProfilesActiveConstant.SUPPLIER);
bdCumandocEntity1.setPkCubasdoc(bdCubasdocEntityList.get(0).getPkCubasdoc());
List<BdCumandocEntity> bdCumandocEntityList = iBdCumandocDao.query(bdCumandocEntity1);
if (bdCumandocEntityList == null || bdCumandocEntityList.size() == 0) {
Assert.state(false, "根据客商基本档案主键{},无法匹配到客商管理档案", bdCubasdocEntityList.get(0).getPkCubasdoc());
} else if (bdCumandocEntityList.size() >= 2) {
Assert.state(false, "根据客商基本档案主键{},匹配到多个客商管理档案", bdCubasdocEntityList.get(0).getPkCubasdoc());
}
//2024年8月25日 10:09:20 委外入库公司取委外订单上的公司已经和妮姐确认没有必要通过O的公司转换因为不存在跨组织的问题
// Assert.notNull(scOrderEntity.getPkCorp(), "O表头公司不能为空");
// BdCorpEntity bdCorpEntity = new BdCorpEntity();
// bdCorpEntity.setDr(0);
// bdCorpEntity.setDataSourceCode("lets_u8c");
// bdCorpEntity.setPkCorp(scOrderEntity.getPkCorp());
// List<BdCorpEntity> bdCorpEntityList = iBdCorpDao.query(bdCorpEntity);
// if (bdCorpEntityList.size() == 0) {
// Assert.state(false, "根据委外订单公司主键:{},无法匹配到委外入库单", scOrderEntity.getPkCorp());
// } else if (bdCorpEntityList.size() >= 2) {
// Assert.state(false, "根据委外订单公司主键:{},匹配到{}个委外入库单", scOrderEntity.getPkCorp(), bdCorpEntityList.size());
// }
// 库存组织
BdCalbodyEntity bdCalbodyEntity = new BdCalbodyEntity(); BdCalbodyEntity bdCalbodyEntity = new BdCalbodyEntity();
bdCalbodyEntity.setDr(0); bdCalbodyEntity.setDr(0);
bdCalbodyEntity.setDataSourceCode("lets_u8c"); bdCalbodyEntity.setDataSourceCode("lets_u8c");
@ -397,7 +515,7 @@ public class ConsignmachiningIn extends PluginBaseEntity {
Assert.state(false, "根据U8C采购公司{}匹配到U8C发货库存组织{}个", bdCorpEntityList.get(0).getPkCorp(), bdCalbodyEntities.size()); Assert.state(false, "根据U8C采购公司{}匹配到U8C发货库存组织{}个", bdCorpEntityList.get(0).getPkCorp(), bdCalbodyEntities.size());
} }
//入库仓库 //表体仓库
String facilityCode = header.getFacilityCode(); String facilityCode = header.getFacilityCode();
Assert.notNull(facilityCode, "O售后入库单仓库facilityCode字段不能为空"); Assert.notNull(facilityCode, "O售后入库单仓库facilityCode字段不能为空");
BdStordocEntity bdStordocEntity = new BdStordocEntity(); BdStordocEntity bdStordocEntity = new BdStordocEntity();
@ -414,20 +532,24 @@ public class ConsignmachiningIn extends PluginBaseEntity {
ConsignmachiningInSonDto consignmachiningInSonDto = new ConsignmachiningInSonDto(); ConsignmachiningInSonDto consignmachiningInSonDto = new ConsignmachiningInSonDto();
consignmachiningInSonDto.setOfsPoOrderData(ofsPoOrderData); consignmachiningInSonDto.setOfsPoOrderData(ofsPoOrderData);
consignmachiningInSonDto.setScOrderEntity(scOrderEntity); // consignmachiningInSonDto.setScOrderEntity(scOrderEntity);
consignmachiningInSonDto.setBdCorpEntity(bdCorpEntityList.get(0)); consignmachiningInSonDto.setBdCorpEntity(bdCorpEntityList.get(0));
consignmachiningInSonDto.setBdCalbodyEntity(bdCalbodyEntities.get(0)); consignmachiningInSonDto.setBdCalbodyEntity(bdCalbodyEntities.get(0));
consignmachiningInSonDto.setBdStordocEntity(bdStordocEntityList.get(0)); // consignmachiningInSonDto.setBdStordocEntity(bdStordocEntityList.get(0));
consignmachiningInSonDto.setBdPurorgEntity(bdPurorgEntityList.get(0));
consignmachiningInSonDto.setBdCubasdocEntity(bdCubasdocEntityList.get(0));
consignmachiningInSonDto.setBdCumandocEntity(bdCumandocEntityList.get(0));
// consignmachiningInSonDto.setHeader(header); // consignmachiningInSonDto.setHeader(header);
consignmachiningInSonDto.setScOrderBEntityList(scOrderBEntityList); // consignmachiningInSonDto.setScOrderBEntityList(scOrderBEntityList);
consignmachiningInSonDto.setDetails(details); consignmachiningInSonDto.setDetails(details);
consignmachiningInSonDto.setBdStordocEntity(bdStordocEntityList.get(0));
BeanUtil.copyPropertiesV2(header, consignmachiningInSonDto); BeanUtil.copyPropertiesV2(header, consignmachiningInSonDto);
consignmachiningInSonDtoArrayList.add(consignmachiningInSonDto); consignmachiningInSonDtoArrayList.add(consignmachiningInSonDto);
} }
//成功 //成功
} catch (Exception e) { } catch (Exception e) {
logger.error("委外入库OFS档案转换", e); logger.error("委外入库OFS档案转换错误", e);
//失败 //失败
} }
} else { } else {
@ -441,22 +563,22 @@ public class ConsignmachiningIn extends PluginBaseEntity {
* *
* @author liuyang * @author liuyang
*/ */
private ScOrderEntity queryScOrder(String ofsPoOrderId) { // private ScOrderEntity queryScOrder(String ofsPoOrderId) {
Assert.notNull(ofsPoOrderId, "ofsPoOrderId不能为空!"); // Assert.notNull(ofsPoOrderId, "ofsPoOrderId不能为空!");
Assert.state(!"".equals(ofsPoOrderId.trim()), "ofsPoOrderId不能为空"); // Assert.state(!"".equals(ofsPoOrderId.trim()), "ofsPoOrderId不能为空");
//
ScOrderEntity scOrderEntity = new ScOrderEntity(); // ScOrderEntity scOrderEntity = new ScOrderEntity();
scOrderEntity.setVdef20(ofsPoOrderId); // scOrderEntity.setVdef20(ofsPoOrderId);
scOrderEntity.setDr("0"); // scOrderEntity.setDr("0");
scOrderEntity.setDataSourceCode("lets_u8c"); // scOrderEntity.setDataSourceCode("lets_u8c");
List<ScOrderEntity> scOrderEntityList = iScOrderDao.query(scOrderEntity); // List<ScOrderEntity> scOrderEntityList = iScOrderDao.query(scOrderEntity);
if (scOrderEntityList == null || scOrderEntityList.size() == 0) { // if (scOrderEntityList == null || scOrderEntityList.size() == 0) {
Assert.state(false, "根据O采购订单主键:{}(u委外订单自定义项20存储O采购订单主键)无法匹配到U8C委外订单", ofsPoOrderId); // Assert.state(false, "根据O采购订单主键:{}(u委外订单自定义项20存储O采购订单主键)无法匹配到U8C委外订单", ofsPoOrderId);
} else if (scOrderEntityList.size() >= 2) { // } else if (scOrderEntityList.size() >= 2) {
Assert.state(false, "根据O采购订单主键:{}(u委外订单自定义项20存储O采购订单主键),匹配到{}个U8C委外订单", ofsPoOrderId, scOrderEntityList.size()); // Assert.state(false, "根据O采购订单主键:{}(u委外订单自定义项20存储O采购订单主键),匹配到{}个U8C委外订单", ofsPoOrderId, scOrderEntityList.size());
} // }
return scOrderEntityList.get(0); // return scOrderEntityList.get(0);
} // }
/** /**
* 2024年8月25日 14:11:31 查询U8C委外订单明细 * 2024年8月25日 14:11:31 查询U8C委外订单明细
@ -464,31 +586,30 @@ public class ConsignmachiningIn extends PluginBaseEntity {
* @param corderid 委外订单表头主键 * @param corderid 委外订单表头主键
* @author liuyang * @author liuyang
*/ */
private List<ScOrderBEntity> queryScOrderDetail(String corderid) throws Exception { // private List<ScOrderBEntity> queryScOrderDetail(String corderid) throws Exception {
Assert.notNull(corderid, "委外订单表头主键不能为空!"); // Assert.notNull(corderid, "委外订单表头主键不能为空!");
Assert.state(!"".equals(corderid), "委外订单表头主键不能为空!"); // Assert.state(!"".equals(corderid), "委外订单表头主键不能为空!");
//
ScOrderBEntity scOrderBEntity = new ScOrderBEntity(); // ScOrderBEntity scOrderBEntity = new ScOrderBEntity();
scOrderBEntity.setCorderid(corderid); // scOrderBEntity.setCorderid(corderid);
scOrderBEntity.setDr("0"); // scOrderBEntity.setDr("0");
scOrderBEntity.setDataSourceCode("lets_u8c"); // scOrderBEntity.setDataSourceCode("lets_u8c");
List<ScOrderBEntity> scOrderBEntityList = iScOrderBDao.query(scOrderBEntity); // List<ScOrderBEntity> scOrderBEntityList = iScOrderBDao.query(scOrderBEntity);
if (scOrderBEntityList == null || scOrderBEntityList.size() == 0) { // if (scOrderBEntityList == null || scOrderBEntityList.size() == 0) {
//2024年8月25日 14:16:31 这个验证非常要必要单据如果没有表体没有行是很可疑的 // //2024年8月25日 14:16:31 这个验证非常要必要单据如果没有表体没有行是很可疑的
Assert.state(false, "根据U8C委外订单主键({})无法查询到委外订单表体明细行!", corderid); // Assert.state(false, "根据U8C委外订单主键({})无法查询到委外订单表体明细行!", corderid);
} // }
return scOrderBEntityList; // return scOrderBEntityList;
} // }
/** /**
* 2024年8月6日 10:59:03 查询U8C业务流程 * 2024年8月6日 10:59:03 查询U8C业务流程
* *
* @param pkCorp 公司主键
* @author liuyang * @author liuyang
*/ */
private BdBusitypeEntity u8cOperationFlow(String pkCorp) throws Exception { private BdBusitypeEntity u8cOperationFlow() throws Exception {
Assert.notNull(pkCorp, "公司主键不能为空!"); // Assert.notNull(pkCorp, "公司主键不能为空!");
Assert.state(!"".equals(pkCorp.trim()), "公司主键不能为空!"); // Assert.state(!"".equals(pkCorp.trim()), "公司主键不能为空!");
//查询业务流程 //查询业务流程
//2024年8月6日 11:33:07 具体的业务流程名称还需要实施提供 //2024年8月6日 11:33:07 具体的业务流程名称还需要实施提供
String processName = "委外加工"; String processName = "委外加工";
@ -532,36 +653,36 @@ public class ConsignmachiningIn extends PluginBaseEntity {
* @param scOrderBEntityList U8C委外订单明细行 * @param scOrderBEntityList U8C委外订单明细行
* @author liuyang * @author liuyang
*/ */
private ScOrderBEntity findOfsPoOrderDetailAndU8cPoOrderDetail(StockinOrderSearchResponse.StockinOrder.StockinB stockinB, OfsPoOrderData ofsPoOrderData, List<ScOrderBEntity> scOrderBEntityList) { // private ScOrderBEntity findOfsPoOrderDetailAndU8cPoOrderDetail(StockinOrderSearchResponse.StockinOrder.StockinB stockinB, OfsPoOrderData ofsPoOrderData, List<ScOrderBEntity> scOrderBEntityList) {
Assert.notNull(stockinB, "stockinB不能为空"); // Assert.notNull(stockinB, "stockinB不能为空");
Assert.notNull(ofsPoOrderData, "ofsPoOrderData不能为空"); // Assert.notNull(ofsPoOrderData, "ofsPoOrderData不能为空");
Assert.notNull(scOrderBEntityList, "scOrderBEntityList删除不能为空"); // Assert.notNull(scOrderBEntityList, "scOrderBEntityList删除不能为空");
//
// OfsPoOrderHeader header = ofsPoOrderData.getHeader(); //// OfsPoOrderHeader header = ofsPoOrderData.getHeader();
List<OfsPoOrderDetails> details = ofsPoOrderData.getDetails(); // List<OfsPoOrderDetails> details = ofsPoOrderData.getDetails();
//
//查找采购订单明细行 // //查找采购订单明细行
OfsPoOrderDetails tarGetOfsPoOrderDetails = null; // OfsPoOrderDetails tarGetOfsPoOrderDetails = null;
for (int i = 0; i < details.size(); i++) { // for (int i = 0; i < details.size(); i++) {
OfsPoOrderDetails ofsPoOrderDetails = details.get(i); // OfsPoOrderDetails ofsPoOrderDetails = details.get(i);
if (ofsPoOrderDetails.getId().equals(stockinB.getRefOrderDetailId())) { // if (ofsPoOrderDetails.getId().equals(stockinB.getRefOrderDetailId())) {
tarGetOfsPoOrderDetails = ofsPoOrderDetails; // tarGetOfsPoOrderDetails = ofsPoOrderDetails;
} // }
} // }
Assert.notNull(tarGetOfsPoOrderDetails, "无法匹配到采购订单明细行! 目标主键:{}", stockinB.getRefOrderDetailId()); // Assert.notNull(tarGetOfsPoOrderDetails, "无法匹配到采购订单明细行! 目标主键:{}", stockinB.getRefOrderDetailId());
//
//根据采购订单明细行主键查找U8C采购订单明细行 // //根据采购订单明细行主键查找U8C采购订单明细行
for (int i = 0; i < scOrderBEntityList.size(); i++) { // for (int i = 0; i < scOrderBEntityList.size(); i++) {
ScOrderBEntity scOrderBEntity = scOrderBEntityList.get(i); // ScOrderBEntity scOrderBEntity = scOrderBEntityList.get(i);
Assert.notNull(scOrderBEntity.getVdef20(), "委外订单明细行v20不能为空(明细行v20存储O采购订单明细行主键)"); // Assert.notNull(scOrderBEntity.getVdef20(), "委外订单明细行v20不能为空(明细行v20存储O采购订单明细行主键)");
Assert.state(!"".equals(scOrderBEntity.getVdef20()), "委外订单明细行v20不能为空(明细行v20存储O采购订单明细行主键)"); // Assert.state(!"".equals(scOrderBEntity.getVdef20()), "委外订单明细行v20不能为空(明细行v20存储O采购订单明细行主键)");
if (tarGetOfsPoOrderDetails.getId().equals(scOrderBEntity.getVdef20())) { // if (tarGetOfsPoOrderDetails.getId().equals(scOrderBEntity.getVdef20())) {
return scOrderBEntity; // return scOrderBEntity;
} // }
} // }
Assert.state(false, "通过U8C采购订单明细行主键层层匹配到U8C采购明细失败"); // Assert.state(false, "通过U8C采购订单明细行主键层层匹配到U8C采购明细失败");
return null; // return null;
} // }
/** /**
* 匹配U8C采购订单明细行 * 匹配U8C采购订单明细行
@ -617,19 +738,19 @@ public class ConsignmachiningIn extends PluginBaseEntity {
* @param param 原数据json * @param param 原数据json
* @author liuyang * @author liuyang
*/ */
public IcGeneralHResultDto sendU8cConsignmachiningIn(String param) throws Exception { public IcGeneralHResultDto sendU8cScorder(String param) throws Exception {
long startLong = System.currentTimeMillis(); long startLong = System.currentTimeMillis();
logger.info("U8C委外入库推送开始,推送参数:" + param + ",U8C_URL:" + ProfilesActiveConstant.U8C_URL); logger.info("U8C委外订单推送开始,推送参数:" + param + ",U8C_URL:" + ProfilesActiveConstant.U8C_URL);
String result = HttpRequest.post(ProfilesActiveConstant.U8C_URL).header("appId", "800037")//头信息多个头信息多次调用此方法即可 String result = HttpRequest.post(ProfilesActiveConstant.U8C_URL).header("appId", "800037")//头信息多个头信息多次调用此方法即可
.header("usercode", "admin").header("password", "21232f297a57a5a743894a0e4a801fc3").header("system", "lz").header("trantype", "PK").header("apiCode", "8000370056")//头信息多个头信息多次调用此方法即可 .header("usercode", "admin").header("password", "21232f297a57a5a743894a0e4a801fc3").header("system", "lz").header("trantype", "PK").header("apiCode", "8000370037")//头信息多个头信息多次调用此方法即可
.header("publicKey", "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj")//头信息多个头信息多次调用此方法即可 .header("publicKey", "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj")//头信息多个头信息多次调用此方法即可
.header("secretKey", "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//头信息多个头信息多次调用此方法即可 .header("secretKey", "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//头信息多个头信息多次调用此方法即可
.body(param)//表单内容 .body(param)//表单内容
.timeout(20000)//超时毫秒 .timeout(20000)//超时毫秒
.execute().body(); .execute().body();
logger.info("U8C委外入库推送结束,返回参数:" + result); logger.info("U8C委外订单推送结束,返回参数:" + result);
long endLong = System.currentTimeMillis(); long endLong = System.currentTimeMillis();
logger.info("U8C委外入库推送耗时:" + (endLong - startLong)); logger.info("U8C委外订单推送耗时:" + (endLong - startLong));
if (result == null) { if (result == null) {
result = ""; result = "";
@ -672,4 +793,49 @@ public class ConsignmachiningIn extends PluginBaseEntity {
} }
return null; return null;
} }
/**
* 查询BOM版本版本最新的在返回的结果集的最前面
*
* @param gcbm 工厂主键
* @param wlbmid 物料编码id经过测试这是存货基本档案主键
*/
private List<BdBomEntity> getBomVersion(String gcbm, String wlbmid) throws Exception {
Assert.notNull(gcbm, "gcbm工厂主键");
Assert.notNull(wlbmid, "wlbmid物料编码id不能为空");
BdBomEntity bdBomEntity = new BdBomEntity();
bdBomEntity.setDataSourceCode("lets_u8c");
bdBomEntity.setWlbmid(wlbmid);
bdBomEntity.setGcbm(gcbm);
List<BdBomEntity> bdBomEntityList = iBdBomDao.query(bdBomEntity);
//2024年9月2日 15:08:30 等待妮姐确认如果对应的存货没有BOM是否抛出异常
//2024年9月2日 15:14:18 已经和妮姐确认如果存货对应的BOM不存在则抛出异常
if (bdBomEntityList == null || bdBomEntityList.size() == 0) {
Assert.state(false, "存货:{} 工厂(库存足足){}对应的BOM不存在(该存货需要维护BOM)!");
}
return bdBomEntityList;
}
/**
* 2024年8月7日 10:25:29
* 查询基础档案根据公司管理档案主键查询
*
* @author liuyang
*/
private BdInvbasdocEntity queryStockBasicArchives(String pkInvmandoc, String pkCorp) throws Exception {
Assert.notNull(pkInvmandoc, "存货管理档案不能为空");
Assert.notNull(pkCorp, "公司档案不能为空");
BdInvbasdocEntity bdInvbasdocEntity = new BdInvbasdocEntity();
bdInvbasdocEntity.setPk_invmandoc(pkInvmandoc);
bdInvbasdocEntity.setPk_corp(pkCorp);
List<BdInvbasdocEntity> bdInvbasdocEntity2 = iBdInvbasdocDao.queryBdInvbasdocByPkInvmandocV2(bdInvbasdocEntity);
if (bdInvbasdocEntity2.size() == 0) {
Assert.state(false, "根据存货管理档案主键{}和公司档案主键{}没有查询到U8C基础档案", pkInvmandoc, pkCorp);
} else if (bdInvbasdocEntity2.size() >= 2) {
Assert.state(false, "根据存货管理档案主键{}和公司档案主键{}没有查询到U8C基础档案", pkInvmandoc, pkCorp);
}
return bdInvbasdocEntity2.get(0);
}
} }

View File

@ -0,0 +1,675 @@
package com.hzya.frame.plugin.lets.plugin.outsourc;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.beanutil.BeanUtil;
import com.hzya.frame.plugin.lets.constant.ProfilesActiveConstant;
import com.hzya.frame.plugin.lets.dao.*;
import com.hzya.frame.plugin.lets.entity.*;
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo;
import com.hzya.frame.plugin.lets.u8cdto.*;
import com.hzya.frame.plugin.lets.util.OfsStandardUtil;
import com.hzya.frame.plugin.lets.util.OnlyImplementProxyOrderUtil;
import com.hzya.frame.plugin.lets.util.QueryBdBusitypeUtil;
import com.hzya.frame.plugin.lets.util.RdclUtil;
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderData;
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderDetails;
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderHeader;
import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import java.math.BigDecimal;
import java.util.*;
/**
* O采购入库 -> U8C委外加工入库
*
* @Authorliuyang
* @Packagecom.hzya.frame.plugin.lets.plugin.outsourc
* @ProjectkangarooDataCenterV3
* @nameConsignmachiningIn
* @Date2024年8月26日 10:23:20
* @FilenameConsignmachiningIn
*/
public class ConsignmachiningIn extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(ConsignmachiningIn.class);
@Autowired
private QueryBdBusitypeUtil queryBdBusitypeUtil;
@Autowired
private IBdCorpDao iBdCorpDao;
@Autowired
private IBdInvmandocDao iBdInvmandocDao;
@Autowired
private IBdCalbodyDao iBdCalbodyDao;
@Autowired
private IBdStordocDao iBdStordocDao;
@Autowired
private RdclUtil rdclUtil;
@Autowired
private OfsStandardUtil ofsStandardUtil;
@Autowired
private IScOrderDao iScOrderDao;
@Autowired
private IScOrderBDao iScOrderBDao;
@Autowired
private OnlyImplementProxyOrderUtil onlyImplementProxyOrder;
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
@Override
public String getPluginId() {
return "com.hzya.frame.plugin.lets.plugin.outsourc.ConsignmachiningIn";
}
@Override
public String getPluginName() {
return "OFS采购入库单生成U8C委外加工入库(委外采购入库)";
}
@Override
public String getPluginLabel() {
return "OFS采购入库单生成U8C委外加工入库(委外采购入库)";
}
@Override
public String getPluginType() {
return "3";
}
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
return null;
}
/**
* 根据单号查询
*
* @author liuyang
*/
public void startImplement(String startTime, String endTime) {
String threadNameStrStart = StrUtil.format("开始委外采购OFS采购入库单生成U8C委外加工入库 开始时间:{} 结束时间:{}", startTime, endTime);
logger.info(threadNameStrStart);
Thread thread = new Thread(new Runnable() {
@Override
public void run() {
try {
List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList = new ArrayList<>();
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
queryOfsSoSaleOutVo.setClosedAt_start(startTime);
queryOfsSoSaleOutVo.setClosedAt_end(endTime);
queryOfsSoSaleOutVo.setClientCode("LETS");
queryOfsSoSaleOutVo.setPageNo(1L);
queryOfsSoSaleOutVo.setPageSize(50L);
queryOfsSoSaleOutVo.setInternalInstructionType("PURCHASE");
queryOfsSoSaleOutVo.setStatus(900L);
ofsStandardUtil.queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoArrayList, 1L, "ofs.receipt.search");
logger.info("数据返回行数:{}", returnGoodHeaderDetailsDataDtoArrayList.size());
if (returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
getSet(returnGoodHeaderDetailsDataDtoArrayList);
} else {
logger.info("没有查询到任何数据!不需要同步");
}
} catch (Exception e) {
logger.error("startImplement方法抛出异常", e);
}
}
}, threadNameStrStart);
thread.start();
try {
thread.join();
} catch (Exception e) {
logger.error("thread.join()异常", e);
}
String threadNameStrEnd = StrUtil.format("结束委外采购OFS采购入库单生成U8C委外加工入库 开始时间:{} 结束时间:{}", startTime, endTime);
logger.info(threadNameStrEnd);
}
/**
* 根据单号查询
*
* @author liuyang
*/
public void startImplement(String code) {
String threadNameStrStart = StrUtil.format("开始委外采购OFS采购入库单生成U8C委外加工入库 OFS采购入库单号{}", code);
logger.info(threadNameStrStart);
Thread thread = new Thread(new Runnable() {
@Override
public void run() {
try {
List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList = new ArrayList<>();
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
queryOfsSoSaleOutVo.setClientCode("LETS");
queryOfsSoSaleOutVo.setPageNo(1L);
queryOfsSoSaleOutVo.setPageSize(50L);
queryOfsSoSaleOutVo.setCode(code);
queryOfsSoSaleOutVo.setInternalInstructionType("PURCHASE");
queryOfsSoSaleOutVo.setStatus(900L);
ofsStandardUtil.queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoArrayList, 1L, "ofs.receipt.search");
logger.info("数据返回行数:{}", returnGoodHeaderDetailsDataDtoArrayList.size());
if (returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
getSet(returnGoodHeaderDetailsDataDtoArrayList);
} else {
logger.info("没有查询到任何数据!不需要同步");
}
} catch (Exception e) {
logger.error("startImplement方法抛出异常", e);
}
}
}, threadNameStrStart);
thread.start();
try {
thread.join();
} catch (Exception e) {
logger.error("thread.join()异常", e);
}
String threadNameStrEnd = StrUtil.format("结束委外采购OFS采购入库单生成U8C委外加工入库 OFS采购入库单号{}", code);
logger.info(threadNameStrEnd);
}
/**
* 环境预配置
*
* @param returnGoodHeaderDetailsDataDtoArrayList 采购入库单
* @author liuyang
*/
private void getSet(List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList) throws Exception {
//过滤成功的数据
List<StockinOrderSearchResponse.StockinOrder> stockinOrderList = filterData(returnGoodHeaderDetailsDataDtoArrayList);
//执行推送主逻辑
implement(stockinOrderList);
}
/**
* 过滤掉成功的数据
*
* @author liuyang
*/
private List<StockinOrderSearchResponse.StockinOrder> filterData(List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList) {
List<StockinOrderSearchResponse.StockinOrder> headerDetailsDtoList1 = new ArrayList<>();
if (returnGoodHeaderDetailsDataDtoArrayList != null && returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
//TODO 出库单明细主键需要O返回目前没有已经提需求
headerDetailsDtoList1.addAll(returnGoodHeaderDetailsDataDtoArrayList);
}
return headerDetailsDtoList1;
}
/**
* 执行主逻辑
*
* @author liuyang
*/
private void implement(List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoList) throws Exception {
if (returnGoodHeaderDetailsDataDtoList != null && returnGoodHeaderDetailsDataDtoList.size() > 0) {
try {
// 查询基本档案
List<ConsignmachiningInSonDto> consignmachiningInSonDtos = queryBasicArchives(returnGoodHeaderDetailsDataDtoList);
// 查询采购收发类别
BdRdclEntity bdRdclEntity = rdclUtil.queryRdClObject("105");
if (consignmachiningInSonDtos != null && consignmachiningInSonDtos.size() > 0) {
for (int i = 0; i < consignmachiningInSonDtos.size(); i++) {
ConsignmachiningInSonDto consignmachiningInSonDto = consignmachiningInSonDtos.get(i);
// StockinOrderSearchResponse.StockinOrder.StockinH header = consignmachiningInSonDto.getHeader();
List<StockinOrderSearchResponse.StockinOrder.StockinB> details = consignmachiningInSonDto.getDetails();
String generateBusinessDate = createGenerateBusinessDate(consignmachiningInSonDto); //生成业务日期
OfsPoOrderData ofsPoOrderData = consignmachiningInSonDto.getOfsPoOrderData();//OFS采购订单
ScOrderEntity scOrderEntity = consignmachiningInSonDto.getScOrderEntity();//U8C委外订单
BdCorpEntity bdCorpEntity = consignmachiningInSonDto.getBdCorpEntity();//公司
BdCalbodyEntity bdCalbodyEntity = consignmachiningInSonDto.getBdCalbodyEntity();//库存组织
BdStordocEntity bdStordocEntity = consignmachiningInSonDto.getBdStordocEntity();//仓库
// StockinOrderSearchResponse.StockinOrder.StockinH header1 = consignmachiningInSonDto.getHeader();
List<StockinOrderSearchResponse.StockinOrder.StockinB> details1 = consignmachiningInSonDto.getDetails();//OFS采购入库单
List<ScOrderBEntity> scOrderBEntityList = consignmachiningInSonDto.getScOrderBEntityList();//U8C委外订单明细行主键
OfsPoOrderHeader ofsPoOrderDataHeader = ofsPoOrderData.getHeader();
List<OfsPoOrderDetails> ofsPoOrderDataDetails = ofsPoOrderData.getDetails();
// 代理委外入库业务流程
BdBusitypeEntity bdBusitypeEntity = u8cOperationFlow(bdCorpEntity.getPkCorp());
//委外入库表头
ConsignmachiningInHeadDto poOrderParentDto = new ConsignmachiningInHeadDto();
poOrderParentDto.setPk_corp(bdCorpEntity.getPkCorp());
poOrderParentDto.setCoperatorid("0001A110000000000U3D");
poOrderParentDto.setCwarehouseid(bdStordocEntity.getPkStordoc());
poOrderParentDto.setPk_calbody(bdCalbodyEntity.getPkCalbody());
poOrderParentDto.setCbiztype(bdBusitypeEntity.getPkBusitype());
poOrderParentDto.setCdispatcherid(bdRdclEntity.getPkRdcl());//收发类别
poOrderParentDto.setDbilldate(generateBusinessDate);//入库日期
//委外入库表头明细行
List<ConsignmachiningInBodyDto> consignmachiningInBodyDtoArrayList = new ArrayList<>();
for (int j = 0; j < details.size(); j++) {
StockinOrderSearchResponse.StockinOrder.StockinB stockinB = details.get(j);
//匹配U8C采购订单明细行
ScOrderBEntity u8cPoOrderDetail = findOfsPoOrderDetailAndU8cPoOrderDetail(stockinB, ofsPoOrderData, scOrderBEntityList);
//通过O采购订单入库单明细行联查OFS采购订单明细行
OfsPoOrderDetails ofsPoOrderDetailRowTraget = findOfsPoOrderDetailRowTraget(stockinB, ofsPoOrderData);
//查询存货管理档案
BdInvmandocEntity bdInvmandocEntity = queryInventoryMan(stockinB, bdCorpEntity.getPkCorp());
//计算含税单价
BigDecimal noriginalcurprice = null;
String receivedQty = stockinB.getReceivedQty();//实收数量
String fulfillAmount = ofsPoOrderDetailRowTraget.getFulfillAmount();//实收累计总金额
try {
noriginalcurprice = new BigDecimal(fulfillAmount).divide(new BigDecimal(receivedQty), 20, BigDecimal.ROUND_HALF_UP).setScale(4, BigDecimal.ROUND_HALF_UP);
} catch (Exception e) {
logger.error("计算采购入库单原币含税单价失败", e);
Assert.state(false, "计算采购入库单原币含税单价失败 原因:{}", e.getMessage());
}
ConsignmachiningInBodyDto consignmachiningInBodyDto = new ConsignmachiningInBodyDto();
consignmachiningInBodyDto.setCinventoryid(bdInvmandocEntity.getPkInvmandoc());//存货
//TODO 测试
consignmachiningInBodyDto.setNinnum("1");
// consignmachiningInBodyDto.setNinnum(new BigDecimal(stockinB.getReceivedQty()).stripTrailingZeros().toPlainString());//实收数量
consignmachiningInBodyDto.setNprice(noriginalcurprice.stripTrailingZeros().toPlainString());//单价(含税单价)
consignmachiningInBodyDto.setCsourcetype("61");//来源单据类型
consignmachiningInBodyDto.setVsourcerowno(u8cPoOrderDetail.getCrowno());//来源单据行号
consignmachiningInBodyDto.setVsourcebillcode(scOrderEntity.getVordercode());//来源单据号
consignmachiningInBodyDto.setWriteofftype("按备料发料核销");//核销方式
consignmachiningInBodyDtoArrayList.add(consignmachiningInBodyDto);
}
List<ConsignmachiningInHeadBodyDto> consignmachiningInHeadBodyDtoArrayList = new ArrayList<>();
ConsignmachiningInHeadBodyDto consignmachiningInHeadBodyDto = new ConsignmachiningInHeadBodyDto();
consignmachiningInHeadBodyDto.setParentvo(poOrderParentDto);
consignmachiningInHeadBodyDto.setChildrenvo(consignmachiningInBodyDtoArrayList);
consignmachiningInHeadBodyDtoArrayList.add(consignmachiningInHeadBodyDto);
Map<String, List<ConsignmachiningInHeadBodyDto>> stringStringMap = new HashMap<>();
stringStringMap.put("GeneralBillVO", consignmachiningInHeadBodyDtoArrayList);
//TODO 2024年8月26日 14:41:46 委外入库核销方式传不了!已经提交总部
//TODO 2024年8月26日 14:42:19 无法超委外订单数量入库!已经提交给总部
IcGeneralHResultDto icGeneralHResultDto = sendU8cConsignmachiningIn(JSON.toJSONString(stringStringMap));
String cgeneralhid = null;
String vbillcode = null;
IcGeneralHResultHeadDto parentvo = icGeneralHResultDto.getParentvo();
List<IcGeneralHResultBodyDto> childrenvo = icGeneralHResultDto.getChildrenvo();
if (parentvo != null) {
cgeneralhid = parentvo.getCgeneralhid();
}
if (childrenvo != null) {
vbillcode = parentvo.getVbillcode();
}
logger.info("推送U8C委外入库成功委外入库单主键{} 委外入库单编码:{}", cgeneralhid, vbillcode);
}
} else {
logger.info("poOrderSonDto.size为0");
}
} catch (Exception e) {
logger.error("implement方法抛出异常", e);
}
}
}
/**
* 档案转换(OFS->U8C)
* 2024年8月23日 12:02:47 和妮姐沟通单据流程U8C成品委外订单 -> 备料计划 -> U8C委外发料(核销)
*
* @author liuyang
*/
private List<ConsignmachiningInSonDto> queryBasicArchives(List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoList) {
List<ConsignmachiningInSonDto> consignmachiningInSonDtoArrayList = new ArrayList<>();
if (returnGoodHeaderDetailsDataDtoList != null && returnGoodHeaderDetailsDataDtoList.size() > 0) {
try {
for (int i = 0; i < returnGoodHeaderDetailsDataDtoList.size(); i++) {
StockinOrderSearchResponse.StockinOrder stockinOrder = returnGoodHeaderDetailsDataDtoList.get(i);
StockinOrderSearchResponse.StockinOrder.StockinH header = stockinOrder.getHeader();
List<StockinOrderSearchResponse.StockinOrder.StockinB> details = stockinOrder.getDetails();
//2024年8月25日 09:54:31 查询OFS采购订单
OfsPoOrderData ofsPoOrderData = ofsStandardUtil.queryOfsPoOrder(header.getRefOrderCode());
Assert.notNull(ofsPoOrderData, "无法查询到委外订单(OFS采购入库单->OSF采购订单->OFS采购订单主键->U8C委外订单自定义项20)");
OfsPoOrderHeader ofsPoOrderDataHeader = ofsPoOrderData.getHeader();
List<OfsPoOrderDetails> ofsPoOrderDataDetails = ofsPoOrderData.getDetails();
//如果该O采购订单对应的类型为委外加工则继续代码逻辑否则就跳过代码逻辑
boolean checkResult = onlyImplementProxyOrder.onlyImplementProxyOrder(ofsPoOrderData, "WWJG");
if (!checkResult) {
continue;
}
//2024年8月25日 09:42:58 查询委外订单,如果这一步报错,后续的逻辑就没有必要执行了
String ofsId = ofsPoOrderDataHeader.getId();
Assert.notNull(ofsId, "通过接口查询到OFS采购订单但是没有采购订单主键业务逻辑无法完成");
ScOrderEntity scOrderEntity = queryScOrder(ofsId);
//2024年8月25日 14:15:45 根据委外订单id查询委外订单表体明细行
List<ScOrderBEntity> scOrderBEntityList = queryScOrderDetail(scOrderEntity.getCorderid());
//2024年8月25日 10:09:20 委外入库公司取委外订单上的公司已经和妮姐确认没有必要通过O的公司转换因为不存在跨组织的问题
Assert.notNull(scOrderEntity.getPkCorp(), "O表头公司不能为空");
BdCorpEntity bdCorpEntity = new BdCorpEntity();
bdCorpEntity.setDr(0);
bdCorpEntity.setDataSourceCode("lets_u8c");
bdCorpEntity.setPkCorp(scOrderEntity.getPkCorp());
List<BdCorpEntity> bdCorpEntityList = iBdCorpDao.query(bdCorpEntity);
if (bdCorpEntityList.size() == 0) {
Assert.state(false, "根据委外订单公司主键:{},无法匹配到委外入库单", scOrderEntity.getPkCorp());
} else if (bdCorpEntityList.size() >= 2) {
Assert.state(false, "根据委外订单公司主键:{},匹配到{}个委外入库单", scOrderEntity.getPkCorp(), bdCorpEntityList.size());
}
// 2024年8月20日 23:51:56 收货库存组织,应该是通过收货公司查询得出收货库存组织,目前收货公司和采购公司保持一致,那么就以采购公司带出!这个逻辑已经和佳妮确认
BdCalbodyEntity bdCalbodyEntity = new BdCalbodyEntity();
bdCalbodyEntity.setDr(0);
bdCalbodyEntity.setDataSourceCode("lets_u8c");
bdCalbodyEntity.setPkCorp(bdCorpEntityList.get(0).getPkCorp());
List<BdCalbodyEntity> bdCalbodyEntities = iBdCalbodyDao.query(bdCalbodyEntity);
if (bdCalbodyEntities.size() == 0) {
Assert.state(false, "根据U8C采购公司{}无法匹配到U8C发货库存组织", bdCorpEntityList.get(0).getPkCorp());
} else if (bdCalbodyEntities.size() >= 2) {
Assert.state(false, "根据U8C采购公司{}匹配到U8C发货库存组织{}个", bdCorpEntityList.get(0).getPkCorp(), bdCalbodyEntities.size());
}
//入库仓库
String facilityCode = header.getFacilityCode();
Assert.notNull(facilityCode, "O售后入库单仓库facilityCode字段不能为空");
BdStordocEntity bdStordocEntity = new BdStordocEntity();
bdStordocEntity.setDr(0L);
bdStordocEntity.setDataSourceCode("lets_u8c");
bdStordocEntity.setPkCalbody(bdCalbodyEntities.get(0).getPkCalbody());
bdStordocEntity.setStorcode(facilityCode);
List<BdStordocEntity> bdStordocEntityList = iBdStordocDao.query(bdStordocEntity);
if (bdStordocEntityList.size() == 0) {
Assert.state(false, "根据O仓库编码+U8C收货库存组织主键无法匹配到U8C仓库", facilityCode, bdCalbodyEntities.get(0).getPkCalbody());
} else if (bdStordocEntityList.size() >= 2) {
Assert.state(false, "根据O仓库编码+U8C收货库存组织主键匹配到U8C仓库多个", facilityCode, bdCalbodyEntities.get(0).getPkCalbody());
}
ConsignmachiningInSonDto consignmachiningInSonDto = new ConsignmachiningInSonDto();
consignmachiningInSonDto.setOfsPoOrderData(ofsPoOrderData);
consignmachiningInSonDto.setScOrderEntity(scOrderEntity);
consignmachiningInSonDto.setBdCorpEntity(bdCorpEntityList.get(0));
consignmachiningInSonDto.setBdCalbodyEntity(bdCalbodyEntities.get(0));
consignmachiningInSonDto.setBdStordocEntity(bdStordocEntityList.get(0));
// consignmachiningInSonDto.setHeader(header);
consignmachiningInSonDto.setScOrderBEntityList(scOrderBEntityList);
consignmachiningInSonDto.setDetails(details);
BeanUtil.copyPropertiesV2(header, consignmachiningInSonDto);
consignmachiningInSonDtoArrayList.add(consignmachiningInSonDto);
}
//成功
} catch (Exception e) {
logger.error("委外入库OFS档案转换", e);
//失败
}
} else {
logger.info("queryBasicArchives对应returnGoodHeaderDetailsDataDtoList.size为0");
}
return consignmachiningInSonDtoArrayList;
}
/**
* 查询委外订单表头对象
*
* @author liuyang
*/
private ScOrderEntity queryScOrder(String ofsPoOrderId) {
Assert.notNull(ofsPoOrderId, "ofsPoOrderId不能为空!");
Assert.state(!"".equals(ofsPoOrderId.trim()), "ofsPoOrderId不能为空");
ScOrderEntity scOrderEntity = new ScOrderEntity();
scOrderEntity.setVdef20(ofsPoOrderId);
scOrderEntity.setDr("0");
scOrderEntity.setDataSourceCode("lets_u8c");
List<ScOrderEntity> scOrderEntityList = iScOrderDao.query(scOrderEntity);
if (scOrderEntityList == null || scOrderEntityList.size() == 0) {
Assert.state(false, "根据O采购订单主键:{}(u委外订单自定义项20存储O采购订单主键)无法匹配到U8C委外订单", ofsPoOrderId);
} else if (scOrderEntityList.size() >= 2) {
Assert.state(false, "根据O采购订单主键:{}(u委外订单自定义项20存储O采购订单主键),匹配到{}个U8C委外订单", ofsPoOrderId, scOrderEntityList.size());
}
return scOrderEntityList.get(0);
}
/**
* 2024年8月25日 14:11:31 查询U8C委外订单明细
*
* @param corderid 委外订单表头主键
* @author liuyang
*/
private List<ScOrderBEntity> queryScOrderDetail(String corderid) throws Exception {
Assert.notNull(corderid, "委外订单表头主键不能为空!");
Assert.state(!"".equals(corderid), "委外订单表头主键不能为空!");
ScOrderBEntity scOrderBEntity = new ScOrderBEntity();
scOrderBEntity.setCorderid(corderid);
scOrderBEntity.setDr("0");
scOrderBEntity.setDataSourceCode("lets_u8c");
List<ScOrderBEntity> scOrderBEntityList = iScOrderBDao.query(scOrderBEntity);
if (scOrderBEntityList == null || scOrderBEntityList.size() == 0) {
//2024年8月25日 14:16:31 这个验证非常要必要,单据如果没有表体没有行,是很可疑的
Assert.state(false, "根据U8C委外订单主键({})无法查询到委外订单表体明细行!", corderid);
}
return scOrderBEntityList;
}
/**
* 2024年8月6日 10:59:03 查询U8C业务流程
*
* @param pkCorp 公司主键
* @author liuyang
*/
private BdBusitypeEntity u8cOperationFlow(String pkCorp) throws Exception {
Assert.notNull(pkCorp, "公司主键不能为空!");
Assert.state(!"".equals(pkCorp.trim()), "公司主键不能为空!");
//查询业务流程
//2024年8月6日 11:33:07 具体的业务流程名称,还需要实施提供
String processName = "委外加工";
BdBusitypeEntity bdBusitypeEntity = queryBdBusitypeUtil.queryBdBusitype(processName);
Assert.notNull(bdBusitypeEntity, "根据业务流程名称({})没有查询到业务流程", processName);
return bdBusitypeEntity;
}
/**
* 2024年8月20日 15:46:10
* 生成业务日期,以发货时间作为业务日期
*
* @author liuyang
*/
private String createGenerateBusinessDate(ConsignmachiningInSonDto consignmachiningInSonDto) {
//TODO 测试
consignmachiningInSonDto.setShipAt("2024-08-19");
if (consignmachiningInSonDto != null && consignmachiningInSonDto.getShipAt() != null) {
String shipAt = consignmachiningInSonDto.getShipAt();
String businessFormat = null;
try {
Date dbill = DateUtil.parse(shipAt);
businessFormat = DateUtil.format(dbill, "yyyy-MM-dd");
} catch (Exception e) {
logger.error("业务日期生成失败", e);
}
return businessFormat;
} else {
logger.error("生成采购订单入库日期失败或者shipAt为空! json{}", JSON.toJSON(consignmachiningInSonDto));
Assert.state(false, "生成采购订单入库日期失败或者shipAt为空! json{}", JSON.toJSON(consignmachiningInSonDto));
return null;
}
}
/**
* 匹配U8C采购订单明细行
* 通过O采购入库单明细行得到采购订单明细行最后查找到U8C采购订单明细行
*
* @param stockinB OFS采购入库单明细行
* @param ofsPoOrderData OFS采购订单
* @param scOrderBEntityList U8C委外订单明细行
* @author liuyang
*/
private ScOrderBEntity findOfsPoOrderDetailAndU8cPoOrderDetail(StockinOrderSearchResponse.StockinOrder.StockinB stockinB, OfsPoOrderData ofsPoOrderData, List<ScOrderBEntity> scOrderBEntityList) {
Assert.notNull(stockinB, "stockinB不能为空");
Assert.notNull(ofsPoOrderData, "ofsPoOrderData不能为空");
Assert.notNull(scOrderBEntityList, "scOrderBEntityList删除不能为空");
// OfsPoOrderHeader header = ofsPoOrderData.getHeader();
List<OfsPoOrderDetails> details = ofsPoOrderData.getDetails();
//查找采购订单明细行
OfsPoOrderDetails tarGetOfsPoOrderDetails = null;
for (int i = 0; i < details.size(); i++) {
OfsPoOrderDetails ofsPoOrderDetails = details.get(i);
if (ofsPoOrderDetails.getId().equals(stockinB.getRefOrderDetailId())) {
tarGetOfsPoOrderDetails = ofsPoOrderDetails;
}
}
Assert.notNull(tarGetOfsPoOrderDetails, "无法匹配到采购订单明细行! 目标主键:{}", stockinB.getRefOrderDetailId());
//根据采购订单明细行主键查找U8C采购订单明细行
for (int i = 0; i < scOrderBEntityList.size(); i++) {
ScOrderBEntity scOrderBEntity = scOrderBEntityList.get(i);
Assert.notNull(scOrderBEntity.getVdef20(), "委外订单明细行v20不能为空(明细行v20存储O采购订单明细行主键)");
Assert.state(!"".equals(scOrderBEntity.getVdef20()), "委外订单明细行v20不能为空(明细行v20存储O采购订单明细行主键)");
if (tarGetOfsPoOrderDetails.getId().equals(scOrderBEntity.getVdef20())) {
return scOrderBEntity;
}
}
Assert.state(false, "通过U8C采购订单明细行主键层层匹配到U8C采购明细失败");
return null;
}
/**
* 匹配U8C采购订单明细行
* 通过O采购入库单明细行得到采购订单明细行最后查找到U8C采购订单明细行
*
* @param stockinB OFS采购入库单明细行
* @param ofsPoOrderData OFS采购订单
* @author liuyang
*/
private OfsPoOrderDetails findOfsPoOrderDetailRowTraget(StockinOrderSearchResponse.StockinOrder.StockinB stockinB, OfsPoOrderData ofsPoOrderData) {
Assert.notNull(stockinB, "stockinB不能为空");
Assert.notNull(ofsPoOrderData, "ofsPoOrderData不能为空");
List<OfsPoOrderDetails> details = ofsPoOrderData.getDetails();
for (int i = 0; i < details.size(); i++) {
OfsPoOrderDetails ofsPoOrderDetails = details.get(i);
if (ofsPoOrderDetails.getId().equals(stockinB.getRefOrderDetailId())) {
return ofsPoOrderDetails;
}
}
Assert.state(false, "通过OFS采购入库单无法匹配到OFS采购订单明细行 目标主键:{}", stockinB.getRefOrderDetailId());
return null;
}
/**
* 查询存货管理档案
*
* @param pkCorp 发货公司主键
* @param stockinB 采购入库单明细行
* @author liuyang
*/
private BdInvmandocEntity queryInventoryMan(StockinOrderSearchResponse.StockinOrder.StockinB stockinB, String pkCorp) throws Exception {
Assert.notNull(stockinB, "sonDetailsDto不能为空");
Assert.notNull(stockinB.getSkuCode(), "O存货商家编码不能为空");
Assert.notNull(pkCorp, "发货公司主键不能为空");
BdInvmandocEntity bdInvmandocEntity = new BdInvmandocEntity();
bdInvmandocEntity.setInvcode(stockinB.getSkuCode());
bdInvmandocEntity.setPkCorp(pkCorp);
List<BdInvmandocEntity> bdInvmandocEntity2 = iBdInvmandocDao.queryBdInvmandocByInvcodeList(bdInvmandocEntity);
if (bdInvmandocEntity2.size() == 0) {
Assert.state(false, "根据O商家编码{} U8C发货公司主键{}没有查询到存货管理档案", stockinB.getSkuCode(), pkCorp);
} else if (bdInvmandocEntity2.size() >= 2) {
Assert.state(false, "根据O商家编码{} U8C发货公司主键{}没有查询到存货管理档案", stockinB.getSkuCode(), pkCorp);
}
return bdInvmandocEntity2.get(0);
}
/**
* 2024年8月25日 15:12:22
* 推送U8C委外入库单
*
* @param param 原数据json
* @author liuyang
*/
public IcGeneralHResultDto sendU8cConsignmachiningIn(String param) throws Exception {
long startLong = System.currentTimeMillis();
logger.info("U8C委外入库推送开始推送参数" + param + ",U8C_URL:" + ProfilesActiveConstant.U8C_URL);
String result = HttpRequest.post(ProfilesActiveConstant.U8C_URL).header("appId", "800037")//头信息,多个头信息多次调用此方法即可
.header("usercode", "admin").header("password", "21232f297a57a5a743894a0e4a801fc3").header("system", "lz").header("trantype", "PK").header("apiCode", "8000370056")//头信息,多个头信息多次调用此方法即可
.header("publicKey", "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj")//头信息,多个头信息多次调用此方法即可
.header("secretKey", "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//头信息,多个头信息多次调用此方法即可
.body(param)//表单内容
.timeout(20000)//超时,毫秒
.execute().body();
logger.info("U8C委外入库推送结束返回参数" + result);
long endLong = System.currentTimeMillis();
logger.info("U8C委外入库推送耗时" + (endLong - startLong));
if (result == null) {
result = "";
}
JSONObject jsonObject = JSON.parseObject(result);
result = String.valueOf(jsonObject.get("attribute"));
boolean isSuccess = false;
IcGeneralHResultDto icGeneralHResultDto = null;
if (result != null && !"".equals(result)) {
ReusltStrDto reusltStrDto = JSON.parseObject(result, ReusltStrDto.class);
if ("success".equals(reusltStrDto.getStatus())) {
icGeneralHResultDto = resultDataHandle(reusltStrDto.getData());
isSuccess = true;
}
}
if (!isSuccess) {
Assert.state(false, "O采购入库业务推送U8C委外入库失败 接口返回结果:{}", result);
}
return icGeneralHResultDto;
}
/**
* 返回结果解析处理在确认了success后调用
*
* @author liuyang
*/
private IcGeneralHResultDto resultDataHandle(String resultData) {
try {
if (resultData != null && !"".equals(resultData)) {
if (resultData.contains("[")) {
resultData = resultData.substring(1, resultData.length() - 1);
}
return JSON.parseObject(resultData, IcGeneralHResultDto.class);
}
} catch (Exception e) {
logger.error("resultDataHandle方法解析返回参数失败的错误", e);
//如果解析失败,记录原因,但是不能影响结果的记录
}
return null;
}
}

View File

@ -14,6 +14,7 @@ import com.hzya.frame.plugin.lets.entity.*;
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo; import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo;
import com.hzya.frame.plugin.lets.u8cdto.*; import com.hzya.frame.plugin.lets.u8cdto.*;
import com.hzya.frame.plugin.lets.util.*; import com.hzya.frame.plugin.lets.util.*;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderData; import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderData;
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderDetails; import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderDetails;
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderHeader; import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderHeader;
@ -85,6 +86,9 @@ public class ConsignmachiningInReturn extends PluginBaseEntity {
@Autowired @Autowired
private IBdStordocDao iBdStordocDao; private IBdStordocDao iBdStordocDao;
@Autowired
private SaveOrUpdateBusinessLogUtil saveOrUpdateBusinessLogUtil;
@Override @Override
public void initialize() { public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()"); logger.info(getPluginLabel() + "執行初始化方法initialize()");
@ -97,7 +101,7 @@ public class ConsignmachiningInReturn extends PluginBaseEntity {
@Override @Override
public String getPluginId() { public String getPluginId() {
return "com.hzya.frame.plugin.lets.plugin.outsourc.ConsignmachiningInReturn"; return "outsourc.ConsignmachiningInReturn";
} }
@Override @Override
@ -262,7 +266,9 @@ public class ConsignmachiningInReturn extends PluginBaseEntity {
ReturnOrderHeaderDto returnOrderHeaderDto = returnOrderHeaderDtos.get(i); ReturnOrderHeaderDto returnOrderHeaderDto = returnOrderHeaderDtos.get(i);
List<DetailsDto> details = returnOrderHeaderDto.getDetails(); List<DetailsDto> details = returnOrderHeaderDto.getDetails();
String generateBusinessDate = createGenerateBusinessDate(returnOrderHeaderDto); //生成业务日期 String generateBusinessDate = null;
try {
generateBusinessDate = createGenerateBusinessDate(returnOrderHeaderDto); //生成业务日期
PurchaseReturnOrder purchaseReturnOrder = returnOrderHeaderDto.getPurchaseReturnOrder();//OFS采退订单 PurchaseReturnOrder purchaseReturnOrder = returnOrderHeaderDto.getPurchaseReturnOrder();//OFS采退订单
ScOrderEntity scOrderEntity = returnOrderHeaderDto.getScOrderEntity();//U8C委外订单 ScOrderEntity scOrderEntity = returnOrderHeaderDto.getScOrderEntity();//U8C委外订单
List<ScOrderBEntity> scOrderBEntityList = returnOrderHeaderDto.getScOrderBEntityList();//U8C委外订单明细行 List<ScOrderBEntity> scOrderBEntityList = returnOrderHeaderDto.getScOrderBEntityList();//U8C委外订单明细行
@ -338,6 +344,36 @@ public class ConsignmachiningInReturn extends PluginBaseEntity {
vbillcode = parentvo.getVbillcode(); vbillcode = parentvo.getVbillcode();
} }
logger.info("推送U8C红字委外入库成功委外入库单主键{} 委外入库单编码:{} 公司名称:{}", cgeneralhid, vbillcode, bdCorpEntity.getUnitname()); logger.info("推送U8C红字委外入库成功委外入库单主键{} 委外入库单编码:{} 公司名称:{}", cgeneralhid, vbillcode, bdCorpEntity.getUnitname());
// 成功记录日志
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
integrationTaskLivingDetailsEntity.setNewState(ProfilesActiveConstant.LOG_STATUS_Y);
integrationTaskLivingDetailsEntity.setRootAppNewData(JSON.toJSONString(returnOrderHeaderDto));//原始数据json
integrationTaskLivingDetailsEntity.setNewTransmitInfo(JSON.toJSONString(icGeneralHResultDto));//返回结果
integrationTaskLivingDetailsEntity.setNewPushDate(new Date());
integrationTaskLivingDetailsEntity.setBusinessDate(generateBusinessDate);
integrationTaskLivingDetailsEntity.setRootAppPk(returnOrderHeaderDto.getId());
integrationTaskLivingDetailsEntity.setRootAppBill(returnOrderHeaderDto.getCode());
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
} catch (Exception e) {
logger.error("推送U8C红字委外入库单失败", e);
String message = e.getMessage();
if (message == null) {
message = "未知错误";
}
// 失败记录日志
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
integrationTaskLivingDetailsEntity.setNewState(ProfilesActiveConstant.LOG_STATUS_N);
integrationTaskLivingDetailsEntity.setRootAppNewData(JSON.toJSONString(returnOrderHeaderDto));//原始数据json
integrationTaskLivingDetailsEntity.setNewTransmitInfo(JSON.toJSONString(message));//返回结果
integrationTaskLivingDetailsEntity.setNewPushDate(new Date());
integrationTaskLivingDetailsEntity.setBusinessDate(generateBusinessDate);
integrationTaskLivingDetailsEntity.setRootAppPk(returnOrderHeaderDto.getId());
integrationTaskLivingDetailsEntity.setRootAppBill(returnOrderHeaderDto.getCode());
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
}
} }
} else { } else {
logger.info("poOrderSonDto.size为0"); logger.info("poOrderSonDto.size为0");

View File

@ -13,10 +13,8 @@ import com.hzya.frame.plugin.lets.dao.*;
import com.hzya.frame.plugin.lets.entity.*; import com.hzya.frame.plugin.lets.entity.*;
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo; import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo;
import com.hzya.frame.plugin.lets.u8cdto.*; import com.hzya.frame.plugin.lets.u8cdto.*;
import com.hzya.frame.plugin.lets.util.OfsStandardUtil; import com.hzya.frame.plugin.lets.util.*;
import com.hzya.frame.plugin.lets.util.OnlyImplementProxyOrderUtil; import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
import com.hzya.frame.plugin.lets.util.QueryBdBusitypeUtil;
import com.hzya.frame.plugin.lets.util.RdclUtil;
import com.hzya.frame.ttxofs.dto.InterfaceParamDto; import com.hzya.frame.ttxofs.dto.InterfaceParamDto;
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderBean; import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderBean;
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderData; import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderData;
@ -85,6 +83,9 @@ public class ProxyPurchaseReturn extends PluginBaseEntity {
@Autowired @Autowired
private OfsStandardUtil ofsStandardUtil; private OfsStandardUtil ofsStandardUtil;
@Autowired
private SaveOrUpdateBusinessLogUtil saveOrUpdateBusinessLogUtil;
@Autowired @Autowired
private OnlyImplementProxyOrderUtil onlyImplementProxyOrder; private OnlyImplementProxyOrderUtil onlyImplementProxyOrder;
@ -100,7 +101,7 @@ public class ProxyPurchaseReturn extends PluginBaseEntity {
@Override @Override
public String getPluginId() { public String getPluginId() {
return "com.hzya.frame.plugin.lets.plugin.purchase.ProxyPurchaseReturn"; return "purchase.ProxyPurchaseReturn";
} }
@Override @Override
@ -290,8 +291,10 @@ public class ProxyPurchaseReturn extends PluginBaseEntity {
PoOrderRerturnSonDto poOrderSonDto = poOrderRerturnSonDtos.get(i); PoOrderRerturnSonDto poOrderSonDto = poOrderRerturnSonDtos.get(i);
List<DetailsDto> details = poOrderSonDto.getDetails(); List<DetailsDto> details = poOrderSonDto.getDetails();
String generateBusinessDate = null;
try {
//生成业务日期 //生成业务日期
String generateBusinessDate = createGenerateBusinessDate(poOrderSonDto); generateBusinessDate = createGenerateBusinessDate(poOrderSonDto);
BdCorpEntity bdCorpEntity = poOrderSonDto.getBdCorpEntity();//采购公司收货公司 BdCorpEntity bdCorpEntity = poOrderSonDto.getBdCorpEntity();//采购公司收货公司
BdDeptdocEntity bdDeptdocEntity = poOrderSonDto.getBdDeptdocEntity();//采购部门 BdDeptdocEntity bdDeptdocEntity = poOrderSonDto.getBdDeptdocEntity();//采购部门
@ -393,6 +396,37 @@ public class ProxyPurchaseReturn extends PluginBaseEntity {
vordercode = parentvo.getVordercode(); vordercode = parentvo.getVordercode();
} }
logger.info("推送U8C代理品牌采购订单采购U8C采购订单主键{} U8C采购订单编码{}", corderid, vordercode); logger.info("推送U8C代理品牌采购订单采购U8C采购订单主键{} U8C采购订单编码{}", corderid, vordercode);
// 成功记录日志
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
integrationTaskLivingDetailsEntity.setNewState(ProfilesActiveConstant.LOG_STATUS_Y);
integrationTaskLivingDetailsEntity.setRootAppNewData(JSON.toJSONString(poOrderSonDto));//原始数据json
integrationTaskLivingDetailsEntity.setNewTransmitInfo(JSON.toJSONString(poOrderHeadBodyDto));//返回结果
integrationTaskLivingDetailsEntity.setNewPushDate(new Date());
integrationTaskLivingDetailsEntity.setBusinessDate(generateBusinessDate);
integrationTaskLivingDetailsEntity.setRootAppPk(poOrderSonDto.getId());
integrationTaskLivingDetailsEntity.setRootAppBill(poOrderSonDto.getCode());
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
} catch (Exception e) {
logger.error("推送U8C代理品牌红字采购订单采购失败", e);
// 失败记录日志
String message = e.getMessage();
if (message == null) {
message = "未知错误";
}
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
integrationTaskLivingDetailsEntity.setNewState(ProfilesActiveConstant.LOG_STATUS_N);
integrationTaskLivingDetailsEntity.setRootAppNewData(JSON.toJSONString(poOrderSonDto));//原始数据json
integrationTaskLivingDetailsEntity.setNewTransmitInfo(JSON.toJSONString(message));//返回结果
integrationTaskLivingDetailsEntity.setNewPushDate(new Date());
integrationTaskLivingDetailsEntity.setBusinessDate(generateBusinessDate);
integrationTaskLivingDetailsEntity.setRootAppPk(poOrderSonDto.getId());
integrationTaskLivingDetailsEntity.setRootAppBill(poOrderSonDto.getCode());
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
}
} }
} else { } else {
logger.info("poOrderSonDto.size为0"); logger.info("poOrderSonDto.size为0");

View File

@ -13,10 +13,8 @@ import com.hzya.frame.plugin.lets.dao.*;
import com.hzya.frame.plugin.lets.entity.*; import com.hzya.frame.plugin.lets.entity.*;
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo; import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo;
import com.hzya.frame.plugin.lets.u8cdto.*; import com.hzya.frame.plugin.lets.u8cdto.*;
import com.hzya.frame.plugin.lets.util.OfsStandardUtil; import com.hzya.frame.plugin.lets.util.*;
import com.hzya.frame.plugin.lets.util.OnlyImplementProxyOrderUtil; import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
import com.hzya.frame.plugin.lets.util.QueryBdBusitypeUtil;
import com.hzya.frame.plugin.lets.util.RdclUtil;
import com.hzya.frame.ttxofs.dto.InterfaceParamDto; import com.hzya.frame.ttxofs.dto.InterfaceParamDto;
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderBean; import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderBean;
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderData; import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderData;
@ -85,6 +83,9 @@ public class ProxyPurchaseWarehous extends PluginBaseEntity {
@Autowired @Autowired
private OnlyImplementProxyOrderUtil onlyImplementProxyOrder; private OnlyImplementProxyOrderUtil onlyImplementProxyOrder;
@Autowired
private SaveOrUpdateBusinessLogUtil saveOrUpdateBusinessLogUtil;
@Override @Override
public void initialize() { public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()"); logger.info(getPluginLabel() + "執行初始化方法initialize()");
@ -97,7 +98,7 @@ public class ProxyPurchaseWarehous extends PluginBaseEntity {
@Override @Override
public String getPluginId() { public String getPluginId() {
return "com.hzya.frame.plugin.lets.plugin.purchase.ProxyPurchaseWarehous"; return "purchase.ProxyPurchaseWarehous";
} }
@Override @Override
@ -284,8 +285,10 @@ public class ProxyPurchaseWarehous extends PluginBaseEntity {
PoOrderSonDto poOrderSonDto = poOrderSonDtos.get(i); PoOrderSonDto poOrderSonDto = poOrderSonDtos.get(i);
List<StockinOrderSearchResponse.StockinOrder.StockinB> details = poOrderSonDto.getDetails(); List<StockinOrderSearchResponse.StockinOrder.StockinB> details = poOrderSonDto.getDetails();
String generateBusinessDate = null;
try {
//生成业务日期 //生成业务日期
String generateBusinessDate = createGenerateBusinessDate(poOrderSonDto); generateBusinessDate = createGenerateBusinessDate(poOrderSonDto);
BdCorpEntity bdCorpEntity = poOrderSonDto.getBdCorpEntity();//采购公司收货公司 BdCorpEntity bdCorpEntity = poOrderSonDto.getBdCorpEntity();//采购公司收货公司
BdDeptdocEntity bdDeptdocEntity = poOrderSonDto.getBdDeptdocEntity();//采购部门 BdDeptdocEntity bdDeptdocEntity = poOrderSonDto.getBdDeptdocEntity();//采购部门
@ -386,6 +389,37 @@ public class ProxyPurchaseWarehous extends PluginBaseEntity {
vordercode = parentvo.getVordercode(); vordercode = parentvo.getVordercode();
} }
logger.info("推送U8C代理品牌采购订单采购U8C采购订单主键{} U8C采购订单编码{}", corderid, vordercode); logger.info("推送U8C代理品牌采购订单采购U8C采购订单主键{} U8C采购订单编码{}", corderid, vordercode);
// 成功记录日志
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
integrationTaskLivingDetailsEntity.setNewState(ProfilesActiveConstant.LOG_STATUS_Y);
integrationTaskLivingDetailsEntity.setRootAppNewData(JSON.toJSONString(poOrderSonDto));//原始数据json
integrationTaskLivingDetailsEntity.setNewTransmitInfo(JSON.toJSONString(poOrderHeadBodyDto));//返回结果
integrationTaskLivingDetailsEntity.setNewPushDate(new Date());
integrationTaskLivingDetailsEntity.setBusinessDate(generateBusinessDate);
integrationTaskLivingDetailsEntity.setRootAppPk(poOrderSonDto.getId());
integrationTaskLivingDetailsEntity.setRootAppBill(poOrderSonDto.getCode());
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
} catch (Exception e) {
logger.error("推送U8C代理品牌采购订单采购失败", e);
// 失败记录日志
String message = e.getMessage();
if (message == null) {
message = "未知错误";
}
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
integrationTaskLivingDetailsEntity.setNewState(ProfilesActiveConstant.LOG_STATUS_N);
integrationTaskLivingDetailsEntity.setRootAppNewData(JSON.toJSONString(poOrderSonDto));//原始数据json
integrationTaskLivingDetailsEntity.setNewTransmitInfo(JSON.toJSONString(message));//返回结果
integrationTaskLivingDetailsEntity.setNewPushDate(new Date());
integrationTaskLivingDetailsEntity.setBusinessDate(generateBusinessDate);
integrationTaskLivingDetailsEntity.setRootAppPk(poOrderSonDto.getId());
integrationTaskLivingDetailsEntity.setRootAppBill(poOrderSonDto.getCode());
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
}
} }
} else { } else {
logger.info("poOrderSonDto.size为0"); logger.info("poOrderSonDto.size为0");

View File

@ -69,7 +69,7 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
@Override @Override
public String getPluginId() { public String getPluginId() {
return "com.hzya.frame.plugin.lets.plugin.sales.SoSaleOutPluginInitializerToB"; return "sales.SoSaleOutPluginInitializerToB";
} }
@Override @Override

View File

@ -60,7 +60,7 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
@Override @Override
public String getPluginId() { public String getPluginId() {
return "com.hzya.frame.plugin.sowow.plugin.sales.SoSaleOutPluginInitializerToC"; return "sales.SoSaleOutPluginInitializerToC";
} }
@Override @Override

View File

@ -70,7 +70,7 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
@Override @Override
public String getPluginId() { public String getPluginId() {
return "com.hzya.frame.plugin.lets.plugin.sales.SoSaleReturnPluginInitializerToB"; return "sales.SoSaleReturnPluginInitializerToB";
} }
@Override @Override

View File

@ -55,7 +55,7 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity {
@Override @Override
public String getPluginId() { public String getPluginId() {
return "com.hzya.frame.plugin.lets.plugin.sales.SoSaleReturnPluginInitializerToC"; return "sales.SoSaleReturnPluginInitializerToC";
} }
@Override @Override

View File

@ -64,7 +64,7 @@ public class TransferInPluginInitializer extends PluginBaseEntity {
@Override @Override
public String getPluginId() { public String getPluginId() {
return "com.hzya.frame.plugin.lets.plugin.transfer.TransferInPluginInitializer"; return "transfer.TransferInPluginInitializer";
} }
@Override @Override

View File

@ -64,7 +64,7 @@ public class TransferOutPluginInitializer extends PluginBaseEntity {
@Override @Override
public String getPluginId() { public String getPluginId() {
return "com.hzya.frame.plugin.lets.plugin.transfer.TransferOutPluginInitializer"; return "transfer.TransferOutPluginInitializer";
} }
@Override @Override

View File

@ -57,4 +57,19 @@ public class ConsignmachiningInSonDto extends StockinOrderSearchResponse.Stockin
* U8C委外订单明细行 * U8C委外订单明细行
*/ */
private List<ScOrderBEntity> scOrderBEntityList; private List<ScOrderBEntity> scOrderBEntityList;
/**
* 采购组织
*/
private BdPurorgEntity bdPurorgEntity;
/**
* 客商基本档案
*/
private BdCubasdocEntity bdCubasdocEntity;
/**
* 客商管理档案
*/
private BdCumandocEntity bdCumandocEntity;
} }

View File

@ -5,20 +5,32 @@ import cn.hutool.core.lang.Assert;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.IIntegrationTaskLivingDetailsDao; import com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.IIntegrationTaskLivingDetailsDao;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity; import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
import com.hzya.frame.uuid.UUIDLong; import com.hzya.frame.uuid.UUIDLong;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.List; import java.util.List;
//保存或者更新业务日志 /**
* 保存或者更新业务日志
*/
@Component @Component
public class SaveOrUpdateBusinessLogUtil { public class SaveOrUpdateBusinessLogUtil {
Logger logger = LoggerFactory.getLogger(SaveOrUpdateBusinessLogUtil.class);
@Autowired @Autowired
private IIntegrationTaskLivingDetailsDao iIntegrationTaskLivingDetailsDao; private IIntegrationTaskLivingDetailsDao iIntegrationTaskLivingDetailsDao;
private static final Object insertOrUpdateLock = new Object(); private static final Object insertOrUpdateLock = new Object();
private static final Object queryDetailsLock = new Object();
private static final String successY = "Y";
private static final String failN = "N";
/** /**
* 保存或者更新 * 保存或者更新
* *
@ -29,7 +41,9 @@ public class SaveOrUpdateBusinessLogUtil {
Assert.notNull(integrationTaskLivingDetailsEntity.getRootAppPk(), "源系统单号不能为空"); Assert.notNull(integrationTaskLivingDetailsEntity.getRootAppPk(), "源系统单号不能为空");
Assert.notNull(integrationTaskLivingDetailsEntity.getPluginId(), "场景id不能为空"); Assert.notNull(integrationTaskLivingDetailsEntity.getPluginId(), "场景id不能为空");
try {
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetails = null; IntegrationTaskLivingDetailsEntity integrationTaskLivingDetails = null;
synchronized (queryDetailsLock) {
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity1 = new IntegrationTaskLivingDetailsEntity(); IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity1 = new IntegrationTaskLivingDetailsEntity();
integrationTaskLivingDetailsEntity1.setRootAppPk(integrationTaskLivingDetailsEntity.getRootAppPk()); integrationTaskLivingDetailsEntity1.setRootAppPk(integrationTaskLivingDetailsEntity.getRootAppPk());
integrationTaskLivingDetailsEntity1.setPluginId(integrationTaskLivingDetailsEntity.getPluginId()); integrationTaskLivingDetailsEntity1.setPluginId(integrationTaskLivingDetailsEntity.getPluginId());
@ -37,6 +51,7 @@ public class SaveOrUpdateBusinessLogUtil {
if (integrationTaskLivingDetailsEntities != null && integrationTaskLivingDetailsEntities.size() > 0) { if (integrationTaskLivingDetailsEntities != null && integrationTaskLivingDetailsEntities.size() > 0) {
integrationTaskLivingDetails = integrationTaskLivingDetailsEntities.get(0); integrationTaskLivingDetails = integrationTaskLivingDetailsEntities.get(0);
} }
}
if (integrationTaskLivingDetails != null) { if (integrationTaskLivingDetails != null) {
//存在 //存在
synchronized (insertOrUpdateLock) { synchronized (insertOrUpdateLock) {
@ -51,7 +66,12 @@ public class SaveOrUpdateBusinessLogUtil {
integrationTaskLivingDetailsEntity.setId(String.valueOf(uuid)); integrationTaskLivingDetailsEntity.setId(String.valueOf(uuid));
updateSuccessMessage(integrationTaskLivingDetailsEntity); updateSuccessMessage(integrationTaskLivingDetailsEntity);
IntegrationTaskLivingDetailsEntity save = iIntegrationTaskLivingDetailsDao.save(integrationTaskLivingDetailsEntity); IntegrationTaskLivingDetailsEntity save = iIntegrationTaskLivingDetailsDao.save(integrationTaskLivingDetailsEntity);
System.out.println("save = " + save); // System.out.println("save = " + save);
logger.info("integration_task_living_details->日志保存成功,主键:{}", save.getId());
}
} catch (Exception e) {
logger.error("SaveOrUpdateBusinessLogUtil对应的saveOrUpdate方法抛出异常日志详情保存失败", e);
//2024年9月3日 10:26:45 如果这里往上抛出异常没有功能搭配处理
} }
} }
@ -62,14 +82,30 @@ public class SaveOrUpdateBusinessLogUtil {
*/ */
private void updateSuccessMessage(IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity) { private void updateSuccessMessage(IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity) {
if (integrationTaskLivingDetailsEntity != null) { if (integrationTaskLivingDetailsEntity != null) {
if ("Y".equals(integrationTaskLivingDetailsEntity.getNewState())) { if (successY.equals(integrationTaskLivingDetailsEntity.getNewState())) {
//成功 //成功
integrationTaskLivingDetailsEntity.setRootAppNewData("success"); String successIdentification = "success";
integrationTaskLivingDetailsEntity.setNewTransmitInfo("success"); integrationTaskLivingDetailsEntity.setRootAppNewData(successIdentification);
integrationTaskLivingDetailsEntity.setNewTransmitInfo(successIdentification);
/** /**
* integrationTaskLivingDetailsEntity.setRoot_app_new_data(JSON.toJSONString(searchPurchaseReceiptOrder)); * integrationTaskLivingDetailsEntity.setRoot_app_new_data(JSON.toJSONString(searchPurchaseReceiptOrder));
* integrationTaskLivingDetailsEntity.setNew_transmit_info(cgrkApi); * integrationTaskLivingDetailsEntity.setNew_transmit_info(cgrkApi);
*/ */
} else if (failN.equals(integrationTaskLivingDetailsEntity.getNewState())) {
//2024年9月2日 17:09:07 如果失败仅保留500个字符用于平衡数据库性能
//2024年9月2日 17:15:19 如果该单据判断为失败则integration_task_living_details表的root_app_new_datanew_transmit_info字段仅保留500个长度的字符用于平衡性能速网珍视名项目这一块性能很差
String rootAppNewData = null;
if (integrationTaskLivingDetailsEntity.getRootAppNewData() != null) {
rootAppNewData = integrationTaskLivingDetailsEntity.getRootAppNewData().substring(0, 500);
}
String newTransmitInfo = null;
if (integrationTaskLivingDetailsEntity.getNewTransmitInfo() != null) {
newTransmitInfo = integrationTaskLivingDetailsEntity.getNewTransmitInfo().substring(0, 500);
}
integrationTaskLivingDetailsEntity.setRootAppNewData(rootAppNewData);
integrationTaskLivingDetailsEntity.setNewTransmitInfo(newTransmitInfo);
} else {
Assert.state(false, "不合法的newState不能为空请传递Y或者N");
} }
} }
} }

View File

@ -51,4 +51,6 @@
<bean name="soSaleinvoiceDao" class="com.hzya.frame.plugin.lets.dao.impl.SoSaleinvoiceDaoImpl"/> <bean name="soSaleinvoiceDao" class="com.hzya.frame.plugin.lets.dao.impl.SoSaleinvoiceDaoImpl"/>
<bean name="soSaleinvoiceBDao" class="com.hzya.frame.plugin.lets.dao.impl.SoSaleinvoiceBDaoImpl"/> <bean name="soSaleinvoiceBDao" class="com.hzya.frame.plugin.lets.dao.impl.SoSaleinvoiceBDaoImpl"/>
<bean name="bdBomDao" class="com.hzya.frame.plugin.lets.dao.impl.BdBomDaoImpl"/>
</beans> </beans>

View File

@ -27,7 +27,7 @@
<bean name="proxyPurchaseReturn" class="com.hzya.frame.plugin.lets.plugin.purchase.ProxyPurchaseReturn"/> <bean name="proxyPurchaseReturn" class="com.hzya.frame.plugin.lets.plugin.purchase.ProxyPurchaseReturn"/>
<!-- <bean name="consignmachiningIn" class="com.hzya.frame.plugin.lets.plugin.outsourc.ConsignmachiningIn"/>--> <bean name="consignmachiningIn" class="com.hzya.frame.plugin.lets.plugin.outsourc.ConsignmachiningIn"/>
<!-- <bean name="consignmachiningInReturn" class="com.hzya.frame.plugin.lets.plugin.outsourc.ConsignmachiningInReturn"/>--> <!-- <bean name="consignmachiningInReturn" class="com.hzya.frame.plugin.lets.plugin.outsourc.ConsignmachiningInReturn"/>-->
<bean name="scOrderBDao" class="com.hzya.frame.plugin.lets.dao.impl.ScOrderBDaoImpl"/> <bean name="scOrderBDao" class="com.hzya.frame.plugin.lets.dao.impl.ScOrderBDaoImpl"/>