From a9a81244ac58ec2c0880327bd3aa44c5e9b1d8de Mon Sep 17 00:00:00 2001 From: zhengyf Date: Wed, 6 Nov 2024 15:27:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BD=E7=9F=A5=EF=BC=9A1=E3=80=81=E9=92=89?= =?UTF-8?q?=E9=92=89=E5=9B=9E=E8=B0=83=E4=BF=AE=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/CallBackServiceImpl.java | 32 +++++++++-------- .../dingtalk/dao/impl/DingU8cBillDaoImpl.java | 2 ++ .../plugin/lets/util/QueryU8CEntityUtil.java | 34 +++++++++---------- 3 files changed, 37 insertions(+), 31 deletions(-) diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/dingtalk/callback/service/impl/CallBackServiceImpl.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/dingtalk/callback/service/impl/CallBackServiceImpl.java index 3b2595f3..3ee9e70a 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/dingtalk/callback/service/impl/CallBackServiceImpl.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/dingtalk/callback/service/impl/CallBackServiceImpl.java @@ -396,26 +396,26 @@ public class CallBackServiceImpl implements CallBackService { String bz = ""; String fjJson=""; for (GetProcessInstanceResponseBody.GetProcessInstanceResponseBodyResultFormComponentValues formComponentValue : formComponentValues) { - if ("费用所属公司".equals(formComponentValue.getValue())) { - corpName = formComponentValue.getName(); + if ("费用所属公司".equals(formComponentValue.getName())) { + corpName = formComponentValue.getValue(); } - if ("费用所属部门".equals(formComponentValue.getValue())) { - deptName = formComponentValue.getName(); + if ("费用所属部门".equals(formComponentValue.getName())) { + deptName = formComponentValue.getValue(); } - if ("项目所属类目".equals(formComponentValue.getValue())) { - xmName = formComponentValue.getName(); + if ("项目所属类目".equals(formComponentValue.getName())) { + xmName = formComponentValue.getValue(); } - if ("费用所属项目".equals(formComponentValue.getValue())) { - fyName = formComponentValue.getName(); + if ("费用所属项目".equals(formComponentValue.getName())) { + fyName = formComponentValue.getValue(); } - if ("申请理由".equals(formComponentValue.getValue())) { - ly = formComponentValue.getName(); + if ("申请理由".equals(formComponentValue.getName())) { + ly = formComponentValue.getValue(); } - if ("申请金额(元)".equals(formComponentValue.getValue())) { - je = formComponentValue.getName(); + if ("申请金额(元)".equals(formComponentValue.getName())) { + je = formComponentValue.getValue(); } - if ("备注".equals(formComponentValue.getValue())) { - bz = formComponentValue.getName(); + if ("备注".equals(formComponentValue.getName())) { + bz = formComponentValue.getValue(); } if("DDAttachment".equals(formComponentValue.getComponentType())){ fjJson = formComponentValue.getValue(); @@ -439,6 +439,9 @@ public class CallBackServiceImpl implements CallBackService { } parentvo.setDwbm(bdCorpEntity.getUnitcode()); + //djlxbm单据类型编码 采购付款单 D3 + parentvo.setDjlxbm("D3"); + //wldx 往来对象标识(0 客户 1供应商 2部门 3业务员 ) parentvo.setWldx("2"); @@ -464,6 +467,7 @@ public class CallBackServiceImpl implements CallBackService { billvo.setParentvo(parentvo); billvo.setChildren(children); mapStr = JSONUtil.toJsonStr(billvo); + mapStr="{\"billvo\":["+mapStr+"]}"; //推送u8c ZTResult ztResult = pushU8CByApiCode.pushByCode(OverallConstant.getOverAllValue("otheroutqzCode"), mapStr); if ("false".equals(ztResult.getFlag())) { diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/dingtalk/dao/impl/DingU8cBillDaoImpl.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/dingtalk/dao/impl/DingU8cBillDaoImpl.java index 4d769bda..cb1b3eba 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/dingtalk/dao/impl/DingU8cBillDaoImpl.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/dingtalk/dao/impl/DingU8cBillDaoImpl.java @@ -29,9 +29,11 @@ public class DingU8cBillDaoImpl extends MybatisGenericDao query = this.query(dingU8cBill); if (query.size() == 0) { diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/QueryU8CEntityUtil.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/QueryU8CEntityUtil.java index 705c506e..a3403d66 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/QueryU8CEntityUtil.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/QueryU8CEntityUtil.java @@ -87,10 +87,11 @@ public class QueryU8CEntityUtil { * 根据公司主键查询全部部门 */ public List queryBdDeptDocByPkCorp(String pkCorp){ - BdDeptdocEntity bdDeptdocEntity = new BdDeptdocEntity(); - bdDeptdocEntity.setDr(0); - bdDeptdocEntity.setPkCorp(pkCorp); - List query = bdDeptdocDao.query(bdDeptdocEntity); + BdDeptdocEntity entity = new BdDeptdocEntity(); + entity.setDr(0); + entity.setPkCorp(pkCorp); + entity.setDataSourceCode(ProfilesActiveConstant.LETS_DATE_SOURCE); + List query = bdDeptdocDao.query(entity); return query; } @@ -98,29 +99,28 @@ public class QueryU8CEntityUtil { * 根据公司主键、部门编码查询部门 */ public BdDeptdocEntity queryBdDeptDocByPkCorpAndDeptCode(String pkCorp,String deptCode){ - BdDeptdocEntity bdDeptdocEntity = new BdDeptdocEntity(); - bdDeptdocEntity.setDr(0); - bdDeptdocEntity.setPkCorp(pkCorp); - bdDeptdocEntity.setDeptcode(deptCode); - List query = bdDeptdocDao.query(bdDeptdocEntity); + BdDeptdocEntity entity = new BdDeptdocEntity(); + entity.setDr(0); + entity.setPkCorp(pkCorp); + entity.setDeptcode(deptCode); + entity.setDataSourceCode(ProfilesActiveConstant.LETS_DATE_SOURCE); + List query = bdDeptdocDao.query(entity); if (query.size() >= 1) { return query.get(0); } else { return null; } - } - - /** * 根据公司主键、部门名称查询部门 */ public BdDeptdocEntity queryBdDeptDocByPkCorpAndDeptName(String pkCorp,String deptName) { - BdDeptdocEntity bdDeptdocEntity = new BdDeptdocEntity(); - bdDeptdocEntity.setDr(0); - bdDeptdocEntity.setPkCorp(pkCorp); - bdDeptdocEntity.setDeptname(deptName); - List query = bdDeptdocDao.query(bdDeptdocEntity); + BdDeptdocEntity entity = new BdDeptdocEntity(); + entity.setDr(0); + entity.setPkCorp(pkCorp); + entity.setDeptname(deptName); + entity.setDataSourceCode(ProfilesActiveConstant.LETS_DATE_SOURCE); + List query = bdDeptdocDao.query(entity); if (query.size() >= 1) { return query.get(0); } else {