From 8b00953f4715f7392fce4acac4daa66c2fb15130 Mon Sep 17 00:00:00 2001 From: lvleigang <957075182@qq.com> Date: Sat, 14 Sep 2024 10:08:39 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fw-oa=E5=88=86=E6=94=AF=E7=BB=93=E6=9E=84?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- base-webapp/pom.xml | 10 +- fw-oa/pom.xml | 48 ++ .../frame/seeyon/cap4/form/dto/FormDTO.java | 74 ++ .../seeyon/cap4/form/dto/FormDataDTO.java | 36 + .../seeyon/cap4/form/dto/MasterTableDTO.java | 45 ++ .../frame/seeyon/cap4/form/dto/RecordDTO.java | 34 + .../seeyon/cap4/form/dto/RecordFieldDTO.java | 52 ++ .../seeyon/cap4/form/dto/SubTableDTO.java | 9 + .../seeyon/cbs8/dao/IAgentPaymentDao.java | 12 + .../cbs8/dao/IAgentPaymentDetailDao.java | 12 + .../frame/seeyon/cbs8/dao/ICbsLogDao.java | 12 + .../frame/seeyon/cbs8/dao/IPaymentDao.java | 10 + .../cbs8/dao/ITransactionDetailDao.java | 12 + .../cbs8/dao/impl/AgentPaymentDaoImpl.java | 15 + .../dao/impl/AgentPaymentDetailDaoImpl.java | 15 + .../seeyon/cbs8/dao/impl/CbsLogDaoImpl.java | 15 + .../seeyon/cbs8/dao/impl/PaymentDaoImpl.java | 15 + .../dao/impl/TransactionDetailDaoImpl.java | 17 + .../cbs8/entity/AgentPaymentDetailEntity.java | 113 +++ .../cbs8/entity/AgentPaymentDetailEntity.xml | 84 +++ .../cbs8/entity/AgentPaymentEntity.java | 145 ++++ .../seeyon/cbs8/entity/AgentPaymentEntity.xml | 126 ++++ .../seeyon/cbs8/entity/CbsLogEntity.java | 151 ++++ .../frame/seeyon/cbs8/entity/CbsLogEntity.xml | 116 +++ .../seeyon/cbs8/entity/PaymentEntity.java | 327 +++++++++ .../seeyon/cbs8/entity/PaymentEntity.xml | 339 +++++++++ .../cbs8/entity/TransactionDetailEntity.java | 155 ++++ .../cbs8/entity/TransactionDetailEntity.xml | 91 +++ .../service/IAgentPaymentDetailService.java | 18 + .../cbs8/service/IAgentPaymentService.java | 45 ++ .../seeyon/cbs8/service/ICbsLogService.java | 53 ++ .../seeyon/cbs8/service/IPaymentService.java | 63 ++ .../service/ITransactionDetailService.java | 29 + .../impl/AgentPaymentDetailServiceImpl.java | 39 + .../service/impl/AgentPaymentServiceImpl.java | 93 +++ .../cbs8/service/impl/CbsLogServiceImpl.java | 198 +++++ .../cbs8/service/impl/PaymentServiceImpl.java | 150 ++++ .../impl/TransactionDetailServiceImpl.java | 98 +++ .../seeyon/dao/ICapFormDefinitionDao.java | 51 ++ .../frame/seeyon/dao/ICtpAttachmentDao.java | 21 + .../hzya/frame/seeyon/dao/ICtpFileDao.java | 12 + .../com/hzya/frame/seeyon/dao/ISeeYonDao.java | 108 +++ .../frame/seeyon/dao/ISeeYonInterFaceDao.java | 37 + .../dao/impl/CapFormDefinitionDaoImpl.java | 39 + .../seeyon/dao/impl/CtpAttachmentDaoImpl.java | 31 + .../frame/seeyon/dao/impl/CtpFileDaoImpl.java | 17 + .../frame/seeyon/dao/impl/SeeYonDaoImpl.java | 94 +++ .../dao/impl/SeeYonInterFaceDaoImpl.java | 43 ++ .../entity/CapFormDefinitionEntity.java | 71 ++ .../seeyon/entity/CapFormDefinitionEntity.xml | 41 ++ .../frame/seeyon/entity/CfsLogEntity.java | 65 ++ .../seeyon/entity/CollAttachmentResDTO.java | 340 +++++++++ .../seeyon/entity/CtpAttachmentEntity.java | 124 ++++ .../seeyon/entity/CtpAttachmentEntity.xml | 89 +++ .../frame/seeyon/entity/CtpFileEntity.java | 113 +++ .../frame/seeyon/entity/CtpFileEntity.xml | 49 ++ .../frame/seeyon/entity/OAU8ResponseDTO.java | 89 +++ .../entity/OAWorkflowEventDataEntity.java | 153 ++++ .../seeyon/entity/SeeYonInterFaceEntity.java | 112 +++ .../seeyon/entity/SeeYonInterFaceEntity.xml | 52 ++ .../frame/seeyon/entity/SeeyonEntity.java | 684 ++++++++++++++++++ .../hzya/frame/seeyon/entity/SeeyonEntity.xml | 250 +++++++ .../frame/seeyon/enums/ColEventTypeEnum.java | 45 ++ .../frame/seeyon/paybill/dao/IPayBillDao.java | 33 + .../paybill/dao/impl/PayBillDaoImpl.java | 32 + .../seeyon/paybill/entity/PayBillEntity.java | 107 +++ .../seeyon/paybill/entity/PayBillEntity.xml | 62 ++ .../paybill/service/IPayBillService.java | 29 + .../service/impl/PayBillServiceImpl.java | 105 +++ .../frame/seeyon/recbill/dao/IRecBillDao.java | 31 + .../recbill/dao/impl/RecBillDaoImpl.java | 30 + .../seeyon/recbill/entity/RecBillEntity.java | 104 +++ .../seeyon/recbill/entity/RecBillEntity.xml | 40 + .../recbill/service/IRecBillService.java | 26 + .../service/impl/RecBillServiceImpl.java | 104 +++ .../seeyon/service/ICtpAttachmentService.java | 20 + .../frame/seeyon/service/ICtpFileService.java | 12 + .../seeyon/service/INoProcessService.java | 26 + .../seeyon/service/ISeeYonInterFace.java | 84 +++ .../seeyon/service/ISeeyonExtService.java | 29 + .../impl/CtpAttachmentServiceImpl.java | 70 ++ .../service/impl/CtpFileServiceImpl.java | 15 + .../service/impl/NoProcessServiceImpl.java | 119 +++ .../service/impl/SeeYonInterFaceImpl.java | 507 +++++++++++++ .../service/impl/SeeyonExtServiceImpl.java | 241 ++++++ .../com/hzya/frame/seeyon/util/OABipUtil.java | 65 ++ .../hzya/frame/seeyon/util/OAPayState.java | 73 ++ .../hzya/frame/seeyon/util/OARestUtil.java | 209 ++++++ .../com/hzya/frame/seeyon/util/OAU8Util.java | 34 + fw-oa/src/main/webapp/WEB-INF/web.xml | 6 + pom.xml | 2 +- 91 files changed, 7815 insertions(+), 6 deletions(-) create mode 100644 fw-oa/pom.xml create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cap4/form/dto/FormDTO.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cap4/form/dto/FormDataDTO.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cap4/form/dto/MasterTableDTO.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cap4/form/dto/RecordDTO.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cap4/form/dto/RecordFieldDTO.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cap4/form/dto/SubTableDTO.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/IAgentPaymentDao.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/IAgentPaymentDetailDao.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/ICbsLogDao.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/IPaymentDao.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/ITransactionDetailDao.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/impl/AgentPaymentDaoImpl.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/impl/AgentPaymentDetailDaoImpl.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/impl/CbsLogDaoImpl.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/impl/PaymentDaoImpl.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/impl/TransactionDetailDaoImpl.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/AgentPaymentDetailEntity.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/AgentPaymentDetailEntity.xml create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/AgentPaymentEntity.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/AgentPaymentEntity.xml create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/CbsLogEntity.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/CbsLogEntity.xml create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/PaymentEntity.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/PaymentEntity.xml create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/TransactionDetailEntity.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/TransactionDetailEntity.xml create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/IAgentPaymentDetailService.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/IAgentPaymentService.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/ICbsLogService.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/IPaymentService.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/ITransactionDetailService.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/impl/AgentPaymentDetailServiceImpl.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/impl/AgentPaymentServiceImpl.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/impl/CbsLogServiceImpl.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/impl/PaymentServiceImpl.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/impl/TransactionDetailServiceImpl.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/dao/ICapFormDefinitionDao.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/dao/ICtpAttachmentDao.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/dao/ICtpFileDao.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/dao/ISeeYonDao.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/dao/ISeeYonInterFaceDao.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/dao/impl/CapFormDefinitionDaoImpl.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/dao/impl/CtpAttachmentDaoImpl.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/dao/impl/CtpFileDaoImpl.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/dao/impl/SeeYonDaoImpl.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/dao/impl/SeeYonInterFaceDaoImpl.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/entity/CapFormDefinitionEntity.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/entity/CapFormDefinitionEntity.xml create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/entity/CfsLogEntity.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/entity/CollAttachmentResDTO.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/entity/CtpAttachmentEntity.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/entity/CtpAttachmentEntity.xml create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/entity/CtpFileEntity.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/entity/CtpFileEntity.xml create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/entity/OAU8ResponseDTO.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/entity/OAWorkflowEventDataEntity.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/entity/SeeYonInterFaceEntity.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/entity/SeeYonInterFaceEntity.xml create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/entity/SeeyonEntity.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/entity/SeeyonEntity.xml create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/enums/ColEventTypeEnum.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/paybill/dao/IPayBillDao.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/paybill/dao/impl/PayBillDaoImpl.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/paybill/entity/PayBillEntity.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/paybill/entity/PayBillEntity.xml create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/paybill/service/IPayBillService.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/paybill/service/impl/PayBillServiceImpl.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/recbill/dao/IRecBillDao.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/recbill/dao/impl/RecBillDaoImpl.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/recbill/entity/RecBillEntity.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/recbill/entity/RecBillEntity.xml create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/recbill/service/IRecBillService.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/recbill/service/impl/RecBillServiceImpl.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/service/ICtpAttachmentService.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/service/ICtpFileService.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/service/INoProcessService.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/service/ISeeYonInterFace.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/service/ISeeyonExtService.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/service/impl/CtpAttachmentServiceImpl.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/service/impl/CtpFileServiceImpl.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/service/impl/NoProcessServiceImpl.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/service/impl/SeeYonInterFaceImpl.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/service/impl/SeeyonExtServiceImpl.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/util/OABipUtil.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/util/OAPayState.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/util/OARestUtil.java create mode 100644 fw-oa/src/main/java/com/hzya/frame/seeyon/util/OAU8Util.java create mode 100644 fw-oa/src/main/webapp/WEB-INF/web.xml diff --git a/base-webapp/pom.xml b/base-webapp/pom.xml index 79bd4cf9..0cd3f16b 100644 --- a/base-webapp/pom.xml +++ b/base-webapp/pom.xml @@ -54,11 +54,11 @@ - - - - - + + com.hzya.frame + fw-oa + ${revision} + diff --git a/fw-oa/pom.xml b/fw-oa/pom.xml new file mode 100644 index 00000000..04552396 --- /dev/null +++ b/fw-oa/pom.xml @@ -0,0 +1,48 @@ + + + + kangarooDataCenterV3 + com.hzya.frame + ${revision} + + 4.0.0 + fw-oa + jar + ${revision} + + + + com.hzya.frame + base-service + ${revision} + + + mysql + mysql-connector-java + ${mysql-connector-java} + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + none + execute + true + + + + + repackage + + + + + + + diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cap4/form/dto/FormDTO.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/cap4/form/dto/FormDTO.java new file mode 100644 index 00000000..e9fe54b8 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cap4/form/dto/FormDTO.java @@ -0,0 +1,74 @@ +package com.hzya.frame.seeyon.cap4.form.dto; + +import com.alibaba.fastjson.annotation.JSONField; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import java.util.List; + +/** + * @Description 无流程表单批量保存请求参数 + * @Author xiangerlin + * @Date 2024/1/8 11:18 + **/ +public class FormDTO { + @JSONField(ordinal = 4) + private String formCode;//模版编号 + @JSONField(ordinal = 5) + private String loginName;//模版编号 + @JSONField(ordinal = 2) + private String rightId;//权限id,找到无流程表单,点新增,弹出的窗口上会有这个参数 + @JSONField(ordinal = 3) + private List dataList;//导入的数据 + @JSONField(ordinal = 1) + private String[] uniqueFiled;//更新用的唯一标识 + @JSONField(ordinal = 6) + private Boolean doTrigger;//是否执行触发(Since V8.0sp2),测试中发现传了这个参数会报错 + + public String getFormCode() { + return formCode; + } + + public void setFormCode(String formCode) { + this.formCode = formCode; + } + + public String getLoginName() { + return loginName; + } + + public void setLoginName(String loginName) { + this.loginName = loginName; + } + + public String getRightId() { + return rightId; + } + + public void setRightId(String rightId) { + this.rightId = rightId; + } + + public List getDataList() { + return dataList; + } + + public void setDataList(List dataList) { + this.dataList = dataList; + } + + public String[] getUniqueFiled() { + return uniqueFiled; + } + + public void setUniqueFiled(String[] uniqueFiled) { + this.uniqueFiled = uniqueFiled; + } + + public Boolean getDoTrigger() { + return doTrigger; + } + + public void setDoTrigger(Boolean doTrigger) { + this.doTrigger = doTrigger; + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cap4/form/dto/FormDataDTO.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/cap4/form/dto/FormDataDTO.java new file mode 100644 index 00000000..b69031d6 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cap4/form/dto/FormDataDTO.java @@ -0,0 +1,36 @@ +package com.hzya.frame.seeyon.cap4.form.dto; + +import com.alibaba.fastjson.annotation.JSONField; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import java.util.List; + +/** + * @Description dataList节点 + * @Author xiangerlin + * @Date 2024/1/8 11:26 + **/ +public class FormDataDTO { + @JSONField(ordinal = 1) + private MasterTableDTO masterTable;//主表数据 + @JSONField(ordinal = 2) + private List subTables;//子表数据 + + //private List<> attachmentInfos;//附件列表 + + public MasterTableDTO getMasterTable() { + return masterTable; + } + + public void setMasterTable(MasterTableDTO masterTable) { + this.masterTable = masterTable; + } + + public List getSubTables() { + return subTables; + } + + public void setSubTables(List subTables) { + this.subTables = subTables; + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cap4/form/dto/MasterTableDTO.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/cap4/form/dto/MasterTableDTO.java new file mode 100644 index 00000000..56f5f9fb --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cap4/form/dto/MasterTableDTO.java @@ -0,0 +1,45 @@ +package com.hzya.frame.seeyon.cap4.form.dto; + +import com.alibaba.fastjson.annotation.JSONField; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import java.util.List; + +/** + * @Description 主表数据 + * @Author xiangerlin + * @Date 2024/1/8 11:29 + **/ + +public class MasterTableDTO { + @JSONField(ordinal = 1) + private String name;//表名 + @JSONField(ordinal = 2) + private RecordDTO record;//数据 + @JSONField(ordinal = 3) + private List changedFields;//需要计算的字段 + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public RecordDTO getRecord() { + return record; + } + + public void setRecord(RecordDTO record) { + this.record = record; + } + + public List getChangedFields() { + return changedFields; + } + + public void setChangedFields(List changedFields) { + this.changedFields = changedFields; + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cap4/form/dto/RecordDTO.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/cap4/form/dto/RecordDTO.java new file mode 100644 index 00000000..cc3857e0 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cap4/form/dto/RecordDTO.java @@ -0,0 +1,34 @@ +package com.hzya.frame.seeyon.cap4.form.dto; + +import com.alibaba.fastjson.annotation.JSONField; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import java.util.List; + +/** + * @Description record节点 + * @Author xiangerlin + * @Date 2024/1/8 11:31 + **/ +public class RecordDTO { + @JSONField(ordinal = 1) + private long id;//数据id,测试中发现新增时这个参数随便填写 不影响导入 + @JSONField(ordinal = 2) + private List fields;//字段列表 + + public long getId() { + return id; + } + + public void setId(long id) { + this.id = id; + } + + public List getFields() { + return fields; + } + + public void setFields(List fields) { + this.fields = fields; + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cap4/form/dto/RecordFieldDTO.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/cap4/form/dto/RecordFieldDTO.java new file mode 100644 index 00000000..a2bfa15b --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cap4/form/dto/RecordFieldDTO.java @@ -0,0 +1,52 @@ +package com.hzya.frame.seeyon.cap4.form.dto; + +import com.alibaba.fastjson.annotation.JSONField; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +/** + * @Description masterTable—record—fields的结构 + * @Author xiangerlin + * @Date 2024/1/8 11:32 + **/ +public class RecordFieldDTO { + @JSONField(ordinal = 1) + private String name;//数据域名称 ,fieldxxxx + @JSONField(ordinal = 2) + private String value;//数据值(优先) + @JSONField(ordinal = 3) + private String showValue;//显示值 + + public RecordFieldDTO() { + + } + + public RecordFieldDTO(String name, String value, String showValue) { + this.name = name; + this.value = value; + this.showValue = showValue; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public String getShowValue() { + return showValue; + } + + public void setShowValue(String showValue) { + this.showValue = showValue; + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cap4/form/dto/SubTableDTO.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/cap4/form/dto/SubTableDTO.java new file mode 100644 index 00000000..8d5e5226 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cap4/form/dto/SubTableDTO.java @@ -0,0 +1,9 @@ +package com.hzya.frame.seeyon.cap4.form.dto; + +/** + * @Description 子表数据 + * @Author xiangerlin + * @Date 2024/1/8 11:29 + **/ +public class SubTableDTO { +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/IAgentPaymentDao.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/IAgentPaymentDao.java new file mode 100644 index 00000000..5336cd91 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/IAgentPaymentDao.java @@ -0,0 +1,12 @@ +package com.hzya.frame.seeyon.cbs8.dao; + +import com.hzya.frame.basedao.dao.IBaseDao; +import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentEntity; + +/** + * @Description 代发代扣 + * @Author xiangerlin + * @Date 2024/6/26 10:50 + **/ +public interface IAgentPaymentDao extends IBaseDao { +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/IAgentPaymentDetailDao.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/IAgentPaymentDetailDao.java new file mode 100644 index 00000000..96895bb4 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/IAgentPaymentDetailDao.java @@ -0,0 +1,12 @@ +package com.hzya.frame.seeyon.cbs8.dao; + +import com.hzya.frame.basedao.dao.IBaseDao; +import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentDetailEntity; + +/** + * @Description 代发代扣明细 + * @Author xiangerlin + * @Date 2024/6/26 10:54 + **/ +public interface IAgentPaymentDetailDao extends IBaseDao { +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/ICbsLogDao.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/ICbsLogDao.java new file mode 100644 index 00000000..032d1a3e --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/ICbsLogDao.java @@ -0,0 +1,12 @@ +package com.hzya.frame.seeyon.cbs8.dao; + +import com.hzya.frame.basedao.dao.IBaseDao; +import com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity; + +/** + * @Description cbs8支付日志 + * @Author xiangerlin + * @Date 2024/6/14 17:30 + **/ +public interface ICbsLogDao extends IBaseDao { +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/IPaymentDao.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/IPaymentDao.java new file mode 100644 index 00000000..c8a18848 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/IPaymentDao.java @@ -0,0 +1,10 @@ +package com.hzya.frame.seeyon.cbs8.dao; + +import com.hzya.frame.basedao.dao.IBaseDao; +import com.hzya.frame.seeyon.cbs8.entity.PaymentEntity; + +/** + * oa集成cbs + */ +public interface IPaymentDao extends IBaseDao { +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/ITransactionDetailDao.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/ITransactionDetailDao.java new file mode 100644 index 00000000..37cf015a --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/ITransactionDetailDao.java @@ -0,0 +1,12 @@ +package com.hzya.frame.seeyon.cbs8.dao; + +import com.hzya.frame.basedao.dao.IBaseDao; +import com.hzya.frame.seeyon.cbs8.entity.TransactionDetailEntity; + +/** + * @Description cbs交易明细 oa底表 + * @Author xiangerlin + * @Date 2024/6/24 11:10 + **/ +public interface ITransactionDetailDao extends IBaseDao { +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/impl/AgentPaymentDaoImpl.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/impl/AgentPaymentDaoImpl.java new file mode 100644 index 00000000..5b2e3852 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/impl/AgentPaymentDaoImpl.java @@ -0,0 +1,15 @@ +package com.hzya.frame.seeyon.cbs8.dao.impl; + +import com.hzya.frame.basedao.dao.MybatisGenericDao; +import com.hzya.frame.seeyon.cbs8.dao.IAgentPaymentDao; +import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentEntity; +import org.springframework.stereotype.Repository; + +/** + * @Description + * @Author xiangerlin + * @Date 2024/6/26 10:51 + **/ +@Repository("OAAgentPaymentDaoImpl") +public class AgentPaymentDaoImpl extends MybatisGenericDao implements IAgentPaymentDao { +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/impl/AgentPaymentDetailDaoImpl.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/impl/AgentPaymentDetailDaoImpl.java new file mode 100644 index 00000000..2b873067 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/impl/AgentPaymentDetailDaoImpl.java @@ -0,0 +1,15 @@ +package com.hzya.frame.seeyon.cbs8.dao.impl; + +import com.hzya.frame.basedao.dao.MybatisGenericDao; +import com.hzya.frame.seeyon.cbs8.dao.IAgentPaymentDetailDao; +import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentDetailEntity; +import org.springframework.stereotype.Repository; + +/** + * @Description + * @Author xiangerlin + * @Date 2024/6/26 10:55 + **/ +@Repository("OAAgentPaymentDetailDaoImpl") +public class AgentPaymentDetailDaoImpl extends MybatisGenericDao implements IAgentPaymentDetailDao { +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/impl/CbsLogDaoImpl.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/impl/CbsLogDaoImpl.java new file mode 100644 index 00000000..a42437b0 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/impl/CbsLogDaoImpl.java @@ -0,0 +1,15 @@ +package com.hzya.frame.seeyon.cbs8.dao.impl; + +import com.hzya.frame.basedao.dao.MybatisGenericDao; +import com.hzya.frame.seeyon.cbs8.dao.ICbsLogDao; +import com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity; +import org.springframework.stereotype.Repository; + +/** + * @Description + * @Author xiangerlin + * @Date 2024/6/14 17:31 + **/ +@Repository() +public class CbsLogDaoImpl extends MybatisGenericDao implements ICbsLogDao { +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/impl/PaymentDaoImpl.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/impl/PaymentDaoImpl.java new file mode 100644 index 00000000..f2744983 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/impl/PaymentDaoImpl.java @@ -0,0 +1,15 @@ +package com.hzya.frame.seeyon.cbs8.dao.impl; + +import com.hzya.frame.basedao.dao.MybatisGenericDao; +import com.hzya.frame.seeyon.cbs8.dao.IPaymentDao; +import com.hzya.frame.seeyon.cbs8.entity.PaymentEntity; +import org.springframework.stereotype.Repository; + +/** + * @Description oa集成cbs + * @Author xiangerlin + * @Date 2024/6/6 16:28 + **/ +@Repository("OAPaymentDaoImpl") +public class PaymentDaoImpl extends MybatisGenericDao implements IPaymentDao { +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/impl/TransactionDetailDaoImpl.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/impl/TransactionDetailDaoImpl.java new file mode 100644 index 00000000..e4fb1bac --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/dao/impl/TransactionDetailDaoImpl.java @@ -0,0 +1,17 @@ +package com.hzya.frame.seeyon.cbs8.dao.impl; + +import com.hzya.frame.basedao.dao.MybatisGenericDao; +import com.hzya.frame.seeyon.cbs8.dao.IPaymentDao; +import com.hzya.frame.seeyon.cbs8.dao.ITransactionDetailDao; +import com.hzya.frame.seeyon.cbs8.entity.PaymentEntity; +import com.hzya.frame.seeyon.cbs8.entity.TransactionDetailEntity; +import org.springframework.stereotype.Repository; + +/** + * @Description + * @Author xiangerlin + * @Date 2024/6/24 11:10 + **/ +@Repository("OATransactionDetailDaoImpl") +public class TransactionDetailDaoImpl extends MybatisGenericDao implements ITransactionDetailDao { +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/AgentPaymentDetailEntity.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/AgentPaymentDetailEntity.java new file mode 100644 index 00000000..4776058c --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/AgentPaymentDetailEntity.java @@ -0,0 +1,113 @@ +package com.hzya.frame.seeyon.cbs8.entity; + +import com.hzya.frame.web.entity.BaseEntity; + +/** + * @Description 代发代扣明细表 + * @Author xiangerlin + * @Date 2024/6/18 14:58 + **/ +public class AgentPaymentDetailEntity extends BaseEntity { + //每笔明细金额 + private String dtlAmount; + //收款账号 + private String dtlRevAccount; + //联行号 同行可不传,跨行必传 + private String dtlCnapsCode; + //收款账户名称 + private String dtlRevName; + //收款开户行 ,如果传的联行号能匹配到对应到开户行,cbs8会自动带出 + private String dtlRevBankName; + //主表id + private String formmainId; + //表名 + private String tabName; + + //明细序号,从1开始递增 + private int dtlSeqNum; + + //支付结果 + private String payResult; + //支付日期 + private String payDate; + + public String getDtlAmount() { + return dtlAmount; + } + + public void setDtlAmount(String dtlAmount) { + this.dtlAmount = dtlAmount; + } + + public String getDtlRevAccount() { + return dtlRevAccount; + } + + public void setDtlRevAccount(String dtlRevAccount) { + this.dtlRevAccount = dtlRevAccount; + } + + public String getDtlCnapsCode() { + return dtlCnapsCode; + } + + public void setDtlCnapsCode(String dtlCnapsCode) { + this.dtlCnapsCode = dtlCnapsCode; + } + + public String getDtlRevName() { + return dtlRevName; + } + + public void setDtlRevName(String dtlRevName) { + this.dtlRevName = dtlRevName; + } + + public String getDtlRevBankName() { + return dtlRevBankName; + } + + public void setDtlRevBankName(String dtlRevBankName) { + this.dtlRevBankName = dtlRevBankName; + } + + public String getFormmainId() { + return formmainId; + } + + public void setFormmainId(String formmainId) { + this.formmainId = formmainId; + } + + public String getTabName() { + return tabName; + } + + public void setTabName(String tabName) { + this.tabName = tabName; + } + + public int getDtlSeqNum() { + return dtlSeqNum; + } + + public void setDtlSeqNum(int dtlSeqNum) { + this.dtlSeqNum = dtlSeqNum; + } + + public String getPayResult() { + return payResult; + } + + public void setPayResult(String payResult) { + this.payResult = payResult; + } + + public String getPayDate() { + return payDate; + } + + public void setPayDate(String payDate) { + this.payDate = payDate; + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/AgentPaymentDetailEntity.xml b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/AgentPaymentDetailEntity.xml new file mode 100644 index 00000000..43869fc1 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/AgentPaymentDetailEntity.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + id, + formmainId, + tabName, + dtlSeqNum, + dtlAmount, + dtlRevAccount, + dtlCnapsCode, + dtlRevName, + dtlRevBankName, + payResult, + payDate + + + + + + + + update formson_0225 set + + field0045 =#{payDate}, + field0044 =#{payResult} + + where id = #{id} + + + + + update formson_0225 set + + field0045 =#{payDate}, + field0044 =#{payResult} + + where field0001=#{dtlSeqNum} and field0019=#{dtlAmount} and field0035=#{dtlCnapsCode} and field0037=#{dtlRevName} + + diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/AgentPaymentEntity.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/AgentPaymentEntity.java new file mode 100644 index 00000000..b4b2748a --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/AgentPaymentEntity.java @@ -0,0 +1,145 @@ +package com.hzya.frame.seeyon.cbs8.entity; + +import com.hzya.frame.web.entity.BaseEntity; + +/** + * @Description 代发代扣 主表 + * @Author xiangerlin + * @Date 2024/6/18 14:44 + **/ +public class AgentPaymentEntity extends BaseEntity { + + //oa id + private String oaId; + private String finishedflag; + //流程标题 + private String title; + //业务参考号 + private String referenceNum; + /** + * 业务类型 + * 201-代扣 + * 203-代发 + * 代发工资传203 + */ + private String busType; + //总金额 小数位2位 + private String amount; + //币种 + private String currency; + //付款账号 + private String payAccount; + //用途 + private String purpose; + //申请单号 + private String applyCode; + //支付结果 + private String payResult; + + private String tableName;//表名称 + private String billName;//单据名称 + + public String getReferenceNum() { + return referenceNum; + } + + public void setReferenceNum(String referenceNum) { + this.referenceNum = referenceNum; + } + + public String getBusType() { + return busType; + } + + public void setBusType(String busType) { + this.busType = busType; + } + + public String getAmount() { + return amount; + } + + public void setAmount(String amount) { + this.amount = amount; + } + + public String getCurrency() { + return currency; + } + + public void setCurrency(String currency) { + this.currency = currency; + } + + public String getPayAccount() { + return payAccount; + } + + public void setPayAccount(String payAccount) { + this.payAccount = payAccount; + } + + public String getPurpose() { + return purpose; + } + + public void setPurpose(String purpose) { + this.purpose = purpose; + } + + public String getTableName() { + return tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } + + public String getBillName() { + return billName; + } + + public void setBillName(String billName) { + this.billName = billName; + } + + public String getOaId() { + return oaId; + } + + public void setOaId(String oaId) { + this.oaId = oaId; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getFinishedflag() { + return finishedflag; + } + + public void setFinishedflag(String finishedflag) { + this.finishedflag = finishedflag; + } + + public String getApplyCode() { + return applyCode; + } + + public void setApplyCode(String applyCode) { + this.applyCode = applyCode; + } + + public String getPayResult() { + return payResult; + } + + public void setPayResult(String payResult) { + this.payResult = payResult; + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/AgentPaymentEntity.xml b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/AgentPaymentEntity.xml new file mode 100644 index 00000000..c0b0f6f0 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/AgentPaymentEntity.xml @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + oaId, + tableName, + finishedflag, + title, + billName, + referenceNum, + busType, + amount, + currency, + payAccount, + applyCode, + payResult, + purpose + + + + + + + + + + + update formmain_0224 set + + field0043 =#{applyCode}, + field0046 =#{payResult} + + where id = #{oaId} + + diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/CbsLogEntity.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/CbsLogEntity.java new file mode 100644 index 00000000..21cc1a4f --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/CbsLogEntity.java @@ -0,0 +1,151 @@ +package com.hzya.frame.seeyon.cbs8.entity; + +import com.hzya.frame.web.entity.BaseEntity; + +/** + * @Description cbs支付日志 + * @Author xiangerlin + * @Date 2024/6/14 17:16 + **/ +public class CbsLogEntity extends BaseEntity { + //流程标题 + private String title; + //请款主体 + private String pay_company; + //收款人 + private String payee; + //金额 + private String amount; + //cbs申请单号 + private String cbs_apply_code; + //日志表id + private String id; + //oa单据id + private String oa_id; + //oa单据号 + private String bill_code; + //英文表名 + private String tab_name_en; + //中文表名 + private String tab_name_ch; + //支付状态 + private String pay_state; + //支付信息 + private String message; + //支付申请状态 + private String apply_state; + //成功标记 + private String successed; + + public String getOa_id() { + return oa_id; + } + + public void setOa_id(String oa_id) { + this.oa_id = oa_id; + } + + public String getBill_code() { + return bill_code; + } + + public void setBill_code(String bill_code) { + this.bill_code = bill_code; + } + + public String getTab_name_en() { + return tab_name_en; + } + + public void setTab_name_en(String tab_name_en) { + this.tab_name_en = tab_name_en; + } + + public String getTab_name_ch() { + return tab_name_ch; + } + + public void setTab_name_ch(String tab_name_ch) { + this.tab_name_ch = tab_name_ch; + } + + public String getPay_state() { + return pay_state; + } + + public void setPay_state(String pay_state) { + this.pay_state = pay_state; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public String getApply_state() { + return apply_state; + } + + public void setApply_state(String apply_state) { + this.apply_state = apply_state; + } + + public String getSuccessed() { + return successed; + } + + public void setSuccessed(String successed) { + this.successed = successed; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getPay_company() { + return pay_company; + } + + public void setPay_company(String pay_company) { + this.pay_company = pay_company; + } + + public String getPayee() { + return payee; + } + + public void setPayee(String payee) { + this.payee = payee; + } + + public String getAmount() { + return amount; + } + + public void setAmount(String amount) { + this.amount = amount; + } + + public String getCbs_apply_code() { + return cbs_apply_code; + } + + public void setCbs_apply_code(String cbs_apply_code) { + this.cbs_apply_code = cbs_apply_code; + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/CbsLogEntity.xml b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/CbsLogEntity.xml new file mode 100644 index 00000000..3e03a88a --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/CbsLogEntity.xml @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + id, + field0002 as title, + field0003 as pay_company, + field0004 as payee, + field0005 as cbs_apply_code, + field0006 as bill_code, + field0007 as oa_id, + field0008 as tab_name_ch, + field0009 as tab_name_en, + field0010 as pay_state, + field0011 as message, + field0012 as apply_state, + field0014 as successed + + + + + + + + + + + + + update formmain_0232 set + + field0010 =#{pay_state}, + field0011 =#{message}, + field0012 =#{apply_state}, + field0014 =#{successed} + + where id = #{id} + + + + + diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/PaymentEntity.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/PaymentEntity.java new file mode 100644 index 00000000..9f68e3ff --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/PaymentEntity.java @@ -0,0 +1,327 @@ +package com.hzya.frame.seeyon.cbs8.entity; + +import com.hzya.frame.web.entity.BaseEntity; + +/** + * @Description + * @Author xiangerlin + * @Date 2024/6/6 16:17 + **/ +public class PaymentEntity extends BaseEntity { + + private String oaId;//主表id + private String formsonId;//明细表id + private String payCompany;//付款公司 + private String title;//流程标题 + private String tableName;//表名称 + private String billName;//单据名称 + private String referenceNum;//业务参考号 唯一id + private String referenceNumNew;//重试的时候生成新的业务参考号 + private String busType;//业务类型 + private String payResultField;//支付结果字段 + private String payDateField;//打款日期字段 + private String applyCodeField;//支付申请单号字段 + private String receiptFiled;//电子回单字段 + private String summaryId;//summaryid + private String startDate;//单据日期 + private String finishedflag;//流程状态 + private String payDate;//打款日期 + private String payResult;//支付结果 + private String applyCode;//支付申请单号 + private String payAccount;//付款账号 + private String payBankName;//付款开户银行 + private String amount;//金额 + private String purpose;//支付用途 + private String revAccount;//收款账号 + private String revBankName;//收款开户行名称 + private String revBankType;//收款银行类型 + private String revAccountName;//收款账户名称 + private String cnapsCode;//联行号 + private String receipt;//电子回单 + private String currency;//币种 数字 + private String currencyName;//币种 中文 + private String currencyCode;//币种编码 + private String personalFlag;//公私标记 + private String payType;//付款类别 + private String payCompanyCode;//付款公司编码 + + public String getOaId() { + return oaId; + } + + public void setOaId(String oaId) { + this.oaId = oaId; + } + + public String getPayCompany() { + return payCompany; + } + + public void setPayCompany(String payCompany) { + this.payCompany = payCompany; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getTableName() { + return tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } + + public String getBillName() { + return billName; + } + + public void setBillName(String billName) { + this.billName = billName; + } + + public String getReferenceNum() { + return referenceNum; + } + + public void setReferenceNum(String referenceNum) { + this.referenceNum = referenceNum; + } + + public String getReferenceNumNew() { + return referenceNumNew; + } + + public void setReferenceNumNew(String referenceNumNew) { + this.referenceNumNew = referenceNumNew; + } + + public String getBusType() { + return busType; + } + + public void setBusType(String busType) { + this.busType = busType; + } + + public String getPayResultField() { + return payResultField; + } + + public void setPayResultField(String payResultField) { + this.payResultField = payResultField; + } + + public String getPayDateField() { + return payDateField; + } + + public void setPayDateField(String payDateField) { + this.payDateField = payDateField; + } + + public String getReceiptFiled() { + return receiptFiled; + } + + public void setReceiptFiled(String receiptFiled) { + this.receiptFiled = receiptFiled; + } + + public String getSummaryId() { + return summaryId; + } + + public void setSummaryId(String summaryId) { + this.summaryId = summaryId; + } + + public String getStartDate() { + return startDate; + } + + public void setStartDate(String startDate) { + this.startDate = startDate; + } + + public String getFinishedflag() { + return finishedflag; + } + + public void setFinishedflag(String finishedflag) { + this.finishedflag = finishedflag; + } + + public String getPayDate() { + return payDate; + } + + public void setPayDate(String payDate) { + this.payDate = payDate; + } + + public String getPayResult() { + return payResult; + } + + public void setPayResult(String payResult) { + this.payResult = payResult; + } + + public String getPayAccount() { + return payAccount; + } + + public void setPayAccount(String payAccount) { + this.payAccount = payAccount; + } + + public String getPayBankName() { + return payBankName; + } + + public void setPayBankName(String payBankName) { + this.payBankName = payBankName; + } + + public String getAmount() { + return amount; + } + + public void setAmount(String amount) { + this.amount = amount; + } + + public String getPurpose() { + return purpose; + } + + public void setPurpose(String purpose) { + this.purpose = purpose; + } + + public String getRevAccount() { + return revAccount; + } + + public void setRevAccount(String revAccount) { + this.revAccount = revAccount; + } + + public String getRevBankName() { + return revBankName; + } + + public void setRevBankName(String revBankName) { + this.revBankName = revBankName; + } + + public String getRevBankType() { + return revBankType; + } + + public void setRevBankType(String revBankType) { + this.revBankType = revBankType; + } + + public String getRevAccountName() { + return revAccountName; + } + + public void setRevAccountName(String revAccountName) { + this.revAccountName = revAccountName; + } + + public String getCnapsCode() { + return cnapsCode; + } + + public void setCnapsCode(String cnapsCode) { + this.cnapsCode = cnapsCode; + } + + public String getReceipt() { + return receipt; + } + + public void setReceipt(String receipt) { + this.receipt = receipt; + } + + public String getCurrency() { + return currency; + } + + public void setCurrency(String currency) { + this.currency = currency; + } + + public String getCurrencyName() { + return currencyName; + } + + public void setCurrencyName(String currencyName) { + this.currencyName = currencyName; + } + + public String getCurrencyCode() { + return currencyCode; + } + + public void setCurrencyCode(String currencyCode) { + this.currencyCode = currencyCode; + } + + public String getPersonalFlag() { + return personalFlag; + } + + public void setPersonalFlag(String personalFlag) { + this.personalFlag = personalFlag; + } + + public String getPayType() { + return payType; + } + + public void setPayType(String payType) { + this.payType = payType; + } + + public String getPayCompanyCode() { + return payCompanyCode; + } + + public void setPayCompanyCode(String payCompanyCode) { + this.payCompanyCode = payCompanyCode; + } + + public String getFormsonId() { + return formsonId; + } + + public void setFormsonId(String formsonId) { + this.formsonId = formsonId; + } + + public String getApplyCodeField() { + return applyCodeField; + } + + public void setApplyCodeField(String applyCodeField) { + this.applyCodeField = applyCodeField; + } + + public String getApplyCode() { + return applyCode; + } + + public void setApplyCode(String applyCode) { + this.applyCode = applyCode; + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/PaymentEntity.xml b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/PaymentEntity.xml new file mode 100644 index 00000000..b8d3deee --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/PaymentEntity.xml @@ -0,0 +1,339 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + oaId, + formsonId, + payCompany, + payCompanyCode, + title, + tableName, + billName, + referenceNum, + busType, + payResultField, + payDateField, + applyCodeField, + receiptFiled, + summaryId, + startDate, + finishedflag, + payDate, + payResult, + applyCode, + payAccount, + payBankName, + amount, + purpose, + revAccount, + revBankName, + revBankType, + revAccountName, + cnapsCode, + receipt, + currency, + personalFlag, + payType + + + + + SELECT + formmain_0209.id as oaId, -- 主表id + formson_0210.formsonId, + 'formson_0210' as tableName, -- 表名 + COL_SUMMARY.SUBJECT as title, -- 单据标题 + unit.name as payCompany, -- 付款公司 + '差旅费报销单' as billName, + 'field0072' as payResultField, -- 支付结果字段 + 'field0073' as payDateField, -- 打款日期字段 + 'field0080' AS applyCodeField,-- CBS支付申请单号 + '' as receiptFiled,-- 电子回单字段 + COL_SUMMARY.id as summaryId, + formmain_0209.field0017||'-'||formson_0210.sort as referenceNum, -- 单据编号 + formmain_0209.START_DATE as startDate, -- 单据日期 + formmain_0209.FINISHEDFLAG as finishedflag, -- 流程状态 + formson_0210.field0073 as payDate, -- 打款日期 + formson_0210.field0072 as payResult, -- 支付结果 + formson_0210.field0080 AS applyCode,-- 支付申请单号 + REGEXP_REPLACE(formmain_0209.field0042, '[[:space:]]', '') as payAccount, -- 付款账户 + REGEXP_REPLACE(formmain_0209.field0041, '[[:space:]]', '') as payBankName, -- 付款开户行 + formson_0210.field0031 as amount, -- 金额 + formmain_0209.field0038 as purpose, -- 用途 + formmain_0209.field0038 as cbsAbstract, -- 摘要 + REGEXP_REPLACE(formson_0210.field0069, '[[:space:]]', '') as revAccount, -- 收款账户 + formson_0210.field0068 as revBankName, -- 收款开户行 + formson_0210.field0075 as revAccountName, -- 收款人 + REGEXP_REPLACE(formson_0210.field0071, '[[:space:]]', '') as cnapsCode, -- 收款联行号 + item.ENUMVALUE as personalFlag,-- 公私标记 + formson_0210.field0079 as revBankType, + '10' as currency, + '202' as busType, + '' as receipt -- 电子回单 + FROM + ( + SELECT + WM_CONCAT(id) AS formsonId, + formmain_id, + SUM(field0031) AS field0031, + MIN(sort) AS sort, + field0068, + field0069, + field0071, + field0079, + field0075, + field0070, + field0072, + field0073, + field0080 + FROM + formson_0210 + WHERE + field0067 = '-5486592002512828355' + GROUP BY + formmain_id, + field0068, + field0069, + field0071, + field0079, + field0075, + field0070, + field0072, + field0073, + field0080 + )formson_0210 + LEFT JOIN formmain_0209 ON formson_0210.FORMMAIN_ID = formmain_0209.id + LEFT JOIN COL_SUMMARY ON COL_SUMMARY.FORM_RECORDID = formmain_0209.id + left join CTP_ENUM_ITEM item on item.id =formson_0210.field0070 + left join ORG_UNIT unit on unit.id =formmain_0209.field0002 + + + + + + + + + + + + + + + + + + + + + + update ${tableName} set + + ${payDateField} =#{payDate}, + ${payResultField} =#{payResult}, + ${applyCodeField} =#{applyCode} + + where id = #{formsonId} + + + + + update ${tableName} set ${receiptFiled}=#{receipt} where id = #{oaId} and ${receiptFiled} is null + + + diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/TransactionDetailEntity.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/TransactionDetailEntity.java new file mode 100644 index 00000000..e1d66a2d --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/TransactionDetailEntity.java @@ -0,0 +1,155 @@ +package com.hzya.frame.seeyon.cbs8.entity; + +import com.hzya.frame.web.entity.BaseEntity; + +/** + * @Description cbs交易明细日志OA底表 + * @Author xiangerlin + * @Date 2024/6/24 10:49 + **/ +public class TransactionDetailEntity extends BaseEntity { + private String id;//id + private String accountNo;//银行账号 + private String accountName;//户名 + private String openBank;//开户行名称 + private String bankType;//我方银行类型 + private String bankTransactionDate;//交易日期 + private String transactionSerialNumber;//交易流水号 + private String bankSerialNumber;//银行流水号 + private String currency;//币种 + private String incurredAmount;//发生额 + private String purpose;//用途 + private String digest;//摘要 + private String oppositeAccount;//对方账号 + private String oppositeName;//对方户名 + private String oppositeOpeningBank;//对方开户行 + + private String remark;//备注 + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getAccountNo() { + return accountNo; + } + + public void setAccountNo(String accountNo) { + this.accountNo = accountNo; + } + + public String getAccountName() { + return accountName; + } + + public void setAccountName(String accountName) { + this.accountName = accountName; + } + + public String getOpenBank() { + return openBank; + } + + public void setOpenBank(String openBank) { + this.openBank = openBank; + } + + public String getBankTransactionDate() { + return bankTransactionDate; + } + + public void setBankTransactionDate(String bankTransactionDate) { + this.bankTransactionDate = bankTransactionDate; + } + + public String getTransactionSerialNumber() { + return transactionSerialNumber; + } + + public void setTransactionSerialNumber(String transactionSerialNumber) { + this.transactionSerialNumber = transactionSerialNumber; + } + + public String getCurrency() { + return currency; + } + + public void setCurrency(String currency) { + this.currency = currency; + } + + public String getIncurredAmount() { + return incurredAmount; + } + + public void setIncurredAmount(String incurredAmount) { + this.incurredAmount = incurredAmount; + } + + public String getPurpose() { + return purpose; + } + + public void setPurpose(String purpose) { + this.purpose = purpose; + } + + public String getDigest() { + return digest; + } + + public void setDigest(String digest) { + this.digest = digest; + } + + public String getOppositeAccount() { + return oppositeAccount; + } + + public void setOppositeAccount(String oppositeAccount) { + this.oppositeAccount = oppositeAccount; + } + + public String getOppositeName() { + return oppositeName; + } + + public void setOppositeName(String oppositeName) { + this.oppositeName = oppositeName; + } + + public String getOppositeOpeningBank() { + return oppositeOpeningBank; + } + + public void setOppositeOpeningBank(String oppositeOpeningBank) { + this.oppositeOpeningBank = oppositeOpeningBank; + } + + public String getBankType() { + return bankType; + } + + public void setBankType(String bankType) { + this.bankType = bankType; + } + + public String getBankSerialNumber() { + return bankSerialNumber; + } + + public void setBankSerialNumber(String bankSerialNumber) { + this.bankSerialNumber = bankSerialNumber; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/TransactionDetailEntity.xml b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/TransactionDetailEntity.xml new file mode 100644 index 00000000..3fa7fc60 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/entity/TransactionDetailEntity.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + id, + field0001 as accountNo, + field0002 as accountName, + field0003 as openBank, + field0004 as bankType, + field0005 as transactionSerialNumber, + field0006 as bankTransactionDate, + field0007 as bankSerialNumber, + field0008 as currency, + field0009 as incurredAmount, + field0010 as purpose, + field0011 as digest, + field0012 as oppositeAccount, + field0013 as oppositeName, + field0014 as oppositeOpeningBank, + field0015 as remark + + + + + + + diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/IAgentPaymentDetailService.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/IAgentPaymentDetailService.java new file mode 100644 index 00000000..f0a4811b --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/IAgentPaymentDetailService.java @@ -0,0 +1,18 @@ +package com.hzya.frame.seeyon.cbs8.service; + +import com.hzya.frame.basedao.service.IBaseService; +import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentDetailEntity; +import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentEntity; + +/** + * @Description 代发代扣明细 + * @Author xiangerlin + * @Date 2024/6/26 11:00 + **/ +public interface IAgentPaymentDetailService extends IBaseService { + /** + * 更新明细表支付状态 + * @param detail + */ + void updatePayResult(AgentPaymentDetailEntity detail); +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/IAgentPaymentService.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/IAgentPaymentService.java new file mode 100644 index 00000000..dcb6d78f --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/IAgentPaymentService.java @@ -0,0 +1,45 @@ +package com.hzya.frame.seeyon.cbs8.service; + +import com.hzya.frame.basedao.service.IBaseService; +import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentDetailEntity; +import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentEntity; + +import java.util.List; + +/** + * @Description OA代发代扣 + * @Author xiangerlin + * @Date 2024/6/18 15:04 + **/ +public interface IAgentPaymentService extends IBaseService { + + /** + * 查询待支付待代发代扣 主表 + * @param entity + * @return + * @throws Exception + */ + List queryUnpaid(AgentPaymentEntity entity) throws Exception; + + /** + * 根据支付申请单号查询 + * @param agentPayment + * @return + * @throws Exception + */ + AgentPaymentEntity queryByApplyCode(AgentPaymentEntity agentPayment)throws Exception; + + /** + * 查询明细表 + * @param entity + * @return + * @throws Exception + */ + List queryDetails(AgentPaymentDetailEntity entity)throws Exception; + + /** + * 更新支付状态 + * @param entity + */ + void updateResult(AgentPaymentEntity entity); +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/ICbsLogService.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/ICbsLogService.java new file mode 100644 index 00000000..7160c21f --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/ICbsLogService.java @@ -0,0 +1,53 @@ +package com.hzya.frame.seeyon.cbs8.service; + +import com.alibaba.fastjson.JSONObject; +import com.hzya.frame.basedao.service.IBaseService; +import com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity; +import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity; + +import java.util.List; + +/** + * @Description cbs8支付日志 + * @Author xiangerlin + * @Date 2024/6/14 17:22 + **/ +public interface ICbsLogService extends IBaseService { + /** + * 查询支付中的数据 + * @param logEntity + * @return + */ + List queryInPayment(CbsLogEntity logEntity); + /** + * 保存日志,通过rest接口的形式 + * @param logEntity + */ + void saveLog(CbsLogEntity logEntity); + + /** + * 补推,从自己开发的页面或者APIpost + * 需要传oa表单id和表单编号 + * @param entity + */ + void retry(CbsLogEntity entity); + /** + * 补推,从OA页面 + * 只需要传日志表id就行 + * @param jsonObject + */ + void resend(JSONObject jsonObject); + + /** + * 获取token + * @param entity + * @return + */ + SysExtensionApiEntity getTokenExt(SysExtensionApiEntity entity); + + /** + * 更新日志 + * @param logEntity + */ + void updateLog(CbsLogEntity logEntity); +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/IPaymentService.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/IPaymentService.java new file mode 100644 index 00000000..4243084c --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/IPaymentService.java @@ -0,0 +1,63 @@ +package com.hzya.frame.seeyon.cbs8.service; + +import com.hzya.frame.basedao.service.IBaseService; +import com.hzya.frame.seeyon.cbs8.entity.PaymentEntity; + +import java.util.List; + +/** + * @Description oa对接cbs + * @Author xiangerlin + * @Date 2024/6/6 16:31 + **/ +public interface IPaymentService extends IBaseService { + + /** + * 查询待支付的数据 需要推送到CBS的 + * 如果需要查询流程状态已结束的 需要调用方设置finishedflag=1 + * @param entity + * @return + * @throws Exception + */ + List queryUnpaid(PaymentEntity entity)throws Exception; + + /** + * 查询交易成功的数据 + * 内置了查询条件payResult = PayState.payStateGetValue("g"); 支付成功 + * @param entity + * @return + * @throws Exception + */ + List querySuccess(PaymentEntity entity)throws Exception; + + /** + * 查询交易成功,且电子回单为空的 + * @param entity + * @return + * @throws Exception + */ + List queryElecIsNull(PaymentEntity entity)throws Exception; + + /** + * 查询支付中的数据 + * 内置了查询条件 payResult = '支付中' or payResult not in ('审批撤销','审批拒绝','处理失败','退票','支付成功','取消支付','修改支付','支付失败') + * @param entity + * @return + * @throws Exception + */ + List queryInPayment(PaymentEntity entity)throws Exception; + + /** + * 更新支付状态 + * @param entity + * @throws Exception + */ + void updatePayState(PaymentEntity entity)throws Exception; + + /** + * 更新电子回单字段 + * @param entity + * @throws Exception + */ + void updateElec(PaymentEntity entity)throws Exception; +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/ITransactionDetailService.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/ITransactionDetailService.java new file mode 100644 index 00000000..61126686 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/ITransactionDetailService.java @@ -0,0 +1,29 @@ +package com.hzya.frame.seeyon.cbs8.service; + +import com.hzya.frame.basedao.service.IBaseService; +import com.hzya.frame.seeyon.cbs8.entity.TransactionDetailEntity; + +import java.util.List; + +/** + * @Description cbs交易明细 OA底表 + * @Author xiangerlin + * @Date 2024/6/24 11:07 + **/ +public interface ITransactionDetailService extends IBaseService { + + + /** + * 只返回交易流水号 + * @param entity + * @return + */ + List querySerialNumber(TransactionDetailEntity entity); + + /** + * 保存交易明细,通过rest接口的方式 + * @param entity + * @throws Exception + */ + void restSave(TransactionDetailEntity entity); +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/impl/AgentPaymentDetailServiceImpl.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/impl/AgentPaymentDetailServiceImpl.java new file mode 100644 index 00000000..8bbbad34 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/impl/AgentPaymentDetailServiceImpl.java @@ -0,0 +1,39 @@ +package com.hzya.frame.seeyon.cbs8.service.impl; + +import com.baomidou.dynamic.datasource.annotation.DS; +import com.hzya.frame.basedao.service.impl.BaseService; +import com.hzya.frame.seeyon.cbs8.dao.IAgentPaymentDetailDao; +import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentDetailEntity; +import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentEntity; +import com.hzya.frame.seeyon.cbs8.service.IAgentPaymentDetailService; +import com.hzya.frame.seeyon.cbs8.service.IAgentPaymentService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * @Description + * @Author xiangerlin + * @Date 2024/6/26 11:01 + **/ +@Service("OAAgentPaymentDetailServiceImpl") +public class AgentPaymentDetailServiceImpl extends BaseService implements IAgentPaymentDetailService { + + private IAgentPaymentDetailDao agentPaymentDetailDao; + + @Autowired + public void setAgentPaymentDetailDao(IAgentPaymentDetailDao agentPaymentDetailDao) { + this.agentPaymentDetailDao = agentPaymentDetailDao; + this.dao = agentPaymentDetailDao; + } + + /** + * 更新明细表支付状态 + * + * @param detail + */ + @DS("#detail.dataSourceCode") + @Override + public void updatePayResult(AgentPaymentDetailEntity detail) { + agentPaymentDetailDao.update("com.hzya.frame.seeyon.cbs8.dao.impl.AgentPaymentDetailDaoImpl.entity_update_result",detail); + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/impl/AgentPaymentServiceImpl.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/impl/AgentPaymentServiceImpl.java new file mode 100644 index 00000000..ab3ab4b9 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/impl/AgentPaymentServiceImpl.java @@ -0,0 +1,93 @@ +package com.hzya.frame.seeyon.cbs8.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.cbs8.dao.IAgentPaymentDao; +import com.hzya.frame.seeyon.cbs8.dao.IAgentPaymentDetailDao; +import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentDetailEntity; +import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentEntity; +import com.hzya.frame.seeyon.cbs8.service.IAgentPaymentDetailService; +import com.hzya.frame.seeyon.cbs8.service.IAgentPaymentService; +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 + * @Author xiangerlin + * @Date 2024/6/18 15:06 + **/ +@Service(value = "cbs8AgentPaymentServiceImpl") +public class AgentPaymentServiceImpl extends BaseService implements IAgentPaymentService { + + private IAgentPaymentDao agentPaymentDao; + + @Autowired + private IAgentPaymentDetailService agentPaymentDetailService; + @Autowired + public void setAgentPaymentDao(IAgentPaymentDao agentPaymentDao) { + this.agentPaymentDao = agentPaymentDao; + this.dao = agentPaymentDao; + } + /** + * 查询待支付待代发代扣 主表 + * + * @param entity + * @return + * @throws Exception + */ + @DS("#entity.dataSourceCode") + @Override + public List queryUnpaid(AgentPaymentEntity entity) throws Exception { + List list = agentPaymentDao.queryList(entity, "com.hzya.frame.seeyon.cbs8.dao.impl.AgentPaymentDaoImpl.entity_list_base_unpaid"); + return list; + } + + /** + * 根据支付申请单号查询 + * + * @param entity + * @return + * @throws Exception + */ + @Override + public AgentPaymentEntity queryByApplyCode(AgentPaymentEntity entity) throws Exception { + if (null != entity && StrUtil.isNotEmpty(entity.getApplyCode())){ + List list = agentPaymentDao.query(entity); + if (CollectionUtils.isNotEmpty(list)){ + if (list.size() > 1){ + throw new BaseSystemException("根据"+entity.getApplyCode()+"查询到多条记录"); + } + return list.get(0); + } + } + return null; + } + + /** + * 查询明细表 + * + * @param entity + * @return + * @throws Exception + */ + @DS("#entity.dataSourceCode") + @Override + public List queryDetails(AgentPaymentDetailEntity entity) throws Exception { + List list = agentPaymentDetailService.query(entity); + return list; + } + + /** + * @param entity + */ + @DS("#entity.dataSourceCode") + @Override + public void updateResult(AgentPaymentEntity entity) { + agentPaymentDao.update("com.hzya.frame.seeyon.cbs8.dao.impl.AgentPaymentDaoImpl.entity_update",entity); + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/impl/CbsLogServiceImpl.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/impl/CbsLogServiceImpl.java new file mode 100644 index 00000000..07a89a52 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/impl/CbsLogServiceImpl.java @@ -0,0 +1,198 @@ +package com.hzya.frame.seeyon.cbs8.service.impl; + +import cn.hutool.core.map.MapBuilder; +import cn.hutool.core.util.StrUtil; +import cn.hutool.http.HttpRequest; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.dynamic.datasource.annotation.DS; +import com.hzya.frame.basedao.service.impl.BaseService; +import com.hzya.frame.seeyon.cbs8.dao.ICbsLogDao; +import com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity; +import com.hzya.frame.seeyon.cbs8.entity.PaymentEntity; +import com.hzya.frame.seeyon.cbs8.service.ICbsLogService; +import com.hzya.frame.seeyon.util.OAPayState; +import com.hzya.frame.seeyon.util.OARestUtil; +import com.hzya.frame.stringutil.StringUtil; +import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity; +import com.hzya.frame.web.exception.BaseSystemException; +import org.apache.commons.collections.CollectionUtils; +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.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @Description cbs8支付日志 + * @Author xiangerlin + * @Date 2024/6/14 17:22 + **/ +@Service(value = "CbsLogServiceImpl") +public class CbsLogServiceImpl extends BaseService implements ICbsLogService { + + + Logger log = LoggerFactory.getLogger(getClass()); + + private ICbsLogDao cbsLogDao; + @Value("${OA.data_source_code:}") + private String oa_data_source_code; + @Autowired + public void setCbsLogDao(ICbsLogDao cbsLogDao) { + this.cbsLogDao = cbsLogDao; + this.dao = cbsLogDao; + } + @Autowired + private OARestUtil restUtil; + + /** + * 查询支付中的数据 + * + * @param logEntity + * @return + */ + @DS("#logEntity.dataSourceCode") + @Override + public List queryInPayment(CbsLogEntity logEntity) { + List logList = cbsLogDao.queryList(logEntity, "CbsLogEntity_list_base_in_payment"); + return logList; + } + + /** + * 保存日志,通过rest接口的形式 + * + * @param cbsLogEntity + */ + @Override + public void saveLog(CbsLogEntity cbsLogEntity) { + String oa_id = StringUtil.nullConvert(cbsLogEntity.getOa_id()); + String bill_code = StringUtil.nullConvert(cbsLogEntity.getBill_code()); + String tab_name_en = StringUtil.nullConvert(cbsLogEntity.getTab_name_en()); + String tab_name_ch = StringUtil.nullConvert(cbsLogEntity.getTab_name_ch()); + String pay_state = StringUtil.nullConvert(cbsLogEntity.getPay_state()); + String message = StringUtil.nullConvert(cbsLogEntity.getMessage()); + String apply_state = StringUtil.nullConvert(cbsLogEntity.getApply_state()); + String successed = StringUtil.nullConvert(cbsLogEntity.getSuccessed()); + String title = StringUtil.nullConvert(cbsLogEntity.getTitle()); + String pay_company = StringUtil.nullConvert(cbsLogEntity.getPay_company()); + String payee = StringUtil.nullConvert(cbsLogEntity.getPayee()); + String amount = StringUtil.nullConvert(cbsLogEntity.getAmount()); + String cbs_apply_code = StringUtil.nullConvert(cbsLogEntity.getCbs_apply_code()); + //根据oaid判断是否在日志表中存在,如果存在,则更新,如果不存在,则新增 + CbsLogEntity cbsLogEntityResend=new CbsLogEntity(); + cbsLogEntityResend.setOa_id(cbsLogEntity.getOa_id()); + cbsLogEntityResend.setDataSourceCode(oa_data_source_code); + List queryList = query(cbsLogEntityResend); + if(CollectionUtils.isEmpty(queryList)){ + String data = StrUtil.format(getXmlTemplate(),title,pay_company,payee,amount,cbs_apply_code,bill_code,oa_id,tab_name_ch,tab_name_en,pay_state,message,apply_state,successed); + Map headerMap = MapBuilder.create(true) + .put("apiCode", "8000240007") + .put("publicKey","ZJYAorA7JuRDfrVjywcx78BFcqlLwthgXNC65TXxxQMUHuxCe7eDIk+3zDUT+v578prj")//发送者 + .put("secretKey","a54vt9Wx7gdBig+4JCkZ/lISIIL2m4ZEyZkXtW0uQVBDHS+V4SVgT6xhNblacri/j3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//发送者 + .put("appId","800024") + .build(); + JSONObject paramsTemplate = new JSONObject(); + paramsTemplate.put("loginName", "hzya_rest"); + paramsTemplate.put("dataXml", data); + String params = JSONObject.toJSONString(paramsTemplate); + logger.info("保存支付申请日志到OA底表请求参数:{}",params); + String body = HttpRequest.post("http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(headerMap).body(params).timeout(60000).execute().body(); + logger.info("保存支付申请日志到OA底表响应参数:{}",body); + }else{ + for (CbsLogEntity logEntity : queryList) { + logEntity.setPay_state(pay_state); + logEntity.setMessage(message); + logEntity.setApply_state(apply_state); + logEntity.setSuccessed(successed); + logEntity.setBill_code(cbsLogEntity.getBill_code()); + logEntity.setDataSourceCode(oa_data_source_code); + try { + update(logEntity); + }catch (Exception e){ + e.printStackTrace(); + logger.error("更新"); + } + } + } + } + + /** + * 补推,从自己开发的页面或者APIpost + * 需要传oa表单id和表单编号 + * + * @param entity + */ + @Override + public void retry(CbsLogEntity entity) { + PaymentEntity paymentEntity = new PaymentEntity(); + paymentEntity.setOaId(entity.getOa_id()); + paymentEntity.setReferenceNum(entity.getBill_code()); + CbsLogEntity logEntity = new CbsLogEntity(); + logEntity.setId(entity.getId()); + logEntity = cbsLogDao.queryOne(logEntity); + String pay_state = logEntity.getPay_state(); + if (OAPayState.h.getValue().equals(pay_state) + || OAPayState.three.getValue().equals(pay_state) + || OAPayState.k.getValue().equals(pay_state) + || "推送失败".equals(pay_state)){ + //todo 调用重试方法 + }else { + throw new BaseSystemException("只允许补推支付失败的记录"); + } + } + + /** + * 补推,从OA页面 + * 只需要传日志表id就行 + * + * @param jsonObject + */ + @Override + public void resend(JSONObject jsonObject) { + if (null != jsonObject && StrUtil.isNotEmpty(jsonObject.getString("id"))){ + String id = jsonObject.getString("id"); + CbsLogEntity cbsLogEntity = new CbsLogEntity(); + cbsLogEntity.setId(id); + cbsLogEntity =cbsLogDao.queryOne(cbsLogEntity); + if (null != cbsLogEntity && StrUtil.isNotEmpty(cbsLogEntity.getOa_id()) && StrUtil.isNotEmpty(cbsLogEntity.getBill_code())){ + retry(cbsLogEntity); + } + } + } + + /** + * 获取token + * + * @param entity + * @return + */ + @Override + public SysExtensionApiEntity getTokenExt(SysExtensionApiEntity entity) { + String token = restUtil.getToken("hzya_rest", "8000240000"); + Map headers = entity.getHeaders(); + if (null == headers){ + headers = new HashMap<>(); + } + headers.put("token",token); + return entity; + } + + /** + * 更新日志 + * + * @param logEntity + */ + @DS("#logEntity.dataSourceCode") + @Override + public void updateLog(CbsLogEntity logEntity) { + cbsLogDao.update(logEntity); + } + + //获取xml模板 + private String getXmlTemplate(){ + return ""; + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/impl/PaymentServiceImpl.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/impl/PaymentServiceImpl.java new file mode 100644 index 00000000..3a8b01f1 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/impl/PaymentServiceImpl.java @@ -0,0 +1,150 @@ +package com.hzya.frame.seeyon.cbs8.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.cbs8.dao.IPaymentDao; +import com.hzya.frame.seeyon.cbs8.entity.PaymentEntity; +import com.hzya.frame.seeyon.cbs8.service.IPaymentService; +import com.hzya.frame.seeyon.util.OAPayState; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @Description + * @Author xiangerlin + * @Date 2024/6/6 16:34 + **/ +@Service("OAPaymentServiceImpl") +public class PaymentServiceImpl extends BaseService implements IPaymentService { + + + + private IPaymentDao paymentDao; + + @Autowired + public void setPaymentDao(IPaymentDao paymentDao) { + this.paymentDao = paymentDao; + this.dao = paymentDao; + } + + /** + * 查询列表 + * @param entity + * @return + */ + @DS("#entity.dataSourceCode") + @Override + public List query(PaymentEntity entity) { + List list = paymentDao.queryList(entity, "com.hzya.frame.seeyon.cbs8.entity.PaymentEntity.entity_list_base"); + return list; + } + + /** + * 查询待支付的数据 需要推送到CBS的 + * 如果需要查询流程状态已结束的 需要调用方设置finishedflag=1 + * + * @param entity + * @return + * @throws Exception + */ + + + @DS("#entity.dataSourceCode") + @Override + public List queryUnpaid(PaymentEntity entity) throws Exception { + List list = paymentDao.queryList(entity, "com.hzya.frame.seeyon.cbs8.entity.PaymentEntity.PaymentEntity_list_base_unpaid"); + return list; + } + + /** + * 查询交易成功的数据 + * 内置了查询条件payResult = PayState.payStateGetValue("g"); 支付成功 + * + * @param entity + * @return + * @throws Exception + */ + @DS("#entity.dataSourceCode") + @Override + public List querySuccess(PaymentEntity entity) throws Exception { + if (null == entity){ + entity = new PaymentEntity(); + } + entity.setPayResult(OAPayState.payStateGetValue("g")); + List list = paymentDao.queryList(entity, "com.hzya.frame.seeyon.cbs8.entity.PaymentEntity.PaymentEntity_list_base"); + return list; + } + + /** + * 查询交易成功,且电子回单为空的 + * + * @param entity + * @return + * @throws Exception + */ + @DS("#entity.dataSourceCode") + @Override + public List queryElecIsNull(PaymentEntity entity) throws Exception { + List list = paymentDao.queryList(entity, "com.hzya.frame.seeyon.cbs8.entity.PaymentEntity.PaymentEntity_list_base_elec_isnull"); + return list; + } + + /** + * 查询支付中的数据 + * 内置了查询条件 payResult = '支付中' or payResult not in ('审批撤销','审批拒绝','处理失败','退票','支付成功','取消支付','修改支付','支付失败') + * + * @param entity + * @return + * @throws Exception + */ + @DS("#entity.dataSourceCode") + @Override + public List queryInPayment(PaymentEntity entity) throws Exception { + List list = paymentDao.queryList(entity, "com.hzya.frame.seeyon.cbs8.entity.PaymentEntity.PaymentEntity_list_base_in_payment"); + return list; + } + + /** + * 更新支付状态 + * + * @param entity + * @throws Exception + */ + @DS("#entity.dataSourceCode") + @Override + public void updatePayState(PaymentEntity entity) throws Exception { + if (null != entity + && StrUtil.isNotEmpty(entity.getTableName()) + && StrUtil.isNotEmpty(entity.getOaId()) + && StrUtil.isNotEmpty(entity.getFormsonId()) + && StrUtil.isNotEmpty(entity.getPayDateField()) + && StrUtil.isNotEmpty(entity.getPayResultField())){ + String formsonId = entity.getFormsonId(); + String[] formsonIdArray = formsonId.split(","); + for (String s : formsonIdArray) { + entity.setFormsonId(s); + paymentDao.update("com.hzya.frame.seeyon.cbs8.entity.PaymentEntity.PaymentEntity_update_payState",entity); + } + } + } + + /** + * 更新电子回单字段 + * + * @param entity + * @throws Exception + */ + @DS("#entity.dataSourceCode") + @Override + public void updateElec(PaymentEntity entity) throws Exception { + if (null != entity + && StrUtil.isNotEmpty(entity.getTableName()) + && StrUtil.isNotEmpty(entity.getOaId()) + && StrUtil.isNotEmpty(entity.getReceiptFiled())){ + paymentDao.update("com.hzya.frame.seeyon.cbs8.entity.PaymentEntity.PaymentEntity_update_electronic",entity); + } + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/impl/TransactionDetailServiceImpl.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/impl/TransactionDetailServiceImpl.java new file mode 100644 index 00000000..21cee3ea --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/cbs8/service/impl/TransactionDetailServiceImpl.java @@ -0,0 +1,98 @@ +package com.hzya.frame.seeyon.cbs8.service.impl; + +import cn.hutool.core.map.MapBuilder; +import cn.hutool.core.util.StrUtil; +import cn.hutool.http.HttpRequest; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.dynamic.datasource.annotation.DS; +import com.hzya.frame.basedao.service.impl.BaseService; +import com.hzya.frame.seeyon.cbs8.dao.ITransactionDetailDao; +import com.hzya.frame.seeyon.cbs8.entity.TransactionDetailEntity; +import com.hzya.frame.seeyon.cbs8.service.IPaymentService; +import com.hzya.frame.seeyon.cbs8.service.ITransactionDetailService; +import com.hzya.frame.stringutil.StringUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; + +/** + * @Description + * @Author xiangerlin + * @Date 2024/6/24 11:08 + **/ +@Service(value = "OATransactionDetailServiceImpl") +public class TransactionDetailServiceImpl extends BaseService implements ITransactionDetailService { + + private ITransactionDetailDao transactionDetailDao; + + @Autowired + public void setTransactionDetailDao(ITransactionDetailDao dao) { + this.transactionDetailDao = dao; + this.dao=dao; + } + + /** + * 只返回交易流水号 + * + * @param entity + * @return + */ + @DS("#entity.dataSourceCode") + @Override + public List querySerialNumber(TransactionDetailEntity entity) { + List list = transactionDetailDao.queryList(entity, "TransactionDetailEntity_list_serialNumber");; + return list; + } + + /** + * 保存交易明细,通过rest接口的方式 + * + * @param entity + * @throws Exception + */ + @Override + public void restSave(TransactionDetailEntity entity) { + String field0001= StringUtil.nullConvert(entity.getAccountNo());//我方银行账号 + String field0002=StringUtil.nullConvert(entity.getAccountName());//我方户名 + String field0003=StringUtil.nullConvert(entity.getOpenBank());//我方开户行 + String field0004=StringUtil.nullConvert(entity.getBankType());//我方银行类型 + String field0005=StringUtil.nullConvert(entity.getTransactionSerialNumber());//交易流水号 + String field0006=StringUtil.nullConvert(entity.getBankTransactionDate());//交易日期 + String field0007=StringUtil.nullConvert(entity.getBankSerialNumber());//银行流水号 + String field0008=StringUtil.nullConvert(entity.getCurrency());//币种 + String field0009=StringUtil.nullConvert(entity.getIncurredAmount());//收款金额 + String field0010=StringUtil.nullConvert(entity.getPurpose());//用途 + String field0011=StringUtil.nullConvert(entity.getDigest());//摘要 + String field0012=StringUtil.nullConvert(entity.getOppositeAccount());//对方账号 + String field0013=StringUtil.nullConvert(entity.getOppositeName());//对方户名 + String field0014=StringUtil.nullConvert(entity.getOppositeOpeningBank());//对方开户行 + String field0015=StringUtil.nullConvert(entity.getRemark());//备注 + String data = StrUtil.format(getXmlTemplate(),field0001,field0002,field0003,field0004,field0005,field0006,field0007,field0008,field0009,field0010,field0011,field0012,field0013,field0014,field0015); + Map headerMap = MapBuilder.create(true) + .put("apiCode", "8000240006") + .put("publicKey","ZJYAorA7JuRDfrVjywcx78BFcqlLwthgXNC65TXxxQMUHuxCe7eDIk+3zDUT+v578prj") + .put("secretKey","a54vt9Wx7gdBig+4JCkZ/lISIIL2m4ZEyZkXtW0uQVBDHS+V4SVgT6xhNblacri/j3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=") + .put("appId","800024") + .build(); + JSONObject paramsTemplate = new JSONObject(); + paramsTemplate.put("loginName", "hzya_rest"); + paramsTemplate.put("dataXml", data); + String params = JSONObject.toJSONString(paramsTemplate); + logger.info("保存交易明细到OA底表请求参数:{}",params); + String body = HttpRequest.post("http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(headerMap).body(params).timeout(60000).execute().body(); + logger.info("保存交易明细到OA底表响应参数:{}",body); + } + + /** + * 无流程表单模版 + * transaction 交易明细 + * payApply 支付申请日志 + * @return + */ + private String getXmlTemplate(){ + return ""; + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/dao/ICapFormDefinitionDao.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/dao/ICapFormDefinitionDao.java new file mode 100644 index 00000000..f892fa11 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/dao/ICapFormDefinitionDao.java @@ -0,0 +1,51 @@ +package com.hzya.frame.seeyon.dao; + +import com.baomidou.dynamic.datasource.annotation.DS; +import com.hzya.frame.basedao.dao.IBaseDao; +import com.hzya.frame.seeyon.entity.CapFormDefinitionEntity; +import com.hzya.frame.seeyon.entity.CtpFileEntity; +import com.hzya.frame.seeyon.paybill.entity.PayBillEntity; + +import java.util.List; + +/** + * + * @content OA字段配置表DAO + * @className: Administrator + * @author laborer + * @date 2024-09-09 16:00 + * + */ + +public interface ICapFormDefinitionDao extends IBaseDao { + + /** + * + * @content 通过模版编号获取无流程表单配置信息 + * @className: Administrator + * @author laborer + * @date 2024-09-09 16:02 + * + */ + List getFormFiled(CapFormDefinitionEntity fieldInfo); +/** + * + * @content 通过主键删除单据数据 + * @className: Administrator + * @author laborer + * @date 2024-09-09 17:04 + * + */ + + int deleteByKey(CapFormDefinitionEntity fieldInfo); +/** + * + * @content 通过客户传递的数据值查询古河条件的数据 + * @className: Administrator + * @author laborer + * @date 2024-09-09 17:05 + * + */ + + List getFormFiledByFileValue(CapFormDefinitionEntity fieldInfo); +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/dao/ICtpAttachmentDao.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/dao/ICtpAttachmentDao.java new file mode 100644 index 00000000..5c64e35f --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/dao/ICtpAttachmentDao.java @@ -0,0 +1,21 @@ +package com.hzya.frame.seeyon.dao; + +import com.baomidou.dynamic.datasource.annotation.DS; +import com.hzya.frame.basedao.dao.IBaseDao; +import com.hzya.frame.seeyon.entity.CtpAttachmentEntity; + +import java.util.List; + +public interface ICtpAttachmentDao extends IBaseDao { + //更新数据 + @DS("#ctpAttachmentEntity.dataSourceCode") + int updateCtpAttachment(CtpAttachmentEntity ctpAttachmentEntity); + + //根据fiel_url查询附件业务记录,如果存在则更新,如果不存在则新增 + @DS("#ctpAttachmentEntity.dataSourceCode") + List queryCtpAttachment(CtpAttachmentEntity ctpAttachmentEntity); + + //新增 + @DS("#ctpAttachmentEntity.dataSourceCode") + CtpAttachmentEntity saveCtpAttachment(CtpAttachmentEntity ctpAttachmentEntity); +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/dao/ICtpFileDao.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/dao/ICtpFileDao.java new file mode 100644 index 00000000..87961648 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/dao/ICtpFileDao.java @@ -0,0 +1,12 @@ +package com.hzya.frame.seeyon.dao; + +import com.hzya.frame.basedao.dao.IBaseDao; +import com.hzya.frame.seeyon.entity.CtpFileEntity; + +/** + * @Description seeyon 附件对象 + * @Author xiangerlin + * @Date 2024/6/17 15:21 + **/ +public interface ICtpFileDao extends IBaseDao { +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/dao/ISeeYonDao.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/dao/ISeeYonDao.java new file mode 100644 index 00000000..02d6888a --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/dao/ISeeYonDao.java @@ -0,0 +1,108 @@ +package com.hzya.frame.seeyon.dao; + +import com.baomidou.dynamic.datasource.annotation.DS; +import com.hzya.frame.basedao.dao.IBaseDao; +import com.hzya.frame.seeyon.entity.SeeyonEntity; + +import java.util.List; + +/** + * com.hzya.frame.seeyon.dao + * + * @author yqh + * @date 2023-08 -30 10:43 + */ + +public interface ISeeYonDao extends IBaseDao { + /*** + * @Content:通过类型获取OA基本档案数据 + * @Author 👻👻👻👻yqh👻👻👻👻 + * @Date 2023年8月30日11:33:17 + * @Param seeyon + * @return + **/ + @DS("ht_oa_sqlserver") + List selectOAListByTypeformson_0324(SeeyonEntity seeyon); + @DS("ht_oa_sqlserver") + List selectOAListByTypeformson_0352(SeeyonEntity seeyon); + @DS("ht_oa_sqlserver") + List selectOAListByTypeMain(SeeyonEntity seeyon); + /** + * 通过关联关系获取附件主键 + * @param seeyonEntity + * @return + */ + @DS("ht_oa_sqlserver") + List selectFileUrl(SeeyonEntity seeyonEntity); +/*** + * @Content:修改数据状态,避免重复抓取 + * @Author 👻👻👻👻yqh👻👻👻👻 + * @Date + * @Param + * @return + **/ + int updateFormStete(SeeyonEntity s); + + /** + * + * @content 查询付款单中得电子回单 + * @Param + * @Return + * @Author hecan + * @Date 2023/11/9 14:23 + * **/ + @DS("ht_oa_sqlserver") + List selectOAListByTypeformmain_0327(SeeyonEntity seeyon); + @DS("ht_oa_sqlserver") + int updateFormformmain_0327(SeeyonEntity seeyon); + + /** + * + * @content 根据付款方id查询付款名 + * @Param + * @Return + * @Author hecan + * @Date 2023/11/9 14:23 + * **/ + @DS("ht_oa_sqlserver") + List selectOAListByField0258(SeeyonEntity seeyon); + + /** + * + * @content 查询速网U8C中的所有组织 + * @Param + * @Return + * @Author hecan + * @Date 2023/11/13 11:56 + * **/ + @DS("sowow_sqlserver_test") + List selectOAListByCorp(SeeyonEntity seeyon); + + /** + * + * @content 修改OA中的字段为速网U8C销售订单主键 + * @Param + * @Return + * @Author hecan + * @Date 2023/11/15 11:28 + * **/ + @DS("swoa_mysql") + int updateFormformmain_0237(SeeyonEntity seeyonEntity); + @DS("swoa_mysql") + int updateFormformson_0238(SeeyonEntity seeyonEntity); + //根据销售订单编码查询档案主键 + @DS("swoa_mysql") + SeeyonEntity selectOAListByformmain_0237(SeeyonEntity seeyonEntity); + + /** + * + * @content 修改付款单报销单等单据的推送状态 + * @Param + * @Return + * @Author hecan + * @Date 2023/12/20 8:59 + * **/ + @DS("ht_oa_sqlserver") + int updatepush(SeeyonEntity seeyon); + +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/dao/ISeeYonInterFaceDao.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/dao/ISeeYonInterFaceDao.java new file mode 100644 index 00000000..2edbc648 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/dao/ISeeYonInterFaceDao.java @@ -0,0 +1,37 @@ +package com.hzya.frame.seeyon.dao; + +import com.alibaba.fastjson.JSONObject; +import com.hzya.frame.seeyon.entity.SeeYonInterFaceEntity; + +import java.util.List; +import java.util.Map; + +/** + * @author 👻👻👻👻👻👻👻👻👻👻 gjh + * @version 1.0 + * @content + * @date 2023-08-30 10:27 + */ +public interface ISeeYonInterFaceDao { + /*** + * 查询OA档案数据,暂时只根据ID查询,只返回ID集合,此方法暂时用于更新无流程表单判断 + * @content: + * @author 👻👻👻👻👻👻👻👻 gjh + * @date 2023-08-30 10:54 + * @param + * @return java.util.List + **/ + List queryArchives(SeeYonInterFaceEntity seeYonInterFaceEntity); + + /*** + * 答应我写注释好吗 + * @content: + * @author 👻👻👻👻👻👻👻👻 gjh + * @date 2024-01-18 16:01 + * @param jsonObject 根据模版ID获取数据 + * @return java.util.List + **/ + List queryDefinitionInfo(SeeYonInterFaceEntity jsonObject); + List> queryDefinitionData(SeeYonInterFaceEntity jsonObject); + +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/dao/impl/CapFormDefinitionDaoImpl.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/dao/impl/CapFormDefinitionDaoImpl.java new file mode 100644 index 00000000..07304f45 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/dao/impl/CapFormDefinitionDaoImpl.java @@ -0,0 +1,39 @@ +package com.hzya.frame.seeyon.dao.impl; + +import com.baomidou.dynamic.datasource.annotation.DS; +import com.hzya.frame.basedao.dao.MybatisGenericDao; +import com.hzya.frame.seeyon.dao.ICapFormDefinitionDao; +import com.hzya.frame.seeyon.dao.ICtpFileDao; +import com.hzya.frame.seeyon.entity.CapFormDefinitionEntity; +import com.hzya.frame.seeyon.entity.CtpFileEntity; +import com.hzya.frame.seeyon.paybill.entity.PayBillEntity; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * + * @content OA字段配置表DAO + * @className: Administrator + * @author laborer + * @date 2024-09-09 16:00 + * + */ +@Repository(value = "CapFormDefinitionDaoImpl") +public class CapFormDefinitionDaoImpl extends MybatisGenericDao implements ICapFormDefinitionDao { + @DS("#fieldInfo.dataSourceCode") + @Override + public List getFormFiled(CapFormDefinitionEntity fieldInfo) { + return (List) selectList("com.hzya.frame.seeyon.entity.CapFormDefinitionEntity.CapFormDefinitionEntity_list_base",fieldInfo); + } + @DS("#fieldInfo.dataSourceCode") + @Override + public int deleteByKey(CapFormDefinitionEntity fieldInfo) { + return super.delete("com.hzya.frame.seeyon.entity.CapFormDefinitionEntity.CapFormDefinitionEntity_delete",fieldInfo); + } + @DS("#fieldInfo.dataSourceCode") + @Override + public List getFormFiledByFileValue(CapFormDefinitionEntity fieldInfo) { + return (List) selectList("com.hzya.frame.seeyon.entity.CapFormDefinitionEntity.CapFormDefinitionEntity_list_table_info",fieldInfo); + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/dao/impl/CtpAttachmentDaoImpl.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/dao/impl/CtpAttachmentDaoImpl.java new file mode 100644 index 00000000..080c28bc --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/dao/impl/CtpAttachmentDaoImpl.java @@ -0,0 +1,31 @@ +package com.hzya.frame.seeyon.dao.impl; + +import com.baomidou.dynamic.datasource.annotation.DS; +import com.hzya.frame.basedao.dao.MybatisGenericDao; +import com.hzya.frame.seeyon.dao.ICtpAttachmentDao; +import com.hzya.frame.seeyon.entity.CtpAttachmentEntity; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository(value = "ctpAttachmentDaoImpl") +public class +CtpAttachmentDaoImpl extends MybatisGenericDao implements ICtpAttachmentDao { + @DS("#ctpAttachmentEntity.dataSourceCode") + @Override + public int updateCtpAttachment(CtpAttachmentEntity ctpAttachmentEntity) { + return super.update("com.hzya.frame.seeyon.dao.impl.CtpAttachmentDaoImpl.entity_update",ctpAttachmentEntity); + } + + @DS("#ctpAttachmentEntity.dataSourceCode") + @Override + public List queryCtpAttachment(CtpAttachmentEntity ctpAttachmentEntity) { + return (List) super.selectList("com.hzya.frame.seeyon.dao.impl.CtpAttachmentDaoImpl.entity_list_base",ctpAttachmentEntity); + } + + @DS("#ctpAttachmentEntity.dataSourceCode") + @Override + public CtpAttachmentEntity saveCtpAttachment(CtpAttachmentEntity ctpAttachmentEntity) { + return super.save("com.hzya.frame.seeyon.dao.impl.CtpAttachmentDaoImpl.entity_insert",ctpAttachmentEntity); + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/dao/impl/CtpFileDaoImpl.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/dao/impl/CtpFileDaoImpl.java new file mode 100644 index 00000000..8b80d3d7 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/dao/impl/CtpFileDaoImpl.java @@ -0,0 +1,17 @@ +package com.hzya.frame.seeyon.dao.impl; + +import com.hzya.frame.basedao.dao.MybatisGenericDao; +import com.hzya.frame.seeyon.dao.ICtpAttachmentDao; +import com.hzya.frame.seeyon.dao.ICtpFileDao; +import com.hzya.frame.seeyon.entity.CtpAttachmentEntity; +import com.hzya.frame.seeyon.entity.CtpFileEntity; +import org.springframework.stereotype.Repository; + +/** + * @Description + * @Author xiangerlin + * @Date 2024/6/17 15:22 + **/ +@Repository() +public class CtpFileDaoImpl extends MybatisGenericDao implements ICtpFileDao { +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/dao/impl/SeeYonDaoImpl.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/dao/impl/SeeYonDaoImpl.java new file mode 100644 index 00000000..332ae7fc --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/dao/impl/SeeYonDaoImpl.java @@ -0,0 +1,94 @@ +package com.hzya.frame.seeyon.dao.impl; + +import com.baomidou.dynamic.datasource.annotation.DS; +import com.hzya.frame.basedao.dao.MybatisGenericDao; +import com.hzya.frame.seeyon.dao.ISeeYonDao; +import com.hzya.frame.seeyon.entity.SeeyonEntity; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * com.hzya.frame.seeyon.dao.impl + * + * @author yqh + * @date 2023-08 -30 10:44 + */ +@DS("htsqlserver") +@Repository(value = "seeYonDaoImpl") +public class SeeYonDaoImpl extends MybatisGenericDao implements ISeeYonDao { + @DS("ht_oa_sqlserver") + @Override + public List selectOAListByTypeformson_0352(SeeyonEntity seeyon) { + return (List) super.selectList("com.hzya.frame.seeyon.dao.impl.SeeYonDaoImpl.entity_list_base_formson_0352",seeyon); + } + @DS("ht_oa_sqlserver") + @Override + public List selectOAListByTypeformson_0324(SeeyonEntity seeyon) { + return (List) super.selectList("com.hzya.frame.seeyon.dao.impl.SeeYonDaoImpl.entity_list_base_formson_0324",seeyon); + } + @DS("ht_oa_sqlserver") + @Override + public List selectOAListByTypeMain(SeeyonEntity seeyon) { + return (List) super.selectList("com.hzya.frame.seeyon.dao.impl.SeeYonDaoImpl.entity_list_base_main",seeyon); + } + @DS("ht_oa_sqlserver") + @Override + public List selectFileUrl(SeeyonEntity seeyon) { + return (List) super.selectList("com.hzya.frame.seeyon.dao.impl.SeeYonDaoImpl.entity_list_base_ctp_attachment",seeyon); + } + @DS("ht_oa_sqlserver") + @Override + public int updateFormStete(SeeyonEntity s) { + return super.update("com.hzya.frame.seeyon.dao.impl.SeeYonDaoImpl.entity_update",s); + } + + @DS("ht_oa_sqlserver") + @Override + public List selectOAListByTypeformmain_0327(SeeyonEntity seeyon) { + return (List) super.selectList("com.hzya.frame.seeyon.dao.impl.SeeYonDaoImpl.entity_list_base_formmain_0327",seeyon); + } + + @DS("ht_oa_sqlserver") + @Override + public int updateFormformmain_0327(SeeyonEntity seeyon) { + return super.update("com.hzya.frame.seeyon.dao.impl.SeeYonDaoImpl.entity_update_formmain_0327",seeyon); + } + + @DS("ht_oa_sqlserver") + @Override + public List selectOAListByField0258(SeeyonEntity seeyon) { + return (List) super.selectList("com.hzya.frame.seeyon.dao.impl.SeeYonDaoImpl.entity_list_base_field0258",seeyon); + } + + @DS("sowow_sqlserver_test") + @Override + public List selectOAListByCorp(SeeyonEntity seeyon) { + return (List) super.selectList("com.hzya.frame.seeyon.dao.impl.SeeYonDaoImpl.entity_list_base_corp",seeyon); + } + + @Override + @DS("swoa_mysql") + public int updateFormformmain_0237(SeeyonEntity seeyonEntity) { + return super.update("com.hzya.frame.seeyon.dao.impl.SeeYonDaoImpl.entity_update_formmain_0237",seeyonEntity); + } + + @Override + @DS("swoa_mysql") + public int updateFormformson_0238(SeeyonEntity seeyonEntity) { + return super.update("com.hzya.frame.seeyon.dao.impl.SeeYonDaoImpl.entity_update_formson_0238",seeyonEntity); + } + + @Override + @DS("swoa_mysql") + public SeeyonEntity selectOAListByformmain_0237(SeeyonEntity seeyonEntity) { + return (SeeyonEntity) super.selectOne("com.hzya.frame.seeyon.dao.impl.SeeYonDaoImpl.entity_list_base_formmain_0237",seeyonEntity); + } + + @DS("ht_oa_sqlserver") + @Override + public int updatepush(SeeyonEntity seeyon) { + return super.update("com.hzya.frame.seeyon.dao.impl.SeeYonDaoImpl.entity_update_push",seeyon); + } + +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/dao/impl/SeeYonInterFaceDaoImpl.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/dao/impl/SeeYonInterFaceDaoImpl.java new file mode 100644 index 00000000..4091f0be --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/dao/impl/SeeYonInterFaceDaoImpl.java @@ -0,0 +1,43 @@ +package com.hzya.frame.seeyon.dao.impl; + +import com.alibaba.fastjson.JSONObject; +import com.baomidou.dynamic.datasource.annotation.DS; +import com.hzya.frame.basedao.dao.MybatisGenericDao; +import com.hzya.frame.seeyon.dao.ISeeYonInterFaceDao; +import com.hzya.frame.seeyon.entity.SeeYonInterFaceEntity; +import org.springframework.stereotype.Repository; + +import java.util.List; +import java.util.Map; + +/** + * @author 👻👻👻👻👻👻👻👻👻👻 gjh + * @version 1.0 + * @content + * @date 2023-08-30 10:27 + */ +@Repository(value = "seeYonInterFaceDao") +public class SeeYonInterFaceDaoImpl extends MybatisGenericDao implements ISeeYonInterFaceDao { + + + @Override + @DS("ht_oa_sqlserver") + public List queryArchives(SeeYonInterFaceEntity seeYonInterFaceEntity) { + List list = super.query("com.hzya.frame.seeyon.dao.impl.SeeYonInterFaceDaoImpl.queryArchives",seeYonInterFaceEntity); + return list; + } + + @Override + @DS("#seeYonInterFaceEntity.dataSourceCode") + public List queryDefinitionInfo(SeeYonInterFaceEntity seeYonInterFaceEntity) { + + return super.selectList("com.hzya.frame.seeyon.dao.impl.SeeYonInterFaceDaoImpl.queryDefinitionInfo",seeYonInterFaceEntity); + } + + @Override + @DS("#seeYonInterFaceEntity.dataSourceCode") + public List> queryDefinitionData(SeeYonInterFaceEntity seeYonInterFaceEntity) { + List> list = super.selectList("com.hzya.frame.seeyon.dao.impl.SeeYonInterFaceDaoImpl.queryDefinitionData",seeYonInterFaceEntity); + return list ; + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/CapFormDefinitionEntity.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/CapFormDefinitionEntity.java new file mode 100644 index 00000000..2ab841bd --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/CapFormDefinitionEntity.java @@ -0,0 +1,71 @@ +package com.hzya.frame.seeyon.entity; + +import com.hzya.frame.web.entity.BaseEntity; + +import java.io.File; + +/** + * + * @content OA字段配置表 + * @className: Administrator + * @author laborer + * @date 2024-09-09 15:48 + * + */ + +public class CapFormDefinitionEntity extends BaseEntity { + private String fieldInfo;//字段属性定义 + private String viewInfo;//视图权限定义 + private String appbindInfo;//应用绑定定义 + private String tableName;//表名 + private String fieldName;//字段名称 + private String fieldValue;//字段值 + + public String getFieldValue() { + return fieldValue; + } + + public void setFieldValue(String fieldValue) { + this.fieldValue = fieldValue; + } + + public String getTableName() { + return tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } + + public String getFieldName() { + return fieldName; + } + + public void setFieldName(String fieldName) { + this.fieldName = fieldName; + } + + public String getFieldInfo() { + return fieldInfo; + } + + public void setFieldInfo(String fieldInfo) { + this.fieldInfo = fieldInfo; + } + + public String getViewInfo() { + return viewInfo; + } + + public void setViewInfo(String viewInfo) { + this.viewInfo = viewInfo; + } + + public String getAppbindInfo() { + return appbindInfo; + } + + public void setAppbindInfo(String appbindInfo) { + this.appbindInfo = appbindInfo; + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/CapFormDefinitionEntity.xml b/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/CapFormDefinitionEntity.xml new file mode 100644 index 00000000..5c0a498d --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/CapFormDefinitionEntity.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + id, + field_info, + view_info, + appbind_info + + + + + + + + + + delete from ${tableName} where ${fieldName} = #{id} + + diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/CfsLogEntity.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/CfsLogEntity.java new file mode 100644 index 00000000..31c22e17 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/CfsLogEntity.java @@ -0,0 +1,65 @@ +package com.hzya.frame.seeyon.entity; + +/** + * @Description 保存交行日志用 + * @Author xiangerlin + * @Date 2024/3/18 14:07 + **/ +public class CfsLogEntity { + + private String tab_name_ch;//中文表名 + private String tab_name_en;//英文表名 + private OAWorkflowEventDataEntity oaWorkflowEventDataEntity;//无流程表单数据 + + private String result;//交通银行返回的参数(解析后的) + public CfsLogEntity() { + + } + + /** + * + * @param tab_name_ch 中文表名 + * @param tab_name_en 英文表名 + * @param oaWorkflowEventDataEntity 无流程表单数据 + */ + public CfsLogEntity(String tab_name_ch, String tab_name_en, OAWorkflowEventDataEntity oaWorkflowEventDataEntity,String result) { + this.tab_name_ch = tab_name_ch; + this.tab_name_en = tab_name_en; + this.oaWorkflowEventDataEntity = oaWorkflowEventDataEntity; + this.result=result; + } + + public String getTab_name_ch() { + return tab_name_ch; + } + + public void setTab_name_ch(String tab_name_ch) { + this.tab_name_ch = tab_name_ch; + } + + public String getTab_name_en() { + return tab_name_en; + } + + public void setTab_name_en(String tab_name_en) { + this.tab_name_en = tab_name_en; + } + + + + public OAWorkflowEventDataEntity getOaWorkflowEventDataEntity() { + return oaWorkflowEventDataEntity; + } + + public void setOaWorkflowEventDataEntity(OAWorkflowEventDataEntity oaWorkflowEventDataEntity) { + this.oaWorkflowEventDataEntity = oaWorkflowEventDataEntity; + } + + public String getResult() { + return result; + } + + public void setResult(String result) { + this.result = result; + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/CollAttachmentResDTO.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/CollAttachmentResDTO.java new file mode 100644 index 00000000..42094a55 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/CollAttachmentResDTO.java @@ -0,0 +1,340 @@ +package com.hzya.frame.seeyon.entity; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.alibaba.fastjson.TypeReference; +import com.alibaba.fastjson.annotation.JSONField; + +import java.util.List; +import java.util.Map; + +/** + * @Description 查询协同附件列表返回对象 /rest/coll/attachments/{summaryID}/{attType} + * @Author xiangerlin + * @Date 2024/8/16 09:11 + **/ +public class CollAttachmentResDTO { + private String id; //ctp_attachment 表的id + private String reference;// 流程表的id, col_summary + private String subReference;//流程表单附件字段存的id + private String category;//应用分类 + private String type; + private String filename;//附件名称 + private String mimeType;//附件类型 + private String createdate; + private String size;//附件大小 + private String description; + private String fileUrl;//附件id,ctp_file 表的逐渐 + private String extension; + private String icon; + private String iconFont; + private String genesisId; + private String sort; + private String officeTransformEnable; + private String obsObjectKey; + private String secretLevel; + private String secretLevelName; + private String canBrowse; + private String v; + private Boolean wpsOnlineEnable; + private Boolean allowTrans; + private JSONObject transValue; + private String createdateStr; + @JSONField(name = "new") + private Boolean newFile; + private Map extraMap; // 使用Map来存储额外的键值对 + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getReference() { + return reference; + } + + public void setReference(String reference) { + this.reference = reference; + } + + public String getSubReference() { + return subReference; + } + + public void setSubReference(String subReference) { + this.subReference = subReference; + } + + public String getCategory() { + return category; + } + + public void setCategory(String category) { + this.category = category; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getFilename() { + return filename; + } + + public void setFilename(String filename) { + this.filename = filename; + } + + public String getMimeType() { + return mimeType; + } + + public void setMimeType(String mimeType) { + this.mimeType = mimeType; + } + + public String getCreatedate() { + return createdate; + } + + public void setCreatedate(String createdate) { + this.createdate = createdate; + } + + public String getSize() { + return size; + } + + public void setSize(String size) { + this.size = size; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getFileUrl() { + return fileUrl; + } + + public void setFileUrl(String fileUrl) { + this.fileUrl = fileUrl; + } + + public String getExtension() { + return extension; + } + + public void setExtension(String extension) { + this.extension = extension; + } + + public String getIcon() { + return icon; + } + + public void setIcon(String icon) { + this.icon = icon; + } + + public String getIconFont() { + return iconFont; + } + + public void setIconFont(String iconFont) { + this.iconFont = iconFont; + } + + public String getGenesisId() { + return genesisId; + } + + public void setGenesisId(String genesisId) { + this.genesisId = genesisId; + } + + public String getSort() { + return sort; + } + + public void setSort(String sort) { + this.sort = sort; + } + + public String getOfficeTransformEnable() { + return officeTransformEnable; + } + + public void setOfficeTransformEnable(String officeTransformEnable) { + this.officeTransformEnable = officeTransformEnable; + } + + public String getObsObjectKey() { + return obsObjectKey; + } + + public void setObsObjectKey(String obsObjectKey) { + this.obsObjectKey = obsObjectKey; + } + + public String getSecretLevel() { + return secretLevel; + } + + public void setSecretLevel(String secretLevel) { + this.secretLevel = secretLevel; + } + + public String getSecretLevelName() { + return secretLevelName; + } + + public void setSecretLevelName(String secretLevelName) { + this.secretLevelName = secretLevelName; + } + + public String getCanBrowse() { + return canBrowse; + } + + public void setCanBrowse(String canBrowse) { + this.canBrowse = canBrowse; + } + + public String getV() { + return v; + } + + public void setV(String v) { + this.v = v; + } + + public Boolean getWpsOnlineEnable() { + return wpsOnlineEnable; + } + + public void setWpsOnlineEnable(Boolean wpsOnlineEnable) { + this.wpsOnlineEnable = wpsOnlineEnable; + } + + public Boolean getAllowTrans() { + return allowTrans; + } + + public void setAllowTrans(Boolean allowTrans) { + this.allowTrans = allowTrans; + } + + public JSONObject getTransValue() { + return transValue; + } + + public void setTransValue(JSONObject transValue) { + this.transValue = transValue; + } + + public String getCreatedateStr() { + return createdateStr; + } + + public void setCreatedateStr(String createdateStr) { + this.createdateStr = createdateStr; + } + + public Boolean getNewFile() { + return newFile; + } + + public void setNewFile(Boolean newFile) { + this.newFile = newFile; + } + + public Map getExtraMap() { + return extraMap; + } + + public void setExtraMap(Map extraMap) { + this.extraMap = extraMap; + } + + public static void main(String[] args) { + String str = "[{\n" + + "\t\"id\": 5180424495316486643,\n" + + "\t\"reference\": -1741558410793893622,\n" + + "\t\"subReference\": 584122959825946183,\n" + + "\t\"category\": 66,\n" + + "\t\"type\": 0,\n" + + "\t\"filename\": \"Order.pdf\",\n" + + "\t\"mimeType\": \"application/pdf\",\n" + + "\t\"createdate\": 1723454209000,\n" + + "\t\"size\": 131234,\n" + + "\t\"description\": null,\n" + + "\t\"fileUrl\": -5577707714790406265,\n" + + "\t\"extension\": \"pdf\",\n" + + "\t\"icon\": \"pdf.gif\",\n" + + "\t\"iconFont\": \"pdf\",\n" + + "\t\"genesisId\": null,\n" + + "\t\"sort\": 0,\n" + + "\t\"officeTransformEnable\": \"disable\",\n" + + "\t\"obsObjectKey\": \"\",\n" + + "\t\"secretLevel\": null,\n" + + "\t\"secretLevelName\": null,\n" + + "\t\"canBrowse\": 1,\n" + + "\t\"v\": \"fcdf8ae9d97bf2969fa6005394442885\",\n" + + "\t\"wpsOnlineEnable\": false,\n" + + "\t\"allowTrans\": false,\n" + + "\t\"transValue\": {\n" + + "\t\t\"isWpsOnlineEnable\": false,\n" + + "\t\t\"isAllowTrans\": false\n" + + "\t},\n" + + "\t\"createdateStr\": \"1723454209000\",\n" + + "\t\"new\": false,\n" + + "\t\"extraMap\": {}\n" + + "}, {\n" + + "\t\"id\": -6639984402087339,\n" + + "\t\"reference\": -1741558410793893622,\n" + + "\t\"subReference\": 649078190027982545,\n" + + "\t\"category\": 66,\n" + + "\t\"type\": 0,\n" + + "\t\"filename\": \"Invoice.pdf\",\n" + + "\t\"mimeType\": \"application/pdf\",\n" + + "\t\"createdate\": 1723454201000,\n" + + "\t\"size\": 158553,\n" + + "\t\"description\": null,\n" + + "\t\"fileUrl\": -4345076582332676605,\n" + + "\t\"extension\": \"pdf\",\n" + + "\t\"icon\": \"pdf.gif\",\n" + + "\t\"iconFont\": \"pdf\",\n" + + "\t\"genesisId\": null,\n" + + "\t\"sort\": 0,\n" + + "\t\"officeTransformEnable\": \"disable\",\n" + + "\t\"obsObjectKey\": \"\",\n" + + "\t\"secretLevel\": null,\n" + + "\t\"secretLevelName\": null,\n" + + "\t\"canBrowse\": 1,\n" + + "\t\"v\": \"85d721af033c7dddf385be2c7ea8d423\",\n" + + "\t\"wpsOnlineEnable\": false,\n" + + "\t\"allowTrans\": false,\n" + + "\t\"transValue\": {\n" + + "\t\t\"isWpsOnlineEnable\": false,\n" + + "\t\t\"isAllowTrans\": false\n" + + "\t},\n" + + "\t\"createdateStr\": \"1723454201000\",\n" + + "\t\"new\": false,\n" + + "\t\"extraMap\": {}\n" + + "}]"; + List list = JSON.parseArray(str,CollAttachmentResDTO.class); + System.out.println(list); + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/CtpAttachmentEntity.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/CtpAttachmentEntity.java new file mode 100644 index 00000000..1b482263 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/CtpAttachmentEntity.java @@ -0,0 +1,124 @@ +package com.hzya.frame.seeyon.entity; + +import com.hzya.frame.web.entity.BaseEntity; + +import java.util.Date; + +/** + * + * @content OA附件业务表 + * @Param + * @Return + * @Author hecan + * @Date 2023/11/1 14:58 + * **/ +public class CtpAttachmentEntity extends BaseEntity { + private String id;//主键ID + private String sub_reference;//次数据ID此id为真正写在流程表单中的ID + private String category; //应用分类、 + private String type;//分类 + private String filename;//附件名称 + private String file_url;//附件链接 + private String mime_type;// + private Date createdate;//创建时间 + private String attachment_size;//附件大小 + private String sort;//序号 + private String att_reference;//流程表的ID(col_summary) + private String uuid; + + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getSub_reference() { + return sub_reference; + } + + public void setSub_reference(String sub_reference) { + this.sub_reference = sub_reference; + } + + public String getCategory() { + return category; + } + + public void setCategory(String category) { + this.category = category; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getFilename() { + return filename; + } + + public void setFilename(String filename) { + this.filename = filename; + } + + public String getFile_url() { + return file_url; + } + + public void setFile_url(String file_url) { + this.file_url = file_url; + } + + public String getMime_type() { + return mime_type; + } + + public void setMime_type(String mime_type) { + this.mime_type = mime_type; + } + + public Date getCreatedate() { + return createdate; + } + + public void setCreatedate(Date createdate) { + this.createdate = createdate; + } + + public String getAttachment_size() { + return attachment_size; + } + + public void setAttachment_size(String attachment_size) { + this.attachment_size = attachment_size; + } + + public String getSort() { + return sort; + } + + public void setSort(String sort) { + this.sort = sort; + } + + public String getAtt_reference() { + return att_reference; + } + + public void setAtt_reference(String att_reference) { + this.att_reference = att_reference; + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/CtpAttachmentEntity.xml b/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/CtpAttachmentEntity.xml new file mode 100644 index 00000000..f4747121 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/CtpAttachmentEntity.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + id, + sub_reference, + category, + type, + filename, + file_url, + mime_type, + createdate, + attachment_size, + sort, + att_reference + + + + + + + + + + insert into CTP_ATTACHMENT( + + id, + sub_reference, + category, + type, + filename, + file_url, + mime_type, + attachment_size, + sort, + att_reference, + createdate + + )values + ( + + #{id}, + #{sub_reference}, + #{category}, + #{type}, + #{filename}, + #{file_url}, + #{mime_type}, + #{attachment_size}, + #{sort}, + #{att_reference}, + #{createdate} + + ) + + + + + update CTP_ATTACHMENT set + + sub_reference = #{sub_reference}, + att_reference = #{att_reference} + + where file_url = #{file_url} + + + + diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/CtpFileEntity.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/CtpFileEntity.java new file mode 100644 index 00000000..61ebce25 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/CtpFileEntity.java @@ -0,0 +1,113 @@ +package com.hzya.frame.seeyon.entity; + +import com.hzya.frame.web.entity.BaseEntity; + +import java.io.File; + +/** + * @Description OA附件表 + * @Author xiangerlin + * @Date 2021/10/29 08:56 + **/ +public class CtpFileEntity extends BaseEntity { + private String category;//应用类别 + private String type;//类型 + private String filename;//文件名 + private String mime_type;//文件类型 + private String create_date; + private String create_member; + private String file_size;//大小 + private String description;//描述 + private String update_date; + private String account_id; + + + private File file;//临时用 + public String getCategory() { + return category; + } + + public void setCategory(String category) { + this.category = category; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getFilename() { + return filename; + } + + public void setFilename(String filename) { + this.filename = filename; + } + + public String getMime_type() { + return mime_type; + } + + public void setMime_type(String mime_type) { + this.mime_type = mime_type; + } + + public String getCreate_date() { + return create_date; + } + + public void setCreate_date(String create_date) { + this.create_date = create_date; + } + + public String getCreate_member() { + return create_member; + } + + public void setCreate_member(String create_member) { + this.create_member = create_member; + } + + public String getFile_size() { + return file_size; + } + + public void setFile_size(String file_size) { + this.file_size = file_size; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getUpdate_date() { + return update_date; + } + + public void setUpdate_date(String update_date) { + this.update_date = update_date; + } + + public String getAccount_id() { + return account_id; + } + + public void setAccount_id(String account_id) { + this.account_id = account_id; + } + + public File getFile() { + return file; + } + + public void setFile(File file) { + this.file = file; + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/CtpFileEntity.xml b/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/CtpFileEntity.xml new file mode 100644 index 00000000..3f3c8cad --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/CtpFileEntity.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + id, + category, + type, + filename, + mime_type, + create_date, + create_member, + file_size, + description, + update_date, + account_id + + + + + + + + diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/OAU8ResponseDTO.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/OAU8ResponseDTO.java new file mode 100644 index 00000000..c8b473ec --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/OAU8ResponseDTO.java @@ -0,0 +1,89 @@ +package com.hzya.frame.seeyon.entity; + +import com.alibaba.fastjson.annotation.JSONField; + +/** + * @Description u8返回对象 + * @Author xiangerlin + * @Date 2024/5/14 15:40 + **/ +public class OAU8ResponseDTO { + @JSONField(name = "Flag") + private String flag; + @JSONField(name = "DataOne") + private String dataOne; + @JSONField(name = "DataTwo") + private String dataTwo; + @JSONField(name = "Msg") + private String msg; + + //如果co初始化失败,或者token不对的时候会返回这些信息 + private String code; + private String success; + private String message; + private String data; + + public String getFlag() { + return flag; + } + + public void setFlag(String flag) { + this.flag = flag; + } + + public String getDataOne() { + return dataOne; + } + + public void setDataOne(String dataOne) { + this.dataOne = dataOne; + } + + public String getDataTwo() { + return dataTwo; + } + + public void setDataTwo(String dataTwo) { + this.dataTwo = dataTwo; + } + + public String getMsg() { + return msg; + } + + public void setMsg(String msg) { + this.msg = msg; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getSuccess() { + return success; + } + + public void setSuccess(String success) { + this.success = success; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public String getData() { + return data; + } + + public void setData(String data) { + this.data = data; + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/OAWorkflowEventDataEntity.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/OAWorkflowEventDataEntity.java new file mode 100644 index 00000000..341e553f --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/OAWorkflowEventDataEntity.java @@ -0,0 +1,153 @@ +package com.hzya.frame.seeyon.entity; + + +import com.alibaba.fastjson.JSONObject; + +import java.util.Map; + +/** + * @Content OA监听事件提供的表单内容 + * @Author 👻👻👻👻👻👻👻👻👻👻 gjh + * @Date 2020-12-24 8:38 + * @Version 1.0 + */ +public class OAWorkflowEventDataEntity { + private String id;//业务表单id + private String eventType;//流程类型 + /** 流程ID*/ + private String summaryId; + /** 节点ID*/ + private String affairId; + private String currentActivityId; + /** 表单表的FORM ID,用此字段标记是哪个流程*/ + private String formApp; + /****/ + private String formViewOperation; + private Object summaryObj; + private String deeCfgId; + private String currentNodeLast; + private Map businessData; + private Map extData; + private String businessDataStr; + private JSONObject hzyaExtData;//存放一些扩展数据 + private String OnProcessFinished; + public String getSummaryId() { + return summaryId; + } + + public void setSummaryId(String summaryId) { + this.summaryId = summaryId; + } + + public String getAffairId() { + return affairId; + } + + public void setAffairId(String affairId) { + this.affairId = affairId; + } + + public String getCurrentActivityId() { + return currentActivityId; + } + + public void setCurrentActivityId(String currentActivityId) { + this.currentActivityId = currentActivityId; + } + + public String getFormApp() { + return formApp; + } + + public void setFormApp(String formApp) { + this.formApp = formApp; + } + + public String getFormViewOperation() { + return formViewOperation; + } + + public void setFormViewOperation(String formViewOperation) { + this.formViewOperation = formViewOperation; + } + + public Object getSummaryObj() { + return summaryObj; + } + + public void setSummaryObj(Object summaryObj) { + this.summaryObj = summaryObj; + } + + public String getDeeCfgId() { + return deeCfgId; + } + + public void setDeeCfgId(String deeCfgId) { + this.deeCfgId = deeCfgId; + } + + public String getCurrentNodeLast() { + return currentNodeLast; + } + + public void setCurrentNodeLast(String currentNodeLast) { + this.currentNodeLast = currentNodeLast; + } + + public Map getBusinessData() { + return businessData; + } + + public void setBusinessData(Map businessData) { + this.businessData = businessData; + } + + public Map getExtData() { + return extData; + } + + public void setExtData(Map extData) { + this.extData = extData; + } + + public String getBusinessDataStr() { + return businessDataStr; + } + + public void setBusinessDataStr(String businessDataStr) { + this.businessDataStr = businessDataStr; + } + + public String getOnProcessFinished() { + return OnProcessFinished; + } + + public void setOnProcessFinished(String onProcessFinished) { + OnProcessFinished = onProcessFinished; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getEventType() { + return eventType; + } + + public void setEventType(String eventType) { + this.eventType = eventType; + } + + public JSONObject getHzyaExtData() { + return hzyaExtData; + } + + public void setHzyaExtData(JSONObject hzyaExtData) { + this.hzyaExtData = hzyaExtData; + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/SeeYonInterFaceEntity.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/SeeYonInterFaceEntity.java new file mode 100644 index 00000000..449da122 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/SeeYonInterFaceEntity.java @@ -0,0 +1,112 @@ +package com.hzya.frame.seeyon.entity; + +import com.hzya.frame.web.entity.BaseEntity; + +import java.util.List; + +/** + * @author 👻👻👻👻👻👻👻👻👻👻 gjh + * @version 1.0 + * @content + * @date 2023-08-30 10:38 + */ +public class SeeYonInterFaceEntity extends BaseEntity { + private String tabName; + //三方系统ID + private String tripartiteId; + //OA对应字段 + private String oaField; + //模板info + private String field_info; + //模版ID + private String formAppId; + //主表集合 + private List formMainIds; + //主表ID,用于查询明细数据 + private String formMainId; + //事件类型 + private String eventType; + //表单名称 + private String name; + //流程id + private String summaryId; + public String getTabName() { + return tabName; + } + + public void setTabName(String tabName) { + this.tabName = tabName; + } + + public String getTripartiteId() { + return tripartiteId; + } + + public void setTripartiteId(String tripartiteId) { + this.tripartiteId = tripartiteId; + } + + public String getOaField() { + return oaField; + } + + public void setOaField(String oaField) { + this.oaField = oaField; + } + + public String getField_info() { + return field_info; + } + + public void setField_info(String field_info) { + this.field_info = field_info; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getFormAppId() { + return formAppId; + } + + public void setFormAppId(String formAppId) { + this.formAppId = formAppId; + } + + public List getFormMainIds() { + return formMainIds; + } + + public void setFormMainIds(List formMainIds) { + this.formMainIds = formMainIds; + } + + public String getFormMainId() { + return formMainId; + } + + public void setFormMainId(String formMainId) { + this.formMainId = formMainId; + } + + public String getEventType() { + return eventType; + } + + public void setEventType(String eventType) { + this.eventType = eventType; + } + + public String getSummaryId() { + return summaryId; + } + + public void setSummaryId(String summaryId) { + this.summaryId = summaryId; + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/SeeYonInterFaceEntity.xml b/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/SeeYonInterFaceEntity.xml new file mode 100644 index 00000000..4190704d --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/SeeYonInterFaceEntity.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + id as id + + + + + + + + + + + + + diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/SeeyonEntity.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/SeeyonEntity.java new file mode 100644 index 00000000..773386d0 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/SeeyonEntity.java @@ -0,0 +1,684 @@ +package com.hzya.frame.seeyon.entity; + +import com.hzya.frame.web.entity.BaseEntity; + +import java.util.List; + +/** + * com.hzya.frame.seeyon.entity + * + * @author yqh + * @date 2023-08 -30 10:45 + */ + +public class SeeyonEntity extends BaseEntity { + private String field0026;//合同评审编号 + private String field0001;//关联合同 + private String field0003;//合同编号 + private String field0016;//创建日期 + private String field0002;//合同名称 + private String field0004;//入账公司 + private String field0005;//供应商 + private String field0006;//合同类型 + private String field0015;//合同签订日期 + private String field0009;//合同开始时间 + private String field0010;//合同结束时间 + private String field0012;//是否固定金额 + private String field0013;//合同总金额 + private String field0027;//是否重大合同 + private String field0008;//项目 + private String field0032;//合同附件 + private String field0033;//其他附件 + private String field0034;//业务板块一级 + private String field0035;//合同分类 + private String field0038;//开票信息查询 + private String field0039;//付款信息查询 + private String field0044;//合同数量 + private String field0047;//业务板块二级 + private String field0048;//内容概要与评审理由 + private String field0049;//是否多方 + private String field0050;//是否多项目 + private String field0054;//合同已付金额 + private String field0055;//发票已收金额 + private String field0056;//审批中付款金额 + private String field0057;//审批中已收发票金额 + private String field0017;//行号 + private String field0018;//标的物名称 + private String field0019;//标的物编码 + private String field0021;//规格型号 + private String field0022;//总数量 + private String field0023;//单价 + private String field0024;//不含税金额 + private String field0025;//含税金额 + private String field0036;//税率 + private String field0037;//税务编码 + private String field0040;//已开票数量 + private String field0041;//剩余数量 + private String field0042;//在途数量 + private String field0051;//标的物明细表项目 + private String field0052;//相对方 + private String field0053;//其他相关方名称 + private String tableName;//表名称 + private List formson_0324;//合同标的物明细(明细表1) + private List formson_0352;// 相对方(明细表2) + private String formmain_id;//主表ID + private String file_url;//附件ID + private String sub_reference;//附件管理关系 + private String filename;//附件名称 + private String attachment_size;//文件大小 + private String field0067;//状态 + private String field0066;//业务板块三级 + private String loginName;//登录名 + private String dduid;//钉钉id + + private String field0137;//付款账号 + private String field0264;//CFS电子回单 + private String summary_id;//col_summary表id + private String name;//姓名 + private String pk_corp;//公司主键 + private String field0120;//OA关联速网U8C主键的字段 + + private String field0121;//oa对接erp明细主键 + private String details_id;//销售订单明细id + private String da_id;//销售订单档案id + + private String pushField;//杭泰推送标识字段 + private String pushValue;//推送的值 + private String updateTime; + private String field0066Id; + private String field0047Id; + private String field0034Id; + private String field0103;//钉钉ID + + public String getField0103() { + return field0103; + } + + public void setField0103(String field0103) { + this.field0103 = field0103; + } + + public String getField0066Id() { + return field0066Id; + } + + public void setField0066Id(String field0066Id) { + this.field0066Id = field0066Id; + } + + public String getField0047Id() { + return field0047Id; + } + + public void setField0047Id(String field0047Id) { + this.field0047Id = field0047Id; + } + + public String getField0034Id() { + return field0034Id; + } + + public void setField0034Id(String field0034Id) { + this.field0034Id = field0034Id; + } + + public String getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; + } + + public String getPushField() { + return pushField; + } + + public void setPushField(String pushField) { + this.pushField = pushField; + } + + public String getPushValue() { + return pushValue; + } + + public void setPushValue(String pushValue) { + this.pushValue = pushValue; + } + + public String getDa_id() { + return da_id; + } + + public void setDa_id(String da_id) { + this.da_id = da_id; + } + + public String getDetails_id() { + return details_id; + } + + public void setDetails_id(String details_id) { + this.details_id = details_id; + } + + public String getField0121() { + return field0121; + } + + public void setField0121(String field0121) { + this.field0121 = field0121; + } + + public String getField0120() { + return field0120; + } + + public void setField0120(String field0120) { + this.field0120 = field0120; + } + + public String getPk_corp() { + return pk_corp; + } + + public void setPk_corp(String pk_corp) { + this.pk_corp = pk_corp; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getField0264() { + return field0264; + } + + public void setField0264(String field0264) { + this.field0264 = field0264; + } + + public String getSummary_id() { + return summary_id; + } + + public void setSummary_id(String summary_id) { + this.summary_id = summary_id; + } + + public String getField0137() { + return field0137; + } + + public void setField0137(String field0137) { + this.field0137 = field0137; + } + + public String getDduid() { + return dduid; + } + + public void setDduid(String dduid) { + this.dduid = dduid; + } + + public String getLoginName() { + return loginName; + } + + public void setLoginName(String loginName) { + this.loginName = loginName; + } + + public String getField0067() { + return field0067; + } + + public void setField0067(String field0067) { + this.field0067 = field0067; + } + + public String getAttachment_size() { + return attachment_size; + } + + public void setAttachment_size(String attachment_size) { + this.attachment_size = attachment_size; + } + + public String getFilename() { + return filename; + } + + public void setFilename(String filename) { + this.filename = filename; + } + + public String getSub_reference() { + return sub_reference; + } + + public void setSub_reference(String sub_reference) { + this.sub_reference = sub_reference; + } + + public String getFile_url() { + return file_url; + } + + public void setFile_url(String file_url) { + this.file_url = file_url; + } + + public String getFormmain_id() { + return formmain_id; + } + + public void setFormmain_id(String formmain_id) { + this.formmain_id = formmain_id; + } + + public List getFormson_0324() { + return formson_0324; + } + + public void setFormson_0324(List formson_0324) { + this.formson_0324 = formson_0324; + } + + public List getFormson_0352() { + return formson_0352; + } + + public void setFormson_0352(List formson_0352) { + this.formson_0352 = formson_0352; + } + + public String getTableName() { + return tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } + + public String getField0026() { + return field0026; + } + + public void setField0026(String field0026) { + this.field0026 = field0026; + } + + public String getField0001() { + return field0001; + } + + public void setField0001(String field0001) { + this.field0001 = field0001; + } + + public String getField0003() { + return field0003; + } + + public void setField0003(String field0003) { + this.field0003 = field0003; + } + + public String getField0016() { + return field0016; + } + + public void setField0016(String field0016) { + this.field0016 = field0016; + } + + public String getField0002() { + return field0002; + } + + public void setField0002(String field0002) { + this.field0002 = field0002; + } + + public String getField0004() { + return field0004; + } + + public void setField0004(String field0004) { + this.field0004 = field0004; + } + + 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 getField0015() { + return field0015; + } + + public void setField0015(String field0015) { + this.field0015 = field0015; + } + + public String getField0009() { + return field0009; + } + + public void setField0009(String field0009) { + this.field0009 = field0009; + } + + public String getField0010() { + return field0010; + } + + public void setField0010(String field0010) { + this.field0010 = field0010; + } + + public String getField0012() { + return field0012; + } + + public void setField0012(String field0012) { + this.field0012 = field0012; + } + + public String getField0013() { + return field0013; + } + + public void setField0013(String field0013) { + this.field0013 = field0013; + } + + public String getField0027() { + return field0027; + } + + public void setField0027(String field0027) { + this.field0027 = field0027; + } + + public String getField0008() { + return field0008; + } + + public void setField0008(String field0008) { + this.field0008 = field0008; + } + + public String getField0032() { + return field0032; + } + + public void setField0032(String field0032) { + this.field0032 = field0032; + } + + public String getField0033() { + return field0033; + } + + public void setField0033(String field0033) { + this.field0033 = field0033; + } + + public String getField0034() { + return field0034; + } + + public void setField0034(String field0034) { + this.field0034 = field0034; + } + + public String getField0035() { + return field0035; + } + + public void setField0035(String field0035) { + this.field0035 = field0035; + } + + public String getField0038() { + return field0038; + } + + public void setField0038(String field0038) { + this.field0038 = field0038; + } + + public String getField0039() { + return field0039; + } + + public void setField0039(String field0039) { + this.field0039 = field0039; + } + + public String getField0044() { + return field0044; + } + + public void setField0044(String field0044) { + this.field0044 = field0044; + } + + public String getField0047() { + return field0047; + } + + public void setField0047(String field0047) { + this.field0047 = field0047; + } + + public String getField0048() { + return field0048; + } + + public void setField0048(String field0048) { + this.field0048 = field0048; + } + + public String getField0049() { + return field0049; + } + + public void setField0049(String field0049) { + this.field0049 = field0049; + } + + public String getField0050() { + return field0050; + } + + public void setField0050(String field0050) { + this.field0050 = field0050; + } + + public String getField0054() { + return field0054; + } + + public void setField0054(String field0054) { + this.field0054 = field0054; + } + + public String getField0055() { + return field0055; + } + + public void setField0055(String field0055) { + this.field0055 = field0055; + } + + public String getField0056() { + return field0056; + } + + public void setField0056(String field0056) { + this.field0056 = field0056; + } + + public String getField0057() { + return field0057; + } + + public void setField0057(String field0057) { + this.field0057 = field0057; + } + + public String getField0017() { + return field0017; + } + + public void setField0017(String field0017) { + this.field0017 = field0017; + } + + public String getField0018() { + return field0018; + } + + public void setField0018(String field0018) { + this.field0018 = field0018; + } + + public String getField0019() { + return field0019; + } + + public void setField0019(String field0019) { + this.field0019 = field0019; + } + + public String getField0021() { + return field0021; + } + + public void setField0021(String field0021) { + this.field0021 = field0021; + } + + public String getField0022() { + return field0022; + } + + public void setField0022(String field0022) { + this.field0022 = field0022; + } + + public String getField0023() { + return field0023; + } + + public void setField0023(String field0023) { + this.field0023 = field0023; + } + + public String getField0024() { + return field0024; + } + + public void setField0024(String field0024) { + this.field0024 = field0024; + } + + public String getField0025() { + return field0025; + } + + public void setField0025(String field0025) { + this.field0025 = field0025; + } + + public String getField0036() { + return field0036; + } + + public void setField0036(String field0036) { + this.field0036 = field0036; + } + + public String getField0037() { + return field0037; + } + + public void setField0037(String field0037) { + this.field0037 = field0037; + } + + public String getField0040() { + return field0040; + } + + public void setField0040(String field0040) { + this.field0040 = field0040; + } + + public String getField0041() { + return field0041; + } + + public void setField0041(String field0041) { + this.field0041 = field0041; + } + + public String getField0042() { + return field0042; + } + + public void setField0042(String field0042) { + this.field0042 = field0042; + } + + public String getField0051() { + return field0051; + } + + public void setField0051(String field0051) { + this.field0051 = field0051; + } + + public String getField0052() { + return field0052; + } + + public void setField0052(String field0052) { + this.field0052 = field0052; + } + + public String getField0053() { + return field0053; + } + + public void setField0053(String field0053) { + this.field0053 = field0053; + } + + public String getField0066() { + return field0066; + } + + public void setField0066(String field0066) { + this.field0066 = field0066; + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/SeeyonEntity.xml b/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/SeeyonEntity.xml new file mode 100644 index 00000000..83714c7d --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/entity/SeeyonEntity.xml @@ -0,0 +1,250 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + + + splitbank,bankaccno,name,code + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + update formmain_0327 set field0264 = #{field0264} where id = #{id} + + + + + update formmain_0323 set field0067 = 'Y' + where id = #{id} + + + + + update formmain_0237 set field0120 = #{field0120} + where field0010 = #{field0010} + + + + + update formson_0238 set field0121 = #{field0121} + where field0012 = #{field0012} and formmain_id=#{formmain_id} + + + + + update ${tableName} set ${pushField} = #{pushValue} + where id=#{id} + + + diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/enums/ColEventTypeEnum.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/enums/ColEventTypeEnum.java new file mode 100644 index 00000000..69b1af3e --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/enums/ColEventTypeEnum.java @@ -0,0 +1,45 @@ +package com.hzya.frame.seeyon.enums; + +/** + * 流程事件类型枚举 + */ +public enum ColEventTypeEnum { + + ONBEFORESTART("onBeforeStart","流程发起前"), + ONSTART("onStart","流程发起"), + ONBEFORESTOP("onBeforeStop","终止前事件"), + ONSTOP("onStop","终止事件"), + ONBEFORECANCEL("onBeforeCancel","撤销前事件"), + ONCANCEL("onCancel","撤销事件"), + ONPROCESSFINISHED("onProcessFinished","结束事件"), + ONBEFOREFINISHWORKITEM("onBeforeFinishWorkitem","处理前事件"), + ONFINISHWORKITEM("onFinishWorkitem","处理事件"), + ONBEFORESTEPBACK("onBeforeStepBack","回退前事件"), + ONSTEPBACK("onStepBack","回退事件"), + ONBEFORETAKEBACK("onBeforeTakeBack","取回前事件"), + ONTAKEBACK("onTakeBack","取回事件"), + ; + private String type; + private String name; + + ColEventTypeEnum(String type, String name) { + this.type = type; + this.name = name; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/paybill/dao/IPayBillDao.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/paybill/dao/IPayBillDao.java new file mode 100644 index 00000000..a0ec8db8 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/paybill/dao/IPayBillDao.java @@ -0,0 +1,33 @@ +package com.hzya.frame.seeyon.paybill.dao; + +import com.hzya.frame.seeyon.entity.SeeYonInterFaceEntity; +import com.hzya.frame.seeyon.paybill.entity.PayBillEntity; + +import java.util.List; +import java.util.Map; + +/** + * @author 👻👻👻👻👻👻👻👻👻👻 gjh + * @version 1.0 + * @content + * @date 2023-08-30 10:27 + */ +public interface IPayBillDao { +/** + * + * @content 获取OA工程付款单数据 + * @author laborer + * @date 2024/6/20 0020 11:30 + * + */ + List getOaEngineerPay(PayBillEntity entity); +/** + * + * @content 修改推送状态 + * @author laborer + * @date 2024/6/21 0021 11:15 + * + */ + + int updateState(PayBillEntity pay); +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/paybill/dao/impl/PayBillDaoImpl.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/paybill/dao/impl/PayBillDaoImpl.java new file mode 100644 index 00000000..3a753554 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/paybill/dao/impl/PayBillDaoImpl.java @@ -0,0 +1,32 @@ +package com.hzya.frame.seeyon.paybill.dao.impl; + +import com.baomidou.dynamic.datasource.annotation.DS; +import com.hzya.frame.basedao.dao.MybatisGenericDao; +import com.hzya.frame.seeyon.entity.SeeYonInterFaceEntity; +import com.hzya.frame.seeyon.paybill.dao.IPayBillDao; +import com.hzya.frame.seeyon.paybill.entity.PayBillEntity; +import org.springframework.stereotype.Repository; + +import java.util.List; +import java.util.Map; + +/** + * @author 👻👻👻👻👻👻👻👻👻👻 gjh + * @version 1.0 + * @content + * @date 2023-08-30 10:27 + */ +@Repository(value = "PayBillDaoImpl") +public class PayBillDaoImpl extends MybatisGenericDao implements IPayBillDao { + + @DS("#entity.dataSourceCode") + @Override + public List getOaEngineerPay(PayBillEntity entity) { + return super.selectList("com.hzya.frame.seeyon.paybill.dao.impl.PayBillDaoImpl.PayBillEntity_list_base",entity); + } + @DS("#pay.dataSourceCode") + @Override + public int updateState(PayBillEntity pay) { + return super.update("com.hzya.frame.seeyon.paybill.dao.impl.PayBillDaoImpl.PayBillEntity_update",pay); + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/paybill/entity/PayBillEntity.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/paybill/entity/PayBillEntity.java new file mode 100644 index 00000000..1a9308de --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/paybill/entity/PayBillEntity.java @@ -0,0 +1,107 @@ +package com.hzya.frame.seeyon.paybill.entity; + +import com.hzya.frame.web.entity.BaseEntity; + +import java.util.List; +import java.util.Map; + +/** + * + * @content 付款結算單 + * @author laborer + * @date 2024/6/20 0020 11:07 + * + */ + +public class PayBillEntity extends BaseEntity { + private String billDate;//付款日期 + private String primalMoney;//付款金额信息 + private String pkOppaccount;//付款银行信息 + private String pkSupplier;//供应商信息 + private String tableName;//表名称 + private String fieldName;//字段名称 + private String state;//推送状态 + private String pkOrg;//组织 + private String pkCustomer;//客户 + private String pk_oppaccount;//付款账户 + + public String getPkCustomer() { + return pkCustomer; + } + + public void setPkCustomer(String pkCustomer) { + this.pkCustomer = pkCustomer; + } + + public String getPk_oppaccount() { + return pk_oppaccount; + } + + public void setPk_oppaccount(String pk_oppaccount) { + this.pk_oppaccount = pk_oppaccount; + } + + public String getPkOrg() { + return pkOrg; + } + + public void setPkOrg(String pkOrg) { + this.pkOrg = pkOrg; + } + + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + public String getTableName() { + return tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } + + public String getFieldName() { + return fieldName; + } + + public void setFieldName(String fieldName) { + this.fieldName = fieldName; + } + + public String getBillDate() { + return billDate; + } + + public void setBillDate(String billDate) { + this.billDate = billDate; + } + + public String getPrimalMoney() { + return primalMoney; + } + + public void setPrimalMoney(String primalMoney) { + this.primalMoney = primalMoney; + } + + public String getPkOppaccount() { + return pkOppaccount; + } + + public void setPkOppaccount(String pkOppaccount) { + this.pkOppaccount = pkOppaccount; + } + + public String getPkSupplier() { + return pkSupplier; + } + + public void setPkSupplier(String pkSupplier) { + this.pkSupplier = pkSupplier; + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/paybill/entity/PayBillEntity.xml b/fw-oa/src/main/java/com/hzya/frame/seeyon/paybill/entity/PayBillEntity.xml new file mode 100644 index 00000000..736d5914 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/paybill/entity/PayBillEntity.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + update ${tableName} set ${fieldName} = #{state} where id = #{id} + + + + + diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/paybill/service/IPayBillService.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/paybill/service/IPayBillService.java new file mode 100644 index 00000000..caad27a7 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/paybill/service/IPayBillService.java @@ -0,0 +1,29 @@ +package com.hzya.frame.seeyon.paybill.service; + +import com.alibaba.fastjson.JSONObject; +import com.hzya.frame.basedao.service.IBaseService; +import com.hzya.frame.seeyon.cbs8.entity.PaymentEntity; +import com.hzya.frame.seeyon.paybill.entity.PayBillEntity; +import com.hzya.frame.web.entity.JsonResultEntity; + +import java.util.List; + +/** + * + * @content huoqu + * @author laborer获取OA付款单数据并推送BIP生成付款结算单 + * @date 2024/6/20 0020 11:19 + * + */ + +public interface IPayBillService extends IBaseService { +/** + * + * @content 工程付款单数据同步BIP + * @author laborer + * @date 2024/6/20 0020 11:24 + * + */ +JsonResultEntity sendEngineerPayBillToBip(JSONObject requestJson); + +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/paybill/service/impl/PayBillServiceImpl.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/paybill/service/impl/PayBillServiceImpl.java new file mode 100644 index 00000000..5bdf9b4b --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/paybill/service/impl/PayBillServiceImpl.java @@ -0,0 +1,105 @@ +package com.hzya.frame.seeyon.paybill.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.hzya.frame.basedao.service.impl.BaseService; +import com.hzya.frame.seeyon.cbs8.entity.PaymentEntity; +import com.hzya.frame.seeyon.paybill.dao.IPayBillDao; +import com.hzya.frame.seeyon.paybill.entity.PayBillEntity; +import com.hzya.frame.seeyon.paybill.service.IPayBillService; +import com.hzya.frame.seeyon.service.impl.SeeYonInterFaceImpl; +import com.hzya.frame.seeyon.util.OABipUtil; +import com.hzya.frame.web.entity.JsonResultEntity; +import org.apache.commons.collections.CollectionUtils; +import org.jetbrains.annotations.NotNull; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * + * @content 付款单同步BIP + * @author laborer + * @date 2024/6/20 0020 15:20 + * + */ + +@Service("PayBillServiceImpl") +public class PayBillServiceImpl extends BaseService implements IPayBillService { + private static final Logger logger = LoggerFactory.getLogger(PayBillServiceImpl.class); + + @Autowired + private IPayBillDao payBillDao; + /** + * + * @content 工程付款单数据同步BIP + * @author laborer + * @date 2024/6/20 0020 11:24 + * + */ + @Override + public JsonResultEntity sendEngineerPayBillToBip(JSONObject requestJson) { + PayBillEntity entity = new PayBillEntity(); + requestJson.put("db_code","OA"); + entity.setDataSourceCode(requestJson.getString("db_code")); + ListpayBillEntityList = payBillDao.getOaEngineerPay(entity); + if(CollectionUtils.isNotEmpty(payBillEntityList)){ + for(PayBillEntity pay : payBillEntityList){ + String token = OABipUtil.getBipToken("yonyou","8000230000"); + JSONObject main = bindingAdd(pay); + logger.info("工程付款单调用中台生成BIP付款结算单推送报文{}",main.toString()); + String result = OABipUtil.sendU9cTOBipEsb(main.toString(),"8000230014",token); + logger.info("工程付款单调用中台生成BIP付款结算单返回结果{}",result); + JSONObject resultObj = JSON.parseObject(result); + boolean flag = resultObj.getBoolean("success"); + if(flag){ + pay.setState("Y"); + }else{ + pay.setState("N"); + } + pay.setDataSourceCode(requestJson.getString("db_code")); + payBillDao.updateState(pay); + // todo 后续在写吧(没字段等OA开了外网在创建),修改推送状态,避免再次查询 + } + } + return null; + } + + @NotNull + private JSONObject bindingAdd(PayBillEntity pay) { + JSONObject head = new JSONObject(); + head.put("pk_org","");//所属组织 + head.put("pk_group","");//集团 + head.put("bill_type","F5");//单据类型 默认F5 + head.put("trade_type","D5");//付款结算类型 默认D5 + head.put("source_flag","2");//付款结算类型 默认2 + head.put("bill_date",pay.getBillDate());//单据日期 + head.put("primal_money",pay.getPrimalMoney());//付款原币金额 + head.put("pk_currtype","CNY");//币种 + head.put("billmaker","");//制单人 + //处理明细数据,按照明细付款 多个明细生成多个付款结算单 + JSONArray detailsArr = new JSONArray(); + JSONObject body = new JSONObject(); + body.put("pk_org","");//所属组织 + body.put("pk_group","");//集团 + body.put("bill_type","F5");//单据类型 默认F5 + body.put("trade_type","D5");//付款结算类型 默认D5 + body.put("pk_currtype","CNY");//币种 + body.put("bill_date",pay.getBillDate());//单据日期 + body.put("pay_primal",pay.getPrimalMoney());//付款原币金额 + body.put("creationtime",pay.getBillDate());//创建时间 + body.put("direction","-1");//方向 :1=收;-1=付; + body.put("objecttype","0");//交易对象 + body.put("pk_customer",pay.getPkCustomer());//客户 + body.put("pk_account",pay.getPkOppaccount());//付款银行账号 + detailsArr.add(body); + JSONObject main = new JSONObject(); + main.put("head",head);//表头 + main.put("body",detailsArr);//明细数据 + return main; + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/recbill/dao/IRecBillDao.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/recbill/dao/IRecBillDao.java new file mode 100644 index 00000000..7668f65e --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/recbill/dao/IRecBillDao.java @@ -0,0 +1,31 @@ +package com.hzya.frame.seeyon.recbill.dao; + +import com.hzya.frame.seeyon.recbill.entity.RecBillEntity; + +import java.util.List; + +/** + * @author 👻👻👻👻👻👻👻👻👻👻 gjh + * @version 1.0 + * @content + * @date 2023-08-30 10:27 + */ +public interface IRecBillDao { +/** + * + * @content 获取OA工程付款单数据 + * @author laborer + * @date 2024/6/20 0020 11:30 + * + */ + List getOaRecBill(RecBillEntity rec); +/** + * + * @content 修改推送状态 + * @author laborer + * @date 2024/6/21 0021 11:15 + * + */ + + int updateState(RecBillEntity rec); +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/recbill/dao/impl/RecBillDaoImpl.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/recbill/dao/impl/RecBillDaoImpl.java new file mode 100644 index 00000000..3682e8a2 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/recbill/dao/impl/RecBillDaoImpl.java @@ -0,0 +1,30 @@ +package com.hzya.frame.seeyon.recbill.dao.impl; + +import com.baomidou.dynamic.datasource.annotation.DS; +import com.hzya.frame.basedao.dao.MybatisGenericDao; +import com.hzya.frame.seeyon.recbill.dao.IRecBillDao; +import com.hzya.frame.seeyon.recbill.entity.RecBillEntity; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * @author 👻👻👻👻👻👻👻👻👻👻 gjh + * @version 1.0 + * @content + * @date 2023-08-30 10:27 + */ +@Repository(value = "RecBillDaoImpl") +public class RecBillDaoImpl extends MybatisGenericDao implements IRecBillDao { + + @DS("#rec.dataSourceCode") + @Override + public List getOaRecBill(RecBillEntity rec) { + return super.selectList("com.hzya.frame.seeyon.recbill.dao.impl.RecBillDaoImpl.PayBillEntity_list_base",rec); + } + @DS("#rec.dataSourceCode") + @Override + public int updateState(RecBillEntity rec) { + return super.update("com.hzya.frame.seeyon.recbill.dao.impl.RecBillDaoImpl.PayBillEntity_update",rec); + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/recbill/entity/RecBillEntity.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/recbill/entity/RecBillEntity.java new file mode 100644 index 00000000..5a271b5d --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/recbill/entity/RecBillEntity.java @@ -0,0 +1,104 @@ +package com.hzya.frame.seeyon.recbill.entity; + +import com.hzya.frame.web.entity.BaseEntity; + +/** + * + * @content 付款結算單 + * @author laborer + * @date 2024/6/20 0020 11:07 + * + */ + +public class RecBillEntity extends BaseEntity { + private String billDate;//付款日期 + private String primalMoney;//付款金额信息 + private String pkOppaccount;//付款银行信息 + private String pkSupplier;//供应商信息 + private String tableName;//表名称 + private String fieldName;//字段名称 + private String state;//推送状态 + private String pkCustomer;//客户 + private String pkAccount;//收款账户 + private String pkOrg;//组织 + + public String getPkCustomer() { + return pkCustomer; + } + + public void setPkCustomer(String pkCustomer) { + this.pkCustomer = pkCustomer; + } + + public String getPkAccount() { + return pkAccount; + } + + public void setPkAccount(String pkAccount) { + this.pkAccount = pkAccount; + } + + public String getPkOrg() { + return pkOrg; + } + + public void setPkOrg(String pkOrg) { + this.pkOrg = pkOrg; + } + + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + public String getTableName() { + return tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } + + public String getFieldName() { + return fieldName; + } + + public void setFieldName(String fieldName) { + this.fieldName = fieldName; + } + + public String getBillDate() { + return billDate; + } + + public void setBillDate(String billDate) { + this.billDate = billDate; + } + + public String getPrimalMoney() { + return primalMoney; + } + + public void setPrimalMoney(String primalMoney) { + this.primalMoney = primalMoney; + } + + public String getPkOppaccount() { + return pkOppaccount; + } + + public void setPkOppaccount(String pkOppaccount) { + this.pkOppaccount = pkOppaccount; + } + + public String getPkSupplier() { + return pkSupplier; + } + + public void setPkSupplier(String pkSupplier) { + this.pkSupplier = pkSupplier; + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/recbill/entity/RecBillEntity.xml b/fw-oa/src/main/java/com/hzya/frame/seeyon/recbill/entity/RecBillEntity.xml new file mode 100644 index 00000000..21f3fc7e --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/recbill/entity/RecBillEntity.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + update ${tableName} set ${fieldName} = #{state} where id = #{id} + + + + + diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/recbill/service/IRecBillService.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/recbill/service/IRecBillService.java new file mode 100644 index 00000000..96930a43 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/recbill/service/IRecBillService.java @@ -0,0 +1,26 @@ +package com.hzya.frame.seeyon.recbill.service; + +import com.alibaba.fastjson.JSONObject; +import com.hzya.frame.basedao.service.IBaseService; +import com.hzya.frame.seeyon.cbs8.entity.PaymentEntity; +import com.hzya.frame.web.entity.JsonResultEntity; + +/** + * + * @content huoqu + * @author laborer获取OA付款单数据并推送BIP生成付款结算单 + * @date 2024/6/20 0020 11:19 + * + */ + +public interface IRecBillService extends IBaseService { +/** + * + * @content 工程付款单数据同步BIP + * @author laborer + * @date 2024/6/20 0020 11:24 + * + */ +JsonResultEntity sendRecBillToBip(JSONObject requestJson); + +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/recbill/service/impl/RecBillServiceImpl.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/recbill/service/impl/RecBillServiceImpl.java new file mode 100644 index 00000000..f65d2855 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/recbill/service/impl/RecBillServiceImpl.java @@ -0,0 +1,104 @@ +package com.hzya.frame.seeyon.recbill.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.hzya.frame.basedao.service.impl.BaseService; +import com.hzya.frame.seeyon.cbs8.entity.PaymentEntity; +import com.hzya.frame.seeyon.recbill.dao.IRecBillDao; +import com.hzya.frame.seeyon.recbill.entity.RecBillEntity; +import com.hzya.frame.seeyon.recbill.service.IRecBillService; +import com.hzya.frame.seeyon.util.OABipUtil; +import com.hzya.frame.web.entity.JsonResultEntity; +import org.apache.commons.collections.CollectionUtils; +import org.jetbrains.annotations.NotNull; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * + * @content 付款单同步BIP + * @author laborer + * @date 2024/6/20 0020 15:20 + * + */ + +@Service("RecBillServiceImpl") +public class RecBillServiceImpl extends BaseService implements IRecBillService { + private static final Logger logger = LoggerFactory.getLogger(RecBillServiceImpl.class); + + @Autowired + private IRecBillDao payBillDao; + /** + * + * @content 工程付款单数据同步BIP + * @author laborer + * @date 2024/6/20 0020 11:24 + * + */ + @Override + public JsonResultEntity sendRecBillToBip(JSONObject requestJson) { + RecBillEntity entity = new RecBillEntity(); + requestJson.put("db_code","OA"); + entity.setDataSourceCode(requestJson.getString("db_code")); + ListpayBillEntityList = payBillDao.getOaRecBill(entity); + if(CollectionUtils.isNotEmpty(payBillEntityList)){ + for(RecBillEntity pay : payBillEntityList){ + String token = OABipUtil.getBipToken("yonyou","8000230000"); + JSONObject main = bindingAdd(pay); + logger.info("银行流水收款信息数据{}",main.toString()); + String result = OABipUtil.sendU9cTOBipEsb(main.toString(),"8000230016",token); + logger.info("银行流水收款信息数据{}",result); + JSONObject resultObj = JSON.parseObject(result); + boolean flag = resultObj.getBoolean("success"); + if(flag){ + pay.setState("Y"); + }else{ + pay.setState("N"); + } + pay.setDataSourceCode(requestJson.getString("db_code")); + payBillDao.updateState(pay); + // todo 后续在写吧(没字段等OA开了外网在创建),修改推送状态,避免再次查询 + } + } + return null; + } + + @NotNull + private JSONObject bindingAdd(RecBillEntity pay) { + JSONObject head = new JSONObject(); + head.put("pk_org","");//所属组织 + head.put("pk_group","");//集团 + head.put("bill_type","F4");//单据类型 默认F5 + head.put("trade_type","D4");//付款结算类型 默认D5 + head.put("source_flag","2");//付款结算类型 默认2 + head.put("bill_date",pay.getBillDate());//单据日期 + head.put("primal_money",pay.getPrimalMoney());//付款原币金额 + head.put("pk_currtype","CNY");//币种 + head.put("billmaker","");//制单人 + //处理明细数据,按照明细付款 多个明细生成多个付款结算单 + JSONArray detailsArr = new JSONArray(); + JSONObject body = new JSONObject(); + body.put("pk_org","");//所属组织 + body.put("pk_group","");//集团 + body.put("bill_type","F4");//单据类型 默认F5 + body.put("trade_type","D4");//付款结算类型 默认D5 + body.put("pk_currtype","CNY");//币种 + body.put("bill_date",pay.getBillDate());//单据日期 + body.put("pay_primal",pay.getPrimalMoney());//付款原币金额 + body.put("creationtime",pay.getBillDate());//创建时间 + body.put("direction","-1");//方向 :1=收;-1=付; + body.put("objecttype","0");//交易对象 + body.put("pk_customer",pay.getPkCustomer());//客户 + body.put("pk_account",pay.getPkAccount());//收款银行账号 + detailsArr.add(body); + JSONObject main = new JSONObject(); + main.put("head",head);//表头 + main.put("body",detailsArr);//明细数据 + return main; + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/service/ICtpAttachmentService.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/service/ICtpAttachmentService.java new file mode 100644 index 00000000..3af20d9d --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/service/ICtpAttachmentService.java @@ -0,0 +1,20 @@ +package com.hzya.frame.seeyon.service; + +import com.hzya.frame.basedao.service.IBaseService; +import com.hzya.frame.seeyon.entity.CtpAttachmentEntity; + +/** + * @Description seeyon 附件关系 + * @Author xiangerlin + * @Date 2024/6/17 15:30 + **/ +public interface ICtpAttachmentService extends IBaseService { + /** + * 保存附件关系表 + * @param fileUrl ctp_file id + * @param col_summary_id col_summary id + * @param sub_reference 随机uuid + * @return + */ + CtpAttachmentEntity saveAttachment(String fileUrl, String col_summary_id, String sub_reference)throws Exception; +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/service/ICtpFileService.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/service/ICtpFileService.java new file mode 100644 index 00000000..b34826ef --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/service/ICtpFileService.java @@ -0,0 +1,12 @@ +package com.hzya.frame.seeyon.service; + +import com.hzya.frame.basedao.service.IBaseService; +import com.hzya.frame.seeyon.entity.CtpFileEntity; + +/** + * @Description seeyon 附件 + * @Author xiangerlin + * @Date 2024/6/17 15:23 + **/ +public interface ICtpFileService extends IBaseService { +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/service/INoProcessService.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/service/INoProcessService.java new file mode 100644 index 00000000..57e72e80 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/service/INoProcessService.java @@ -0,0 +1,26 @@ +package com.hzya.frame.seeyon.service; + +import com.alibaba.fastjson.JSONObject; +import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity; +import com.hzya.frame.web.entity.JsonResultEntity; + +/** + * + * @content 无流程表单公用service + * @className: Administrator + * @author laborer + * @date 2024-09-09 14:53 + * + */ +public interface INoProcessService { +/** + * + * @content 无流程删除通用接口 + * @className: Administrator + * @author laborer + * @date 2024-09-09 15:08 + * + */ + + JsonResultEntity DeleteProcessField(JSONObject requestData); +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/service/ISeeYonInterFace.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/service/ISeeYonInterFace.java new file mode 100644 index 00000000..762023b7 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/service/ISeeYonInterFace.java @@ -0,0 +1,84 @@ +package com.hzya.frame.seeyon.service; + +import com.alibaba.fastjson.JSONObject; +import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity; +import com.hzya.frame.web.entity.JsonResultEntity; + +/** + * 致远OA接口类 + * @author 👻👻👻👻👻👻👻👻👻👻 gjh + * @version 1.0 + * @content + * @date 2023-08-22 9:29 + */ +public interface ISeeYonInterFace { + + /*** + * 发起OA表单方法 + * @content: + * @author 👻👻👻👻👻👻👻👻 gjh + * @date 2023-08-22 9:31 + * @param requestData 请求json + * @return com.hzya.frame.web.entity.JsonResultEntity + **/ + JsonResultEntity thirdInterfaceSend(JSONObject requestData); + + + + /*** + * @Content: 提供给OA的标准接口方法,包含参数 entity 为OA 的data信息, , eventType 为事件类型 + * @Author 👻👻👻👻👻👻👻👻 gjh + * @Date 2020-12-24 10:36 + * @Param [entity, eventType] + * eventType: + * 发起前事件 onBeforeStart , + * 发起事件 onStart , + * 终止前事件 onBeforeStop , + * 终止事件 onStop, + * 撤销前事件 onBeforeCancel, + * 撤销事件 onCancel, + * 结束事件 onProcessFinished, + * 处理前事件 onBeforeFinishWorkitem, + * 处理事件 onFinishWorkitem, + * 回退前事件 onBeforeStepBack, + * 回退事件 onStepBack, + * 取回前事件 onBeforeTakeBack, + * 取回事件 onTakeBack, + * @return string + **/ + JsonResultEntity thirdInterfaceSeeYonPlugInInterfaceEntrance(JSONObject requestData); + + + /*** + * 致远OA业务流程集成补推方法,需要传递参数 + * @param jsonObject formAppId 表单模版ID CAP_FORM_DEFINITION, formMainIds 集合 dataSourceCode 数据源编码 + * @return ht_oa_sqlserver + * @throws Exception + */ + JsonResultEntity thirdInterfaceSeeYonDefinitionRePush(JSONObject jsonObject) throws Exception; + + /** + * seeyon流程事件监听前置方法,绑定数据源 + * @param sysExtensionApi + * @return + * @throws Exception + */ + SysExtensionApiEntity colEventPre(SysExtensionApiEntity sysExtensionApi)throws Exception; + /** + * seeyon流程事件监听 + * @param jsonObject + * @return + * @throws Exception + */ + JsonResultEntity colEventListener(JSONObject jsonObject)throws Exception; + + /** + * seeyon流程事件监听后置方法,调用三方接口 + * @param jsonStr + * @param formAppId + * @param eventType + * @return + * @throws Exception + */ + String colEventPost(String jsonStr,String formAppId,String eventType)throws Exception; +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/service/ISeeyonExtService.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/service/ISeeyonExtService.java new file mode 100644 index 00000000..4f06472d --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/service/ISeeyonExtService.java @@ -0,0 +1,29 @@ +package com.hzya.frame.seeyon.service; + +import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity; +import com.hzya.frame.sysnew.messageManageLog.entity.SysMessageManageLogEntity; +import com.hzya.frame.web.entity.JsonResultEntity; + +/** + * @Description seeyon扩展类 + * @Author xiangerlin + * @Date 2024/5/14 14:04 + **/ +public interface ISeeyonExtService { + + /** + * @Since 3.0 + * 英德赛 OA档案传U8 + * 根据不同formApp来调U8不同接口 + * @param entity + * @return + */ + SysExtensionApiEntity ydcSeeyon2u8(SysExtensionApiEntity entity); + + /** + * @Since 3.0 + * 回调方法 + * @param logEntity + */ + void ydcSeeyon2u8CallBack(SysMessageManageLogEntity logEntity); +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/service/impl/CtpAttachmentServiceImpl.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/service/impl/CtpAttachmentServiceImpl.java new file mode 100644 index 00000000..0ee1e68f --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/service/impl/CtpAttachmentServiceImpl.java @@ -0,0 +1,70 @@ +package com.hzya.frame.seeyon.service.impl; + +import cn.hutool.core.date.DateUtil; +import com.hzya.frame.basedao.service.impl.BaseService; +import com.hzya.frame.seeyon.dao.ICtpAttachmentDao; +import com.hzya.frame.seeyon.entity.CtpAttachmentEntity; +import com.hzya.frame.seeyon.entity.CtpFileEntity; +import com.hzya.frame.seeyon.service.ICtpAttachmentService; +import com.hzya.frame.seeyon.service.ICtpFileService; +import com.hzya.frame.uuid.UUIDLong; +import org.apache.commons.collections.CollectionUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; + +/** + * @Description + * @Author xiangerlin + * @Date 2024/6/17 15:31 + **/ +@Service(value = "ctpAttachmentService") +public class CtpAttachmentServiceImpl extends BaseService implements ICtpAttachmentService { + + private ICtpAttachmentDao ctpAttachmentDao; + @Autowired + private ICtpFileService ctpFileService; + @Autowired + public void setCtpAttachmentDao(ICtpAttachmentDao dao) { + this.ctpAttachmentDao = dao; + this.dao = dao; + } + + /** + * 保存附件关系表 + * + * @param fileUrl ctp_file id + * @param col_summary_id col_summary id + * @param sub_reference 随机uuid + * @return + */ + @Override + public CtpAttachmentEntity saveAttachment(String fileUrl, String col_summary_id, String sub_reference)throws Exception { + //查一下附件 + CtpFileEntity ctpFileEntity = new CtpFileEntity(); + ctpFileEntity.setId(fileUrl); + ctpFileEntity.setDataSourceCode(""); + List ctpFileList = ctpFileService.query(ctpFileEntity); + if (CollectionUtils.isNotEmpty(ctpFileList)){ + CtpFileEntity ctpFile = ctpFileList.get(0); + if (null != ctpFile){ + CtpAttachmentEntity ctpAttachmentEntity = new CtpAttachmentEntity(); + ctpAttachmentEntity.setId(String.valueOf(UUIDLong.longUUID())); + ctpAttachmentEntity.setFile_url(ctpFile.getId());//ctp_file表的id + ctpAttachmentEntity.setAtt_reference(col_summary_id);//业务表单的id + ctpAttachmentEntity.setSub_reference(sub_reference);//这个字段要保存到业务表附件到字段上 + ctpAttachmentEntity.setCategory("66");//这里写66 才可以显示图片 + ctpAttachmentEntity.setFilename(ctpFile.getFilename()); + ctpAttachmentEntity.setType(ctpFile.getType()); + ctpAttachmentEntity.setMime_type(ctpFile.getMime_type()); + ctpAttachmentEntity.setAttachment_size(ctpFile.getFile_size()); + ctpAttachmentEntity.setCreatedate(new Date()); + this.save(ctpAttachmentEntity); + return ctpAttachmentEntity; + } + } + return null; + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/service/impl/CtpFileServiceImpl.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/service/impl/CtpFileServiceImpl.java new file mode 100644 index 00000000..31f96553 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/service/impl/CtpFileServiceImpl.java @@ -0,0 +1,15 @@ +package com.hzya.frame.seeyon.service.impl; + +import com.hzya.frame.basedao.service.impl.BaseService; +import com.hzya.frame.seeyon.entity.CtpFileEntity; +import com.hzya.frame.seeyon.service.ICtpFileService; +import org.springframework.stereotype.Service; + +/** + * @Description + * @Author xiangerlin + * @Date 2024/6/17 15:24 + **/ +@Service() +public class CtpFileServiceImpl extends BaseService implements ICtpFileService { +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/service/impl/NoProcessServiceImpl.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/service/impl/NoProcessServiceImpl.java new file mode 100644 index 00000000..87ba10be --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/service/impl/NoProcessServiceImpl.java @@ -0,0 +1,119 @@ +package com.hzya.frame.seeyon.service.impl; +import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.hzya.frame.seeyon.dao.ICapFormDefinitionDao; +import com.hzya.frame.seeyon.entity.CapFormDefinitionEntity; +import com.hzya.frame.seeyon.service.INoProcessService; +import com.hzya.frame.web.entity.JsonResultEntity; +import org.apache.commons.collections.CollectionUtils; +import org.checkerframework.checker.units.qual.A; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.atomic.AtomicReference; + +/** + * + * @content 无流程表单公用service + * @className: Administrator + * @author laborer + * @date 2024-09-09 14:53 + * + */ + +@Service(value = "NoProcessServiceImpl") +public class NoProcessServiceImpl implements INoProcessService { + private static final Logger logger = LoggerFactory.getLogger(NoProcessServiceImpl.class); + @Autowired + private ICapFormDefinitionDao capFormDefinitionDao; + @Override + public JsonResultEntity DeleteProcessField(JSONObject requestData) { + Listcount =new ArrayList<>(); + JSONObject jsonStrObj = requestData.getJSONObject("jsonStr"); + String formCode = jsonStrObj.getString("formCode"); + String fieldName = jsonStrObj.getString("fieldName"); + String fieldValue = jsonStrObj.getString("fieldValue"); + if(StrUtil.isEmpty(formCode)){ + return new JsonResultEntity("表单编码不能为空:formCode",false); + } + if(StrUtil.isEmpty(fieldName)){ + return new JsonResultEntity("字段名称不能为空:fieldName",false); + } + if(StrUtil.isEmpty(fieldValue)){ + return new JsonResultEntity("字段值不能为空:fieldValue",false); + } + + //通过表单编号获取表单字段信息 + CapFormDefinitionEntity fieldInfo = new CapFormDefinitionEntity(); + fieldInfo.setAppbindInfo(formCode); + fieldInfo.setDataSourceCode("djoatest"); + ListcapFormDefinitionEntityList = capFormDefinitionDao.getFormFiled(fieldInfo); + if(CollectionUtils.isEmpty(capFormDefinitionEntityList)){ + return new JsonResultEntity("通过表单编号查询表单有误,请检查表单编号:"+formCode,false); + } + + try { + capFormDefinitionEntityList.forEach(item->{ + String appbindInfo = item.getAppbindInfo(); + //格式化字段信息 + JSONObject jsonObject = JSONObject.parseObject(appbindInfo); + boolean queryFlag = false; + //如果模版编号相同则继续删除,反正跳过 + if(formCode.equals(jsonObject.getString("formCode"))){ + JSONObject field = JSONObject.parseObject(item.getFieldInfo()); + JSONObject frontFormmain = field.getJSONObject("front_formmain"); + JSONArray formsons = field.getJSONArray("formsons"); + JSONArray fieldInfoTable = frontFormmain.getJSONArray("fieldInfo"); + //验证需要删除的条件字段在表单属性中是否存在 + for (int i = 0; i < fieldInfoTable.size(); i++) { + JSONObject fieldInfoTableObj = fieldInfoTable.getJSONObject(i); + String name = fieldInfoTableObj.getString("name"); + //如果表单属性中存在该字段则验证通过,如果不存在直接返回错误 + if(name.equals(fieldName)){ + queryFlag = true; + + } + } + //验证通过获取数据库表名称进行数据删除 + if(queryFlag){ + String tableName = frontFormmain.getString("tableName"); + //如果主表名称获取主表的主键进行数据删除 + fieldInfo.setTableName(tableName); + fieldInfo.setFieldName(fieldName); + fieldInfo.setFieldValue(fieldValue); + ListdataFormList = capFormDefinitionDao.getFormFiledByFileValue(fieldInfo); + if(CollectionUtils.isNotEmpty(dataFormList)){ + dataFormList.forEach(item1->{ + String id = item1.getId(); + count.add(id); + fieldInfo.setFieldName("id"); + fieldInfo.setId(id); + capFormDefinitionDao.deleteByKey(fieldInfo); + //循环该表单下面的所有子表信息进行子表删除 + if(CollectionUtils.isNotEmpty(formsons)){ + formsons.forEach(formsonsItem->{ + JSONObject jsonObjectBoddy = JSONObject.parseObject(formsonsItem.toString()); + String bodyTableName = jsonObjectBoddy.getString("tableName"); + fieldInfo.setTableName(bodyTableName); + fieldInfo.setFieldName("formmain_id"); + fieldInfo.setId(id); + capFormDefinitionDao.deleteByKey(fieldInfo); + }); + } + }); + } + } + } + }); + } catch (Exception e) { + throw new RuntimeException(e); + } + return new JsonResultEntity("删除成功,删除的数据ID"+ JSON.toJSONString(count),true); + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/service/impl/SeeYonInterFaceImpl.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/service/impl/SeeYonInterFaceImpl.java new file mode 100644 index 00000000..8e8be89e --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/service/impl/SeeYonInterFaceImpl.java @@ -0,0 +1,507 @@ +package com.hzya.frame.seeyon.service.impl; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.map.MapBuilder; +import cn.hutool.core.util.StrUtil; +import cn.hutool.http.HttpRequest; +import cn.hutool.http.HttpUtil; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.hzya.frame.seeyon.dao.ISeeYonInterFaceDao; +import com.hzya.frame.seeyon.entity.OAWorkflowEventDataEntity; +import com.hzya.frame.seeyon.entity.SeeYonInterFaceEntity; +import com.hzya.frame.seeyon.service.ISeeYonInterFace; +import com.hzya.frame.sysnew.application.api.entity.SysApplicationApiEntity; +import com.hzya.frame.sysnew.application.api.service.ISysApplicationApiService; +import com.hzya.frame.sysnew.application.database.dao.ISysApplicationDatabaseDao; +import com.hzya.frame.sysnew.application.database.entity.SysApplicationDatabaseEntity; +import com.hzya.frame.sysnew.application.entity.SysApplicationEntity; +import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity; +import com.hzya.frame.web.entity.BaseResult; +import com.hzya.frame.web.entity.JsonResultEntity; +import com.hzya.frame.web.exception.BaseSystemException; +import org.apache.commons.lang3.ObjectUtils; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author 👻👻👻👻👻👻👻👻👻👻 gjh + * @version 1.0 + * @content + * @date 2023-08-22 9:30 + */ +@Service(value = "seeYonInterFace") +public class SeeYonInterFaceImpl implements ISeeYonInterFace { + private static final Logger logger = LoggerFactory.getLogger(SeeYonInterFaceImpl.class); + /*** rest 用户名*/ + private static final String RESTUSERNAME = "hzyaRest"; + /*** rest 密码*/ + private static final String RESTPASSWORD = "a5ce21b8-91db-4cec-b3e3-3e44719655fd"; + // TODO 此处URL暂时写死,后续根据传递的应用ID获取 + private static final String sendUrl = "http://60.204.152.210/seeyon/"; + //速网esb地址 + private static final String baseUrl = "http://hzya.ufyct.com:9067/kangarooDataCenter/entranceController/externalCallInterface"; + @Resource + private ISysApplicationDatabaseDao sysApplicationDatabaseDao; + @Autowired + private ISysApplicationApiService sysApplicationApiService; + /** + * 定义所支持的事件静态代码块 + */ + private static final StringBuffer eventTypeBuffer = new StringBuffer(); + + { + eventTypeBuffer.append("发起前事件 onBeforeStart ,"); + eventTypeBuffer.append("发起事件 onStart ,"); + eventTypeBuffer.append("终止前事件 onBeforeStop ,"); + eventTypeBuffer.append("终止事件 onStop,"); + eventTypeBuffer.append("撤销前事件 onBeforeCancel,"); + eventTypeBuffer.append("撤销事件 onCancel,"); + eventTypeBuffer.append("结束事件 onProcessFinished,"); + eventTypeBuffer.append("处理前事件 onBeforeFinishWorkitem,"); + eventTypeBuffer.append("处理事件 onFinishWorkitem,"); + eventTypeBuffer.append("回退前事件 onBeforeStepBack,"); + eventTypeBuffer.append("回退事件 onStepBack,"); + eventTypeBuffer.append("取回前事件 onBeforeTakeBack,"); + eventTypeBuffer.append("取回事件 onTakeBack,"); + } + + //基础档案类型 + private final String ARCHIVESTYPE = "archives"; + //流程表单类型 + private final String FLOWTYPE = "flow"; + //创建基础档案 + private final String CREATEARCHIVES = "create"; + //更新基础档案 + private final String UPDATEARCHIVES = "update"; + //创建基础档案 + private final String CREATEARCHIVESURL = "rest/form/import/"; + //创建基础档案 + private final String UPDATEARCHIVESURL = "rest/form/update"; + @Resource + private ISeeYonInterFaceDao seeYonInterFaceDao; + + + //上一次同步时间 + private String LAST_SYNCHRONISED_TIME = ""; + /**** + * @Content:发起无流程表单接口实现 + * @Author 👻👻👻👻👻👻👻👻 gjh + * @Date 2019/12/23 17:03 + * @Param [templateCode 模版编码, sendLoginName 发送人登录帐号 ,xmlData ] + * @return java.lang.Integer + **/ + public static JsonResultEntity saveNoProcess(String templateCode , String interfaceUrl,String sendLoginName, String xmlData) { + String token = getToken(RESTUSERNAME, RESTPASSWORD, sendLoginName); + Map res = new HashMap(); + res.put("loginName", sendLoginName); + res.put("dataXml", xmlData); + res.put("token", token); + String result = HttpRequest.post(sendUrl + interfaceUrl + templateCode).header("token", token).body(JSON.toJSONString(res)).execute().body(); + logger.info("无流程表单执行结果:" + result); + return BaseResult.getFailureMessageEntity("执行成功", result); + } + + public static JsonResultEntity upDateNoProcess(String interfaceUrl, String templateCode, String sendLoginName, String moduleId, String xmlData) { + String token = getToken(RESTUSERNAME, RESTPASSWORD, sendLoginName); + Map res = new HashMap(); + res.put("loginName", sendLoginName); + res.put("dataXml", xmlData); + res.put("token", token); + res.put("moduleId", moduleId); + res.put("templateCode", templateCode); + logger.info("更新无流程表单参数:{}",JSON.toJSONString(res)); + String result = HttpRequest.put(sendUrl + interfaceUrl).header("token", token).body(JSON.toJSONString(res)).execute().body(); + logger.info("更新无流程表单执行结果:" + result); + return BaseResult.getFailureMessageEntity("执行成功", result); + } + + // { +// "moduleId":"5701605966502512923", +// "templateCode":"formmain_0360", +// "loginName":"seeyon", +// "dataXml":"<![CDATA[1438373948291346275]]><![CDATA[9218745623489128746]]><![CDATA[6897123456789123456]]><![CDATA[5729461284567891234]]>" +// } + private static String getToken(String userName, String password, String loginName) { + JSONObject jsonObject = new JSONObject(); + /** 获取token*/ + + jsonObject.put("userName", userName); + jsonObject.put("password", password); + jsonObject.put("loginName", loginName); + logger.info("请求获取token开始---------------------------------------------"); + logger.info("请求参数" + jsonObject.toJSONString()); + String result = HttpUtil.post(sendUrl + "rest/token", jsonObject.toJSONString()); + logger.info("获取token结果---------------------------------------------" + result); + logger.info("获取token结果---------------------------------------------" + result); + jsonObject = JSONObject.parseObject(result); + if ("".equals(result) || result == null) { + logger.info("获取token失败!"); + throw new RuntimeException("获取token失败!"); + } else { + String token = jsonObject.get("id").toString(); + return token; + } + } + + /*** + * 发起OA表单方法 + * @content: + * @author 👻👻👻👻👻👻👻👻 gjh + * @date 2023-08-22 9:32 + * @param + * @return com.hzya.frame.web.entity.BaseResult + **/ + @Override + public JsonResultEntity thirdInterfaceSend(JSONObject requestData) { + JSONObject jsonStr = requestData.getJSONObject("jsonStr"); + if (ObjectUtils.isEmpty(jsonStr)) { + throw new BaseSystemException("jsonStr为空!请传递参数"); + } + //类型 flow archives + String type = jsonStr.getString("type"); + if (StringUtils.isEmpty(type)) { + throw new BaseSystemException("请传递类型!type 流程表单:flow 基础档案:archives"); + } + //模版编号 + String templateCode = jsonStr.getString("templateCode"); + if (StringUtils.isEmpty(templateCode)) { + throw new BaseSystemException("请传入模版编号!templateCode不允许为空"); + } + JSONObject data = jsonStr.getJSONObject("data"); + String attributeArrayStr = jsonStr.getString("attribute"); + if (StringUtils.isEmpty(attributeArrayStr)) { + throw new BaseSystemException("attribute不允许为空"); + } + List attributeArray = JSON.parseArray(attributeArrayStr, JSONObject.class); + JsonResultEntity result = null; + if (ARCHIVESTYPE.equalsIgnoreCase(type)) { + switch (templateCode){ + //预留的 + case "abc123": + break; + } + } + if (FLOWTYPE.equalsIgnoreCase(type)) { + } + return result; + } + + + @Override + public JsonResultEntity thirdInterfaceSeeYonPlugInInterfaceEntrance(JSONObject requestData){ + String jsonStr = requestData.getString("jsonStr"); + JSONObject jsonObject = requestData.getJSONObject("jsonStr"); + OAWorkflowEventDataEntity entity = JSON.parseObject(jsonStr,OAWorkflowEventDataEntity.class); + logger.info("监听OA事件入参:"+jsonObject.toJSONString()); + JSONObject formBeanData = jsonObject.getJSONObject("businessDataStr"); + String eventType = jsonObject.getString("eventType") ; + /** 流程ID*/ + String summaryId = entity.getSummaryId(); + /** 节点ID*/ + String affairId = entity.getAffairId(); + String currentActivityId = entity.getCurrentActivityId(); + /****/ + String formViewOperation = entity.getFormViewOperation(); + Object summaryObj = entity.getSummaryObj(); + String deeCfgId = entity.getDeeCfgId(); + String currentNodeLast = entity.getCurrentNodeLast(); + Map businessData = JSON.parseObject(entity.getBusinessDataStr(), Map.class); + Map extData = entity.getExtData(); + /** 表单表的FORM ID,用此字段标记是哪个流程*/ + String formApp = entity.getFormApp(); + + //formApp 最好过滤一下 + + + String result = null; + try { + //流程事件处理 + result = colEventPost(jsonStr, formApp, eventType); + }catch (Exception e){ + return BaseResult.getFailureMessageEntity("传递失败",e.getMessage()); + } + try { + /** 根据事件类型处理相关事件*/ + switch (eventType) { + /** 发起前事件*/ + case "onBeforeStart": + break; + /** 发起事件*/ + case "onStart": + //流程发起 新增grpu8单据 + break; + /** 终止前事件*/ + case "onBeforeStop": + break; + /** 终止事件*/ + case "onStop": + //流程终止,更新grpu8单据 + break; + /** 撤销前事件*/ + case "onBeforeCancel": + break; + /** 撤销事件*/ + case "onCancel": + //流程撤销,更新grpu8单据 + break; + /** 结束事件*/ + case "onProcessFinished": + break; + /** 处理前事件*/ + case "onBeforeFinishWorkitem": + /** 根据form处理相关业务表单的数据*/ + switch (formApp) { + case "abc123": + break; + default: + return BaseResult.getFailureMessageEntity("未匹配到表单!当前formID:" + formApp, ""); + } + break; + /** 处理事件*/ + case "onFinishWorkitem": + break; + /** 回退前事件*/ + case "onBeforeStepBack": + break; + /** 回退事件*/ + case "onStepBack": + break; + /** 取回前事件*/ + case "onBeforeTakeBack": + break; + /** 取回事件*/ + case "onTakeBack": + break; + default: +// throw new RuntimeException("传入了非法事件类型!请参照:" + eventTypeBuffer.toString()); + return BaseResult.getFailureMessageEntity("传入了非法事件类型!请参照:" + eventTypeBuffer.toString(), "", ""); + } + return BaseResult.getSuccessMessageEntity("传递成功", result); + }catch (Exception e){ + return BaseResult.getFailureMessageEntity("传递失败",e.getMessage()); + } + } + + + @Override + public JsonResultEntity thirdInterfaceSeeYonDefinitionRePush(JSONObject jsonObject) throws Exception { + JSONObject requestData = jsonObject.getJSONObject("jsonStr"); + JSONArray resultEntityArray = new JSONArray(); + if(null == requestData){ + throw new BaseSystemException("参数传递错误需要jsonStr!"); + } + //表单模版ID + String formAppId = requestData.getString("formAppId"); + //事件事件类型 + String eventType = requestData.getString("eventType"); + //数据源编码 + String dataSourceCode = requestData.getString("dataSourceCode"); + //主表ID集合 formMainIds + JSONArray formMainIds = requestData.getJSONArray("formMainIds"); + if(StrUtil.isEmpty(eventType)){ + throw new BaseSystemException("需要传递eventType 参照致远OA事件!"); + } + if(StrUtil.isEmpty(formAppId)){ + throw new BaseSystemException("需要传递formAppId 参照致远OA 表 CAP_FORM_DEFINITION!"); + } + if(StrUtil.isEmpty(dataSourceCode)){ + throw new BaseSystemException("需要传递dataSourceCode 参照中台表 sys_data_source!"); + } + if(null == formMainIds || formMainIds.size() == 0){ + throw new BaseSystemException("需要传递业务主表数据id集合,不允许全量推送!"); + } + + SeeYonInterFaceEntity seeYonInterFaceEntity = new SeeYonInterFaceEntity(); + BeanUtil.copyProperties(requestData,seeYonInterFaceEntity); + List seeYonInterFaceEntityList = seeYonInterFaceDao.queryDefinitionInfo(seeYonInterFaceEntity); + if(null != seeYonInterFaceEntityList && seeYonInterFaceEntityList.size() >0){ + for(SeeYonInterFaceEntity interFaceEntity : seeYonInterFaceEntityList){ + String field_info = interFaceEntity.getField_info(); + JSONObject infoJson = JSON.parseObject(field_info); + //获取主表信息 + JSONObject formMain = infoJson.getJSONObject("front_formmain"); + //获取明细表信息 + JSONArray formSons = infoJson.getJSONArray("formsons"); + //主表tableName + String formMainTableName = formMain.getString("tableName"); + + /** 设置主表查询条件*/ + interFaceEntity.setTabName(formMainTableName); + interFaceEntity.setDataSourceCode(dataSourceCode); + interFaceEntity.setFormMainIds( formMainIds.toJavaList(String.class) ); + + List> forMainList = seeYonInterFaceDao.queryDefinitionData(interFaceEntity); + for (Map forMainRow : forMainList) { + //定义致远OA事件对象 + JSONObject seeYonBean = new JSONObject(); + //定义主表对象 + JSONObject formMainObj = new JSONObject(); + //获取主表ID + String forMainId = String.valueOf(forMainRow.get("ID")); + //组装主表数据 + for (Map.Entry entry : forMainRow.entrySet()) { + formMainObj.put(entry.getKey().toLowerCase(),entry.getValue()); + } + //组装明细表数据 + if(null != formSons && formSons.size() > 0){ + for(Object formSon : formSons){ + JSONObject son = JSON.parseObject(JSON.toJSONString(formSon)); + //明细数据 + String sonTableName = son.getString("tableName"); + SeeYonInterFaceEntity details = new SeeYonInterFaceEntity(); + details.setFormMainId(forMainId); + details.setTabName(sonTableName); + details.setDataSourceCode(dataSourceCode); + JSONArray jsonArray = new JSONArray(); + List> forSonList = seeYonInterFaceDao.queryDefinitionData(details); + for (Map forSons : forSonList) { + //组装明细数据 + JSONObject forSonJson = new JSONObject(); + for (Map.Entry entry : forSons.entrySet()) { + forSonJson.put(entry.getKey().toLowerCase(),entry.getValue()); + } + jsonArray.add(forSonJson); + } + //设置明细表数据 + seeYonBean.put(sonTableName,jsonArray); + } + } + + seeYonBean.put(formMainTableName,formMainObj); + JSONObject rePushRequestData = new JSONObject(); + JSONObject object = new JSONObject(); + object.put("formApp",formAppId); + object.put("eventType",eventType); + object.put("businessDataStr",seeYonBean.toJSONString()); + object.put("affairId",""); + object.put("summaryId",requestData.getString("summaryId")); + object.put("currentActivityId",""); + object.put("id",forMainId); + object.put("hzyaExtData",requestData.getJSONObject("hzyaExtData")); + logger.info("Method:thirdInterfaceSeeYonDefinitionRePush 组装seeYonBean DATA: {}",seeYonBean.toJSONString()); + + rePushRequestData.put("jsonStr",object); + + + JsonResultEntity resultEntity = thirdInterfaceSeeYonPlugInInterfaceEntrance(rePushRequestData); + if(null != resultEntity){ + resultEntityArray.add(resultEntity.getAttribute()); + }else{ + JSONObject jsonResultEntity = new JSONObject(); + jsonResultEntity.put("msg","从新推送失败"); + jsonResultEntity.put("id",forMainId); + resultEntityArray.add(jsonResultEntity); + + } + + } + } + } + return BaseResult.getSuccessMessageEntity("从新推送执行结束",resultEntityArray); + } + + /** + * seeyon流程事件监听前置方法,绑定数据源 + * @param entity + * @return + * @throws Exception + */ + @Override + public SysExtensionApiEntity colEventPre(SysExtensionApiEntity entity) throws Exception { + try { + SysApplicationEntity applicationEntity = entity.getSendApp(); + SysApplicationDatabaseEntity sysApplicationDatabaseEntity = new SysApplicationDatabaseEntity(); + sysApplicationDatabaseEntity.setSts("Y"); + sysApplicationDatabaseEntity.setDbStatus("1"); + sysApplicationDatabaseEntity.setAppId(applicationEntity.getId()); + sysApplicationDatabaseEntity.setDataSourceCode("master"); + List sysDataSourceEntities = sysApplicationDatabaseDao.queryDSBase(sysApplicationDatabaseEntity); + if(sysDataSourceEntities != null && sysDataSourceEntities.size() > 0){ + String parm = entity.getBodys(); + JSONObject jsonObject = JSONObject.parseObject(parm); + jsonObject.put("dataSourceCode",sysDataSourceEntities.get(0).getSourceCode()); + entity.setBodys(jsonObject.toJSONString()); + } + } catch (Exception e) { + e.printStackTrace(); + } + return entity; + } + + /** + * seeyon流程事件监听 + * + * @param jsonObject + * @return + * @throws Exception + */ + @Override + public JsonResultEntity colEventListener(JSONObject jsonObject) throws Exception { + try { + if (null != jsonObject && StrUtil.isNotEmpty(jsonObject.getString("jsonStr"))){ + SeeYonInterFaceEntity entity = jsonObject.getJSONObject("jsonStr").toJavaObject(SeeYonInterFaceEntity.class); + JSONObject requestData = new JSONObject(); + //表单模版ID + requestData.put("formAppId", entity.getFormAppId()); + //事件事件类型 + requestData.put("eventType",entity.getEventType()); + //数据源编码 + requestData.put("dataSourceCode",entity.getDataSourceCode()); + requestData.put("formMainIds",entity.getFormMainIds()); + requestData.put("summaryId",entity.getSummaryId()); + JSONObject jsonStr = new JSONObject(); + jsonStr.put("jsonStr",requestData); + thirdInterfaceSeeYonDefinitionRePush(jsonStr); + } + }catch (Exception e){ + logger.error("流程事件通知接口出错:{}",e); + return BaseResult.getSuccessMessageEntity("失败",e.getMessage()); + } + return BaseResult.getSuccessMessageEntity("成功"); + } + + /** + * seeyon流程事件监听后置方法,调用三方接口 + * + * @param jsonStr + * @param formAppId + * @param eventType + * @return + * @throws Exception + */ + @Override + public String colEventPost(String jsonStr, String formAppId, String eventType) throws Exception { + if (StrUtil.isNotEmpty(jsonStr) && StrUtil.isNotEmpty(formAppId) && StrUtil.isNotEmpty(eventType)){ + SysApplicationApiEntity sysApplicationApiEntity = new SysApplicationApiEntity(); + sysApplicationApiEntity.setHeaderIn(formAppId+"_"+eventType); + List applist = sysApplicationApiService.queryLike(sysApplicationApiEntity); + if (CollectionUtil.isNotEmpty(applist)){ + if (applist.size() > 1){ + throw new BaseSystemException("根据formID:" + formAppId+"查询出多条数据"); + } + SysApplicationApiEntity sysApp = applist.get(0); + Map headerMap = MapBuilder.create(true) + .put("apiCode", String.valueOf(sysApp.getApiCode())) + //这里用中台做为发送方 + .put("publicKey","ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj") + .put("secretKey","fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=") + .put("appId",String.valueOf(sysApp.getAppCode())) + .build(); + String body = HttpRequest.post("http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(headerMap).body(jsonStr).timeout(60000).execute().body(); + logger.info("调用中台返回的参数:{}",body); + return body; + } + } + return null; + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/service/impl/SeeyonExtServiceImpl.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/service/impl/SeeyonExtServiceImpl.java new file mode 100644 index 00000000..9849bb40 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/service/impl/SeeyonExtServiceImpl.java @@ -0,0 +1,241 @@ +package com.hzya.frame.seeyon.service.impl; + +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.hzya.frame.seeyon.entity.OAWorkflowEventDataEntity; +import com.hzya.frame.seeyon.service.ISeeyonExtService; +import com.hzya.frame.seeyon.util.OAU8Util; +import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity; +import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity; +import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService; +import com.hzya.frame.sysnew.messageManageLog.entity.SysMessageManageLogEntity; +import com.hzya.frame.sysnew.messageManageLog.entity.SysMessageManageLogStatusEnum; +import com.hzya.frame.uuid.UUIDLong; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +/** + * @Description seeyon扩展类 + * @Author xiangerlin + * @Date 2024/5/14 14:04 + **/ +@Service(value = "seeyonExt") +public class SeeyonExtServiceImpl implements ISeeyonExtService { + + + Logger logger = LogManager.getLogger(getClass()); + + @Autowired + private IIntegrationTaskLivingDetailsService taskLivingDetailsService; + + /** + * 英德赛 OA档案传U8 + * 根据不同formApp来调U8不同接口 + * @Since 3.0 + * @param entity + * @return + */ + @Override + public SysExtensionApiEntity ydcSeeyon2u8(SysExtensionApiEntity entity) { + String bodys = entity.getBodys(); + if (StrUtil.isNotEmpty(bodys)){ + try { + OAWorkflowEventDataEntity dataEntity = JSON.parseObject(bodys,OAWorkflowEventDataEntity.class); + String businessDataStr = dataEntity.getBusinessDataStr();//oa表单参数 + JSONObject businessData = JSON.parseObject(businessDataStr); + String formApp = dataEntity.getFormApp(); + SysExtensionApiEntity param = new SysExtensionApiEntity(); + Map headerMap = entity.getHeaders(); + JSONObject hzyaExtData = dataEntity.getHzyaExtData();//扩展参数 + if (null == hzyaExtData){ + hzyaExtData = new JSONObject(); + } + //根据forApp组装不同参数 + switch (formApp){ + case "-8691606453890363968":// + hzyaExtData.put("billCode", "cunhuoabc123456"); + getInventory(businessData,param); + break; + case "6223456019738676230": + getSupplier(businessData,param,hzyaExtData); + break; + case "-9122508232154527168": + getCustomer(businessData,param,hzyaExtData); + break; + default: + param.setBodys("未匹配到表单!当前formID:"+ formApp); + logger.error("未匹配到表单!当前formID:"+formApp); + } + headerMap.put("hzyaExtData", JSON.toJSONString(hzyaExtData)); + return param; + }catch (Exception e){ + e.printStackTrace(); + logger.error("执行英德赛OA存货同步U8接口报错:{}", e); + } + } + return null; + } + + /** + * 回调方法 + * @Since 3.0 + * @param logEntity + */ + @Override + public void ydcSeeyon2u8CallBack(SysMessageManageLogEntity logEntity) { + + + //在这里记录日志 + JSONObject targetData = JSON.parseObject(logEntity.getTargetData());//这个对象里的body是 发送到u8的请求报文 + JSONObject sourceData = JSON.parseObject(logEntity.getSourceData()); + JSONObject sourceHeaders = sourceData.getJSONObject("header");//源数据header + JSONObject sourceBody = sourceData.getJSONObject("body");//源数据body + JSONObject hzyaExtData = sourceHeaders.getJSONObject("hzyaExtData"); + JSONArray formMainIds = new JSONArray(); + formMainIds.add(sourceBody.getString("id")); + JSONObject param = new JSONObject(); + String formApp = sourceBody.getString("formApp"); + param.put("formAppId",formApp); + param.put("formMainIds",formMainIds); + param.put("dataSourceCode","ht_oa_sqlserver"); + param.put("eventType",sourceBody.getString("eventType")); + + //把返回的单号更新到oa档案表 + String sql = ""; + switch (formApp){ + case "-8691606453890363968"://存货 + sql = ""; + break; + case "6223456019738676230"://供应商 + sql = "update formmain_0229 set field0002 = '' where field0001 = "+hzyaExtData.getString("billCode"); + break; + case "-9122508232154527168"://客户 + sql = "update formmain_0230 set field0002 = '' where field0001 = "+hzyaExtData.getString("billCode"); + break; + } + IntegrationTaskLivingDetailsEntity logDetails = new IntegrationTaskLivingDetailsEntity(); + logDetails.setRootAppPk(JSON.toJSONString(param)); + logDetails.setRootAppBill(hzyaExtData.getString("billCode")); + logDetails.setNewTransmitInfo(logEntity.getReturnData()); + logDetails.setNewPushDate(new Date()); + logDetails.setRootAppNewData(targetData.getString("body")); + //logDetails.setNewState(SysMessageManageLogStatusEnum.statusGetValue(logEntity.getStatus())); + logDetails.setPluginId("SeeyonExtPlugin"); + try { + if (StrUtil.isEmpty(hzyaExtData.getString("integration_task_living_details_id"))){ + if (SysMessageManageLogStatusEnum.SUCCESS.getType().equals(logEntity.getStatus())) {//成功 + taskLivingDetailsService.saveLogToSuccess(logDetails); + }else { + taskLivingDetailsService.saveLogToFail(logDetails);//失败 + } + }else { + logDetails.setId(hzyaExtData.getString("integration_task_living_details_id")); + if (SysMessageManageLogStatusEnum.SUCCESS.getType().equals(logEntity.getStatus())) {//成功 + taskLivingDetailsService.saveLogFailToSuccess(logDetails); + }else { + taskLivingDetailsService.updateLogFailToSuccess(logDetails);//失败 + } + } + }catch (Exception e){ + logger.error("保存日志出错:{}",e); + } + } + + //存货参数组装 + private SysExtensionApiEntity getInventory(JSONObject businessData,SysExtensionApiEntity param){ + if (null != businessData){ + JSONObject formmain0227 = businessData.getJSONObject("formmain_0227"); + JSONArray formson0228Arr = businessData.getJSONArray("formson_0228"); + for (int i=0; i< formson0228Arr.size(); i++){ + JSONObject formson0228 = formson0228Arr.getJSONObject(i); + JSONObject jsonObject = new JSONObject(); + jsonObject.put("Token", "Hzya1314_CheckSkip"); + jsonObject.put("billid", formson0228.getString("id")); + jsonObject.put("AccId", formmain0227.getString("field0015")); + + JSONObject oArchives = new JSONObject(); + oArchives.put("cInvCode", formson0228.getString("field0002")); + oArchives.put("cInvCCode", formson0228.getString("field0005")); + oArchives.put("cInvName", formson0228.getString("field0003")); + //todo 这个没值 + oArchives.put("cGroupCode", "01"); + oArchives.put("cComUnitCode", formson0228.getString("field0006")); + + jsonObject.put("oArchives", oArchives); + param.setBodys(JSON.toJSONString(jsonObject)); + } + } + return param; + } + //供应商参数组装 + private SysExtensionApiEntity getSupplier(JSONObject businessData,SysExtensionApiEntity param,JSONObject hzyaExtData){ + if (null != businessData){ + JSONObject formmain0225 = businessData.getJSONObject("formmain_0225"); + JSONObject jsonObject = new JSONObject(); + jsonObject.put("billid", formmain0225.getString("id")); + jsonObject.put("AccId", formmain0225.getString("field0020")); + jsonObject.put("Token", OAU8Util.getToken()); + JSONObject oArchives = new JSONObject(); + oArchives.put("cVenCode", formmain0225.getString("field0002")); + oArchives.put("cVenName ", formmain0225.getString("field0003")); + oArchives.put("cVenAbbName", formmain0225.getString("field0004")); + oArchives.put("cVCCode", formmain0225.getString("field0006")); + oArchives.put("cVenExch_name", formmain0225.getString("field0010")); + //oArchives.put("bVenTax", "false"); + //oArchives.put("bLicenceDate", "false"); + //oArchives.put("bBusinessDate", "false"); + //oArchives.put("bProxyDate", "false"); + //oArchives.put("bPassGMP", "false"); + //oArchives.put("bVenCargo", "false"); + //oArchives.put("bProxyForeign", "true"); + //oArchives.put("bVenService", "true"); + //oArchives.put("iVenGSPType", "0"); + //oArchives.put("bVenOverseas", "false"); + //oArchives.put("bVenAccPeriodMng", "false"); + //oArchives.put("bVenHomeBranch", "false"); + oArchives.put("dVenCreateDatetime", DateUtil.now()); + oArchives.put("cVenRegCode", formmain0225.getString("field0009")); + oArchives.put("cVenBank", formmain0225.getString("field0011")); + oArchives.put("cVenAccount", formmain0225.getString("field0012")); + jsonObject.put("oArchives", oArchives); + param.setBodys(JSON.toJSONString(jsonObject)); + hzyaExtData.put("billCode", formmain0225.getString("field0001")); + hzyaExtData.put("formmainId", formmain0225.getString("id")); + } + return param; + } + //客户参数组装 + private SysExtensionApiEntity getCustomer(JSONObject businessData,SysExtensionApiEntity param,JSONObject hzyaExtData){ + if (null != businessData){ + JSONObject formmain0226 = businessData.getJSONObject("formmain_0226"); + JSONObject jsonObject = new JSONObject(); + jsonObject.put("billid", formmain0226.getString("id")); + jsonObject.put("AccId", formmain0226.getString("field0025")); + jsonObject.put("Token", "Hzya1314_CheckSkip"); + + JSONObject oArchives = new JSONObject(); + oArchives.put("cCusCode", formmain0226.getString("field0002")); + oArchives.put("cCusName", formmain0226.getString("field0007")); + oArchives.put("cCusAbbName", formmain0226.getString("field0008")); + oArchives.put("cCCCode", formmain0226.getString("field0012")); + oArchives.put("cCusExch_name", formmain0226.getString("field0013")); + // todo 这个字段没值 + oArchives.put("cCusMngTypeCode", "999"); + + jsonObject.put("oArchives", oArchives); + param.setBodys(JSON.toJSONString(jsonObject)); + hzyaExtData.put("billCode",formmain0226.getString("field0001")); + hzyaExtData.put("formmainId",formmain0226.getString("id")); + } + return param; + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/util/OABipUtil.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/util/OABipUtil.java new file mode 100644 index 00000000..9484e2fb --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/util/OABipUtil.java @@ -0,0 +1,65 @@ +package com.hzya.frame.seeyon.util; + +import cn.hutool.core.util.StrUtil; +import cn.hutool.http.HttpRequest; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; + +/** + * com.hzya.frame.bip.v3.v2207.util + * + * @author makejava + * @date 2024-05 -30 14:20 + */ + +public class OABipUtil { + /** + * + * @content 发送单据到BIP系统 + * @author laborer + * @date 2024/6/21 0021 10:51 + * + */ + + public static String sendU9cTOBipEsb(String parm, String apiCode,String token){ + String baseUrl = "http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface"; + System.out.println("推送参数"+parm); + String result = HttpRequest.post(baseUrl) + .header("appId", "800023")//头信息,多个头信息多次调用此方法即可 + .header("access_token", token)//头信息,多个头信息多次调用此方法即可 + .header("apiCode", apiCode)//头信息,多个头信息多次调用此方法即可 + .header("publicKey", "ZJYA1vBeY1ai53iNmbAEsw6DImjkXGBkdMailxcBdliFC85Ce7eDIk+3zDUT+v578prj")//头信息,多个头信息多次调用此方法即可 + .header("secretKey", "7Gp6OjHrIaQ6R3tXGPrI4morjQyWL+qu4JJschQnkBRtv26VDgGFVYKOy5kMZfd/j3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//头信息,多个头信息多次调用此方法即可 + .body(parm)//表单内容 + .timeout(20000)//超时,毫秒 + .execute().body(); + System.out.println("返回参数"+result); + if(StrUtil.isNotEmpty(result)){ + return analytic(result); + } + return null; + } + public static String getBipToken(String userCode, String apiCode){ + String baseUrl = "http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface"; + String result = HttpRequest.post(baseUrl) + .header("appId", "800023")//头信息,多个头信息多次调用此方法即可 + .header("apiCode", apiCode)//头信息,多个头信息多次调用此方法即可 + .header("usercode", userCode)//头信息,多个头信息多次调用此方法即可 + .header("publicKey", "ZJYA1vBeY1ai53iNmbAEsw6DImjkXGBkdMailxcBdliFC85Ce7eDIk+3zDUT+v578prj")//头信息,多个头信息多次调用此方法即可 + .header("secretKey", "7Gp6OjHrIaQ6R3tXGPrI4morjQyWL+qu4JJschQnkBRtv26VDgGFVYKOy5kMZfd/j3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//头信息,多个头信息多次调用此方法即可 + .body("")//表单内容 + .timeout(20000)//超时,毫秒 + .execute().body(); + System.out.println("返回参数"+result); + if(StrUtil.isNotEmpty(result)){ + JSONObject obj = JSON.parseObject( analytic(result)); + JSONObject data = obj.getJSONObject("data"); + return data.getString("access_token"); + } + return null; + } + public static String analytic(String parm){ + JSONObject main = JSON.parseObject(parm); + return main.getString("attribute"); + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/util/OAPayState.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/util/OAPayState.java new file mode 100644 index 00000000..3fdfac15 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/util/OAPayState.java @@ -0,0 +1,73 @@ +package com.hzya.frame.seeyon.util; + +/** + * @Author:hecan + * @Description:支付类型(支付状态) + * @params: + * @return: + * @Date: 2023/3/14 15:05 + */ +public enum OAPayState { + a("a","待提交直联"), + b("b","已提交直联"), + c("c","银行已受理"), + d("d","银行未受理"), + e("e","可疑"), + f("f","待人工确认"), + g("g","支付成功"), + h("h","支付失败"), + i("i","部分成功"), + j("j","退票"), + k("k","取消支付"), + n("n","其他"), + p("p","支付中"), + q("q","待支付"), + one("1","待处理"), + two("2","审批中"), + three("3","处理失败"), + four("4","审批完成"), + five("5","审批撤销"), + six("6","审批拒绝"), + seven("7","待发送审批"), + eight("8","集中受理中"), + nine("9","审批退回"), + ten("10","预处理中"), + eleven("11","预处理拒绝"), + twelve("12","资金监控审批中"); + + + //类型 + private String type; + //值 + private String value; + + OAPayState(String type, String value){ + this.type=type; + this.value=value; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public static String payStateGetValue(String type){ + for (OAPayState payState : OAPayState.values()){ + if(payState.getType()==type||payState.getType().equals(type)){ + return payState.getValue().toString(); + } + } + return null; + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/util/OARestUtil.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/util/OARestUtil.java new file mode 100644 index 00000000..84b42102 --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/util/OARestUtil.java @@ -0,0 +1,209 @@ +package com.hzya.frame.seeyon.util; + +import cn.hutool.core.util.StrUtil; +import cn.hutool.http.HttpRequest; +import cn.hutool.http.HttpUtil; +import cn.hutool.json.JSONUtil; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.hzya.frame.seeyon.entity.CollAttachmentResDTO; +import com.hzya.frame.sysnew.application.api.entity.SysApplicationApiEntity; +import com.hzya.frame.sysnew.application.api.service.ISysApplicationApiService; +import com.hzya.frame.web.exception.BaseSystemException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import java.io.File; +import java.util.HashMap; +import java.util.List; + +/** + * @Description 致远rest接口工具类 + * @Author xiangerlin + * @Date 2024/6/17 15:49 + **/ +@Component +public class OARestUtil { + @Autowired + private ISysApplicationApiService sysApplicationApiService; + static Logger logger = LoggerFactory.getLogger(OARestUtil.class); + + private OARestUtil() { + } + + + /** + * 附件上传 + * @param file 附件对象 + * @param api_code 接口编码 + * @return + */ + public JSONObject fileUpload(File file,String api_code) { + if (StrUtil.isNotEmpty(api_code)){ + //1、查询附件上传api接口信息 + SysApplicationApiEntity sysApp = getByCode(api_code); + if (null != sysApp){ + String app_url = sysApp.getAppUrl(); + String url = app_url+"/seeyon/rest/attachment?token=@token@"; + String token = getToken(null,"8000240000"); + url = url.replaceAll("@token@",token); + HashMap paramMap = new HashMap<>(); + paramMap.put("file", file); + String result = HttpUtil.post(url, paramMap); + if (StrUtil.isNotBlank(result)) { + logger.info("附件上传结果"+result); + JSONObject jsonObject = JSONObject.parseObject(result); + String atts = jsonObject.get("atts").toString(); + if (StrUtil.isNotEmpty(atts)) { + JSONArray jsonArray = JSONArray.parseArray(atts); + JSONObject res = (JSONObject) jsonArray.get(0); + return res; + } + } + } + }else { + throw new BaseSystemException("api_code不能为空"); + } + return null; + } + + /*** + * 查询协同附件列表 + * @param summaryId col_summary表id + * @param attType 0代表附件,2代表关联文档,“0,2”代表附件和关联文档 + * @param apiCode 接口编码 + * @return + */ + public List getColAttachments(String summaryId,String attType,String apiCode,String loginName){ + if (StrUtil.isNotEmpty(summaryId) && StrUtil.isNotEmpty(apiCode)){ + SysApplicationApiEntity sysApp = getByCode(apiCode); + String token = getToken(loginName,sysApp); + String appUrl = StrUtil.removeSuffix(sysApp.getAppUrl(),"/"); + if (StrUtil.isEmpty(attType)){ + attType = "0"; + } + String url = "/seeyon/rest/coll/attachments/@SummaryID@/@attType@"; + url = url.replaceAll("@SummaryID@",summaryId).replaceAll("@attType@",attType); + String body = HttpRequest.get(appUrl + url).header("token", token).execute().body(); + if (StrUtil.isNotEmpty(body) && JSONUtil.isTypeJSON(body)){ + List list = JSON.parseArray(body,CollAttachmentResDTO.class); + return list; + } + } + return null; + } + + /** + * 附件下载 + * @param loginName oa登录名 + * @param apiCode 接口编码 + * @param fileId 附件id + * @param fileName 附件名 + * @return 附件字节数组 + */ + public byte[] downloadFileBytes(String loginName,String apiCode,String fileId,String fileName){ + if (StrUtil.isNotEmpty(apiCode)){ + SysApplicationApiEntity sysApp = getByCode(apiCode); + String token = getToken(loginName,sysApp); + String appUrl = StrUtil.removeSuffix(sysApp.getAppUrl(),"/"); + String url = "/seeyon/rest/attachment/file/@ctp_file_ID@?fileName=@文件名@&token=@token@"; + url = url.replaceAll("@ctp_file_ID@",fileId).replaceAll("@文件名@",fileName).replaceAll("@token@",token); + byte[] bytes = HttpUtil.downloadBytes(appUrl + url); + return bytes; + } + return null; + } + + + /** + * 附件下载 + * @param loginName oa登录名 + * @param apiCode 接口编码 + * @param fileId 附件id + * @param fileName 附件名 + * @param token + * @return 附件字节数组 + */ + public byte[] downloadFileBytes(String loginName,String apiCode,String fileId,String fileName,String token){ + if (StrUtil.isNotEmpty(apiCode)){ + SysApplicationApiEntity sysApp = getByCode(apiCode); + if (StrUtil.isEmpty(token)){ + token = getToken(loginName,sysApp); + } + String appUrl = StrUtil.removeSuffix(sysApp.getAppUrl(),"/"); + String url = "/seeyon/rest/attachment/file/@ctp_file_ID@?fileName=@文件名@&token=@token@"; + url = url.replaceAll("@ctp_file_ID@",fileId).replaceAll("@文件名@",fileName).replaceAll("@token@",token); + byte[] bytes = HttpUtil.downloadBytes(appUrl + url); + return bytes; + } + return null; + } + /** + * 获取token + * @param login_name + * @param api_code + * @return + */ + public String getToken(String login_name,String api_code){ + if (StrUtil.isNotEmpty(api_code)){ + SysApplicationApiEntity sysApp = getByCode(api_code); + return getToken(login_name,sysApp); + }else { + throw new BaseSystemException("api_code不能为空"); + } + } + + /** + * 获取token + * @param login_name oa登录名 + * @param sysApp 应用信息 + * @return + */ + public String getToken(String login_name,SysApplicationApiEntity sysApp){ + if (null != sysApp){ + HashMap hashMap = new HashMap<>(); + String app_url = StrUtil.removeSuffix(sysApp.getAppUrl(), "/"); + String url = app_url+"/seeyon/rest/token"; + String headerIn = sysApp.getHeaderIn(); + JSONArray headers = JSON.parseArray(headerIn); + for (int i = 0; i < headers.size(); i++) { + JSONObject object1 = headers.getJSONObject(i); + String parameterName = object1.getString("parameterName"); + if ("userName".equals(parameterName) || "password".equals(parameterName) || "loginName".equals(parameterName)){ + String example = object1.getString("example"); + hashMap.put(parameterName,example); + } + } + login_name = hashMap.get("loginName"); + if (StrUtil.isEmpty(login_name)){ + hashMap.put("loginName","hzya"); + } + String result = HttpRequest.post(url).body(JSON.toJSONString(hashMap)).execute().body(); + JSONObject jsonObject = JSONObject.parseObject(result); + if (null != jsonObject) { + logger.info("======token:{}======" ,jsonObject.getString("id")); + return jsonObject.getString("id"); + } + } + return null; + } + private SysApplicationApiEntity getByCode(String api_code){ + if (StrUtil.isNotEmpty(api_code)){ + SysApplicationApiEntity sysApp = new SysApplicationApiEntity(); + sysApp.setApiCode(Long.valueOf(api_code)); + sysApp = sysApplicationApiService.queryOne(sysApp); + if (null != sysApp && StrUtil.isNotEmpty(sysApp.getId())){ + sysApp = sysApplicationApiService.get(sysApp.getId()); + if (null != sysApp){ + return sysApp; + } + } + }else { + throw new BaseSystemException("api_code不能为空"); + } + return null; + } +} diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/util/OAU8Util.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/util/OAU8Util.java new file mode 100644 index 00000000..76decc6d --- /dev/null +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/util/OAU8Util.java @@ -0,0 +1,34 @@ +package com.hzya.frame.seeyon.util; + +import cn.hutool.core.util.StrUtil; +import cn.hutool.http.HttpRequest; +import com.alibaba.fastjson.JSONObject; +import com.hzya.frame.seeyon.entity.OAU8ResponseDTO; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * @Description + * @Author xiangerlin + * @Date 2024/5/14 15:30 + **/ +public class OAU8Util { + + static Logger logger = LogManager.getLogger(OAU8Util.class); + + //获取token + public static String getToken() { + String url = "http://127.0.0.1:51910/Api/Base/GetToken"; + JSONObject jsonObject = new JSONObject(); + jsonObject.put("secretkey", "L1NhkDrQhtBDzTxFxPI0jxWcBzTBSPvaI5xZusRRi9ofS9d6ngxrj1erwbdjxtUT"); + logger.info("获取U8token参数:{}", jsonObject.toJSONString()); + String token = HttpRequest.post( url).body(jsonObject.toJSONString()).timeout(60000).execute().body(); + logger.info("token返回参数:{}", jsonObject.toJSONString()); + if (StrUtil.isNotEmpty(token)) { + OAU8ResponseDTO u8ResponseDTO = JSONObject.parseObject(token, OAU8ResponseDTO.class); + return u8ResponseDTO.getMessage(); + } + return token; + + } +} diff --git a/fw-oa/src/main/webapp/WEB-INF/web.xml b/fw-oa/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 00000000..d80081d1 --- /dev/null +++ b/fw-oa/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index fc53bd54..1d2115b9 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ - + fw-oa From 2537ece2b13ee336865bb1307b858bdb8a2051ce Mon Sep 17 00:00:00 2001 From: lvleigang <957075182@qq.com> Date: Sat, 14 Sep 2024 10:17:59 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fw-u8c=E5=88=86=E6=94=AF=E7=BB=93=E6=9E=84?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- base-webapp/pom.xml | 10 +- fw-u8c/pom.xml | 48 + .../Encapsulation/dao/IEncapsulationDao.java | 19 + .../dao/impl/EncapsulationDaoImpl.java | 30 + .../entity/EncapsulationEntity.java | 53 + .../entity/EncapsulationEntity.xml | 23 + .../service/IEncapsulationService.java | 104 ++ .../service/impl/EncapsulationImpl.java | 1320 +++++++++++++++++ .../u8c/Invmandoc/dao/IBdInvmandocDao.java | 22 + .../dao/impl/BdInvmandocDaoImpl.java | 25 + .../Invmandoc/entity/BdInvmandocEntity.java | 69 + .../Invmandoc/entity/BdInvmandocEntity.xml | 37 + .../service/IBdInvmandocService.java | 13 + .../service/impl/BdInvmandocServiceImpl.java | 29 + .../com/hzya/frame/u8c/ax/dao/IAxDao.java | 24 + .../hzya/frame/u8c/ax/dao/impl/AxDaoImpl.java | 42 + .../frame/u8c/ax/entity/ArchivesEntity.java | 188 +++ .../frame/u8c/ax/entity/ArchivesEntity.xml | 207 +++ .../com/hzya/frame/u8c/ax/entity/Ass.java | 24 + .../hzya/frame/u8c/ax/entity/Cashflow.java | 23 + .../com/hzya/frame/u8c/ax/entity/Voucher.java | 69 + .../frame/u8c/ax/entity/VoucherDetails.java | 105 ++ .../hzya/frame/u8c/ax/entity/VoucherRoot.java | 14 + .../hzya/frame/u8c/ax/service/IAxService.java | 41 + .../u8c/ax/service/impl/AxServiceImpl.java | 836 +++++++++++ .../u8c/bdCumandoc/dao/IBdCumandocDao.java | 26 + .../dao/impl/BdCumandocDaoImpl.java | 26 + .../bdCumandoc/entity/BdCumandocEntity.java | 874 +++++++++++ .../bdCumandoc/entity/BdCumandocEntity.xml | 212 +++ .../hzya/frame/u8c/bdcorp/dao/IBdCorpDao.java | 40 + .../u8c/bdcorp/dao/impl/BdCorpDaoImpl.java | 36 + .../frame/u8c/bdcorp/entity/BdCorpEntity.java | 51 + .../frame/u8c/bdcorp/entity/BdCorpEntity.xml | 35 + .../u8c/bdcorp/service/IBdCorpService.java | 36 + .../service/impl/BdCorpServiceImpl.java | 54 + .../com/hzya/frame/u8c/util/U8cHttpUtil.java | 47 + fw-u8c/src/main/webapp/WEB-INF/web.xml | 6 + pom.xml | 2 +- 38 files changed, 4814 insertions(+), 6 deletions(-) create mode 100644 fw-u8c/pom.xml create mode 100644 fw-u8c/src/main/java/com/hzya/frame/u8c/Encapsulation/dao/IEncapsulationDao.java create mode 100644 fw-u8c/src/main/java/com/hzya/frame/u8c/Encapsulation/dao/impl/EncapsulationDaoImpl.java create mode 100644 fw-u8c/src/main/java/com/hzya/frame/u8c/Encapsulation/entity/EncapsulationEntity.java create mode 100644 fw-u8c/src/main/java/com/hzya/frame/u8c/Encapsulation/entity/EncapsulationEntity.xml create mode 100644 fw-u8c/src/main/java/com/hzya/frame/u8c/Encapsulation/service/IEncapsulationService.java create mode 100644 fw-u8c/src/main/java/com/hzya/frame/u8c/Encapsulation/service/impl/EncapsulationImpl.java create mode 100644 fw-u8c/src/main/java/com/hzya/frame/u8c/Invmandoc/dao/IBdInvmandocDao.java create mode 100644 fw-u8c/src/main/java/com/hzya/frame/u8c/Invmandoc/dao/impl/BdInvmandocDaoImpl.java create mode 100644 fw-u8c/src/main/java/com/hzya/frame/u8c/Invmandoc/entity/BdInvmandocEntity.java create mode 100644 fw-u8c/src/main/java/com/hzya/frame/u8c/Invmandoc/entity/BdInvmandocEntity.xml create mode 100644 fw-u8c/src/main/java/com/hzya/frame/u8c/Invmandoc/service/IBdInvmandocService.java create mode 100644 fw-u8c/src/main/java/com/hzya/frame/u8c/Invmandoc/service/impl/BdInvmandocServiceImpl.java create mode 100644 fw-u8c/src/main/java/com/hzya/frame/u8c/ax/dao/IAxDao.java create mode 100644 fw-u8c/src/main/java/com/hzya/frame/u8c/ax/dao/impl/AxDaoImpl.java create mode 100644 fw-u8c/src/main/java/com/hzya/frame/u8c/ax/entity/ArchivesEntity.java create mode 100644 fw-u8c/src/main/java/com/hzya/frame/u8c/ax/entity/ArchivesEntity.xml create mode 100644 fw-u8c/src/main/java/com/hzya/frame/u8c/ax/entity/Ass.java create mode 100644 fw-u8c/src/main/java/com/hzya/frame/u8c/ax/entity/Cashflow.java create mode 100644 fw-u8c/src/main/java/com/hzya/frame/u8c/ax/entity/Voucher.java create mode 100644 fw-u8c/src/main/java/com/hzya/frame/u8c/ax/entity/VoucherDetails.java create mode 100644 fw-u8c/src/main/java/com/hzya/frame/u8c/ax/entity/VoucherRoot.java create mode 100644 fw-u8c/src/main/java/com/hzya/frame/u8c/ax/service/IAxService.java create mode 100644 fw-u8c/src/main/java/com/hzya/frame/u8c/ax/service/impl/AxServiceImpl.java create mode 100644 fw-u8c/src/main/java/com/hzya/frame/u8c/bdCumandoc/dao/IBdCumandocDao.java create mode 100644 fw-u8c/src/main/java/com/hzya/frame/u8c/bdCumandoc/dao/impl/BdCumandocDaoImpl.java create mode 100644 fw-u8c/src/main/java/com/hzya/frame/u8c/bdCumandoc/entity/BdCumandocEntity.java create mode 100644 fw-u8c/src/main/java/com/hzya/frame/u8c/bdCumandoc/entity/BdCumandocEntity.xml create mode 100644 fw-u8c/src/main/java/com/hzya/frame/u8c/bdcorp/dao/IBdCorpDao.java create mode 100644 fw-u8c/src/main/java/com/hzya/frame/u8c/bdcorp/dao/impl/BdCorpDaoImpl.java create mode 100644 fw-u8c/src/main/java/com/hzya/frame/u8c/bdcorp/entity/BdCorpEntity.java create mode 100644 fw-u8c/src/main/java/com/hzya/frame/u8c/bdcorp/entity/BdCorpEntity.xml create mode 100644 fw-u8c/src/main/java/com/hzya/frame/u8c/bdcorp/service/IBdCorpService.java create mode 100644 fw-u8c/src/main/java/com/hzya/frame/u8c/bdcorp/service/impl/BdCorpServiceImpl.java create mode 100644 fw-u8c/src/main/java/com/hzya/frame/u8c/util/U8cHttpUtil.java create mode 100644 fw-u8c/src/main/webapp/WEB-INF/web.xml diff --git a/base-webapp/pom.xml b/base-webapp/pom.xml index 79bd4cf9..e0652fb6 100644 --- a/base-webapp/pom.xml +++ b/base-webapp/pom.xml @@ -65,11 +65,11 @@ - - - - - + + com.hzya.frame + fw-u8c + ${revision} + diff --git a/fw-u8c/pom.xml b/fw-u8c/pom.xml new file mode 100644 index 00000000..cfb6c532 --- /dev/null +++ b/fw-u8c/pom.xml @@ -0,0 +1,48 @@ + + + + kangarooDataCenterV3 + com.hzya.frame + ${revision} + + 4.0.0 + fw-u8c + jar + ${revision} + + + + com.hzya.frame + base-service + ${revision} + + + mysql + mysql-connector-java + ${mysql-connector-java} + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + none + execute + true + + + + + repackage + + + + + + + diff --git a/fw-u8c/src/main/java/com/hzya/frame/u8c/Encapsulation/dao/IEncapsulationDao.java b/fw-u8c/src/main/java/com/hzya/frame/u8c/Encapsulation/dao/IEncapsulationDao.java new file mode 100644 index 00000000..77f0a933 --- /dev/null +++ b/fw-u8c/src/main/java/com/hzya/frame/u8c/Encapsulation/dao/IEncapsulationDao.java @@ -0,0 +1,19 @@ +package com.hzya.frame.u8c.Encapsulation.dao; + + +import com.hzya.frame.basedao.dao.IBaseDao; +import com.hzya.frame.u8c.Encapsulation.entity.EncapsulationEntity; + +import java.util.List; + +/** + * (bd_corp: table)表数据库访问层 + * + * @author makejava + * @since 2023-09-06 14:47:17 + */ +public interface IEncapsulationDao extends IBaseDao { + + List queryCgrkddh(EncapsulationEntity encapsulationEntity); +} + diff --git a/fw-u8c/src/main/java/com/hzya/frame/u8c/Encapsulation/dao/impl/EncapsulationDaoImpl.java b/fw-u8c/src/main/java/com/hzya/frame/u8c/Encapsulation/dao/impl/EncapsulationDaoImpl.java new file mode 100644 index 00000000..ba6b6997 --- /dev/null +++ b/fw-u8c/src/main/java/com/hzya/frame/u8c/Encapsulation/dao/impl/EncapsulationDaoImpl.java @@ -0,0 +1,30 @@ +package com.hzya.frame.u8c.Encapsulation.dao.impl; + +import com.baomidou.dynamic.datasource.annotation.DS; +import com.hzya.frame.basedao.dao.MybatisGenericDao; +import com.hzya.frame.u8c.Encapsulation.dao.IEncapsulationDao; +import com.hzya.frame.u8c.Encapsulation.entity.EncapsulationEntity; +import org.springframework.stereotype.Repository; + +import java.util.List; + + +/** + * (BdCorp)表数据库访问层 + * + * @author makejava + * @since 2023-09-06 14:47:17 + */ +@Repository("encapsulationDaoImpl") +public class EncapsulationDaoImpl extends MybatisGenericDao implements IEncapsulationDao { + + @DS("#entity.dataSourceCode") + @Override + public List queryCgrkddh(EncapsulationEntity entity) { + List o = (List) super.selectList(getSqlIdPrifx() + "queryCgrkddh", entity); + return o; + } + + +} + diff --git a/fw-u8c/src/main/java/com/hzya/frame/u8c/Encapsulation/entity/EncapsulationEntity.java b/fw-u8c/src/main/java/com/hzya/frame/u8c/Encapsulation/entity/EncapsulationEntity.java new file mode 100644 index 00000000..8dfd22a0 --- /dev/null +++ b/fw-u8c/src/main/java/com/hzya/frame/u8c/Encapsulation/entity/EncapsulationEntity.java @@ -0,0 +1,53 @@ +package com.hzya.frame.u8c.Encapsulation.entity; + +import com.hzya.frame.web.entity.BaseEntity; + +/** + * (BdCorp)实体类 + * + * @author makejava + * @since 2023-09-06 14:47:18 + */ +public class EncapsulationEntity extends BaseEntity { + //单据号 + private String code; + //来源单据类型 + private String type; + //公司 + private String unitcode; + //单据类型 + private String cbilltypecode; + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getCbilltypecode() { + return cbilltypecode; + } + + public void setCbilltypecode(String cbilltypecode) { + this.cbilltypecode = cbilltypecode; + } + + public String getUnitcode() { + return unitcode; + } + + public void setUnitcode(String unitcode) { + this.unitcode = unitcode; + } +} + diff --git a/fw-u8c/src/main/java/com/hzya/frame/u8c/Encapsulation/entity/EncapsulationEntity.xml b/fw-u8c/src/main/java/com/hzya/frame/u8c/Encapsulation/entity/EncapsulationEntity.xml new file mode 100644 index 00000000..1933d3d3 --- /dev/null +++ b/fw-u8c/src/main/java/com/hzya/frame/u8c/Encapsulation/entity/EncapsulationEntity.xml @@ -0,0 +1,23 @@ + + + + + + + + + diff --git a/fw-u8c/src/main/java/com/hzya/frame/u8c/Encapsulation/service/IEncapsulationService.java b/fw-u8c/src/main/java/com/hzya/frame/u8c/Encapsulation/service/IEncapsulationService.java new file mode 100644 index 00000000..c6605b4a --- /dev/null +++ b/fw-u8c/src/main/java/com/hzya/frame/u8c/Encapsulation/service/IEncapsulationService.java @@ -0,0 +1,104 @@ +package com.hzya.frame.u8c.Encapsulation.service; + +import com.alibaba.fastjson.JSONObject; +import com.hzya.frame.basedao.service.IBaseService; +import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity; +import com.hzya.frame.u8c.Encapsulation.entity.EncapsulationEntity; + +/** + * (BdCorp)表服务接口 + * + * @author makejava + * @since 2023-09-06 14:47:18 + */ +public interface IEncapsulationService extends IBaseService { + /** + * @Author lvleigang + * @Description 采购订单删除接口 + * 0、根据采购订单号查询入库单号,1、库存采购入库单取消签字,2、库存采购入库单删除,3、采购订单弃审,4、采购订单删除 + * @Date 9:44 上午 2024/9/4 + * @param jsonObject + * @return java.lang.Object + **/ + Object purchaseOrderDelete(JSONObject jsonObject); + SysExtensionApiEntity addPurchaseOrderDelete(SysExtensionApiEntity jsonObject); + + /** + * @Author lvleigang + * @Description 采购入库单删除接口 + * 1、库存采购入库单取消签字,2、库存采购入库单删除 + * @Date 9:44 上午 2024/9/4 + * @param jsonObject + * @return java.lang.Object + **/ + Object purchaseWarehousingDelete(JSONObject jsonObject); + SysExtensionApiEntity addPurchaseWarehousingDelete(SysExtensionApiEntity jsonObject); + + /** + * @Author lvleigang + * @Description 销售订单删除接口 + * 0、根据销售钉订单号查询出销售出库单号,1、库存销售出库单取消签字,2、库存销售出库单删除,3、销售订单取消审批,4、销售订单删除 + * @Date 9:44 上午 2024/9/4 + * @param jsonObject + * @return java.lang.Object + **/ + Object salesOrderDelete(JSONObject jsonObject); + SysExtensionApiEntity addSalesOrderDelete(SysExtensionApiEntity jsonObject); + + /** + * @Author lvleigang + * @Description 调拨订单删除接口 + * 0、根据调拨订单号查询调拨入库,调拨出库单据,1、库存调拨出库取消签字 2、库存调拨出库删除 3、调拨入库取消签字 4、调拨入库删除 5、调拨订单弃审 6、调拨订单删除 + * @Date 9:44 上午 2024/9/4 + * @param jsonObject + * @return java.lang.Object + **/ + Object transferOrderDelete(JSONObject jsonObject); + SysExtensionApiEntity addTransferOrderDelete(SysExtensionApiEntity jsonObject); + + /** + * @Author lvleigang + * @Description 产成品入库删除接口 + * 1、库存产成品入库单取消签字 2、库存产成品入库单删除 + * @Date 9:44 上午 2024/9/4 + * @param jsonObject + * @return java.lang.Object + **/ + Object finishedProductsAreStoredDelete(JSONObject jsonObject); + SysExtensionApiEntity addFinishedProductsAreStoredDelete(SysExtensionApiEntity jsonObject); + + /** + * @Author lvleigang + * @Description 材料出库删除接口 + * 1、库存材料出库取消签字 2、库存材料出库单删除 + * @Date 9:44 上午 2024/9/4 + * @param jsonObject + * @return java.lang.Object + **/ + Object materialDeliveryDelete(JSONObject jsonObject); + SysExtensionApiEntity addMaterialDeliveryDelete(SysExtensionApiEntity jsonObject); + + /** + * @Author lvleigang + * @Description 其他出库单删除接口 + * 1、库存其他出库取消签字 2、库存其他出库删除 + * @Date 9:44 上午 2024/9/4 + * @param jsonObject + * @return java.lang.Object + **/ + Object otherWarehouseOrdersDelete(JSONObject jsonObject); + SysExtensionApiEntity addOtherWarehouseOrdersDelete(SysExtensionApiEntity jsonObject); + + /** + * @Author lvleigang + * @Description 其他入库单删除接口 + * 1、库存其他入库单取消签字. 2、库存其他入库删除 + * @Date 9:44 上午 2024/9/4 + * @param jsonObject + * @return java.lang.Object + **/ + Object otherWarehouseReceiptDelete(JSONObject jsonObject); + SysExtensionApiEntity addOtherWarehouseReceiptDelete(SysExtensionApiEntity jsonObject); + + +} diff --git a/fw-u8c/src/main/java/com/hzya/frame/u8c/Encapsulation/service/impl/EncapsulationImpl.java b/fw-u8c/src/main/java/com/hzya/frame/u8c/Encapsulation/service/impl/EncapsulationImpl.java new file mode 100644 index 00000000..47f23d0b --- /dev/null +++ b/fw-u8c/src/main/java/com/hzya/frame/u8c/Encapsulation/service/impl/EncapsulationImpl.java @@ -0,0 +1,1320 @@ +package com.hzya.frame.u8c.Encapsulation.service.impl; + +import cn.hutool.json.JSONUtil; +import com.alibaba.fastjson.JSONObject; +import com.hzya.frame.basedao.service.impl.BaseService; +import com.hzya.frame.sysnew.application.database.dao.ISysApplicationDatabaseDao; +import com.hzya.frame.sysnew.application.database.entity.SysApplicationDatabaseEntity; +import com.hzya.frame.sysnew.application.entity.SysApplicationEntity; +import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity; +import com.hzya.frame.u8c.Encapsulation.dao.IEncapsulationDao; +import com.hzya.frame.u8c.Encapsulation.entity.EncapsulationEntity; +import com.hzya.frame.u8c.Encapsulation.service.IEncapsulationService; +import org.apache.http.HttpEntity; +import org.apache.http.client.config.RequestConfig; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.entity.ByteArrayEntity; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.util.EntityUtils; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; +import org.springframework.beans.factory.annotation.Autowired; + +import javax.annotation.Resource; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * (BdCorp)表服务实现类 + * + * @author makejava + * @since 2023-09-06 14:47:18 + */ +@Service("encapsulationImpl") +public class EncapsulationImpl extends BaseService implements IEncapsulationService { + + private IEncapsulationDao encapsulationDao; + + @Autowired + public void setEncapsulationDao(IEncapsulationDao dao) { + this.encapsulationDao = dao; + this.dao = dao; + } + @Resource + private ISysApplicationDatabaseDao sysApplicationDatabaseDao; + @Value("${zt.url}") + private String ztUrl; + private final Object lock = new Object(); + + /** + * @param object + * @return java.lang.Object + * @Author lvleigang + * @Description 采购订单删除接口 8000350080 + * 0、根据采购订单号查询入库单号,1、库存采购入库单取消签字 8000350061,2、库存采购入库单删除 8000350058,3、采购订单弃审 8000350059,4、采购订单删除 8000350056 + * + * @Date 9:44 上午 2024/9/4 + **/ + @Override + public Object purchaseOrderDelete(JSONObject object) { + JSONObject returnObject = new JSONObject(); + + JSONObject jsonObject = getData("jsonStr", object, JSONObject.class); + //判断是否存在参数 + if (!checkStr(jsonObject.getString("code"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "单据号为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("corp"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "公司为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("date_begin"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "单据开始日期为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("date_end"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "单据结束日期为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("coperator"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "操作员为空"); + return returnObject; + } + + if (!checkStr(jsonObject.getString("cgrkqxqz"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "库存采购入库单取消签字接口编号为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("cgrksc"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "库存采购入库单删除接口编号为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("cgddqs"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "采购订单弃审接口编号为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("cgddsc"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "采购订单删除接口编号为空"); + return returnObject; + } + + if (!checkStr(jsonObject.getString("dataSourceCode"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "数据源编码为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("publicKey"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "publicKey为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("secretKey"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "secretKey为空"); + return returnObject; + } + //根据采购订单号查询入库单号 + EncapsulationEntity encapsulationEntity = new EncapsulationEntity(); + encapsulationEntity.setCode(jsonObject.getString("code")); + encapsulationEntity.setDataSourceCode(jsonObject.getString("dataSourceCode")); + encapsulationEntity.setType("21"); + List encapsulationEntities = encapsulationDao.queryCgrkddh(encapsulationEntity); + if(encapsulationEntities == null || encapsulationEntities.size() != 1){ + returnObject.put("status", "falied"); + returnObject.put("errormsg", "查到多条采购入库单"); + return returnObject; + } + //执行库存采购入库单取消签字接口 + String cgrkdqxqz = getsendBody("1", jsonObject, encapsulationEntities.get(0).getCode(),encapsulationEntities.get(0).getUnitcode()); + boolean cgrkdqxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgrkqxqz"), jsonObject.getString("cgrkqxqz").substring(0,6), cgrkdqxqz); + if (!cgrkdqxqzflag) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "采购入库单取消签字失败"); + return returnObject; + } + //执行库存采购入库单删除 + String cgrkdsc = getsendBody("2", jsonObject, encapsulationEntities.get(0).getCode(),encapsulationEntities.get(0).getUnitcode()); + boolean cgrkdscfiag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgrksc"), jsonObject.getString("cgrksc").substring(0,6), cgrkdsc); + if (!cgrkdscfiag) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "采购入库单删除失败"); + return returnObject; + } + //执行采购订单弃审 + String cgddqs = getsendBody("3", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp")); + boolean cgddqsflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgddqs"), jsonObject.getString("cgddqs").substring(0,6), cgddqs); + if (!cgddqsflag) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "采购订单弃审失败"); + return returnObject; + } + //执行采购订单删除 + String cgddsc = getsendBody("4", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp")); + boolean cgddscflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgddsc"), jsonObject.getString("cgddsc").substring(0,6), cgddsc); + if (cgddscflag) { + returnObject.put("status", "success"); + returnObject.put("errormsg", "采购订单删除成功"); + return returnObject; + } else { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "采购订单删除失败"); + return returnObject; + } + } + /** + * @param entity + * @return com.hzya.frame.web.entity.JsonResultEntity + * @Author lvleigang + * @Description 数据表 + * @Date 11:52 上午 2024/3/27 + **/ + @Override + public SysExtensionApiEntity addPurchaseOrderDelete(SysExtensionApiEntity entity) { + try { + Map headers = entity.getHeaders(); + SysApplicationEntity applicationEntity = entity.getReceiveApp(); + SysApplicationDatabaseEntity sysApplicationDatabaseEntity = new SysApplicationDatabaseEntity(); + sysApplicationDatabaseEntity.setSts("Y"); + sysApplicationDatabaseEntity.setDbStatus("1"); + sysApplicationDatabaseEntity.setAppId(applicationEntity.getId()); + sysApplicationDatabaseEntity.setDataSourceCode("master"); + List sysDataSourceEntities = sysApplicationDatabaseDao.queryDSBase(sysApplicationDatabaseEntity); + if(sysDataSourceEntities != null && sysDataSourceEntities.size() > 0){ + String parm = entity.getBodys(); + JSONObject jsonObject = JSONObject.parseObject(parm); + jsonObject.put("dataSourceCode",sysDataSourceEntities.get(0).getSourceCode()); + jsonObject.put("publicKey",entity.getSendApp().getPublicKey()); + jsonObject.put("secretKey",entity.getSendApp().getSecretKey()); + + jsonObject.put("cgrkqxqz",headers.get("cgrkqxqz")); + jsonObject.put("cgrksc",headers.get("cgrksc")); + jsonObject.put("cgddqs",headers.get("cgddqs")); + jsonObject.put("cgddsc",headers.get("cgddsc")); + entity.setBodys(jsonObject.toJSONString()); + } + } catch (Exception e) { + e.printStackTrace(); + } + return entity; + } + /** + * @param object + * @return java.lang.Object + * @Author lvleigang + * @Description 采购入库单删除接口 8000350081 + * 1、库存采购入库单取消签字 8000350061,2、库存采购入库单删除 8000350058 + * @Date 9:44 上午 2024/9/4 + **/ + @Override + public Object purchaseWarehousingDelete(JSONObject object) { + JSONObject returnObject = new JSONObject(); + + JSONObject jsonObject = getData("jsonStr", object, JSONObject.class); + //判断是否存在参数 + if (!checkStr(jsonObject.getString("code"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "单据号为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("corp"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "公司为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("date_begin"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "单据开始日期为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("date_end"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "单据结束日期为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("coperator"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "操作员为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("cgrkqxqz"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "库存采购入库单取消签字接口编号为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("cgrksc"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "库存采购入库单删除接口编号为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("dataSourceCode"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "数据源编码为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("publicKey"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "publicKey为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("secretKey"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "secretKey为空"); + return returnObject; + } + //执行库存采购入库单取消签字接口 + String cgrkdqxqz = getsendBody("1", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp")); + boolean cgrkdqxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgrkqxqz"), jsonObject.getString("cgrkqxqz").substring(0,6), cgrkdqxqz); + if (!cgrkdqxqzflag) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "采购入库单取消签字失败"); + return returnObject; + } + + //执行库存采购入库单删除接口 + String cgrkdsc = getsendBody("2", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp")); + boolean cgrkdscfiag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgrksc"), jsonObject.getString("cgrksc").substring(0,6), cgrkdsc); + if (cgrkdscfiag) { + returnObject.put("status", "success"); + returnObject.put("errormsg", "采购入库单删除成功"); + return returnObject; + } else { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "采购入库单删除失败"); + return returnObject; + } + } + /** + * @param entity + * @return com.hzya.frame.web.entity.JsonResultEntity + * @Author lvleigang + * @Description 数据表 + * @Date 11:52 上午 2024/3/27 + **/ + @Override + public SysExtensionApiEntity addPurchaseWarehousingDelete(SysExtensionApiEntity entity) { + try { + Map headers = entity.getHeaders(); + SysApplicationEntity applicationEntity = entity.getReceiveApp(); + SysApplicationDatabaseEntity sysApplicationDatabaseEntity = new SysApplicationDatabaseEntity(); + sysApplicationDatabaseEntity.setSts("Y"); + sysApplicationDatabaseEntity.setDbStatus("1"); + sysApplicationDatabaseEntity.setAppId(applicationEntity.getId()); + sysApplicationDatabaseEntity.setDataSourceCode("master"); + List sysDataSourceEntities = sysApplicationDatabaseDao.queryDSBase(sysApplicationDatabaseEntity); + if(sysDataSourceEntities != null && sysDataSourceEntities.size() > 0){ + String parm = entity.getBodys(); + JSONObject jsonObject = JSONObject.parseObject(parm); + jsonObject.put("dataSourceCode",sysDataSourceEntities.get(0).getSourceCode()); + jsonObject.put("publicKey",entity.getSendApp().getPublicKey()); + jsonObject.put("secretKey",entity.getSendApp().getSecretKey()); + + jsonObject.put("cgrkqxqz",headers.get("cgrkqxqz")); + jsonObject.put("cgrksc",headers.get("cgrksc")); + entity.setBodys(jsonObject.toJSONString()); + } + } catch (Exception e) { + e.printStackTrace(); + } + return entity; + } + /** + * @param object + * @return java.lang.Object + * @Author lvleigang + * @Description 销售订单删除接口 8000350082 + * 0、根据销售钉订单号查询出销售出库单号,1、库存销售出库单取消签字 8000350062 ,2、库存销售出库单删除 8000350063 ,3、销售订单取消审批 8000350064 ,4、销售订单删除 8000350065 + * @Date 9:44 上午 2024/9/4 + **/ + @Override + public Object salesOrderDelete(JSONObject object) { + JSONObject returnObject = new JSONObject(); + + JSONObject jsonObject = getData("jsonStr", object, JSONObject.class); + //判断是否存在参数 + if (!checkStr(jsonObject.getString("code"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "单据号为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("corp"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "公司为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("date_begin"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "单据开始日期为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("date_end"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "单据结束日期为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("coperator"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "操作员为空"); + return returnObject; + } + + if (!checkStr(jsonObject.getString("kcxsckqxqz"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "库存销售出库单取消签字接口编号为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("kcxscksc"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "库存销售出库单删除接口编号为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("xsddqxsp"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "销售订单取消审批接口编号为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("xsddsc"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "销售订单删除接口编号为空"); + return returnObject; + } + + if (!checkStr(jsonObject.getString("dataSourceCode"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "数据源编码为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("publicKey"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "publicKey为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("secretKey"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "secretKey为空"); + return returnObject; + } + //根据销售钉订单号查询出销售出库单号 + EncapsulationEntity encapsulationEntity = new EncapsulationEntity(); + encapsulationEntity.setCode(jsonObject.getString("code")); + encapsulationEntity.setDataSourceCode(jsonObject.getString("dataSourceCode")); + encapsulationEntity.setType("30"); + List encapsulationEntities = encapsulationDao.queryCgrkddh(encapsulationEntity); + if(encapsulationEntities == null || encapsulationEntities.size() != 1){ + returnObject.put("status", "falied"); + returnObject.put("errormsg", "查到多条销售出库单"); + return returnObject; + } + //库存销售出库单取消签字, + String cgrkdqxqz = getsendBody("1", jsonObject, encapsulationEntities.get(0).getCode(), encapsulationEntities.get(0).getUnitcode()); + boolean cgrkdqxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcxsckqxqz"), jsonObject.getString("kcxsckqxqz").substring(0,6), cgrkdqxqz); + if (!cgrkdqxqzflag) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "库存销售出库单取消签字失败"); + return returnObject; + } + //库存销售出库单删除 + String cgrkdsc = getsendBody("2", jsonObject, encapsulationEntities.get(0).getCode(), encapsulationEntities.get(0).getUnitcode()); + boolean cgrkdscfiag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcxscksc"), jsonObject.getString("kcxscksc").substring(0,6), cgrkdsc); + if (!cgrkdscfiag) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "库存销售出库单删除失败"); + return returnObject; + } + //销售订单取消审批,, + String cgddqs = getsendBody("3", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp")); + boolean cgddqsflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("xsddqxsp"), jsonObject.getString("xsddqxsp").substring(0,6), cgddqs); + if (!cgddqsflag) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "销售订单取消审批失败"); + return returnObject; + } + //销售订单删除 + String cgddsc = getsendBody("4", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp")); + boolean cgddscflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("xsddsc"), jsonObject.getString("xsddsc").substring(0,6), cgddsc); + if (cgddscflag) { + returnObject.put("status", "success"); + returnObject.put("errormsg", "销售订单删除成功"); + return returnObject; + } else { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "销售订单删除失败"); + return returnObject; + } + } + /** + * @param entity + * @return com.hzya.frame.web.entity.JsonResultEntity + * @Author lvleigang + * @Description 数据表 + * @Date 11:52 上午 2024/3/27 + **/ + @Override + public SysExtensionApiEntity addSalesOrderDelete(SysExtensionApiEntity entity) { + try { + Map headers = entity.getHeaders(); + SysApplicationEntity applicationEntity = entity.getReceiveApp(); + SysApplicationDatabaseEntity sysApplicationDatabaseEntity = new SysApplicationDatabaseEntity(); + sysApplicationDatabaseEntity.setSts("Y"); + sysApplicationDatabaseEntity.setDbStatus("1"); + sysApplicationDatabaseEntity.setAppId(applicationEntity.getId()); + sysApplicationDatabaseEntity.setDataSourceCode("master"); + List sysDataSourceEntities = sysApplicationDatabaseDao.queryDSBase(sysApplicationDatabaseEntity); + if(sysDataSourceEntities != null && sysDataSourceEntities.size() > 0){ + String parm = entity.getBodys(); + JSONObject jsonObject = JSONObject.parseObject(parm); + jsonObject.put("dataSourceCode",sysDataSourceEntities.get(0).getSourceCode()); + jsonObject.put("publicKey",entity.getSendApp().getPublicKey()); + jsonObject.put("secretKey",entity.getSendApp().getSecretKey()); + + jsonObject.put("kcxsckqxqz",headers.get("kcxsckqxqz")); + jsonObject.put("kcxscksc",headers.get("kcxscksc")); + jsonObject.put("xsddqxsp",headers.get("xsddqxsp")); + jsonObject.put("xsddsc",headers.get("xsddsc")); + entity.setBodys(jsonObject.toJSONString()); + } + } catch (Exception e) { + e.printStackTrace(); + } + return entity; + } + /** + * @param object + * @return java.lang.Object + * @Author lvleigang + * @Description 调拨订单删除接口 8000350083 + * + * 0、根据调拨订单号查询调拨入库,调拨出库单据,1、库存调拨出库取消签字 8000350066 2、库存调拨出库删除 8000350067 + * 3、调拨入库取消签字 8000350068 4、调拨入库删除 8000350069 5、调拨订单弃审 8000350070 6、调拨订单删除 8000350071 + * @Date 9:44 上午 2024/9/4 + **/ + @Override + public Object transferOrderDelete(JSONObject object) { + JSONObject returnObject = new JSONObject(); + JSONObject jsonObject = getData("jsonStr", object, JSONObject.class); + //判断是否存在参数 + if (!checkStr(jsonObject.getString("code"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "单据号为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("corp"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "公司为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("date_begin"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "单据开始日期为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("date_end"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "单据结束日期为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("coperator"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "操作员为空"); + return returnObject; + } + + if (!checkStr(jsonObject.getString("kcdbckqxqz"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "库存调拨出库取消签字接口编号为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("kcdbcksc"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "库存调拨出库删除删除接口编号为空"); + return returnObject; + } + + if (!checkStr(jsonObject.getString("dbrkqxqz"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "调拨入库取消签字接口编号为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("dbrksc"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "调拨入库删除接口编号为空"); + return returnObject; + } + + if (!checkStr(jsonObject.getString("dbddqs"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "调拨订单弃审接口编号为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("dbddsc"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "调拨订单删除接口编号为空"); + return returnObject; + } + + if (!checkStr(jsonObject.getString("dataSourceCode"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "数据源编码为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("publicKey"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "publicKey为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("secretKey"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "secretKey为空"); + return returnObject; + } + //根据调拨订单号查询调拨入库 + EncapsulationEntity rk = new EncapsulationEntity(); + rk.setCode(jsonObject.getString("code")); + rk.setDataSourceCode(jsonObject.getString("dataSourceCode")); + rk.setCbilltypecode("4E"); + List rklist = encapsulationDao.queryCgrkddh(rk); + if(rklist == null || rklist.size() != 1){ + returnObject.put("status", "falied"); + returnObject.put("errormsg", "查到多条调拨入库单"); + return returnObject; + } + //根据调拨订单号查询调拨出库 + EncapsulationEntity ck = new EncapsulationEntity(); + ck.setCode(jsonObject.getString("code")); + ck.setDataSourceCode(jsonObject.getString("dataSourceCode")); + ck.setCbilltypecode("4Y"); + List cklist = encapsulationDao.queryCgrkddh(ck); + if(cklist == null || cklist.size() != 1){ + returnObject.put("status", "falied"); + returnObject.put("errormsg", "查到多条调拨出库单"); + return returnObject; + } + //调拨入库取消签字 + String dbrk = getsendBody("1", jsonObject, rklist.get(0).getCode(),rklist.get(0).getUnitcode()); + boolean dbrkflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("dbrkqxqz"), jsonObject.getString("dbrkqxqz").substring(0,6), dbrk); + if (!dbrkflag) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "调拨入库取消签字失败"); + return returnObject; + } + //调拨入库删除 + String dbrksc = getsendBody("2", jsonObject, rklist.get(0).getCode(), rklist.get(0).getUnitcode()); + boolean dbrkscflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("dbrksc"), jsonObject.getString("dbrksc").substring(0,6), dbrksc); + if (!dbrkscflag) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "调拨入库删除失败"); + return returnObject; + } + //库存调拨出库取消签字 + String dbck = getsendBody("1", jsonObject, cklist.get(0).getCode(), cklist.get(0).getUnitcode()); + boolean dbckflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcdbckqxqz"), jsonObject.getString("kcdbckqxqz").substring(0,6), dbck); + if (!dbckflag) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "库存调拨出库取消签字失败"); + return returnObject; + } + //库存调拨出库删除 + String dbcksc = getsendBody("2", jsonObject, cklist.get(0).getCode(), cklist.get(0).getUnitcode()); + boolean dbckscflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcdbcksc"), jsonObject.getString("kcdbcksc").substring(0,6), dbcksc); + if (!dbckscflag) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "库存调拨出库删除失败"); + return returnObject; + } + //调拨订单弃审 + String dbdd = getsendBody("3", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp")); + boolean dbddflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("dbddqs"), jsonObject.getString("dbddqs").substring(0,6), dbdd); + if (!dbddflag) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "调拨订单弃审失败"); + return returnObject; + } + //调拨订单删除 + String dbddsc = getsendBody("4", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp")); + boolean dbddscflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("dbddsc"), jsonObject.getString("dbddsc").substring(0,6), dbddsc); + if (!dbddscflag) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "调拨订单删除失败"); + return returnObject; + } + + returnObject.put("status", "success"); + returnObject.put("errormsg", "调拨订单删除成功"); + return returnObject; + + + } + /** + * @param entity + * @return com.hzya.frame.web.entity.JsonResultEntity + * @Author lvleigang + * @Description 数据表 + * @Date 11:52 上午 2024/3/27 + **/ + @Override + public SysExtensionApiEntity addTransferOrderDelete(SysExtensionApiEntity entity) { + try { + Map headers = entity.getHeaders(); + SysApplicationEntity applicationEntity = entity.getReceiveApp(); + SysApplicationDatabaseEntity sysApplicationDatabaseEntity = new SysApplicationDatabaseEntity(); + sysApplicationDatabaseEntity.setSts("Y"); + sysApplicationDatabaseEntity.setDbStatus("1"); + sysApplicationDatabaseEntity.setAppId(applicationEntity.getId()); + sysApplicationDatabaseEntity.setDataSourceCode("master"); + List sysDataSourceEntities = sysApplicationDatabaseDao.queryDSBase(sysApplicationDatabaseEntity); + if(sysDataSourceEntities != null && sysDataSourceEntities.size() > 0){ + String parm = entity.getBodys(); + JSONObject jsonObject = JSONObject.parseObject(parm); + jsonObject.put("dataSourceCode",sysDataSourceEntities.get(0).getSourceCode()); + jsonObject.put("publicKey",entity.getSendApp().getPublicKey()); + jsonObject.put("secretKey",entity.getSendApp().getSecretKey()); + + jsonObject.put("kcdbckqxqz",headers.get("kcdbckqxqz")); + jsonObject.put("kcdbcksc",headers.get("kcdbcksc")); + jsonObject.put("dbrkqxqz",headers.get("dbrkqxqz")); + jsonObject.put("dbrksc",headers.get("dbrksc")); + jsonObject.put("dbddqs",headers.get("dbddqs")); + jsonObject.put("dbddsc",headers.get("dbddsc")); + entity.setBodys(jsonObject.toJSONString()); + } + } catch (Exception e) { + e.printStackTrace(); + } + return entity; + } + /** + * @param object + * @return java.lang.Object + * @Author lvleigang + * @Description 产成品入库删除接口 8000350084 + * 1、库存产成品入库单取消签字 8000350072 2、库存产成品入库单删除 8000350073 + * @Date 9:44 上午 2024/9/4 + **/ + @Override + public Object finishedProductsAreStoredDelete(JSONObject object) { + JSONObject returnObject = new JSONObject(); + JSONObject jsonObject = getData("jsonStr", object, JSONObject.class); + //判断是否存在参数 + if (!checkStr(jsonObject.getString("code"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "单据号为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("corp"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "公司为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("date_begin"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "单据开始日期为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("date_end"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "单据结束日期为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("coperator"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "操作员为空"); + return returnObject; + } + + if (!checkStr(jsonObject.getString("kcccprkqxqz"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "库存产成品入库单取消签字接口编号为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("kcccprksc"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "库存产成品入库单删除接口编号为空"); + return returnObject; + } + + if (!checkStr(jsonObject.getString("dataSourceCode"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "数据源编码为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("publicKey"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "publicKey为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("secretKey"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "secretKey为空"); + return returnObject; + } + + //库存产成品入库单取消签字 + String qxqz = getsendBody("1", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp")); + boolean qxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcccprkqxqz"), jsonObject.getString("kcccprkqxqz").substring(0,6), qxqz); + if (!qxqzflag) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "库存产成品入库单取消签字失败"); + return returnObject; + } + //库存产成品入库单删除 + String sc = getsendBody("2", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp")); + boolean scflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcccprksc"), jsonObject.getString("kcccprksc").substring(0,6), sc); + if (!scflag) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "库存产成品入库单删除失败"); + return returnObject; + } + + returnObject.put("status", "success"); + returnObject.put("errormsg", "库存产成品入库删除成功"); + return returnObject; + + } + /** + * @param entity + * @return com.hzya.frame.web.entity.JsonResultEntity + * @Author lvleigang + * @Description 数据表 + * @Date 11:52 上午 2024/3/27 + **/ + @Override + public SysExtensionApiEntity addFinishedProductsAreStoredDelete(SysExtensionApiEntity entity) { + try { + Map headers = entity.getHeaders(); + SysApplicationEntity applicationEntity = entity.getReceiveApp(); + SysApplicationDatabaseEntity sysApplicationDatabaseEntity = new SysApplicationDatabaseEntity(); + sysApplicationDatabaseEntity.setSts("Y"); + sysApplicationDatabaseEntity.setDbStatus("1"); + sysApplicationDatabaseEntity.setAppId(applicationEntity.getId()); + sysApplicationDatabaseEntity.setDataSourceCode("master"); + List sysDataSourceEntities = sysApplicationDatabaseDao.queryDSBase(sysApplicationDatabaseEntity); + if(sysDataSourceEntities != null && sysDataSourceEntities.size() > 0){ + String parm = entity.getBodys(); + JSONObject jsonObject = JSONObject.parseObject(parm); + jsonObject.put("dataSourceCode",sysDataSourceEntities.get(0).getSourceCode()); + jsonObject.put("publicKey",entity.getSendApp().getPublicKey()); + jsonObject.put("secretKey",entity.getSendApp().getSecretKey()); + + jsonObject.put("kcccprkqxqz",headers.get("kcccprkqxqz")); + jsonObject.put("kcccprksc",headers.get("kcccprksc")); + entity.setBodys(jsonObject.toJSONString()); + } + } catch (Exception e) { + e.printStackTrace(); + } + return entity; + } + /** + * @param object + * @return java.lang.Object + * @Author lvleigang + * @Description 材料出库删除接口 8000350085 + * 1、库存材料出库取消签字 8000350074 2、库存材料出库单删除 8000350075 + * @Date 9:44 上午 2024/9/4 + **/ + @Override + public Object materialDeliveryDelete(JSONObject object) { + JSONObject returnObject = new JSONObject(); + JSONObject jsonObject = getData("jsonStr", object, JSONObject.class); + //判断是否存在参数 + if (!checkStr(jsonObject.getString("code"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "单据号为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("corp"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "公司为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("date_begin"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "单据开始日期为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("date_end"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "单据结束日期为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("coperator"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "操作员为空"); + return returnObject; + } + + if (!checkStr(jsonObject.getString("qxqzApi"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "库存材料出库取消签字接口编号为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("scApi"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "库存材料出库单删除接口编号为空"); + return returnObject; + } + + if (!checkStr(jsonObject.getString("dataSourceCode"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "数据源编码为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("publicKey"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "publicKey为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("secretKey"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "secretKey为空"); + return returnObject; + } + + //库存材料出库取消签字 + String qxqz = getsendBody("1", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp")); + boolean qxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("qxqzApi"), jsonObject.getString("qxqzApi").substring(0,6), qxqz); + if (!qxqzflag) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "库存材料出库取消签字失败"); + return returnObject; + } + //库存材料出库单删除 + String sc = getsendBody("2", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp")); + boolean scflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("scApi"), jsonObject.getString("scApi").substring(0,6), sc); + if (!scflag) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "库存材料出库单删除失败"); + return returnObject; + } + + returnObject.put("status", "success"); + returnObject.put("errormsg", "库存材料出库删除成功"); + return returnObject; + + } + /** + * @param entity + * @return com.hzya.frame.web.entity.JsonResultEntity + * @Author lvleigang + * @Description 数据表 + * @Date 11:52 上午 2024/3/27 + **/ + @Override + public SysExtensionApiEntity addMaterialDeliveryDelete(SysExtensionApiEntity entity) { + try { + Map headers = entity.getHeaders(); + SysApplicationEntity applicationEntity = entity.getReceiveApp(); + SysApplicationDatabaseEntity sysApplicationDatabaseEntity = new SysApplicationDatabaseEntity(); + sysApplicationDatabaseEntity.setSts("Y"); + sysApplicationDatabaseEntity.setDbStatus("1"); + sysApplicationDatabaseEntity.setAppId(applicationEntity.getId()); + sysApplicationDatabaseEntity.setDataSourceCode("master"); + List sysDataSourceEntities = sysApplicationDatabaseDao.queryDSBase(sysApplicationDatabaseEntity); + if(sysDataSourceEntities != null && sysDataSourceEntities.size() > 0){ + String parm = entity.getBodys(); + JSONObject jsonObject = JSONObject.parseObject(parm); + jsonObject.put("dataSourceCode",sysDataSourceEntities.get(0).getSourceCode()); + jsonObject.put("publicKey",entity.getSendApp().getPublicKey()); + jsonObject.put("secretKey",entity.getSendApp().getSecretKey()); + + jsonObject.put("qxqzApi",headers.get("qxqzApi")); + jsonObject.put("scApi",headers.get("scApi")); + entity.setBodys(jsonObject.toJSONString()); + } + } catch (Exception e) { + e.printStackTrace(); + } + return entity; + } + /** + * @param object + * @return java.lang.Object + * @Author lvleigang + * @Description 其他出库单删除接口 8000350086 + * 1、库存其他出库取消签字 8000350076 2、库存其他出库删除 8000350077 + * @Date 9:44 上午 2024/9/4 + **/ + @Override + public Object otherWarehouseOrdersDelete(JSONObject object) { + JSONObject returnObject = new JSONObject(); + JSONObject jsonObject = getData("jsonStr", object, JSONObject.class); + //判断是否存在参数 + if (!checkStr(jsonObject.getString("code"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "单据号为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("corp"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "公司为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("date_begin"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "单据开始日期为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("date_end"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "单据结束日期为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("coperator"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "操作员为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("qxqzApi"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "库存其他出库取消签字接口编号为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("scApi"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "库存其他出库删除接口编号为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("dataSourceCode"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "数据源编码为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("publicKey"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "publicKey为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("secretKey"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "secretKey为空"); + return returnObject; + } + + //库存其他出库取消签字 + String qxqz = getsendBody("1", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp")); + boolean qxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("qxqzApi"), jsonObject.getString("qxqzApi").substring(0,6), qxqz); + if (!qxqzflag) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "库存其他出库取消签字失败"); + return returnObject; + } + //库存其他出库删除 + String sc = getsendBody("2", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp")); + boolean scflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("scApi"), jsonObject.getString("scApi").substring(0,6), sc); + if (!scflag) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "库存其他出库删除失败"); + return returnObject; + } + + returnObject.put("status", "success"); + returnObject.put("errormsg", "库存其他出库删除成功"); + return returnObject; + + } + /** + * @param entity + * @return com.hzya.frame.web.entity.JsonResultEntity + * @Author lvleigang + * @Description 数据表 + * @Date 11:52 上午 2024/3/27 + **/ + @Override + public SysExtensionApiEntity addOtherWarehouseOrdersDelete(SysExtensionApiEntity entity) { + try { + Map headers = entity.getHeaders(); + SysApplicationEntity applicationEntity = entity.getReceiveApp(); + SysApplicationDatabaseEntity sysApplicationDatabaseEntity = new SysApplicationDatabaseEntity(); + sysApplicationDatabaseEntity.setSts("Y"); + sysApplicationDatabaseEntity.setDbStatus("1"); + sysApplicationDatabaseEntity.setAppId(applicationEntity.getId()); + sysApplicationDatabaseEntity.setDataSourceCode("master"); + List sysDataSourceEntities = sysApplicationDatabaseDao.queryDSBase(sysApplicationDatabaseEntity); + if(sysDataSourceEntities != null && sysDataSourceEntities.size() > 0){ + String parm = entity.getBodys(); + JSONObject jsonObject = JSONObject.parseObject(parm); + jsonObject.put("dataSourceCode",sysDataSourceEntities.get(0).getSourceCode()); + jsonObject.put("publicKey",entity.getSendApp().getPublicKey()); + jsonObject.put("secretKey",entity.getSendApp().getSecretKey()); + + jsonObject.put("qxqzApi",headers.get("qxqzApi")); + jsonObject.put("scApi",headers.get("scApi")); + entity.setBodys(jsonObject.toJSONString()); + } + } catch (Exception e) { + e.printStackTrace(); + } + return entity; + } + /** + * @param object + * @return java.lang.Object + * @Author lvleigang + * @Description 其他入库单删除接口 8000350087 + * 1、库存其他入库单取消签字.8000350078 2、库存其他入库删除 8000350079 + * @Date 9:44 上午 2024/9/4 + **/ + @Override + public Object otherWarehouseReceiptDelete(JSONObject object) { + JSONObject returnObject = new JSONObject(); + JSONObject jsonObject = getData("jsonStr", object, JSONObject.class); + //判断是否存在参数 + if (!checkStr(jsonObject.getString("code"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "单据号为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("corp"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "公司为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("date_begin"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "单据开始日期为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("date_end"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "单据结束日期为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("coperator"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "操作员为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("qxqzApi"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "库存其他入库单取消签字接口编号为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("scApi"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "库存其他入库删除接口编号为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("dataSourceCode"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "数据源编码为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("publicKey"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "publicKey为空"); + return returnObject; + } + if (!checkStr(jsonObject.getString("secretKey"))) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "secretKey为空"); + return returnObject; + } + + //库存其他入库单取消签字 + String qxqz = getsendBody("1", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp")); + boolean qxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("qxqzApi"), jsonObject.getString("qxqzApi").substring(0,6), qxqz); + if (!qxqzflag) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "库存其他入库单取消签字失败"); + return returnObject; + } + //库存其他入库删除 + String sc = getsendBody("2", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp")); + boolean scflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("scApi"), jsonObject.getString("scApi").substring(0,6), sc); + if (!scflag) { + returnObject.put("status", "falied"); + returnObject.put("errormsg", "库存其他入库删除失败"); + return returnObject; + } + returnObject.put("status", "success"); + returnObject.put("errormsg", "库存其他入库删除成功"); + return returnObject; + } + /** + * @param entity + * @return com.hzya.frame.web.entity.JsonResultEntity + * @Author lvleigang + * @Description 数据表 + * @Date 11:52 上午 2024/3/27 + **/ + @Override + public SysExtensionApiEntity addOtherWarehouseReceiptDelete(SysExtensionApiEntity entity) { + try { + Map headers = entity.getHeaders(); + SysApplicationEntity applicationEntity = entity.getReceiveApp(); + SysApplicationDatabaseEntity sysApplicationDatabaseEntity = new SysApplicationDatabaseEntity(); + sysApplicationDatabaseEntity.setSts("Y"); + sysApplicationDatabaseEntity.setDbStatus("1"); + sysApplicationDatabaseEntity.setAppId(applicationEntity.getId()); + sysApplicationDatabaseEntity.setDataSourceCode("master"); + List sysDataSourceEntities = sysApplicationDatabaseDao.queryDSBase(sysApplicationDatabaseEntity); + if(sysDataSourceEntities != null && sysDataSourceEntities.size() > 0){ + String parm = entity.getBodys(); + JSONObject jsonObject = JSONObject.parseObject(parm); + jsonObject.put("dataSourceCode",sysDataSourceEntities.get(0).getSourceCode()); + jsonObject.put("publicKey",entity.getSendApp().getPublicKey()); + jsonObject.put("secretKey",entity.getSendApp().getSecretKey()); + + jsonObject.put("qxqzApi",headers.get("qxqzApi")); + jsonObject.put("scApi",headers.get("scApi")); + entity.setBodys(jsonObject.toJSONString()); + } + } catch (Exception e) { + e.printStackTrace(); + } + return entity; + } + + //拼装数据 + private String getsendBody(String type, JSONObject object, String code,String unitcode) { + JSONObject jsonObject1 = new JSONObject(); + + switch (type) { + case "1": //取消签字参数类型1、库存采购入库单取消签字 2\库存销售出库单取消签字 3\库存调拨出库取消签字4\调拨入库取消签字 5\库存产成品入库单取消签字 + //6\库存材料出库取消签字 7\库存其他出库取消签字 8\库存其他入库单取消签字 + JSONObject unsignInfo = new JSONObject(); + unsignInfo.put("coperator", object.getString("coperator")); + + JSONObject queryInfo = new JSONObject(); + queryInfo.put("date_end", object.getString("date_end")); + queryInfo.put("date_begin", object.getString("date_begin")); + queryInfo.put("corp", unitcode); + queryInfo.put("billcode", code); + + jsonObject1.put("unsignInfo", unsignInfo); + jsonObject1.put("queryInfo", queryInfo); + break; + case "2": //删除接口1、库存采购入库单删除 2\库存销售出库单删除 3\库存调拨出库删除 4\调拨入库删除 5\库存产成品入库单删除 + //6\库存材料出库单删除 7\库存其他出库删除 8\库存其他入库删除 + JSONObject unsignInfo2 = new JSONObject(); + unsignInfo2.put("coperator", object.getString("coperator")); + + JSONObject queryInfo2 = new JSONObject(); + queryInfo2.put("date_end", object.getString("date_end")); + queryInfo2.put("date_begin", object.getString("date_begin")); + queryInfo2.put("corp", unitcode); + queryInfo2.put("billcode", code); + + jsonObject1.put("deleteInfo", unsignInfo2); + jsonObject1.put("queryInfo", queryInfo2); + break; + case "3": //弃审 1、采购订单弃审 2\销售订单取消审批 3\调拨订单弃审 + JSONObject unsignInfo3 = new JSONObject(); + unsignInfo3.put("approvid", object.getString("coperator")); + + JSONObject queryInfo3 = new JSONObject(); + queryInfo3.put("date_end", object.getString("date_end")); + queryInfo3.put("date_begin", object.getString("date_begin")); + queryInfo3.put("corp", unitcode); + queryInfo3.put("code", code); + + jsonObject1.put("approveinfo", unsignInfo3); + jsonObject1.put("queryinfo", queryInfo3); + break; + case "4": //删除 1\采购订单删除 2\销售订单删除 3\调拨订单删除 + JSONObject unsignInfo4 = new JSONObject(); + unsignInfo4.put("coperator", object.getString("coperator")); + + JSONObject queryInfo4 = new JSONObject(); + queryInfo4.put("date_end", object.getString("date_end")); + queryInfo4.put("date_begin", object.getString("date_begin")); + queryInfo4.put("corp", unitcode); + queryInfo4.put("code", code); + + jsonObject1.put("deleteinfo", unsignInfo4); + jsonObject1.put("queryinfo", queryInfo4); + break; + default: + } + return jsonObject1.toJSONString(); + } + + /** + * @param publicKey + * @param secretKey + * @param apiCode + * @param appId + * @param bodys + * @return java.lang.String + * @Author lvleigang + * @Description 发送接口 + * @Date 3:05 下午 2024/9/4 + **/ + private boolean sendPost(String publicKey, String secretKey, String apiCode, String appId, String bodys) { + + StringBuilder returnBody = new StringBuilder(); + Integer outTime = 6000; + HttpClientBuilder httpClientBuilder = HttpClientBuilder.create(); + // HttpClient + CloseableHttpClient closeableHttpClient = httpClientBuilder.disableCookieManagement().build(); + HttpPost post = new HttpPost(ztUrl); + CloseableHttpResponse response = null; + RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(outTime).build(); + post.setConfig(requestConfig);//设置请求参数【超时时间】 + post.setHeader("publicKey", publicKey); + post.setHeader("secretKey", secretKey); + post.setHeader("apiCode", apiCode); + post.setHeader("appId", appId); + + try { + if (bodys != null && !"".equals(bodys)) { + ByteArrayEntity entity = new ByteArrayEntity(bodys.getBytes("UTF-8")); + entity.setContentType("application/json"); + post.setEntity(entity); + } + response = closeableHttpClient.execute(post); + + HttpEntity entity = response.getEntity(); + synchronized (lock) { + returnBody.append(EntityUtils.toString(entity, "UTF-8")); + } + logger.info("返回结果:" + returnBody); + } catch (Exception e) { + logger.error("请求错误:" + e.getMessage()); + returnBody.append(e.getMessage()); + } finally { + try { + // 关闭响应对象 + if (response != null) { + response.close(); + } + // 关闭响应对象 + if (closeableHttpClient != null) { + closeableHttpClient.close(); + } + } catch (IOException e) { + e.printStackTrace(); + } + + } + + if (returnBody != null && !"".equals(returnBody)) { + if (JSONUtil.isTypeJSON(returnBody.toString())) { + JSONObject jsonObject1 = JSONObject.parseObject(returnBody.toString()); + if (jsonObject1.getString("status") != null && "200".equals(jsonObject1.getString("status"))) { + return true; + } else { + return false; + } + } else { + return false; + } + } else { + return false; + } + } + + +} diff --git a/fw-u8c/src/main/java/com/hzya/frame/u8c/Invmandoc/dao/IBdInvmandocDao.java b/fw-u8c/src/main/java/com/hzya/frame/u8c/Invmandoc/dao/IBdInvmandocDao.java new file mode 100644 index 00000000..add7c9c4 --- /dev/null +++ b/fw-u8c/src/main/java/com/hzya/frame/u8c/Invmandoc/dao/IBdInvmandocDao.java @@ -0,0 +1,22 @@ +package com.hzya.frame.u8c.Invmandoc.dao; + +import com.hzya.frame.u8c.Invmandoc.entity.BdInvmandocEntity; +import com.hzya.frame.basedao.dao.IBaseDao; + +import java.util.List; + +/** + * (bd_invmandoc: table)表数据库访问层 + * + * @author makejava + * @since 2023-08-25 11:21:43 + */ +public interface IBdInvmandocDao extends IBaseDao { + + /** + * 根据存货编码查询存货管理档案 + * + * @author liuyang + */ + List queryBdInvmandocByInvcode(BdInvmandocEntity bdInvmandocEntity) throws Exception; +} \ No newline at end of file diff --git a/fw-u8c/src/main/java/com/hzya/frame/u8c/Invmandoc/dao/impl/BdInvmandocDaoImpl.java b/fw-u8c/src/main/java/com/hzya/frame/u8c/Invmandoc/dao/impl/BdInvmandocDaoImpl.java new file mode 100644 index 00000000..8be5e1ed --- /dev/null +++ b/fw-u8c/src/main/java/com/hzya/frame/u8c/Invmandoc/dao/impl/BdInvmandocDaoImpl.java @@ -0,0 +1,25 @@ +package com.hzya.frame.u8c.Invmandoc.dao.impl; + +import cn.hutool.core.lang.Assert; +import com.baomidou.dynamic.datasource.annotation.DS; +import com.hzya.frame.u8c.Invmandoc.entity.BdInvmandocEntity; +import com.hzya.frame.u8c.Invmandoc.dao.IBdInvmandocDao; +import com.hzya.frame.basedao.dao.MybatisGenericDao; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * (BdInvmandoc)表数据库访问层 + * + * @author makejava + * @since 2023-08-25 11:21:44 + */ +@Repository("serviceBdInvmandocDaoImpl") +public class BdInvmandocDaoImpl extends MybatisGenericDao implements IBdInvmandocDao { + @DS("sowow_sqlserver_pro") + @Override + public List queryBdInvmandocByInvcode(BdInvmandocEntity bdInvmandocEntity) throws Exception { + return (List) selectList("com.hzya.frame.u8c.Invmandoc.dao.impl.BdInvmandocDaoImpl.queryBdInvmandocByInvcode", bdInvmandocEntity); + } +} \ No newline at end of file diff --git a/fw-u8c/src/main/java/com/hzya/frame/u8c/Invmandoc/entity/BdInvmandocEntity.java b/fw-u8c/src/main/java/com/hzya/frame/u8c/Invmandoc/entity/BdInvmandocEntity.java new file mode 100644 index 00000000..85745517 --- /dev/null +++ b/fw-u8c/src/main/java/com/hzya/frame/u8c/Invmandoc/entity/BdInvmandocEntity.java @@ -0,0 +1,69 @@ +package com.hzya.frame.u8c.Invmandoc.entity; + +import com.hzya.frame.web.entity.BaseEntity; + +/** + * (BdInvmandoc)实体类-存货管理档案 + * + * @author makejava + * @since 2023-08-25 11:21:44 + */ +public class BdInvmandocEntity extends BaseEntity { + + + private String pkInvbasdoc; + private String pkInvmandoc; + + + /** + * 存货编码 + */ + private String invcode; + private String pkCorp; + + /** + * 助记码=商家编码 + */ + private String invmnecode; + + public String getPkCorp() { + return pkCorp; + } + + public void setPkCorp(String pkCorp) { + this.pkCorp = pkCorp; + } + + public String getPkInvbasdoc() { + return pkInvbasdoc; + } + + public void setPkInvbasdoc(String pkInvbasdoc) { + this.pkInvbasdoc = pkInvbasdoc; + } + + public String getPkInvmandoc() { + return pkInvmandoc; + } + + public void setPkInvmandoc(String pkInvmandoc) { + this.pkInvmandoc = pkInvmandoc; + } + + public String getInvcode() { + return invcode; + } + + public void setInvcode(String invcode) { + this.invcode = invcode; + } + + public String getInvmnecode() { + return invmnecode; + } + + public void setInvmnecode(String invmnecode) { + this.invmnecode = invmnecode; + } +} + diff --git a/fw-u8c/src/main/java/com/hzya/frame/u8c/Invmandoc/entity/BdInvmandocEntity.xml b/fw-u8c/src/main/java/com/hzya/frame/u8c/Invmandoc/entity/BdInvmandocEntity.xml new file mode 100644 index 00000000..4c7bbfb7 --- /dev/null +++ b/fw-u8c/src/main/java/com/hzya/frame/u8c/Invmandoc/entity/BdInvmandocEntity.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + pk_invbasdoc + ,pk_invmandoc + + + + + + + + diff --git a/fw-u8c/src/main/java/com/hzya/frame/u8c/Invmandoc/service/IBdInvmandocService.java b/fw-u8c/src/main/java/com/hzya/frame/u8c/Invmandoc/service/IBdInvmandocService.java new file mode 100644 index 00000000..5648b675 --- /dev/null +++ b/fw-u8c/src/main/java/com/hzya/frame/u8c/Invmandoc/service/IBdInvmandocService.java @@ -0,0 +1,13 @@ +package com.hzya.frame.u8c.Invmandoc.service; + +import com.hzya.frame.u8c.Invmandoc.entity.BdInvmandocEntity; +import com.hzya.frame.basedao.service.IBaseService; + +/** + * (BdInvmandoc)表服务接口 + * + * @author makejava + * @since 2023-08-25 11:21:44 + */ +public interface IBdInvmandocService extends IBaseService { +} diff --git a/fw-u8c/src/main/java/com/hzya/frame/u8c/Invmandoc/service/impl/BdInvmandocServiceImpl.java b/fw-u8c/src/main/java/com/hzya/frame/u8c/Invmandoc/service/impl/BdInvmandocServiceImpl.java new file mode 100644 index 00000000..3a339b50 --- /dev/null +++ b/fw-u8c/src/main/java/com/hzya/frame/u8c/Invmandoc/service/impl/BdInvmandocServiceImpl.java @@ -0,0 +1,29 @@ +package com.hzya.frame.u8c.Invmandoc.service.impl; + +import com.hzya.frame.u8c.Invmandoc.entity.BdInvmandocEntity; +import com.hzya.frame.u8c.Invmandoc.dao.IBdInvmandocDao; +import com.hzya.frame.u8c.Invmandoc.service.IBdInvmandocService; +import org.springframework.stereotype.Service; +import org.springframework.beans.factory.annotation.Autowired; + +import javax.annotation.Resource; + +import com.hzya.frame.basedao.service.impl.BaseService; + +/** + * (BdInvmandoc)表服务实现类 + * + * @author makejava + * @since 2023-08-25 11:21:44 + */ +@Service("serviceBdInvmandocService") +public class BdInvmandocServiceImpl extends BaseService implements IBdInvmandocService { + + private IBdInvmandocDao bdInvmandocDao; + + @Autowired + public void setBdInvmandocDao(IBdInvmandocDao dao) { + this.bdInvmandocDao = dao; + this.dao = dao; + } +} diff --git a/fw-u8c/src/main/java/com/hzya/frame/u8c/ax/dao/IAxDao.java b/fw-u8c/src/main/java/com/hzya/frame/u8c/ax/dao/IAxDao.java new file mode 100644 index 00000000..d5b213e5 --- /dev/null +++ b/fw-u8c/src/main/java/com/hzya/frame/u8c/ax/dao/IAxDao.java @@ -0,0 +1,24 @@ +package com.hzya.frame.u8c.ax.dao; + +import com.hzya.frame.u8c.ax.entity.ArchivesEntity; +import com.hzya.frame.basedao.dao.IBaseDao; + +import java.util.List; + +/** + * (bd_corp: table)表数据库访问层 + * + * @author makejava + * @since 2023-09-06 14:47:17 + */ +public interface IAxDao extends IBaseDao { + + List queryArchivesData(ArchivesEntity archivesEntity); + + ArchivesEntity saveArchivesByType(ArchivesEntity archivesEntity); + + Integer updateArchivesByType(ArchivesEntity archivesEntity); + + Integer deleteArchivesByType(ArchivesEntity archivesEntity); +} + diff --git a/fw-u8c/src/main/java/com/hzya/frame/u8c/ax/dao/impl/AxDaoImpl.java b/fw-u8c/src/main/java/com/hzya/frame/u8c/ax/dao/impl/AxDaoImpl.java new file mode 100644 index 00000000..5fecd7d3 --- /dev/null +++ b/fw-u8c/src/main/java/com/hzya/frame/u8c/ax/dao/impl/AxDaoImpl.java @@ -0,0 +1,42 @@ +package com.hzya.frame.u8c.ax.dao.impl; + +import com.hzya.frame.sysnew.user.entity.SysUserEntity; +import com.hzya.frame.u8c.ax.dao.IAxDao; +import com.hzya.frame.u8c.ax.entity.ArchivesEntity; +import org.springframework.stereotype.Repository; +import com.hzya.frame.basedao.dao.MybatisGenericDao; + +import java.util.List; + +/** + * (BdCorp)表数据库访问层 + * + * @author makejava + * @since 2023-09-06 14:47:17 + */ +@Repository("axDaoImpl") +public class AxDaoImpl extends MybatisGenericDao implements IAxDao { + + @Override + public List queryArchivesData(ArchivesEntity entity) { + List o = super.query(getSqlIdPrifx() + "queryArchivesData", entity); + return o; + } + + @Override + public ArchivesEntity saveArchivesByType(ArchivesEntity entity) { + entity = super.save(getSqlIdPrifx() + "saveArchivesByType", entity); + return entity; + } + @Override + public Integer updateArchivesByType(ArchivesEntity entity) { + Integer o = super.update(getSqlIdPrifx() + "updateArchivesByType", entity); + return o; + } + @Override + public Integer deleteArchivesByType(ArchivesEntity entity) { + Integer o = super.update(getSqlIdPrifx() + "deleteArchivesByType", entity); + return o; + } +} + diff --git a/fw-u8c/src/main/java/com/hzya/frame/u8c/ax/entity/ArchivesEntity.java b/fw-u8c/src/main/java/com/hzya/frame/u8c/ax/entity/ArchivesEntity.java new file mode 100644 index 00000000..a12d3645 --- /dev/null +++ b/fw-u8c/src/main/java/com/hzya/frame/u8c/ax/entity/ArchivesEntity.java @@ -0,0 +1,188 @@ +package com.hzya.frame.u8c.ax.entity; + +import cn.dev33.satoken.stp.StpUtil; +import com.hzya.frame.uuid.UUIDUtils; +import com.hzya.frame.web.entity.BaseEntity; + +import java.util.Date; + +/** + * (BdCorp)实体类 + * + * @author makejava + * @since 2023-09-06 14:47:18 + */ +public class ArchivesEntity extends BaseEntity { + + private String archivesType;//类型 + private String leftCode;//左编码 + private String rightCode;//右编码 + + private String leftAppId;//左应用id + private String leftAppCode;//左应用编码 + private String leftAppName;//左应用名称 + private String leftApiId;//左接口ID + private String leftId;//左id + private String leftName;//左名称 + private String rightAppId;//右应用id + private String rightAppCode;//右应用编码 + private String rightAppName;//右应用名称 + private String rightApiId;//右接口ID + private String rightId;//右id + private String rightName;//右名称 + private String leftOrg;//左公司 + private String rightOrg;//右公司 + + public String getArchivesType() { + return archivesType; + } + + public void setArchivesType(String archivesType) { + this.archivesType = archivesType; + } + + public String getLeftCode() { + return leftCode; + } + + public void setLeftCode(String leftCode) { + this.leftCode = leftCode; + } + + public String getRightCode() { + return rightCode; + } + + public void setRightCode(String rightCode) { + this.rightCode = rightCode; + } + + public String getLeftAppId() { + return leftAppId; + } + + public void setLeftAppId(String leftAppId) { + this.leftAppId = leftAppId; + } + + public String getLeftAppCode() { + return leftAppCode; + } + + public void setLeftAppCode(String leftAppCode) { + this.leftAppCode = leftAppCode; + } + + public String getLeftAppName() { + return leftAppName; + } + + public void setLeftAppName(String leftAppName) { + this.leftAppName = leftAppName; + } + + public String getLeftApiId() { + return leftApiId; + } + + public void setLeftApiId(String leftApiId) { + this.leftApiId = leftApiId; + } + + public String getLeftId() { + return leftId; + } + + public void setLeftId(String leftId) { + this.leftId = leftId; + } + + public String getLeftName() { + return leftName; + } + + public void setLeftName(String leftName) { + this.leftName = leftName; + } + + public String getRightAppId() { + return rightAppId; + } + + public void setRightAppId(String rightAppId) { + this.rightAppId = rightAppId; + } + + public String getRightAppCode() { + return rightAppCode; + } + + public void setRightAppCode(String rightAppCode) { + this.rightAppCode = rightAppCode; + } + + public String getRightAppName() { + return rightAppName; + } + + public void setRightAppName(String rightAppName) { + this.rightAppName = rightAppName; + } + + public String getRightApiId() { + return rightApiId; + } + + public void setRightApiId(String rightApiId) { + this.rightApiId = rightApiId; + } + + public String getRightId() { + return rightId; + } + + public void setRightId(String rightId) { + this.rightId = rightId; + } + + public String getRightName() { + return rightName; + } + + public void setRightName(String rightName) { + this.rightName = rightName; + } + + public String getLeftOrg() { + return leftOrg; + } + + public void setLeftOrg(String leftOrg) { + this.leftOrg = leftOrg; + } + + public String getRightOrg() { + return rightOrg; + } + + public void setRightOrg(String rightOrg) { + this.rightOrg = rightOrg; + } + + public void setCreate() { + this.setId(UUIDUtils.getUUID()); + this.setSts("Y"); + this.setCreate_user_id("1"); + this.setModify_user_id("1"); + this.setCreate_time(new Date()); + this.setModify_time(new Date()); + this.setOrg_id("0"); + this.setCompanyId("0"); + } + //修改信息 + public void setUpdate() { + this.setModify_user_id("1"); + this.setModify_time(new Date()); + } +} + diff --git a/fw-u8c/src/main/java/com/hzya/frame/u8c/ax/entity/ArchivesEntity.xml b/fw-u8c/src/main/java/com/hzya/frame/u8c/ax/entity/ArchivesEntity.xml new file mode 100644 index 00000000..6c869485 --- /dev/null +++ b/fw-u8c/src/main/java/com/hzya/frame/u8c/ax/entity/ArchivesEntity.xml @@ -0,0 +1,207 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + insert into + + sys_personnel_control + sys_org_control + sys_stock_control + sys_merchant_control + sys_taxrate_control + sys_project_control + sys_bank_control + sys_bankaccount_control + sys_assets_control + + ( + + id , + left_app_id , + left_app_code , + left_app_name , + left_api_id , + left_id , + left_code , + left_name , + right_app_id , + right_app_code , + right_app_name , + right_api_id , + right_id , + right_code , + right_name , + sorts , + create_user_id , + create_time , + modify_user_id , + modify_time , + sts , + org_id , + company_id , + sts, + + )values( + + #{id} , + #{leftAppId} , + #{leftAppCode} , + #{leftAppName} , + #{leftApiId} , + #{leftId} , + #{leftCode} , + #{leftName} , + #{rightAppId} , + #{rightAppCode} , + #{rightAppName} , + #{rightApiId} , + #{rightId} , + #{rightCode} , + #{rightName} , + #{sorts} , + #{create_user_id} , + #{create_time} , + #{modify_user_id} , + #{modify_time} , + #{sts} , + #{org_id} , + #{companyId} , + 'Y', + + ) + + + + + update + + sys_personnel_control + sys_org_control + sys_stock_control + sys_merchant_control + sys_taxrate_control + sys_project_control + sys_bank_control + sys_bankaccount_control + sys_assets_control + + set + + id = #{id}, + left_app_id = #{leftAppId}, + left_app_code = #{leftAppCode}, + left_app_name = #{leftAppName}, + left_api_id = #{leftApiId}, + left_id = #{leftId}, + left_code = #{leftCode}, + left_name = #{leftName}, + right_app_id = #{rightAppId}, + right_app_code = #{rightAppCode}, + right_app_name = #{rightAppName}, + right_api_id = #{rightApiId}, + right_id = #{rightId}, + right_code = #{rightCode}, + right_name = #{rightName}, + sorts = #{sorts}, + create_user_id = #{create_user_id}, + create_time = #{create_time}, + modify_user_id = #{modify_user_id}, + modify_time = #{modify_time}, + sts = #{sts}, + org_id = #{org_id}, + company_id = #{companyId}, + + where right_id = #{rightId} + + + + + update + + sys_personnel_control + sys_org_control + sys_stock_control + sys_merchant_control + sys_taxrate_control + sys_project_control + sys_bank_control + sys_bankaccount_control + sys_assets_control + + set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id} + + and id = #{id} + and left_app_id = #{leftAppId} + and left_app_code = #{leftAppCode} + and left_app_name = #{leftAppName} + and left_api_id = #{leftApiId} + and left_id = #{leftId} + and left_code = #{leftCode} + and left_name = #{leftName} + and right_app_id = #{rightAppId} + and right_app_code = #{rightAppCode} + and right_app_name = #{rightAppName} + and right_api_id = #{rightApiId} + and right_id = #{rightId} + and right_code = #{rightCode} + and right_name = #{rightName} + and sorts = #{sorts} + and sts = #{sts} + and company_id = #{companyId} + and sts='Y' + + + + + diff --git a/fw-u8c/src/main/java/com/hzya/frame/u8c/ax/entity/Ass.java b/fw-u8c/src/main/java/com/hzya/frame/u8c/ax/entity/Ass.java new file mode 100644 index 00000000..032b7b26 --- /dev/null +++ b/fw-u8c/src/main/java/com/hzya/frame/u8c/ax/entity/Ass.java @@ -0,0 +1,24 @@ +package com.hzya.frame.u8c.ax.entity; + + +public class Ass { + private String checktypecode; + private String checkvaluecode; + + + public String getChecktypecode() { + return checktypecode; + } + + public void setChecktypecode(String checktypecode) { + this.checktypecode = checktypecode; + } + + public String getCheckvaluecode() { + return checkvaluecode; + } + + public void setCheckvaluecode(String checkvaluecode) { + this.checkvaluecode = checkvaluecode; + } +} \ No newline at end of file diff --git a/fw-u8c/src/main/java/com/hzya/frame/u8c/ax/entity/Cashflow.java b/fw-u8c/src/main/java/com/hzya/frame/u8c/ax/entity/Cashflow.java new file mode 100644 index 00000000..b6edbd75 --- /dev/null +++ b/fw-u8c/src/main/java/com/hzya/frame/u8c/ax/entity/Cashflow.java @@ -0,0 +1,23 @@ +package com.hzya.frame.u8c.ax.entity; + + +public class Cashflow { + private String money; + private String pk_cashflow; + + public String getMoney() { + return money; + } + + public void setMoney(String money) { + this.money = money; + } + + public String getPk_cashflow() { + return pk_cashflow; + } + + public void setPk_cashflow(String pk_cashflow) { + this.pk_cashflow = pk_cashflow; + } +} \ No newline at end of file diff --git a/fw-u8c/src/main/java/com/hzya/frame/u8c/ax/entity/Voucher.java b/fw-u8c/src/main/java/com/hzya/frame/u8c/ax/entity/Voucher.java new file mode 100644 index 00000000..2b1209ab --- /dev/null +++ b/fw-u8c/src/main/java/com/hzya/frame/u8c/ax/entity/Voucher.java @@ -0,0 +1,69 @@ +package com.hzya.frame.u8c.ax.entity; + +import java.util.List; + +public class Voucher { + private List details; + private String no; + private String pk_corp; + private String pk_glorgbook; + private String pk_prepared; + private String pk_vouchertype; + private String pk_voucher; + + public List getDetails() { + return details; + } + + public void setDetails(List details) { + this.details = details; + } + + public String getNo() { + return no; + } + + public void setNo(String no) { + this.no = no; + } + + public String getPk_corp() { + return pk_corp; + } + + public void setPk_corp(String pk_corp) { + this.pk_corp = pk_corp; + } + + public String getPk_glorgbook() { + return pk_glorgbook; + } + + public void setPk_glorgbook(String pk_glorgbook) { + this.pk_glorgbook = pk_glorgbook; + } + + public String getPk_prepared() { + return pk_prepared; + } + + public void setPk_prepared(String pk_prepared) { + this.pk_prepared = pk_prepared; + } + + public String getPk_vouchertype() { + return pk_vouchertype; + } + + public void setPk_vouchertype(String pk_vouchertype) { + this.pk_vouchertype = pk_vouchertype; + } + + public String getPk_voucher() { + return pk_voucher; + } + + public void setPk_voucher(String pk_voucher) { + this.pk_voucher = pk_voucher; + } +} \ No newline at end of file diff --git a/fw-u8c/src/main/java/com/hzya/frame/u8c/ax/entity/VoucherDetails.java b/fw-u8c/src/main/java/com/hzya/frame/u8c/ax/entity/VoucherDetails.java new file mode 100644 index 00000000..2c47bdb7 --- /dev/null +++ b/fw-u8c/src/main/java/com/hzya/frame/u8c/ax/entity/VoucherDetails.java @@ -0,0 +1,105 @@ +package com.hzya.frame.u8c.ax.entity; + +import java.util.List; + +public class VoucherDetails { + private List ass; + private List cashflow; + private String creditamount; + private String debitamount; + private String explanation; + private String localcreditamount; + private String localdebitamount; + private String pk_accsubj; + private String pk_currtype; + private String debitquantity; + private String price; + + public String getDebitquantity() { + return debitquantity; + } + + public void setDebitquantity(String debitquantity) { + this.debitquantity = debitquantity; + } + + public String getPrice() { + return price; + } + + public void setPrice(String price) { + this.price = price; + } + + public List getAss() { + return ass; + } + + public void setAss(List ass) { + this.ass = ass; + } + + public List getCashflow() { + return cashflow; + } + + public void setCashflow(List cashflow) { + this.cashflow = cashflow; + } + + public String getCreditamount() { + return creditamount; + } + + public void setCreditamount(String creditamount) { + this.creditamount = creditamount; + } + + public String getDebitamount() { + return debitamount; + } + + public void setDebitamount(String debitamount) { + this.debitamount = debitamount; + } + + public String getExplanation() { + return explanation; + } + + public void setExplanation(String explanation) { + this.explanation = explanation; + } + + public String getLocalcreditamount() { + return localcreditamount; + } + + public void setLocalcreditamount(String localcreditamount) { + this.localcreditamount = localcreditamount; + } + + public String getLocaldebitamount() { + return localdebitamount; + } + + public void setLocaldebitamount(String localdebitamount) { + this.localdebitamount = localdebitamount; + } + + public String getPk_accsubj() { + return pk_accsubj; + } + + public void setPk_accsubj(String pk_accsubj) { + this.pk_accsubj = pk_accsubj; + } + + public String getPk_currtype() { + return pk_currtype; + } + + public void setPk_currtype(String pk_currtype) { + this.pk_currtype = pk_currtype; + } +} \ No newline at end of file diff --git a/fw-u8c/src/main/java/com/hzya/frame/u8c/ax/entity/VoucherRoot.java b/fw-u8c/src/main/java/com/hzya/frame/u8c/ax/entity/VoucherRoot.java new file mode 100644 index 00000000..2d50436e --- /dev/null +++ b/fw-u8c/src/main/java/com/hzya/frame/u8c/ax/entity/VoucherRoot.java @@ -0,0 +1,14 @@ +package com.hzya.frame.u8c.ax.entity; +import java.util.List; + +public class VoucherRoot { + private List voucher; + + public List getVoucher() { + return voucher; + } + + public void setVoucher(List voucher) { + this.voucher = voucher; + } +} \ No newline at end of file diff --git a/fw-u8c/src/main/java/com/hzya/frame/u8c/ax/service/IAxService.java b/fw-u8c/src/main/java/com/hzya/frame/u8c/ax/service/IAxService.java new file mode 100644 index 00000000..e2cd5c42 --- /dev/null +++ b/fw-u8c/src/main/java/com/hzya/frame/u8c/ax/service/IAxService.java @@ -0,0 +1,41 @@ +package com.hzya.frame.u8c.ax.service; + +import com.alibaba.fastjson.JSONObject; +import com.hzya.frame.u8c.ax.entity.ArchivesEntity; +import com.hzya.frame.basedao.service.IBaseService; +import com.hzya.frame.web.entity.JsonResultEntity; + +public interface IAxService extends IBaseService{ + /** + * @Author lvleigang + * @Description 凭证新增 + * @Date 3:42 下午 2024/4/24 + * @param object + * @return com.hzya.frame.web.entity.JsonResultEntity + **/ + Object thirdInterfaceVoucherInsert(JSONObject object); + /** + * @Author lvleigang + * @Description 档案新增 + * @Date 3:42 下午 2024/4/24 + * @param object + * @return com.hzya.frame.web.entity.JsonResultEntity + **/ + Object thirdInterfaceArchivesInsert(JSONObject object); + /** + * @Author lvleigang + * @Description 档案修改 + * @Date 3:42 下午 2024/4/24 + * @param object + * @return com.hzya.frame.web.entity.JsonResultEntity + **/ + Object thirdInterfaceArchivesUpdate(JSONObject object); + /** + * @Author lvleigang + * @Description 档案删除 + * @Date 3:42 下午 2024/4/24 + * @param object + * @return com.hzya.frame.web.entity.JsonResultEntity + **/ + Object thirdInterfaceArchivesDelete(JSONObject object); +} diff --git a/fw-u8c/src/main/java/com/hzya/frame/u8c/ax/service/impl/AxServiceImpl.java b/fw-u8c/src/main/java/com/hzya/frame/u8c/ax/service/impl/AxServiceImpl.java new file mode 100644 index 00000000..cf4aa9bc --- /dev/null +++ b/fw-u8c/src/main/java/com/hzya/frame/u8c/ax/service/impl/AxServiceImpl.java @@ -0,0 +1,836 @@ +package com.hzya.frame.u8c.ax.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.hzya.frame.basedao.service.impl.BaseService; +import com.hzya.frame.u8c.ax.dao.IAxDao; +import com.hzya.frame.u8c.ax.entity.*; +import com.hzya.frame.u8c.ax.service.IAxService; +import com.hzya.frame.web.entity.BaseResult; +import com.hzya.frame.web.entity.JsonResultEntity; +import org.apache.http.HttpEntity; +import org.apache.http.client.config.RequestConfig; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.entity.ByteArrayEntity; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.util.EntityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; + +import java.io.IOException; +import java.util.Arrays; +import java.util.List; + +/** + * (BdCorp)表服务实现类 + * + * @author makejava + * @since 2023-09-06 14:47:18 + */ +@Service("axServiceImpl") +public class AxServiceImpl extends BaseService implements IAxService { + private IAxDao axDao; + + @Autowired + public void setAxDao(IAxDao dao) { + this.axDao = dao; + this.dao = dao; + } + + @Value("${zt.url}") + private String voucherUrl; + private final String publicKey = "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj"; + private final String secretKey = "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA="; + private final String appId = "800016"; + private final String pzApiCodexz = "8000160014";//凭证新增 + private final String pzApiCodexg = "8000160031";//凭证修改 + private final String pzApiCodesc = "8000160033";//凭证删除 + private final String pzApiCodezf = "8000160032";//凭证作废 + + private final String ryApiCodexz = "8000160029";//人员对照新增 + private final String ryApiCodexg = "8000160029";//人员对照修改 + private final String ryApiCodesc = "8000160030";//人员对照删除 + + private final String bmApiCodexz = "8000160015";//部门档案新增 + private final String bmApiCodexg = "8000160016";//部门档案修改 + private final String bmApiCodesc = "8000160017";//部门档案删除 + + private final String chApiCodexz = "8000160025";//存货对照新增 + private final String chApiCodexg = "8000160026";//存货对照修改 + private final String chApiCodesc = "8000160027";//存货对照删除 + + private final String ksApiCodexz = "8000160018";//客商辅助核算新增 + private final String ksApiCodexg = "8000160019";//客商辅助核算修改 + private final String ksApiCodesc = "8000160020";//客商辅助核算删除 + + private final String slApiCodexz = "8000160014";//税率新增 + private final String slApiCodexg = "8000160014";//税率修改 + private final String slApiCodesc = "8000160014";//税率删除 + + private final String xmApiCodexz = "8000160021";//项目辅助核算新增 + private final String xmApiCodexg = "8000160022";//项目辅助核算修改 + private final String xmApiCodesc = "8000160023";//项目辅助核算删除 + + private final String yhlbApiCodexz = "8000160014";//银行类别新增 + private final String yhlbApiCodexg = "8000160014";//银行类别修改 + private final String yhlbApiCodesc = "8000160014";//银行类别删除 + + private final String yhzhApiCodexz = "8000160014";//银行账户新增 + private final String yhzhApiCodexg = "8000160014";//银行账户修改 + private final String yhzhApiCodesc = "8000160014";//银行账户删除 + + private final String zcApiCodexz = "8000160014";//资产类别新增 + private final String zcApiCodexg = "8000160014";//资产类别修改 + private final String zcApiCodesc = "8000160014";//资产类别删除 + + private final Object lock = new Object(); + + /** + * @param object + * @return com.hzya.frame.web.entity.JsonResultEntity + * @Author lvleigang + * @Description 凭证新增 + * @Date 3:42 下午 2024/4/24 + **/ + @Override + public Object thirdInterfaceVoucherInsert(JSONObject object) { + JSONObject jsonObject = object.getJSONObject("jsonStr"); + if (jsonObject == null) { + return BaseResult.getFailureMessageEntity("数据为空,请先传递数据"); + } + if (!checkStr(jsonObject.getString("voucherType"))) { + return BaseResult.getFailureMessageEntity("voucherType为空"); + } + if (!checkStr(jsonObject.getString("usercode"))) { + return BaseResult.getFailureMessageEntity("usercode为空"); + } + if (!checkStr(jsonObject.getString("password"))) { + return BaseResult.getFailureMessageEntity("password为空"); + } + if (!checkStr(jsonObject.getString("trantype"))) { + return BaseResult.getFailureMessageEntity("trantype为空"); + } + if (!checkStr(jsonObject.getString("system"))) { + return BaseResult.getFailureMessageEntity("system为空"); + } + if (!checkStr(jsonObject.getString("data"))) { + return BaseResult.getFailureMessageEntity("data为空"); + } + String bodys = jsonObject.getString("data"); + List fzhs = Arrays.asList(new String[]{"1", "2", "6", "73", "D01", "jobass", "93", "96", "22"}); + switch (jsonObject.getString("voucherType")) { + case "add"://新增 + VoucherRoot entity1 = getData("data", jsonObject, VoucherRoot.class); + if (entity1 == null || entity1.getVoucher() == null || entity1.getVoucher().size() == 0) { + return BaseResult.getFailureMessageEntity("data为空"); + } + for (int i = 0; i < entity1.getVoucher().size(); i++) { + Voucher voucher = entity1.getVoucher().get(i); + if (voucher.getDetails() != null && voucher.getDetails().size() > 0) { + for (int a = 0; a < voucher.getDetails().size(); a++) { + VoucherDetails voucherDetails = voucher.getDetails().get(a); + if (voucherDetails.getAss() != null && voucherDetails.getAss().size() > 0) { + for (int b = 0; b < voucherDetails.getAss().size(); b++) { + Ass ass = voucherDetails.getAss().get(b); + if (ass.getChecktypecode() != null && !"".equals(ass.getChecktypecode())) { + //存在需要转换的 + if (fzhs.contains(ass.getChecktypecode())) { + ArchivesEntity archivesEntity = new ArchivesEntity(); + archivesEntity.setArchivesType(ass.getChecktypecode()); + archivesEntity.setLeftCode(ass.getCheckvaluecode()); + archivesEntity.setLeftOrg(voucher.getPk_corp()); + + List archivesEntities = axDao.queryArchivesData(archivesEntity); + if (archivesEntities != null && archivesEntities.size() > 0) { + ass.setCheckvaluecode(archivesEntities.get(0).getRightCode()); + } + } + } + } + } + } + } + } + bodys = JSON.toJSONString(entity1); + break; + case "update"://修改 + VoucherRoot entity = getData("data", jsonObject, VoucherRoot.class); + if (entity == null || entity.getVoucher() == null || entity.getVoucher().size() == 0) { + return BaseResult.getFailureMessageEntity("data为空"); + } + for (int i = 0; i < entity.getVoucher().size(); i++) { + Voucher voucher = entity.getVoucher().get(i); + if (voucher.getDetails() != null && voucher.getDetails().size() > 0) { + for (int a = 0; a < voucher.getDetails().size(); a++) { + VoucherDetails voucherDetails = voucher.getDetails().get(a); + if (voucherDetails.getAss() != null && voucherDetails.getAss().size() > 0) { + for (int b = 0; b < voucherDetails.getAss().size(); b++) { + Ass ass = voucherDetails.getAss().get(b); + if (ass.getChecktypecode() != null && !"".equals(ass.getChecktypecode())) { + //存在需要转换的 + if (fzhs.contains(ass.getChecktypecode())) { + ArchivesEntity archivesEntity = new ArchivesEntity(); + archivesEntity.setArchivesType(ass.getChecktypecode()); + archivesEntity.setLeftCode(ass.getCheckvaluecode()); + archivesEntity.setLeftOrg(voucher.getPk_corp()); + List archivesEntities = axDao.queryArchivesData(archivesEntity); + if (archivesEntities != null && archivesEntities.size() > 0) { + ass.setCheckvaluecode(archivesEntities.get(0).getRightCode()); + } + } + } + } + } + } + } + } + bodys = JSON.toJSONString(entity); + break; + case "delete"://删除 + break; + case "cancellation"://作废 + break; + default: + break; + } + HttpClientBuilder httpClientBuilder = HttpClientBuilder.create(); + // HttpClient + CloseableHttpClient closeableHttpClient = httpClientBuilder.disableCookieManagement().build(); + HttpPost post = new HttpPost(voucherUrl); + CloseableHttpResponse response = null; + + RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(60000).build(); + post.setConfig(requestConfig);//设置请求参数【超时时间】 + post.setHeader("usercode", jsonObject.getString("usercode")); + post.setHeader("password", jsonObject.getString("password")); + post.setHeader("trantype", jsonObject.getString("trantype")); + post.setHeader("system", jsonObject.getString("system")); + post.setHeader("publicKey", publicKey); + post.setHeader("secretKey", secretKey); + post.setHeader("appId", appId); + post.setHeader("needStackTrace", jsonObject.getString("needStackTrace")); + switch (jsonObject.getString("voucherType")) { + case "add"://新增 + post.setHeader("apiCode", pzApiCodexz); + break; + case "update"://修改 + post.setHeader("apiCode", pzApiCodexg); + break; + case "delete"://删除 + post.setHeader("apiCode", pzApiCodesc); + break; + case "cancellation"://作废 + post.setHeader("apiCode", pzApiCodezf); + break; + default: + break; + } + StringBuilder body = new StringBuilder(); + try { + if (bodys != null && !"".equals(bodys)) { + ByteArrayEntity byteArrayEntity = new ByteArrayEntity(bodys.getBytes("UTF-8")); + byteArrayEntity.setContentType("application/json"); + post.setEntity(byteArrayEntity); + } + response = closeableHttpClient.execute(post); + HttpEntity httpEntity = response.getEntity(); + synchronized (lock) { + body.append(EntityUtils.toString(httpEntity)); + } + logger.info("返回结果:" + body); + JsonResultEntity resultEntity = JSON.parseObject(body.toString(), JsonResultEntity.class); + return resultEntity; + } catch (Exception e) { + logger.error("请求错误:" + e.getMessage()); + body.append(e.getMessage()); + return BaseResult.getFailureMessageEntity("转发失败", body); + } finally { + try { + // 关闭响应对象 + if (response != null) { + response.close(); + } + // 关闭响应对象 + if (closeableHttpClient != null) { + closeableHttpClient.close(); + } + } catch (IOException e) { + e.printStackTrace(); + } + } + } + + /** + * @param object + * @return com.hzya.frame.web.entity.JsonResultEntity + * @Author lvleigang + * @Description 档案新增 + * @Date 3:42 下午 2024/4/24 + **/ + @Override + public Object thirdInterfaceArchivesInsert(JSONObject object) { + JSONObject jsonObject = object.getJSONObject("jsonStr"); + if (jsonObject == null) { + return BaseResult.getFailureMessageEntity("数据为空,请先传递数据"); + } + if (!checkStr(jsonObject.getString("archivesType"))) { + return BaseResult.getFailureMessageEntity("档案类型为空"); + } + if (!checkStr(jsonObject.getString("usercode"))) { + return BaseResult.getFailureMessageEntity("usercode为空"); + } + if (!checkStr(jsonObject.getString("password"))) { + return BaseResult.getFailureMessageEntity("password为空"); + } + if (!checkStr(jsonObject.getString("trantype"))) { + return BaseResult.getFailureMessageEntity("trantype为空"); + } + if (!checkStr(jsonObject.getString("system"))) { + return BaseResult.getFailureMessageEntity("system为空"); + } + if (!checkStr(jsonObject.getString("data"))) { + return BaseResult.getFailureMessageEntity("data为空"); + } + List fzhs = Arrays.asList(new String[]{"1", "2", "6", "73", "D01", "jobass", "93", "96", "22"}); + if (!fzhs.contains(jsonObject.getString("archivesType"))) { + return BaseResult.getFailureMessageEntity("档案类型错误,请联系管理员"); + } + HttpClientBuilder httpClientBuilder = HttpClientBuilder.create(); + // HttpClient + CloseableHttpClient closeableHttpClient = httpClientBuilder.disableCookieManagement().build(); + HttpPost post = new HttpPost(voucherUrl); + RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(60000).build(); + post.setConfig(requestConfig);//设置请求参数【超时时间】 + post.setHeader("usercode", jsonObject.getString("usercode")); + post.setHeader("password", jsonObject.getString("password")); + post.setHeader("trantype", jsonObject.getString("trantype")); + post.setHeader("system", jsonObject.getString("system")); + post.setHeader("publicKey", publicKey); + post.setHeader("secretKey", secretKey); + post.setHeader("appId", appId); + CloseableHttpResponse response = null; + switch (jsonObject.getString("archivesType")) { + case "1"://人员对照 + post.setHeader("apiCode", ryApiCodexz); + break; + case "2"://部门档案 + post.setHeader("apiCode", bmApiCodexz); + break; + case "6"://存货对照 + post.setHeader("apiCode", chApiCodexz); + break; + case "73"://客商辅助核算 + post.setHeader("apiCode", ksApiCodexz); + break; + case "D01"://税率 + post.setHeader("apiCode", slApiCodexz); + break; + case "jobass"://项目辅助核算 + post.setHeader("apiCode", xmApiCodexz); + break; + case "93"://银行类别 + post.setHeader("apiCode", yhlbApiCodexz); + break; + case "96"://银行账户 + post.setHeader("apiCode", yhzhApiCodexz); + break; + case "22"://资产类别 + post.setHeader("apiCode", zcApiCodexz); + break; + default: + break; + } + StringBuilder body = new StringBuilder(); + try { + String senddata = jsonObject.getString("data"); + if ("1".equals(jsonObject.getString("archivesType"))) { + JSONObject sendJson = JSONObject.parseObject(senddata); + JSONObject sendObject = new JSONObject(); + + if (sendJson != null) { + JSONArray psn = sendJson.getJSONArray("psn"); + JSONArray sendpsn = new JSONArray(); + if (psn != null && psn.size() > 0) { + for (int i = 0; i < psn.size(); i++) { + JSONObject person = psn.getJSONObject(i); + JSONObject parentvo = person.getJSONObject("parentvo"); + JSONObject psnmanvo = parentvo.getJSONObject("psnmanvo"); + + ArchivesEntity archivesEntity = new ArchivesEntity(); + archivesEntity.setArchivesType("2"); + archivesEntity.setLeftCode(psnmanvo.getString("pk_deptdoc")); + archivesEntity.setLeftOrg(parentvo.getString("currentcorp")); + List archivesEntities = axDao.queryArchivesData(archivesEntity); + if (archivesEntities != null && archivesEntities.size() > 0) { + psnmanvo.put("pk_deptdoc",archivesEntities.get(0).getRightCode()); + } + parentvo.put("psnmanvo",psnmanvo); + person.put("parentvo",parentvo); + sendpsn.add(person); + } + } + sendObject.put("psn",sendpsn); + } + senddata = sendObject.toJSONString(); + } + ByteArrayEntity byteArrayEntity = new ByteArrayEntity(senddata.getBytes("UTF-8")); + byteArrayEntity.setContentType("application/json"); + post.setEntity(byteArrayEntity); + response = closeableHttpClient.execute(post); + HttpEntity httpEntity = response.getEntity(); + synchronized (lock) { + body.append(EntityUtils.toString(httpEntity)); + } + logger.info("返回结果:" + body); + JsonResultEntity resultEntity = JSON.parseObject(body.toString(), JsonResultEntity.class); + return resultEntity; + //todo 暂时不保存 + //JsonResultEntity resultEntity = JSON.parseObject(body.toString(),JsonResultEntity.class); + //if(resultEntity.isFlag() && "200".equals(resultEntity.getStatus())){ + // if(JSONUtil.isTypeJSON(resultEntity.getAttribute().toString())){ + // JSONObject attribute = JSONObject.parseObject(resultEntity.getAttribute().toString()); + // if("success".equals(attribute.getString("status"))){ + // if(attribute.getString("data") == null || "".equals(attribute.getString("data")) ){ + // return resultEntity; + // } + // JSONArray jsonArray = JSONArray.parseArray(attribute.getString("data")); + // if(jsonArray == null || jsonArray.size() == 0 ){ + // return resultEntity; + // } + // //解析具体数据 + // switch (jsonObject.getString("archivesType")){ + // case "1"://人员对照 + // + // + // break; + // case "2"://部门档案 + // //[{"pk_corp":"1001","unitcode":"01","unitname":"临安奥星电子股份有限公司","createdate":"2024-04-24","deptattr":"1","deptname":"DEV测试一级部门","deptcode":"99","pk_deptdoc":"1001F1100000000067BR"}] + // for (int i = 0; i < jsonArray.size(); i++) { + // JSONObject object1 = jsonArray.getJSONObject(i); + // ArchivesEntity archivesEntity = new ArchivesEntity(); + // archivesEntity.setArchivesType(jsonObject.getString("archivesType")); + // archivesEntity.setCreate(); + // archivesEntity.setLeftCode(object1.getString("unitcode"));//左 + // archivesEntity.setLeftName(object1.getString("unitname"));//左 + // archivesEntity.setRightId(object1.getString("pk_deptdoc"));//右 + // archivesEntity.setRightCode(object1.getString("unitcode"));//右 + // archivesEntity.setRightName(object1.getString("unitname"));//右 + // axDao.saveArchivesByType(archivesEntity); + // } + // break; + // case "6"://存货对照 + // for (int i = 0; i < jsonArray.size(); i++) { + // JSONObject object1 = jsonArray.getJSONObject(i); + // ArchivesEntity archivesEntity = new ArchivesEntity(); + // archivesEntity.setArchivesType(jsonObject.getString("archivesType")); + // archivesEntity.setCreate(); + // archivesEntity.setLeftCode(object1.getString("invclasscode"));//左 + // archivesEntity.setLeftName(object1.getString("invclassname"));//左 + // archivesEntity.setRightId(object1.getString("pk_invcl"));//右 + // archivesEntity.setRightCode(object1.getString("invclasscode"));//右 + // archivesEntity.setRightName(object1.getString("invclassname"));//右 + // axDao.saveArchivesByType(archivesEntity); + // } + // break; + // case "73"://客商辅助核算 + // break; + // case "D01"://税率 + // break; + // case "jobass"://项目辅助核算 + // break; + // case "93"://银行类别 + // break; + // case "96"://银行账户 + // break; + // case "22"://资产类别 + // break; + // default: + // break; + // } + // return resultEntity; + // }else { + // return resultEntity; + // } + // }else { + // return resultEntity; + // } + //}else { + // //解析返回 + // return resultEntity; + //} + } catch (Exception e) { + logger.error("请求错误:" + e.getMessage()); + body.append(e.getMessage()); + return BaseResult.getFailureMessageEntity("转发失败", body); + } finally { + try { + // 关闭响应对象 + if (response != null) { + response.close(); + } + // 关闭响应对象 + if (closeableHttpClient != null) { + closeableHttpClient.close(); + } + } catch (IOException e) { + e.printStackTrace(); + } + } + } + + /** + * @param object + * @return com.hzya.frame.web.entity.JsonResultEntity + * @Author lvleigang + * @Description 档案修改 + * @Date 3:42 下午 2024/4/24 + **/ + @Override + public Object thirdInterfaceArchivesUpdate(JSONObject object) { + JSONObject jsonObject = object.getJSONObject("jsonStr"); + if (jsonObject == null) { + return BaseResult.getFailureMessageEntity("数据为空,请先传递数据"); + } + if (!checkStr(jsonObject.getString("archivesType"))) { + return BaseResult.getFailureMessageEntity("档案类型为空"); + } + if (!checkStr(jsonObject.getString("usercode"))) { + return BaseResult.getFailureMessageEntity("usercode为空"); + } + if (!checkStr(jsonObject.getString("password"))) { + return BaseResult.getFailureMessageEntity("password为空"); + } + if (!checkStr(jsonObject.getString("trantype"))) { + return BaseResult.getFailureMessageEntity("trantype为空"); + } + if (!checkStr(jsonObject.getString("system"))) { + return BaseResult.getFailureMessageEntity("system为空"); + } + if (!checkStr(jsonObject.getString("data"))) { + return BaseResult.getFailureMessageEntity("data为空"); + } + List fzhs = Arrays.asList(new String[]{"1", "2", "6", "73", "D01", "jobass", "93", "96", "22"}); + if (!fzhs.contains(jsonObject.getString("archivesType"))) { + return BaseResult.getFailureMessageEntity("档案类型错误,请联系管理员"); + } + HttpClientBuilder httpClientBuilder = HttpClientBuilder.create(); + // HttpClient + CloseableHttpClient closeableHttpClient = httpClientBuilder.disableCookieManagement().build(); + HttpPost post = new HttpPost(voucherUrl); + RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(60000).build(); + post.setConfig(requestConfig);//设置请求参数【超时时间】 + post.setHeader("usercode", jsonObject.getString("usercode")); + post.setHeader("password", jsonObject.getString("password")); + post.setHeader("trantype", jsonObject.getString("trantype")); + post.setHeader("system", jsonObject.getString("system")); + post.setHeader("publicKey", publicKey); + post.setHeader("secretKey", secretKey); + post.setHeader("appId", appId); + CloseableHttpResponse response = null; + switch (jsonObject.getString("archivesType")) { + case "1"://人员对照 + post.setHeader("apiCode", ryApiCodexg); + break; + case "2"://部门档案 + post.setHeader("apiCode", bmApiCodexg); + break; + case "6"://存货对照 + post.setHeader("apiCode", chApiCodexg); + break; + case "73"://客商辅助核算 + post.setHeader("apiCode", ksApiCodexg); + break; + case "D01"://税率 + post.setHeader("apiCode", slApiCodexg); + break; + case "jobass"://项目辅助核算 + post.setHeader("apiCode", xmApiCodexg); + break; + case "93"://银行类别 + post.setHeader("apiCode", yhlbApiCodexg); + break; + case "96"://银行账户 + post.setHeader("apiCode", yhzhApiCodexg); + break; + case "22"://资产类别 + post.setHeader("apiCode", zcApiCodexg); + break; + default: + break; + } + StringBuilder body = new StringBuilder(); + try { + ByteArrayEntity byteArrayEntity = new ByteArrayEntity(jsonObject.getString("data").getBytes("UTF-8")); + byteArrayEntity.setContentType("application/json"); + post.setEntity(byteArrayEntity); + response = closeableHttpClient.execute(post); + HttpEntity httpEntity = response.getEntity(); + synchronized (lock) { + body.append(EntityUtils.toString(httpEntity)); + } + logger.info("返回结果:" + body); + JsonResultEntity resultEntity = JSON.parseObject(body.toString(), JsonResultEntity.class); + return resultEntity; + //JsonResultEntity resultEntity = JSON.parseObject(body.toString(),JsonResultEntity.class); + //if(resultEntity.isFlag() && "200".equals(resultEntity.getStatus())){ + // if(JSONUtil.isTypeJSON(resultEntity.getAttribute().toString())){ + // //JSONObject attribute = JSONObject.parseObject(resultEntity.getAttribute().toString()); + // JSONObject attribute = JSONObject.parseObject("{\n" + + // " \"status\": \"success\",\n" + + // " \"data\": \"[{\\\"pk_invcl\\\":\\\"0001F11000000000I6NN\\\",\\\"invclasscode\\\":\\\"04\\\",\\\"invclassname\\\":\\\"成品测试\\\",\\\"invclasslev\\\":\\\"1\\\",\\\"pk_corp\\\":\\\"0001\\\",\\\"unitcode\\\":\\\"0001\\\",\\\"unitname\\\":\\\"集团\\\"}]\",\n" + + // " \"taskNumber\": \"202404250048\"\n" + + // "}"); + // if("success".equals(attribute.getString("status"))){ + // if(attribute.getString("data") == null || "".equals(attribute.getString("data")) ){ + // return resultEntity; + // } + // JSONArray jsonArray = JSONArray.parseArray(attribute.getString("data")); + // if(jsonArray == null || jsonArray.size() == 0 ){ + // return resultEntity; + // } + // //解析具体数据 + // switch (jsonObject.getString("archivesType")){ + // case "1"://人员对照 + // break; + // case "2"://部门档案 + // break; + // case "6"://存货对照 + // for (int i = 0; i < jsonArray.size(); i++) { + // JSONObject object1 = jsonArray.getJSONObject(i); + // ArchivesEntity archivesEntity = new ArchivesEntity(); + // archivesEntity.setArchivesType(jsonObject.getString("archivesType")); + // archivesEntity.setUpdate(); + // archivesEntity.setLeftCode(object1.getString("invclasscode"));//左 + // archivesEntity.setLeftName(object1.getString("invclassname"));//左 + // archivesEntity.setRightId(object1.getString("pk_invcl"));//右 + // archivesEntity.setRightCode(object1.getString("invclasscode"));//右 + // archivesEntity.setRightName(object1.getString("invclassname"));//右 + // axDao.updateArchivesByType(archivesEntity); + // } + // break; + // case "73"://客商辅助核算 + // break; + // case "D01"://税率 + // break; + // case "jobass"://项目辅助核算 + // break; + // case "93"://银行类别 + // break; + // case "96"://银行账户 + // break; + // case "22"://资产类别 + // break; + // default: + // break; + // } + // return resultEntity; + // }else { + // return resultEntity; + // } + // }else { + // return resultEntity; + // } + //}else { + // //解析返回 + // return resultEntity; + //} + } catch (Exception e) { + logger.error("请求错误:" + e.getMessage()); + body.append(e.getMessage()); + return BaseResult.getFailureMessageEntity("转发失败", body); + } finally { + try { + // 关闭响应对象 + if (response != null) { + response.close(); + } + // 关闭响应对象 + if (closeableHttpClient != null) { + closeableHttpClient.close(); + } + } catch (IOException e) { + e.printStackTrace(); + } + } + } + + /** + * @param object + * @return com.hzya.frame.web.entity.JsonResultEntity + * @Author lvleigang + * @Description 档案删除 + * @Date 3:42 下午 2024/4/24 + **/ + @Override + public Object thirdInterfaceArchivesDelete(JSONObject object) { + JSONObject jsonObject = object.getJSONObject("jsonStr"); + if (jsonObject == null) { + return BaseResult.getFailureMessageEntity("数据为空,请先传递数据"); + } + if (!checkStr(jsonObject.getString("archivesType"))) { + return BaseResult.getFailureMessageEntity("档案类型为空"); + } + if (!checkStr(jsonObject.getString("usercode"))) { + return BaseResult.getFailureMessageEntity("usercode为空"); + } + if (!checkStr(jsonObject.getString("password"))) { + return BaseResult.getFailureMessageEntity("password为空"); + } + if (!checkStr(jsonObject.getString("trantype"))) { + return BaseResult.getFailureMessageEntity("trantype为空"); + } + if (!checkStr(jsonObject.getString("system"))) { + return BaseResult.getFailureMessageEntity("system为空"); + } + if (!checkStr(jsonObject.getString("data"))) { + return BaseResult.getFailureMessageEntity("data为空"); + } + List fzhs = Arrays.asList(new String[]{"1", "2", "6", "73", "D01", "jobass", "93", "96", "22"}); + if (!fzhs.contains(jsonObject.getString("archivesType"))) { + return BaseResult.getFailureMessageEntity("档案类型错误,请联系管理员"); + } + HttpClientBuilder httpClientBuilder = HttpClientBuilder.create(); + // HttpClient + CloseableHttpClient closeableHttpClient = httpClientBuilder.disableCookieManagement().build(); + HttpPost post = new HttpPost(voucherUrl); + RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(60000).build(); + post.setConfig(requestConfig);//设置请求参数【超时时间】 + post.setHeader("usercode", jsonObject.getString("usercode")); + post.setHeader("password", jsonObject.getString("password")); + post.setHeader("trantype", jsonObject.getString("trantype")); + post.setHeader("system", jsonObject.getString("system")); + post.setHeader("publicKey", publicKey); + post.setHeader("secretKey", secretKey); + post.setHeader("appId", appId); + CloseableHttpResponse response = null; + switch (jsonObject.getString("archivesType")) { + case "1"://人员对照 + post.setHeader("apiCode", ryApiCodesc); + break; + case "2"://部门档案 + post.setHeader("apiCode", bmApiCodesc); + break; + case "6"://存货对照 + post.setHeader("apiCode", chApiCodesc); + break; + case "73"://客商辅助核算 + post.setHeader("apiCode", ksApiCodesc); + break; + case "D01"://税率 + post.setHeader("apiCode", slApiCodesc); + break; + case "jobass"://项目辅助核算 + post.setHeader("apiCode", xmApiCodesc); + break; + case "93"://银行类别 + post.setHeader("apiCode", yhlbApiCodesc); + break; + case "96"://银行账户 + post.setHeader("apiCode", yhzhApiCodesc); + break; + case "22"://资产类别 + post.setHeader("apiCode", zcApiCodesc); + break; + default: + break; + } + StringBuilder body = new StringBuilder(); + try { + ByteArrayEntity byteArrayEntity = new ByteArrayEntity(jsonObject.getString("data").getBytes("UTF-8")); + byteArrayEntity.setContentType("application/json"); + post.setEntity(byteArrayEntity); + response = closeableHttpClient.execute(post); + HttpEntity httpEntity = response.getEntity(); + synchronized (lock) { + body.append(EntityUtils.toString(httpEntity)); + } + logger.info("返回结果:" + body); + JsonResultEntity resultEntity = JSON.parseObject(body.toString(), JsonResultEntity.class); + return resultEntity; + //JsonResultEntity resultEntity = JSON.parseObject(body.toString(),JsonResultEntity.class); + //if(resultEntity.isFlag() && "200".equals(resultEntity.getStatus())){ + // if(JSONUtil.isTypeJSON(resultEntity.getAttribute().toString())){ + // //JSONObject attribute = JSONObject.parseObject(resultEntity.getAttribute().toString()); + // JSONObject attribute = JSONObject.parseObject("{\n" + + // " \"status\": \"success\",\n" + + // " \"data\": \"[{\\\"pk_invcl\\\":\\\"0001F11000000000I6NN\\\",\\\"invclasscode\\\":\\\"04\\\",\\\"invclassname\\\":\\\"成品测试\\\",\\\"invclasslev\\\":\\\"1\\\",\\\"pk_corp\\\":\\\"0001\\\",\\\"unitcode\\\":\\\"0001\\\",\\\"unitname\\\":\\\"集团\\\"}]\",\n" + + // " \"taskNumber\": \"202404250048\"\n" + + // "}"); + // if("success".equals(attribute.getString("status"))){ + // if(attribute.getString("data") == null || "".equals(attribute.getString("data")) ){ + // return resultEntity; + // } + // JSONArray jsonArray = JSONArray.parseArray(attribute.getString("data")); + // if(jsonArray == null || jsonArray.size() == 0 ){ + // return resultEntity; + // } + // //解析具体数据 + // switch (jsonObject.getString("archivesType")){ + // case "1"://人员对照 + // break; + // case "2"://部门档案 + // break; + // case "6"://存货对照 + // for (int i = 0; i < jsonArray.size(); i++) { + // JSONObject object1 = jsonArray.getJSONObject(i); + // ArchivesEntity archivesEntity = new ArchivesEntity(); + // archivesEntity.setArchivesType(jsonObject.getString("archivesType")); + // archivesEntity.setUpdate(); + // archivesEntity.setLeftCode(object1.getString("invclasscode"));//左 + // archivesEntity.setLeftName(object1.getString("invclassname"));//左 + // archivesEntity.setRightId(object1.getString("pk_invcl"));//右 + // archivesEntity.setRightCode(object1.getString("invclasscode"));//右 + // archivesEntity.setRightName(object1.getString("invclassname"));//右 + // axDao.deleteArchivesByType(archivesEntity); + // } + // break; + // case "73"://客商辅助核算 + // break; + // case "D01"://税率 + // break; + // case "jobass"://项目辅助核算 + // break; + // case "93"://银行类别 + // break; + // case "96"://银行账户 + // break; + // case "22"://资产类别 + // break; + // default: + // break; + // } + // return resultEntity; + // }else { + // return resultEntity; + // } + // }else { + // return resultEntity; + // } + //}else { + // //解析返回 + // return resultEntity; + //} + } catch (Exception e) { + logger.error("请求错误:" + e.getMessage()); + body.append(e.getMessage()); + return BaseResult.getFailureMessageEntity("转发失败", body); + } finally { + try { + // 关闭响应对象 + if (response != null) { + response.close(); + } + // 关闭响应对象 + if (closeableHttpClient != null) { + closeableHttpClient.close(); + } + } catch (IOException e) { + e.printStackTrace(); + } + } + } +} diff --git a/fw-u8c/src/main/java/com/hzya/frame/u8c/bdCumandoc/dao/IBdCumandocDao.java b/fw-u8c/src/main/java/com/hzya/frame/u8c/bdCumandoc/dao/IBdCumandocDao.java new file mode 100644 index 00000000..a9850410 --- /dev/null +++ b/fw-u8c/src/main/java/com/hzya/frame/u8c/bdCumandoc/dao/IBdCumandocDao.java @@ -0,0 +1,26 @@ +package com.hzya.frame.u8c.bdCumandoc.dao; + +import com.hzya.frame.basedao.dao.IBaseDao; +import com.hzya.frame.u8c.bdCumandoc.entity.BdCumandocEntity; + +import java.util.List; + + +/** + * (bd_cumandoc: table)表数据库访问层 + * + * @author makejava + * @since 2023-08-25 09:42:24 + */ +public interface IBdCumandocDao extends IBaseDao { +/** + * + * @content 通过组织以及客户编码查询客户管理档案主键 + * @author javaboy + * @date 2024/1/24 0024 13:58 + * + */ + + List selectIdByCodeAndCorp(BdCumandocEntity cumandoc); +} + diff --git a/fw-u8c/src/main/java/com/hzya/frame/u8c/bdCumandoc/dao/impl/BdCumandocDaoImpl.java b/fw-u8c/src/main/java/com/hzya/frame/u8c/bdCumandoc/dao/impl/BdCumandocDaoImpl.java new file mode 100644 index 00000000..2c16fb40 --- /dev/null +++ b/fw-u8c/src/main/java/com/hzya/frame/u8c/bdCumandoc/dao/impl/BdCumandocDaoImpl.java @@ -0,0 +1,26 @@ +package com.hzya.frame.u8c.bdCumandoc.dao.impl; + +import com.baomidou.dynamic.datasource.annotation.DS; +import com.hzya.frame.basedao.dao.MybatisGenericDao; +import com.hzya.frame.u8c.bdCumandoc.dao.IBdCumandocDao; +import com.hzya.frame.u8c.bdCumandoc.entity.BdCumandocEntity; +import org.springframework.stereotype.Repository; + +import java.util.List; + + +/** + * (BdCumandoc)表数据库访问层 + * + * @author makejava + * @since 2023-08-25 09:42:24 + */ +@Repository("U8cBdCumandocDaoImpl") +public class BdCumandocDaoImpl extends MybatisGenericDao implements IBdCumandocDao { + @DS("sowow_sqlserver_pro") + @Override + public List selectIdByCodeAndCorp(BdCumandocEntity cumandoc) { + return (List) super.selectList("com.hzya.frame.u8c.bdCumandoc.dao.impl.BdCumandocDaoImpl.entity_list_base",cumandoc); + } +} + diff --git a/fw-u8c/src/main/java/com/hzya/frame/u8c/bdCumandoc/entity/BdCumandocEntity.java b/fw-u8c/src/main/java/com/hzya/frame/u8c/bdCumandoc/entity/BdCumandocEntity.java new file mode 100644 index 00000000..a059aab0 --- /dev/null +++ b/fw-u8c/src/main/java/com/hzya/frame/u8c/bdCumandoc/entity/BdCumandocEntity.java @@ -0,0 +1,874 @@ +package com.hzya.frame.u8c.bdCumandoc.entity; + +import com.hzya.frame.web.entity.BaseEntity; + +/** + * (BdCumandoc)实体类-客商管理档案 + * + * @author makejava + * @since 2023-08-25 09:42:24 + */ +public class BdCumandocEntity extends BaseEntity { + + private String accawmny; + private String acclimit; + private String acclimitcontrol; + private String acclmtbegindate; + private String balancemny; + private String bp; + private String busawmny; + private String cmnecode; + private String cooperateflag; + private String cooperatingdayfrom; + private String cooperatingdayto; + private String correspsettleunit; + private String createtime; + private String creator; + private String creditcontrol; + private String creditlevel; + private String creditlimitnum; + private String creditmny; + private String creditmoney; + private Long credlimitflag; + private String custflag; + private Long custstate; + private String def1; + private String def10; + private String def11; + private String def12; + private String def13; + private String def14; + private String def15; + private String def16; + private String def17; + private String def18; + private String def19; + private String def2; + private String def20; + private String def21; + private String def22; + private String def23; + private String def24; + private String def25; + private String def26; + private String def27; + private String def28; + private String def29; + private String def3; + private String def30; + private String def4; + private String def5; + private String def6; + private String def7; + private String def8; + private String def9; + private String developdate; + private String diffcurrflag; + private String discountrate; + private Long dr; + private String freeofacclmtcheck; + private String freeofcremnycheck; + private String frozendate; + private String frozenflag; + private Long grade; + private Long innerctldays; + private String iounit; + private String isagent; + private String ispromtesettlement; + private String linkman; + private String memo; + private String mobilephone; + private String modifier; + private String modifytime; + private String ordawmny; + private String pkCalbody; + private String pkCorp; + private String pkCubasdoc; + private String pkCumandoc; + private String pkCurrtype1; + private String pkCusmandoc2; + private String pkCusmandoc3; + private String pkDefbusitype; + private String pkPayterm; + private String pkPricegroupcorp; + private String pkRespdept1; + private String pkResppsn1; + private String pkSalestru; + private String pkSendtype; + private String pkSettleunit; + private String pkStordoc2; + private Long prepaidratio; + private String ratifydate; + private String sealflag; + private Long stockpriceratio; + private String testsalemoney; + private String ts; + private String custcode; + + public String getCustcode() { + return custcode; + } + + public void setCustcode(String custcode) { + this.custcode = custcode; + } + + /** + * 多个custflag值查询 + */ + private String custflags; + + public String getCustflags() { + return custflags; + } + + public void setCustflags(String custflags) { + this.custflags = custflags; + } + + public String getAccawmny() { + return accawmny; + } + + public void setAccawmny(String accawmny) { + this.accawmny = accawmny; + } + + public String getAcclimit() { + return acclimit; + } + + public void setAcclimit(String acclimit) { + this.acclimit = acclimit; + } + + public String getAcclimitcontrol() { + return acclimitcontrol; + } + + public void setAcclimitcontrol(String acclimitcontrol) { + this.acclimitcontrol = acclimitcontrol; + } + + public String getAcclmtbegindate() { + return acclmtbegindate; + } + + public void setAcclmtbegindate(String acclmtbegindate) { + this.acclmtbegindate = acclmtbegindate; + } + + public String getBalancemny() { + return balancemny; + } + + public void setBalancemny(String balancemny) { + this.balancemny = balancemny; + } + + public String getBp() { + return bp; + } + + public void setBp(String bp) { + this.bp = bp; + } + + public String getBusawmny() { + return busawmny; + } + + public void setBusawmny(String busawmny) { + this.busawmny = busawmny; + } + + public String getCmnecode() { + return cmnecode; + } + + public void setCmnecode(String cmnecode) { + this.cmnecode = cmnecode; + } + + public String getCooperateflag() { + return cooperateflag; + } + + public void setCooperateflag(String cooperateflag) { + this.cooperateflag = cooperateflag; + } + + public String getCooperatingdayfrom() { + return cooperatingdayfrom; + } + + public void setCooperatingdayfrom(String cooperatingdayfrom) { + this.cooperatingdayfrom = cooperatingdayfrom; + } + + public String getCooperatingdayto() { + return cooperatingdayto; + } + + public void setCooperatingdayto(String cooperatingdayto) { + this.cooperatingdayto = cooperatingdayto; + } + + public String getCorrespsettleunit() { + return correspsettleunit; + } + + public void setCorrespsettleunit(String correspsettleunit) { + this.correspsettleunit = correspsettleunit; + } + + public String getCreatetime() { + return createtime; + } + + public void setCreatetime(String createtime) { + this.createtime = createtime; + } + + public String getCreator() { + return creator; + } + + public void setCreator(String creator) { + this.creator = creator; + } + + public String getCreditcontrol() { + return creditcontrol; + } + + public void setCreditcontrol(String creditcontrol) { + this.creditcontrol = creditcontrol; + } + + public String getCreditlevel() { + return creditlevel; + } + + public void setCreditlevel(String creditlevel) { + this.creditlevel = creditlevel; + } + + public String getCreditlimitnum() { + return creditlimitnum; + } + + public void setCreditlimitnum(String creditlimitnum) { + this.creditlimitnum = creditlimitnum; + } + + public String getCreditmny() { + return creditmny; + } + + public void setCreditmny(String creditmny) { + this.creditmny = creditmny; + } + + public String getCreditmoney() { + return creditmoney; + } + + public void setCreditmoney(String creditmoney) { + this.creditmoney = creditmoney; + } + + public Long getCredlimitflag() { + return credlimitflag; + } + + public void setCredlimitflag(Long credlimitflag) { + this.credlimitflag = credlimitflag; + } + + public String getCustflag() { + return custflag; + } + + public void setCustflag(String custflag) { + this.custflag = custflag; + } + + public Long getCuststate() { + return custstate; + } + + public void setCuststate(Long custstate) { + this.custstate = custstate; + } + + public String getDef1() { + return def1; + } + + public void setDef1(String def1) { + this.def1 = def1; + } + + public String getDef10() { + return def10; + } + + public void setDef10(String def10) { + this.def10 = def10; + } + + public String getDef11() { + return def11; + } + + public void setDef11(String def11) { + this.def11 = def11; + } + + public String getDef12() { + return def12; + } + + public void setDef12(String def12) { + this.def12 = def12; + } + + public String getDef13() { + return def13; + } + + public void setDef13(String def13) { + this.def13 = def13; + } + + public String getDef14() { + return def14; + } + + public void setDef14(String def14) { + this.def14 = def14; + } + + public String getDef15() { + return def15; + } + + public void setDef15(String def15) { + this.def15 = def15; + } + + public String getDef16() { + return def16; + } + + public void setDef16(String def16) { + this.def16 = def16; + } + + public String getDef17() { + return def17; + } + + public void setDef17(String def17) { + this.def17 = def17; + } + + public String getDef18() { + return def18; + } + + public void setDef18(String def18) { + this.def18 = def18; + } + + public String getDef19() { + return def19; + } + + public void setDef19(String def19) { + this.def19 = def19; + } + + public String getDef2() { + return def2; + } + + public void setDef2(String def2) { + this.def2 = def2; + } + + public String getDef20() { + return def20; + } + + public void setDef20(String def20) { + this.def20 = def20; + } + + public String getDef21() { + return def21; + } + + public void setDef21(String def21) { + this.def21 = def21; + } + + public String getDef22() { + return def22; + } + + public void setDef22(String def22) { + this.def22 = def22; + } + + public String getDef23() { + return def23; + } + + public void setDef23(String def23) { + this.def23 = def23; + } + + public String getDef24() { + return def24; + } + + public void setDef24(String def24) { + this.def24 = def24; + } + + public String getDef25() { + return def25; + } + + public void setDef25(String def25) { + this.def25 = def25; + } + + public String getDef26() { + return def26; + } + + public void setDef26(String def26) { + this.def26 = def26; + } + + public String getDef27() { + return def27; + } + + public void setDef27(String def27) { + this.def27 = def27; + } + + public String getDef28() { + return def28; + } + + public void setDef28(String def28) { + this.def28 = def28; + } + + public String getDef29() { + return def29; + } + + public void setDef29(String def29) { + this.def29 = def29; + } + + public String getDef3() { + return def3; + } + + public void setDef3(String def3) { + this.def3 = def3; + } + + public String getDef30() { + return def30; + } + + public void setDef30(String def30) { + this.def30 = def30; + } + + public String getDef4() { + return def4; + } + + public void setDef4(String def4) { + this.def4 = def4; + } + + public String getDef5() { + return def5; + } + + public void setDef5(String def5) { + this.def5 = def5; + } + + public String getDef6() { + return def6; + } + + public void setDef6(String def6) { + this.def6 = def6; + } + + public String getDef7() { + return def7; + } + + public void setDef7(String def7) { + this.def7 = def7; + } + + public String getDef8() { + return def8; + } + + public void setDef8(String def8) { + this.def8 = def8; + } + + public String getDef9() { + return def9; + } + + public void setDef9(String def9) { + this.def9 = def9; + } + + public String getDevelopdate() { + return developdate; + } + + public void setDevelopdate(String developdate) { + this.developdate = developdate; + } + + public String getDiffcurrflag() { + return diffcurrflag; + } + + public void setDiffcurrflag(String diffcurrflag) { + this.diffcurrflag = diffcurrflag; + } + + public String getDiscountrate() { + return discountrate; + } + + public void setDiscountrate(String discountrate) { + this.discountrate = discountrate; + } + + public Long getDr() { + return dr; + } + + public void setDr(Long dr) { + this.dr = dr; + } + + public String getFreeofacclmtcheck() { + return freeofacclmtcheck; + } + + public void setFreeofacclmtcheck(String freeofacclmtcheck) { + this.freeofacclmtcheck = freeofacclmtcheck; + } + + public String getFreeofcremnycheck() { + return freeofcremnycheck; + } + + public void setFreeofcremnycheck(String freeofcremnycheck) { + this.freeofcremnycheck = freeofcremnycheck; + } + + public String getFrozendate() { + return frozendate; + } + + public void setFrozendate(String frozendate) { + this.frozendate = frozendate; + } + + public String getFrozenflag() { + return frozenflag; + } + + public void setFrozenflag(String frozenflag) { + this.frozenflag = frozenflag; + } + + public Long getGrade() { + return grade; + } + + public void setGrade(Long grade) { + this.grade = grade; + } + + public Long getInnerctldays() { + return innerctldays; + } + + public void setInnerctldays(Long innerctldays) { + this.innerctldays = innerctldays; + } + + public String getIounit() { + return iounit; + } + + public void setIounit(String iounit) { + this.iounit = iounit; + } + + public String getIsagent() { + return isagent; + } + + public void setIsagent(String isagent) { + this.isagent = isagent; + } + + public String getIspromtesettlement() { + return ispromtesettlement; + } + + public void setIspromtesettlement(String ispromtesettlement) { + this.ispromtesettlement = ispromtesettlement; + } + + public String getLinkman() { + return linkman; + } + + public void setLinkman(String linkman) { + this.linkman = linkman; + } + + public String getMemo() { + return memo; + } + + public void setMemo(String memo) { + this.memo = memo; + } + + public String getMobilephone() { + return mobilephone; + } + + public void setMobilephone(String mobilephone) { + this.mobilephone = mobilephone; + } + + public String getModifier() { + return modifier; + } + + public void setModifier(String modifier) { + this.modifier = modifier; + } + + public String getModifytime() { + return modifytime; + } + + public void setModifytime(String modifytime) { + this.modifytime = modifytime; + } + + public String getOrdawmny() { + return ordawmny; + } + + public void setOrdawmny(String ordawmny) { + this.ordawmny = ordawmny; + } + + public String getPkCalbody() { + return pkCalbody; + } + + public void setPkCalbody(String pkCalbody) { + this.pkCalbody = pkCalbody; + } + + public String getPkCorp() { + return pkCorp; + } + + public void setPkCorp(String pkCorp) { + this.pkCorp = pkCorp; + } + + public String getPkCubasdoc() { + return pkCubasdoc; + } + + public void setPkCubasdoc(String pkCubasdoc) { + this.pkCubasdoc = pkCubasdoc; + } + + public String getPkCumandoc() { + return pkCumandoc; + } + + public void setPkCumandoc(String pkCumandoc) { + this.pkCumandoc = pkCumandoc; + } + + public String getPkCurrtype1() { + return pkCurrtype1; + } + + public void setPkCurrtype1(String pkCurrtype1) { + this.pkCurrtype1 = pkCurrtype1; + } + + public String getPkCusmandoc2() { + return pkCusmandoc2; + } + + public void setPkCusmandoc2(String pkCusmandoc2) { + this.pkCusmandoc2 = pkCusmandoc2; + } + + public String getPkCusmandoc3() { + return pkCusmandoc3; + } + + public void setPkCusmandoc3(String pkCusmandoc3) { + this.pkCusmandoc3 = pkCusmandoc3; + } + + public String getPkDefbusitype() { + return pkDefbusitype; + } + + public void setPkDefbusitype(String pkDefbusitype) { + this.pkDefbusitype = pkDefbusitype; + } + + public String getPkPayterm() { + return pkPayterm; + } + + public void setPkPayterm(String pkPayterm) { + this.pkPayterm = pkPayterm; + } + + public String getPkPricegroupcorp() { + return pkPricegroupcorp; + } + + public void setPkPricegroupcorp(String pkPricegroupcorp) { + this.pkPricegroupcorp = pkPricegroupcorp; + } + + public String getPkRespdept1() { + return pkRespdept1; + } + + public void setPkRespdept1(String pkRespdept1) { + this.pkRespdept1 = pkRespdept1; + } + + public String getPkResppsn1() { + return pkResppsn1; + } + + public void setPkResppsn1(String pkResppsn1) { + this.pkResppsn1 = pkResppsn1; + } + + public String getPkSalestru() { + return pkSalestru; + } + + public void setPkSalestru(String pkSalestru) { + this.pkSalestru = pkSalestru; + } + + public String getPkSendtype() { + return pkSendtype; + } + + public void setPkSendtype(String pkSendtype) { + this.pkSendtype = pkSendtype; + } + + public String getPkSettleunit() { + return pkSettleunit; + } + + public void setPkSettleunit(String pkSettleunit) { + this.pkSettleunit = pkSettleunit; + } + + public String getPkStordoc2() { + return pkStordoc2; + } + + public void setPkStordoc2(String pkStordoc2) { + this.pkStordoc2 = pkStordoc2; + } + + public Long getPrepaidratio() { + return prepaidratio; + } + + public void setPrepaidratio(Long prepaidratio) { + this.prepaidratio = prepaidratio; + } + + public String getRatifydate() { + return ratifydate; + } + + public void setRatifydate(String ratifydate) { + this.ratifydate = ratifydate; + } + + public String getSealflag() { + return sealflag; + } + + public void setSealflag(String sealflag) { + this.sealflag = sealflag; + } + + public Long getStockpriceratio() { + return stockpriceratio; + } + + public void setStockpriceratio(Long stockpriceratio) { + this.stockpriceratio = stockpriceratio; + } + + public String getTestsalemoney() { + return testsalemoney; + } + + public void setTestsalemoney(String testsalemoney) { + this.testsalemoney = testsalemoney; + } + + public String getTs() { + return ts; + } + + public void setTs(String ts) { + this.ts = ts; + } + +} + diff --git a/fw-u8c/src/main/java/com/hzya/frame/u8c/bdCumandoc/entity/BdCumandocEntity.xml b/fw-u8c/src/main/java/com/hzya/frame/u8c/bdCumandoc/entity/BdCumandocEntity.xml new file mode 100644 index 00000000..8a00372f --- /dev/null +++ b/fw-u8c/src/main/java/com/hzya/frame/u8c/bdCumandoc/entity/BdCumandocEntity.xml @@ -0,0 +1,212 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + accawmny + ,acclimit + ,acclimitcontrol + ,acclmtbegindate + ,balancemny + ,bp + ,busawmny + ,cmnecode + ,cooperateflag + ,cooperatingdayfrom + ,cooperatingdayto + ,correspsettleunit + ,createtime + ,creator + ,creditcontrol + ,creditlevel + ,creditlimitnum + ,creditmny + ,creditmoney + ,credlimitflag + ,custflag + ,custstate + ,def1 + ,def10 + ,def11 + ,def12 + ,def13 + ,def14 + ,def15 + ,def16 + ,def17 + ,def18 + ,def19 + ,def2 + ,def20 + ,def21 + ,def22 + ,def23 + ,def24 + ,def25 + ,def26 + ,def27 + ,def28 + ,def29 + ,def3 + ,def30 + ,def4 + ,def5 + ,def6 + ,def7 + ,def8 + ,def9 + ,developdate + ,diffcurrflag + ,discountrate + ,dr + ,freeofacclmtcheck + ,freeofcremnycheck + ,frozendate + ,frozenflag + ,grade + ,innerctldays + ,iounit + ,isagent + ,ispromtesettlement + ,linkman + ,memo + ,mobilephone + ,modifier + ,modifytime + ,ordawmny + ,pk_calbody + ,pk_corp + ,pk_cubasdoc + ,pk_cumandoc + ,pk_currtype1 + ,pk_cusmandoc2 + ,pk_cusmandoc3 + ,pk_defbusitype + ,pk_payterm + ,pk_pricegroupcorp + ,pk_respdept1 + ,pk_resppsn1 + ,pk_salestru + ,pk_sendtype + ,pk_settleunit + ,pk_stordoc2 + ,prepaidratio + ,ratifydate + ,sealflag + ,stockpriceratio + ,testsalemoney + ,ts + + + + + + diff --git a/fw-u8c/src/main/java/com/hzya/frame/u8c/bdcorp/dao/IBdCorpDao.java b/fw-u8c/src/main/java/com/hzya/frame/u8c/bdcorp/dao/IBdCorpDao.java new file mode 100644 index 00000000..b39d6075 --- /dev/null +++ b/fw-u8c/src/main/java/com/hzya/frame/u8c/bdcorp/dao/IBdCorpDao.java @@ -0,0 +1,40 @@ +package com.hzya.frame.u8c.bdcorp.dao; + +import com.hzya.frame.u8c.bdcorp.entity.BdCorpEntity; +import com.hzya.frame.basedao.dao.IBaseDao; + +import java.util.List; + +/** + * (bd_corp: table)表数据库访问层 + * + * @author makejava + * @since 2023-09-06 14:47:17 + */ +public interface IBdCorpDao extends IBaseDao { + /** + * + * @content 通过组织主键,采购组织编码获取采购组织主键 + * @author makejava + * @date 2023/12/11 0011 16:32 + * + */ + List getPoPkByOrg(BdCorpEntity poCorp); + /** + * + * @content 通过组织主键,采购组织编码获取库存组织主键 + * @author makejava + * @date 2023/12/11 0011 16:32 + * + */ + List getStockPkByOrg(BdCorpEntity poCorp); + /** + * + * @content 通过组织主键,销售组织编码获取销售组织主键 + * @author makejava + * @date 2023/12/11 0011 16:32 + * + */ + List getSoPkByOrg(BdCorpEntity poCorp); +} + diff --git a/fw-u8c/src/main/java/com/hzya/frame/u8c/bdcorp/dao/impl/BdCorpDaoImpl.java b/fw-u8c/src/main/java/com/hzya/frame/u8c/bdcorp/dao/impl/BdCorpDaoImpl.java new file mode 100644 index 00000000..93b952b2 --- /dev/null +++ b/fw-u8c/src/main/java/com/hzya/frame/u8c/bdcorp/dao/impl/BdCorpDaoImpl.java @@ -0,0 +1,36 @@ +package com.hzya.frame.u8c.bdcorp.dao.impl; + +import com.baomidou.dynamic.datasource.annotation.DS; +import com.hzya.frame.u8c.Invmandoc.entity.BdInvmandocEntity; +import com.hzya.frame.u8c.bdcorp.entity.BdCorpEntity; +import com.hzya.frame.u8c.bdcorp.dao.IBdCorpDao; +import org.springframework.stereotype.Repository; +import com.hzya.frame.basedao.dao.MybatisGenericDao; + +import java.util.List; + +/** + * (BdCorp)表数据库访问层 + * + * @author makejava + * @since 2023-09-06 14:47:17 + */ +@Repository("serviceBdCorpDaoImpl") +public class BdCorpDaoImpl extends MybatisGenericDao implements IBdCorpDao{ + @DS("sowow_sqlserver_pro") + @Override + public List getPoPkByOrg(BdCorpEntity poCorp) { + return (List) super.selectList("com.hzya.frame.u8c.bdcorp.dao.impl.BdCorpDaoImpl.entity_list_base_po", poCorp); + } + @DS("sowow_sqlserver_pro") + @Override + public List getStockPkByOrg(BdCorpEntity poCorp) { + return (List) super.selectList("com.hzya.frame.u8c.bdcorp.dao.impl.BdCorpDaoImpl.entity_list_base_stock", poCorp); + } + @DS("sowow_sqlserver_pro") + @Override + public List getSoPkByOrg(BdCorpEntity poCorp) { + return (List) super.selectList("com.hzya.frame.u8c.bdcorp.dao.impl.BdCorpDaoImpl.entity_list_base_so", poCorp); + } +} + diff --git a/fw-u8c/src/main/java/com/hzya/frame/u8c/bdcorp/entity/BdCorpEntity.java b/fw-u8c/src/main/java/com/hzya/frame/u8c/bdcorp/entity/BdCorpEntity.java new file mode 100644 index 00000000..941c80fc --- /dev/null +++ b/fw-u8c/src/main/java/com/hzya/frame/u8c/bdcorp/entity/BdCorpEntity.java @@ -0,0 +1,51 @@ +package com.hzya.frame.u8c.bdcorp.entity; + +import com.hzya.frame.web.entity.BaseEntity; + +/** + * (BdCorp)实体类 + * + * @author makejava + * @since 2023-09-06 14:47:18 + */ +public class BdCorpEntity extends BaseEntity { + + private String pkPurorg;//采购组织主键 + private String pkCorp;//所属公司 + private String code;//编码 + private String pkCalbody;//库存组织主键 + + + public String getPkCalbody() { + return pkCalbody; + } + + public void setPkCalbody(String pkCalbody) { + this.pkCalbody = pkCalbody; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getPkPurorg() { + return pkPurorg; + } + + public void setPkPurorg(String pkPurorg) { + this.pkPurorg = pkPurorg; + } + + public String getPkCorp() { + return pkCorp; + } + + public void setPkCorp(String pkCorp) { + this.pkCorp = pkCorp; + } +} + diff --git a/fw-u8c/src/main/java/com/hzya/frame/u8c/bdcorp/entity/BdCorpEntity.xml b/fw-u8c/src/main/java/com/hzya/frame/u8c/bdcorp/entity/BdCorpEntity.xml new file mode 100644 index 00000000..ba5b5035 --- /dev/null +++ b/fw-u8c/src/main/java/com/hzya/frame/u8c/bdcorp/entity/BdCorpEntity.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + id + + + + + + + + + + diff --git a/fw-u8c/src/main/java/com/hzya/frame/u8c/bdcorp/service/IBdCorpService.java b/fw-u8c/src/main/java/com/hzya/frame/u8c/bdcorp/service/IBdCorpService.java new file mode 100644 index 00000000..fef77cff --- /dev/null +++ b/fw-u8c/src/main/java/com/hzya/frame/u8c/bdcorp/service/IBdCorpService.java @@ -0,0 +1,36 @@ +package com.hzya.frame.u8c.bdcorp.service; + +import com.hzya.frame.u8c.bdcorp.entity.BdCorpEntity; +import com.hzya.frame.basedao.service.IBaseService; +/** + * (BdCorp)表服务接口 + * + * @author makejava + * @since 2023-09-06 14:47:18 + */ +public interface IBdCorpService extends IBaseService{ +/** + * + * @content 通过组织主键,采购组织编码获取采购组织主键 + * @author makejava + * @date 2023/12/11 0011 16:32 + * + */ + BdCorpEntity getPoPkByOrg(BdCorpEntity poCorp); + /** + * + * @content 通过组织主键,库存组织编码获取库存组织主键 + * @author makejava + * @date 2023/12/11 0011 16:32 + * + */ + BdCorpEntity getStockPkByOrg(BdCorpEntity poCorp); + /** + * + * @content 通过组织主键,销售组织编码获取销售组织主键 + * @author makejava + * @date 2023/12/11 0011 16:32 + * + */ + BdCorpEntity getSoPkByOrg(BdCorpEntity poCorp); +} diff --git a/fw-u8c/src/main/java/com/hzya/frame/u8c/bdcorp/service/impl/BdCorpServiceImpl.java b/fw-u8c/src/main/java/com/hzya/frame/u8c/bdcorp/service/impl/BdCorpServiceImpl.java new file mode 100644 index 00000000..635da2de --- /dev/null +++ b/fw-u8c/src/main/java/com/hzya/frame/u8c/bdcorp/service/impl/BdCorpServiceImpl.java @@ -0,0 +1,54 @@ +package com.hzya.frame.u8c.bdcorp.service.impl; + +import com.hzya.frame.u8c.bdcorp.entity.BdCorpEntity; +import com.hzya.frame.u8c.bdcorp.dao.IBdCorpDao; +import com.hzya.frame.u8c.bdcorp.service.IBdCorpService; +import org.springframework.stereotype.Service; +import org.springframework.beans.factory.annotation.Autowired; +import javax.annotation.Resource; +import com.hzya.frame.basedao.service.impl.BaseService; + +import java.util.List; + +/** + * (BdCorp)表服务实现类 + * + * @author makejava + * @since 2023-09-06 14:47:18 + */ +@Service("serviceCorpServiceImpl") +public class BdCorpServiceImpl extends BaseService implements IBdCorpService { + + private IBdCorpDao bdCorpDao; + + @Autowired + public void setBdCorpDao(IBdCorpDao dao) { + this.bdCorpDao = dao; + this.dao = dao; + } + + @Override + public BdCorpEntity getPoPkByOrg(BdCorpEntity poCorp) { + List bdCorpEntityList = bdCorpDao.getPoPkByOrg(poCorp); + if(bdCorpEntityList != null && bdCorpEntityList.size() > 0){ + return bdCorpEntityList.get(0); + } + return null; + } + @Override + public BdCorpEntity getStockPkByOrg(BdCorpEntity poCorp) { + List bdCorpEntityList = bdCorpDao.getStockPkByOrg(poCorp); + if(bdCorpEntityList != null && bdCorpEntityList.size() > 0){ + return bdCorpEntityList.get(0); + } + return null; + } + @Override + public BdCorpEntity getSoPkByOrg(BdCorpEntity poCorp) { + List bdCorpEntityList = bdCorpDao.getSoPkByOrg(poCorp); + if(bdCorpEntityList != null && bdCorpEntityList.size() > 0){ + return bdCorpEntityList.get(0); + } + return null; + } +} diff --git a/fw-u8c/src/main/java/com/hzya/frame/u8c/util/U8cHttpUtil.java b/fw-u8c/src/main/java/com/hzya/frame/u8c/util/U8cHttpUtil.java new file mode 100644 index 00000000..7ca02d42 --- /dev/null +++ b/fw-u8c/src/main/java/com/hzya/frame/u8c/util/U8cHttpUtil.java @@ -0,0 +1,47 @@ +package com.hzya.frame.u8c.util; + +import cn.hutool.core.util.StrUtil; +import cn.hutool.http.HttpRequest; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; + +/** + * com.hzya.frame.u8c.util + * + * @author yqh + * @date 2023-11 -14 18:45 + */ + +public class U8cHttpUtil { + public static String baseUrl = "127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface"; + public static JSONObject sendOATOU8CEsb(String parm, String apiCode){ + + String result = HttpRequest.post(baseUrl) + .header("usercode", "admin")//头信息,多个头信息多次调用此方法即可 +// .header("needStackTrace", "Y")//头信息,多个头信息多次调用此方法即可 + .header("password", "eddea5c9f7fab1a9d18410cda784c224")//头信息,多个头信息多次调用此方法即可 + .header("trantype", "PK")//头信息,多个头信息多次调用此方法即可 + .header("system", "sowow")//头信息,多个头信息多次调用此方法即可 + .header("appId", "800005")//头信息,多个头信息多次调用此方法即可 + .header("apiCode", apiCode)//头信息,多个头信息多次调用此方法即可 + .header("publicKey", "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj")//头信息,多个头信息多次调用此方法即可 + .header("secretKey", "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//头信息,多个头信息多次调用此方法即可 + .body(parm)//表单内容 + .timeout(20000)//超时,毫秒 + .execute().body(); + if(StrUtil.isNotEmpty(result)){ + return analytic(result); + } + return null; + } + public static JSONObject analytic(String parm){ + JSONObject main = JSON.parseObject(parm); + String status = main.getString("status"); + if("200".equals(status)){ + String attribute = main.getString("attribute"); + JSONObject attributeObj = JSON.parseObject(attribute); + return attributeObj; + } + return null; + } +} diff --git a/fw-u8c/src/main/webapp/WEB-INF/web.xml b/fw-u8c/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 00000000..d80081d1 --- /dev/null +++ b/fw-u8c/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index fc53bd54..b305f8a0 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ - + fw-u8c com.hzya.frame