Compare commits

...

11 Commits

Author SHA1 Message Date
xiang2lin 7f54370a64 默认查询语句 2025-06-20 19:54:37 +08:00
xiang2lin 5dc30f1ac3 更新OA表单校验字段 2025-06-20 19:53:26 +08:00
xiang2lin 00e3dc6c05 注册bean 2025-06-20 14:02:53 +08:00
xiang2lin da55f281f8 增加赠品字段 2025-06-20 14:01:23 +08:00
xiang2lin 7a749fc323 采购订单 2025-06-19 19:20:08 +08:00
xiang2lin b2bf806bb7 采购订单模板编号 2025-06-19 15:29:42 +08:00
xiang2lin 64afeadd0e 查OA用户 2025-06-18 19:23:43 +08:00
xiang2lin fc740242a4 数量字段取数修改
最终数量不为空时取最终数量
2025-06-15 19:43:07 +08:00
xiang2lin 59ed5e7fae 获取token的loginName从外部传 2025-06-13 16:59:31 +08:00
xiang2lin 99e306dc9c 删除没用的代码 2025-06-13 16:59:04 +08:00
xiang2lin a266f7f541 采购订单 2025-06-13 16:58:41 +08:00
37 changed files with 865 additions and 1761 deletions

View File

@ -1,16 +0,0 @@
package com.hzya.frame.plugin.ncc.dao;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.plugin.ncc.entity.POrderBEntity;
/**
* @description: 采购订单子表 dao
* @tableName: po_order_b
* @entityName: POrderBEntity
* @author: code_generator
* @history: 1.0
*/
public interface IPOrderBDao extends IBaseDao<POrderBEntity, String> {
}

View File

@ -1,16 +0,0 @@
package com.hzya.frame.plugin.ncc.dao;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.plugin.ncc.entity.POrderHEntity;
/**
* @description: 采购订单主表 dao
* @tableName: po_order
* @entityName: POrderHEntity
* @author: code_generator
* @history: 1.0
*/
public interface IPOrderHDao extends IBaseDao<POrderHEntity, String> {
}

View File

@ -1,19 +0,0 @@
package com.hzya.frame.plugin.ncc.dao.impl;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.plugin.ncc.dao.IPOrderBDao;
import com.hzya.frame.plugin.ncc.entity.POrderBEntity;
import org.springframework.stereotype.Repository;
/**
* @description: 采购订单子表 dao
* @tableName: po_order_b
* @entityName: POrderBEntity
* @author: code_generator
* @history:1.0
*/
@Repository("po_order_bdao")
public class POrderBDaoImpl extends MybatisGenericDao<POrderBEntity, String> implements IPOrderBDao {
}

View File

@ -1,19 +0,0 @@
package com.hzya.frame.plugin.ncc.dao.impl;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.plugin.ncc.dao.IPOrderHDao;
import com.hzya.frame.plugin.ncc.entity.POrderHEntity;
import org.springframework.stereotype.Repository;
/**
* @description: 采购订单主表 dao
* @tableName: po_order
* @entityName: POrderHEntity
* @author: code_generator
* @history:1.0
*/
@Repository("po_orderdao")
public class POrderHDaoImpl extends MybatisGenericDao<POrderHEntity, String> implements IPOrderHDao {
}

View File

@ -1,869 +0,0 @@
package com.hzya.frame.plugin.ncc.entity;
import com.hzya.frame.web.entity.BaseEntity;
import java.math.BigDecimal;
/**
* @description: 采购订单子表
* @tableName: po_order_b
* @entityName: POrderBEntity
* @author: code_generator
* @history: 1.0
*/
public class POrderBEntity extends BaseEntity {
/** */
private String pk_order;
/** */
private String pk_order_b;
/** 集团 */
private String pk_group;
/** 组织 */
private String pk_org;
/** 行号 */
private String crowno;
/** 物料 */
private String pk_material;
/** 物料编码 */
private String material_code;
/** 物料名称 */
private String material_name;
private String material_class_id;
/** 主单位 */
private String cunitid;
/** 主单位名称 */
private String cunitid_name;
/** 辅单位 */
private String castunitid;
/** 副单位名称 */
private String castunitid_name;
/** 吨数 */
private BigDecimal nnum;
/** 件数 */
private BigDecimal nastnum;
/** 换算率 */
private String vchangerate;
/** 无税单价 */
private BigDecimal norigprice;
/** 含税单价 */
private BigDecimal norigtaxprice;
/** 无税金额 */
private BigDecimal norignetprice;
/** 含税金额 */
private BigDecimal norigtaxnetprice;
/** 税额 */
private BigDecimal ntax;
/** 价税合计 */
private BigDecimal norigtaxmny;
/** 税率 */
private BigDecimal ntaxrate;
/** 币种 */
private String corigcurrencyid;
private String corigcurrencyid_name;
/** 来源单据类型 */
private String csourcetypecode;
/** 来源单据 */
private String csourceid;
/** 来源单据明细 */
private String csourcebid;
/** 源头单据类型 */
private String cfirsttypecode;
/** 源头单据 */
private String cfirstid;
/** 源头单据明细 */
private String cfirstbid;
/** 是否赠品 */
private String blargess;
/** 源头交易类型 */
private String vfirsttrantype;
/** 源头单据号 */
private String vfirstcode;
/** 源头单据行号 */
private String vfirstrowno;
/** 来源交易类型 */
private String vsourcetrantype;
/** 来源单据号 */
private String vsourcecode;
/** 来源单据行号 */
private String vsourcerowno;
/** 自由辅助属性1 */
private String vfree1;
/** 自由辅助属性2 */
private String vfree2;
/** 自由辅助属性3 */
private String vfree3;
/** 自由辅助属性4 */
private String vfree4;
/** 自由辅助属性5 */
private String vfree5;
/** 自由辅助属性6 */
private String vfree6;
private String pk_grade;
/** 自由辅助属性7 */
private String vfree7;
/** FSC/EUDR主键 */
private String pk_vfree8;
/** FSC/EUDR */
private String vfree8;
/** 自由辅助属性9 */
private String vfree9;
/** 品牌主键 */
private String pk_vfree10;
/** 品牌 */
private String vfree10;
/** 自定义项1 */
private String vbdef1;
/** 自定义项2 */
private String vbdef2;
/** 自定义项3 */
private String vbdef3;
/** 自定义项4 */
private String vbdef4;
/** 自定义项5 */
private String vbdef5;
/** 自定义项6 */
private String vbdef6;
/** 自定义项7 */
private String vbdef7;
/** 自定义项8 */
private String vbdef8;
/** 自定义项9 */
private String vbdef9;
/** 自定义项10 */
private String vbdef10;
/** 自定义项11 */
private String vbdef11;
/** 自定义项12 */
private String vbdef12;
/** 自定义项13 */
private String vbdef13;
/** 自定义项14 */
private String vbdef14;
/** 自定义项15 */
private String vbdef15;
/** 自定义项16 */
private String vbdef16;
/** 自定义项17 */
private String vbdef17;
/** 自定义项18 */
private String vbdef18;
/** 自定义项19 */
private String vbdef19;
/** 自定义项20 */
private String vbdef20;
private String vbmemo;
private String external_material_spec;
/** 报价单位 */
private String cqtunitid;
private String cqtunitid_name;
/** 报价数量 */
private BigDecimal nqtunitnum;
/** 折本汇率 */
private BigDecimal nexchangerate;
/** 收货仓库 */
private String pk_recvstordoc;
private String recvstordoc_name;
/** 计划到货日期 */
private String dplanarrvdate;
private String special_type;
private String vbatchcode;
private String ic_id;
private BigDecimal price;
private BigDecimal taxprice;
private String material_id;
public String getPk_order() {
return pk_order;
}
public void setPk_order(String pk_order) {
this.pk_order = pk_order;
}
public String getPk_order_b() {
return pk_order_b;
}
public void setPk_order_b(String pk_order_b) {
this.pk_order_b = pk_order_b;
}
public String getPk_group() {
return pk_group;
}
public void setPk_group(String pk_group) {
this.pk_group = pk_group;
}
public String getPk_org() {
return pk_org;
}
public void setPk_org(String pk_org) {
this.pk_org = pk_org;
}
public String getCrowno() {
return crowno;
}
public void setCrowno(String crowno) {
this.crowno = crowno;
}
public String getPk_material() {
return pk_material;
}
public void setPk_material(String pk_material) {
this.pk_material = pk_material;
}
public String getMaterial_code() {
return material_code;
}
public void setMaterial_code(String material_code) {
this.material_code = material_code;
}
public String getMaterial_name() {
return material_name;
}
public void setMaterial_name(String material_name) {
this.material_name = material_name;
}
public String getMaterial_class_id() {
return material_class_id;
}
public void setMaterial_class_id(String material_class_id) {
this.material_class_id = material_class_id;
}
public String getCunitid() {
return cunitid;
}
public void setCunitid(String cunitid) {
this.cunitid = cunitid;
}
public String getCunitid_name() {
return cunitid_name;
}
public void setCunitid_name(String cunitid_name) {
this.cunitid_name = cunitid_name;
}
public String getCastunitid() {
return castunitid;
}
public void setCastunitid(String castunitid) {
this.castunitid = castunitid;
}
public String getCastunitid_name() {
return castunitid_name;
}
public void setCastunitid_name(String castunitid_name) {
this.castunitid_name = castunitid_name;
}
public BigDecimal getNnum() {
return nnum;
}
public void setNnum(BigDecimal nnum) {
this.nnum = nnum;
}
public BigDecimal getNastnum() {
return nastnum;
}
public void setNastnum(BigDecimal nastnum) {
this.nastnum = nastnum;
}
public String getVchangerate() {
return vchangerate;
}
public void setVchangerate(String vchangerate) {
this.vchangerate = vchangerate;
}
public BigDecimal getNorigprice() {
return norigprice;
}
public void setNorigprice(BigDecimal norigprice) {
this.norigprice = norigprice;
}
public BigDecimal getNorigtaxprice() {
return norigtaxprice;
}
public void setNorigtaxprice(BigDecimal norigtaxprice) {
this.norigtaxprice = norigtaxprice;
}
public BigDecimal getNorignetprice() {
return norignetprice;
}
public void setNorignetprice(BigDecimal norignetprice) {
this.norignetprice = norignetprice;
}
public BigDecimal getNorigtaxnetprice() {
return norigtaxnetprice;
}
public void setNorigtaxnetprice(BigDecimal norigtaxnetprice) {
this.norigtaxnetprice = norigtaxnetprice;
}
public BigDecimal getNtax() {
return ntax;
}
public void setNtax(BigDecimal ntax) {
this.ntax = ntax;
}
public BigDecimal getNorigtaxmny() {
return norigtaxmny;
}
public void setNorigtaxmny(BigDecimal norigtaxmny) {
this.norigtaxmny = norigtaxmny;
}
public BigDecimal getNtaxrate() {
return ntaxrate;
}
public void setNtaxrate(BigDecimal ntaxrate) {
this.ntaxrate = ntaxrate;
}
public String getCorigcurrencyid() {
return corigcurrencyid;
}
public void setCorigcurrencyid(String corigcurrencyid) {
this.corigcurrencyid = corigcurrencyid;
}
public String getCorigcurrencyid_name() {
return corigcurrencyid_name;
}
public void setCorigcurrencyid_name(String corigcurrencyid_name) {
this.corigcurrencyid_name = corigcurrencyid_name;
}
public String getCsourcetypecode() {
return csourcetypecode;
}
public void setCsourcetypecode(String csourcetypecode) {
this.csourcetypecode = csourcetypecode;
}
public String getCsourceid() {
return csourceid;
}
public void setCsourceid(String csourceid) {
this.csourceid = csourceid;
}
public String getCsourcebid() {
return csourcebid;
}
public void setCsourcebid(String csourcebid) {
this.csourcebid = csourcebid;
}
public String getCfirsttypecode() {
return cfirsttypecode;
}
public void setCfirsttypecode(String cfirsttypecode) {
this.cfirsttypecode = cfirsttypecode;
}
public String getCfirstid() {
return cfirstid;
}
public void setCfirstid(String cfirstid) {
this.cfirstid = cfirstid;
}
public String getCfirstbid() {
return cfirstbid;
}
public void setCfirstbid(String cfirstbid) {
this.cfirstbid = cfirstbid;
}
public String getBlargess() {
return blargess;
}
public void setBlargess(String blargess) {
this.blargess = blargess;
}
public String getVfirsttrantype() {
return vfirsttrantype;
}
public void setVfirsttrantype(String vfirsttrantype) {
this.vfirsttrantype = vfirsttrantype;
}
public String getVfirstcode() {
return vfirstcode;
}
public void setVfirstcode(String vfirstcode) {
this.vfirstcode = vfirstcode;
}
public String getVfirstrowno() {
return vfirstrowno;
}
public void setVfirstrowno(String vfirstrowno) {
this.vfirstrowno = vfirstrowno;
}
public String getVsourcetrantype() {
return vsourcetrantype;
}
public void setVsourcetrantype(String vsourcetrantype) {
this.vsourcetrantype = vsourcetrantype;
}
public String getVsourcecode() {
return vsourcecode;
}
public void setVsourcecode(String vsourcecode) {
this.vsourcecode = vsourcecode;
}
public String getVsourcerowno() {
return vsourcerowno;
}
public void setVsourcerowno(String vsourcerowno) {
this.vsourcerowno = vsourcerowno;
}
public String getVfree1() {
return vfree1;
}
public void setVfree1(String vfree1) {
this.vfree1 = vfree1;
}
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 getPk_grade() {
return pk_grade;
}
public void setPk_grade(String pk_grade) {
this.pk_grade = pk_grade;
}
public String getVfree7() {
return vfree7;
}
public void setVfree7(String vfree7) {
this.vfree7 = vfree7;
}
public String getPk_vfree8() {
return pk_vfree8;
}
public void setPk_vfree8(String pk_vfree8) {
this.pk_vfree8 = pk_vfree8;
}
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;
}
public String getPk_vfree10() {
return pk_vfree10;
}
public void setPk_vfree10(String pk_vfree10) {
this.pk_vfree10 = pk_vfree10;
}
public String getVfree10() {
return vfree10;
}
public void setVfree10(String vfree10) {
this.vfree10 = vfree10;
}
public String getVbdef1() {
return vbdef1;
}
public void setVbdef1(String vbdef1) {
this.vbdef1 = vbdef1;
}
public String getVbdef2() {
return vbdef2;
}
public void setVbdef2(String vbdef2) {
this.vbdef2 = vbdef2;
}
public String getVbdef3() {
return vbdef3;
}
public void setVbdef3(String vbdef3) {
this.vbdef3 = vbdef3;
}
public String getVbdef4() {
return vbdef4;
}
public void setVbdef4(String vbdef4) {
this.vbdef4 = vbdef4;
}
public String getVbdef5() {
return vbdef5;
}
public void setVbdef5(String vbdef5) {
this.vbdef5 = vbdef5;
}
public String getVbdef6() {
return vbdef6;
}
public void setVbdef6(String vbdef6) {
this.vbdef6 = vbdef6;
}
public String getVbdef7() {
return vbdef7;
}
public void setVbdef7(String vbdef7) {
this.vbdef7 = vbdef7;
}
public String getVbdef8() {
return vbdef8;
}
public void setVbdef8(String vbdef8) {
this.vbdef8 = vbdef8;
}
public String getVbdef9() {
return vbdef9;
}
public void setVbdef9(String vbdef9) {
this.vbdef9 = vbdef9;
}
public String getVbdef10() {
return vbdef10;
}
public void setVbdef10(String vbdef10) {
this.vbdef10 = vbdef10;
}
public String getVbdef11() {
return vbdef11;
}
public void setVbdef11(String vbdef11) {
this.vbdef11 = vbdef11;
}
public String getVbdef12() {
return vbdef12;
}
public void setVbdef12(String vbdef12) {
this.vbdef12 = vbdef12;
}
public String getVbdef13() {
return vbdef13;
}
public void setVbdef13(String vbdef13) {
this.vbdef13 = vbdef13;
}
public String getVbdef14() {
return vbdef14;
}
public void setVbdef14(String vbdef14) {
this.vbdef14 = vbdef14;
}
public String getVbdef15() {
return vbdef15;
}
public void setVbdef15(String vbdef15) {
this.vbdef15 = vbdef15;
}
public String getVbdef16() {
return vbdef16;
}
public void setVbdef16(String vbdef16) {
this.vbdef16 = vbdef16;
}
public String getVbdef17() {
return vbdef17;
}
public void setVbdef17(String vbdef17) {
this.vbdef17 = vbdef17;
}
public String getVbdef18() {
return vbdef18;
}
public void setVbdef18(String vbdef18) {
this.vbdef18 = vbdef18;
}
public String getVbdef19() {
return vbdef19;
}
public void setVbdef19(String vbdef19) {
this.vbdef19 = vbdef19;
}
public String getVbdef20() {
return vbdef20;
}
public void setVbdef20(String vbdef20) {
this.vbdef20 = vbdef20;
}
public String getVbmemo() {
return vbmemo;
}
public void setVbmemo(String vbmemo) {
this.vbmemo = vbmemo;
}
public String getExternal_material_spec() {
return external_material_spec;
}
public void setExternal_material_spec(String external_material_spec) {
this.external_material_spec = external_material_spec;
}
public String getCqtunitid() {
return cqtunitid;
}
public void setCqtunitid(String cqtunitid) {
this.cqtunitid = cqtunitid;
}
public String getCqtunitid_name() {
return cqtunitid_name;
}
public void setCqtunitid_name(String cqtunitid_name) {
this.cqtunitid_name = cqtunitid_name;
}
public BigDecimal getNqtunitnum() {
return nqtunitnum;
}
public void setNqtunitnum(BigDecimal nqtunitnum) {
this.nqtunitnum = nqtunitnum;
}
public BigDecimal getNexchangerate() {
return nexchangerate;
}
public void setNexchangerate(BigDecimal nexchangerate) {
this.nexchangerate = nexchangerate;
}
public String getPk_recvstordoc() {
return pk_recvstordoc;
}
public void setPk_recvstordoc(String pk_recvstordoc) {
this.pk_recvstordoc = pk_recvstordoc;
}
public String getRecvstordoc_name() {
return recvstordoc_name;
}
public void setRecvstordoc_name(String recvstordoc_name) {
this.recvstordoc_name = recvstordoc_name;
}
public String getDplanarrvdate() {
return dplanarrvdate;
}
public void setDplanarrvdate(String dplanarrvdate) {
this.dplanarrvdate = dplanarrvdate;
}
public String getSpecial_type() {
return special_type;
}
public void setSpecial_type(String special_type) {
this.special_type = special_type;
}
public String getVbatchcode() {
return vbatchcode;
}
public void setVbatchcode(String vbatchcode) {
this.vbatchcode = vbatchcode;
}
public String getIc_id() {
return ic_id;
}
public void setIc_id(String ic_id) {
this.ic_id = ic_id;
}
public BigDecimal getPrice() {
return price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
public BigDecimal getTaxprice() {
return taxprice;
}
public void setTaxprice(BigDecimal taxprice) {
this.taxprice = taxprice;
}
public String getMaterial_id() {
return material_id;
}
public void setMaterial_id(String material_id) {
this.material_id = material_id;
}
}

View File

@ -1,183 +0,0 @@
<?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.ncc.dao.impl.POrderBDaoImpl">
<resultMap id="get-POrderBEntity-result" type="com.hzya.frame.plugin.ncc.entity.POrderBEntity">
<!-- -->
<!-- -->
<result property="pk_order" column="pk_order" />
<!-- -->
<result property="pk_order_b" column="pk_order_b" />
<!--集团 -->
<result property="pk_group" column="pk_group" />
<!--组织 -->
<result property="pk_org" column="pk_org" />
<!--行号 -->
<result property="crowno" column="crowno" />
<!--物料 -->
<result property="pk_material" column="pk_material" />
<!--物料编码 -->
<result property="material_code" column="material_code" />
<!--物料名称 -->
<result property="material_name" column="material_name" />
<!--主单位 -->
<result property="cunitid" column="cunitid" />
<!--主单位名称 -->
<result property="cunitid_name" column="cunitid_name" />
<!--辅单位 -->
<result property="castunitid" column="castunitid" />
<!--副单位名称 -->
<result property="castunitid_name" column="castunitid_name" />
<!--吨数 -->
<result property="nnum" column="nnum" />
<!--件数 -->
<result property="nastnum" column="nastnum" />
<!--换算率 -->
<result property="vchangerate" column="vchangerate" />
<!--无税单价 -->
<result property="norigprice" column="norigprice" />
<!--含税单价 -->
<result property="norigtaxprice" column="norigtaxprice" />
<!--无税金额 -->
<result property="norignetprice" column="norignetprice" />
<!--含税金额 -->
<result property="norigtaxnetprice" column="norigtaxnetprice" />
<!--税额 -->
<result property="ntax" column="ntax" />
<!--价税合计 -->
<result property="norigtaxmny" column="norigtaxmny" />
<!--税率 -->
<result property="ntaxrate" column="ntaxrate" />
<!--币种 -->
<result property="corigcurrencyid" column="corigcurrencyid" />
<result property="corigcurrencyid_name" column="corigcurrencyid_name" />
<!--来源单据类型 -->
<result property="csourcetypecode" column="csourcetypecode" />
<!--来源单据 -->
<result property="csourceid" column="csourceid" />
<!--来源单据明细 -->
<result property="csourcebid" column="csourcebid" />
<!--源头单据类型 -->
<result property="cfirsttypecode" column="cfirsttypecode" />
<!--源头单据 -->
<result property="cfirstid" column="cfirstid" />
<!--源头单据明细 -->
<result property="cfirstbid" column="cfirstbid" />
<!--是否赠品 -->
<result property="blargess" column="blargess" />
<!--源头交易类型 -->
<result property="vfirsttrantype" column="vfirsttrantype" />
<!--源头单据号 -->
<result property="vfirstcode" column="vfirstcode" />
<!--源头单据行号 -->
<result property="vfirstrowno" column="vfirstrowno" />
<!--来源交易类型 -->
<result property="vsourcetrantype" column="vsourcetrantype" />
<!--来源单据号 -->
<result property="vsourcecode" column="vsourcecode" />
<!--来源单据行号 -->
<result property="vsourcerowno" column="vsourcerowno" />
<!--自由辅助属性1 -->
<result property="vfree1" column="vfree1" />
<!--自由辅助属性2 -->
<result property="vfree2" column="vfree2" />
<!--自由辅助属性3 -->
<result property="vfree3" column="vfree3" />
<!--自由辅助属性4 -->
<result property="vfree4" column="vfree4" />
<!--自由辅助属性5 -->
<result property="vfree5" column="vfree5" />
<!--自由辅助属性6 -->
<result property="vfree6" column="vfree6" />
<!--自由辅助属性7 -->
<result property="vfree7" column="vfree7" />
<!--FSC/EUDR主键 -->
<result property="pk_vfree8" column="pk_vfree8" />
<!--FSC/EUDR -->
<result property="vfree8" column="vfree8" />
<!--自由辅助属性9 -->
<result property="vfree9" column="vfree9" />
<!--品牌主键 -->
<result property="pk_vfree10" column="pk_vfree10" />
<!--品牌 -->
<result property="vfree10" column="vfree10" />
<!--自定义项1 -->
<result property="vbdef1" column="vbdef1" />
<!--自定义项2 -->
<result property="vbdef2" column="vbdef2" />
<!--自定义项3 -->
<result property="vbdef3" column="vbdef3" />
<!--自定义项4 -->
<result property="vbdef4" column="vbdef4" />
<!--自定义项5 -->
<result property="vbdef5" column="vbdef5" />
<!--自定义项6 -->
<result property="vbdef6" column="vbdef6" />
<!--自定义项7 -->
<result property="vbdef7" column="vbdef7" />
<!--自定义项8 -->
<result property="vbdef8" column="vbdef8" />
<!--自定义项9 -->
<result property="vbdef9" column="vbdef9" />
<!--自定义项10 -->
<result property="vbdef10" column="vbdef10" />
<!--自定义项11 -->
<result property="vbdef11" column="vbdef11" />
<!--自定义项12 -->
<result property="vbdef12" column="vbdef12" />
<!--自定义项13 -->
<result property="vbdef13" column="vbdef13" />
<!--自定义项14 -->
<result property="vbdef14" column="vbdef14" />
<!--自定义项15 -->
<result property="vbdef15" column="vbdef15" />
<!--自定义项16 -->
<result property="vbdef16" column="vbdef16" />
<!--自定义项17 -->
<result property="vbdef17" column="vbdef17" />
<!--自定义项18 -->
<result property="vbdef18" column="vbdef18" />
<!--自定义项19 -->
<result property="vbdef19" column="vbdef19" />
<!--自定义项20 -->
<result property="vbdef20" column="vbdef20" />
<result property="vbmemo" column="vbmemo" />
<!--报价单位 -->
<result property="cqtunitid" column="cqtunitid" />
<result property="cqtunitid_name" column="cqtunitid_name" />
<!--报价数量 -->
<result property="nqtunitnum" column="nqtunitnum" />
<!--折本汇率 -->
<result property="nexchangerate" column="nexchangerate" />
<!--收货仓库 -->
<result property="pk_recvstordoc" column="pk_recvstordoc" />
<!--计划到货日期 -->
<result property="dplanarrvdate" column="dplanarrvdate" />
<result property="dr" column="dr" />
</resultMap>
<!--获取NCC采购订单表体数据 -->
<select id="entity_list_base" resultMap="get-POrderBEntity-result" parameterType="com.hzya.frame.plugin.ncc.entity.POrderBEntity">
SELECT
po_order_b.*,
bd_material.code material_code,
bd_material.name material_name,
bdm1.name cunitid_name,
bdm2.name castunitid_name,
bdm3.name cqtunitid_name,
bd_currtype.name corigcurrencyid_name,
po_order_b.dr
FROM
po_order_b
left join bd_material on po_order_b.pk_material = bd_material.pk_material
left join bd_measdoc bdm1 on po_order_b.cunitid = bdm1.pk_measdoc
left join bd_measdoc bdm2 on po_order_b.castunitid = bdm2.pk_measdoc
left join bd_measdoc bdm3 on po_order_b.cqtunitid = bdm3.pk_measdoc
left join bd_currtype on po_order_b.corigcurrencyid = bd_currtype.pk_currtype
<trim prefix="where" prefixOverrides="and">
1 = 1
<if test="pk_order != null "> and po_order_b.pk_order = #{pk_order}</if>
</trim>
</select>
</mapper>

View File

@ -1,163 +0,0 @@
package com.hzya.frame.plugin.ncc.entity;
import com.hzya.frame.web.entity.BaseEntity;
import java.util.List;
import java.util.Map;
/**
* @description: 采购订单主表
* @tableName: po_order
* @entityName: POrderHEntity
* @author: code_generator
* @history: 1.0
*/
public class POrderHEntity extends BaseEntity {
/** 采购订单 */
private String pk_order;
/** 集团 */
private String pk_group;
/** 集团名称 */
private String group_name;
/** 采购组织 */
private String pk_org;
private String pk_orgs;
private String pk_org_search;
/** 采购组织版本信息 */
private String pk_org_v;
/** 组织名称 */
private String org_name;
/** 订单编号 */
private String vbillcode;
/** 订单日期 */
private String dbilldate;
/** 供应商 */
private String pk_supplier;
/** 供应商版本 */
private String pk_supplier_v;
/** 供应商名称 */
private String supplier_name;
/** 采购部门 */
private String pk_dept;
/** 部门名称 */
private String dept_name;
/** 采购员 */
private String cemployeeid;
/** 采购员名称 */
private String cemployeeid_name;
/** 订单类型编码 */
private String vtrantypecode;
/** 订单类型名称 */
private String vtrantypecode_name;
/** 供应商发货地址 */
private String pk_deliveradd;
/** 供应商发货地址 */
private String deliveradd_name;
/** 单据状态 */
private String forderstatus;
private String forderstatus_name;
/** 备注 */
private String vmemo;
/** 运输方式 */
private String pk_transporttype;
/** 运输方式 */
private String transporttype_name;
/** 付款协议 */
private String pk_payterm;
/** 付款协议名称 */
private String payterm_name;
/** 最新版本 */
private String bislatest;
private String bislatest_name;
/** 总数量 */
private String ntotalastnum;
/** 总件数 */
private String ntotalpiece;
/** 价税合计 */
private String ntotalorigmny;
/** 业务流程 */
private String pk_busitype;
/** 结算方式 */
private String pk_balatype;
/** 币种 */
private String corigcurrencyid;
private String corigcurrencyid_name;
/** 进口合同号*/
private String vdef1;
/** */
private String vdef2;
/** 提单号 */
private String vdef3;
/** */
private String vdef4;
/** */
private String vdef5;
/** */
private String vdef6;
/** 承运商 */
private String vdef7;
private String vdef7_name;
/** */
private String vdef8;
/** */
private String vdef9;
/** */
private String vdef10;
/** */
private String vdef11;
/** */
private String vdef12;
/** */
private String vdef13;
/** 合同号 */
private String vdef14;
/** */
private String vdef15;
/** */
private String vdef16;
/** */
private String vdef17;
/** */
private String vdef18;
/** */
private String vdef19;
/** */
private String vdef20;
private String breturn;
/** 推送状态 */
private String push_status;
/** 项目 */
private String pk_project;
/** 项目名称 */
private String project_name;
private String type;
private String systate = "0";
private List<String> rowIds;
private List<POrderBEntity> detailList;
private Map<String, Object> icMap;
private String ic_id;
private String it_type;
private Boolean exempted_flag;
private Boolean isNotPo;
private String tms_bill_code;
private String bill_code_search;
// 是否关闭
private String bfinalclose;
// 发货地址
private String ship_address;
}

View File

@ -1,168 +0,0 @@
<?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.ncc.dao.impl.POrderHDaoImpl">
<resultMap id="get-POrderHEntity-result" type="com.hzya.frame.plugin.ncc.entity.POrderHEntity">
<!-- -->
<!--采购订单 -->
<result property="pk_order" column="pk_order" />
<!--集团 -->
<result property="pk_group" column="pk_group" />
<!--集团名称 -->
<result property="group_name" column="group_name" />
<!--采购组织 -->
<result property="pk_org" column="pk_org" />
<!--采购组织版本信息 -->
<result property="pk_org_v" column="pk_org_v" />
<!--组织名称 -->
<result property="org_name" column="org_name" />
<!--订单编号 -->
<result property="vbillcode" column="vbillcode" />
<!--订单日期 -->
<result property="dbilldate" column="dbilldate" />
<!--供应商 -->
<result property="pk_supplier" column="pk_supplier" />
<!--供应商版本 -->
<result property="pk_supplier_v" column="pk_supplier_v" />
<!--供应商名称 -->
<result property="supplier_name" column="supplier_name" />
<!--采购部门 -->
<result property="pk_dept" column="pk_dept" />
<!--部门名称 -->
<result property="dept_name" column="dept_name" />
<!--采购员 -->
<result property="cemployeeid" column="cemployeeid" />
<!--采购员名称 -->
<result property="cemployeeid_name" column="cemployeeid_name" />
<!--订单类型编码 -->
<result property="vtrantypecode" column="vtrantypecode" />
<!--订单类型名称 -->
<result property="vtrantypecode_name" column="vtrantypecode_name" />
<!--供应商发货地址 -->
<result property="pk_deliveradd" column="pk_deliveradd" />
<!--供应商发货地址 -->
<result property="deliveradd_name" column="deliveradd_name" />
<!--单据状态 -->
<result property="forderstatus" column="forderstatus" />
<result property="forderstatus_name" column="forderstatus_name" />
<!--备注 -->
<result property="vmemo" column="vmemo" />
<!--运输方式 -->
<result property="pk_transporttype" column="pk_transporttype" />
<!--运输方式 -->
<result property="transporttype_name" column="transporttype_name" />
<!--付款协议 -->
<result property="pk_payterm" column="pk_payterm" />
<!--付款协议名称 -->
<result property="payterm_name" column="payterm_name" />
<!--最新版本 -->
<result property="bislatest" column="bislatest" />
<!--总数量 -->
<result property="ntotalastnum" column="ntotalastnum" />
<!--总件数 -->
<result property="ntotalpiece" column="ntotalpiece" />
<!--价税合计 -->
<result property="ntotalorigmny" column="ntotalorigmny" />
<!--业务流程 -->
<result property="pk_busitype" column="pk_busitype" />
<!--结算方式 -->
<result property="pk_balatype" column="pk_balatype" />
<!--币种 -->
<result property="corigcurrencyid" column="corigcurrencyid" />
<result property="corigcurrencyid_name" column="corigcurrencyid_name" />
<!--进口合同号
-->
<result property="vdef1" column="vdef1" />
<!-- -->
<result property="vdef2" column="vdef2" />
<!--提单号 -->
<result property="vdef3" column="vdef3" />
<!-- -->
<result property="vdef4" column="vdef4" />
<!-- -->
<result property="vdef5" column="vdef5" />
<!-- -->
<result property="vdef6" column="vdef6" />
<!--承运商 -->
<result property="vdef7" column="vdef7" />
<!-- -->
<result property="vdef8" column="vdef8" />
<!-- -->
<result property="vdef9" column="vdef9" />
<!-- -->
<result property="vdef10" column="vdef10" />
<!-- -->
<result property="vdef11" column="vdef11" />
<!-- -->
<result property="vdef12" column="vdef12" />
<!-- -->
<result property="vdef13" column="vdef13" />
<!--合同号 -->
<result property="vdef14" column="vdef14" />
<!-- -->
<result property="vdef15" column="vdef15" />
<!-- -->
<result property="vdef16" column="vdef16" />
<!-- -->
<result property="vdef17" column="vdef17" />
<!-- -->
<result property="vdef18" column="vdef18" />
<!-- -->
<result property="vdef19" column="vdef19" />
<!-- -->
<result property="vdef20" column="vdef20" />
<result property="breturn" column="breturn" />
<result property="bfinalclose" column="bfinalclose" />
<!--项目 -->
<result property="pk_project" column="pk_project" />
<!--项目名称 -->
<result property="project_name" column="project_name" />
<result property="dr" column="dr" />
</resultMap>
<!--获取NCC采购订单表头数据 -->
<select id="entity_list_base" resultMap="get-POrderHEntity-result" parameterType="com.hzya.frame.plugin.ncc.entity.POrderHEntity">
SELECT
po_order.*,
po_order.dr,
org_orgs.name org_name,
bd_supplier.name supplier_name,
org_dept.name dept_name,
bd_psndoc.name cemployeeid_name,
bd_billtype.billtypename vtrantypecode_name,
bd_payment.name transporttype_name,
bd_project.project_name project_name,
bd_currtype.name corigcurrencyid_name,
CASE po_order.forderstatus
WHEN 0 THEN
'自由'
WHEN 1 THEN
'提交'
WHEN 2 THEN
'正在审批'
WHEN 4 THEN
'审批不通过'
ELSE
'审批通过'
END forderstatus_name
FROM
po_order
left join org_orgs on po_order.pk_org = org_orgs.pk_org
left join bd_supplier on po_order.pk_supplier = bd_supplier.pk_supplier
left join org_dept on po_order.pk_dept = org_dept.pk_dept
left join bd_psndoc on po_order.cemployeeid = bd_psndoc.pk_psndoc
left join bd_billtype on po_order.vtrantypecode = bd_billtype.pk_billtypecode
left join bd_payment on po_order.pk_transporttype = bd_payment.pk_payment
left join bd_project on po_order.pk_project = bd_project.pk_project
left join bd_currtype on po_order.corigcurrencyid = bd_currtype.pk_currtype
<trim prefix="where" prefixOverrides="and">
po_order.forderstatus = '3'
<if test="pk_org != null and pk_org != ''"> and po_order.pk_org = #{pk_org}</if>
<if test="pk_orgs != null and pk_orgs != ''"> and po_order.pk_org in (${pk_orgs})</if>
<if test="vbillcode != null and vbillcode != ''"> and po_order.vbillcode = #{vbillcode}</if>
<if test="dbilldate != null and dbilldate != ''"> and po_order.dbilldate &gt;= #{dbilldate}</if>
<if test="timestamp != null and timestamp != ''"> and po_order.ts &gt;= #{timestamp}</if>
</trim>
</select>
</mapper>

View File

@ -1,24 +0,0 @@
package com.hzya.frame.plugin.ncc.service;
import com.hzya.frame.basedao.service.IBaseService;
import com.hzya.frame.plugin.ncc.entity.POrderBEntity;
import java.util.List;
/**
* @description: 采购订单子表 service
* @tableName: po_order_b
* @entityName: POrderBEntity
* @author: code_generator
* @history: 1.0
*/
public interface IPOrderBService extends IBaseService<POrderBEntity,String> {
/**
* 查询采购订单子表
* @param entity
* @return
*/
List<POrderBEntity> queryList(POrderBEntity entity);
}

View File

@ -1,24 +0,0 @@
package com.hzya.frame.plugin.ncc.service;
import com.hzya.frame.basedao.service.IBaseService;
import com.hzya.frame.plugin.ncc.entity.POrderHEntity;
import java.util.List;
/**
* @description: 采购订单主表 service
* @tableName: po_order
* @entityName: POrderHEntity
* @author: code_generator
* @history: 1.0
*/
public interface IPOrderHService extends IBaseService<POrderHEntity,String> {
/**
* 查询采购订单主表
* @param entity
* @return
*/
List<POrderHEntity> queryList(POrderHEntity entity);
}

View File

@ -1,19 +0,0 @@
package com.hzya.frame.plugin.ncc.service;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.web.entity.JsonResultEntity;
/**
* @Description NCC采购订单
* @Author xiangerlin
* @Date 2025/6/3 19:09
**/
public interface IPoOrderPluginInService {
/**
* NCC采购订单传到OA走审批流
* @param requestJson
* @return
*/
JsonResultEntity sync2oa(JSONObject requestJson);
}

View File

@ -1,44 +0,0 @@
package com.hzya.frame.plugin.ncc.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.basedao.service.impl.BaseService;
import com.hzya.frame.plugin.ncc.dao.IPOrderBDao;
import com.hzya.frame.plugin.ncc.entity.POrderBEntity;
import com.hzya.frame.plugin.ncc.service.IPOrderBService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @description: 采购订单子表 service
* @tableName: po_order_b
* @entityName: POrderBEntity
* @author: code_generator
* @history: 1.0
*/
@Service(value="po_order_bService")
public class POrderBServiceImpl extends BaseService<POrderBEntity,String> implements IPOrderBService {
protected IPOrderBDao porderbDao;
@Autowired
public void setPOrderBDao(IPOrderBDao dao) {
this.porderbDao = dao;
this.dao=dao;
}
/**
* 查询采购订单子表
*
* @param entity
* @return
*/
@DS(value = "#entity.dataSourceCode")
@Override
public List<POrderBEntity> queryList(POrderBEntity entity) {
List<POrderBEntity> queryList = porderbDao.query(entity);
return queryList;
}
}

View File

@ -1,53 +0,0 @@
package com.hzya.frame.plugin.ncc.service.impl;
import cn.dev33.satoken.stp.StpUtil;
import cn.hutool.core.lang.Assert;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.basedao.service.impl.BaseService;
import com.hzya.frame.plugin.ncc.dao.IPOrderHDao;
import com.hzya.frame.plugin.ncc.entity.POrderHEntity;
import com.hzya.frame.plugin.ncc.service.IPOrderHService;
import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @description: 采购订单主表 service
* @tableName: po_order
* @entityName: POrderHEntity
* @author: code_generator
* @history: 1.0
*/
@Service(value="po_orderService")
public class POrderHServiceImpl extends BaseService<POrderHEntity,String> implements IPOrderHService {
protected IPOrderHDao porderhDao;
@Autowired
public void setPOrderHDao(IPOrderHDao dao) {
this.porderhDao = dao;
this.dao=dao;
}
/**
* 查询采购订单主表
*
* @param entity
* @return
*/
@DS(value = "#entity.dataSourceCode")
@Override
public List<POrderHEntity> queryList(POrderHEntity entity) {
List<POrderHEntity> queryList = porderhDao.query(entity);
return queryList;
}
}

View File

@ -1,104 +0,0 @@
package com.hzya.frame.plugin.ncc.service.impl;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.plugin.ncc.service.IPOrderBService;
import com.hzya.frame.plugin.ncc.service.IPOrderHService;
import com.hzya.frame.plugin.ncc.service.IPoOrderPluginInService;
import com.hzya.frame.seeyon.util.OARestUtil;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import java.util.LinkedList;
import java.util.List;
/**
* @Description NCC采购订单
* @Author xiangerlin
* @Date 2025/6/3 19:09
**/
public class PoOrderPluginInServiceImpl implements IPoOrderPluginInService {
Logger logger = LoggerFactory.getLogger(PoOrderPluginInServiceImpl.class);
@Autowired
private IPOrderHService pOrderHService;
@Autowired
private IPOrderBService pOrderBService;
@Value("${zt.url}")
private String interfaceUrl;
@Autowired
private OARestUtil oaRestUtil;
/**
* NCC采购订单传到OA走审批流
*
* @param requestJson
* @return
*/
@Override
public JsonResultEntity sync2oa(JSONObject requestJson) {
//数据源编码
String datasourceCode = requestJson.getString("sourceCode");
if (StrUtil.isNotEmpty(datasourceCode)){
//查NCC单据
//组装参数
JSONObject formmain_0256 = new JSONObject();//主表数据
List<JSONObject> formson_0257_list = new LinkedList<>();//子表数据
formmain_0256.put("采购组织","");
formmain_0256.put("订单编号","");
formmain_0256.put("订单日期","");
formmain_0256.put("供应商","");
formmain_0256.put("采购员","");
formmain_0256.put("开票供应商","");
formmain_0256.put("付款协议","");
formmain_0256.put("发起人","");
formmain_0256.put("单据状态","");
formmain_0256.put("备注","");
formmain_0256.put("补货","");
formmain_0256.put("退货","");
formmain_0256.put("总数量","");
formmain_0256.put("总价税合计","");
formmain_0256.put("币种","");
formmain_0256.put("退货退库基于原订单补货","");
formmain_0256.put("最终关闭","");
formmain_0256.put("采购部门","");
formmain_0256.put("订单类型","");
//子表
JSONObject formson_0257 = new JSONObject();
formson_0257.put("收货库存组织","");
formson_0257.put("行号","");
formson_0257.put("物料编码","");
formson_0257.put("物料名称","");
formson_0257.put("单位","");
formson_0257.put("数量","");
formson_0257.put("换算率","");
formson_0257.put("无税单价","");
formson_0257.put("含税单价","");
formson_0257.put("集团本币无税金额","");
formson_0257.put("集团本币价税合计","");
formson_0257.put("计划收货日期","");
formson_0257.put("收货仓库","");
formson_0257.put("税率","");
formson_0257_list.add(formson_0257);
String param = oaRestUtil.processParamValueOf(formmain_0256, formson_0257_list, "模板编号", "formmain_0256", "formson_0257");
String token = oaRestUtil.getToken("hzyaRest", "8000640001");
logger.info("NCC发起OA采购订单请求参数{}",param);
//调用OA接口
String result = HttpRequest.post(interfaceUrl)
.header("token",token)// token
.header("appId","800064")// 建辉OA应用
.header("apiCode","8000640000")//流程表单接口
.header("publicKey","ZJYAAr9TeFduBYu7uJeie2KYdQsnBaEYZHmOjPWMMVZmzelCe7eDIk+3zDUT+v578prj")//NCC应用key
.header("secretKey","f4SSnYcDQmdkwwuGJd2+934q6lM1NnUm5dmOw/4Wvy2mo6PgkKsI/drXYyyLWQCaj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//NCC应用密钥
.body(param).execute().body();
// JsonResultEntity resultEntity = (JsonResultEntity) oerDjmlService.handleOerDjml(paramJSON);
// logger.info("保存GRPU8响应参数:{}",JSONObject.toJSON(resultEntity));
logger.info("NCC发起OA采购订单响应参数:{}",result);
//更新NCC推送状态
}
return null;
}
}

View File

@ -0,0 +1,12 @@
package com.hzya.frame.plugin.oa.poorder.dao;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.plugin.oa.poorder.entity.PoOrderEntity;
/**
* @Description OA采购订单
* @Author xiangerlin
* @Date 2025/6/20 17:52
**/
public interface IPoOrderExtDao extends IBaseDao<PoOrderEntity,String> {
}

View File

@ -0,0 +1,15 @@
package com.hzya.frame.plugin.oa.poorder.dao.impl;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.plugin.oa.poorder.dao.IPoOrderExtDao;
import com.hzya.frame.plugin.oa.poorder.entity.PoOrderEntity;
import org.springframework.stereotype.Repository;
/**
* @Description
* @Author xiangerlin
* @Date 2025/6/20 17:57
**/
@Repository("poOrderDaoExtImpl")
public class PoOrderDaoExtImpl extends MybatisGenericDao<PoOrderEntity,String> implements IPoOrderExtDao {
}

View File

@ -0,0 +1,39 @@
package com.hzya.frame.plugin.oa.poorder.entity;
import com.hzya.frame.web.entity.BaseEntity;
/**
* @Description OA采购订单
* @Author xiangerlin
* @Date 2025/6/20 17:47
**/
public class PoOrderEntity extends BaseEntity {
private String field0055;//NCC单据号
private String field0058;//校验1
private String field0059;//校验2
public String getField0055() {
return field0055;
}
public void setField0055(String field0055) {
this.field0055 = field0055;
}
public String getField0058() {
return field0058;
}
public void setField0058(String field0058) {
this.field0058 = field0058;
}
public String getField0059() {
return field0059;
}
public void setField0059(String field0059) {
this.field0059 = field0059;
}
}

View File

@ -0,0 +1,17 @@
<?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.oa.poorder.dao.impl.PoOrderDaoExtImpl">
<update id="entity_update" parameterType="com.hzya.frame.plugin.oa.poorder.entity.PoOrderEntity">
update formmain_0256
<set>
<if test="field0058 != null and field0058 != '' ">
field0058 = #{field0058},
</if>
<if test="field0059 != null and field0059 != '' ">
field0059 = #{field0059}
</if>
</set>
where id = #{id}
</update>
</mapper>

View File

@ -1,19 +1,23 @@
package com.hzya.frame.plugin.ncc.plugin;
package com.hzya.frame.plugin.oa.poorder.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.plugin.oa.poorder.service.IPoOrderService;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @Description NCC采购订单传发起OA审批
* @Description OA采购订单审批事件, 把审批结果传到NCC
* @Author xiangerlin
* @Date 2025/6/3 19:01
* @Date 2025/6/15 13:25
**/
public class PoOrderPluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(PoOrderPluginInitializer.class);
public class PoOrderApprovalEventPluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(PoOrderApprovalEventPluginInitializer.class);
@Autowired
private IPoOrderService poOrderService;
/***
* 插件初始化方法
* @Author 👻👻👻👻👻👻👻👻 gjh
@ -45,7 +49,7 @@ public class PoOrderPluginInitializer extends PluginBaseEntity {
**/
@Override
public String getPluginId() {
return "PoOrderPluginInitializer";
return "PoOrderApprovalEventPlugin";
}
/****
@ -56,7 +60,7 @@ public class PoOrderPluginInitializer extends PluginBaseEntity {
**/
@Override
public String getPluginName() {
return "NCC采购订单传OA";
return "OA采购订单审批事件插件";
}
/****
@ -67,7 +71,7 @@ public class PoOrderPluginInitializer extends PluginBaseEntity {
**/
@Override
public String getPluginLabel() {
return "NCC采购订单传OA";
return "OA采购订单审批事件插件";
}
/***
@ -91,12 +95,13 @@ public class PoOrderPluginInitializer extends PluginBaseEntity {
**/
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
logger.info("======OA采购订单审批事件插件传NCC插件======{}",JSONObject.toJSONString(requestJson));
try {
logger.info("======开始执行NCC采购订单传OA插件======");
poOrderService.approvedEvent(requestJson);
}catch (Exception e){
logger.info("======执行NCC采购订单传OA插件出错======{}",e.getMessage());
return BaseResult.getFailureMessageEntity("请NCC采购订单传OA插件执行失败",e.getMessage());
logger.info("======OA采购订单审批事件插件传NCC插件======{}",e.getMessage());
return BaseResult.getFailureMessageEntity("OA采购订单审批事件插件执行失败",e.getMessage());
}
return BaseResult.getSuccessMessageEntity("NCC采购订单传OA插件执行成功");
return BaseResult.getSuccessMessageEntity("OA采购订单审批事件插件执行成功");
}
}

View File

@ -0,0 +1,18 @@
package com.hzya.frame.plugin.oa.poorder.service;
import com.hzya.frame.basedao.service.IBaseService;
import com.hzya.frame.plugin.oa.poorder.entity.PoOrderEntity;
/**
* @Description
* @Author xiangerlin
* @Date 2025/6/20 19:36
**/
public interface IPoOrderExtService extends IBaseService<PoOrderEntity,String> {
/**
* 更新校验字段防止用户从OA侧发起采购订单
* @param entity
*/
void updateVerifyFlag(PoOrderEntity entity);
}

View File

@ -0,0 +1,26 @@
package com.hzya.frame.plugin.oa.poorder.service;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.web.entity.JsonResultEntity;
/**
* @Description 接收NCC采购订单的请求
* @Author xiangerlin
* @Date 2025/6/12 17:03
**/
public interface IPoOrderService {
/**
* 接收NCC的请求并转换成OA的参数
* @param reqJson
* @return
*/
JsonResultEntity buildOAParam(JSONObject reqJson);
/**
* OA审批事件
* @param reqJson
* @return
*/
JsonResultEntity approvedEvent(JSONObject reqJson)throws Exception;
}

View File

@ -0,0 +1,38 @@
package com.hzya.frame.plugin.oa.poorder.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.basedao.service.impl.BaseService;
import com.hzya.frame.plugin.oa.poorder.dao.IPoOrderExtDao;
import com.hzya.frame.plugin.oa.poorder.entity.PoOrderEntity;
import com.hzya.frame.plugin.oa.poorder.service.IPoOrderExtService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @Description
* @Author xiangerlin
* @Date 2025/6/20 19:37
**/
@Service(value = "poOrderExtServiceImpl")
public class PoOrderExtServiceImpl extends BaseService<PoOrderEntity,String> implements IPoOrderExtService {
private IPoOrderExtDao poOrderExtDao;
@Autowired
public void setPoOrderExtDao(IPoOrderExtDao dao) {
this.poOrderExtDao = dao;
this.dao = dao;
}
/**
* 更新校验字段防止用户从OA侧发起采购订单
*
* @param entity
*/
@DS("#entity.dataSourceCode")
@Override
public void updateVerifyFlag(PoOrderEntity entity) {
poOrderExtDao.update(entity);
}
}

View File

@ -0,0 +1,223 @@
package com.hzya.frame.plugin.oa.poorder.service.impl;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.execsql.entity.ExecSqlEntity;
import com.hzya.frame.execsql.service.IExecSqlService;
import com.hzya.frame.plugin.oa.poorder.entity.PoOrderEntity;
import com.hzya.frame.plugin.oa.poorder.service.IPoOrderExtService;
import com.hzya.frame.plugin.oa.poorder.service.IPoOrderService;
import com.hzya.frame.seeyon.enums.ColEventTypeEnum;
import com.hzya.frame.seeyon.org.member.entity.UserViewEntity;
import com.hzya.frame.seeyon.org.member.service.IUserViewService;
import com.hzya.frame.seeyon.util.OARestUtil;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.util.LinkedList;
import java.util.List;
/**
* @Description 接收NCC采购订单的请求
* @Author xiangerlin
* @Date 2025/6/12 17:04
**/
@Service(value="nCCPoOrderServiceImpl")
public class PoOrderServiceImpl implements IPoOrderService {
Logger logger = LoggerFactory.getLogger(PoOrderServiceImpl.class);
@Autowired
private IExecSqlService execSqlService;
@Autowired
private OARestUtil oaRestUtil;
@Autowired
private IUserViewService userViewService;
@Autowired
private IPoOrderExtService poOrderExtService;
@Value("${zt.url}")
private String interfaceUrl;
@Value("${oa.po_order_template_code:}")
private String templateCode;
/**
* 接收NCC的请求并转换成OA的参数
*
* @param reqJson
* @return
*/
@Override
public JsonResultEntity buildOAParam(JSONObject reqJson) {
JSONObject nccObj = JSONObject.parseObject(reqJson.getString("jsonStr"));
logger.info("中台接收到NCC采购订单的请求参数:{}",reqJson.getString("jsonStr"));
Assert.notNull(nccObj,"参数不能为空");
JSONObject head = nccObj.getJSONObject("head");
JSONArray detailList = nccObj.getJSONArray("body");
Assert.notNull(head,"参数不能为空");
Assert.notNull(detailList,"参数不能为空");
UserViewEntity userView = new UserViewEntity();
userView.setStaffNumber(head.getString("user_code"));
userView.setDataSourceCode("JH-OA");
UserViewEntity userViewEntity = userViewService.queryByStaffNumber(userView);
//组装参数
JSONObject formmain_0256 = new JSONObject();//主表数据
List<JSONObject> formson_0257_list = new LinkedList<>();//子表数据
formmain_0256.put("采购组织名称",head.getString("org_name"));
formmain_0256.put("订单日期",head.getString("dbilldate"));
formmain_0256.put("供应商",head.getString("sup_name"));
formmain_0256.put("采购员姓名",head.getString("cemployeename"));
formmain_0256.put("供应商名称",head.getString("sup_name"));
formmain_0256.put("开票供应商",head.getString("invc_sup_name"));
formmain_0256.put("付款协议",head.getString("payterm_name"));
formmain_0256.put("单据状态",head.getString("forderstatus"));
formmain_0256.put("备注",head.getString("vmemo"));
formmain_0256.put("补货",booleanToStr(head.getString("bisreplenish")));
formmain_0256.put("退货",booleanToStr(head.getString("breturn")));
formmain_0256.put("总数量",head.getString("ntotalastnum"));
formmain_0256.put("总价税合计",head.getString("ntotalorigmny"));
formmain_0256.put("币种",head.getString("currtype_name"));
formmain_0256.put("退货退库基于原订单补货",booleanToStr(head.getString("brefwhenreturn")));
formmain_0256.put("最终关闭",booleanToStr(head.getString("bfinalclose")));
formmain_0256.put("采购部门",head.getString("dept_name"));
formmain_0256.put("订单类型",head.getString("billtypename"));
formmain_0256.put("NCC采购订单编号",head.getString("vbillcode"));
formmain_0256.put("NCC采购订单PK",head.getString("pk_order"));
//子表
for (int i=0; i < detailList.size(); i++){
JSONObject detail = (JSONObject) detailList.get(i);
JSONObject formson_0257 = new JSONObject();
formson_0257.put("收货库存组织",detail.getString("arrvstoorg_name").toLowerCase());
formson_0257.put("行号",detail.getString("crowno"));
formson_0257.put("物料编码",detail.getString("material_code"));
formson_0257.put("物料名称",detail.getString("material_name"));
formson_0257.put("规格",detail.getString("materialspec"));
formson_0257.put("型号",detail.getString("materialtype"));
formson_0257.put("单位",detail.getString("cunitname"));
formson_0257.put("数量",detail.getString("nnum"));
formson_0257.put("换算率",detail.getString("vchangerate"));
formson_0257.put("无税单价",detail.getString("nqtorigprice"));
formson_0257.put("含税单价",detail.getString("nqtorigtaxprice"));
formson_0257.put("价税合计",detail.getString("norigtaxmny"));
formson_0257.put("集团本币无税金额",detail.getString("norigmny"));
formson_0257.put("集团本币价税合计",detail.getString("norigtaxmny"));
formson_0257.put("计划收货日期",detail.getString("dplanarrvdate"));
formson_0257.put("收货仓库",detail.getString("recvstordoc_name"));
formson_0257.put("税率",detail.getString("ntaxrate"));
formson_0257.put("赠品",booleanToStr(detail.getString("blargess")));
formson_0257.put("NCC采购订单表体PK",detail.getString("pk_order_b"));
formson_0257_list.add(formson_0257);
}
String param = oaRestUtil.processParamValueOf(formmain_0256, formson_0257_list, templateCode, "formmain_0256", "formson_0257");
String token = oaRestUtil.getToken(userViewEntity.getLoginName(), "8000640001");
logger.info("NCC发起OA采购订单请求参数{}",param);
//调用OA接口
String result = HttpRequest.post(interfaceUrl)
.header("token",token)// token
.header("appId","800064")// 建辉OA应用
.header("apiCode","8000640000")//流程表单接口
.header("publicKey","ZJYAAr9TeFduBYu7uJeie2KYdQsnBaEYZHmOjPWMMVZmzelCe7eDIk+3zDUT+v578prj")//NCC应用key
.header("secretKey","f4SSnYcDQmdkwwuGJd2+934q6lM1NnUm5dmOw/4Wvy2mo6PgkKsI/drXYyyLWQCaj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//NCC应用密钥
.body(param).execute().body();
logger.info("NCC发起OA采购订单响应参数:{}",result);
JSONObject resultJson = JSONObject.parseObject(result);
if (null == resultJson){
return BaseResult.getFailureMessageEntity("发起OA审批失败");
}
if (!resultJson.getBoolean("flag")){
return BaseResult.getFailureMessageEntity("发起OA审批失败"+resultJson.getString("msg"));
}
return BaseResult.getSuccessMessageEntity(resultJson.getJSONObject("attribute"));
}
/**
* OA审批事件
*POSTQUANTITY
* @param requestJson
* @return
*/
@Override
public JsonResultEntity approvedEvent(JSONObject requestJson)throws Exception {
//数据源编码
String datasourceCode = requestJson.getString("sourceCode");
String task_living_details_id = requestJson.getString("integration_task_living_details_id");
String headersStr = requestJson.getString("headers");//请求头
String eventType = requestJson.getString("eventType");
String summaryId = requestJson.getString("summaryId");
JSONObject headers = requestJson.getJSONObject("headers");
Assert.notEmpty(eventType,"eventType不能为空");
Assert.notEmpty(headersStr,"headers不能为空");
String formmainTableName = headers.getString("formmainTableName");
JSONObject jsonStrObj = requestJson.getJSONObject("jsonStr");
JSONObject businessData = jsonStrObj.getJSONObject("businessDataStr");
JSONObject formmainData = businessData.getJSONObject(formmainTableName);
if (null != formmainData){
String pk_order = formmainData.getString("field0056");//采购订单pk
String vbillcode = formmainData.getString("field0055");//采购订单code
String userId = headers.getString("user_id");//审批人id
JSONObject json = new JSONObject();
json.put("pk_order",pk_order);
json.put("vbillcode",vbillcode);
json.put("user_id",userId);
String params = json.toString();
//组装参数调用NCC审批接口
logger.info("OA采购订单审批后传到NCC请购参数。:{},{}",eventType,params);
String apiCode = "";
if (ColEventTypeEnum.ONPROCESSFINISHED.getType().equals(eventType)){//审批完成
apiCode = "8000650002";
}else if (ColEventTypeEnum.ONSTOP.getType().equals(eventType) || ColEventTypeEnum.ONCANCEL.getType().equals(eventType)){//流程终止/撤销
apiCode = "8000650003";
}
String result = HttpRequest.post(interfaceUrl)
.header("appId", "800065")//NCC应用
.header("apiCode", apiCode)//NCC采购订单审批接口
.header("publicKey", "ZJYAbkr9+XjnDrlfQCRKXtpVvg/BjxqtxzcLgg5TIGagEKJCe7eDIk+3zDUT+v578prj")//OA公钥
.header("secretKey", "2GR4+yrcx+Ev+pN0Q6V6wxCdvisPX7wzNKBgc5SsIYGxYI5GTISXT6GvTPfp1u2Rj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//OA密钥
.body(params)//表单内容
.timeout(30000)//超时毫秒
.execute().body();
logger.info("======OA采购单审批后传到NCC响应参数:{}======",result);
JSONObject resultJson = JSONObject.parseObject(result);
if (null == resultJson){
return BaseResult.getFailureMessageEntity("审批NCC采购订单失败");
}
if (!resultJson.getBoolean("flag")){
return BaseResult.getFailureMessageEntity("审批NCC采购订单失败"+resultJson.getString("msg"));
}
//如果是流程终止或撤销更新OA校验字段
if (ColEventTypeEnum.ONSTOP.getType().equals(eventType) || ColEventTypeEnum.ONCANCEL.getType().equals(eventType)){
String id = formmainData.getString("id");
if (StrUtil.isNotEmpty(id)){
logger.info("准备更新OA采购订单校验字段");
PoOrderEntity poOrderEntity = new PoOrderEntity();
poOrderEntity.setId(id);
poOrderEntity.setDataSourceCode("JH-OA");
poOrderEntity.setField0058("-1");
poOrderEntity.setField0059("-1");
poOrderExtService.updateVerifyFlag(poOrderEntity);
}
}
return BaseResult.getSuccessMessageEntity(resultJson.getJSONObject("attribute"));
}
return BaseResult.getSuccessMessageEntity("审批NCC采购订单");
}
/**
* 把NCC的 boolean类型转成OA
* NCC Y/N
* OA 1/0
* @param nccBoolean
* @return
*/
private String booleanToStr(String nccBoolean){
if ("Y".equals(nccBoolean)){
return "1";
}
return "0";
}
}

View File

@ -1,5 +1,6 @@
package com.hzya.frame.plugin.oa.praybill.service.impl;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.lang.Assert;
@ -216,9 +217,12 @@ public class RequisitionOrderPluginServiceImpl implements IRequisitionOrderPlugi
String pk_org_v = formmainData.getString("field0051");
for(int i = 0; i< forsonData.size(); i++){
JSONObject forson = forsonData.getJSONObject(i);
String field0020 = forson.getString("field0020");
String field0040 = forson.getString("field0040");
String nnum = StrUtil.isNotEmpty(field0040) ? field0040 : field0020;
JSONObject praybillB = new JSONObject();
praybillB.put("crowno",forson.getString("field0014"));
praybillB.put("nnum",forson.getString("field0020"));
praybillB.put("nnum",nnum);
praybillB.put("pk_org",pk_org);
praybillB.put("pk_org_v",pk_org_v);
praybillB.put("vchangerate","1");
@ -226,7 +230,7 @@ public class RequisitionOrderPluginServiceImpl implements IRequisitionOrderPlugi
praybillB.put("pk_material",forson.getString("field0031"));//物料pk
praybillB.put("castunitid",forson.getString("field0055"));//计量单位pk
praybillB.put("cunitid",forson.getString("field0055"));//计量单位pk
praybillB.put("nastnum",forson.getString("field0020"));//数量
praybillB.put("nastnum",nnum);//数量
praybillB.put("dreqdate",forson.getString("field0021"));//需求日期
praybillB.put("dsuggestdate",forson.getString("field0022"));//建议订货日期
praybillB.put("pk_purchaseorg",pk_org);//采购组织
@ -250,26 +254,10 @@ public class RequisitionOrderPluginServiceImpl implements IRequisitionOrderPlugi
}
public static void main(String[] args) {
String result = "{\"msg\":\"转发失败\",\"type\":null,\"flag\":false,\"status\":\"500\",\"attribute\":{\"code\":\"success\",\"data\":{\"bodyVOList\":[{\"rowno\":\"1\",\"pk_material\":\"1001P1100000000IT34Q\",\"id\":\"1001A3100000001B2UOG\"}],\"headVO\":{\"code\":\"QG2025060800000182\",\"id\":\"1001A3100000001B2UOF\",\"vtrantypeid\":\"1001P1100000000IR21W\"}},\"message\":\"提示:========NCC-请购单保存提交《成功》!!!========。单据信息《id》 = 1001A3100000001B2UOF ,《code》 = QG2025060800000182\"}}";
JSONObject resultJson = JSONObject.parseObject(result);
JSONObject attribute = resultJson.getJSONObject("attribute");
if (null != attribute){
String code = attribute.getString("code");
if ("success".equals(code)){
JSONObject data = attribute.getJSONObject("data");
if (null != data){
JSONObject headVO = data.getJSONObject("headVO");
if (null != headVO){
String vbillcode = headVO.getString("code");
System.out.println(vbillcode);
}
}
}
}
JSONObject headers =new JSONObject();
headers.put("creator","1001P1100000000NUULI");
RequisitionOrderPluginServiceImpl service = new RequisitionOrderPluginServiceImpl();
service.uploadFile("-333447786976688302",headers,"8000640003","1001A3100000001B4COB");
String field0020 = null;
String field0040 = "22";
String s = StrUtil.isNotEmpty(field0040) ? field0040 : field0020;
System.out.println(s);
}
//保存日志
public void saveLog(String integration_task_living_details_id, Boolean flag, IntegrationTaskLivingDetailsEntity taskLivingDetail){

View File

@ -27,3 +27,5 @@ savefile:
pluginpath: D:\yongansystem\kangarooDataCenter\v3\plugin
zt:
url: http://127.0.0.1:10086/kangarooDataCenterV3/entranceController/externalCallInterface
oa:
po_order_template_code: formmain_0256_dev

View File

@ -23,6 +23,8 @@ savefile:
tomcatpath: /Users/xiangerlin/work/app/file/dev
zt:
url: http://127.0.0.1:10086/kangarooDataCenterV3/entranceController/externalCallInterface
oa:
po_order_template_code: formmain_0256_dev
cbs8:
appId: 1P4AGrpz
appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a

View File

@ -1,6 +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="requisitionOrderPluginInitializer" class="com.hzya.frame.plugin.oa.praybill.plugin.RequisitionOrderPluginInitializer" />
<bean name="poOrderPluginInitializer" class="com.hzya.frame.plugin.ncc.plugin.PoOrderPluginInitializer" />
</beans>

View File

@ -1,6 +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="requisitionOrderPluginServiceImpl" class="com.hzya.frame.plugin.oa.praybill.service.impl.RequisitionOrderPluginServiceImpl" />
<bean name="poOrderPluginInServiceImpl" class="com.hzya.frame.plugin.ncc.service.impl.PoOrderPluginInServiceImpl" />
</beans>

View File

@ -3,4 +3,7 @@
<beans default-autowire="byName">
<bean name="paymentRequestPluginInitializer" class="com.hzya.frame.plugin.oa.payment.plugin.PaymentRequestPluginInitializer" />
<bean name="payResultPluginInitializer" class="com.hzya.frame.plugin.oa.payment.plugin.PayResultPluginInitializer" />
<bean name="requisitionOrderPluginInitializer" class="com.hzya.frame.plugin.oa.praybill.plugin.RequisitionOrderPluginInitializer" />
<bean name="poOrderApprovalEventPluginInitializer" class="com.hzya.frame.plugin.oa.poorder.plugin.PoOrderApprovalEventPluginInitializer" />
</beans>

View File

@ -2,4 +2,5 @@
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans default-autowire="byName">
<bean name="paymentRequestPluginServiceImpl" class="com.hzya.frame.plugin.oa.payment.service.impl.PaymentPluginServiceImpl" />
<bean name="requisitionOrderPluginServiceImpl" class="com.hzya.frame.plugin.oa.praybill.service.impl.RequisitionOrderPluginServiceImpl" />
</beans>

View File

@ -0,0 +1,12 @@
package com.hzya.frame.seeyon.org.member.dao;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.seeyon.org.member.entity.UserViewEntity;
/**
* @Description OA人员视图
* @Author xiangerlin
* @Date 2025/6/15 16:43
**/
public interface IUserViewDao extends IBaseDao<UserViewEntity,String> {
}

View File

@ -0,0 +1,15 @@
package com.hzya.frame.seeyon.org.member.dao.impl;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.seeyon.org.member.dao.IUserViewDao;
import com.hzya.frame.seeyon.org.member.entity.UserViewEntity;
import org.springframework.stereotype.Repository;
/**
* @Description OA人员视图
* @Author xiangerlin
* @Date 2025/6/15 16:47
**/
@Repository(value ="userViewDao")
public class UserViewDaoImpl extends MybatisGenericDao<UserViewEntity,String> implements IUserViewDao {
}

View File

@ -0,0 +1,218 @@
package com.hzya.frame.seeyon.org.member.entity;
import com.hzya.frame.web.entity.BaseEntity;
/**
* @Description OA人员视图
* @Author xiangerlin
* @Date 2025/6/15 16:30
**/
public class UserViewEntity extends BaseEntity {
private String staffId;
private String name;
private String staffNumber;
private String state;
private String stateName;
private String user_state;
private String telephone;
private String sexs;
private String sexsName;
private String id_card;
private String level_id;
private String level_name;
private String update_time;
private String departmentName;
private String departmentId;
private String departmentCode;
private String postName;
private String postID;
private String loginName;
private String mem_update_time;
private String unit_updata_time;
private String post_update_time;
private String princ_update_time;
public String getStaffId() {
return staffId;
}
public void setStaffId(String staffId) {
this.staffId = staffId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getStaffNumber() {
return staffNumber;
}
public void setStaffNumber(String staffNumber) {
this.staffNumber = staffNumber;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public String getStateName() {
return stateName;
}
public void setStateName(String stateName) {
this.stateName = stateName;
}
public String getUser_state() {
return user_state;
}
public void setUser_state(String user_state) {
this.user_state = user_state;
}
public String getTelephone() {
return telephone;
}
public void setTelephone(String telephone) {
this.telephone = telephone;
}
public String getSexs() {
return sexs;
}
public void setSexs(String sexs) {
this.sexs = sexs;
}
public String getSexsName() {
return sexsName;
}
public void setSexsName(String sexsName) {
this.sexsName = sexsName;
}
public String getId_card() {
return id_card;
}
public void setId_card(String id_card) {
this.id_card = id_card;
}
public String getLevel_id() {
return level_id;
}
public void setLevel_id(String level_id) {
this.level_id = level_id;
}
public String getLevel_name() {
return level_name;
}
public void setLevel_name(String level_name) {
this.level_name = level_name;
}
public String getUpdate_time() {
return update_time;
}
public void setUpdate_time(String update_time) {
this.update_time = update_time;
}
public String getDepartmentName() {
return departmentName;
}
public void setDepartmentName(String departmentName) {
this.departmentName = departmentName;
}
public String getDepartmentId() {
return departmentId;
}
public void setDepartmentId(String departmentId) {
this.departmentId = departmentId;
}
public String getDepartmentCode() {
return departmentCode;
}
public void setDepartmentCode(String departmentCode) {
this.departmentCode = departmentCode;
}
public String getPostName() {
return postName;
}
public void setPostName(String postName) {
this.postName = postName;
}
public String getPostID() {
return postID;
}
public void setPostID(String postID) {
this.postID = postID;
}
public String getLoginName() {
return loginName;
}
public void setLoginName(String loginName) {
this.loginName = loginName;
}
public String getMem_update_time() {
return mem_update_time;
}
public void setMem_update_time(String mem_update_time) {
this.mem_update_time = mem_update_time;
}
public String getUnit_updata_time() {
return unit_updata_time;
}
public void setUnit_updata_time(String unit_updata_time) {
this.unit_updata_time = unit_updata_time;
}
public String getPost_update_time() {
return post_update_time;
}
public void setPost_update_time(String post_update_time) {
this.post_update_time = post_update_time;
}
public String getPrinc_update_time() {
return princ_update_time;
}
public void setPrinc_update_time(String princ_update_time) {
this.princ_update_time = princ_update_time;
}
}

View File

@ -0,0 +1,74 @@
<?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.seeyon.org.member.dao.impl.UserViewDaoImpl">
<resultMap id="get-UserViewEntity-result" type="com.hzya.frame.seeyon.org.member.entity.UserViewEntity">
<result property="staffId" column="staffId" />
<result property="name" column="name" />
<result property="staffNumber" column="staffNumber" />
<result property="state" column="state" />
<result property="stateName" column="stateName" />
<result property="user_state" column="user_state" />
<result property="telephone" column="telephone" />
<result property="sexs" column="sexs" />
<result property="sexsName" column="sexsName" />
<result property="id_card" column="id_card" />
<result property="level_id" column="level_id" />
<result property="level_name" column="level_name" />
<result property="create_time" column="create_time" />
<result property="update_time" column="update_time" />
<result property="departmentName" column="departmentName" />
<result property="departmentId" column="departmentId" />
<result property="departmentCode" column="departmentCode" />
<result property="postName" column="postName" />
<result property="postID" column="postID" />
<result property="loginName" column="loginName" />
<result property="mem_update_time" column="mem_update_time" />
<result property="unit_updata_time" column="unit_updata_time" />
<result property="post_update_time" column="post_update_time" />
<result property="princ_update_time" column="princ_update_time" />
</resultMap>
<sql id="UserViewEntity_Base_Column_List">
staffId,
name,
staffNumber,
state,
stateName,
user_state,
telephone,
sexs,
sexsName,
id_card,
level_id,
level_name,
create_time,
update_time,
departmentName,
departmentId,
departmentCode,
postName,
postID,
loginName,
mem_update_time,
unit_updata_time,
post_update_time,
princ_update_time
</sql>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-UserViewEntity-result" parameterType="com.hzya.frame.seeyon.org.member.entity.UserViewEntity">
select
<include refid="UserViewEntity_Base_Column_List" />
from v_user_view_all
<trim prefix="where" prefixOverrides="and">
<if test="staffId != null and staffId !='' "> staffId = #{staffId}</if>
<if test="staffNumber != null and staffNumber !='' "> and staffNumber = #{staffNumber} </if>
<if test="state != null and state !='' "> and state = #{state} </if>
<if test="loginName != null and loginName !='' "> and loginName = #{loginName} </if>
</trim>
order by update_time desc
</select>
</mapper>

View File

@ -0,0 +1,35 @@
package com.hzya.frame.seeyon.org.member.service;
import com.hzya.frame.basedao.service.IBaseService;
import com.hzya.frame.seeyon.org.member.entity.UserViewEntity;
import java.util.List;
/**
* @Description OA 人员视图
* @Author xiangerlin
* @Date 2025/6/15 16:36
**/
public interface IUserViewService extends IBaseService<UserViewEntity,String> {
/**
* 查询全部 包含停用
* @param entity
* @return
*/
List<UserViewEntity> queryAll(UserViewEntity entity);
/**
* 只查启用的
* @param entity
* @return
*/
List<UserViewEntity> queryEnableList(UserViewEntity entity);
/**
* 根据人员编号查
* @param entity
* @return
*/
UserViewEntity queryByStaffNumber(UserViewEntity entity);
}

View File

@ -0,0 +1,81 @@
package com.hzya.frame.seeyon.org.member.service.impl;
import cn.hutool.core.util.StrUtil;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.basedao.service.impl.BaseService;
import com.hzya.frame.seeyon.org.member.dao.IUserViewDao;
import com.hzya.frame.seeyon.org.member.entity.UserViewEntity;
import com.hzya.frame.seeyon.org.member.service.IUserViewService;
import com.hzya.frame.web.exception.BaseSystemException;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @Description OA人员视图
* @Author xiangerlin
* @Date 2025/6/15 16:37
**/
@Service(value = "userViewService")
public class UserViewServiceImpl extends BaseService<UserViewEntity,String> implements IUserViewService {
private IUserViewDao userViewDao;
@Autowired
public void setUserViewDao(IUserViewDao dao) {
this.userViewDao = dao;
this.dao = dao;
}
/**
* 查询全部 包含停用
*
* @param entity
* @return
*/
@DS(value = "#entity.dataSourceCode")
@Override
public List<UserViewEntity> queryAll(UserViewEntity entity) {
List<UserViewEntity> queryList = userViewDao.query(entity);
return queryList;
}
/**
* 只查启用的
*
* @param entity
* @return
*/
@DS(value = "#entity.dataSourceCode")
@Override
public List<UserViewEntity> queryEnableList(UserViewEntity entity) {
entity.setState("1");
List<UserViewEntity> queryList = userViewDao.query(entity);
return queryList;
}
/**
* 根据人员编号查
*
* @param entity
* @return
*/
@DS(value = "#entity.dataSourceCode")
@Override
public UserViewEntity queryByStaffNumber(UserViewEntity entity) {
if (null != entity && StrUtil.isNotEmpty(entity.getStaffNumber())){
List<UserViewEntity> queryList = queryEnableList(entity);
if (CollectionUtils.isNotEmpty(queryList)){
if (queryList.size() > 1){
throw new BaseSystemException("根据"+entity.getStaffNumber()+"查询到多个人员,请检查");
}
return queryList.get(0);
}
}else {
throw new BaseSystemException("人员编号不能为空,请检查");
}
return null;
}
}

View File

@ -178,8 +178,11 @@ public class OARestUtil {
hashMap.put(parameterName,example);
}
}
login_name = hashMap.get("loginName");
if (StrUtil.isEmpty(login_name)){
if (StrUtil.isNotEmpty(login_name)){
hashMap.put("loginName",login_name);
}
if (StrUtil.isEmpty(hashMap.get("loginName"))){
hashMap.put("loginName","hzya");
}
String result = HttpRequest.post(url).body(JSON.toJSONString(hashMap)).execute().body();