物料同步
This commit is contained in:
parent
3e477f9a67
commit
a655a3efc4
|
@ -5,10 +5,10 @@ import com.hzya.frame.basedao.dao.IBaseDao;
|
||||||
import com.hzya.frame.plugin.zjmaterielsynchronizationevent.entity.ZjMaterielSynchronizationEventEntity;
|
import com.hzya.frame.plugin.zjmaterielsynchronizationevent.entity.ZjMaterielSynchronizationEventEntity;
|
||||||
|
|
||||||
/****
|
/****
|
||||||
* 万盛客商档案同步插件
|
* 物料档案同步插件
|
||||||
* @content:
|
* @content:
|
||||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
* @date 2025-03-03 10:57
|
* @date 2025-03-03 10:57
|
||||||
* @param
|
* @param
|
||||||
* @return
|
* @return
|
||||||
**/
|
**/
|
||||||
|
|
|
@ -5,13 +5,13 @@ import com.hzya.frame.plugin.zjmaterielsynchronizationevent.dao.IZjMaterielSynch
|
||||||
import com.hzya.frame.plugin.zjmaterielsynchronizationevent.entity.ZjMaterielSynchronizationEventEntity;
|
import com.hzya.frame.plugin.zjmaterielsynchronizationevent.entity.ZjMaterielSynchronizationEventEntity;
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* 万盛客商
|
* 物料档案同步
|
||||||
* @content:
|
* @content:
|
||||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
* @date 2025-03-03 11:12
|
* @date 2025-03-03 11:12
|
||||||
* @param
|
* @param
|
||||||
* @return
|
* @return
|
||||||
**/
|
**/
|
||||||
public class ZjMaterielSynchronizationEventDaoImpl extends MybatisGenericDao<ZjMaterielSynchronizationEventEntity, String> implements IZjMaterielSynchronizationEventDao {
|
public class ZjMaterielSynchronizationEventDaoImpl extends MybatisGenericDao<ZjMaterielSynchronizationEventEntity, String> implements IZjMaterielSynchronizationEventDao {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,14 +3,502 @@ package com.hzya.frame.plugin.zjmaterielsynchronizationevent.entity;
|
||||||
import com.hzya.frame.web.entity.BaseEntity;
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
|
|
||||||
/****
|
/****
|
||||||
* 万盛客商档案实体类
|
* 物料档案实体类
|
||||||
* @content:
|
* @content:
|
||||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
* @date 2025-03-03 10:53
|
* @date 2025-03-03 10:53
|
||||||
* @param
|
* @param
|
||||||
* @return
|
* @return
|
||||||
**/
|
**/
|
||||||
public class ZjMaterielSynchronizationEventEntity extends BaseEntity {
|
public class ZjMaterielSynchronizationEventEntity extends BaseEntity {
|
||||||
|
|
||||||
|
|
||||||
|
private String formmain_id;//主表id
|
||||||
|
private String field0004;//序号1
|
||||||
|
private String field0038;//是否更新
|
||||||
|
private String field0038code;//是否更新
|
||||||
|
private String field0005;//货品编码/存货编码/物料编码
|
||||||
|
private String field0006;//货品名称/物料名称
|
||||||
|
private String field0007;//货品规格型号
|
||||||
|
private String field0008;//品牌
|
||||||
|
private String field0008code;//品牌
|
||||||
|
private String field0009;//规格书
|
||||||
|
private String field0009code;//规格书
|
||||||
|
private String field0010;//环保报告
|
||||||
|
private String field0010code;//环保报告
|
||||||
|
private String field0011;//ERP中相同型号不同品牌的编码
|
||||||
|
private String field0012;//优选等级
|
||||||
|
private String field0012code;//优选等级
|
||||||
|
private String field0013;//适用产品
|
||||||
|
private String field0014;//产品分类
|
||||||
|
private String field0014code;//产品分类
|
||||||
|
private String field0015;//备注
|
||||||
|
private String field0016;//最小包装量
|
||||||
|
private String field0017;//封装分类
|
||||||
|
private String field0017code;//封装分类
|
||||||
|
private String field0018;//申请原因
|
||||||
|
private String field0018code;//申请原因
|
||||||
|
private String field0019;//潮敏等级
|
||||||
|
private String field0019code;//潮敏等级
|
||||||
|
private String field0020;//是否退税软件
|
||||||
|
private String field0020code;//是否退税软件
|
||||||
|
private String field0022;//是否委外
|
||||||
|
private String field0022code;//是否委外
|
||||||
|
private String field0030;//上传附件1
|
||||||
|
private String field0031;//上传附件2
|
||||||
|
private String field0032;//负责人
|
||||||
|
private String field0032code;//负责人
|
||||||
|
private String field0033;//产品阶段
|
||||||
|
private String field0033code;//产品阶段
|
||||||
|
private String field0034;//客户名
|
||||||
|
private String field0034code;//客户名
|
||||||
|
private String field0035;//是否带入档案
|
||||||
|
private String field0035code;//是否带入档案
|
||||||
|
private String field0039;//开发号
|
||||||
|
private String field0040;//仓库名称
|
||||||
|
private String field0040code;//仓库名称
|
||||||
|
private String field0042;//物料属性
|
||||||
|
private String field0042code;//物料属性
|
||||||
|
private String field0043;//物料中类编码/存货分类/物料分类
|
||||||
|
private String field0043code;//物料中类编码/存货分类/物料分类
|
||||||
|
private String field0044;//物料一级分类
|
||||||
|
private String field0045;//货品代码
|
||||||
|
private String field0047;//物料类别
|
||||||
|
private String field0047code;//物料类别
|
||||||
|
private String field0048;//计量单位
|
||||||
|
private String field0048code;//计量单位
|
||||||
|
|
||||||
|
|
||||||
|
public String getFormmain_id() {
|
||||||
|
return formmain_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFormmain_id(String formmain_id) {
|
||||||
|
this.formmain_id = formmain_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0004() {
|
||||||
|
return field0004;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0004(String field0004) {
|
||||||
|
this.field0004 = field0004;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0038() {
|
||||||
|
return field0038;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0038(String field0038) {
|
||||||
|
this.field0038 = field0038;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0038code() {
|
||||||
|
return field0038code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0038code(String field0038code) {
|
||||||
|
this.field0038code = field0038code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0005() {
|
||||||
|
return field0005;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0005(String field0005) {
|
||||||
|
this.field0005 = field0005;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0006() {
|
||||||
|
return field0006;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0006(String field0006) {
|
||||||
|
this.field0006 = field0006;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0007() {
|
||||||
|
return field0007;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0007(String field0007) {
|
||||||
|
this.field0007 = field0007;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0008() {
|
||||||
|
return field0008;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0008(String field0008) {
|
||||||
|
this.field0008 = field0008;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0008code() {
|
||||||
|
return field0008code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0008code(String field0008code) {
|
||||||
|
this.field0008code = field0008code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0009() {
|
||||||
|
return field0009;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0009(String field0009) {
|
||||||
|
this.field0009 = field0009;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0009code() {
|
||||||
|
return field0009code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0009code(String field0009code) {
|
||||||
|
this.field0009code = field0009code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0010() {
|
||||||
|
return field0010;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0010(String field0010) {
|
||||||
|
this.field0010 = field0010;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0010code() {
|
||||||
|
return field0010code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0010code(String field0010code) {
|
||||||
|
this.field0010code = field0010code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0011() {
|
||||||
|
return field0011;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0011(String field0011) {
|
||||||
|
this.field0011 = field0011;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0012() {
|
||||||
|
return field0012;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0012(String field0012) {
|
||||||
|
this.field0012 = field0012;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0012code() {
|
||||||
|
return field0012code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0012code(String field0012code) {
|
||||||
|
this.field0012code = field0012code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0013() {
|
||||||
|
return field0013;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0013(String field0013) {
|
||||||
|
this.field0013 = field0013;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0014() {
|
||||||
|
return field0014;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0014(String field0014) {
|
||||||
|
this.field0014 = field0014;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0014code() {
|
||||||
|
return field0014code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0014code(String field0014code) {
|
||||||
|
this.field0014code = field0014code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0015() {
|
||||||
|
return field0015;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0015(String field0015) {
|
||||||
|
this.field0015 = field0015;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0016() {
|
||||||
|
return field0016;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0016(String field0016) {
|
||||||
|
this.field0016 = field0016;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0017() {
|
||||||
|
return field0017;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0017(String field0017) {
|
||||||
|
this.field0017 = field0017;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0017code() {
|
||||||
|
return field0017code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0017code(String field0017code) {
|
||||||
|
this.field0017code = field0017code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0018() {
|
||||||
|
return field0018;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0018(String field0018) {
|
||||||
|
this.field0018 = field0018;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0018code() {
|
||||||
|
return field0018code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0018code(String field0018code) {
|
||||||
|
this.field0018code = field0018code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0019() {
|
||||||
|
return field0019;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0019(String field0019) {
|
||||||
|
this.field0019 = field0019;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0019code() {
|
||||||
|
return field0019code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0019code(String field0019code) {
|
||||||
|
this.field0019code = field0019code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0020() {
|
||||||
|
return field0020;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0020(String field0020) {
|
||||||
|
this.field0020 = field0020;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0020code() {
|
||||||
|
return field0020code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0020code(String field0020code) {
|
||||||
|
this.field0020code = field0020code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0022() {
|
||||||
|
return field0022;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0022(String field0022) {
|
||||||
|
this.field0022 = field0022;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0022code() {
|
||||||
|
return field0022code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0022code(String field0022code) {
|
||||||
|
this.field0022code = field0022code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0030() {
|
||||||
|
return field0030;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0030(String field0030) {
|
||||||
|
this.field0030 = field0030;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0031() {
|
||||||
|
return field0031;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0031(String field0031) {
|
||||||
|
this.field0031 = field0031;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0032() {
|
||||||
|
return field0032;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0032(String field0032) {
|
||||||
|
this.field0032 = field0032;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0032code() {
|
||||||
|
return field0032code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0032code(String field0032code) {
|
||||||
|
this.field0032code = field0032code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0033() {
|
||||||
|
return field0033;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0033(String field0033) {
|
||||||
|
this.field0033 = field0033;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0033code() {
|
||||||
|
return field0033code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0033code(String field0033code) {
|
||||||
|
this.field0033code = field0033code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0034() {
|
||||||
|
return field0034;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0034(String field0034) {
|
||||||
|
this.field0034 = field0034;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0034code() {
|
||||||
|
return field0034code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0034code(String field0034code) {
|
||||||
|
this.field0034code = field0034code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0035() {
|
||||||
|
return field0035;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0035(String field0035) {
|
||||||
|
this.field0035 = field0035;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0035code() {
|
||||||
|
return field0035code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0035code(String field0035code) {
|
||||||
|
this.field0035code = field0035code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0039() {
|
||||||
|
return field0039;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0039(String field0039) {
|
||||||
|
this.field0039 = field0039;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0040() {
|
||||||
|
return field0040;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0040(String field0040) {
|
||||||
|
this.field0040 = field0040;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0040code() {
|
||||||
|
return field0040code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0040code(String field0040code) {
|
||||||
|
this.field0040code = field0040code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0042() {
|
||||||
|
return field0042;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0042(String field0042) {
|
||||||
|
this.field0042 = field0042;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0042code() {
|
||||||
|
return field0042code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0042code(String field0042code) {
|
||||||
|
this.field0042code = field0042code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0043() {
|
||||||
|
return field0043;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0043(String field0043) {
|
||||||
|
this.field0043 = field0043;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0044() {
|
||||||
|
return field0044;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0044(String field0044) {
|
||||||
|
this.field0044 = field0044;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0045() {
|
||||||
|
return field0045;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0045(String field0045) {
|
||||||
|
this.field0045 = field0045;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0047() {
|
||||||
|
return field0047;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0047(String field0047) {
|
||||||
|
this.field0047 = field0047;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0047code() {
|
||||||
|
return field0047code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0047code(String field0047code) {
|
||||||
|
this.field0047code = field0047code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0048() {
|
||||||
|
return field0048;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0048(String field0048) {
|
||||||
|
this.field0048 = field0048;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0048code() {
|
||||||
|
return field0048code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0048code(String field0048code) {
|
||||||
|
this.field0048code = field0048code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0043code() {
|
||||||
|
return field0043code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0043code(String field0043code) {
|
||||||
|
this.field0043code = field0043code;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,15 @@
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.hzya.frame.plugin.zjmaterielsynchronizationevent.dao.impl.ZjMaterielSynchronizationEventDaoImpl">
|
<mapper namespace="com.hzya.frame.plugin.zjmaterielsynchronizationevent.dao.impl.ZjMaterielSynchronizationEventDaoImpl">
|
||||||
|
|
||||||
|
<select id="entity_list_base" resultType="com.hzya.frame.plugin.zjmaterielsynchronizationevent.entity.ZjMaterielSynchronizationEventEntity"
|
||||||
|
parameterType = "com.hzya.frame.plugin.zjmaterielsynchronizationevent.entity.ZjMaterielSynchronizationEventEntity">
|
||||||
|
select
|
||||||
|
*
|
||||||
|
from v_formson_0275
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="formmain_id != null and formmain_id != ''"> and formmain_id = #{formmain_id} </if>
|
||||||
|
</trim>
|
||||||
|
ORDER BY field0018code,field0043,field0007
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
package com.hzya.frame.plugin.zjmaterielsynchronizationevent.plugin;
|
package com.hzya.frame.plugin.zjmaterielsynchronizationevent.plugin;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.hzya.frame.base.PluginBaseEntity;
|
import com.hzya.frame.base.PluginBaseEntity;
|
||||||
import com.hzya.frame.plugin.zjmaterielsynchronizationevent.service.IZjMaterielSynchronizationEventService;
|
import com.hzya.frame.plugin.zjmaterielsynchronizationevent.service.IZjMaterielSynchronizationEventService;
|
||||||
|
@ -9,24 +10,24 @@ import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主数据同步
|
* 物料同步
|
||||||
*
|
*
|
||||||
* @author makejava
|
* @author makejava
|
||||||
* @since 2024-06-21 13:52:35
|
* @since 2024-06-21 13:52:35
|
||||||
*/
|
*/
|
||||||
public class ZjMaterielSynchronizationEventPluginInitializer extends PluginBaseEntity{
|
public class ZjMaterielSynchronizationEventPluginInitializer extends PluginBaseEntity {
|
||||||
Logger logger = LoggerFactory.getLogger(ZjMaterielSynchronizationEventPluginInitializer.class);
|
Logger logger = LoggerFactory.getLogger(ZjMaterielSynchronizationEventPluginInitializer.class);
|
||||||
@Autowired
|
@Autowired
|
||||||
private IZjMaterielSynchronizationEventService zjMaterielSynchronizationEventService;
|
private IZjMaterielSynchronizationEventService zjMaterielSynchronizationEventService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initialize() {
|
public void initialize() {
|
||||||
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
logger.info(getPluginLabel() + "执行初始化方法initialize()");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void destroy() {
|
public void destroy() {
|
||||||
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
logger.info(getPluginLabel() + "执行销毁方法destroy()");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -36,7 +37,7 @@ public class ZjMaterielSynchronizationEventPluginInitializer extends PluginBaseE
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPluginName() {
|
public String getPluginName() {
|
||||||
return "万盛A8客商接收数据插件";
|
return "同步物料档案数据插件";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -48,15 +49,15 @@ public class ZjMaterielSynchronizationEventPluginInitializer extends PluginBaseE
|
||||||
public String getPluginType() {
|
public String getPluginType() {
|
||||||
return "1";
|
return "1";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JsonResultEntity executeBusiness(JSONObject requestJson) {
|
public JsonResultEntity executeBusiness(JSONObject requestJson) {
|
||||||
try {
|
try {
|
||||||
logger.info("======开始执行客商档案同步========");
|
logger.info("======开始执行物料档案同步========");
|
||||||
return BaseResult.getSuccessMessageEntity("");
|
return zjMaterielSynchronizationEventService.materielSynchronization(requestJson);
|
||||||
}catch (Exception e){
|
} catch (Exception e) {
|
||||||
logger.info("======客商档案同步失败:{}========",e.getMessage());
|
logger.info("======物料档案同步失败:{}========", e.getMessage());
|
||||||
e.printStackTrace();
|
return BaseResult.getFailureMessageEntity("======物料档案同步失败:{}========", e.getMessage());
|
||||||
return BaseResult.getFailureMessageEntity("======客商档案同步失败:{}========",e.getMessage());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,15 +6,22 @@ import com.hzya.frame.plugin.zjmaterielsynchronizationevent.entity.ZjMaterielSyn
|
||||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* 万盛客商档案同步插件
|
* 物料档案同步插件
|
||||||
* @content:
|
* @content:
|
||||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
* @date 2025-03-03 10:55
|
* @date 2025-03-03 10:55
|
||||||
* @param
|
* @param
|
||||||
* @return
|
* @return
|
||||||
**/
|
**/
|
||||||
public interface IZjMaterielSynchronizationEventService extends IBaseService<ZjMaterielSynchronizationEventEntity, String> {
|
public interface IZjMaterielSynchronizationEventService extends IBaseService<ZjMaterielSynchronizationEventEntity, String> {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param requestJson
|
||||||
|
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||||
|
* @Author lvleigang
|
||||||
|
* @Description 物料档案同步
|
||||||
|
* @Date 11:39 上午 2025/3/17
|
||||||
|
**/
|
||||||
|
JsonResultEntity materielSynchronization(JSONObject requestJson);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,25 @@
|
||||||
package com.hzya.frame.plugin.zjmaterielsynchronizationevent.service.impl;
|
package com.hzya.frame.plugin.zjmaterielsynchronizationevent.service.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
import com.hzya.frame.plugin.zjmaterielsynchronizationevent.dao.IZjMaterielSynchronizationEventDao;
|
import com.hzya.frame.plugin.zjmaterielsynchronizationevent.dao.IZjMaterielSynchronizationEventDao;
|
||||||
import com.hzya.frame.plugin.zjmaterielsynchronizationevent.entity.ZjMaterielSynchronizationEventEntity;
|
import com.hzya.frame.plugin.zjmaterielsynchronizationevent.entity.ZjMaterielSynchronizationEventEntity;
|
||||||
import com.hzya.frame.plugin.zjmaterielsynchronizationevent.service.IZjMaterielSynchronizationEventService;
|
import com.hzya.frame.plugin.zjmaterielsynchronizationevent.service.IZjMaterielSynchronizationEventService;
|
||||||
|
import com.hzya.frame.web.entity.BaseResult;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.checkerframework.checker.units.qual.A;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* 万盛客商档案同步插件
|
* 物料档案同步插件
|
||||||
* @content:
|
* @content:
|
||||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
* @date 2025-03-03 10:56
|
* @date 2025-03-03 10:56
|
||||||
* @param
|
* @param
|
||||||
* @return
|
* @return
|
||||||
**/
|
**/
|
||||||
|
@ -26,5 +34,194 @@ public class ZjMaterielSynchronizationEventServiceImpl extends BaseService<ZjMat
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param requestJson
|
||||||
|
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||||
|
* @Author lvleigang
|
||||||
|
* @Description 物料档案同步
|
||||||
|
* @Date 11:39 上午 2025/3/17
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity materielSynchronization(JSONObject requestJson) {
|
||||||
|
JSONObject reqJson = new JSONObject();
|
||||||
|
JSONObject jsonStr = requestJson.getJSONObject("jsonStr");
|
||||||
|
JSONObject businessDataStr = jsonStr.getJSONObject("businessDataStr");
|
||||||
|
String formAppId = requestJson.getString("formAppId");
|
||||||
|
String eventType = requestJson.getString("eventType");
|
||||||
|
switch (eventType) {
|
||||||
|
case "onBeforeStart"://发起前事件,验证物料重复
|
||||||
|
String formmain_id = getFormmain_id(businessDataStr);
|
||||||
|
if(formmain_id == null || "".equals(formmain_id)){
|
||||||
|
return BaseResult.getFailureMessageEntity("onBeforeStart流程监听事件,未获取到主表id");
|
||||||
|
}
|
||||||
|
ZjMaterielSynchronizationEventEntity entity = new ZjMaterielSynchronizationEventEntity();
|
||||||
|
entity.setFormmain_id(formmain_id);
|
||||||
|
List<ZjMaterielSynchronizationEventEntity> list = zjMaterielSynchronizationEventDao.queryBase(entity);
|
||||||
|
if(list == null || list.size() == 0){
|
||||||
|
return BaseResult.getFailureMessageEntity("onBeforeStart流程监听事件,未获取到明细数据");
|
||||||
|
}
|
||||||
|
return checkData(list,false);
|
||||||
|
case "onProcessFinished"://流程结束事件,同步物料到U8C
|
||||||
|
String id = getFormmain_id(businessDataStr);
|
||||||
|
if(id == null || "".equals(id)){
|
||||||
|
return BaseResult.getFailureMessageEntity("onProcessFinished流程监听事件,未获取到主表id");
|
||||||
|
}
|
||||||
|
ZjMaterielSynchronizationEventEntity entity1 = new ZjMaterielSynchronizationEventEntity();
|
||||||
|
entity1.setFormmain_id(id);
|
||||||
|
List<ZjMaterielSynchronizationEventEntity> list1 = zjMaterielSynchronizationEventDao.queryBase(entity1);
|
||||||
|
if(list1 == null || list1.size() == 0){
|
||||||
|
return BaseResult.getFailureMessageEntity("onProcessFinished流程监听事件,未获取到明细数据");
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
case "onStart"://流程发起 oa数据重新排序
|
||||||
|
return BaseResult.getSuccessMessageEntity("排序暂不处理");
|
||||||
|
default:
|
||||||
|
return BaseResult.getFailureMessageEntity("未匹配到流程监听事件!当前传入的eventType:" + eventType);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author lvleigang
|
||||||
|
* @Description 解析参数id
|
||||||
|
* @Date 11:38 上午 2025/3/18
|
||||||
|
* @param businessDataStr
|
||||||
|
* @return java.lang.String
|
||||||
|
**/
|
||||||
|
private String getFormmain_id(JSONObject businessDataStr) {
|
||||||
|
String id = null;
|
||||||
|
if(businessDataStr == null ){
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
JSONObject formmain_0274 = businessDataStr.getJSONObject("formmain_0274");
|
||||||
|
if(formmain_0274 == null){
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
id = formmain_0274.getString("id");
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author lvleigang
|
||||||
|
* @Description 验证物料重复
|
||||||
|
* @Date 1:58 下午 2025/3/17
|
||||||
|
* @param list 数据
|
||||||
|
* @param flag 该项是否校验
|
||||||
|
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||||
|
**/
|
||||||
|
private JsonResultEntity checkData(List<ZjMaterielSynchronizationEventEntity> list, boolean flag) {
|
||||||
|
// 定义正则表达式,匹配全角符号
|
||||||
|
String regex = "[\uFF00-\uFFEF]";
|
||||||
|
// 编译正则表达式
|
||||||
|
Pattern pattern = Pattern.compile(regex);
|
||||||
|
Integer num = 0;
|
||||||
|
Integer num1 = 0;
|
||||||
|
/*
|
||||||
|
1、必填校验:发起
|
||||||
|
物料中类、货品编码(修改必填)
|
||||||
|
保存
|
||||||
|
物料中类、货品编码(修改必填)、货品代码、品牌、客户名、优选等级、开发号、物料属性、是否委外
|
||||||
|
2、物料编码和货品代码不为空时,判断两个是否一样
|
||||||
|
3、判断存货分类里面如果有6或7,有一个必须有另一个
|
||||||
|
4、规格型号正则校验(不允许全角符号)
|
||||||
|
5、发起、保存判断物料分类是否在U8中存在
|
||||||
|
*/
|
||||||
|
for (int i = 0; i < list.size(); i++) {
|
||||||
|
ZjMaterielSynchronizationEventEntity entity = list.get(i);
|
||||||
|
if(entity.getField0004() == null || "".equals(entity.getField0004())){
|
||||||
|
return BaseResult.getFailureMessageEntity("序号为空");
|
||||||
|
}
|
||||||
|
if(entity.getField0043code() == null || "".equals(entity.getField0043code())){
|
||||||
|
return BaseResult.getFailureMessageEntity("序号为"+entity.getField0004()+"明细行的物料中类为空");
|
||||||
|
}else {
|
||||||
|
//判断存货分类里面如果有6或7,有一个必须有另一个
|
||||||
|
if(entity.getField0043code().startsWith("6")){
|
||||||
|
num++;
|
||||||
|
}
|
||||||
|
if(entity.getField0043code().startsWith("7")){
|
||||||
|
num1++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(entity.getField0018code() == null || "".equals(entity.getField0018code())){
|
||||||
|
return BaseResult.getFailureMessageEntity("序号为"+entity.getField0004()+"明细行的申请原因为空");
|
||||||
|
}
|
||||||
|
if("修改".equals(entity.getField0018code())){
|
||||||
|
if(entity.getField0005() == null || "".equals(entity.getField0005())){
|
||||||
|
return BaseResult.getFailureMessageEntity("序号为"+entity.getField0004()+"明细行的货品编码为空");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(flag){
|
||||||
|
if(entity.getField0045() == null || "".equals(entity.getField0045())){
|
||||||
|
return BaseResult.getFailureMessageEntity("序号为"+entity.getField0004()+"明细行的货品代码为空");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(flag){
|
||||||
|
if(entity.getField0008code() == null || "".equals(entity.getField0008code())){
|
||||||
|
return BaseResult.getFailureMessageEntity("序号为"+entity.getField0004()+"明细行的品牌为空");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(flag){
|
||||||
|
if(entity.getField0034code() == null || "".equals(entity.getField0034code())){
|
||||||
|
return BaseResult.getFailureMessageEntity("序号为"+entity.getField0004()+"明细行的客户名为空");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(flag){
|
||||||
|
if(entity.getField0012code() == null || "".equals(entity.getField0012code())){
|
||||||
|
return BaseResult.getFailureMessageEntity("序号为"+entity.getField0004()+"明细行的优选等级为空");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(flag){
|
||||||
|
if(entity.getField0039() == null || "".equals(entity.getField0039())){
|
||||||
|
return BaseResult.getFailureMessageEntity("序号为"+entity.getField0004()+"明细行的开发号为空");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(flag){
|
||||||
|
if(entity.getField0042code() == null || "".equals(entity.getField0042code())){
|
||||||
|
return BaseResult.getFailureMessageEntity("序号为"+entity.getField0004()+"明细行的物料属性为空");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(flag){
|
||||||
|
if(entity.getField0022code() == null || "".equals(entity.getField0022code())){
|
||||||
|
return BaseResult.getFailureMessageEntity("序号为"+entity.getField0004()+"明细行的是否委外为空");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//物料编码和货品代码不为空时,判断两个是否一样
|
||||||
|
if(entity.getField0005() != null && !"".equals(entity.getField0005())
|
||||||
|
&& entity.getField0045() != null && !"".equals(entity.getField0045())){
|
||||||
|
if(!entity.getField0005().equals(entity.getField0045())){
|
||||||
|
return BaseResult.getFailureMessageEntity("序号为"+entity.getField0004()+"明细行的物料编码和货品代码不一致");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//规格型号正则校验(不允许全角符号)
|
||||||
|
if(entity.getField0007() != null && !"".equals(entity.getField0007())){
|
||||||
|
if(pattern.matcher(entity.getField0007()).find()){
|
||||||
|
return BaseResult.getFailureMessageEntity("序号为"+entity.getField0004()+"明细行的规格型号包含全角符号");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//判断存货分类里面如果有6或7,有一个必须有另一个
|
||||||
|
if(num > 0){
|
||||||
|
if(num1 == 0){
|
||||||
|
return BaseResult.getFailureMessageEntity("存货分类存在6,不存在7");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(num1 > 0){
|
||||||
|
if(num == 0){
|
||||||
|
return BaseResult.getFailureMessageEntity("存货分类存在7,不存在6");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询u8物料
|
||||||
|
//zjMaterielSynchronizationEventDao
|
||||||
|
//发起、保存判断物料分类是否在U8中存在
|
||||||
|
for (int i = 0; i < list.size(); i++) {
|
||||||
|
ZjMaterielSynchronizationEventEntity entity = list.get(i);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return BaseResult.getSuccessMessageEntity("校验成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<plugin>
|
||||||
|
<id>ZjMaterielSynchronizationEventPluginInitializer</id>
|
||||||
|
<name>ZjMaterielSynchronizationEventPluginInitializer插件</name>
|
||||||
|
<category>202503170010</category>
|
||||||
|
</plugin>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||||
|
<beans default-autowire="byName">
|
||||||
|
<bean name="zjMaterielSynchronizationEventDao" class="com.hzya.frame.plugin.zjmaterielsynchronizationevent.dao.impl.ZjMaterielSynchronizationEventDaoImpl" />
|
||||||
|
</beans>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||||
|
<beans default-autowire="byName">
|
||||||
|
<bean name="zjMaterielSynchronizationEventPluginInitializer" class="com.hzya.frame.plugin.zjmaterielsynchronizationevent.plugin.ZjMaterielSynchronizationEventPluginInitializer" />
|
||||||
|
</beans>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||||
|
<beans default-autowire="byName">
|
||||||
|
<bean name="zjMaterielSynchronizationEventService" class="com.hzya.frame.plugin.zjmaterielsynchronizationevent.service.impl.ZjMaterielSynchronizationEventServiceImpl" />
|
||||||
|
</beans>
|
File diff suppressed because one or more lines are too long
|
@ -106,12 +106,12 @@ public class DataSourceConfig {
|
||||||
**/
|
**/
|
||||||
private static DruidDataSource createDefaultDataSource(JSONObject defaultDataSourceProperties) throws RuntimeException {
|
private static DruidDataSource createDefaultDataSource(JSONObject defaultDataSourceProperties) throws RuntimeException {
|
||||||
//根据datasource_code查询数据源配置信息
|
//根据datasource_code查询数据源配置信息
|
||||||
String datasource_code = String.valueOf(defaultDataSourceProperties.get("datasource_code"));
|
String datasource_code = defaultDataSourceProperties.getString("datasource_code");
|
||||||
String source_url = String.valueOf(defaultDataSourceProperties.get("source_url"));
|
String source_url = defaultDataSourceProperties.getString("source_url");
|
||||||
String login_name = String.valueOf(defaultDataSourceProperties.get("login_name"));
|
String login_name = defaultDataSourceProperties.getString("login_name");
|
||||||
String password = String.valueOf(defaultDataSourceProperties.get("password"));
|
String password = defaultDataSourceProperties.getString("password");
|
||||||
String db_name = String.valueOf(defaultDataSourceProperties.get("db_name"));
|
String db_name = defaultDataSourceProperties.getString("db_name");
|
||||||
String source_type = String.valueOf(defaultDataSourceProperties.get("source_type"));
|
String source_type = defaultDataSourceProperties.getString("source_type");
|
||||||
if (defaultDataSourceProperties != null) {
|
if (defaultDataSourceProperties != null) {
|
||||||
String driveClass = "";
|
String driveClass = "";
|
||||||
if ("mysql".equalsIgnoreCase(source_type)) {
|
if ("mysql".equalsIgnoreCase(source_type)) {
|
||||||
|
|
4
pom.xml
4
pom.xml
|
@ -14,8 +14,8 @@
|
||||||
<!-- <module>fw-nc</module>-->
|
<!-- <module>fw-nc</module>-->
|
||||||
<!-- <module>fw-ncc</module>-->
|
<!-- <module>fw-ncc</module>-->
|
||||||
<!-- <module>fw-ningbobank</module>-->
|
<!-- <module>fw-ningbobank</module>-->
|
||||||
<!-- <module>fw-oa</module>-->
|
<module>fw-oa</module>
|
||||||
<!-- <module>fw-u8</module>-->
|
<module>fw-u8</module>
|
||||||
<!-- <module>fw-u8c</module>-->
|
<!-- <module>fw-u8c</module>-->
|
||||||
<!-- <module>fw-u9c</module>-->
|
<!-- <module>fw-u9c</module>-->
|
||||||
</modules>
|
</modules>
|
||||||
|
|
Loading…
Reference in New Issue