Merge remote-tracking branch 'origin/lets' into lets
This commit is contained in:
commit
b9498d3984
|
@ -0,0 +1,15 @@
|
||||||
|
package com.hzya.frame.plugin.lets.dao;
|
||||||
|
|
||||||
|
import com.hzya.frame.plugin.lets.entity.IaMonthledgerEntity;
|
||||||
|
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (IA_MONTHLEDGER: table)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-09-03 11:16:01
|
||||||
|
*/
|
||||||
|
public interface IIaMonthledgerDao extends IBaseDao<IaMonthledgerEntity, String> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.hzya.frame.plugin.lets.dao.impl;
|
||||||
|
|
||||||
|
import com.hzya.frame.plugin.lets.entity.IaMonthledgerEntity;
|
||||||
|
import com.hzya.frame.plugin.lets.dao.IIaMonthledgerDao;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
|
/**
|
||||||
|
* (IaMonthledger)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-09-03 11:16:01
|
||||||
|
*/
|
||||||
|
public class IaMonthledgerDaoImpl extends MybatisGenericDao<IaMonthledgerEntity, String> implements IIaMonthledgerDao{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,339 @@
|
||||||
|
package com.hzya.frame.plugin.lets.entity;
|
||||||
|
|
||||||
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
|
/**
|
||||||
|
* (IaMonthledger)实体类
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-09-03 11:16:01
|
||||||
|
*/
|
||||||
|
public class IaMonthledgerEntity extends BaseEntity {
|
||||||
|
|
||||||
|
private String btryflag;
|
||||||
|
private String caccountmonth;
|
||||||
|
private String caccountyear;
|
||||||
|
private String cinventoryid;
|
||||||
|
private String cmonthledgerid;
|
||||||
|
private String crdcenterid;
|
||||||
|
private String cvendorid;
|
||||||
|
private String dr;
|
||||||
|
private String fpricemodeflag;
|
||||||
|
private String frecordtypeflag;
|
||||||
|
private String nabmny;
|
||||||
|
private String nabnum;
|
||||||
|
private String nabprice;
|
||||||
|
private String nabvarymny;
|
||||||
|
private String ninmny;
|
||||||
|
private String ninnum;
|
||||||
|
private String ninvarymny;
|
||||||
|
private String nmonthprice;
|
||||||
|
private String noutmny;
|
||||||
|
private String noutnum;
|
||||||
|
private String noutvarymny;
|
||||||
|
private String nplanedprice;
|
||||||
|
private String nvariancerate;
|
||||||
|
private String pkCorp;
|
||||||
|
private String ts;
|
||||||
|
private String vbatch;
|
||||||
|
private String vfree1;
|
||||||
|
private String vfree10;
|
||||||
|
private String vfree2;
|
||||||
|
private String vfree3;
|
||||||
|
private String vfree4;
|
||||||
|
private String vfree5;
|
||||||
|
private String vfree6;
|
||||||
|
private String vfree7;
|
||||||
|
private String vfree8;
|
||||||
|
private String vfree9;
|
||||||
|
|
||||||
|
|
||||||
|
public String getBtryflag() {
|
||||||
|
return btryflag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBtryflag(String btryflag) {
|
||||||
|
this.btryflag = btryflag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCaccountmonth() {
|
||||||
|
return caccountmonth;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCaccountmonth(String caccountmonth) {
|
||||||
|
this.caccountmonth = caccountmonth;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCaccountyear() {
|
||||||
|
return caccountyear;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCaccountyear(String caccountyear) {
|
||||||
|
this.caccountyear = caccountyear;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCinventoryid() {
|
||||||
|
return cinventoryid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCinventoryid(String cinventoryid) {
|
||||||
|
this.cinventoryid = cinventoryid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCmonthledgerid() {
|
||||||
|
return cmonthledgerid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCmonthledgerid(String cmonthledgerid) {
|
||||||
|
this.cmonthledgerid = cmonthledgerid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCrdcenterid() {
|
||||||
|
return crdcenterid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCrdcenterid(String crdcenterid) {
|
||||||
|
this.crdcenterid = crdcenterid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCvendorid() {
|
||||||
|
return cvendorid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCvendorid(String cvendorid) {
|
||||||
|
this.cvendorid = cvendorid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDr() {
|
||||||
|
return dr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDr(String dr) {
|
||||||
|
this.dr = dr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFpricemodeflag() {
|
||||||
|
return fpricemodeflag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFpricemodeflag(String fpricemodeflag) {
|
||||||
|
this.fpricemodeflag = fpricemodeflag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFrecordtypeflag() {
|
||||||
|
return frecordtypeflag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFrecordtypeflag(String frecordtypeflag) {
|
||||||
|
this.frecordtypeflag = frecordtypeflag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNabmny() {
|
||||||
|
return nabmny;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNabmny(String nabmny) {
|
||||||
|
this.nabmny = nabmny;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNabnum() {
|
||||||
|
return nabnum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNabnum(String nabnum) {
|
||||||
|
this.nabnum = nabnum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNabprice() {
|
||||||
|
return nabprice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNabprice(String nabprice) {
|
||||||
|
this.nabprice = nabprice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNabvarymny() {
|
||||||
|
return nabvarymny;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNabvarymny(String nabvarymny) {
|
||||||
|
this.nabvarymny = nabvarymny;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNinmny() {
|
||||||
|
return ninmny;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNinmny(String ninmny) {
|
||||||
|
this.ninmny = ninmny;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNinnum() {
|
||||||
|
return ninnum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNinnum(String ninnum) {
|
||||||
|
this.ninnum = ninnum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNinvarymny() {
|
||||||
|
return ninvarymny;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNinvarymny(String ninvarymny) {
|
||||||
|
this.ninvarymny = ninvarymny;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNmonthprice() {
|
||||||
|
return nmonthprice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNmonthprice(String nmonthprice) {
|
||||||
|
this.nmonthprice = nmonthprice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNoutmny() {
|
||||||
|
return noutmny;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNoutmny(String noutmny) {
|
||||||
|
this.noutmny = noutmny;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNoutnum() {
|
||||||
|
return noutnum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNoutnum(String noutnum) {
|
||||||
|
this.noutnum = noutnum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNoutvarymny() {
|
||||||
|
return noutvarymny;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNoutvarymny(String noutvarymny) {
|
||||||
|
this.noutvarymny = noutvarymny;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNplanedprice() {
|
||||||
|
return nplanedprice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNplanedprice(String nplanedprice) {
|
||||||
|
this.nplanedprice = nplanedprice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNvariancerate() {
|
||||||
|
return nvariancerate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNvariancerate(String nvariancerate) {
|
||||||
|
this.nvariancerate = nvariancerate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPkCorp() {
|
||||||
|
return pkCorp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPkCorp(String pkCorp) {
|
||||||
|
this.pkCorp = pkCorp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTs() {
|
||||||
|
return ts;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTs(String ts) {
|
||||||
|
this.ts = ts;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVbatch() {
|
||||||
|
return vbatch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVbatch(String vbatch) {
|
||||||
|
this.vbatch = vbatch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVfree1() {
|
||||||
|
return vfree1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVfree1(String vfree1) {
|
||||||
|
this.vfree1 = vfree1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVfree10() {
|
||||||
|
return vfree10;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVfree10(String vfree10) {
|
||||||
|
this.vfree10 = vfree10;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVfree2() {
|
||||||
|
return vfree2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVfree2(String vfree2) {
|
||||||
|
this.vfree2 = vfree2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVfree3() {
|
||||||
|
return vfree3;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVfree3(String vfree3) {
|
||||||
|
this.vfree3 = vfree3;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVfree4() {
|
||||||
|
return vfree4;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVfree4(String vfree4) {
|
||||||
|
this.vfree4 = vfree4;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVfree5() {
|
||||||
|
return vfree5;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVfree5(String vfree5) {
|
||||||
|
this.vfree5 = vfree5;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVfree6() {
|
||||||
|
return vfree6;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVfree6(String vfree6) {
|
||||||
|
this.vfree6 = vfree6;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVfree7() {
|
||||||
|
return vfree7;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVfree7(String vfree7) {
|
||||||
|
this.vfree7 = vfree7;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVfree8() {
|
||||||
|
return vfree8;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVfree8(String vfree8) {
|
||||||
|
this.vfree8 = vfree8;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVfree9() {
|
||||||
|
return vfree9;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVfree9(String vfree9) {
|
||||||
|
this.vfree9 = vfree9;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,503 @@
|
||||||
|
<?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.IaMonthledgerDaoImpl">
|
||||||
|
|
||||||
|
<resultMap id="get-IaMonthledgerEntity-result" type="com.hzya.frame.plugin.lets.entity.IaMonthledgerEntity" >
|
||||||
|
<result property="btryflag" column="BTRYFLAG" jdbcType="VARCHAR"/>
|
||||||
|
<result property="caccountmonth" column="CACCOUNTMONTH" jdbcType="VARCHAR"/>
|
||||||
|
<result property="caccountyear" column="CACCOUNTYEAR" jdbcType="VARCHAR"/>
|
||||||
|
<result property="cinventoryid" column="CINVENTORYID" jdbcType="VARCHAR"/>
|
||||||
|
<result property="cmonthledgerid" column="CMONTHLEDGERID" jdbcType="VARCHAR"/>
|
||||||
|
<result property="crdcenterid" column="CRDCENTERID" jdbcType="VARCHAR"/>
|
||||||
|
<result property="cvendorid" column="CVENDORID" jdbcType="VARCHAR"/>
|
||||||
|
<result property="dr" column="DR" jdbcType="VARCHAR"/>
|
||||||
|
<result property="fpricemodeflag" column="FPRICEMODEFLAG" jdbcType="VARCHAR"/>
|
||||||
|
<result property="frecordtypeflag" column="FRECORDTYPEFLAG" jdbcType="VARCHAR"/>
|
||||||
|
<result property="nabmny" column="NABMNY" jdbcType="VARCHAR"/>
|
||||||
|
<result property="nabnum" column="NABNUM" jdbcType="VARCHAR"/>
|
||||||
|
<result property="nabprice" column="NABPRICE" jdbcType="VARCHAR"/>
|
||||||
|
<result property="nabvarymny" column="NABVARYMNY" jdbcType="VARCHAR"/>
|
||||||
|
<result property="ninmny" column="NINMNY" jdbcType="VARCHAR"/>
|
||||||
|
<result property="ninnum" column="NINNUM" jdbcType="VARCHAR"/>
|
||||||
|
<result property="ninvarymny" column="NINVARYMNY" jdbcType="VARCHAR"/>
|
||||||
|
<result property="nmonthprice" column="NMONTHPRICE" jdbcType="VARCHAR"/>
|
||||||
|
<result property="noutmny" column="NOUTMNY" jdbcType="VARCHAR"/>
|
||||||
|
<result property="noutnum" column="NOUTNUM" jdbcType="VARCHAR"/>
|
||||||
|
<result property="noutvarymny" column="NOUTVARYMNY" jdbcType="VARCHAR"/>
|
||||||
|
<result property="nplanedprice" column="NPLANEDPRICE" jdbcType="VARCHAR"/>
|
||||||
|
<result property="nvariancerate" column="NVARIANCERATE" jdbcType="VARCHAR"/>
|
||||||
|
<result property="pkCorp" column="PK_CORP" jdbcType="VARCHAR"/>
|
||||||
|
<result property="ts" column="TS" jdbcType="VARCHAR"/>
|
||||||
|
<result property="vbatch" column="VBATCH" jdbcType="VARCHAR"/>
|
||||||
|
<result property="vfree1" column="VFREE1" jdbcType="VARCHAR"/>
|
||||||
|
<result property="vfree10" column="VFREE10" jdbcType="VARCHAR"/>
|
||||||
|
<result property="vfree2" column="VFREE2" jdbcType="VARCHAR"/>
|
||||||
|
<result property="vfree3" column="VFREE3" jdbcType="VARCHAR"/>
|
||||||
|
<result property="vfree4" column="VFREE4" jdbcType="VARCHAR"/>
|
||||||
|
<result property="vfree5" column="VFREE5" jdbcType="VARCHAR"/>
|
||||||
|
<result property="vfree6" column="VFREE6" jdbcType="VARCHAR"/>
|
||||||
|
<result property="vfree7" column="VFREE7" jdbcType="VARCHAR"/>
|
||||||
|
<result property="vfree8" column="VFREE8" jdbcType="VARCHAR"/>
|
||||||
|
<result property="vfree9" column="VFREE9" jdbcType="VARCHAR"/>
|
||||||
|
</resultMap>
|
||||||
|
<!-- 查询的字段-->
|
||||||
|
<sql id = "IaMonthledgerEntity_Base_Column_List">
|
||||||
|
BTRYFLAG
|
||||||
|
,CACCOUNTMONTH
|
||||||
|
,CACCOUNTYEAR
|
||||||
|
,CINVENTORYID
|
||||||
|
,CMONTHLEDGERID
|
||||||
|
,CRDCENTERID
|
||||||
|
,CVENDORID
|
||||||
|
,DR
|
||||||
|
,FPRICEMODEFLAG
|
||||||
|
,FRECORDTYPEFLAG
|
||||||
|
,NABMNY
|
||||||
|
,NABNUM
|
||||||
|
,NABPRICE
|
||||||
|
,NABVARYMNY
|
||||||
|
,NINMNY
|
||||||
|
,NINNUM
|
||||||
|
,NINVARYMNY
|
||||||
|
,NMONTHPRICE
|
||||||
|
,NOUTMNY
|
||||||
|
,NOUTNUM
|
||||||
|
,NOUTVARYMNY
|
||||||
|
,NPLANEDPRICE
|
||||||
|
,NVARIANCERATE
|
||||||
|
,PK_CORP
|
||||||
|
,TS
|
||||||
|
,VBATCH
|
||||||
|
,VFREE1
|
||||||
|
,VFREE10
|
||||||
|
,VFREE2
|
||||||
|
,VFREE3
|
||||||
|
,VFREE4
|
||||||
|
,VFREE5
|
||||||
|
,VFREE6
|
||||||
|
,VFREE7
|
||||||
|
,VFREE8
|
||||||
|
,VFREE9
|
||||||
|
</sql>
|
||||||
|
<!-- 查询 采用==查询 -->
|
||||||
|
<select id="entity_list_base" resultMap="get-IaMonthledgerEntity-result" parameterType = "com.hzya.frame.plugin.lets.entity.IaMonthledgerEntity">
|
||||||
|
select
|
||||||
|
<include refid="IaMonthledgerEntity_Base_Column_List" />
|
||||||
|
from IA_MONTHLEDGER
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="btryflag != null and btryflag != ''"> and BTRYFLAG = #{btryflag} </if>
|
||||||
|
<if test="caccountmonth != null and caccountmonth != ''"> and CACCOUNTMONTH = #{caccountmonth} </if>
|
||||||
|
<if test="caccountyear != null and caccountyear != ''"> and CACCOUNTYEAR = #{caccountyear} </if>
|
||||||
|
<if test="cinventoryid != null and cinventoryid != ''"> and CINVENTORYID = #{cinventoryid} </if>
|
||||||
|
<if test="cmonthledgerid != null and cmonthledgerid != ''"> and CMONTHLEDGERID = #{cmonthledgerid} </if>
|
||||||
|
<if test="crdcenterid != null and crdcenterid != ''"> and CRDCENTERID = #{crdcenterid} </if>
|
||||||
|
<if test="cvendorid != null and cvendorid != ''"> and CVENDORID = #{cvendorid} </if>
|
||||||
|
<if test="dr != null and dr != ''"> and DR = #{dr} </if>
|
||||||
|
<if test="fpricemodeflag != null and fpricemodeflag != ''"> and FPRICEMODEFLAG = #{fpricemodeflag} </if>
|
||||||
|
<if test="frecordtypeflag != null and frecordtypeflag != ''"> and FRECORDTYPEFLAG = #{frecordtypeflag} </if>
|
||||||
|
<if test="nabmny != null and nabmny != ''"> and NABMNY = #{nabmny} </if>
|
||||||
|
<if test="nabnum != null and nabnum != ''"> and NABNUM = #{nabnum} </if>
|
||||||
|
<if test="nabprice != null and nabprice != ''"> and NABPRICE = #{nabprice} </if>
|
||||||
|
<if test="nabvarymny != null and nabvarymny != ''"> and NABVARYMNY = #{nabvarymny} </if>
|
||||||
|
<if test="ninmny != null and ninmny != ''"> and NINMNY = #{ninmny} </if>
|
||||||
|
<if test="ninnum != null and ninnum != ''"> and NINNUM = #{ninnum} </if>
|
||||||
|
<if test="ninvarymny != null and ninvarymny != ''"> and NINVARYMNY = #{ninvarymny} </if>
|
||||||
|
<if test="nmonthprice != null and nmonthprice != ''"> and NMONTHPRICE = #{nmonthprice} </if>
|
||||||
|
<if test="noutmny != null and noutmny != ''"> and NOUTMNY = #{noutmny} </if>
|
||||||
|
<if test="noutnum != null and noutnum != ''"> and NOUTNUM = #{noutnum} </if>
|
||||||
|
<if test="noutvarymny != null and noutvarymny != ''"> and NOUTVARYMNY = #{noutvarymny} </if>
|
||||||
|
<if test="nplanedprice != null and nplanedprice != ''"> and NPLANEDPRICE = #{nplanedprice} </if>
|
||||||
|
<if test="nvariancerate != null and nvariancerate != ''"> and NVARIANCERATE = #{nvariancerate} </if>
|
||||||
|
<if test="pkCorp != null and pkCorp != ''"> and PK_CORP = #{pkCorp} </if>
|
||||||
|
<if test="ts != null and ts != ''"> and TS = #{ts} </if>
|
||||||
|
<if test="vbatch != null and vbatch != ''"> and VBATCH = #{vbatch} </if>
|
||||||
|
<if test="vfree1 != null and vfree1 != ''"> and VFREE1 = #{vfree1} </if>
|
||||||
|
<if test="vfree10 != null and vfree10 != ''"> and VFREE10 = #{vfree10} </if>
|
||||||
|
<if test="vfree2 != null and vfree2 != ''"> and VFREE2 = #{vfree2} </if>
|
||||||
|
<if test="vfree3 != null and vfree3 != ''"> and VFREE3 = #{vfree3} </if>
|
||||||
|
<if test="vfree4 != null and vfree4 != ''"> and VFREE4 = #{vfree4} </if>
|
||||||
|
<if test="vfree5 != null and vfree5 != ''"> and VFREE5 = #{vfree5} </if>
|
||||||
|
<if test="vfree6 != null and vfree6 != ''"> and VFREE6 = #{vfree6} </if>
|
||||||
|
<if test="vfree7 != null and vfree7 != ''"> and VFREE7 = #{vfree7} </if>
|
||||||
|
<if test="vfree8 != null and vfree8 != ''"> and VFREE8 = #{vfree8} </if>
|
||||||
|
<if test="vfree9 != null and vfree9 != ''"> and VFREE9 = #{vfree9} </if>
|
||||||
|
ORDER BY TS DESC
|
||||||
|
</trim>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询符合条件的数量 -->
|
||||||
|
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.plugin.lets.entity.IaMonthledgerEntity">
|
||||||
|
select count(1) from IA_MONTHLEDGER
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="btryflag != null and btryflag != ''"> and BTRYFLAG = #{btryflag} </if>
|
||||||
|
<if test="caccountmonth != null and caccountmonth != ''"> and CACCOUNTMONTH = #{caccountmonth} </if>
|
||||||
|
<if test="caccountyear != null and caccountyear != ''"> and CACCOUNTYEAR = #{caccountyear} </if>
|
||||||
|
<if test="cinventoryid != null and cinventoryid != ''"> and CINVENTORYID = #{cinventoryid} </if>
|
||||||
|
<if test="cmonthledgerid != null and cmonthledgerid != ''"> and CMONTHLEDGERID = #{cmonthledgerid} </if>
|
||||||
|
<if test="crdcenterid != null and crdcenterid != ''"> and CRDCENTERID = #{crdcenterid} </if>
|
||||||
|
<if test="cvendorid != null and cvendorid != ''"> and CVENDORID = #{cvendorid} </if>
|
||||||
|
<if test="dr != null and dr != ''"> and DR = #{dr} </if>
|
||||||
|
<if test="fpricemodeflag != null and fpricemodeflag != ''"> and FPRICEMODEFLAG = #{fpricemodeflag} </if>
|
||||||
|
<if test="frecordtypeflag != null and frecordtypeflag != ''"> and FRECORDTYPEFLAG = #{frecordtypeflag} </if>
|
||||||
|
<if test="nabmny != null and nabmny != ''"> and NABMNY = #{nabmny} </if>
|
||||||
|
<if test="nabnum != null and nabnum != ''"> and NABNUM = #{nabnum} </if>
|
||||||
|
<if test="nabprice != null and nabprice != ''"> and NABPRICE = #{nabprice} </if>
|
||||||
|
<if test="nabvarymny != null and nabvarymny != ''"> and NABVARYMNY = #{nabvarymny} </if>
|
||||||
|
<if test="ninmny != null and ninmny != ''"> and NINMNY = #{ninmny} </if>
|
||||||
|
<if test="ninnum != null and ninnum != ''"> and NINNUM = #{ninnum} </if>
|
||||||
|
<if test="ninvarymny != null and ninvarymny != ''"> and NINVARYMNY = #{ninvarymny} </if>
|
||||||
|
<if test="nmonthprice != null and nmonthprice != ''"> and NMONTHPRICE = #{nmonthprice} </if>
|
||||||
|
<if test="noutmny != null and noutmny != ''"> and NOUTMNY = #{noutmny} </if>
|
||||||
|
<if test="noutnum != null and noutnum != ''"> and NOUTNUM = #{noutnum} </if>
|
||||||
|
<if test="noutvarymny != null and noutvarymny != ''"> and NOUTVARYMNY = #{noutvarymny} </if>
|
||||||
|
<if test="nplanedprice != null and nplanedprice != ''"> and NPLANEDPRICE = #{nplanedprice} </if>
|
||||||
|
<if test="nvariancerate != null and nvariancerate != ''"> and NVARIANCERATE = #{nvariancerate} </if>
|
||||||
|
<if test="pkCorp != null and pkCorp != ''"> and PK_CORP = #{pkCorp} </if>
|
||||||
|
<if test="ts != null and ts != ''"> and TS = #{ts} </if>
|
||||||
|
<if test="vbatch != null and vbatch != ''"> and VBATCH = #{vbatch} </if>
|
||||||
|
<if test="vfree1 != null and vfree1 != ''"> and VFREE1 = #{vfree1} </if>
|
||||||
|
<if test="vfree10 != null and vfree10 != ''"> and VFREE10 = #{vfree10} </if>
|
||||||
|
<if test="vfree2 != null and vfree2 != ''"> and VFREE2 = #{vfree2} </if>
|
||||||
|
<if test="vfree3 != null and vfree3 != ''"> and VFREE3 = #{vfree3} </if>
|
||||||
|
<if test="vfree4 != null and vfree4 != ''"> and VFREE4 = #{vfree4} </if>
|
||||||
|
<if test="vfree5 != null and vfree5 != ''"> and VFREE5 = #{vfree5} </if>
|
||||||
|
<if test="vfree6 != null and vfree6 != ''"> and VFREE6 = #{vfree6} </if>
|
||||||
|
<if test="vfree7 != null and vfree7 != ''"> and VFREE7 = #{vfree7} </if>
|
||||||
|
<if test="vfree8 != null and vfree8 != ''"> and VFREE8 = #{vfree8} </if>
|
||||||
|
<if test="vfree9 != null and vfree9 != ''"> and VFREE9 = #{vfree9} </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-IaMonthledgerEntity-result" parameterType = "com.hzya.frame.plugin.lets.entity.IaMonthledgerEntity">
|
||||||
|
select
|
||||||
|
<include refid="IaMonthledgerEntity_Base_Column_List" />
|
||||||
|
from IA_MONTHLEDGER
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="btryflag != null and btryflag != ''"> and BTRYFLAG like concat('%',#{btryflag},'%') </if>
|
||||||
|
<if test="caccountmonth != null and caccountmonth != ''"> and CACCOUNTMONTH like concat('%',#{caccountmonth},'%') </if>
|
||||||
|
<if test="caccountyear != null and caccountyear != ''"> and CACCOUNTYEAR like concat('%',#{caccountyear},'%') </if>
|
||||||
|
<if test="cinventoryid != null and cinventoryid != ''"> and CINVENTORYID like concat('%',#{cinventoryid},'%') </if>
|
||||||
|
<if test="cmonthledgerid != null and cmonthledgerid != ''"> and CMONTHLEDGERID like concat('%',#{cmonthledgerid},'%') </if>
|
||||||
|
<if test="crdcenterid != null and crdcenterid != ''"> and CRDCENTERID like concat('%',#{crdcenterid},'%') </if>
|
||||||
|
<if test="cvendorid != null and cvendorid != ''"> and CVENDORID like concat('%',#{cvendorid},'%') </if>
|
||||||
|
<if test="dr != null and dr != ''"> and DR like concat('%',#{dr},'%') </if>
|
||||||
|
<if test="fpricemodeflag != null and fpricemodeflag != ''"> and FPRICEMODEFLAG like concat('%',#{fpricemodeflag},'%') </if>
|
||||||
|
<if test="frecordtypeflag != null and frecordtypeflag != ''"> and FRECORDTYPEFLAG like concat('%',#{frecordtypeflag},'%') </if>
|
||||||
|
<if test="nabmny != null and nabmny != ''"> and NABMNY like concat('%',#{nabmny},'%') </if>
|
||||||
|
<if test="nabnum != null and nabnum != ''"> and NABNUM like concat('%',#{nabnum},'%') </if>
|
||||||
|
<if test="nabprice != null and nabprice != ''"> and NABPRICE like concat('%',#{nabprice},'%') </if>
|
||||||
|
<if test="nabvarymny != null and nabvarymny != ''"> and NABVARYMNY like concat('%',#{nabvarymny},'%') </if>
|
||||||
|
<if test="ninmny != null and ninmny != ''"> and NINMNY like concat('%',#{ninmny},'%') </if>
|
||||||
|
<if test="ninnum != null and ninnum != ''"> and NINNUM like concat('%',#{ninnum},'%') </if>
|
||||||
|
<if test="ninvarymny != null and ninvarymny != ''"> and NINVARYMNY like concat('%',#{ninvarymny},'%') </if>
|
||||||
|
<if test="nmonthprice != null and nmonthprice != ''"> and NMONTHPRICE like concat('%',#{nmonthprice},'%') </if>
|
||||||
|
<if test="noutmny != null and noutmny != ''"> and NOUTMNY like concat('%',#{noutmny},'%') </if>
|
||||||
|
<if test="noutnum != null and noutnum != ''"> and NOUTNUM like concat('%',#{noutnum},'%') </if>
|
||||||
|
<if test="noutvarymny != null and noutvarymny != ''"> and NOUTVARYMNY like concat('%',#{noutvarymny},'%') </if>
|
||||||
|
<if test="nplanedprice != null and nplanedprice != ''"> and NPLANEDPRICE like concat('%',#{nplanedprice},'%') </if>
|
||||||
|
<if test="nvariancerate != null and nvariancerate != ''"> and NVARIANCERATE like concat('%',#{nvariancerate},'%') </if>
|
||||||
|
<if test="pkCorp != null and pkCorp != ''"> and PK_CORP like concat('%',#{pkCorp},'%') </if>
|
||||||
|
<if test="ts != null and ts != ''"> and TS like concat('%',#{ts},'%') </if>
|
||||||
|
<if test="vbatch != null and vbatch != ''"> and VBATCH like concat('%',#{vbatch},'%') </if>
|
||||||
|
<if test="vfree1 != null and vfree1 != ''"> and VFREE1 like concat('%',#{vfree1},'%') </if>
|
||||||
|
<if test="vfree10 != null and vfree10 != ''"> and VFREE10 like concat('%',#{vfree10},'%') </if>
|
||||||
|
<if test="vfree2 != null and vfree2 != ''"> and VFREE2 like concat('%',#{vfree2},'%') </if>
|
||||||
|
<if test="vfree3 != null and vfree3 != ''"> and VFREE3 like concat('%',#{vfree3},'%') </if>
|
||||||
|
<if test="vfree4 != null and vfree4 != ''"> and VFREE4 like concat('%',#{vfree4},'%') </if>
|
||||||
|
<if test="vfree5 != null and vfree5 != ''"> and VFREE5 like concat('%',#{vfree5},'%') </if>
|
||||||
|
<if test="vfree6 != null and vfree6 != ''"> and VFREE6 like concat('%',#{vfree6},'%') </if>
|
||||||
|
<if test="vfree7 != null and vfree7 != ''"> and VFREE7 like concat('%',#{vfree7},'%') </if>
|
||||||
|
<if test="vfree8 != null and vfree8 != ''"> and VFREE8 like concat('%',#{vfree8},'%') </if>
|
||||||
|
<if test="vfree9 != null and vfree9 != ''"> and VFREE9 like concat('%',#{vfree9},'%') </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="IaMonthledgerentity_list_or" resultMap="get-IaMonthledgerEntity-result" parameterType = "com.hzya.frame.plugin.lets.entity.IaMonthledgerEntity">
|
||||||
|
select
|
||||||
|
<include refid="IaMonthledgerEntity_Base_Column_List" />
|
||||||
|
from IA_MONTHLEDGER
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="btryflag != null and btryflag != ''"> or BTRYFLAG = #{btryflag} </if>
|
||||||
|
<if test="caccountmonth != null and caccountmonth != ''"> or CACCOUNTMONTH = #{caccountmonth} </if>
|
||||||
|
<if test="caccountyear != null and caccountyear != ''"> or CACCOUNTYEAR = #{caccountyear} </if>
|
||||||
|
<if test="cinventoryid != null and cinventoryid != ''"> or CINVENTORYID = #{cinventoryid} </if>
|
||||||
|
<if test="cmonthledgerid != null and cmonthledgerid != ''"> or CMONTHLEDGERID = #{cmonthledgerid} </if>
|
||||||
|
<if test="crdcenterid != null and crdcenterid != ''"> or CRDCENTERID = #{crdcenterid} </if>
|
||||||
|
<if test="cvendorid != null and cvendorid != ''"> or CVENDORID = #{cvendorid} </if>
|
||||||
|
<if test="dr != null and dr != ''"> or DR = #{dr} </if>
|
||||||
|
<if test="fpricemodeflag != null and fpricemodeflag != ''"> or FPRICEMODEFLAG = #{fpricemodeflag} </if>
|
||||||
|
<if test="frecordtypeflag != null and frecordtypeflag != ''"> or FRECORDTYPEFLAG = #{frecordtypeflag} </if>
|
||||||
|
<if test="nabmny != null and nabmny != ''"> or NABMNY = #{nabmny} </if>
|
||||||
|
<if test="nabnum != null and nabnum != ''"> or NABNUM = #{nabnum} </if>
|
||||||
|
<if test="nabprice != null and nabprice != ''"> or NABPRICE = #{nabprice} </if>
|
||||||
|
<if test="nabvarymny != null and nabvarymny != ''"> or NABVARYMNY = #{nabvarymny} </if>
|
||||||
|
<if test="ninmny != null and ninmny != ''"> or NINMNY = #{ninmny} </if>
|
||||||
|
<if test="ninnum != null and ninnum != ''"> or NINNUM = #{ninnum} </if>
|
||||||
|
<if test="ninvarymny != null and ninvarymny != ''"> or NINVARYMNY = #{ninvarymny} </if>
|
||||||
|
<if test="nmonthprice != null and nmonthprice != ''"> or NMONTHPRICE = #{nmonthprice} </if>
|
||||||
|
<if test="noutmny != null and noutmny != ''"> or NOUTMNY = #{noutmny} </if>
|
||||||
|
<if test="noutnum != null and noutnum != ''"> or NOUTNUM = #{noutnum} </if>
|
||||||
|
<if test="noutvarymny != null and noutvarymny != ''"> or NOUTVARYMNY = #{noutvarymny} </if>
|
||||||
|
<if test="nplanedprice != null and nplanedprice != ''"> or NPLANEDPRICE = #{nplanedprice} </if>
|
||||||
|
<if test="nvariancerate != null and nvariancerate != ''"> or NVARIANCERATE = #{nvariancerate} </if>
|
||||||
|
<if test="pkCorp != null and pkCorp != ''"> or PK_CORP = #{pkCorp} </if>
|
||||||
|
<if test="ts != null and ts != ''"> or TS = #{ts} </if>
|
||||||
|
<if test="vbatch != null and vbatch != ''"> or VBATCH = #{vbatch} </if>
|
||||||
|
<if test="vfree1 != null and vfree1 != ''"> or VFREE1 = #{vfree1} </if>
|
||||||
|
<if test="vfree10 != null and vfree10 != ''"> or VFREE10 = #{vfree10} </if>
|
||||||
|
<if test="vfree2 != null and vfree2 != ''"> or VFREE2 = #{vfree2} </if>
|
||||||
|
<if test="vfree3 != null and vfree3 != ''"> or VFREE3 = #{vfree3} </if>
|
||||||
|
<if test="vfree4 != null and vfree4 != ''"> or VFREE4 = #{vfree4} </if>
|
||||||
|
<if test="vfree5 != null and vfree5 != ''"> or VFREE5 = #{vfree5} </if>
|
||||||
|
<if test="vfree6 != null and vfree6 != ''"> or VFREE6 = #{vfree6} </if>
|
||||||
|
<if test="vfree7 != null and vfree7 != ''"> or VFREE7 = #{vfree7} </if>
|
||||||
|
<if test="vfree8 != null and vfree8 != ''"> or VFREE8 = #{vfree8} </if>
|
||||||
|
<if test="vfree9 != null and vfree9 != ''"> or VFREE9 = #{vfree9} </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.IaMonthledgerEntity" keyProperty="cmonthledgerid" useGeneratedKeys="true">
|
||||||
|
insert into IA_MONTHLEDGER(
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="btryflag != null and btryflag != ''"> BTRYFLAG , </if>
|
||||||
|
<if test="caccountmonth != null and caccountmonth != ''"> CACCOUNTMONTH , </if>
|
||||||
|
<if test="caccountyear != null and caccountyear != ''"> CACCOUNTYEAR , </if>
|
||||||
|
<if test="cinventoryid != null and cinventoryid != ''"> CINVENTORYID , </if>
|
||||||
|
<if test="cmonthledgerid != null and cmonthledgerid != ''"> CMONTHLEDGERID , </if>
|
||||||
|
<if test="crdcenterid != null and crdcenterid != ''"> CRDCENTERID , </if>
|
||||||
|
<if test="cvendorid != null and cvendorid != ''"> CVENDORID , </if>
|
||||||
|
<if test="dr != null and dr != ''"> DR , </if>
|
||||||
|
<if test="fpricemodeflag != null and fpricemodeflag != ''"> FPRICEMODEFLAG , </if>
|
||||||
|
<if test="frecordtypeflag != null and frecordtypeflag != ''"> FRECORDTYPEFLAG , </if>
|
||||||
|
<if test="nabmny != null and nabmny != ''"> NABMNY , </if>
|
||||||
|
<if test="nabnum != null and nabnum != ''"> NABNUM , </if>
|
||||||
|
<if test="nabprice != null and nabprice != ''"> NABPRICE , </if>
|
||||||
|
<if test="nabvarymny != null and nabvarymny != ''"> NABVARYMNY , </if>
|
||||||
|
<if test="ninmny != null and ninmny != ''"> NINMNY , </if>
|
||||||
|
<if test="ninnum != null and ninnum != ''"> NINNUM , </if>
|
||||||
|
<if test="ninvarymny != null and ninvarymny != ''"> NINVARYMNY , </if>
|
||||||
|
<if test="nmonthprice != null and nmonthprice != ''"> NMONTHPRICE , </if>
|
||||||
|
<if test="noutmny != null and noutmny != ''"> NOUTMNY , </if>
|
||||||
|
<if test="noutnum != null and noutnum != ''"> NOUTNUM , </if>
|
||||||
|
<if test="noutvarymny != null and noutvarymny != ''"> NOUTVARYMNY , </if>
|
||||||
|
<if test="nplanedprice != null and nplanedprice != ''"> NPLANEDPRICE , </if>
|
||||||
|
<if test="nvariancerate != null and nvariancerate != ''"> NVARIANCERATE , </if>
|
||||||
|
<if test="pkCorp != null and pkCorp != ''"> PK_CORP , </if>
|
||||||
|
<if test="ts != null and ts != ''"> TS , </if>
|
||||||
|
<if test="vbatch != null and vbatch != ''"> VBATCH , </if>
|
||||||
|
<if test="vfree1 != null and vfree1 != ''"> VFREE1 , </if>
|
||||||
|
<if test="vfree10 != null and vfree10 != ''"> VFREE10 , </if>
|
||||||
|
<if test="vfree2 != null and vfree2 != ''"> VFREE2 , </if>
|
||||||
|
<if test="vfree3 != null and vfree3 != ''"> VFREE3 , </if>
|
||||||
|
<if test="vfree4 != null and vfree4 != ''"> VFREE4 , </if>
|
||||||
|
<if test="vfree5 != null and vfree5 != ''"> VFREE5 , </if>
|
||||||
|
<if test="vfree6 != null and vfree6 != ''"> VFREE6 , </if>
|
||||||
|
<if test="vfree7 != null and vfree7 != ''"> VFREE7 , </if>
|
||||||
|
<if test="vfree8 != null and vfree8 != ''"> VFREE8 , </if>
|
||||||
|
<if test="vfree9 != null and vfree9 != ''"> VFREE9 , </if>
|
||||||
|
<if test="sorts == null ">sorts,</if>
|
||||||
|
<if test="sts == null ">sts,</if>
|
||||||
|
</trim>
|
||||||
|
)values(
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="btryflag != null and btryflag != ''"> #{btryflag} ,</if>
|
||||||
|
<if test="caccountmonth != null and caccountmonth != ''"> #{caccountmonth} ,</if>
|
||||||
|
<if test="caccountyear != null and caccountyear != ''"> #{caccountyear} ,</if>
|
||||||
|
<if test="cinventoryid != null and cinventoryid != ''"> #{cinventoryid} ,</if>
|
||||||
|
<if test="cmonthledgerid != null and cmonthledgerid != ''"> #{cmonthledgerid} ,</if>
|
||||||
|
<if test="crdcenterid != null and crdcenterid != ''"> #{crdcenterid} ,</if>
|
||||||
|
<if test="cvendorid != null and cvendorid != ''"> #{cvendorid} ,</if>
|
||||||
|
<if test="dr != null and dr != ''"> #{dr} ,</if>
|
||||||
|
<if test="fpricemodeflag != null and fpricemodeflag != ''"> #{fpricemodeflag} ,</if>
|
||||||
|
<if test="frecordtypeflag != null and frecordtypeflag != ''"> #{frecordtypeflag} ,</if>
|
||||||
|
<if test="nabmny != null and nabmny != ''"> #{nabmny} ,</if>
|
||||||
|
<if test="nabnum != null and nabnum != ''"> #{nabnum} ,</if>
|
||||||
|
<if test="nabprice != null and nabprice != ''"> #{nabprice} ,</if>
|
||||||
|
<if test="nabvarymny != null and nabvarymny != ''"> #{nabvarymny} ,</if>
|
||||||
|
<if test="ninmny != null and ninmny != ''"> #{ninmny} ,</if>
|
||||||
|
<if test="ninnum != null and ninnum != ''"> #{ninnum} ,</if>
|
||||||
|
<if test="ninvarymny != null and ninvarymny != ''"> #{ninvarymny} ,</if>
|
||||||
|
<if test="nmonthprice != null and nmonthprice != ''"> #{nmonthprice} ,</if>
|
||||||
|
<if test="noutmny != null and noutmny != ''"> #{noutmny} ,</if>
|
||||||
|
<if test="noutnum != null and noutnum != ''"> #{noutnum} ,</if>
|
||||||
|
<if test="noutvarymny != null and noutvarymny != ''"> #{noutvarymny} ,</if>
|
||||||
|
<if test="nplanedprice != null and nplanedprice != ''"> #{nplanedprice} ,</if>
|
||||||
|
<if test="nvariancerate != null and nvariancerate != ''"> #{nvariancerate} ,</if>
|
||||||
|
<if test="pkCorp != null and pkCorp != ''"> #{pkCorp} ,</if>
|
||||||
|
<if test="ts != null and ts != ''"> #{ts} ,</if>
|
||||||
|
<if test="vbatch != null and vbatch != ''"> #{vbatch} ,</if>
|
||||||
|
<if test="vfree1 != null and vfree1 != ''"> #{vfree1} ,</if>
|
||||||
|
<if test="vfree10 != null and vfree10 != ''"> #{vfree10} ,</if>
|
||||||
|
<if test="vfree2 != null and vfree2 != ''"> #{vfree2} ,</if>
|
||||||
|
<if test="vfree3 != null and vfree3 != ''"> #{vfree3} ,</if>
|
||||||
|
<if test="vfree4 != null and vfree4 != ''"> #{vfree4} ,</if>
|
||||||
|
<if test="vfree5 != null and vfree5 != ''"> #{vfree5} ,</if>
|
||||||
|
<if test="vfree6 != null and vfree6 != ''"> #{vfree6} ,</if>
|
||||||
|
<if test="vfree7 != null and vfree7 != ''"> #{vfree7} ,</if>
|
||||||
|
<if test="vfree8 != null and vfree8 != ''"> #{vfree8} ,</if>
|
||||||
|
<if test="vfree9 != null and vfree9 != ''"> #{vfree9} ,</if>
|
||||||
|
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from IA_MONTHLEDGER a WHERE a.sts = 'Y' ),</if>
|
||||||
|
<if test="sts == null ">'Y',</if>
|
||||||
|
</trim>
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
<!-- 批量新增 -->
|
||||||
|
<insert id="entityInsertBatch" keyProperty="cmonthledgerid" useGeneratedKeys="true">
|
||||||
|
insert into IA_MONTHLEDGER(BTRYFLAG, CACCOUNTMONTH, CACCOUNTYEAR, CINVENTORYID, CRDCENTERID, CVENDORID, DR, FPRICEMODEFLAG, FRECORDTYPEFLAG, NABMNY, NABNUM, NABPRICE, NABVARYMNY, NINMNY, NINNUM, NINVARYMNY, NMONTHPRICE, NOUTMNY, NOUTNUM, NOUTVARYMNY, NPLANEDPRICE, NVARIANCERATE, PK_CORP, TS, VBATCH, VFREE1, VFREE10, VFREE2, VFREE3, VFREE4, VFREE5, VFREE6, VFREE7, VFREE8, VFREE9, sts)
|
||||||
|
values
|
||||||
|
<foreach collection="entities" item="entity" separator=",">
|
||||||
|
(#{entity.btryflag},#{entity.caccountmonth},#{entity.caccountyear},#{entity.cinventoryid},#{entity.crdcenterid},#{entity.cvendorid},#{entity.dr},#{entity.fpricemodeflag},#{entity.frecordtypeflag},#{entity.nabmny},#{entity.nabnum},#{entity.nabprice},#{entity.nabvarymny},#{entity.ninmny},#{entity.ninnum},#{entity.ninvarymny},#{entity.nmonthprice},#{entity.noutmny},#{entity.noutnum},#{entity.noutvarymny},#{entity.nplanedprice},#{entity.nvariancerate},#{entity.pkCorp},#{entity.ts},#{entity.vbatch},#{entity.vfree1},#{entity.vfree10},#{entity.vfree2},#{entity.vfree3},#{entity.vfree4},#{entity.vfree5},#{entity.vfree6},#{entity.vfree7},#{entity.vfree8},#{entity.vfree9}, 'Y')
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
<!-- 批量新增或者修改-->
|
||||||
|
<insert id="entityInsertOrUpdateBatch" keyProperty="cmonthledgerid" useGeneratedKeys="true">
|
||||||
|
insert into IA_MONTHLEDGER(BTRYFLAG, CACCOUNTMONTH, CACCOUNTYEAR, CINVENTORYID, CRDCENTERID, CVENDORID, DR, FPRICEMODEFLAG, FRECORDTYPEFLAG, NABMNY, NABNUM, NABPRICE, NABVARYMNY, NINMNY, NINNUM, NINVARYMNY, NMONTHPRICE, NOUTMNY, NOUTNUM, NOUTVARYMNY, NPLANEDPRICE, NVARIANCERATE, PK_CORP, TS, VBATCH, VFREE1, VFREE10, VFREE2, VFREE3, VFREE4, VFREE5, VFREE6, VFREE7, VFREE8, VFREE9)
|
||||||
|
values
|
||||||
|
<foreach collection="entities" item="entity" separator=",">
|
||||||
|
(#{entity.btryflag},#{entity.caccountmonth},#{entity.caccountyear},#{entity.cinventoryid},#{entity.crdcenterid},#{entity.cvendorid},#{entity.dr},#{entity.fpricemodeflag},#{entity.frecordtypeflag},#{entity.nabmny},#{entity.nabnum},#{entity.nabprice},#{entity.nabvarymny},#{entity.ninmny},#{entity.ninnum},#{entity.ninvarymny},#{entity.nmonthprice},#{entity.noutmny},#{entity.noutnum},#{entity.noutvarymny},#{entity.nplanedprice},#{entity.nvariancerate},#{entity.pkCorp},#{entity.ts},#{entity.vbatch},#{entity.vfree1},#{entity.vfree10},#{entity.vfree2},#{entity.vfree3},#{entity.vfree4},#{entity.vfree5},#{entity.vfree6},#{entity.vfree7},#{entity.vfree8},#{entity.vfree9})
|
||||||
|
</foreach>
|
||||||
|
on duplicate key update
|
||||||
|
BTRYFLAG = values(BTRYFLAG),
|
||||||
|
CACCOUNTMONTH = values(CACCOUNTMONTH),
|
||||||
|
CACCOUNTYEAR = values(CACCOUNTYEAR),
|
||||||
|
CINVENTORYID = values(CINVENTORYID),
|
||||||
|
CRDCENTERID = values(CRDCENTERID),
|
||||||
|
CVENDORID = values(CVENDORID),
|
||||||
|
DR = values(DR),
|
||||||
|
FPRICEMODEFLAG = values(FPRICEMODEFLAG),
|
||||||
|
FRECORDTYPEFLAG = values(FRECORDTYPEFLAG),
|
||||||
|
NABMNY = values(NABMNY),
|
||||||
|
NABNUM = values(NABNUM),
|
||||||
|
NABPRICE = values(NABPRICE),
|
||||||
|
NABVARYMNY = values(NABVARYMNY),
|
||||||
|
NINMNY = values(NINMNY),
|
||||||
|
NINNUM = values(NINNUM),
|
||||||
|
NINVARYMNY = values(NINVARYMNY),
|
||||||
|
NMONTHPRICE = values(NMONTHPRICE),
|
||||||
|
NOUTMNY = values(NOUTMNY),
|
||||||
|
NOUTNUM = values(NOUTNUM),
|
||||||
|
NOUTVARYMNY = values(NOUTVARYMNY),
|
||||||
|
NPLANEDPRICE = values(NPLANEDPRICE),
|
||||||
|
NVARIANCERATE = values(NVARIANCERATE),
|
||||||
|
PK_CORP = values(PK_CORP),
|
||||||
|
TS = values(TS),
|
||||||
|
VBATCH = values(VBATCH),
|
||||||
|
VFREE1 = values(VFREE1),
|
||||||
|
VFREE10 = values(VFREE10),
|
||||||
|
VFREE2 = values(VFREE2),
|
||||||
|
VFREE3 = values(VFREE3),
|
||||||
|
VFREE4 = values(VFREE4),
|
||||||
|
VFREE5 = values(VFREE5),
|
||||||
|
VFREE6 = values(VFREE6),
|
||||||
|
VFREE7 = values(VFREE7),
|
||||||
|
VFREE8 = values(VFREE8),
|
||||||
|
VFREE9 = values(VFREE9)</insert>
|
||||||
|
<!--通过主键修改方法-->
|
||||||
|
<update id="entity_update" parameterType = "com.hzya.frame.plugin.lets.entity.IaMonthledgerEntity" >
|
||||||
|
update IA_MONTHLEDGER set
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="btryflag != null and btryflag != ''"> BTRYFLAG = #{btryflag},</if>
|
||||||
|
<if test="caccountmonth != null and caccountmonth != ''"> CACCOUNTMONTH = #{caccountmonth},</if>
|
||||||
|
<if test="caccountyear != null and caccountyear != ''"> CACCOUNTYEAR = #{caccountyear},</if>
|
||||||
|
<if test="cinventoryid != null and cinventoryid != ''"> CINVENTORYID = #{cinventoryid},</if>
|
||||||
|
<if test="crdcenterid != null and crdcenterid != ''"> CRDCENTERID = #{crdcenterid},</if>
|
||||||
|
<if test="cvendorid != null and cvendorid != ''"> CVENDORID = #{cvendorid},</if>
|
||||||
|
<if test="dr != null and dr != ''"> DR = #{dr},</if>
|
||||||
|
<if test="fpricemodeflag != null and fpricemodeflag != ''"> FPRICEMODEFLAG = #{fpricemodeflag},</if>
|
||||||
|
<if test="frecordtypeflag != null and frecordtypeflag != ''"> FRECORDTYPEFLAG = #{frecordtypeflag},</if>
|
||||||
|
<if test="nabmny != null and nabmny != ''"> NABMNY = #{nabmny},</if>
|
||||||
|
<if test="nabnum != null and nabnum != ''"> NABNUM = #{nabnum},</if>
|
||||||
|
<if test="nabprice != null and nabprice != ''"> NABPRICE = #{nabprice},</if>
|
||||||
|
<if test="nabvarymny != null and nabvarymny != ''"> NABVARYMNY = #{nabvarymny},</if>
|
||||||
|
<if test="ninmny != null and ninmny != ''"> NINMNY = #{ninmny},</if>
|
||||||
|
<if test="ninnum != null and ninnum != ''"> NINNUM = #{ninnum},</if>
|
||||||
|
<if test="ninvarymny != null and ninvarymny != ''"> NINVARYMNY = #{ninvarymny},</if>
|
||||||
|
<if test="nmonthprice != null and nmonthprice != ''"> NMONTHPRICE = #{nmonthprice},</if>
|
||||||
|
<if test="noutmny != null and noutmny != ''"> NOUTMNY = #{noutmny},</if>
|
||||||
|
<if test="noutnum != null and noutnum != ''"> NOUTNUM = #{noutnum},</if>
|
||||||
|
<if test="noutvarymny != null and noutvarymny != ''"> NOUTVARYMNY = #{noutvarymny},</if>
|
||||||
|
<if test="nplanedprice != null and nplanedprice != ''"> NPLANEDPRICE = #{nplanedprice},</if>
|
||||||
|
<if test="nvariancerate != null and nvariancerate != ''"> NVARIANCERATE = #{nvariancerate},</if>
|
||||||
|
<if test="pkCorp != null and pkCorp != ''"> PK_CORP = #{pkCorp},</if>
|
||||||
|
<if test="ts != null and ts != ''"> TS = #{ts},</if>
|
||||||
|
<if test="vbatch != null and vbatch != ''"> VBATCH = #{vbatch},</if>
|
||||||
|
<if test="vfree1 != null and vfree1 != ''"> VFREE1 = #{vfree1},</if>
|
||||||
|
<if test="vfree10 != null and vfree10 != ''"> VFREE10 = #{vfree10},</if>
|
||||||
|
<if test="vfree2 != null and vfree2 != ''"> VFREE2 = #{vfree2},</if>
|
||||||
|
<if test="vfree3 != null and vfree3 != ''"> VFREE3 = #{vfree3},</if>
|
||||||
|
<if test="vfree4 != null and vfree4 != ''"> VFREE4 = #{vfree4},</if>
|
||||||
|
<if test="vfree5 != null and vfree5 != ''"> VFREE5 = #{vfree5},</if>
|
||||||
|
<if test="vfree6 != null and vfree6 != ''"> VFREE6 = #{vfree6},</if>
|
||||||
|
<if test="vfree7 != null and vfree7 != ''"> VFREE7 = #{vfree7},</if>
|
||||||
|
<if test="vfree8 != null and vfree8 != ''"> VFREE8 = #{vfree8},</if>
|
||||||
|
<if test="vfree9 != null and vfree9 != ''"> VFREE9 = #{vfree9},</if>
|
||||||
|
</trim>
|
||||||
|
where CMONTHLEDGERID = #{cmonthledgerid}
|
||||||
|
</update>
|
||||||
|
<!-- 逻辑删除 -->
|
||||||
|
<update id="entity_logicDelete" parameterType = "com.hzya.frame.plugin.lets.entity.IaMonthledgerEntity" >
|
||||||
|
update IA_MONTHLEDGER set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
||||||
|
where CMONTHLEDGERID = #{cmonthledgerid}
|
||||||
|
</update>
|
||||||
|
<!-- 多条件逻辑删除 -->
|
||||||
|
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.plugin.lets.entity.IaMonthledgerEntity" >
|
||||||
|
update IA_MONTHLEDGER set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="btryflag != null and btryflag != ''"> and BTRYFLAG = #{btryflag} </if>
|
||||||
|
<if test="caccountmonth != null and caccountmonth != ''"> and CACCOUNTMONTH = #{caccountmonth} </if>
|
||||||
|
<if test="caccountyear != null and caccountyear != ''"> and CACCOUNTYEAR = #{caccountyear} </if>
|
||||||
|
<if test="cinventoryid != null and cinventoryid != ''"> and CINVENTORYID = #{cinventoryid} </if>
|
||||||
|
<if test="cmonthledgerid != null and cmonthledgerid != ''"> and CMONTHLEDGERID = #{cmonthledgerid} </if>
|
||||||
|
<if test="crdcenterid != null and crdcenterid != ''"> and CRDCENTERID = #{crdcenterid} </if>
|
||||||
|
<if test="cvendorid != null and cvendorid != ''"> and CVENDORID = #{cvendorid} </if>
|
||||||
|
<if test="dr != null and dr != ''"> and DR = #{dr} </if>
|
||||||
|
<if test="fpricemodeflag != null and fpricemodeflag != ''"> and FPRICEMODEFLAG = #{fpricemodeflag} </if>
|
||||||
|
<if test="frecordtypeflag != null and frecordtypeflag != ''"> and FRECORDTYPEFLAG = #{frecordtypeflag} </if>
|
||||||
|
<if test="nabmny != null and nabmny != ''"> and NABMNY = #{nabmny} </if>
|
||||||
|
<if test="nabnum != null and nabnum != ''"> and NABNUM = #{nabnum} </if>
|
||||||
|
<if test="nabprice != null and nabprice != ''"> and NABPRICE = #{nabprice} </if>
|
||||||
|
<if test="nabvarymny != null and nabvarymny != ''"> and NABVARYMNY = #{nabvarymny} </if>
|
||||||
|
<if test="ninmny != null and ninmny != ''"> and NINMNY = #{ninmny} </if>
|
||||||
|
<if test="ninnum != null and ninnum != ''"> and NINNUM = #{ninnum} </if>
|
||||||
|
<if test="ninvarymny != null and ninvarymny != ''"> and NINVARYMNY = #{ninvarymny} </if>
|
||||||
|
<if test="nmonthprice != null and nmonthprice != ''"> and NMONTHPRICE = #{nmonthprice} </if>
|
||||||
|
<if test="noutmny != null and noutmny != ''"> and NOUTMNY = #{noutmny} </if>
|
||||||
|
<if test="noutnum != null and noutnum != ''"> and NOUTNUM = #{noutnum} </if>
|
||||||
|
<if test="noutvarymny != null and noutvarymny != ''"> and NOUTVARYMNY = #{noutvarymny} </if>
|
||||||
|
<if test="nplanedprice != null and nplanedprice != ''"> and NPLANEDPRICE = #{nplanedprice} </if>
|
||||||
|
<if test="nvariancerate != null and nvariancerate != ''"> and NVARIANCERATE = #{nvariancerate} </if>
|
||||||
|
<if test="pkCorp != null and pkCorp != ''"> and PK_CORP = #{pkCorp} </if>
|
||||||
|
<if test="ts != null and ts != ''"> and TS = #{ts} </if>
|
||||||
|
<if test="vbatch != null and vbatch != ''"> and VBATCH = #{vbatch} </if>
|
||||||
|
<if test="vfree1 != null and vfree1 != ''"> and VFREE1 = #{vfree1} </if>
|
||||||
|
<if test="vfree10 != null and vfree10 != ''"> and VFREE10 = #{vfree10} </if>
|
||||||
|
<if test="vfree2 != null and vfree2 != ''"> and VFREE2 = #{vfree2} </if>
|
||||||
|
<if test="vfree3 != null and vfree3 != ''"> and VFREE3 = #{vfree3} </if>
|
||||||
|
<if test="vfree4 != null and vfree4 != ''"> and VFREE4 = #{vfree4} </if>
|
||||||
|
<if test="vfree5 != null and vfree5 != ''"> and VFREE5 = #{vfree5} </if>
|
||||||
|
<if test="vfree6 != null and vfree6 != ''"> and VFREE6 = #{vfree6} </if>
|
||||||
|
<if test="vfree7 != null and vfree7 != ''"> and VFREE7 = #{vfree7} </if>
|
||||||
|
<if test="vfree8 != null and vfree8 != ''"> and VFREE8 = #{vfree8} </if>
|
||||||
|
<if test="vfree9 != null and vfree9 != ''"> and VFREE9 = #{vfree9} </if>
|
||||||
|
and sts='Y'
|
||||||
|
</trim>
|
||||||
|
</update>
|
||||||
|
<!--通过主键删除-->
|
||||||
|
<delete id="entity_delete">
|
||||||
|
delete from IA_MONTHLEDGER where CMONTHLEDGERID = #{cmonthledgerid}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
|
@ -203,8 +203,8 @@ public class AdjustInPluginInitializer extends PluginBaseEntity {
|
||||||
String end = DateUtil.format(business_end, "yyyy-MM-dd") + " 23:59:59";
|
String end = DateUtil.format(business_end, "yyyy-MM-dd") + " 23:59:59";
|
||||||
|
|
||||||
QueryOfsStockinOrderRequestVO queryOfsStockinOrderRequestVO = new QueryOfsStockinOrderRequestVO();
|
QueryOfsStockinOrderRequestVO queryOfsStockinOrderRequestVO = new QueryOfsStockinOrderRequestVO();
|
||||||
queryOfsStockinOrderRequestVO.setCreated_start(start);
|
queryOfsStockinOrderRequestVO.setClosedAt_start(start);
|
||||||
queryOfsStockinOrderRequestVO.setCreated_end(end);
|
queryOfsStockinOrderRequestVO.setClosedAt_end(end);
|
||||||
List<StockinOrderSearchResponse.StockinOrder> stockinOrders = queryOfsStockinOrder(queryOfsStockinOrderRequestVO);
|
List<StockinOrderSearchResponse.StockinOrder> stockinOrders = queryOfsStockinOrder(queryOfsStockinOrderRequestVO);
|
||||||
System.out.println(stockinOrders);
|
System.out.println(stockinOrders);
|
||||||
|
|
||||||
|
|
|
@ -150,15 +150,15 @@ public class SKUPluginInitializer extends PluginBaseEntity {
|
||||||
queryOfsSKURequestVO.setLastUpdated_start(startTimeStr);
|
queryOfsSKURequestVO.setLastUpdated_start(startTimeStr);
|
||||||
queryOfsSKURequestVO.setLastUpdated_end(endTimeStr);
|
queryOfsSKURequestVO.setLastUpdated_end(endTimeStr);
|
||||||
List<OFSSKUSearchResponse.OFSSKU> ofsskuList = queryOfsSKUs(queryOfsSKURequestVO);
|
List<OFSSKUSearchResponse.OFSSKU> ofsskuList = queryOfsSKUs(queryOfsSKURequestVO);
|
||||||
if (ofsskuList.size() == 0) {
|
if(ofsskuList.size()==0){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//分组排序,
|
//分组排序,
|
||||||
List<OFSSKUSearchResponse.OFSSKU> sortSkuList = groupAndSort(ofsskuList);
|
List<OFSSKUSearchResponse.OFSSKU> sortSkuList = groupAndSort(ofsskuList);
|
||||||
|
|
||||||
//过滤日志
|
//过滤日志
|
||||||
List<OFSSKUSearchResponse.OFSSKU> filterSkus = filterData(sortSkuList);
|
List<OFSSKUSearchResponse.OFSSKU> filterSkus = filterData(sortSkuList);
|
||||||
if (filterSkus.size() == 0) {
|
if(filterSkus.size()==0){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//具体实现
|
//具体实现
|
||||||
|
@ -182,7 +182,7 @@ public class SKUPluginInitializer extends PluginBaseEntity {
|
||||||
QueryOfsSKURequestVO queryOfsSKURequestVO = new QueryOfsSKURequestVO();
|
QueryOfsSKURequestVO queryOfsSKURequestVO = new QueryOfsSKURequestVO();
|
||||||
queryOfsSKURequestVO.setCode(split[0]);
|
queryOfsSKURequestVO.setCode(split[0]);
|
||||||
List<OFSSKUSearchResponse.OFSSKU> ofsskuList = queryOfsSKUs(queryOfsSKURequestVO);
|
List<OFSSKUSearchResponse.OFSSKU> ofsskuList = queryOfsSKUs(queryOfsSKURequestVO);
|
||||||
if (ofsskuList.size() == 0) {
|
if(ofsskuList.size()==0){
|
||||||
Assert.state(false, "根据OFS SKU主档编码:{},未查询到SKU主档,请检查入参或者OFS SKU主档。", split[0]);
|
Assert.state(false, "根据OFS SKU主档编码:{},未查询到SKU主档,请检查入参或者OFS SKU主档。", split[0]);
|
||||||
}
|
}
|
||||||
//分组排序,
|
//分组排序,
|
||||||
|
@ -190,7 +190,7 @@ public class SKUPluginInitializer extends PluginBaseEntity {
|
||||||
|
|
||||||
//过滤日志
|
//过滤日志
|
||||||
List<OFSSKUSearchResponse.OFSSKU> filterSkus = filterData(sortSkuList);
|
List<OFSSKUSearchResponse.OFSSKU> filterSkus = filterData(sortSkuList);
|
||||||
if (filterSkus.size() == 0) {
|
if(filterSkus.size()==0){
|
||||||
Assert.state(false, "根据OFS SKU主档编码:{},已被推送成功,请勿重新推送。", split[0]);
|
Assert.state(false, "根据OFS SKU主档编码:{},已被推送成功,请勿重新推送。", split[0]);
|
||||||
}
|
}
|
||||||
//具体实现
|
//具体实现
|
||||||
|
@ -216,16 +216,16 @@ public class SKUPluginInitializer extends PluginBaseEntity {
|
||||||
queryOfsSKURequestVO.setLastUpdated_start(start);
|
queryOfsSKURequestVO.setLastUpdated_start(start);
|
||||||
queryOfsSKURequestVO.setLastUpdated_end(end);
|
queryOfsSKURequestVO.setLastUpdated_end(end);
|
||||||
List<OFSSKUSearchResponse.OFSSKU> ofsskuList = queryOfsSKUs(queryOfsSKURequestVO);
|
List<OFSSKUSearchResponse.OFSSKU> ofsskuList = queryOfsSKUs(queryOfsSKURequestVO);
|
||||||
if (ofsskuList.size() == 0) {
|
if(ofsskuList.size()==0){
|
||||||
Assert.state(false, "根据期间:{} - {} 内,未查询到OFS系统中SKU主档信息,请检查。");
|
Assert.state(false,"根据期间:{} - {} 内,未查询到OFS系统中SKU主档信息,请检查。");
|
||||||
}
|
}
|
||||||
//分组排序,
|
//分组排序,
|
||||||
List<OFSSKUSearchResponse.OFSSKU> sortSkuList = groupAndSort(ofsskuList);
|
List<OFSSKUSearchResponse.OFSSKU> sortSkuList = groupAndSort(ofsskuList);
|
||||||
|
|
||||||
//过滤日志
|
//过滤日志
|
||||||
List<OFSSKUSearchResponse.OFSSKU> filterSkus = filterData(sortSkuList);
|
List<OFSSKUSearchResponse.OFSSKU> filterSkus = filterData(sortSkuList);
|
||||||
if (filterSkus.size() == 0) {
|
if(filterSkus.size()==0){
|
||||||
Assert.state(false, "根据期间:{} - {} 内询到OFS系统中SKU主档信息已全部推送,请勿重新推送。");
|
Assert.state(false,"根据期间:{} - {} 内询到OFS系统中SKU主档信息已全部推送,请勿重新推送。");
|
||||||
}
|
}
|
||||||
//具体实现
|
//具体实现
|
||||||
implement(filterSkus);
|
implement(filterSkus);
|
||||||
|
@ -239,14 +239,13 @@ public class SKUPluginInitializer extends PluginBaseEntity {
|
||||||
* 过滤成功日志
|
* 过滤成功日志
|
||||||
* rootAppPk
|
* rootAppPk
|
||||||
* [code]_[lastUpdated]
|
* [code]_[lastUpdated]
|
||||||
*
|
|
||||||
* @param ofsskuList
|
* @param ofsskuList
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<OFSSKUSearchResponse.OFSSKU> filterData(List<OFSSKUSearchResponse.OFSSKU> ofsskuList) {
|
public List<OFSSKUSearchResponse.OFSSKU> filterData(List<OFSSKUSearchResponse.OFSSKU> ofsskuList){
|
||||||
List<OFSSKUSearchResponse.OFSSKU> filterSkus = new ArrayList<>();
|
List<OFSSKUSearchResponse.OFSSKU> filterSkus = new ArrayList<>();
|
||||||
for (OFSSKUSearchResponse.OFSSKU ofssku : ofsskuList) {
|
for (OFSSKUSearchResponse.OFSSKU ofssku : ofsskuList) {
|
||||||
String rootAppPk = ofssku.getCode() + "_" + ofssku.getLastUpdated();
|
String rootAppPk = ofssku.getCode()+"_"+ofssku.getLastUpdated();
|
||||||
boolean isExis = true;
|
boolean isExis = true;
|
||||||
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
|
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
|
||||||
integrationTaskLivingDetailsEntity.setRootAppPk(rootAppPk);
|
integrationTaskLivingDetailsEntity.setRootAppPk(rootAppPk);
|
||||||
|
@ -269,10 +268,10 @@ public class SKUPluginInitializer extends PluginBaseEntity {
|
||||||
* 注意:
|
* 注意:
|
||||||
* 可能一家公司封存则,则取消分配这家公司的存货管理档案
|
* 可能一家公司封存则,则取消分配这家公司的存货管理档案
|
||||||
*/
|
*/
|
||||||
public void implement(List<OFSSKUSearchResponse.OFSSKU> filterSkus) {
|
public void implement(List<OFSSKUSearchResponse.OFSSKU> filterSkus){
|
||||||
for (OFSSKUSearchResponse.OFSSKU sku : filterSkus) {
|
for (OFSSKUSearchResponse.OFSSKU sku : filterSkus) {
|
||||||
|
|
||||||
String PkInvbasdoc = "";
|
String PkInvbasdoc= "";
|
||||||
String url = "";
|
String url = "";
|
||||||
String mapStr = "";
|
String mapStr = "";
|
||||||
String format = sku.getLastUpdated();
|
String format = sku.getLastUpdated();
|
||||||
|
@ -285,14 +284,14 @@ public class SKUPluginInitializer extends PluginBaseEntity {
|
||||||
|
|
||||||
//查询是否存在,返回pkInvbasdoc,如果有则是修改,null则为新增
|
//查询是否存在,返回pkInvbasdoc,如果有则是修改,null则为新增
|
||||||
//查询该id再u8c是否有数据,没有则是新增,有则是修改 存货基本档案:def2-》ofs主键
|
//查询该id再u8c是否有数据,没有则是新增,有则是修改 存货基本档案:def2-》ofs主键
|
||||||
PkInvbasdoc = queryInvbasDocIsExist(sku);
|
PkInvbasdoc=queryInvbasDocIsExist(sku);
|
||||||
if (PkInvbasdoc != null) {
|
if (PkInvbasdoc != null) {
|
||||||
//修改
|
//修改
|
||||||
parentvo.setPk_invbasdoc(PkInvbasdoc);
|
parentvo.setPk_invbasdoc(PkInvbasdoc);
|
||||||
url = OverallConstant.getOverAllValue("bdinvclUpdateCode");
|
url=OverallConstant.getOverAllValue("bdinvclUpdateCode");
|
||||||
} else if (PkInvbasdoc == null) {
|
} else if (PkInvbasdoc == null) {
|
||||||
//新增
|
//新增
|
||||||
url = OverallConstant.getOverAllValue("bdinvclSaveCode");
|
url=OverallConstant.getOverAllValue("bdinvclSaveCode");
|
||||||
}
|
}
|
||||||
|
|
||||||
//def2 ofs id
|
//def2 ofs id
|
||||||
|
@ -323,17 +322,20 @@ public class SKUPluginInitializer extends PluginBaseEntity {
|
||||||
//memo 备注
|
//memo 备注
|
||||||
parentvo.setMemo(sku.getRemark());
|
parentvo.setMemo(sku.getRemark());
|
||||||
|
|
||||||
|
//setpartsflag 成套件,默认都是true
|
||||||
|
parentvo.setSetpartsflag("true");
|
||||||
|
|
||||||
invbasdoc.setParentvo(parentvo);
|
invbasdoc.setParentvo(parentvo);
|
||||||
//子表,暂时没有要传的值
|
//子表,暂时没有要传的值
|
||||||
String jsonStr = JSONUtil.toJsonStr(invbasdoc);
|
String jsonStr = JSONUtil.toJsonStr(invbasdoc);
|
||||||
mapStr = "{\"invbasdoc\":" + jsonStr + "}";
|
mapStr= "{\"invbasdoc\":" + jsonStr + "}";
|
||||||
ZTResult ztResult = pushU8CByApiCode.pushByCode(url, mapStr);
|
ZTResult ztResult = pushU8CByApiCode.pushByCode(url, mapStr);
|
||||||
//两层判断,一层中台转发,一层u8c返回
|
//两层判断,一层中台转发,一层u8c返回
|
||||||
Attribute attribute = ztResult.getAttribute();
|
Attribute attribute = ztResult.getAttribute();
|
||||||
|
|
||||||
if ("false".equals(ztResult.getFlag())) {
|
if ("false".equals(ztResult.getFlag())) {
|
||||||
//转发失败
|
//转发失败
|
||||||
response = JSONUtil.toJsonStr(ztResult.getAttribute());
|
response=JSONUtil.toJsonStr(ztResult.getAttribute());
|
||||||
Assert.state(false, "丽知:OFS货品档案--->U8C货品档案,中台转发失败,失败原因:{}", ztResult.getAttribute());
|
Assert.state(false, "丽知:OFS货品档案--->U8C货品档案,中台转发失败,失败原因:{}", ztResult.getAttribute());
|
||||||
}
|
}
|
||||||
boolean isSuccess = false;
|
boolean isSuccess = false;
|
||||||
|
@ -355,13 +357,13 @@ public class SKUPluginInitializer extends PluginBaseEntity {
|
||||||
integrationTaskLivingDetailsEntity.setNewTransmitInfo(attribute.getData());
|
integrationTaskLivingDetailsEntity.setNewTransmitInfo(attribute.getData());
|
||||||
integrationTaskLivingDetailsEntity.setNewPushDate(new Date());
|
integrationTaskLivingDetailsEntity.setNewPushDate(new Date());
|
||||||
integrationTaskLivingDetailsEntity.setBusinessDate(format);
|
integrationTaskLivingDetailsEntity.setBusinessDate(format);
|
||||||
integrationTaskLivingDetailsEntity.setRootAppPk(sku.getCode() + "_" + sku.getLastUpdated());
|
integrationTaskLivingDetailsEntity.setRootAppPk(sku.getCode()+"_"+sku.getLastUpdated());
|
||||||
integrationTaskLivingDetailsEntity.setRootAppBill(sku.getCode());
|
integrationTaskLivingDetailsEntity.setRootAppBill(sku.getCode());
|
||||||
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
|
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
|
||||||
integrationTaskLivingDetailsEntity.setDef1(sku.getId());
|
integrationTaskLivingDetailsEntity.setDef1(sku.getId());
|
||||||
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
|
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
|
||||||
|
|
||||||
} catch (Exception e) {
|
}catch (Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.error("推送U8C,丽知:OFS货品档案--->U8C货品档案失败,失败原因:" + e);
|
logger.error("推送U8C,丽知:OFS货品档案--->U8C货品档案失败,失败原因:" + e);
|
||||||
//失败
|
//失败
|
||||||
|
@ -374,7 +376,7 @@ public class SKUPluginInitializer extends PluginBaseEntity {
|
||||||
integrationTaskLivingDetailsEntity.setNewTransmitInfo(ErrMessage);
|
integrationTaskLivingDetailsEntity.setNewTransmitInfo(ErrMessage);
|
||||||
integrationTaskLivingDetailsEntity.setNewPushDate(new Date());
|
integrationTaskLivingDetailsEntity.setNewPushDate(new Date());
|
||||||
integrationTaskLivingDetailsEntity.setBusinessDate(format);
|
integrationTaskLivingDetailsEntity.setBusinessDate(format);
|
||||||
integrationTaskLivingDetailsEntity.setRootAppPk(sku.getCode() + "_" + sku.getLastUpdated());
|
integrationTaskLivingDetailsEntity.setRootAppPk(sku.getCode()+"_"+sku.getLastUpdated());
|
||||||
integrationTaskLivingDetailsEntity.setRootAppBill(sku.getCode());
|
integrationTaskLivingDetailsEntity.setRootAppBill(sku.getCode());
|
||||||
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
|
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
|
||||||
integrationTaskLivingDetailsEntity.setDef1(sku.getId());
|
integrationTaskLivingDetailsEntity.setDef1(sku.getId());
|
||||||
|
@ -385,64 +387,65 @@ public class SKUPluginInitializer extends PluginBaseEntity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String queryInvbasDocIsExist(OFSSKUSearchResponse.OFSSKU sku) {
|
public String queryInvbasDocIsExist(OFSSKUSearchResponse.OFSSKU sku){
|
||||||
String PkInvbasdoc = "";
|
String PkInvbasdoc="";
|
||||||
BdInvbasdocEntity bdInvbasdocEntity = new BdInvbasdocEntity();
|
BdInvbasdocEntity bdInvbasdocEntity = new BdInvbasdocEntity();
|
||||||
bdInvbasdocEntity.setDr(0L);
|
bdInvbasdocEntity.setDr(0L);
|
||||||
bdInvbasdocEntity.setDef2(sku.getId());
|
bdInvbasdocEntity.setDef2(sku.getId());
|
||||||
bdInvbasdocEntity.setDataSourceCode(ProfilesActiveConstant.LETS_DATE_SOURCE);
|
bdInvbasdocEntity.setDataSourceCode(ProfilesActiveConstant.LETS_DATE_SOURCE);
|
||||||
List<BdInvbasdocEntity> bdInvbasdocEntityList = bdInvbasdocDao.query(bdInvbasdocEntity);//根据ofs id
|
List<BdInvbasdocEntity> bdInvbasdocEntityList = bdInvbasdocDao.query(bdInvbasdocEntity);//根据ofs id
|
||||||
if (bdInvbasdocEntityList.size() == 0) {
|
if(bdInvbasdocEntityList.size()==0){
|
||||||
bdInvbasdocEntity.setDef2(null);
|
bdInvbasdocEntity.setDef2(null);
|
||||||
bdInvbasdocEntity.setInvcode(sku.getCode());
|
bdInvbasdocEntity.setInvcode(sku.getCode());
|
||||||
bdInvbasdocEntity.setInvname(sku.getName());
|
bdInvbasdocEntity.setInvname(sku.getName());
|
||||||
List<BdInvbasdocEntity> bdInvbasdocEntityList1 = bdInvbasdocDao.query(bdInvbasdocEntity);//根据编码+名称
|
List<BdInvbasdocEntity> bdInvbasdocEntityList1 = bdInvbasdocDao.query(bdInvbasdocEntity);//根据编码+名称
|
||||||
if (bdInvbasdocEntityList1.size() == 0) {
|
if(bdInvbasdocEntityList1.size()==0){
|
||||||
bdInvbasdocEntity.setInvname(null);
|
bdInvbasdocEntity.setInvname(null);
|
||||||
List<BdInvbasdocEntity> bdInvbasdocEntityList2 = bdInvbasdocDao.query(bdInvbasdocEntity);//进查询编码
|
List<BdInvbasdocEntity> bdInvbasdocEntityList2 = bdInvbasdocDao.query(bdInvbasdocEntity);//进查询编码
|
||||||
if (bdInvbasdocEntityList2.size() == 0) {//编码不存在
|
if (bdInvbasdocEntityList2.size() == 0) {//编码不存在
|
||||||
return null;
|
return null;
|
||||||
} else if (bdInvbasdocEntityList2.size() == 1) {//编码存在
|
} else if (bdInvbasdocEntityList2.size() == 1) {//编码存在
|
||||||
PkInvbasdoc = bdInvbasdocEntityList2.get(0).getPkInvbasdoc();//主键
|
PkInvbasdoc=bdInvbasdocEntityList2.get(0).getPkInvbasdoc();//主键
|
||||||
}
|
}
|
||||||
} else if (bdInvbasdocEntityList1.size() == 1) {
|
}else if(bdInvbasdocEntityList1.size()==1){
|
||||||
//修改
|
//修改
|
||||||
PkInvbasdoc = bdInvbasdocEntityList1.get(0).getPkInvbasdoc();//主键
|
PkInvbasdoc=bdInvbasdocEntityList1.get(0).getPkInvbasdoc();//主键
|
||||||
}
|
}
|
||||||
} else if (bdInvbasdocEntityList.size() == 1) {
|
}else if(bdInvbasdocEntityList.size()==1){
|
||||||
//修改
|
//修改
|
||||||
PkInvbasdoc = bdInvbasdocEntityList.get(0).getPkInvbasdoc();//主键
|
PkInvbasdoc=bdInvbasdocEntityList.get(0).getPkInvbasdoc();//主键
|
||||||
} else {
|
}else {
|
||||||
//异常,存在多个
|
//异常,存在多个
|
||||||
Assert.state(false, "SKU主档编码:{},id:{}。U8C存货基本档案def2(OFS中SKU主档id)存在多个,请检查。", sku.getCode(), sku.getId());
|
Assert.state(false,"SKU主档编码:{},id:{}。U8C存货基本档案def2(OFS中SKU主档id)存在多个,请检查。",sku.getCode(),sku.getId());
|
||||||
}
|
}
|
||||||
return PkInvbasdoc;
|
return PkInvbasdoc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 按code分组,并按lastUpdated排序
|
* 按code分组,并按lastUpdated排序
|
||||||
*
|
|
||||||
* @param ofsskuList
|
* @param ofsskuList
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<OFSSKUSearchResponse.OFSSKU> groupAndSort(List<OFSSKUSearchResponse.OFSSKU> ofsskuList) {
|
public List<OFSSKUSearchResponse.OFSSKU> groupAndSort(List<OFSSKUSearchResponse.OFSSKU> ofsskuList){
|
||||||
List<OFSSKUSearchResponse.OFSSKU> sortSkus = new ArrayList<>();
|
List<OFSSKUSearchResponse.OFSSKU> sortSkus=new ArrayList<>();
|
||||||
|
|
||||||
//根据code进行分组
|
//根据code进行分组
|
||||||
Map<String, List<OFSSKUSearchResponse.OFSSKU>> collectMapByCode = ofsskuList.stream().collect(Collectors.groupingBy(OFSSKUSearchResponse.OFSSKU::getCode));
|
Map<String, List<OFSSKUSearchResponse.OFSSKU>> collectMapByCode =
|
||||||
|
ofsskuList.stream().collect(Collectors.groupingBy(OFSSKUSearchResponse.OFSSKU::getCode));
|
||||||
|
|
||||||
collectMapByCode.forEach((k, v) -> {
|
collectMapByCode.forEach((k,v)->{
|
||||||
//降序排序 (从新到旧),根据最后修改时间倒排
|
//降序排序 (从新到旧),根据最后修改时间倒排
|
||||||
List<OFSSKUSearchResponse.OFSSKU> sorted = v.stream().sorted(Comparator.comparing(OFSSKUSearchResponse.OFSSKU::getLastUpdated).reversed()).collect(Collectors.toList());
|
List<OFSSKUSearchResponse.OFSSKU> sorted =
|
||||||
|
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++) {
|
||||||
if ("0".equals(sorted.get(i).getStatus())) {
|
if("0".equals(sorted.get(i).getStatus())){
|
||||||
sorted.remove(i);
|
sorted.remove(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sorted.size() != 0) {
|
if(sorted.size()!=0){
|
||||||
sortSkus.add(sorted.get(0));//只取最后修改的一个
|
sortSkus.add(sorted.get(0));//只取最后修改的一个
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -452,7 +455,7 @@ public class SKUPluginInitializer extends PluginBaseEntity {
|
||||||
/**
|
/**
|
||||||
* 封存存货基本档案
|
* 封存存货基本档案
|
||||||
*/
|
*/
|
||||||
public void sealImplement(String code) {
|
public void sealImplement(String code){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -493,7 +496,6 @@ 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)) {
|
||||||
|
|
|
@ -9,6 +9,11 @@ import com.alibaba.fastjson.JSONObject;
|
||||||
import com.hzya.frame.base.PluginBaseEntity;
|
import com.hzya.frame.base.PluginBaseEntity;
|
||||||
import com.hzya.frame.plugin.lets.constant.OverallConstant;
|
import com.hzya.frame.plugin.lets.constant.OverallConstant;
|
||||||
import com.hzya.frame.plugin.lets.constant.ProfilesActiveConstant;
|
import com.hzya.frame.plugin.lets.constant.ProfilesActiveConstant;
|
||||||
|
import com.hzya.frame.plugin.lets.dao.IIaMonthledgerDao;
|
||||||
|
import com.hzya.frame.plugin.lets.entity.BdCorpEntity;
|
||||||
|
import com.hzya.frame.plugin.lets.entity.BdInvbasdocEntity;
|
||||||
|
import com.hzya.frame.plugin.lets.entity.BdInvmandocEntity;
|
||||||
|
import com.hzya.frame.plugin.lets.entity.IaMonthledgerEntity;
|
||||||
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsStockinOrderRequestVO;
|
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsStockinOrderRequestVO;
|
||||||
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsStockoutOrderRequestVO;
|
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsStockoutOrderRequestVO;
|
||||||
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsTransferOrderRequestVO;
|
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsTransferOrderRequestVO;
|
||||||
|
@ -16,6 +21,7 @@ import com.hzya.frame.plugin.lets.u8cdto.BillVO;
|
||||||
import com.hzya.frame.plugin.lets.u8cdto.GeneralBillVO_4IDto;
|
import com.hzya.frame.plugin.lets.u8cdto.GeneralBillVO_4IDto;
|
||||||
import com.hzya.frame.plugin.lets.u8cdto.ReusltStrDto;
|
import com.hzya.frame.plugin.lets.u8cdto.ReusltStrDto;
|
||||||
import com.hzya.frame.plugin.lets.util.PushDataByU8cUtil;
|
import com.hzya.frame.plugin.lets.util.PushDataByU8cUtil;
|
||||||
|
import com.hzya.frame.plugin.lets.util.QueryU8CEntityUtil;
|
||||||
import com.hzya.frame.plugin.lets.util.SaveOrUpdateBusinessLogUtil;
|
import com.hzya.frame.plugin.lets.util.SaveOrUpdateBusinessLogUtil;
|
||||||
import com.hzya.frame.plugin.lets.util.pushData.Attribute;
|
import com.hzya.frame.plugin.lets.util.pushData.Attribute;
|
||||||
import com.hzya.frame.plugin.lets.util.pushData.PushU8CByApiCode;
|
import com.hzya.frame.plugin.lets.util.pushData.PushU8CByApiCode;
|
||||||
|
@ -94,6 +100,12 @@ public class TransferOutPluginInitializer extends PluginBaseEntity {
|
||||||
@Autowired
|
@Autowired
|
||||||
private OfsUnifiedService ofsUnifiedService;
|
private OfsUnifiedService ofsUnifiedService;
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IIaMonthledgerDao iaMonthledgerDao;
|
||||||
|
@Autowired
|
||||||
|
private QueryU8CEntityUtil queryU8CEntityUtil;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||||
try {
|
try {
|
||||||
|
@ -332,6 +344,14 @@ public class TransferOutPluginInitializer extends PluginBaseEntity {
|
||||||
//ofs行id
|
//ofs行id
|
||||||
children.setPk_defdoc20(ofsDetail.getId());
|
children.setPk_defdoc20(ofsDetail.getId());
|
||||||
|
|
||||||
|
//nprice 单价,取上一次结账的单价
|
||||||
|
IaMonthledgerEntity iaMonthledgerEntity = queryIaMonthledger(ofsDetail, ofsTranseferOrder.getHeader().getCompanyCode());
|
||||||
|
System.out.println(iaMonthledgerEntity);
|
||||||
|
if(iaMonthledgerEntity==null){
|
||||||
|
children.setNprice("0");
|
||||||
|
}
|
||||||
|
children.setNprice(iaMonthledgerEntity.getNabprice());
|
||||||
|
|
||||||
}
|
}
|
||||||
billVO.setParentvo(parentvo);
|
billVO.setParentvo(parentvo);
|
||||||
billVO.setChildrenvo(childrenvo);
|
billVO.setChildrenvo(childrenvo);
|
||||||
|
@ -524,4 +544,42 @@ public class TransferOutPluginInitializer extends PluginBaseEntity {
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据存货管理档案档案,查询最后一次结算的单价,已根据ts 倒排,get(0)为最近一次核算价格
|
||||||
|
*/
|
||||||
|
public IaMonthledgerEntity queryIaMonthledger(OFSTranseferOrderSearchResponse.OFSTranseferOrder.OFSTranseferB sku,String companyCode){
|
||||||
|
|
||||||
|
//查询公司
|
||||||
|
BdCorpEntity bdCorpEntity = queryU8CEntityUtil.queryBdCorpByUnitCode(companyCode);
|
||||||
|
if(bdCorpEntity==null){
|
||||||
|
Assert.state(false,"根据OFS公司编码:{},查询U8C公司不存在。请检查U8C档案",companyCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询存货基本档案主键
|
||||||
|
BdInvbasdocEntity bdInvbasdocEntity = queryU8CEntityUtil.queryBdInvbasdocByCode(sku.getSkuCode());
|
||||||
|
if(bdInvbasdocEntity==null){
|
||||||
|
Assert.state(false,"根据OFS SKU CODE:{},查询U8C存货基本档案不存在。请检查U8C档案",sku.getSkuCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询存货管理档案
|
||||||
|
BdInvmandocEntity bdInvmandocEntity = queryU8CEntityUtil.queryBdInvmandocByPkInvbasdocAndPkCorp(bdInvbasdocEntity.getPkInvbasdoc(), bdCorpEntity.getPkCorp());
|
||||||
|
if(bdInvmandocEntity==null){
|
||||||
|
Assert.state(false,"根据U8C存货基本档案主键:{},U8C公司主键:{},查询U8C存货管理档案不存在。请检查U8C档案",bdInvbasdocEntity.getPkInvbasdoc(),bdCorpEntity.getPkCorp());
|
||||||
|
}
|
||||||
|
|
||||||
|
IaMonthledgerEntity iaMonthledgerEntity = new IaMonthledgerEntity();
|
||||||
|
iaMonthledgerEntity.setPkCorp(bdCorpEntity.getPkCorp());
|
||||||
|
iaMonthledgerEntity.setCinventoryid(bdInvmandocEntity.getPkInvmandoc());
|
||||||
|
iaMonthledgerEntity.setFrecordtypeflag("3");
|
||||||
|
iaMonthledgerEntity.setDataSourceCode(ProfilesActiveConstant.LETS_DATE_SOURCE);
|
||||||
|
List<IaMonthledgerEntity> iaMonthledgerEntityList = iaMonthledgerDao.query(iaMonthledgerEntity);
|
||||||
|
if (iaMonthledgerEntityList.size() == 0) {//没有也没事
|
||||||
|
return null;
|
||||||
|
// Assert.state(false, "该存货名称:{},编码:{},U8C基本档案主键:{},没有进行过结算,请检查",sku.getSkuName(),sku.getSkuCode(),bdInvbasdocEntity.getPkInvbasdoc());
|
||||||
|
}
|
||||||
|
return iaMonthledgerEntityList.get(0);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,82 @@
|
||||||
|
package com.hzya.frame.plugin.lets.util;
|
||||||
|
|
||||||
|
import com.hzya.frame.plugin.lets.constant.ProfilesActiveConstant;
|
||||||
|
import com.hzya.frame.plugin.lets.dao.IBdCorpDao;
|
||||||
|
import com.hzya.frame.plugin.lets.dao.IBdInvbasdocDao;
|
||||||
|
import com.hzya.frame.plugin.lets.dao.IBdInvmandocDao;
|
||||||
|
import com.hzya.frame.plugin.lets.entity.BdCorpEntity;
|
||||||
|
import com.hzya.frame.plugin.lets.entity.BdInvbasdocEntity;
|
||||||
|
import com.hzya.frame.plugin.lets.entity.BdInvmandocEntity;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询U8C实体工具类,返回对象
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class QueryU8CEntityUtil {
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////公司
|
||||||
|
@Autowired
|
||||||
|
private IBdCorpDao iBdCorpDao;
|
||||||
|
/** 根据公司编码UNITCode查询公司 */
|
||||||
|
public BdCorpEntity queryBdCorpByUnitCode(String unitCode){
|
||||||
|
BdCorpEntity entity = new BdCorpEntity();
|
||||||
|
entity.setUnitcode(unitCode);
|
||||||
|
entity.setDataSourceCode(ProfilesActiveConstant.LETS_DATE_SOURCE);
|
||||||
|
List<BdCorpEntity> query = iBdCorpDao.query(entity);
|
||||||
|
return query.get(0);
|
||||||
|
}
|
||||||
|
/** 根据公司主键pk_corp查询公司 */
|
||||||
|
public BdCorpEntity queryBdCorpByPkCorp(String pkCorp){
|
||||||
|
BdCorpEntity entity = new BdCorpEntity();
|
||||||
|
entity.setPkCorp(pkCorp);
|
||||||
|
entity.setDataSourceCode(ProfilesActiveConstant.LETS_DATE_SOURCE);
|
||||||
|
List<BdCorpEntity> query = iBdCorpDao.query(entity);
|
||||||
|
return query.get(0);
|
||||||
|
}
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////公司
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////存货基本档案
|
||||||
|
@Autowired
|
||||||
|
private IBdInvbasdocDao iBdInvbasdocDao;
|
||||||
|
/** 根据存货编码查询存货基本档案 */
|
||||||
|
public BdInvbasdocEntity queryBdInvbasdocByCode(String invcode){
|
||||||
|
BdInvbasdocEntity entity = new BdInvbasdocEntity();
|
||||||
|
entity.setInvcode(invcode);
|
||||||
|
entity.setDr(0L);
|
||||||
|
entity.setDataSourceCode(ProfilesActiveConstant.LETS_DATE_SOURCE);
|
||||||
|
List<BdInvbasdocEntity> query = iBdInvbasdocDao.query(entity);
|
||||||
|
return query.get(0);
|
||||||
|
}
|
||||||
|
/** 根据存货基本档案主键查询存货基本档案 */
|
||||||
|
public BdInvbasdocEntity queryBdInvbasdocByPkInvbasdoc(String pkInvbasdoc){
|
||||||
|
BdInvbasdocEntity entity = new BdInvbasdocEntity();
|
||||||
|
entity.setPkInvbasdoc(pkInvbasdoc);
|
||||||
|
entity.setDr(0L);
|
||||||
|
entity.setDataSourceCode(ProfilesActiveConstant.LETS_DATE_SOURCE);
|
||||||
|
List<BdInvbasdocEntity> query = iBdInvbasdocDao.query(entity);
|
||||||
|
return query.get(0);
|
||||||
|
}
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////存货基本档案
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////存货管理档案
|
||||||
|
@Autowired
|
||||||
|
private IBdInvmandocDao iBdInvmandocDao;
|
||||||
|
|
||||||
|
/** 根据存货基本档案主键+公司主键查询存货管理档案 */
|
||||||
|
public BdInvmandocEntity queryBdInvmandocByPkInvbasdocAndPkCorp(String pkInvbasdoc,String pkCorp){
|
||||||
|
BdInvmandocEntity entity = new BdInvmandocEntity();
|
||||||
|
entity.setPkCorp(pkCorp);
|
||||||
|
entity.setPkInvbasdoc(pkInvbasdoc);
|
||||||
|
entity.setDr(0L);
|
||||||
|
entity.setDataSourceCode(ProfilesActiveConstant.LETS_DATE_SOURCE);
|
||||||
|
List<BdInvmandocEntity> query = iBdInvmandocDao.query(entity);
|
||||||
|
return query.get(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////存货管理档案
|
||||||
|
|
||||||
|
}
|
|
@ -53,4 +53,6 @@
|
||||||
<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"/>
|
<bean name="bdBomDao" class="com.hzya.frame.plugin.lets.dao.impl.BdBomDaoImpl"/>
|
||||||
|
<!--ia_monthledger 存货总账月记录表-->
|
||||||
|
<bean name="iaMonthledgerDao" class="com.hzya.frame.plugin.lets.dao.impl.IaMonthledgerDaoImpl"/>
|
||||||
</beans>
|
</beans>
|
|
@ -9,6 +9,10 @@
|
||||||
<bean name="skuPluginInitializer" class="com.hzya.frame.plugin.lets.plugin.base.SKUPluginInitializer"/>
|
<bean name="skuPluginInitializer" class="com.hzya.frame.plugin.lets.plugin.base.SKUPluginInitializer"/>
|
||||||
<bean name="goodsAutoAllotPluginInitializer" class="com.hzya.frame.plugin.lets.plugin.base.GoodsAutoAllotPluginInitializer"/>
|
<bean name="goodsAutoAllotPluginInitializer" class="com.hzya.frame.plugin.lets.plugin.base.GoodsAutoAllotPluginInitializer"/>
|
||||||
<bean name="skuClassPluginInitializer" class="com.hzya.frame.plugin.lets.plugin.base.SKUClassPluginInitializer"/>
|
<bean name="skuClassPluginInitializer" class="com.hzya.frame.plugin.lets.plugin.base.SKUClassPluginInitializer"/>
|
||||||
|
|
||||||
|
<bean name="sKUSealPluginInitializer" class="com.hzya.frame.plugin.lets.plugin.base.SKUSealPluginInitializer"/>
|
||||||
|
|
||||||
|
|
||||||
<bean name="CustdocAutoAllotPluginInitializer" class="com.hzya.frame.plugin.lets.plugin.base.CustdocAutoAllotPluginInitializer"/>
|
<bean name="CustdocAutoAllotPluginInitializer" class="com.hzya.frame.plugin.lets.plugin.base.CustdocAutoAllotPluginInitializer"/>
|
||||||
<bean name="ShopPluginInitializer" class="com.hzya.frame.plugin.lets.plugin.base.ShopPluginInitializer"/>
|
<bean name="ShopPluginInitializer" class="com.hzya.frame.plugin.lets.plugin.base.ShopPluginInitializer"/>
|
||||||
<bean name="SupplierPluginInitializer" class="com.hzya.frame.plugin.lets.plugin.base.SupplierPluginInitializer"/>
|
<bean name="SupplierPluginInitializer" class="com.hzya.frame.plugin.lets.plugin.base.SupplierPluginInitializer"/>
|
||||||
|
|
|
@ -25,7 +25,7 @@ public class BaseTest {
|
||||||
}
|
}
|
||||||
@Test
|
@Test
|
||||||
public void t01(){
|
public void t01(){
|
||||||
skuPluginInitializer.start("6970872643657");
|
skuPluginInitializer.start("6971898450656");
|
||||||
}
|
}
|
||||||
@Test
|
@Test
|
||||||
public void t02(){
|
public void t02(){
|
||||||
|
@ -48,7 +48,7 @@ public class BaseTest {
|
||||||
}
|
}
|
||||||
@Test
|
@Test
|
||||||
public void t22(){
|
public void t22(){
|
||||||
skuClassPluginInitializer.start("2024-08-23","2024-08-25");
|
skuClassPluginInitializer.start("2024-08-23","2024-08-29");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ public class TransferTest {
|
||||||
}
|
}
|
||||||
@Test
|
@Test
|
||||||
public void t32(){
|
public void t32(){
|
||||||
adjustInPluginInitializer.start("2024-08-14","2024-08-14");
|
adjustInPluginInitializer.start("2024-08-14","2024-08-20");
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////调整出库单
|
////////////////////////////////////////////////////////////////////////////////////调整出库单
|
||||||
|
|
Loading…
Reference in New Issue