From e08274a00b32120f60995d46744d50fbf6d8698e Mon Sep 17 00:00:00 2001 From: yuqh <123456> Date: Tue, 5 Nov 2024 15:08:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AF=B9=E6=8E=A5CRM?= =?UTF-8?q?=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../frame/u8/otherin/dao/IOtherInDao.java | 37 ---- .../u8/otherin/dao/IOtherInDetailDao.java | 27 --- .../u8/otherin/dao/impl/OtherInDaoImpl.java | 31 --- .../dao/impl/OtherInDetailDaoImpl.java | 26 --- .../otherin/entity/OtherInDetailEntity.java | 68 ------ .../u8/otherin/entity/OtherInDetailEntity.xml | 84 -------- .../u8/otherin/entity/OtherInEntity.java | 120 ----------- .../frame/u8/otherin/entity/OtherInEntity.xml | 106 --------- .../otherin/service/IOtherInDetaiService.java | 15 -- .../u8/otherin/service/IOtherInService.java | 26 --- .../service/impl/OtherInDetaiServiceImpl.java | 23 -- .../service/impl/OtherInServiceImpl.java | 201 ----------------- .../frame/u8/otherout/dao/IOtherOutDao.java | 37 ---- .../u8/otherout/dao/IOtherOutDetailDao.java | 28 --- .../u8/otherout/dao/impl/OtherOutDaoImpl.java | 31 --- .../dao/impl/OtherOutDetailDaoImpl.java | 26 --- .../otherout/entity/OtherOutDetailEntity.java | 49 ----- .../otherout/entity/OtherOutDetailEntity.xml | 62 ------ .../u8/otherout/entity/OtherOutEntity.java | 119 ---------- .../u8/otherout/entity/OtherOutEntity.xml | 102 --------- .../service/IOtherOutDetaiService.java | 15 -- .../u8/otherout/service/IOtherOutService.java | 26 --- .../impl/OtherOutDetaiServiceImpl.java | 23 -- .../service/impl/OtherOutServiceImpl.java | 190 ---------------- .../frame/u8/receipt/dao/IReceiptDao.java | 37 ---- .../u8/receipt/dao/IReceiptDetailDao.java | 15 -- .../u8/receipt/dao/impl/ReceiptDaoImpl.java | 31 --- .../dao/impl/ReceiptDetailDaoImpl.java | 18 -- .../receipt/entity/ReceiptDetailEntity.java | 32 --- .../u8/receipt/entity/ReceiptDetailEntity.xml | 11 - .../u8/receipt/entity/ReceiptEntity.java | 126 ----------- .../frame/u8/receipt/entity/ReceiptEntity.xml | 121 ----------- .../receipt/service/IReceiptDetaiService.java | 15 -- .../u8/receipt/service/IReceiptService.java | 27 --- .../service/impl/ReceiptDetaiServiceImpl.java | 23 -- .../service/impl/ReceiptServiceImpl.java | 168 --------------- .../frame/u8/saleinv/dao/ISaleInvDao.java | 37 ---- .../u8/saleinv/dao/ISaleInvDetailDao.java | 27 --- .../u8/saleinv/dao/impl/SaleInvDaoImpl.java | 32 --- .../dao/impl/SaleInvDetailDaoImpl.java | 26 --- .../saleinv/entity/SaleInvDetailEntity.java | 67 ------ .../u8/saleinv/entity/SaleInvDetailEntity.xml | 72 ------- .../u8/saleinv/entity/SaleInvEntity.java | 107 --------- .../frame/u8/saleinv/entity/SaleInvEntity.xml | 109 ---------- .../saleinv/service/ISaleInvDetaiService.java | 15 -- .../u8/saleinv/service/ISaleInvService.java | 27 --- .../service/impl/SaleInvDetaiServiceImpl.java | 23 -- .../service/impl/SaleInvServiceImpl.java | 191 ---------------- .../frame/u8/saleout/dao/ISaleOutDao.java | 32 --- .../u8/saleout/dao/ISaleOutDetailDao.java | 25 --- .../u8/saleout/dao/impl/SaleOutDaoImpl.java | 28 --- .../dao/impl/SaleOutDetailDaoImpl.java | 23 -- .../saleout/entity/SaleOutDetailEntity.java | 76 ------- .../u8/saleout/entity/SaleOutDetailEntity.xml | 81 ------- .../u8/saleout/entity/SaleOutEntity.java | 102 --------- .../frame/u8/saleout/entity/SaleOutEntity.xml | 101 --------- .../saleout/service/ISaleOutDetaiService.java | 15 -- .../u8/saleout/service/ISaleOutService.java | 26 --- .../service/impl/SaleOutDetaiServiceImpl.java | 25 --- .../service/impl/SaleOutServiceImpl.java | 204 ------------------ 60 files changed, 3567 deletions(-) delete mode 100644 service/src/main/java/com/hzya/frame/u8/otherin/dao/IOtherInDao.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/otherin/dao/IOtherInDetailDao.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/otherin/dao/impl/OtherInDaoImpl.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/otherin/dao/impl/OtherInDetailDaoImpl.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/otherin/entity/OtherInDetailEntity.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/otherin/entity/OtherInDetailEntity.xml delete mode 100644 service/src/main/java/com/hzya/frame/u8/otherin/entity/OtherInEntity.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/otherin/entity/OtherInEntity.xml delete mode 100644 service/src/main/java/com/hzya/frame/u8/otherin/service/IOtherInDetaiService.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/otherin/service/IOtherInService.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/otherin/service/impl/OtherInDetaiServiceImpl.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/otherin/service/impl/OtherInServiceImpl.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/otherout/dao/IOtherOutDao.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/otherout/dao/IOtherOutDetailDao.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/otherout/dao/impl/OtherOutDaoImpl.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/otherout/dao/impl/OtherOutDetailDaoImpl.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/otherout/entity/OtherOutDetailEntity.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/otherout/entity/OtherOutDetailEntity.xml delete mode 100644 service/src/main/java/com/hzya/frame/u8/otherout/entity/OtherOutEntity.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/otherout/entity/OtherOutEntity.xml delete mode 100644 service/src/main/java/com/hzya/frame/u8/otherout/service/IOtherOutDetaiService.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/otherout/service/IOtherOutService.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/otherout/service/impl/OtherOutDetaiServiceImpl.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/otherout/service/impl/OtherOutServiceImpl.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/receipt/dao/IReceiptDao.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/receipt/dao/IReceiptDetailDao.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/receipt/dao/impl/ReceiptDaoImpl.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/receipt/dao/impl/ReceiptDetailDaoImpl.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/receipt/entity/ReceiptDetailEntity.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/receipt/entity/ReceiptDetailEntity.xml delete mode 100644 service/src/main/java/com/hzya/frame/u8/receipt/entity/ReceiptEntity.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/receipt/entity/ReceiptEntity.xml delete mode 100644 service/src/main/java/com/hzya/frame/u8/receipt/service/IReceiptDetaiService.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/receipt/service/IReceiptService.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/receipt/service/impl/ReceiptDetaiServiceImpl.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/receipt/service/impl/ReceiptServiceImpl.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/saleinv/dao/ISaleInvDao.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/saleinv/dao/ISaleInvDetailDao.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/saleinv/dao/impl/SaleInvDaoImpl.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/saleinv/dao/impl/SaleInvDetailDaoImpl.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/saleinv/entity/SaleInvDetailEntity.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/saleinv/entity/SaleInvDetailEntity.xml delete mode 100644 service/src/main/java/com/hzya/frame/u8/saleinv/entity/SaleInvEntity.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/saleinv/entity/SaleInvEntity.xml delete mode 100644 service/src/main/java/com/hzya/frame/u8/saleinv/service/ISaleInvDetaiService.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/saleinv/service/ISaleInvService.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/saleinv/service/impl/SaleInvDetaiServiceImpl.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/saleinv/service/impl/SaleInvServiceImpl.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/saleout/dao/ISaleOutDao.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/saleout/dao/ISaleOutDetailDao.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/saleout/dao/impl/SaleOutDaoImpl.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/saleout/dao/impl/SaleOutDetailDaoImpl.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/saleout/entity/SaleOutDetailEntity.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/saleout/entity/SaleOutDetailEntity.xml delete mode 100644 service/src/main/java/com/hzya/frame/u8/saleout/entity/SaleOutEntity.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/saleout/entity/SaleOutEntity.xml delete mode 100644 service/src/main/java/com/hzya/frame/u8/saleout/service/ISaleOutDetaiService.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/saleout/service/ISaleOutService.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/saleout/service/impl/SaleOutDetaiServiceImpl.java delete mode 100644 service/src/main/java/com/hzya/frame/u8/saleout/service/impl/SaleOutServiceImpl.java diff --git a/service/src/main/java/com/hzya/frame/u8/otherin/dao/IOtherInDao.java b/service/src/main/java/com/hzya/frame/u8/otherin/dao/IOtherInDao.java deleted file mode 100644 index b901f09e..00000000 --- a/service/src/main/java/com/hzya/frame/u8/otherin/dao/IOtherInDao.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.hzya.frame.u8.otherin.dao; - -import com.hzya.frame.basedao.dao.IBaseDao; -import com.hzya.frame.u8.otherin.entity.OtherInEntity; - -import java.util.List; - -/** - * - * @content 其他入库单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -public interface IOtherInDao extends IBaseDao { - /** - * - * @content 获取U8C其他入库单数据 - * @className: Administrator - * @author laborer - * @date 2024-10-18 14:52 - * - */ - - List getU8otherIn(OtherInEntity entity); -/** - * - * @content 修改状态 - * @className: Administrator - * @author laborer - * @date 2024-10-18 15:10 - * - */ - - int updateState(OtherInEntity sale); -} diff --git a/service/src/main/java/com/hzya/frame/u8/otherin/dao/IOtherInDetailDao.java b/service/src/main/java/com/hzya/frame/u8/otherin/dao/IOtherInDetailDao.java deleted file mode 100644 index e1b33276..00000000 --- a/service/src/main/java/com/hzya/frame/u8/otherin/dao/IOtherInDetailDao.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.hzya.frame.u8.otherin.dao; - -import com.hzya.frame.basedao.dao.IBaseDao; -import com.hzya.frame.u8.otherin.entity.OtherInDetailEntity; - -import java.util.List; - -/** - * - * @content 其他入库单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -public interface IOtherInDetailDao extends IBaseDao { - /** - * - * @content 获取其他入库单的明细数据 - * @className: Administrator - * @author laborer - * @date 2024-10-18 15:02 - * - */ - - List getU8OtherInLine(OtherInDetailEntity line); -} diff --git a/service/src/main/java/com/hzya/frame/u8/otherin/dao/impl/OtherInDaoImpl.java b/service/src/main/java/com/hzya/frame/u8/otherin/dao/impl/OtherInDaoImpl.java deleted file mode 100644 index b792d76c..00000000 --- a/service/src/main/java/com/hzya/frame/u8/otherin/dao/impl/OtherInDaoImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.hzya.frame.u8.otherin.dao.impl; - -import com.baomidou.dynamic.datasource.annotation.DS; -import com.hzya.frame.basedao.dao.MybatisGenericDao; -import com.hzya.frame.u8.otherin.dao.IOtherInDao; -import com.hzya.frame.u8.otherin.entity.OtherInEntity; -import org.springframework.stereotype.Repository; - -import java.util.List; - -/** - * - * @content 其他入库单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -@Repository(value = "OtherInDaoImpl") -public class OtherInDaoImpl extends MybatisGenericDao implements IOtherInDao { - @DS("#entity.dataSourceCode") - @Override - public List getU8otherIn(OtherInEntity entity) { - return (List) super.selectList("com.hzya.frame.u8.otherin.dao.impl.OtherInDaoImpl.entity_list_base",entity); - } - - @Override - public int updateState(OtherInEntity entity) { - return super.update("com.hzya.frame.u8.otherin.dao.impl.OtherInDaoImpl.entity_update",entity); - } -} diff --git a/service/src/main/java/com/hzya/frame/u8/otherin/dao/impl/OtherInDetailDaoImpl.java b/service/src/main/java/com/hzya/frame/u8/otherin/dao/impl/OtherInDetailDaoImpl.java deleted file mode 100644 index 653aa367..00000000 --- a/service/src/main/java/com/hzya/frame/u8/otherin/dao/impl/OtherInDetailDaoImpl.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.hzya.frame.u8.otherin.dao.impl; - -import com.baomidou.dynamic.datasource.annotation.DS; -import com.hzya.frame.basedao.dao.MybatisGenericDao; -import com.hzya.frame.u8.otherin.dao.IOtherInDetailDao; -import com.hzya.frame.u8.otherin.entity.OtherInDetailEntity; -import org.springframework.stereotype.Repository; - -import java.util.List; - -/** - * - * @content 其他入库单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -@Repository(value = "OtherInDetailDaoImpl") -public class OtherInDetailDaoImpl extends MybatisGenericDao implements IOtherInDetailDao { - @DS("#entity.dataSourceCode") - @Override - public List getU8OtherInLine(OtherInDetailEntity entity) { - return (List) super.selectList("com.hzya.frame.u8.otherin.dao.impl.OtherInDetailDaoImpl.entity_list_base",entity); - } -} diff --git a/service/src/main/java/com/hzya/frame/u8/otherin/entity/OtherInDetailEntity.java b/service/src/main/java/com/hzya/frame/u8/otherin/entity/OtherInDetailEntity.java deleted file mode 100644 index 0a1acff8..00000000 --- a/service/src/main/java/com/hzya/frame/u8/otherin/entity/OtherInDetailEntity.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.hzya.frame.u8.otherin.entity; - -import com.hzya.frame.web.entity.BaseEntity; - -/** - * - * @content 其他入库单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -public class OtherInDetailEntity extends BaseEntity { -private String cinvcode;//存货编码 -private String iquantity;//数量 -private String itvrowno;//调拨单行号 -private String irowno;//单据体行号 -private String AccCode;//账套编码 -private String AccId;//账套号 - - public String getAccCode() { - return AccCode; - } - - public void setAccCode(String accCode) { - AccCode = accCode; - } - - public String getAccId() { - return AccId; - } - - public void setAccId(String accId) { - AccId = accId; - } - - public String getCinvcode() { - return cinvcode; - } - - public void setCinvcode(String cinvcode) { - this.cinvcode = cinvcode; - } - - public String getIquantity() { - return iquantity; - } - - public void setIquantity(String iquantity) { - this.iquantity = iquantity; - } - - public String getItvrowno() { - return itvrowno; - } - - public void setItvrowno(String itvrowno) { - this.itvrowno = itvrowno; - } - - public String getIrowno() { - return irowno; - } - - public void setIrowno(String irowno) { - this.irowno = irowno; - } -} diff --git a/service/src/main/java/com/hzya/frame/u8/otherin/entity/OtherInDetailEntity.xml b/service/src/main/java/com/hzya/frame/u8/otherin/entity/OtherInDetailEntity.xml deleted file mode 100644 index ec758c32..00000000 --- a/service/src/main/java/com/hzya/frame/u8/otherin/entity/OtherInDetailEntity.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/service/src/main/java/com/hzya/frame/u8/otherin/entity/OtherInEntity.java b/service/src/main/java/com/hzya/frame/u8/otherin/entity/OtherInEntity.java deleted file mode 100644 index 8f79a027..00000000 --- a/service/src/main/java/com/hzya/frame/u8/otherin/entity/OtherInEntity.java +++ /dev/null @@ -1,120 +0,0 @@ -package com.hzya.frame.u8.otherin.entity; - -import com.hzya.frame.web.entity.BaseEntity; - -import java.util.List; - -/** - * - * @content 其他入库单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ - -public class OtherInEntity extends BaseEntity { - -private String ccode;//入库单号 -private String cbuscode;//调拨单号 -private String crdcode;//入库类别编码 -private String cwhcode;//仓库编码 -private String cmaker;//制单人 -private String AccId;//账套 -private String id;// -private String state;// -private String AccCode;// - private String ids;// - - public String getIds() { - return ids; - } - - public void setIds(String ids) { - this.ids = ids; - } - - public String getAccCode() { - return AccCode; - } - - public void setAccCode(String accCode) { - AccCode = accCode; - } - - private ListotherInDetailEntityList; - - public List getOtherInDetailEntityList() { - return otherInDetailEntityList; - } - - public void setOtherInDetailEntityList(List otherInDetailEntityList) { - this.otherInDetailEntityList = otherInDetailEntityList; - } - - public String getCcode() { - return ccode; - } - - public void setCcode(String ccode) { - this.ccode = ccode; - } - - public String getCbuscode() { - return cbuscode; - } - - public void setCbuscode(String cbuscode) { - this.cbuscode = cbuscode; - } - - public String getCrdcode() { - return crdcode; - } - - public void setCrdcode(String crdcode) { - this.crdcode = crdcode; - } - - public String getCwhcode() { - return cwhcode; - } - - public void setCwhcode(String cwhcode) { - this.cwhcode = cwhcode; - } - - public String getCmaker() { - return cmaker; - } - - public void setCmaker(String cmaker) { - this.cmaker = cmaker; - } - - public String getAccId() { - return AccId; - } - - public void setAccId(String accId) { - AccId = accId; - } - - @Override - public String getId() { - return id; - } - - @Override - public void setId(String id) { - this.id = id; - } - - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } -} diff --git a/service/src/main/java/com/hzya/frame/u8/otherin/entity/OtherInEntity.xml b/service/src/main/java/com/hzya/frame/u8/otherin/entity/OtherInEntity.xml deleted file mode 100644 index 836b6b40..00000000 --- a/service/src/main/java/com/hzya/frame/u8/otherin/entity/OtherInEntity.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - update #{AccCode}.dbo.RdRecord08 set sync_flag = #{state} - where id = #{id} - - diff --git a/service/src/main/java/com/hzya/frame/u8/otherin/service/IOtherInDetaiService.java b/service/src/main/java/com/hzya/frame/u8/otherin/service/IOtherInDetaiService.java deleted file mode 100644 index 33ef87fb..00000000 --- a/service/src/main/java/com/hzya/frame/u8/otherin/service/IOtherInDetaiService.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.hzya.frame.u8.otherin.service; - -import com.hzya.frame.basedao.service.IBaseService; -import com.hzya.frame.u8.otherin.entity.OtherInDetailEntity; - -/** - * - * @content 其他入库单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -public interface IOtherInDetaiService extends IBaseService { -} diff --git a/service/src/main/java/com/hzya/frame/u8/otherin/service/IOtherInService.java b/service/src/main/java/com/hzya/frame/u8/otherin/service/IOtherInService.java deleted file mode 100644 index 68bcda9b..00000000 --- a/service/src/main/java/com/hzya/frame/u8/otherin/service/IOtherInService.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.hzya.frame.u8.otherin.service; - -import com.alibaba.fastjson.JSONObject; -import com.hzya.frame.basedao.service.IBaseService; -import com.hzya.frame.u8.otherin.entity.OtherInEntity; - -/** - * - * @content 其他入库单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -public interface IOtherInService extends IBaseService { -/** - * - * @content 获取U8其他入库单数据推送CRM - * @className: Administrator - * @author laborer - * @date 2024-10-18 13:45 - * - */ - - void getU8OtherInToCrm(JSONObject requestJson); -} diff --git a/service/src/main/java/com/hzya/frame/u8/otherin/service/impl/OtherInDetaiServiceImpl.java b/service/src/main/java/com/hzya/frame/u8/otherin/service/impl/OtherInDetaiServiceImpl.java deleted file mode 100644 index f20a1c84..00000000 --- a/service/src/main/java/com/hzya/frame/u8/otherin/service/impl/OtherInDetaiServiceImpl.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.hzya.frame.u8.otherin.service.impl; - -import com.hzya.frame.basedao.service.impl.BaseService; -import com.hzya.frame.u8.otherin.entity.OtherInDetailEntity; -import com.hzya.frame.u8.otherin.service.IOtherInDetaiService; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.springframework.stereotype.Service; - -/** - * - * @content 其他入库单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -@Service(value = "OtherInDetaiServiceImpl") -public class OtherInDetaiServiceImpl extends BaseService implements IOtherInDetaiService { - Logger logger = LogManager.getLogger(getClass()); - - -} diff --git a/service/src/main/java/com/hzya/frame/u8/otherin/service/impl/OtherInServiceImpl.java b/service/src/main/java/com/hzya/frame/u8/otherin/service/impl/OtherInServiceImpl.java deleted file mode 100644 index 14baac05..00000000 --- a/service/src/main/java/com/hzya/frame/u8/otherin/service/impl/OtherInServiceImpl.java +++ /dev/null @@ -1,201 +0,0 @@ -package com.hzya.frame.u8.otherin.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.basedao.service.impl.BaseService; -import com.hzya.frame.crm.util.CrmUtil; -import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity; -import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService; -import com.hzya.frame.u8.otherin.dao.IOtherInDao; -import com.hzya.frame.u8.otherin.dao.IOtherInDetailDao; -import com.hzya.frame.u8.otherin.entity.OtherInDetailEntity; -import com.hzya.frame.u8.otherin.entity.OtherInEntity; -import com.hzya.frame.u8.otherin.service.IOtherInService; -import com.hzya.frame.u8.saleout.entity.SaleOutDetailEntity; -import com.hzya.frame.web.entity.JsonResultEntity; -import org.apache.commons.collections.CollectionUtils; -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 javax.annotation.Resource; -import java.util.Date; -import java.util.List; - -/** - * - * @content 其他入库单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -@Service(value = "OtherInServiceImpl") -public class OtherInServiceImpl extends BaseService implements IOtherInService { - Logger logger = LogManager.getLogger(getClass()); - @Autowired - private IOtherInDao otherInDao; - @Autowired - private IOtherInDetailDao otherInDetailDao; - @Resource - private IIntegrationTaskLivingDetailsService taskLivingDetailsService; -/** - * - * @content 获取U8其他入库单数据推送CRM - * @className: Administrator - * @author laborer - * @date 2024-10-18 13:46 - * - */ - - @Override - public void getU8OtherInToCrm(JSONObject requestJson) { - //获取重推信息id,并记录日志 - JSONObject requestJsonObj = JSON.parseObject(requestJson.toString(),JSONObject.class); - String interId = requestJsonObj.getString("integration_task_living_details_id"); - logger.info("U8其他入库单重推解析后:"+requestJsonObj.toString()); - logger.info("U8其他入库单推送CRM重新执行的任务主键:"+interId); - - //更换数据源 - JsonResultEntity resultEntity = new JsonResultEntity(); - OtherInEntity entity = new OtherInEntity(); - requestJson.put("db_code","YONYOUU8"); - entity.setDataSourceCode(requestJson.getString("db_code")); - - //根据重推信息id,查询该条重推记录信息 - IntegrationTaskLivingDetailsEntity oldMsg = new IntegrationTaskLivingDetailsEntity(); - if(StrUtil.isNotEmpty(interId)){ - oldMsg = taskLivingDetailsService.get(interId); - } - String rootAppPk = oldMsg.getRootAppPk(); - entity.setIds(rootAppPk); - StrUtil.isEmpty(rootAppPk);//entity.setQueryState("查询"); - //如果是重推,是否通过entity传入的id,只能查到一条数据。 - //entity.setId("-8845102890648320822"); - List soleList = otherInDao.getU8otherIn(entity); - logger.info("销售出库查询数据{}",JSONObject.toJSONString(soleList)); - if(CollectionUtils.isNotEmpty(soleList)){ - soleList.forEach(sale -> { - try{ - //获取明细数据进行拼接 - String id = sale.getId(); - if(!StrUtil.isEmpty(id)){ - OtherInDetailEntity line = new OtherInDetailEntity(); - line.setId(id); - line.setAccId(sale.getAccId()); - line.setDataSourceCode(requestJson.getString("db_code")); - List lineList = otherInDetailDao.getU8OtherInLine(line); - logger.info("其他入库单明细查询数据{}",JSONObject.toJSONString(lineList)); - sale.setOtherInDetailEntityList(lineList); - logger.info("组装数据"); - JSONObject main = bindingAdd(sale); - logger.info("销售出库推送数据:"+main.toString()); - String result = CrmUtil.sendU8TOCrmEsb(main.toString(), "8000340003"); - logger.info("销售出库推送结果:"+result); - IntegrationTaskLivingDetailsEntity logDetails = new IntegrationTaskLivingDetailsEntity(); - logDetails.setRootAppPk(sale.getIds()); - logDetails.setRootAppBill(sale.getCcode()); - logDetails.setNewTransmitInfo(result); - logDetails.setNewPushDate(new Date()); - logDetails.setRootAppNewData(JSON.toJSONString(sale)); - logDetails.setPluginId("SaleConPlugin"); - - JSONObject resultObj = JSON.parseObject(result); - boolean flag = resultObj.getString("code").equals("0"); - if(flag){ - // 推送成功,更新状态 - sale.setState("Y"); - logDetails.setNewTransmitInfo("推送成功"); - }else{ - // 推送失败 - sale.setState("N"); - } - sale.setDataSourceCode(requestJson.getString("db_code")); - try{ - saveLog(interId, logDetails, flag); - }catch (Exception e){ - logger.error("保存日志失败"+e.getMessage()); - otherInDao.updateState(sale); - e.printStackTrace(); - } - otherInDao.updateState(sale); - } - } catch (Exception e) { - logger.error("销售出库执行失败"+e.getMessage()); - e.printStackTrace(); - } - }); - - } - } - /** - * - * @content 保存日志信息 - * @className: Administrator - * @author laborer - * @date 2024-10-18 11:27 - * - */ - - private void saveLog(String interId, IntegrationTaskLivingDetailsEntity logDetails, boolean flag) throws Exception { - if(StrUtil.isEmpty(interId)){ - if(flag){ - //首推成功 - taskLivingDetailsService.saveLogToSuccess(logDetails); - }else{ - //首推失败 - taskLivingDetailsService.saveLogToFail(logDetails); - } - }else{ - logDetails.setId(interId); - if(flag){ - //重推成功 - taskLivingDetailsService.saveLogFailToSuccess(logDetails); - }else{ - //重推失败,把失败信息,更新到重推表中 - taskLivingDetailsService.updateLogFailToSuccess(logDetails); - } - } - } - - /** - * - * @content 组装推送参数 - * @className: Administrator - * @author laborer - * @date 2024-10-18 11:13 - * - */ - - private JSONObject bindingAdd(OtherInEntity sale) { - JSONObject main = new JSONObject(); - main.put("AccId",sale.getAccId()); - main.put("billid",sale.getId()); - main.put("LoginDate", DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss")); - JSONObject head = new JSONObject(); - head.put("ccode",sale.getCcode()); - head.put("cbuscode",sale.getCbuscode()); - head.put("crdcode",sale.getCrdcode()); - head.put("cwhcode",sale.getCwhcode()); - head.put("cmaker",sale.getCmaker()); - JSONArray body = new JSONArray(); - List lineList = sale.getOtherInDetailEntityList(); - if(CollectionUtils.isNotEmpty(lineList)){ - lineList.forEach(line -> { - JSONObject lineObj = new JSONObject(); - lineObj.put("cinvcode",line.getCinvcode()); - lineObj.put("iquantity",line.getIquantity()); - lineObj.put("itvrowno",line.getItvrowno()); - lineObj.put("irowno",line.getIrowno()); - body.add(lineObj); - }); - } - main.put("head",head); - main.put("body",body); - return main; - } -} diff --git a/service/src/main/java/com/hzya/frame/u8/otherout/dao/IOtherOutDao.java b/service/src/main/java/com/hzya/frame/u8/otherout/dao/IOtherOutDao.java deleted file mode 100644 index 558a3f4f..00000000 --- a/service/src/main/java/com/hzya/frame/u8/otherout/dao/IOtherOutDao.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.hzya.frame.u8.otherout.dao; - -import com.hzya.frame.basedao.dao.IBaseDao; -import com.hzya.frame.u8.otherout.entity.OtherOutEntity; - -import java.util.List; - -/** - * - * @content 其他出库单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -public interface IOtherOutDao extends IBaseDao { - /** - * - * @content 获取销售出库单数据 - * @className: Administrator - * @author laborer - * @date 2024-10-18 15:18 - * - */ - - List getU8SaleOut(OtherOutEntity entity); -/** - * - * @content 修改推送状态 - * @className: Administrator - * @author laborer - * @date 2024-10-18 15:22 - * - */ - - int updateState(OtherOutEntity sale); -} diff --git a/service/src/main/java/com/hzya/frame/u8/otherout/dao/IOtherOutDetailDao.java b/service/src/main/java/com/hzya/frame/u8/otherout/dao/IOtherOutDetailDao.java deleted file mode 100644 index b9a2ac71..00000000 --- a/service/src/main/java/com/hzya/frame/u8/otherout/dao/IOtherOutDetailDao.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.hzya.frame.u8.otherout.dao; - -import com.hzya.frame.basedao.dao.IBaseDao; -import com.hzya.frame.u8.otherout.entity.OtherOutDetailEntity; - -import java.util.List; - -/** - * - * @content 其他出库单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -public interface IOtherOutDetailDao extends IBaseDao { - /** - * - * @content 获取U8其他出库单行数据 - * @param line - * @className: Administrator - * @author laborer - * @date 2024-10-18 15:20 - * - */ - - List getU8otherOutLine(OtherOutDetailEntity line); -} diff --git a/service/src/main/java/com/hzya/frame/u8/otherout/dao/impl/OtherOutDaoImpl.java b/service/src/main/java/com/hzya/frame/u8/otherout/dao/impl/OtherOutDaoImpl.java deleted file mode 100644 index 7a938b59..00000000 --- a/service/src/main/java/com/hzya/frame/u8/otherout/dao/impl/OtherOutDaoImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.hzya.frame.u8.otherout.dao.impl; - -import com.baomidou.dynamic.datasource.annotation.DS; -import com.hzya.frame.basedao.dao.MybatisGenericDao; -import com.hzya.frame.u8.otherout.dao.IOtherOutDao; -import com.hzya.frame.u8.otherout.entity.OtherOutEntity; -import org.springframework.stereotype.Repository; - -import java.util.List; - -/** - * - * @content 其他出库单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -@Repository(value = "OtherOutDaoImpl") -public class OtherOutDaoImpl extends MybatisGenericDao implements IOtherOutDao { - @DS("#entity.dataSourceCode") - @Override - public List getU8SaleOut(OtherOutEntity entity) { - return (List) super.selectList("com.hzya.frame.u8.otherout.dao.impl.OtherOutDaoImpl.entity_list_base",entity); - } - @DS("#entity.dataSourceCode") - @Override - public int updateState(OtherOutEntity entity) { - return super.update("com.hzya.frame.u8.otherout.dao.impl.OtherOutDaoImpl.entity_update",entity); - } -} diff --git a/service/src/main/java/com/hzya/frame/u8/otherout/dao/impl/OtherOutDetailDaoImpl.java b/service/src/main/java/com/hzya/frame/u8/otherout/dao/impl/OtherOutDetailDaoImpl.java deleted file mode 100644 index 19881cad..00000000 --- a/service/src/main/java/com/hzya/frame/u8/otherout/dao/impl/OtherOutDetailDaoImpl.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.hzya.frame.u8.otherout.dao.impl; - -import com.baomidou.dynamic.datasource.annotation.DS; -import com.hzya.frame.basedao.dao.MybatisGenericDao; -import com.hzya.frame.u8.otherout.dao.IOtherOutDetailDao; -import com.hzya.frame.u8.otherout.entity.OtherOutDetailEntity; -import org.springframework.stereotype.Repository; - -import java.util.List; - -/** - * - * @content 其他出库单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -@Repository(value = "OtherOutDetailDaoImpl") -public class OtherOutDetailDaoImpl extends MybatisGenericDao implements IOtherOutDetailDao { - @DS("#entity.dataSourceCode") - @Override - public List getU8otherOutLine(OtherOutDetailEntity entity) { - return (List) selectList("com.hzya.frame.u8.otherout.dao.impl.OtherOutDetailDaoImpl.entity_list_base",entity); - } -} diff --git a/service/src/main/java/com/hzya/frame/u8/otherout/entity/OtherOutDetailEntity.java b/service/src/main/java/com/hzya/frame/u8/otherout/entity/OtherOutDetailEntity.java deleted file mode 100644 index 6b61fbf5..00000000 --- a/service/src/main/java/com/hzya/frame/u8/otherout/entity/OtherOutDetailEntity.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.hzya.frame.u8.otherout.entity; - -import com.hzya.frame.web.entity.BaseEntity; - -/** - * - * @content 其他出库单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -public class OtherOutDetailEntity extends BaseEntity { - private String cinvcode;//存货编码 - private String iquantity;//数量 - private String AccCode;//账套编码 - private String AccId;//账套号 - - public String getAccCode() { - return AccCode; - } - - public void setAccCode(String accCode) { - AccCode = accCode; - } - - public String getAccId() { - return AccId; - } - - public void setAccId(String accId) { - AccId = accId; - } - public String getCinvcode() { - return cinvcode; - } - - public void setCinvcode(String cinvcode) { - this.cinvcode = cinvcode; - } - - public String getIquantity() { - return iquantity; - } - - public void setIquantity(String iquantity) { - this.iquantity = iquantity; - } -} diff --git a/service/src/main/java/com/hzya/frame/u8/otherout/entity/OtherOutDetailEntity.xml b/service/src/main/java/com/hzya/frame/u8/otherout/entity/OtherOutDetailEntity.xml deleted file mode 100644 index d63d9416..00000000 --- a/service/src/main/java/com/hzya/frame/u8/otherout/entity/OtherOutDetailEntity.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - select * from ( - select - '001' as AccId, - 'UFDATA_001_2023' as AccCode, - id, - '1001'+CAST( id AS VARCHAR(100)) as ids, - ccode, - cbuscode, - crdcode, - cwhcode, - cmaker, - cCusCode, - cHandler - from UFDATA_001_2023.dbo.RdRecord09 - - union all - select - '002' as AccId, - 'UFDATA_002_2024' as AccCode, - id, - '1002'+CAST( id AS VARCHAR(100)) as ids, - ccode, - cbuscode, - crdcode, - cwhcode, - cmaker, - cCusCode, - cHandler - from UFDATA_002_2024.dbo.RdRecord09 - - union all - select - '004' as AccId, - 'UFDATA_004_2024' as AccCode, - id, - '1004'+CAST( id AS VARCHAR(100)) as ids, - ccode, - cbuscode, - crdcode, - cwhcode, - cmaker, - cCusCode, - cHandler - from UFDATA_004_2024.dbo.RdRecord09 - - union all - select - '005' as AccId, - 'UFDATA_005_2024' as AccCode, - id, - '1005'+CAST( id AS VARCHAR(100)) as ids, - ccode, - cbuscode, - crdcode, - cwhcode, - cmaker, - cCusCode, - cHandler - from UFDATA_005_2024.dbo.RdRecord09 - - union all - select - '201' as AccId, - 'UFDATA_201_2023' as AccCode, - id, - '1201'+CAST( id AS VARCHAR(100)) as ids, - ccode, - cbuscode, - crdcode, - cwhcode, - cmaker, - cCusCode, - cHandler - from UFDATA_201_2023.dbo.RdRecord09 - )m1 where cHandler is not null - and ids = #{ids} - - - - update RdRecord09 set sync_flag = #{state} - where id = #{id} - - diff --git a/service/src/main/java/com/hzya/frame/u8/otherout/service/IOtherOutDetaiService.java b/service/src/main/java/com/hzya/frame/u8/otherout/service/IOtherOutDetaiService.java deleted file mode 100644 index 7ff3b718..00000000 --- a/service/src/main/java/com/hzya/frame/u8/otherout/service/IOtherOutDetaiService.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.hzya.frame.u8.otherout.service; - -import com.hzya.frame.basedao.service.IBaseService; -import com.hzya.frame.u8.otherout.entity.OtherOutDetailEntity; - -/** - * - * @content 其他出库单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -public interface IOtherOutDetaiService extends IBaseService { -} diff --git a/service/src/main/java/com/hzya/frame/u8/otherout/service/IOtherOutService.java b/service/src/main/java/com/hzya/frame/u8/otherout/service/IOtherOutService.java deleted file mode 100644 index b82ab5cb..00000000 --- a/service/src/main/java/com/hzya/frame/u8/otherout/service/IOtherOutService.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.hzya.frame.u8.otherout.service; - -import com.alibaba.fastjson.JSONObject; -import com.hzya.frame.basedao.service.IBaseService; -import com.hzya.frame.u8.otherout.entity.OtherOutEntity; - -/** - * - * @content 其他出库单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -public interface IOtherOutService extends IBaseService { -/** - * - * @content 获取其他出库单信息推送到CRM - * @className: Administrator - * @author laborer - * @date 2024-10-18 13:46 - * - */ - - void getU8OtherOutToCrm(JSONObject requestJson); -} diff --git a/service/src/main/java/com/hzya/frame/u8/otherout/service/impl/OtherOutDetaiServiceImpl.java b/service/src/main/java/com/hzya/frame/u8/otherout/service/impl/OtherOutDetaiServiceImpl.java deleted file mode 100644 index e08cb3e2..00000000 --- a/service/src/main/java/com/hzya/frame/u8/otherout/service/impl/OtherOutDetaiServiceImpl.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.hzya.frame.u8.otherout.service.impl; - -import com.hzya.frame.basedao.service.impl.BaseService; -import com.hzya.frame.u8.otherout.entity.OtherOutDetailEntity; -import com.hzya.frame.u8.otherout.service.IOtherOutDetaiService; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.springframework.stereotype.Service; - -/** - * - * @content 其他出库单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -@Service(value = "OtherOutDetaiServiceImpl") -public class OtherOutDetaiServiceImpl extends BaseService implements IOtherOutDetaiService { - Logger logger = LogManager.getLogger(getClass()); - - -} diff --git a/service/src/main/java/com/hzya/frame/u8/otherout/service/impl/OtherOutServiceImpl.java b/service/src/main/java/com/hzya/frame/u8/otherout/service/impl/OtherOutServiceImpl.java deleted file mode 100644 index 52ed5576..00000000 --- a/service/src/main/java/com/hzya/frame/u8/otherout/service/impl/OtherOutServiceImpl.java +++ /dev/null @@ -1,190 +0,0 @@ -package com.hzya.frame.u8.otherout.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.basedao.service.impl.BaseService; -import com.hzya.frame.crm.util.CrmUtil; -import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity; -import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService; -import com.hzya.frame.u8.otherout.dao.IOtherOutDao; -import com.hzya.frame.u8.otherout.dao.IOtherOutDetailDao; -import com.hzya.frame.u8.otherout.entity.OtherOutDetailEntity; -import com.hzya.frame.u8.otherout.entity.OtherOutEntity; -import com.hzya.frame.u8.otherout.service.IOtherOutService; - -import com.hzya.frame.web.entity.JsonResultEntity; -import org.apache.commons.collections.CollectionUtils; -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 javax.annotation.Resource; -import java.util.Date; -import java.util.List; - -/** - * - * @content 其他出库单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -@Service(value = "OtherOutServiceImpl") -public class OtherOutServiceImpl extends BaseService implements IOtherOutService { - Logger logger = LogManager.getLogger(getClass()); - @Autowired - private IOtherOutDao otherOutDao; - @Autowired - private IOtherOutDetailDao otherOutDetailDao; - @Resource - private IIntegrationTaskLivingDetailsService taskLivingDetailsService; - @Override - public void getU8OtherOutToCrm(JSONObject requestJson) { - //获取重推信息id,并记录日志 - JSONObject requestJsonObj = JSON.parseObject(requestJson.toString(),JSONObject.class); - String interId = requestJsonObj.getString("integration_task_living_details_id"); - logger.info("U8销售出库单重推解析后:"+requestJsonObj.toString()); - logger.info("U8销售出库单推送CRM重新执行的任务主键:"+interId); - - //更换数据源 - JsonResultEntity resultEntity = new JsonResultEntity(); - OtherOutEntity entity = new OtherOutEntity(); - requestJson.put("db_code","YONYOUU8"); - entity.setDataSourceCode(requestJson.getString("db_code")); - - //根据重推信息id,查询该条重推记录信息 - IntegrationTaskLivingDetailsEntity oldMsg = new IntegrationTaskLivingDetailsEntity(); - if(StrUtil.isNotEmpty(interId)){ - oldMsg = taskLivingDetailsService.get(interId); - } - String rootAppPk = oldMsg.getRootAppPk(); - entity.setIds(rootAppPk); - StrUtil.isEmpty(rootAppPk); - //如果是重推,是否通过entity传入的id,只能查到一条数据。 - List soleList = otherOutDao.getU8SaleOut(entity); - logger.info("销售出库查询数据{}",JSONObject.toJSONString(soleList)); - if(CollectionUtils.isNotEmpty(soleList)){ - soleList.forEach(sale -> { - try{ - //获取明细数据进行拼接 - String id = sale.getId(); - if(!StrUtil.isEmpty(id)){ - OtherOutDetailEntity line = new OtherOutDetailEntity(); - line.setId(id); - line.setAccId(id); - line.setDataSourceCode(requestJson.getString("db_code")); - List lineList = otherOutDetailDao.getU8otherOutLine(line); - logger.info("销售出库单明细查询数据{}",JSONObject.toJSONString(lineList)); - sale.setOtherOutDetailEntityList(lineList); - logger.info("组装数据"); - JSONObject main = bindingAdd(sale); - logger.info("销售出库推送数据:"+main.toString()); - String result = CrmUtil.sendU8TOCrmEsb(main.toString(), "8000340003"); - logger.info("销售出库推送结果:"+result); - IntegrationTaskLivingDetailsEntity logDetails = new IntegrationTaskLivingDetailsEntity(); - logDetails.setRootAppPk(sale.getIds()); - logDetails.setRootAppBill(sale.getCcode()); - logDetails.setNewTransmitInfo(result); - logDetails.setNewPushDate(new Date()); - logDetails.setRootAppNewData(JSON.toJSONString(sale)); - logDetails.setPluginId("SaleConPlugin"); - - JSONObject resultObj = JSON.parseObject(result); - boolean flag = resultObj.getString("code").equals("0"); - if(flag){ - logDetails.setNewTransmitInfo("推送成功"); - // 推送成功,更新状态 - sale.setState("Y"); - }else{ - // 推送失败 - sale.setState("N"); - } - sale.setDataSourceCode(requestJson.getString("db_code")); - try{ - saveLog(interId, logDetails, flag); - }catch (Exception e){ - logger.error("保存日志失败"+e.getMessage()); - otherOutDao.updateState(sale); - e.printStackTrace(); - } - otherOutDao.updateState(sale); - } - } catch (Exception e) { - logger.error("销售出库执行失败"+e.getMessage()); - e.printStackTrace(); - } - }); - - } - } - /** - * - * @content 保存日志信息 - * @className: Administrator - * @author laborer - * @date 2024-10-18 11:27 - * - */ - - private void saveLog(String interId, IntegrationTaskLivingDetailsEntity logDetails, boolean flag) throws Exception { - if(StrUtil.isEmpty(interId)){ - if(flag){ - //首推成功 - taskLivingDetailsService.saveLogToSuccess(logDetails); - }else{ - //首推失败 - taskLivingDetailsService.saveLogToFail(logDetails); - } - }else{ - logDetails.setId(interId); - if(flag){ - //重推成功 - taskLivingDetailsService.saveLogFailToSuccess(logDetails); - }else{ - //重推失败,把失败信息,更新到重推表中 - taskLivingDetailsService.updateLogFailToSuccess(logDetails); - } - } - } - - /** - * - * @content 组装推送参数 - * @className: Administrator - * @author laborer - * @date 2024-10-18 11:13 - * - */ - - private JSONObject bindingAdd(OtherOutEntity sale) { - JSONObject main = new JSONObject(); - main.put("AccId",sale.getAccId()); - main.put("billid",sale.getId()); - main.put("LoginDate", DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss")); - JSONObject head = new JSONObject(); - head.put("ccode",sale.getCcode()); - head.put("cbuscode",sale.getCbuscode()); - head.put("crdcode",sale.getCrdcode()); - head.put("cwhcode",sale.getCwhcode()); - head.put("cmaker",sale.getCmaker()); - JSONArray body = new JSONArray(); - List lineList = sale.getOtherOutDetailEntityList(); - if(CollectionUtils.isNotEmpty(lineList)){ - lineList.forEach(line -> { - JSONObject lineObj = new JSONObject(); - lineObj.put("cinvcode",line.getCinvcode()); - lineObj.put("iquantity",line.getIquantity()); - - body.add(lineObj); - }); - } - main.put("head",head); - main.put("body",body); - return main; - } -} diff --git a/service/src/main/java/com/hzya/frame/u8/receipt/dao/IReceiptDao.java b/service/src/main/java/com/hzya/frame/u8/receipt/dao/IReceiptDao.java deleted file mode 100644 index d0175d05..00000000 --- a/service/src/main/java/com/hzya/frame/u8/receipt/dao/IReceiptDao.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.hzya.frame.u8.receipt.dao; - -import com.hzya.frame.basedao.dao.IBaseDao; -import com.hzya.frame.u8.receipt.entity.ReceiptEntity; - -import java.util.List; - -/** - * - * @content 销售收款单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -public interface IReceiptDao extends IBaseDao { - /** - * - * @content 获取U8销售收款单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 13:53 - * - */ - - List getU8Receipt(ReceiptEntity entity); -/** - * - * @content 修改推送状态 - * @className: Administrator - * @author laborer - * @date 2024-10-18 14:07 - * - */ - - int updateState(ReceiptEntity sale); -} diff --git a/service/src/main/java/com/hzya/frame/u8/receipt/dao/IReceiptDetailDao.java b/service/src/main/java/com/hzya/frame/u8/receipt/dao/IReceiptDetailDao.java deleted file mode 100644 index 47805b0d..00000000 --- a/service/src/main/java/com/hzya/frame/u8/receipt/dao/IReceiptDetailDao.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.hzya.frame.u8.receipt.dao; - -import com.hzya.frame.basedao.dao.IBaseDao; -import com.hzya.frame.u8.receipt.entity.ReceiptDetailEntity; - -/** - * - * @content 销售收款单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -public interface IReceiptDetailDao extends IBaseDao { -} diff --git a/service/src/main/java/com/hzya/frame/u8/receipt/dao/impl/ReceiptDaoImpl.java b/service/src/main/java/com/hzya/frame/u8/receipt/dao/impl/ReceiptDaoImpl.java deleted file mode 100644 index 268a12e7..00000000 --- a/service/src/main/java/com/hzya/frame/u8/receipt/dao/impl/ReceiptDaoImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.hzya.frame.u8.receipt.dao.impl; - -import com.baomidou.dynamic.datasource.annotation.DS; -import com.hzya.frame.basedao.dao.MybatisGenericDao; -import com.hzya.frame.u8.receipt.dao.IReceiptDao; -import com.hzya.frame.u8.receipt.entity.ReceiptEntity; -import org.springframework.stereotype.Repository; - -import java.util.List; - -/** - * - * @content 销售收款单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -@Repository(value = "ReceiptDaoImpl") -public class ReceiptDaoImpl extends MybatisGenericDao implements IReceiptDao { - @DS("#entity.dataSourceCode") - @Override - public List getU8Receipt(ReceiptEntity entity) { - return (List) super.selectList("com.hzya.frame.u8.receipt.dao.impl.ReceiptDaoImpl.entity_list_base",entity); - } - @DS("#entity.dataSourceCode") - @Override - public int updateState(ReceiptEntity entity) { - return super.update("com.hzya.frame.u8.receipt.dao.impl.ReceiptDaoImpl.entity_update",entity); - } -} diff --git a/service/src/main/java/com/hzya/frame/u8/receipt/dao/impl/ReceiptDetailDaoImpl.java b/service/src/main/java/com/hzya/frame/u8/receipt/dao/impl/ReceiptDetailDaoImpl.java deleted file mode 100644 index d537c29a..00000000 --- a/service/src/main/java/com/hzya/frame/u8/receipt/dao/impl/ReceiptDetailDaoImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.hzya.frame.u8.receipt.dao.impl; - -import com.hzya.frame.basedao.dao.MybatisGenericDao; -import com.hzya.frame.u8.receipt.dao.IReceiptDetailDao; -import com.hzya.frame.u8.receipt.entity.ReceiptDetailEntity; -import org.springframework.stereotype.Repository; - -/** - * - * @content 销售收款单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -@Repository(value = "ReceiptDetailDaoImpl") -public class ReceiptDetailDaoImpl extends MybatisGenericDao implements IReceiptDetailDao { -} diff --git a/service/src/main/java/com/hzya/frame/u8/receipt/entity/ReceiptDetailEntity.java b/service/src/main/java/com/hzya/frame/u8/receipt/entity/ReceiptDetailEntity.java deleted file mode 100644 index 0966cf2b..00000000 --- a/service/src/main/java/com/hzya/frame/u8/receipt/entity/ReceiptDetailEntity.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.hzya.frame.u8.receipt.entity; - -import com.hzya.frame.web.entity.BaseEntity; - -/** - * - * @content 销售收款单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -public class ReceiptDetailEntity extends BaseEntity { - private String AccCode;//账套编码 - private String AccId;//账套号 - - public String getAccCode() { - return AccCode; - } - - public void setAccCode(String accCode) { - AccCode = accCode; - } - - public String getAccId() { - return AccId; - } - - public void setAccId(String accId) { - AccId = accId; - } -} diff --git a/service/src/main/java/com/hzya/frame/u8/receipt/entity/ReceiptDetailEntity.xml b/service/src/main/java/com/hzya/frame/u8/receipt/entity/ReceiptDetailEntity.xml deleted file mode 100644 index a63ae040..00000000 --- a/service/src/main/java/com/hzya/frame/u8/receipt/entity/ReceiptDetailEntity.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/service/src/main/java/com/hzya/frame/u8/receipt/entity/ReceiptEntity.java b/service/src/main/java/com/hzya/frame/u8/receipt/entity/ReceiptEntity.java deleted file mode 100644 index 826cd5bf..00000000 --- a/service/src/main/java/com/hzya/frame/u8/receipt/entity/ReceiptEntity.java +++ /dev/null @@ -1,126 +0,0 @@ -package com.hzya.frame.u8.receipt.entity; - -import com.hzya.frame.web.entity.BaseEntity; - -/** - * - * @content 销售收款单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ - -public class ReceiptEntity extends BaseEntity { - - private String iID;//主键 - private String cvouchid;//收款单号 - private String dvouchdate;//单据日期 - private String ccuscode;//客户编码 - private String ccusname;//客户名称 - private String iamount_f;//金额 - private String csscode;//收款方式 - private String syncFlag;//标识 - private String AccId;//账套 - private String state;//状态 - private String AccCode;//账套编码 - private String ids;// - - public String getIds() { - return ids; - } - - public void setIds(String ids) { - this.ids = ids; - } - - - public String getAccCode() { - return AccCode; - } - - public void setAccCode(String accCode) { - AccCode = accCode; - } - - - public String getiID() { - return iID; - } - - public void setiID(String iID) { - this.iID = iID; - } - - public String getCvouchid() { - return cvouchid; - } - - public void setCvouchid(String cvouchid) { - this.cvouchid = cvouchid; - } - - public String getDvouchdate() { - return dvouchdate; - } - - public void setDvouchdate(String dvouchdate) { - this.dvouchdate = dvouchdate; - } - - public String getCcuscode() { - return ccuscode; - } - - public void setCcuscode(String ccuscode) { - this.ccuscode = ccuscode; - } - - public String getCcusname() { - return ccusname; - } - - public void setCcusname(String ccusname) { - this.ccusname = ccusname; - } - - public String getIamount_f() { - return iamount_f; - } - - public void setIamount_f(String iamount_f) { - this.iamount_f = iamount_f; - } - - public String getCsscode() { - return csscode; - } - - public void setCsscode(String csscode) { - this.csscode = csscode; - } - - public String getSyncFlag() { - return syncFlag; - } - - public void setSyncFlag(String syncFlag) { - this.syncFlag = syncFlag; - } - - public String getAccId() { - return AccId; - } - - public void setAccId(String accId) { - AccId = accId; - } - - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } -} diff --git a/service/src/main/java/com/hzya/frame/u8/receipt/entity/ReceiptEntity.xml b/service/src/main/java/com/hzya/frame/u8/receipt/entity/ReceiptEntity.xml deleted file mode 100644 index 2fa5e46c..00000000 --- a/service/src/main/java/com/hzya/frame/u8/receipt/entity/ReceiptEntity.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - update #{AccCode}.dbo.Ap_CloseBill set sync_flag = #{state} - where iID = #{iID} - - diff --git a/service/src/main/java/com/hzya/frame/u8/receipt/service/IReceiptDetaiService.java b/service/src/main/java/com/hzya/frame/u8/receipt/service/IReceiptDetaiService.java deleted file mode 100644 index 0f2802b1..00000000 --- a/service/src/main/java/com/hzya/frame/u8/receipt/service/IReceiptDetaiService.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.hzya.frame.u8.receipt.service; - -import com.hzya.frame.basedao.service.IBaseService; -import com.hzya.frame.u8.receipt.entity.ReceiptDetailEntity; - -/** - * - * @content 销售收款单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -public interface IReceiptDetaiService extends IBaseService { -} diff --git a/service/src/main/java/com/hzya/frame/u8/receipt/service/IReceiptService.java b/service/src/main/java/com/hzya/frame/u8/receipt/service/IReceiptService.java deleted file mode 100644 index da0daad5..00000000 --- a/service/src/main/java/com/hzya/frame/u8/receipt/service/IReceiptService.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.hzya.frame.u8.receipt.service; - -import com.alibaba.fastjson.JSONObject; -import com.hzya.frame.basedao.service.IBaseService; -import com.hzya.frame.u8.receipt.entity.ReceiptEntity; - -/** - * - * @content 销售收款单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -public interface IReceiptService extends IBaseService { -/** - * - * @content 获取U8收款单推送CRM - * @param requestJson - * @className: Administrator - * @author laborer - * @date 2024-10-18 13:47 - * - */ - - void getU8ReceiptCrm(JSONObject requestJson); -} diff --git a/service/src/main/java/com/hzya/frame/u8/receipt/service/impl/ReceiptDetaiServiceImpl.java b/service/src/main/java/com/hzya/frame/u8/receipt/service/impl/ReceiptDetaiServiceImpl.java deleted file mode 100644 index 1e5c87c3..00000000 --- a/service/src/main/java/com/hzya/frame/u8/receipt/service/impl/ReceiptDetaiServiceImpl.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.hzya.frame.u8.receipt.service.impl; - -import com.hzya.frame.basedao.service.impl.BaseService; -import com.hzya.frame.u8.receipt.entity.ReceiptDetailEntity; -import com.hzya.frame.u8.receipt.service.IReceiptDetaiService; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.springframework.stereotype.Service; - -/** - * - * @content 销售收款单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -@Service(value = "ReceiptDetaiServiceImpl") -public class ReceiptDetaiServiceImpl extends BaseService implements IReceiptDetaiService { - Logger logger = LogManager.getLogger(getClass()); - - -} diff --git a/service/src/main/java/com/hzya/frame/u8/receipt/service/impl/ReceiptServiceImpl.java b/service/src/main/java/com/hzya/frame/u8/receipt/service/impl/ReceiptServiceImpl.java deleted file mode 100644 index b36f983e..00000000 --- a/service/src/main/java/com/hzya/frame/u8/receipt/service/impl/ReceiptServiceImpl.java +++ /dev/null @@ -1,168 +0,0 @@ -package com.hzya.frame.u8.receipt.service.impl; - -import cn.hutool.core.date.DateUtil; -import cn.hutool.core.util.StrUtil; -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import com.hzya.frame.basedao.service.impl.BaseService; -import com.hzya.frame.crm.util.CrmUtil; -import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity; -import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService; -import com.hzya.frame.u8.receipt.dao.IReceiptDao; -import com.hzya.frame.u8.receipt.entity.ReceiptEntity; -import com.hzya.frame.u8.receipt.service.IReceiptService; -import com.hzya.frame.web.entity.JsonResultEntity; -import org.apache.commons.collections.CollectionUtils; -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 javax.annotation.Resource; -import java.util.Date; -import java.util.List; - -/** - * - * @content 销售收款单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -@Service(value = "ReceiptServiceImpl") -public class ReceiptServiceImpl extends BaseService implements IReceiptService { - Logger logger = LogManager.getLogger(getClass()); - @Autowired - private IReceiptDao saleOutDao; - - @Resource - private IIntegrationTaskLivingDetailsService taskLivingDetailsService; - @Override - public void getU8ReceiptCrm(JSONObject requestJson) { - //获取重推信息id,并记录日志 - JSONObject requestJsonObj = JSON.parseObject(requestJson.toString(),JSONObject.class); - String interId = requestJsonObj.getString("integration_task_living_details_id"); - logger.info("U8销售收款单重推解析后:"+requestJsonObj.toString()); - logger.info("U8销售收款单推送CRM重新执行的任务主键:"+interId); - - //更换数据源 - JsonResultEntity resultEntity = new JsonResultEntity(); - ReceiptEntity entity = new ReceiptEntity(); - requestJson.put("db_code","YONYOUU8"); - entity.setDataSourceCode(requestJson.getString("db_code")); - - //根据重推信息id,查询该条重推记录信息 - IntegrationTaskLivingDetailsEntity oldMsg = new IntegrationTaskLivingDetailsEntity(); - if(StrUtil.isNotEmpty(interId)){ - oldMsg = taskLivingDetailsService.get(interId); - } - String rootAppPk = oldMsg.getRootAppPk(); - entity.setIds(rootAppPk); - StrUtil.isEmpty(rootAppPk);//entity.setQueryState("查询"); - //如果是重推,是否通过entity传入的id,只能查到一条数据。 - //entity.setId("-8845102890648320822"); - List soleList = saleOutDao.getU8Receipt(entity); - logger.info("销售出库查询数据{}",JSONObject.toJSONString(soleList)); - if(CollectionUtils.isNotEmpty(soleList)){ - soleList.forEach(sale -> { - try{ - //获取明细数据进行拼接 - String id = sale.getiID(); - if(!StrUtil.isEmpty(id)){ - logger.info("组装数据"); - JSONObject main = bindingAdd(sale); - logger.info("销售出库推送数据:"+main.toString()); - String result = CrmUtil.sendU8TOCrmEsb(main.toString(), "8000340003"); - logger.info("销售出库推送结果:"+result); - IntegrationTaskLivingDetailsEntity logDetails = new IntegrationTaskLivingDetailsEntity(); - logDetails.setRootAppPk(sale.getIds()); - logDetails.setRootAppBill(sale.getCvouchid()); - logDetails.setNewTransmitInfo(result); - logDetails.setNewPushDate(new Date()); - logDetails.setRootAppNewData(JSON.toJSONString(sale)); - logDetails.setPluginId("SaleConPlugin"); - - JSONObject resultObj = JSON.parseObject(result); - boolean flag = resultObj.getString("code").equals("0"); - if(flag){ - logDetails.setNewTransmitInfo("推送成功"); - // 推送成功,更新状态 - sale.setState("Y"); - }else{ - // 推送失败 - sale.setState("N"); - } - sale.setDataSourceCode(requestJson.getString("db_code")); - try{ - saveLog(interId, logDetails, flag); - }catch (Exception e){ - logger.error("保存日志失败"+e.getMessage()); - saleOutDao.updateState(sale); - e.printStackTrace(); - } - saleOutDao.updateState(sale); - } - } catch (Exception e) { - logger.error("销售出库执行失败"+e.getMessage()); - e.printStackTrace(); - } - }); - - } - } - /** - * - * @content 保存日志信息 - * @className: Administrator - * @author laborer - * @date 2024-10-18 11:27 - * - */ - - private void saveLog(String interId, IntegrationTaskLivingDetailsEntity logDetails, boolean flag) throws Exception { - if(StrUtil.isEmpty(interId)){ - if(flag){ - //首推成功 - taskLivingDetailsService.saveLogToSuccess(logDetails); - }else{ - //首推失败 - taskLivingDetailsService.saveLogToFail(logDetails); - } - }else{ - logDetails.setId(interId); - if(flag){ - //重推成功 - taskLivingDetailsService.saveLogFailToSuccess(logDetails); - }else{ - //重推失败,把失败信息,更新到重推表中 - taskLivingDetailsService.updateLogFailToSuccess(logDetails); - } - } - } - - /** - * - * @content 组装推送参数 - * @className: Administrator - * @author laborer - * @date 2024-10-18 11:13 - * - */ - - private JSONObject bindingAdd(ReceiptEntity sale) { - JSONObject main = new JSONObject(); - main.put("AccId",sale.getAccId()); - main.put("billid",sale.getiID()); - main.put("LoginDate", DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss")); - JSONObject head = new JSONObject(); - head.put("cvouchid",sale.getCvouchid()); - head.put("dvouchdate",sale.getDvouchdate()); - head.put("ccuscode",sale.getCcuscode()); - head.put("iamount",sale.getCcusname()); - head.put("csscode",sale.getCsscode()); - head.put("syncFlag",sale.getSyncFlag()); - main.put("head",head); - return main; - } -} diff --git a/service/src/main/java/com/hzya/frame/u8/saleinv/dao/ISaleInvDao.java b/service/src/main/java/com/hzya/frame/u8/saleinv/dao/ISaleInvDao.java deleted file mode 100644 index ec87015a..00000000 --- a/service/src/main/java/com/hzya/frame/u8/saleinv/dao/ISaleInvDao.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.hzya.frame.u8.saleinv.dao; - -import com.hzya.frame.basedao.dao.IBaseDao; -import com.hzya.frame.u8.saleinv.entity.SaleInvEntity; - -import java.util.List; - -/** - * - * @content 销售发票 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -public interface ISaleInvDao extends IBaseDao { - /** - * - * @content 获取U8销售发票信息 - * @className: Administrator - * @author laborer - * @date 2024-10-18 14:22 - * - */ - - List getU8SaleInv(SaleInvEntity entity); -/** - * - * @content 修改推送状态 - * @className: Administrator - * @author laborer - * @date 2024-10-18 14:43 - * - */ - - int updateState(SaleInvEntity entity); -} diff --git a/service/src/main/java/com/hzya/frame/u8/saleinv/dao/ISaleInvDetailDao.java b/service/src/main/java/com/hzya/frame/u8/saleinv/dao/ISaleInvDetailDao.java deleted file mode 100644 index c409cac7..00000000 --- a/service/src/main/java/com/hzya/frame/u8/saleinv/dao/ISaleInvDetailDao.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.hzya.frame.u8.saleinv.dao; - -import com.hzya.frame.basedao.dao.IBaseDao; -import com.hzya.frame.u8.saleinv.entity.SaleInvDetailEntity; - -import java.util.List; - -/** - * - * @content 销售发票 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -public interface ISaleInvDetailDao extends IBaseDao { - /** - * - * @content 获取U8销售发票明细数据 - * @className: Administrator - * @author laborer - * @date 2024-10-18 14:37 - * - */ - - List getU8InvDetail(SaleInvDetailEntity line); -} diff --git a/service/src/main/java/com/hzya/frame/u8/saleinv/dao/impl/SaleInvDaoImpl.java b/service/src/main/java/com/hzya/frame/u8/saleinv/dao/impl/SaleInvDaoImpl.java deleted file mode 100644 index df12cd47..00000000 --- a/service/src/main/java/com/hzya/frame/u8/saleinv/dao/impl/SaleInvDaoImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.hzya.frame.u8.saleinv.dao.impl; - -import com.baomidou.dynamic.datasource.annotation.DS; -import com.hzya.frame.basedao.dao.MybatisGenericDao; -import com.hzya.frame.u8.saleinv.dao.ISaleInvDao; -import com.hzya.frame.u8.saleinv.entity.SaleInvEntity; -import org.springframework.stereotype.Repository; - -import java.util.List; - -/** - * - * @content 销售发票 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -@Repository(value = "SaleInvDaoImpl") -public class SaleInvDaoImpl extends MybatisGenericDao implements ISaleInvDao { - @DS("#entity.dataSourceCode") - - @Override - public List getU8SaleInv(SaleInvEntity entity) { - return (List) super.selectList("com.hzya.frame.u8.saleinv.dao.impl.SaleInvDaoImpl.entity_list_base",entity); - } - - @Override - public int updateState(SaleInvEntity entity) { - return super.update("com.hzya.frame.u8.saleinv.dao.impl.SaleInvDaoImpl.entity_update", entity); - } -} diff --git a/service/src/main/java/com/hzya/frame/u8/saleinv/dao/impl/SaleInvDetailDaoImpl.java b/service/src/main/java/com/hzya/frame/u8/saleinv/dao/impl/SaleInvDetailDaoImpl.java deleted file mode 100644 index bdb14a41..00000000 --- a/service/src/main/java/com/hzya/frame/u8/saleinv/dao/impl/SaleInvDetailDaoImpl.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.hzya.frame.u8.saleinv.dao.impl; - -import com.baomidou.dynamic.datasource.annotation.DS; -import com.hzya.frame.basedao.dao.MybatisGenericDao; -import com.hzya.frame.u8.saleinv.dao.ISaleInvDetailDao; -import com.hzya.frame.u8.saleinv.entity.SaleInvDetailEntity; -import org.springframework.stereotype.Repository; - -import java.util.List; - -/** - * - * @content 销售发票 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -@Repository(value = "SaleInvDetailDaoImpl") -public class SaleInvDetailDaoImpl extends MybatisGenericDao implements ISaleInvDetailDao { - @DS("#entity.dataSourceCode") - @Override - public List getU8InvDetail(SaleInvDetailEntity entity) { - return (List) super.selectList("com.hzya.frame.u8.saleinv.dao.impl.SaleInvDetailDaoImpl.entity_list_base",entity); - } -} diff --git a/service/src/main/java/com/hzya/frame/u8/saleinv/entity/SaleInvDetailEntity.java b/service/src/main/java/com/hzya/frame/u8/saleinv/entity/SaleInvDetailEntity.java deleted file mode 100644 index 9f4925de..00000000 --- a/service/src/main/java/com/hzya/frame/u8/saleinv/entity/SaleInvDetailEntity.java +++ /dev/null @@ -1,67 +0,0 @@ -package com.hzya.frame.u8.saleinv.entity; - -import com.hzya.frame.web.entity.BaseEntity; - -/** - * - * @content 销售发票 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -public class SaleInvDetailEntity extends BaseEntity { - private String cdlcode;//发货单号 - private String idlsum;//发货单金额 - private String idlrowno;//发货单行号 - private String SBVID;//主表主键 - private String AccCode;//账套编码 - private String AccId;//账套号 - - public String getAccCode() { - return AccCode; - } - - public void setAccCode(String accCode) { - AccCode = accCode; - } - - public String getAccId() { - return AccId; - } - - public void setAccId(String accId) { - AccId = accId; - } - public String getCdlcode() { - return cdlcode; - } - - public void setCdlcode(String cdlcode) { - this.cdlcode = cdlcode; - } - - public String getIdlsum() { - return idlsum; - } - - public void setIdlsum(String idlsum) { - this.idlsum = idlsum; - } - - public String getIdlrowno() { - return idlrowno; - } - - public void setIdlrowno(String idlrowno) { - this.idlrowno = idlrowno; - } - - public String getSBVID() { - return SBVID; - } - - public void setSBVID(String SBVID) { - this.SBVID = SBVID; - } -} diff --git a/service/src/main/java/com/hzya/frame/u8/saleinv/entity/SaleInvDetailEntity.xml b/service/src/main/java/com/hzya/frame/u8/saleinv/entity/SaleInvDetailEntity.xml deleted file mode 100644 index 81564d34..00000000 --- a/service/src/main/java/com/hzya/frame/u8/saleinv/entity/SaleInvDetailEntity.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/service/src/main/java/com/hzya/frame/u8/saleinv/entity/SaleInvEntity.java b/service/src/main/java/com/hzya/frame/u8/saleinv/entity/SaleInvEntity.java deleted file mode 100644 index 9181c0aa..00000000 --- a/service/src/main/java/com/hzya/frame/u8/saleinv/entity/SaleInvEntity.java +++ /dev/null @@ -1,107 +0,0 @@ -package com.hzya.frame.u8.saleinv.entity; - -import com.hzya.frame.web.entity.BaseEntity; - -import java.util.List; - -/** - * - * @content 销售发票 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ - -public class SaleInvEntity extends BaseEntity { - private String csbvcode;//销售发票号 - private String ddate;//销售发票日期 - private String isum;//发票金额 - private String SBVID;//发票主键 - private String AccId;//账套 - private String state;// - private String syncFlag;// - private String ids;// - - public String getIds() { - return ids; - } - - public void setIds(String ids) { - this.ids = ids; - } - private List saleInvDetailEntityList; - private String AccCode;//账套编码 - public String getAccCode() { - return AccCode; - } - - public void setAccCode(String accCode) { - AccCode = accCode; - } - - - public List getSaleInvDetailEntityList() { - return saleInvDetailEntityList; - } - - public void setSaleInvDetailEntityList(List saleInvDetailEntityList) { - this.saleInvDetailEntityList = saleInvDetailEntityList; - } - - public String getCsbvcode() { - return csbvcode; - } - - public void setCsbvcode(String csbvcode) { - this.csbvcode = csbvcode; - } - - public String getDdate() { - return ddate; - } - - public void setDdate(String ddate) { - this.ddate = ddate; - } - - public String getIsum() { - return isum; - } - - public void setIsum(String isum) { - this.isum = isum; - } - - public String getSBVID() { - return SBVID; - } - - public void setSBVID(String SBVID) { - this.SBVID = SBVID; - } - - public String getAccId() { - return AccId; - } - - public void setAccId(String accId) { - AccId = accId; - } - - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public String getSyncFlag() { - return syncFlag; - } - - public void setSyncFlag(String syncFlag) { - this.syncFlag = syncFlag; - } -} diff --git a/service/src/main/java/com/hzya/frame/u8/saleinv/entity/SaleInvEntity.xml b/service/src/main/java/com/hzya/frame/u8/saleinv/entity/SaleInvEntity.xml deleted file mode 100644 index 887ad0da..00000000 --- a/service/src/main/java/com/hzya/frame/u8/saleinv/entity/SaleInvEntity.xml +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - update #{AccCode}.dbo.SaleBillVouch set sync_flag = #{state} - where SBVID = #{SBVID} - - - diff --git a/service/src/main/java/com/hzya/frame/u8/saleinv/service/ISaleInvDetaiService.java b/service/src/main/java/com/hzya/frame/u8/saleinv/service/ISaleInvDetaiService.java deleted file mode 100644 index dba6b3e3..00000000 --- a/service/src/main/java/com/hzya/frame/u8/saleinv/service/ISaleInvDetaiService.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.hzya.frame.u8.saleinv.service; - -import com.hzya.frame.basedao.service.IBaseService; -import com.hzya.frame.u8.saleinv.entity.SaleInvDetailEntity; - -/** - * - * @content 销售发票 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -public interface ISaleInvDetaiService extends IBaseService { -} diff --git a/service/src/main/java/com/hzya/frame/u8/saleinv/service/ISaleInvService.java b/service/src/main/java/com/hzya/frame/u8/saleinv/service/ISaleInvService.java deleted file mode 100644 index d5587da1..00000000 --- a/service/src/main/java/com/hzya/frame/u8/saleinv/service/ISaleInvService.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.hzya.frame.u8.saleinv.service; - -import com.alibaba.fastjson.JSONObject; -import com.hzya.frame.basedao.service.IBaseService; -import com.hzya.frame.u8.saleinv.entity.SaleInvEntity; - -/** - * - * @content 销售发票 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -public interface ISaleInvService extends IBaseService { -/** - * - * @content 获取U8销售发票数据,并推送到CRM - * @param requestJson - * @className: Administrator - * @author laborer - * @date 2024-10-18 13:48 - * - */ - - void getU8SaleInvToCrm(JSONObject requestJson); -} diff --git a/service/src/main/java/com/hzya/frame/u8/saleinv/service/impl/SaleInvDetaiServiceImpl.java b/service/src/main/java/com/hzya/frame/u8/saleinv/service/impl/SaleInvDetaiServiceImpl.java deleted file mode 100644 index 9a95b6a5..00000000 --- a/service/src/main/java/com/hzya/frame/u8/saleinv/service/impl/SaleInvDetaiServiceImpl.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.hzya.frame.u8.saleinv.service.impl; - -import com.hzya.frame.basedao.service.impl.BaseService; -import com.hzya.frame.u8.saleinv.entity.SaleInvDetailEntity; -import com.hzya.frame.u8.saleinv.service.ISaleInvDetaiService; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.springframework.stereotype.Service; - -/** - * - * @content 销售发票 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -@Service(value = "SaleInvDetaiServiceImpl") -public class SaleInvDetaiServiceImpl extends BaseService implements ISaleInvDetaiService { - Logger logger = LogManager.getLogger(getClass()); - - -} diff --git a/service/src/main/java/com/hzya/frame/u8/saleinv/service/impl/SaleInvServiceImpl.java b/service/src/main/java/com/hzya/frame/u8/saleinv/service/impl/SaleInvServiceImpl.java deleted file mode 100644 index 76cffc9a..00000000 --- a/service/src/main/java/com/hzya/frame/u8/saleinv/service/impl/SaleInvServiceImpl.java +++ /dev/null @@ -1,191 +0,0 @@ -package com.hzya.frame.u8.saleinv.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.basedao.service.impl.BaseService; -import com.hzya.frame.crm.util.CrmUtil; -import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity; -import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService; -import com.hzya.frame.u8.saleinv.dao.ISaleInvDao; -import com.hzya.frame.u8.saleinv.dao.ISaleInvDetailDao; -import com.hzya.frame.u8.saleinv.entity.SaleInvDetailEntity; -import com.hzya.frame.u8.saleinv.entity.SaleInvEntity; -import com.hzya.frame.u8.saleinv.service.ISaleInvService; - -import com.hzya.frame.u8.saleout.entity.SaleOutDetailEntity; -import com.hzya.frame.web.entity.JsonResultEntity; -import org.apache.commons.collections.CollectionUtils; -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 javax.annotation.Resource; -import java.util.Date; -import java.util.List; - -/** - * - * @content 销售发票 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -@Service(value = "SaleInvServiceImpl") -public class SaleInvServiceImpl extends BaseService implements ISaleInvService { - Logger logger = LogManager.getLogger(getClass()); - @Autowired - private ISaleInvDao saleInvDao; - @Autowired - private ISaleInvDetailDao saleInvDetailDao; - @Resource - private IIntegrationTaskLivingDetailsService taskLivingDetailsService; - @Override - public void getU8SaleInvToCrm(JSONObject requestJson) { - //获取重推信息id,并记录日志 - JSONObject requestJsonObj = JSON.parseObject(requestJson.toString(),JSONObject.class); - String interId = requestJsonObj.getString("integration_task_living_details_id"); - logger.info("U8销售发票单重推解析后:"+requestJsonObj.toString()); - logger.info("U8销售发票单推送CRM重新执行的任务主键:"+interId); - - //更换数据源 - JsonResultEntity resultEntity = new JsonResultEntity(); - SaleInvEntity entity = new SaleInvEntity(); - requestJson.put("db_code","YONYOUU8"); - entity.setDataSourceCode(requestJson.getString("db_code")); - - //根据重推信息id,查询该条重推记录信息 - IntegrationTaskLivingDetailsEntity oldMsg = new IntegrationTaskLivingDetailsEntity(); - if(StrUtil.isNotEmpty(interId)){ - oldMsg = taskLivingDetailsService.get(interId); - } - String rootAppPk = oldMsg.getRootAppPk(); - entity.setIds(rootAppPk); - StrUtil.isEmpty(rootAppPk);//entity.setQueryState("查询"); - //如果是重推,是否通过entity传入的id,只能查到一条数据。 - //entity.setId("-8845102890648320822"); - List soleList = saleInvDao.getU8SaleInv(entity); - logger.info("销售发票查询数据{}",JSONObject.toJSONString(soleList)); - if(CollectionUtils.isNotEmpty(soleList)){ - soleList.forEach(sale -> { - try{ - //获取明细数据进行拼接 - String id = sale.getSBVID(); - if(!StrUtil.isEmpty(id)){ - SaleInvDetailEntity line = new SaleInvDetailEntity(); - line.setSBVID(id); - line.setAccId(id); - line.setDataSourceCode(requestJson.getString("db_code")); - List lineList = saleInvDetailDao.getU8InvDetail(line); - logger.info("销售发票单明细查询数据{}",JSONObject.toJSONString(lineList)); - sale.setSaleInvDetailEntityList(lineList); - logger.info("组装数据"); - JSONObject main = bindingAdd(sale); - logger.info("销售发票推送数据:"+main.toString()); - String result = CrmUtil.sendU8TOCrmEsb(main.toString(), "8000340003"); - logger.info("销售发票推送结果:"+result); - IntegrationTaskLivingDetailsEntity logDetails = new IntegrationTaskLivingDetailsEntity(); - logDetails.setRootAppPk(sale.getIds()); - logDetails.setRootAppBill(sale.getCsbvcode()); - logDetails.setNewTransmitInfo(result); - logDetails.setNewPushDate(new Date()); - logDetails.setRootAppNewData(JSON.toJSONString(sale)); - logDetails.setPluginId("SaleConPlugin"); - - JSONObject resultObj = JSON.parseObject(result); - boolean flag = resultObj.getString("code").equals("0"); - if(flag){ - logDetails.setNewTransmitInfo("推送成功"); - // 推送成功,更新状态 - sale.setState("Y"); - }else{ - // 推送失败 - sale.setState("N"); - } - sale.setDataSourceCode(requestJson.getString("db_code")); - try{ - saveLog(interId, logDetails, flag); - }catch (Exception e){ - logger.error("保存日志失败"+e.getMessage()); - saleInvDao.updateState(sale); - e.printStackTrace(); - } - saleInvDao.updateState(sale); - } - } catch (Exception e) { - logger.error("销售发票执行失败"+e.getMessage()); - e.printStackTrace(); - } - }); - - } - } - /** - * - * @content 保存日志信息 - * @className: Administrator - * @author laborer - * @date 2024-10-18 11:27 - * - */ - - private void saveLog(String interId, IntegrationTaskLivingDetailsEntity logDetails, boolean flag) throws Exception { - if(StrUtil.isEmpty(interId)){ - if(flag){ - //首推成功 - taskLivingDetailsService.saveLogToSuccess(logDetails); - }else{ - //首推失败 - taskLivingDetailsService.saveLogToFail(logDetails); - } - }else{ - logDetails.setId(interId); - if(flag){ - //重推成功 - taskLivingDetailsService.saveLogFailToSuccess(logDetails); - }else{ - //重推失败,把失败信息,更新到重推表中 - taskLivingDetailsService.updateLogFailToSuccess(logDetails); - } - } - } - - /** - * - * @content 组装推送参数 - * @className: Administrator - * @author laborer - * @date 2024-10-18 11:13 - * - */ - - private JSONObject bindingAdd(SaleInvEntity sale) { - JSONObject main = new JSONObject(); - main.put("AccId",sale.getAccId()); - main.put("billid",sale.getId()); - main.put("LoginDate", DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss")); - JSONObject head = new JSONObject(); - head.put("csbvcode",sale.getCsbvcode()); - head.put("ddate",sale.getDdate()); - head.put("syncFlag",sale.getSyncFlag()); - head.put("isum",sale.getIsum()); - JSONArray body = new JSONArray(); - main.put("head",head); - List lineList = sale.getSaleInvDetailEntityList(); - if(CollectionUtils.isNotEmpty(lineList)){ - lineList.forEach(line -> { - JSONObject lineObj = new JSONObject(); - lineObj.put("cdlcode",line.getCdlcode()); - lineObj.put("idlsum",line.getIdlsum()); - lineObj.put("idlrowno",line.getIdlrowno()); - body.add(lineObj); - }); - } - main.put("body",body); - return main; - } -} diff --git a/service/src/main/java/com/hzya/frame/u8/saleout/dao/ISaleOutDao.java b/service/src/main/java/com/hzya/frame/u8/saleout/dao/ISaleOutDao.java deleted file mode 100644 index d11d03ed..00000000 --- a/service/src/main/java/com/hzya/frame/u8/saleout/dao/ISaleOutDao.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.hzya.frame.u8.saleout.dao; - -import com.hzya.frame.basedao.dao.IBaseDao; -import com.hzya.frame.u8.saleout.entity.SaleOutEntity; - -import java.util.List; - -/** - * @Description U8发货单 - * @Author xiangerlin - * @Date 2024/8/22 15:07 - **/ -public interface ISaleOutDao extends IBaseDao { - /** - * @content 获取U8销售出库单数据 - * @className: Administrator - * @author laborer - * @date 2024-10-18 10:49 - */ - - List getU8SaleOut(SaleOutEntity entity); -/** - * - * @content 推送修改状态 - * @className: Administrator - * @author laborer - * @date 2024-10-18 11:23 - * - */ - - int updateState(SaleOutEntity sale); -} diff --git a/service/src/main/java/com/hzya/frame/u8/saleout/dao/ISaleOutDetailDao.java b/service/src/main/java/com/hzya/frame/u8/saleout/dao/ISaleOutDetailDao.java deleted file mode 100644 index d4f51fac..00000000 --- a/service/src/main/java/com/hzya/frame/u8/saleout/dao/ISaleOutDetailDao.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.hzya.frame.u8.saleout.dao; - -import com.hzya.frame.basedao.dao.IBaseDao; -import com.hzya.frame.u8.saleout.entity.SaleOutDetailEntity; - -import java.util.List; - -/** - * @Description u8发货单明细行 - * @Author xiangerlin - * @Date 2024/8/22 16:22 - **/ -public interface ISaleOutDetailDao extends IBaseDao { - /** - * - * @content 获取u8发货单明细行 - * @return - * @className: Administrator - * @author laborer - * @date 2024-10-18 11:04 - * - */ - - List getU8SaleOutLine(SaleOutDetailEntity entity); -} diff --git a/service/src/main/java/com/hzya/frame/u8/saleout/dao/impl/SaleOutDaoImpl.java b/service/src/main/java/com/hzya/frame/u8/saleout/dao/impl/SaleOutDaoImpl.java deleted file mode 100644 index cac9899e..00000000 --- a/service/src/main/java/com/hzya/frame/u8/saleout/dao/impl/SaleOutDaoImpl.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.hzya.frame.u8.saleout.dao.impl; - -import com.baomidou.dynamic.datasource.annotation.DS; -import com.hzya.frame.basedao.dao.MybatisGenericDao; -import com.hzya.frame.u8.saleout.dao.ISaleOutDao; -import com.hzya.frame.u8.saleout.entity.SaleOutEntity; -import org.springframework.stereotype.Repository; - -import java.util.List; - -/** - * @Description u8发货单 - * @Author xiangerlin - * @Date 2024/8/22 15:09 - **/ -@Repository(value = "SaleOutDaoImpl") -public class SaleOutDaoImpl extends MybatisGenericDao implements ISaleOutDao { - @DS("#entity.dataSourceCode") - @Override - public List getU8SaleOut(SaleOutEntity entity) { - return (List) super.selectList("com.hzya.frame.u8.saleout.dao.impl.SaleOutDaoImpl.entity_list_base",entity); - } - @DS("#entity.dataSourceCode") - @Override - public int updateState(SaleOutEntity entity) { - return super.update("com.hzya.frame.u8.saleout.dao.impl.SaleOutDaoImpl.entity_list_base",entity); - } -} diff --git a/service/src/main/java/com/hzya/frame/u8/saleout/dao/impl/SaleOutDetailDaoImpl.java b/service/src/main/java/com/hzya/frame/u8/saleout/dao/impl/SaleOutDetailDaoImpl.java deleted file mode 100644 index 894ed33c..00000000 --- a/service/src/main/java/com/hzya/frame/u8/saleout/dao/impl/SaleOutDetailDaoImpl.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.hzya.frame.u8.saleout.dao.impl; - -import com.baomidou.dynamic.datasource.annotation.DS; -import com.hzya.frame.basedao.dao.MybatisGenericDao; -import com.hzya.frame.u8.saleout.dao.ISaleOutDetailDao; -import com.hzya.frame.u8.saleout.entity.SaleOutDetailEntity; -import org.springframework.stereotype.Repository; - -import java.util.List; - -/** - * @Description - * @Author xiangerlin - * @Date 2024/8/22 16:24 - **/ -@Repository(value = "SaleOutDetailDaoImpl") -public class SaleOutDetailDaoImpl extends MybatisGenericDao implements ISaleOutDetailDao { - @DS("#entity.dataSourceCode") - @Override - public List getU8SaleOutLine(SaleOutDetailEntity entity) { - return (List) super.selectList("com.hzya.frame.u8.saleout.dao.impl.SaleOutDetailDaoImpl.entity_list_base",entity); - } -} diff --git a/service/src/main/java/com/hzya/frame/u8/saleout/entity/SaleOutDetailEntity.java b/service/src/main/java/com/hzya/frame/u8/saleout/entity/SaleOutDetailEntity.java deleted file mode 100644 index 89d9cafb..00000000 --- a/service/src/main/java/com/hzya/frame/u8/saleout/entity/SaleOutDetailEntity.java +++ /dev/null @@ -1,76 +0,0 @@ -package com.hzya.frame.u8.saleout.entity; - -import com.hzya.frame.web.entity.BaseEntity; - -/** - * - * @content 销售出库单明细 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -public class SaleOutDetailEntity extends BaseEntity { - private String cinvcode;//存货编码 - private String cinvname;//存货名称 - private String iquantity;//数量 - private String inum;//辅计量单位数量 - private String idlrowno;//发货单行号 - private String AccCode;//账套编码 - private String AccId;//账套号 - - public String getAccCode() { - return AccCode; - } - - public void setAccCode(String accCode) { - AccCode = accCode; - } - - public String getAccId() { - return AccId; - } - - public void setAccId(String accId) { - AccId = accId; - } - public String getCinvcode() { - return cinvcode; - } - - public void setCinvcode(String cinvcode) { - this.cinvcode = cinvcode; - } - - public String getCinvname() { - return cinvname; - } - - public void setCinvname(String cinvname) { - this.cinvname = cinvname; - } - - public String getIquantity() { - return iquantity; - } - - public void setIquantity(String iquantity) { - this.iquantity = iquantity; - } - - public String getInum() { - return inum; - } - - public void setInum(String inum) { - this.inum = inum; - } - - public String getIdlrowno() { - return idlrowno; - } - - public void setIdlrowno(String idlrowno) { - this.idlrowno = idlrowno; - } -} diff --git a/service/src/main/java/com/hzya/frame/u8/saleout/entity/SaleOutDetailEntity.xml b/service/src/main/java/com/hzya/frame/u8/saleout/entity/SaleOutDetailEntity.xml deleted file mode 100644 index 7ec7acfb..00000000 --- a/service/src/main/java/com/hzya/frame/u8/saleout/entity/SaleOutDetailEntity.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - diff --git a/service/src/main/java/com/hzya/frame/u8/saleout/entity/SaleOutEntity.java b/service/src/main/java/com/hzya/frame/u8/saleout/entity/SaleOutEntity.java deleted file mode 100644 index ace3d86d..00000000 --- a/service/src/main/java/com/hzya/frame/u8/saleout/entity/SaleOutEntity.java +++ /dev/null @@ -1,102 +0,0 @@ -package com.hzya.frame.u8.saleout.entity; - -import com.fasterxml.jackson.annotation.JsonFormat; -import com.hzya.frame.web.entity.BaseEntity; -import org.springframework.format.annotation.DateTimeFormat; - -import java.util.List; - -/** - * - * @content 销售出库单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ - -public class SaleOutEntity extends BaseEntity { - private String cdlcode;//发货单号 - private String outtype;//出库方式 - private String ccode;//出库单号 - private String ddate;//出库日期 - private String AccId;//账套 - private String state;//状态 - private String AccCode;//账套编码 - private String ids;// - - public String getIds() { - return ids; - } - - public void setIds(String ids) { - this.ids = ids; - } - - public String getAccCode() { - return AccCode; - } - - public void setAccCode(String accCode) { - AccCode = accCode; - } - - - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public String getAccId() { - return AccId; - } - - public void setAccId(String accId) { - AccId = accId; - } - - private ListsaleOutDetailEntityList; - - public List getSaleOutDetailEntityList() { - return saleOutDetailEntityList; - } - - public void setSaleOutDetailEntityList(List saleOutDetailEntityList) { - this.saleOutDetailEntityList = saleOutDetailEntityList; - } - - public String getCdlcode() { - return cdlcode; - } - - public void setCdlcode(String cdlcode) { - this.cdlcode = cdlcode; - } - - public String getOuttype() { - return outtype; - } - - public void setOuttype(String outtype) { - this.outtype = outtype; - } - - public String getCcode() { - return ccode; - } - - public void setCcode(String ccode) { - this.ccode = ccode; - } - - public String getDdate() { - return ddate; - } - - public void setDdate(String ddate) { - this.ddate = ddate; - } -} diff --git a/service/src/main/java/com/hzya/frame/u8/saleout/entity/SaleOutEntity.xml b/service/src/main/java/com/hzya/frame/u8/saleout/entity/SaleOutEntity.xml deleted file mode 100644 index 6c7e4035..00000000 --- a/service/src/main/java/com/hzya/frame/u8/saleout/entity/SaleOutEntity.xml +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - update #{AccCode}.dbo.rdrecords32 set sync_flag = #{state} - where id = #{id} - - diff --git a/service/src/main/java/com/hzya/frame/u8/saleout/service/ISaleOutDetaiService.java b/service/src/main/java/com/hzya/frame/u8/saleout/service/ISaleOutDetaiService.java deleted file mode 100644 index 64fda28b..00000000 --- a/service/src/main/java/com/hzya/frame/u8/saleout/service/ISaleOutDetaiService.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.hzya.frame.u8.saleout.service; - -import com.hzya.frame.basedao.service.IBaseService; -import com.hzya.frame.u8.saleout.entity.SaleOutDetailEntity; - -/** - * - * @content 销售出库单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -public interface ISaleOutDetaiService extends IBaseService { -} diff --git a/service/src/main/java/com/hzya/frame/u8/saleout/service/ISaleOutService.java b/service/src/main/java/com/hzya/frame/u8/saleout/service/ISaleOutService.java deleted file mode 100644 index 3ab5a256..00000000 --- a/service/src/main/java/com/hzya/frame/u8/saleout/service/ISaleOutService.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.hzya.frame.u8.saleout.service; - -import com.alibaba.fastjson.JSONObject; -import com.hzya.frame.basedao.service.IBaseService; -import com.hzya.frame.u8.saleout.entity.SaleOutEntity; - -/** - * - * @content 销售出库单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -public interface ISaleOutService extends IBaseService { -/** - * - * @content 获取U8销售出库单到CRM - * @className: Administrator - * @author laborer - * @date 2024-10-18 10:15 - * - */ - - void getU8SaleOutToCrm(JSONObject requestJson); -} diff --git a/service/src/main/java/com/hzya/frame/u8/saleout/service/impl/SaleOutDetaiServiceImpl.java b/service/src/main/java/com/hzya/frame/u8/saleout/service/impl/SaleOutDetaiServiceImpl.java deleted file mode 100644 index 073d0d46..00000000 --- a/service/src/main/java/com/hzya/frame/u8/saleout/service/impl/SaleOutDetaiServiceImpl.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.hzya.frame.u8.saleout.service.impl; - -import com.hzya.frame.basedao.service.impl.BaseService; -import com.hzya.frame.u8.saleout.dao.ISaleOutDetailDao; -import com.hzya.frame.u8.saleout.entity.SaleOutDetailEntity; -import com.hzya.frame.u8.saleout.service.ISaleOutDetaiService; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -/** - * - * @content 销售出库单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -@Service(value = "SaleOutDetaiServiceImpl") -public class SaleOutDetaiServiceImpl extends BaseService implements ISaleOutDetaiService { - Logger logger = LogManager.getLogger(getClass()); - - -} diff --git a/service/src/main/java/com/hzya/frame/u8/saleout/service/impl/SaleOutServiceImpl.java b/service/src/main/java/com/hzya/frame/u8/saleout/service/impl/SaleOutServiceImpl.java deleted file mode 100644 index c60a6654..00000000 --- a/service/src/main/java/com/hzya/frame/u8/saleout/service/impl/SaleOutServiceImpl.java +++ /dev/null @@ -1,204 +0,0 @@ -package com.hzya.frame.u8.saleout.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.baomidou.dynamic.datasource.annotation.DS; -import com.hzya.frame.basedao.service.impl.BaseService; -import com.hzya.frame.crm.util.CrmUtil; -import com.hzya.frame.seeyon.util.RestUtil; -import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity; -import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService; -import com.hzya.frame.u8.saleout.dao.ISaleOutDao; -import com.hzya.frame.u8.saleout.dao.ISaleOutDetailDao; -import com.hzya.frame.u8.saleout.dao.impl.SaleOutDetailDaoImpl; -import com.hzya.frame.u8.saleout.entity.SaleOutDetailEntity; -import com.hzya.frame.u8.saleout.entity.SaleOutEntity; -import com.hzya.frame.u8.saleout.service.ISaleOutService; -import com.hzya.frame.web.entity.JsonResultEntity; -import org.apache.commons.collections.CollectionUtils; -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 javax.annotation.Resource; -import java.util.Date; -import java.util.List; - -/** - * - * @content 销售出库单 - * @className: Administrator - * @author laborer - * @date 2024-10-18 9:27 - * - */ -@Service(value = "SaleOutServiceImpl") -public class SaleOutServiceImpl extends BaseService implements ISaleOutService { - Logger logger = LogManager.getLogger(getClass()); - @Autowired - private ISaleOutDao saleOutDao; - @Autowired - private ISaleOutDetailDao saleOutDetailDao; - @Resource - private IIntegrationTaskLivingDetailsService taskLivingDetailsService; - - /** - * - * @content 获取U8销售出库单到CRM - * @className: Administrator - * @author laborer - * @date 2024-10-18 10:15 - * - */ - - @Override - public void getU8SaleOutToCrm(JSONObject requestJson) { - //获取重推信息id,并记录日志 - JSONObject requestJsonObj = JSON.parseObject(requestJson.toString(),JSONObject.class); - String interId = requestJsonObj.getString("integration_task_living_details_id"); - logger.info("U8销售出库单重推解析后:"+requestJsonObj.toString()); - logger.info("U8销售出库单推送CRM重新执行的任务主键:"+interId); - - //更换数据源 - JsonResultEntity resultEntity = new JsonResultEntity(); - SaleOutEntity entity = new SaleOutEntity(); - requestJson.put("db_code","YONYOUU8"); - entity.setDataSourceCode(requestJson.getString("db_code")); - - //根据重推信息id,查询该条重推记录信息 - IntegrationTaskLivingDetailsEntity oldMsg = new IntegrationTaskLivingDetailsEntity(); - if(StrUtil.isNotEmpty(interId)){ - oldMsg = taskLivingDetailsService.get(interId); - } - String rootAppPk = oldMsg.getRootAppPk(); - entity.setIds(rootAppPk); - StrUtil.isEmpty(rootAppPk);//entity.setQueryState("查询"); - //如果是重推,是否通过entity传入的id,只能查到一条数据。 - //entity.setId("-8845102890648320822"); - List soleList = saleOutDao.getU8SaleOut(entity); - logger.info("销售出库查询数据{}",JSONObject.toJSONString(soleList)); - if(CollectionUtils.isNotEmpty(soleList)){ - soleList.forEach(sale -> { - try{ - //获取明细数据进行拼接 - String id = sale.getId(); - if(!StrUtil.isEmpty(id)){ - SaleOutDetailEntity line = new SaleOutDetailEntity(); - line.setId(id); - line.setAccId(id); - line.setDataSourceCode(requestJson.getString("db_code")); - List lineList = saleOutDetailDao.getU8SaleOutLine(line); - logger.info("销售出库单明细查询数据{}",JSONObject.toJSONString(lineList)); - sale.setSaleOutDetailEntityList(lineList); - logger.info("组装数据"); - JSONObject main = bindingAdd(sale); - logger.info("销售出库推送数据:"+main.toString()); - String result = CrmUtil.sendU8TOCrmEsb(main.toString(), "8000340003"); - logger.info("销售出库推送结果:"+result); - IntegrationTaskLivingDetailsEntity logDetails = new IntegrationTaskLivingDetailsEntity(); - logDetails.setRootAppPk(sale.getIds()); - logDetails.setRootAppBill(sale.getCcode()); - logDetails.setNewTransmitInfo(result); - logDetails.setNewPushDate(new Date()); - logDetails.setRootAppNewData(JSON.toJSONString(sale)); - logDetails.setPluginId("SaleConPlugin"); - - JSONObject resultObj = JSON.parseObject(result); - boolean flag = resultObj.getString("code").equals("0"); - if(flag){ - logDetails.setNewTransmitInfo("推送成功"); - // 推送成功,更新状态 - sale.setState("Y"); - }else{ - // 推送失败 - sale.setState("N"); - } - sale.setDataSourceCode(requestJson.getString("db_code")); - try{ - saveLog(interId, logDetails, flag); - }catch (Exception e){ - logger.error("保存日志失败"+e.getMessage()); - saleOutDao.updateState(sale); - e.printStackTrace(); - } - saleOutDao.updateState(sale); - } - } catch (Exception e) { - logger.error("销售出库执行失败"+e.getMessage()); - e.printStackTrace(); - } - }); - - } - } -/** - * - * @content 保存日志信息 - * @className: Administrator - * @author laborer - * @date 2024-10-18 11:27 - * - */ - - private void saveLog(String interId, IntegrationTaskLivingDetailsEntity logDetails, boolean flag) throws Exception { - if(StrUtil.isEmpty(interId)){ - if(flag){ - //首推成功 - taskLivingDetailsService.saveLogToSuccess(logDetails); - }else{ - //首推失败 - taskLivingDetailsService.saveLogToFail(logDetails); - } - }else{ - logDetails.setId(interId); - if(flag){ - //重推成功 - taskLivingDetailsService.saveLogFailToSuccess(logDetails); - }else{ - //重推失败,把失败信息,更新到重推表中 - taskLivingDetailsService.updateLogFailToSuccess(logDetails); - } - } - } - - /** - * - * @content 组装推送参数 - * @className: Administrator - * @author laborer - * @date 2024-10-18 11:13 - * - */ - - private JSONObject bindingAdd(SaleOutEntity sale) { - JSONObject main = new JSONObject(); - main.put("AccId",sale.getAccId()); - main.put("billid",sale.getId()); - main.put("LoginDate", DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss")); - JSONObject head = new JSONObject(); - head.put("cdlcode",sale.getCdlcode()); - head.put("couttype",sale.getOuttype()); - head.put("ccode",sale.getCcode()); - head.put("ddate",sale.getDdate()); - JSONArray body = new JSONArray(); - List lineList = sale.getSaleOutDetailEntityList(); - if(CollectionUtils.isNotEmpty(lineList)){ - lineList.forEach(line -> { - JSONObject lineObj = new JSONObject(); - lineObj.put("cinvcode",line.getCinvcode()); - lineObj.put("cinvname",line.getCinvname()); - lineObj.put("iquantity",line.getIquantity()); - lineObj.put("inum",line.getInum()); - lineObj.put("idlrowno",line.getIdlrowno()); - body.add(lineObj); - }); - } - main.put("head",head); - main.put("body",body); - return main; - } -}