From d6bdd3605f6d44a1bad5b4226e2f3b1bc08e2fc6 Mon Sep 17 00:00:00 2001 From: lvleigang <957075182@qq.com> Date: Mon, 9 Sep 2024 17:32:47 +0800 Subject: [PATCH 1/4] =?UTF-8?q?u8c=E5=B0=81=E8=A3=85=E6=8E=A5=E5=8F=A3,?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/SysApplicationServiceImpl.java | 2 +- .../entity/EncapsulationEntity.java | 22 ++- .../entity/EncapsulationEntity.xml | 13 +- .../service/impl/EncapsulationImpl.java | 143 +++++++++--------- 4 files changed, 103 insertions(+), 77 deletions(-) diff --git a/service/src/main/java/com/hzya/frame/sysnew/application/service/impl/SysApplicationServiceImpl.java b/service/src/main/java/com/hzya/frame/sysnew/application/service/impl/SysApplicationServiceImpl.java index e2674a56..2a11d6ef 100644 --- a/service/src/main/java/com/hzya/frame/sysnew/application/service/impl/SysApplicationServiceImpl.java +++ b/service/src/main/java/com/hzya/frame/sysnew/application/service/impl/SysApplicationServiceImpl.java @@ -123,7 +123,7 @@ public class SysApplicationServiceImpl extends BaseService SELECT - vbillcode as code + h.vbillcode as code, + a.unitcode FROM - ic_general_h + ic_general_h h + LEFT JOIN bd_corp a on a.pk_corp = h.pk_corp WHERE - cgeneralhid in ( - SELECT cgeneralhid FROM ic_general_b WHERE vfirstbillcode = #{code} and csourcetype = #{type} + h.cgeneralhid in ( + SELECT cgeneralhid FROM ic_general_b WHERE vfirstbillcode = #{code} + and csourcetype = #{type} ) + and h.cbilltypecode = #{cbilltypecode} + diff --git a/service/src/main/java/com/hzya/frame/u8c/Encapsulation/service/impl/EncapsulationImpl.java b/service/src/main/java/com/hzya/frame/u8c/Encapsulation/service/impl/EncapsulationImpl.java index 1f74f2c7..47f23d0b 100644 --- a/service/src/main/java/com/hzya/frame/u8c/Encapsulation/service/impl/EncapsulationImpl.java +++ b/service/src/main/java/com/hzya/frame/u8c/Encapsulation/service/impl/EncapsulationImpl.java @@ -138,32 +138,32 @@ public class EncapsulationImpl extends BaseService return returnObject; } //执行库存采购入库单取消签字接口 - String cgrkdqxqz = getsendBody("1", jsonObject, encapsulationEntities.get(0).getCode()); - boolean cgrkdqxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgrkqxqz"), jsonObject.getString("cgrkqxqz").substring(6), cgrkdqxqz); + String cgrkdqxqz = getsendBody("1", jsonObject, encapsulationEntities.get(0).getCode(),encapsulationEntities.get(0).getUnitcode()); + boolean cgrkdqxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgrkqxqz"), jsonObject.getString("cgrkqxqz").substring(0,6), cgrkdqxqz); if (!cgrkdqxqzflag) { returnObject.put("status", "falied"); returnObject.put("errormsg", "采购入库单取消签字失败"); return returnObject; } //执行库存采购入库单删除 - String cgrkdsc = getsendBody("2", jsonObject, encapsulationEntities.get(0).getCode()); - boolean cgrkdscfiag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgrksc"), jsonObject.getString("cgrksc").substring(6), cgrkdsc); + String cgrkdsc = getsendBody("2", jsonObject, encapsulationEntities.get(0).getCode(),encapsulationEntities.get(0).getUnitcode()); + boolean cgrkdscfiag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgrksc"), jsonObject.getString("cgrksc").substring(0,6), cgrkdsc); if (!cgrkdscfiag) { returnObject.put("status", "falied"); returnObject.put("errormsg", "采购入库单删除失败"); return returnObject; } //执行采购订单弃审 - String cgddqs = getsendBody("3", jsonObject, null); - boolean cgddqsflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgddqs"), jsonObject.getString("cgddqs").substring(6), cgddqs); + String cgddqs = getsendBody("3", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp")); + boolean cgddqsflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgddqs"), jsonObject.getString("cgddqs").substring(0,6), cgddqs); if (!cgddqsflag) { returnObject.put("status", "falied"); returnObject.put("errormsg", "采购订单弃审失败"); return returnObject; } //执行采购订单删除 - String cgddsc = getsendBody("4", jsonObject, null); - boolean cgddscflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgddsc"), jsonObject.getString("cgddsc").substring(6), cgddsc); + String cgddsc = getsendBody("4", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp")); + boolean cgddscflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgddsc"), jsonObject.getString("cgddsc").substring(0,6), cgddsc); if (cgddscflag) { returnObject.put("status", "success"); returnObject.put("errormsg", "采购订单删除成功"); @@ -196,8 +196,8 @@ public class EncapsulationImpl extends BaseService String parm = entity.getBodys(); JSONObject jsonObject = JSONObject.parseObject(parm); jsonObject.put("dataSourceCode",sysDataSourceEntities.get(0).getSourceCode()); - jsonObject.put("publicKey",headers.get("publicKey")); - jsonObject.put("secretKey",headers.get("secretKey")); + jsonObject.put("publicKey",entity.getSendApp().getPublicKey()); + jsonObject.put("secretKey",entity.getSendApp().getSecretKey()); jsonObject.put("cgrkqxqz",headers.get("cgrkqxqz")); jsonObject.put("cgrksc",headers.get("cgrksc")); @@ -275,8 +275,8 @@ public class EncapsulationImpl extends BaseService return returnObject; } //执行库存采购入库单取消签字接口 - String cgrkdqxqz = getsendBody("1", jsonObject, jsonObject.getString("code")); - boolean cgrkdqxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgrkqxqz"), jsonObject.getString("cgrkqxqz").substring(6), cgrkdqxqz); + String cgrkdqxqz = getsendBody("1", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp")); + boolean cgrkdqxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgrkqxqz"), jsonObject.getString("cgrkqxqz").substring(0,6), cgrkdqxqz); if (!cgrkdqxqzflag) { returnObject.put("status", "falied"); returnObject.put("errormsg", "采购入库单取消签字失败"); @@ -284,8 +284,8 @@ public class EncapsulationImpl extends BaseService } //执行库存采购入库单删除接口 - String cgrkdsc = getsendBody("2", jsonObject, jsonObject.getString("code")); - boolean cgrkdscfiag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgrksc"), jsonObject.getString("cgrksc").substring(6), cgrkdsc); + String cgrkdsc = getsendBody("2", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp")); + boolean cgrkdscfiag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgrksc"), jsonObject.getString("cgrksc").substring(0,6), cgrkdsc); if (cgrkdscfiag) { returnObject.put("status", "success"); returnObject.put("errormsg", "采购入库单删除成功"); @@ -318,8 +318,8 @@ public class EncapsulationImpl extends BaseService String parm = entity.getBodys(); JSONObject jsonObject = JSONObject.parseObject(parm); jsonObject.put("dataSourceCode",sysDataSourceEntities.get(0).getSourceCode()); - jsonObject.put("publicKey",headers.get("publicKey")); - jsonObject.put("secretKey",headers.get("secretKey")); + jsonObject.put("publicKey",entity.getSendApp().getPublicKey()); + jsonObject.put("secretKey",entity.getSendApp().getSecretKey()); jsonObject.put("cgrkqxqz",headers.get("cgrkqxqz")); jsonObject.put("cgrksc",headers.get("cgrksc")); @@ -418,32 +418,32 @@ public class EncapsulationImpl extends BaseService return returnObject; } //库存销售出库单取消签字, - String cgrkdqxqz = getsendBody("1", jsonObject, encapsulationEntities.get(0).getCode()); - boolean cgrkdqxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcxsckqxqz"), jsonObject.getString("kcxsckqxqz").substring(6), cgrkdqxqz); + String cgrkdqxqz = getsendBody("1", jsonObject, encapsulationEntities.get(0).getCode(), encapsulationEntities.get(0).getUnitcode()); + boolean cgrkdqxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcxsckqxqz"), jsonObject.getString("kcxsckqxqz").substring(0,6), cgrkdqxqz); if (!cgrkdqxqzflag) { returnObject.put("status", "falied"); returnObject.put("errormsg", "库存销售出库单取消签字失败"); return returnObject; } //库存销售出库单删除 - String cgrkdsc = getsendBody("2", jsonObject, encapsulationEntities.get(0).getCode()); - boolean cgrkdscfiag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcxscksc"), jsonObject.getString("kcxscksc").substring(6), cgrkdsc); + String cgrkdsc = getsendBody("2", jsonObject, encapsulationEntities.get(0).getCode(), encapsulationEntities.get(0).getUnitcode()); + boolean cgrkdscfiag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcxscksc"), jsonObject.getString("kcxscksc").substring(0,6), cgrkdsc); if (!cgrkdscfiag) { returnObject.put("status", "falied"); returnObject.put("errormsg", "库存销售出库单删除失败"); return returnObject; } //销售订单取消审批,, - String cgddqs = getsendBody("3", jsonObject, jsonObject.getString("code")); - boolean cgddqsflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("xsddqxsp"), jsonObject.getString("xsddqxsp").substring(6), cgddqs); + String cgddqs = getsendBody("3", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp")); + boolean cgddqsflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("xsddqxsp"), jsonObject.getString("xsddqxsp").substring(0,6), cgddqs); if (!cgddqsflag) { returnObject.put("status", "falied"); returnObject.put("errormsg", "销售订单取消审批失败"); return returnObject; } //销售订单删除 - String cgddsc = getsendBody("4", jsonObject, jsonObject.getString("code")); - boolean cgddscflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("xsddsc"), jsonObject.getString("xsddsc").substring(6), cgddsc); + String cgddsc = getsendBody("4", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp")); + boolean cgddscflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("xsddsc"), jsonObject.getString("xsddsc").substring(0,6), cgddsc); if (cgddscflag) { returnObject.put("status", "success"); returnObject.put("errormsg", "销售订单删除成功"); @@ -476,8 +476,8 @@ public class EncapsulationImpl extends BaseService String parm = entity.getBodys(); JSONObject jsonObject = JSONObject.parseObject(parm); jsonObject.put("dataSourceCode",sysDataSourceEntities.get(0).getSourceCode()); - jsonObject.put("publicKey",headers.get("publicKey")); - jsonObject.put("secretKey",headers.get("secretKey")); + jsonObject.put("publicKey",entity.getSendApp().getPublicKey()); + jsonObject.put("secretKey",entity.getSendApp().getSecretKey()); jsonObject.put("kcxsckqxqz",headers.get("kcxsckqxqz")); jsonObject.put("kcxscksc",headers.get("kcxscksc")); @@ -583,7 +583,7 @@ public class EncapsulationImpl extends BaseService EncapsulationEntity rk = new EncapsulationEntity(); rk.setCode(jsonObject.getString("code")); rk.setDataSourceCode(jsonObject.getString("dataSourceCode")); - rk.setType("4E"); + rk.setCbilltypecode("4E"); List rklist = encapsulationDao.queryCgrkddh(rk); if(rklist == null || rklist.size() != 1){ returnObject.put("status", "falied"); @@ -594,7 +594,7 @@ public class EncapsulationImpl extends BaseService EncapsulationEntity ck = new EncapsulationEntity(); ck.setCode(jsonObject.getString("code")); ck.setDataSourceCode(jsonObject.getString("dataSourceCode")); - ck.setType("4Y"); + ck.setCbilltypecode("4Y"); List cklist = encapsulationDao.queryCgrkddh(ck); if(cklist == null || cklist.size() != 1){ returnObject.put("status", "falied"); @@ -602,48 +602,48 @@ public class EncapsulationImpl extends BaseService return returnObject; } //调拨入库取消签字 - String dbrk = getsendBody("1", jsonObject, jsonObject.getString("code")); - boolean dbrkflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("dbrkqxqz"), jsonObject.getString("dbrkqxqz").substring(6), dbrk); + String dbrk = getsendBody("1", jsonObject, rklist.get(0).getCode(),rklist.get(0).getUnitcode()); + boolean dbrkflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("dbrkqxqz"), jsonObject.getString("dbrkqxqz").substring(0,6), dbrk); if (!dbrkflag) { returnObject.put("status", "falied"); returnObject.put("errormsg", "调拨入库取消签字失败"); return returnObject; } //调拨入库删除 - String dbrksc = getsendBody("2", jsonObject, jsonObject.getString("code")); - boolean dbrkscflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("dbrksc"), jsonObject.getString("dbrksc").substring(6), dbrksc); + String dbrksc = getsendBody("2", jsonObject, rklist.get(0).getCode(), rklist.get(0).getUnitcode()); + boolean dbrkscflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("dbrksc"), jsonObject.getString("dbrksc").substring(0,6), dbrksc); if (!dbrkscflag) { returnObject.put("status", "falied"); returnObject.put("errormsg", "调拨入库删除失败"); return returnObject; } //库存调拨出库取消签字 - String dbck = getsendBody("1", jsonObject, jsonObject.getString("code")); - boolean dbckflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcdbckqxqz"), jsonObject.getString("kcdbckqxqz").substring(6), dbck); + String dbck = getsendBody("1", jsonObject, cklist.get(0).getCode(), cklist.get(0).getUnitcode()); + boolean dbckflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcdbckqxqz"), jsonObject.getString("kcdbckqxqz").substring(0,6), dbck); if (!dbckflag) { returnObject.put("status", "falied"); returnObject.put("errormsg", "库存调拨出库取消签字失败"); return returnObject; } //库存调拨出库删除 - String dbcksc = getsendBody("2", jsonObject, jsonObject.getString("code")); - boolean dbckscflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcdbcksc"), jsonObject.getString("kcdbcksc").substring(6), dbcksc); + String dbcksc = getsendBody("2", jsonObject, cklist.get(0).getCode(), cklist.get(0).getUnitcode()); + boolean dbckscflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcdbcksc"), jsonObject.getString("kcdbcksc").substring(0,6), dbcksc); if (!dbckscflag) { returnObject.put("status", "falied"); returnObject.put("errormsg", "库存调拨出库删除失败"); return returnObject; } //调拨订单弃审 - String dbdd = getsendBody("3", jsonObject, jsonObject.getString("code")); - boolean dbddflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("dbddqs"), jsonObject.getString("dbddqs").substring(6), dbdd); + String dbdd = getsendBody("3", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp")); + boolean dbddflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("dbddqs"), jsonObject.getString("dbddqs").substring(0,6), dbdd); if (!dbddflag) { returnObject.put("status", "falied"); returnObject.put("errormsg", "调拨订单弃审失败"); return returnObject; } //调拨订单删除 - String dbddsc = getsendBody("4", jsonObject, jsonObject.getString("code")); - boolean dbddscflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("dbddsc"), jsonObject.getString("dbddsc").substring(6), dbddsc); + String dbddsc = getsendBody("4", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp")); + boolean dbddscflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("dbddsc"), jsonObject.getString("dbddsc").substring(0,6), dbddsc); if (!dbddscflag) { returnObject.put("status", "falied"); returnObject.put("errormsg", "调拨订单删除失败"); @@ -678,8 +678,8 @@ public class EncapsulationImpl extends BaseService String parm = entity.getBodys(); JSONObject jsonObject = JSONObject.parseObject(parm); jsonObject.put("dataSourceCode",sysDataSourceEntities.get(0).getSourceCode()); - jsonObject.put("publicKey",headers.get("publicKey")); - jsonObject.put("secretKey",headers.get("secretKey")); + jsonObject.put("publicKey",entity.getSendApp().getPublicKey()); + jsonObject.put("secretKey",entity.getSendApp().getSecretKey()); jsonObject.put("kcdbckqxqz",headers.get("kcdbckqxqz")); jsonObject.put("kcdbcksc",headers.get("kcdbcksc")); @@ -761,16 +761,16 @@ public class EncapsulationImpl extends BaseService } //库存产成品入库单取消签字 - String qxqz = getsendBody("1", jsonObject, jsonObject.getString("code")); - boolean qxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcccprkqxqz"), jsonObject.getString("kcccprkqxqz").substring(6), qxqz); + String qxqz = getsendBody("1", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp")); + boolean qxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcccprkqxqz"), jsonObject.getString("kcccprkqxqz").substring(0,6), qxqz); if (!qxqzflag) { returnObject.put("status", "falied"); returnObject.put("errormsg", "库存产成品入库单取消签字失败"); return returnObject; } //库存产成品入库单删除 - String sc = getsendBody("2", jsonObject, jsonObject.getString("code")); - boolean scflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcccprksc"), jsonObject.getString("kcccprksc").substring(6), sc); + String sc = getsendBody("2", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp")); + boolean scflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcccprksc"), jsonObject.getString("kcccprksc").substring(0,6), sc); if (!scflag) { returnObject.put("status", "falied"); returnObject.put("errormsg", "库存产成品入库单删除失败"); @@ -804,8 +804,8 @@ public class EncapsulationImpl extends BaseService String parm = entity.getBodys(); JSONObject jsonObject = JSONObject.parseObject(parm); jsonObject.put("dataSourceCode",sysDataSourceEntities.get(0).getSourceCode()); - jsonObject.put("publicKey",headers.get("publicKey")); - jsonObject.put("secretKey",headers.get("secretKey")); + jsonObject.put("publicKey",entity.getSendApp().getPublicKey()); + jsonObject.put("secretKey",entity.getSendApp().getSecretKey()); jsonObject.put("kcccprkqxqz",headers.get("kcccprkqxqz")); jsonObject.put("kcccprksc",headers.get("kcccprksc")); @@ -883,16 +883,16 @@ public class EncapsulationImpl extends BaseService } //库存材料出库取消签字 - String qxqz = getsendBody("1", jsonObject, jsonObject.getString("code")); - boolean qxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("qxqzApi"), jsonObject.getString("qxqzApi").substring(6), qxqz); + String qxqz = getsendBody("1", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp")); + boolean qxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("qxqzApi"), jsonObject.getString("qxqzApi").substring(0,6), qxqz); if (!qxqzflag) { returnObject.put("status", "falied"); returnObject.put("errormsg", "库存材料出库取消签字失败"); return returnObject; } //库存材料出库单删除 - String sc = getsendBody("2", jsonObject, jsonObject.getString("code")); - boolean scflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("scApi"), jsonObject.getString("scApi").substring(6), sc); + String sc = getsendBody("2", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp")); + boolean scflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("scApi"), jsonObject.getString("scApi").substring(0,6), sc); if (!scflag) { returnObject.put("status", "falied"); returnObject.put("errormsg", "库存材料出库单删除失败"); @@ -926,8 +926,8 @@ public class EncapsulationImpl extends BaseService String parm = entity.getBodys(); JSONObject jsonObject = JSONObject.parseObject(parm); jsonObject.put("dataSourceCode",sysDataSourceEntities.get(0).getSourceCode()); - jsonObject.put("publicKey",headers.get("publicKey")); - jsonObject.put("secretKey",headers.get("secretKey")); + jsonObject.put("publicKey",entity.getSendApp().getPublicKey()); + jsonObject.put("secretKey",entity.getSendApp().getSecretKey()); jsonObject.put("qxqzApi",headers.get("qxqzApi")); jsonObject.put("scApi",headers.get("scApi")); @@ -1003,16 +1003,16 @@ public class EncapsulationImpl extends BaseService } //库存其他出库取消签字 - String qxqz = getsendBody("1", jsonObject, jsonObject.getString("code")); - boolean qxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("qxqzApi"), jsonObject.getString("qxqzApi").substring(6), qxqz); + String qxqz = getsendBody("1", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp")); + boolean qxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("qxqzApi"), jsonObject.getString("qxqzApi").substring(0,6), qxqz); if (!qxqzflag) { returnObject.put("status", "falied"); returnObject.put("errormsg", "库存其他出库取消签字失败"); return returnObject; } //库存其他出库删除 - String sc = getsendBody("2", jsonObject, jsonObject.getString("code")); - boolean scflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("scApi"), jsonObject.getString("scApi").substring(6), sc); + String sc = getsendBody("2", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp")); + boolean scflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("scApi"), jsonObject.getString("scApi").substring(0,6), sc); if (!scflag) { returnObject.put("status", "falied"); returnObject.put("errormsg", "库存其他出库删除失败"); @@ -1046,8 +1046,8 @@ public class EncapsulationImpl extends BaseService String parm = entity.getBodys(); JSONObject jsonObject = JSONObject.parseObject(parm); jsonObject.put("dataSourceCode",sysDataSourceEntities.get(0).getSourceCode()); - jsonObject.put("publicKey",headers.get("publicKey")); - jsonObject.put("secretKey",headers.get("secretKey")); + jsonObject.put("publicKey",entity.getSendApp().getPublicKey()); + jsonObject.put("secretKey",entity.getSendApp().getSecretKey()); jsonObject.put("qxqzApi",headers.get("qxqzApi")); jsonObject.put("scApi",headers.get("scApi")); @@ -1123,16 +1123,16 @@ public class EncapsulationImpl extends BaseService } //库存其他入库单取消签字 - String qxqz = getsendBody("1", jsonObject, jsonObject.getString("code")); - boolean qxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("qxqzApi"), jsonObject.getString("qxqzApi").substring(6), qxqz); + String qxqz = getsendBody("1", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp")); + boolean qxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("qxqzApi"), jsonObject.getString("qxqzApi").substring(0,6), qxqz); if (!qxqzflag) { returnObject.put("status", "falied"); returnObject.put("errormsg", "库存其他入库单取消签字失败"); return returnObject; } //库存其他入库删除 - String sc = getsendBody("2", jsonObject, jsonObject.getString("code")); - boolean scflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("scApi"), jsonObject.getString("scApi").substring(6), sc); + String sc = getsendBody("2", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp")); + boolean scflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("scApi"), jsonObject.getString("scApi").substring(0,6), sc); if (!scflag) { returnObject.put("status", "falied"); returnObject.put("errormsg", "库存其他入库删除失败"); @@ -1164,8 +1164,8 @@ public class EncapsulationImpl extends BaseService String parm = entity.getBodys(); JSONObject jsonObject = JSONObject.parseObject(parm); jsonObject.put("dataSourceCode",sysDataSourceEntities.get(0).getSourceCode()); - jsonObject.put("publicKey",headers.get("publicKey")); - jsonObject.put("secretKey",headers.get("secretKey")); + jsonObject.put("publicKey",entity.getSendApp().getPublicKey()); + jsonObject.put("secretKey",entity.getSendApp().getSecretKey()); jsonObject.put("qxqzApi",headers.get("qxqzApi")); jsonObject.put("scApi",headers.get("scApi")); @@ -1178,7 +1178,7 @@ public class EncapsulationImpl extends BaseService } //拼装数据 - private String getsendBody(String type, JSONObject object, String code) { + private String getsendBody(String type, JSONObject object, String code,String unitcode) { JSONObject jsonObject1 = new JSONObject(); switch (type) { @@ -1190,7 +1190,7 @@ public class EncapsulationImpl extends BaseService JSONObject queryInfo = new JSONObject(); queryInfo.put("date_end", object.getString("date_end")); queryInfo.put("date_begin", object.getString("date_begin")); - queryInfo.put("corp", object.getString("corp")); + queryInfo.put("corp", unitcode); queryInfo.put("billcode", code); jsonObject1.put("unsignInfo", unsignInfo); @@ -1204,7 +1204,7 @@ public class EncapsulationImpl extends BaseService JSONObject queryInfo2 = new JSONObject(); queryInfo2.put("date_end", object.getString("date_end")); queryInfo2.put("date_begin", object.getString("date_begin")); - queryInfo2.put("corp", object.getString("corp")); + queryInfo2.put("corp", unitcode); queryInfo2.put("billcode", code); jsonObject1.put("deleteInfo", unsignInfo2); @@ -1217,7 +1217,7 @@ public class EncapsulationImpl extends BaseService JSONObject queryInfo3 = new JSONObject(); queryInfo3.put("date_end", object.getString("date_end")); queryInfo3.put("date_begin", object.getString("date_begin")); - queryInfo3.put("corp", object.getString("corp")); + queryInfo3.put("corp", unitcode); queryInfo3.put("code", code); jsonObject1.put("approveinfo", unsignInfo3); @@ -1230,7 +1230,7 @@ public class EncapsulationImpl extends BaseService JSONObject queryInfo4 = new JSONObject(); queryInfo4.put("date_end", object.getString("date_end")); queryInfo4.put("date_begin", object.getString("date_begin")); - queryInfo4.put("corp", object.getString("corp")); + queryInfo4.put("corp", unitcode); queryInfo4.put("code", code); jsonObject1.put("deleteinfo", unsignInfo4); @@ -1253,6 +1253,7 @@ public class EncapsulationImpl extends BaseService * @Date 3:05 下午 2024/9/4 **/ private boolean sendPost(String publicKey, String secretKey, String apiCode, String appId, String bodys) { + StringBuilder returnBody = new StringBuilder(); Integer outTime = 6000; HttpClientBuilder httpClientBuilder = HttpClientBuilder.create(); From 916a133c0c0622590602b8ed480fe1be94b5cded Mon Sep 17 00:00:00 2001 From: yuqh <123456> Date: Tue, 10 Sep 2024 08:34:43 +0800 Subject: [PATCH 2/4] =?UTF-8?q?OA=E6=97=A0=E6=B5=81=E7=A8=8B=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E5=85=AC=E7=94=A8=E5=88=A0=E9=99=A4=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../seeyon/dao/ICapFormDefinitionDao.java | 51 ++++++++ .../dao/impl/CapFormDefinitionDaoImpl.java | 39 ++++++ .../entity/CapFormDefinitionEntity.java | 71 +++++++++++ .../seeyon/entity/CapFormDefinitionEntity.xml | 41 ++++++ .../seeyon/service/INoProcessService.java | 26 ++++ .../service/impl/NoProcessServiceImpl.java | 119 ++++++++++++++++++ 6 files changed, 347 insertions(+) create mode 100644 service/src/main/java/com/hzya/frame/seeyon/dao/ICapFormDefinitionDao.java create mode 100644 service/src/main/java/com/hzya/frame/seeyon/dao/impl/CapFormDefinitionDaoImpl.java create mode 100644 service/src/main/java/com/hzya/frame/seeyon/entity/CapFormDefinitionEntity.java create mode 100644 service/src/main/java/com/hzya/frame/seeyon/entity/CapFormDefinitionEntity.xml create mode 100644 service/src/main/java/com/hzya/frame/seeyon/service/INoProcessService.java create mode 100644 service/src/main/java/com/hzya/frame/seeyon/service/impl/NoProcessServiceImpl.java diff --git a/service/src/main/java/com/hzya/frame/seeyon/dao/ICapFormDefinitionDao.java b/service/src/main/java/com/hzya/frame/seeyon/dao/ICapFormDefinitionDao.java new file mode 100644 index 00000000..f892fa11 --- /dev/null +++ b/service/src/main/java/com/hzya/frame/seeyon/dao/ICapFormDefinitionDao.java @@ -0,0 +1,51 @@ +package com.hzya.frame.seeyon.dao; + +import com.baomidou.dynamic.datasource.annotation.DS; +import com.hzya.frame.basedao.dao.IBaseDao; +import com.hzya.frame.seeyon.entity.CapFormDefinitionEntity; +import com.hzya.frame.seeyon.entity.CtpFileEntity; +import com.hzya.frame.seeyon.paybill.entity.PayBillEntity; + +import java.util.List; + +/** + * + * @content OA字段配置表DAO + * @className: Administrator + * @author laborer + * @date 2024-09-09 16:00 + * + */ + +public interface ICapFormDefinitionDao extends IBaseDao { + + /** + * + * @content 通过模版编号获取无流程表单配置信息 + * @className: Administrator + * @author laborer + * @date 2024-09-09 16:02 + * + */ + List getFormFiled(CapFormDefinitionEntity fieldInfo); +/** + * + * @content 通过主键删除单据数据 + * @className: Administrator + * @author laborer + * @date 2024-09-09 17:04 + * + */ + + int deleteByKey(CapFormDefinitionEntity fieldInfo); +/** + * + * @content 通过客户传递的数据值查询古河条件的数据 + * @className: Administrator + * @author laborer + * @date 2024-09-09 17:05 + * + */ + + List getFormFiledByFileValue(CapFormDefinitionEntity fieldInfo); +} diff --git a/service/src/main/java/com/hzya/frame/seeyon/dao/impl/CapFormDefinitionDaoImpl.java b/service/src/main/java/com/hzya/frame/seeyon/dao/impl/CapFormDefinitionDaoImpl.java new file mode 100644 index 00000000..07304f45 --- /dev/null +++ b/service/src/main/java/com/hzya/frame/seeyon/dao/impl/CapFormDefinitionDaoImpl.java @@ -0,0 +1,39 @@ +package com.hzya.frame.seeyon.dao.impl; + +import com.baomidou.dynamic.datasource.annotation.DS; +import com.hzya.frame.basedao.dao.MybatisGenericDao; +import com.hzya.frame.seeyon.dao.ICapFormDefinitionDao; +import com.hzya.frame.seeyon.dao.ICtpFileDao; +import com.hzya.frame.seeyon.entity.CapFormDefinitionEntity; +import com.hzya.frame.seeyon.entity.CtpFileEntity; +import com.hzya.frame.seeyon.paybill.entity.PayBillEntity; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * + * @content OA字段配置表DAO + * @className: Administrator + * @author laborer + * @date 2024-09-09 16:00 + * + */ +@Repository(value = "CapFormDefinitionDaoImpl") +public class CapFormDefinitionDaoImpl extends MybatisGenericDao implements ICapFormDefinitionDao { + @DS("#fieldInfo.dataSourceCode") + @Override + public List getFormFiled(CapFormDefinitionEntity fieldInfo) { + return (List) selectList("com.hzya.frame.seeyon.entity.CapFormDefinitionEntity.CapFormDefinitionEntity_list_base",fieldInfo); + } + @DS("#fieldInfo.dataSourceCode") + @Override + public int deleteByKey(CapFormDefinitionEntity fieldInfo) { + return super.delete("com.hzya.frame.seeyon.entity.CapFormDefinitionEntity.CapFormDefinitionEntity_delete",fieldInfo); + } + @DS("#fieldInfo.dataSourceCode") + @Override + public List getFormFiledByFileValue(CapFormDefinitionEntity fieldInfo) { + return (List) selectList("com.hzya.frame.seeyon.entity.CapFormDefinitionEntity.CapFormDefinitionEntity_list_table_info",fieldInfo); + } +} diff --git a/service/src/main/java/com/hzya/frame/seeyon/entity/CapFormDefinitionEntity.java b/service/src/main/java/com/hzya/frame/seeyon/entity/CapFormDefinitionEntity.java new file mode 100644 index 00000000..2ab841bd --- /dev/null +++ b/service/src/main/java/com/hzya/frame/seeyon/entity/CapFormDefinitionEntity.java @@ -0,0 +1,71 @@ +package com.hzya.frame.seeyon.entity; + +import com.hzya.frame.web.entity.BaseEntity; + +import java.io.File; + +/** + * + * @content OA字段配置表 + * @className: Administrator + * @author laborer + * @date 2024-09-09 15:48 + * + */ + +public class CapFormDefinitionEntity extends BaseEntity { + private String fieldInfo;//字段属性定义 + private String viewInfo;//视图权限定义 + private String appbindInfo;//应用绑定定义 + private String tableName;//表名 + private String fieldName;//字段名称 + private String fieldValue;//字段值 + + public String getFieldValue() { + return fieldValue; + } + + public void setFieldValue(String fieldValue) { + this.fieldValue = fieldValue; + } + + public String getTableName() { + return tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } + + public String getFieldName() { + return fieldName; + } + + public void setFieldName(String fieldName) { + this.fieldName = fieldName; + } + + public String getFieldInfo() { + return fieldInfo; + } + + public void setFieldInfo(String fieldInfo) { + this.fieldInfo = fieldInfo; + } + + public String getViewInfo() { + return viewInfo; + } + + public void setViewInfo(String viewInfo) { + this.viewInfo = viewInfo; + } + + public String getAppbindInfo() { + return appbindInfo; + } + + public void setAppbindInfo(String appbindInfo) { + this.appbindInfo = appbindInfo; + } +} diff --git a/service/src/main/java/com/hzya/frame/seeyon/entity/CapFormDefinitionEntity.xml b/service/src/main/java/com/hzya/frame/seeyon/entity/CapFormDefinitionEntity.xml new file mode 100644 index 00000000..5c0a498d --- /dev/null +++ b/service/src/main/java/com/hzya/frame/seeyon/entity/CapFormDefinitionEntity.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + id, + field_info, + view_info, + appbind_info + + + + + + + + + + delete from ${tableName} where ${fieldName} = #{id} + + diff --git a/service/src/main/java/com/hzya/frame/seeyon/service/INoProcessService.java b/service/src/main/java/com/hzya/frame/seeyon/service/INoProcessService.java new file mode 100644 index 00000000..57e72e80 --- /dev/null +++ b/service/src/main/java/com/hzya/frame/seeyon/service/INoProcessService.java @@ -0,0 +1,26 @@ +package com.hzya.frame.seeyon.service; + +import com.alibaba.fastjson.JSONObject; +import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity; +import com.hzya.frame.web.entity.JsonResultEntity; + +/** + * + * @content 无流程表单公用service + * @className: Administrator + * @author laborer + * @date 2024-09-09 14:53 + * + */ +public interface INoProcessService { +/** + * + * @content 无流程删除通用接口 + * @className: Administrator + * @author laborer + * @date 2024-09-09 15:08 + * + */ + + JsonResultEntity DeleteProcessField(JSONObject requestData); +} diff --git a/service/src/main/java/com/hzya/frame/seeyon/service/impl/NoProcessServiceImpl.java b/service/src/main/java/com/hzya/frame/seeyon/service/impl/NoProcessServiceImpl.java new file mode 100644 index 00000000..87ba10be --- /dev/null +++ b/service/src/main/java/com/hzya/frame/seeyon/service/impl/NoProcessServiceImpl.java @@ -0,0 +1,119 @@ +package com.hzya.frame.seeyon.service.impl; +import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.hzya.frame.seeyon.dao.ICapFormDefinitionDao; +import com.hzya.frame.seeyon.entity.CapFormDefinitionEntity; +import com.hzya.frame.seeyon.service.INoProcessService; +import com.hzya.frame.web.entity.JsonResultEntity; +import org.apache.commons.collections.CollectionUtils; +import org.checkerframework.checker.units.qual.A; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.atomic.AtomicReference; + +/** + * + * @content 无流程表单公用service + * @className: Administrator + * @author laborer + * @date 2024-09-09 14:53 + * + */ + +@Service(value = "NoProcessServiceImpl") +public class NoProcessServiceImpl implements INoProcessService { + private static final Logger logger = LoggerFactory.getLogger(NoProcessServiceImpl.class); + @Autowired + private ICapFormDefinitionDao capFormDefinitionDao; + @Override + public JsonResultEntity DeleteProcessField(JSONObject requestData) { + Listcount =new ArrayList<>(); + JSONObject jsonStrObj = requestData.getJSONObject("jsonStr"); + String formCode = jsonStrObj.getString("formCode"); + String fieldName = jsonStrObj.getString("fieldName"); + String fieldValue = jsonStrObj.getString("fieldValue"); + if(StrUtil.isEmpty(formCode)){ + return new JsonResultEntity("表单编码不能为空:formCode",false); + } + if(StrUtil.isEmpty(fieldName)){ + return new JsonResultEntity("字段名称不能为空:fieldName",false); + } + if(StrUtil.isEmpty(fieldValue)){ + return new JsonResultEntity("字段值不能为空:fieldValue",false); + } + + //通过表单编号获取表单字段信息 + CapFormDefinitionEntity fieldInfo = new CapFormDefinitionEntity(); + fieldInfo.setAppbindInfo(formCode); + fieldInfo.setDataSourceCode("djoatest"); + ListcapFormDefinitionEntityList = capFormDefinitionDao.getFormFiled(fieldInfo); + if(CollectionUtils.isEmpty(capFormDefinitionEntityList)){ + return new JsonResultEntity("通过表单编号查询表单有误,请检查表单编号:"+formCode,false); + } + + try { + capFormDefinitionEntityList.forEach(item->{ + String appbindInfo = item.getAppbindInfo(); + //格式化字段信息 + JSONObject jsonObject = JSONObject.parseObject(appbindInfo); + boolean queryFlag = false; + //如果模版编号相同则继续删除,反正跳过 + if(formCode.equals(jsonObject.getString("formCode"))){ + JSONObject field = JSONObject.parseObject(item.getFieldInfo()); + JSONObject frontFormmain = field.getJSONObject("front_formmain"); + JSONArray formsons = field.getJSONArray("formsons"); + JSONArray fieldInfoTable = frontFormmain.getJSONArray("fieldInfo"); + //验证需要删除的条件字段在表单属性中是否存在 + for (int i = 0; i < fieldInfoTable.size(); i++) { + JSONObject fieldInfoTableObj = fieldInfoTable.getJSONObject(i); + String name = fieldInfoTableObj.getString("name"); + //如果表单属性中存在该字段则验证通过,如果不存在直接返回错误 + if(name.equals(fieldName)){ + queryFlag = true; + + } + } + //验证通过获取数据库表名称进行数据删除 + if(queryFlag){ + String tableName = frontFormmain.getString("tableName"); + //如果主表名称获取主表的主键进行数据删除 + fieldInfo.setTableName(tableName); + fieldInfo.setFieldName(fieldName); + fieldInfo.setFieldValue(fieldValue); + ListdataFormList = capFormDefinitionDao.getFormFiledByFileValue(fieldInfo); + if(CollectionUtils.isNotEmpty(dataFormList)){ + dataFormList.forEach(item1->{ + String id = item1.getId(); + count.add(id); + fieldInfo.setFieldName("id"); + fieldInfo.setId(id); + capFormDefinitionDao.deleteByKey(fieldInfo); + //循环该表单下面的所有子表信息进行子表删除 + if(CollectionUtils.isNotEmpty(formsons)){ + formsons.forEach(formsonsItem->{ + JSONObject jsonObjectBoddy = JSONObject.parseObject(formsonsItem.toString()); + String bodyTableName = jsonObjectBoddy.getString("tableName"); + fieldInfo.setTableName(bodyTableName); + fieldInfo.setFieldName("formmain_id"); + fieldInfo.setId(id); + capFormDefinitionDao.deleteByKey(fieldInfo); + }); + } + }); + } + } + } + }); + } catch (Exception e) { + throw new RuntimeException(e); + } + return new JsonResultEntity("删除成功,删除的数据ID"+ JSON.toJSONString(count),true); + } +} From 17518aa2d44742c4d84953c9f0f0fd63fcb57e83 Mon Sep 17 00:00:00 2001 From: lvleigang <957075182@qq.com> Date: Wed, 11 Sep 2024 14:04:44 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=BB=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E4=BF=9D=E5=AD=98=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mdmDistribute/plugin/MdmModulePluginInitializer.java | 6 +++--- .../com/hzya/frame/mdm/service/impl/MdmServiceImpl.java | 4 ++-- .../application/service/impl/SysApplicationServiceImpl.java | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/mdmDistribute/plugin/MdmModulePluginInitializer.java b/buildpackage/src/main/java/com/hzya/frame/plugin/mdmDistribute/plugin/MdmModulePluginInitializer.java index de6fb968..ebff9dc2 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/mdmDistribute/plugin/MdmModulePluginInitializer.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/mdmDistribute/plugin/MdmModulePluginInitializer.java @@ -704,7 +704,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity { continue; }else { //保存日志 - saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","转发失败",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"3"); + saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","转发失败:"+jsonResultEntity.getAttribute(),mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"3"); continue; } } @@ -885,7 +885,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity { continue; }else { //保存日志 - saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","转发失败",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"2"); + saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","转发失败:"+jsonResultEntity.getAttribute(),mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"2"); continue; } } @@ -1124,7 +1124,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity { continue; }else { //保存日志 - saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","转发失败",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1"); + saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","转发失败:"+jsonResultEntity.getAttribute(),mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1"); continue; } } diff --git a/service/src/main/java/com/hzya/frame/mdm/service/impl/MdmServiceImpl.java b/service/src/main/java/com/hzya/frame/mdm/service/impl/MdmServiceImpl.java index 26c03807..fcb46154 100644 --- a/service/src/main/java/com/hzya/frame/mdm/service/impl/MdmServiceImpl.java +++ b/service/src/main/java/com/hzya/frame/mdm/service/impl/MdmServiceImpl.java @@ -1935,7 +1935,7 @@ public class MdmServiceImpl implements IMdmService { } } catch (Exception e) { logger.error("新增返回脚本解析保存三方id错误" + jsonResultEntity.getAttribute()); - saveMdmModuleSendLogEntity(mdmModuleEntity.getMdmCode(), mdmModuleDistributeEntity.getId(), "2", "转发失败", dbname, object.getString("id"), sysApplicationEntity.getName(), sysApplicationEntity.getId(), apiEntity.getApiName(), apiEntity.getId(), object.toJSONString(), type); + saveMdmModuleSendLogEntity(mdmModuleEntity.getMdmCode(), mdmModuleDistributeEntity.getId(), "2", "转发失败:"+jsonResultEntity.getAttribute(), dbname, object.getString("id"), sysApplicationEntity.getName(), sysApplicationEntity.getId(), apiEntity.getApiName(), apiEntity.getId(), object.toJSONString(), type); return BaseResult.getFailureMessageEntity("发送错误:新增返回脚本解析保存三方id错误"); } } @@ -1943,7 +1943,7 @@ public class MdmServiceImpl implements IMdmService { saveMdmModuleSendLogEntity(mdmModuleEntity.getMdmCode(), mdmModuleDistributeEntity.getId(), "1", "发送成功", dbname, object.getString("id"), sysApplicationEntity.getName(), sysApplicationEntity.getId(), apiEntity.getApiName(), apiEntity.getId(), object.toJSONString(), type); return BaseResult.getSuccessMessageEntity("发送成功"); } else { - saveMdmModuleSendLogEntity(mdmModuleEntity.getMdmCode(), mdmModuleDistributeEntity.getId(), "2", "转发失败", dbname, object.getString("id"), sysApplicationEntity.getName(), sysApplicationEntity.getId(), apiEntity.getApiName(), apiEntity.getId(), object.toJSONString(), type); + saveMdmModuleSendLogEntity(mdmModuleEntity.getMdmCode(), mdmModuleDistributeEntity.getId(), "2", "转发失败:"+jsonResultEntity.getAttribute(), dbname, object.getString("id"), sysApplicationEntity.getName(), sysApplicationEntity.getId(), apiEntity.getApiName(), apiEntity.getId(), object.toJSONString(), type); return BaseResult.getFailureMessageEntity("发送错误:" + jsonResultEntity.getAttribute()); } } diff --git a/service/src/main/java/com/hzya/frame/sysnew/application/service/impl/SysApplicationServiceImpl.java b/service/src/main/java/com/hzya/frame/sysnew/application/service/impl/SysApplicationServiceImpl.java index 2a11d6ef..b6ad01cd 100644 --- a/service/src/main/java/com/hzya/frame/sysnew/application/service/impl/SysApplicationServiceImpl.java +++ b/service/src/main/java/com/hzya/frame/sysnew/application/service/impl/SysApplicationServiceImpl.java @@ -2649,7 +2649,7 @@ public class SysApplicationServiceImpl extends BaseService sendMssage(sysPushMessageEntity)); + //taskExecutor.execute(() -> sendMssage(sysPushMessageEntity)); return sysMessageManageLogEntity; } From 504c9e54c0333527a8030f0e1d72144e55e1aada Mon Sep 17 00:00:00 2001 From: lvleigang <957075182@qq.com> Date: Wed, 11 Sep 2024 14:07:03 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=BB=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E4=BF=9D=E5=AD=98=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/hzya/frame/mdm/mdmModule/entity/MdmModuleEntity.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service/src/main/java/com/hzya/frame/mdm/mdmModule/entity/MdmModuleEntity.xml b/service/src/main/java/com/hzya/frame/mdm/mdmModule/entity/MdmModuleEntity.xml index bd141eed..d9571819 100644 --- a/service/src/main/java/com/hzya/frame/mdm/mdmModule/entity/MdmModuleEntity.xml +++ b/service/src/main/java/com/hzya/frame/mdm/mdmModule/entity/MdmModuleEntity.xml @@ -379,7 +379,7 @@ where id = #{id} `org_id` varchar(50) DEFAULT NULL COMMENT '组织机构ID', `company_id` varchar(50) DEFAULT NULL COMMENT '公司id', `data_type` varchar(255) DEFAULT NULL COMMENT '状态 1、成功2、失败', - `remark` varchar(255) DEFAULT NULL COMMENT '备注', + `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '备注', `id` varchar(50) NOT NULL COMMENT '唯一标识码', @@ -397,7 +397,7 @@ where id = #{id} `org_id` varchar(50) DEFAULT NULL COMMENT '组织机构ID', `company_id` varchar(50) DEFAULT NULL COMMENT '公司id', `data_type` varchar(50) DEFAULT NULL COMMENT '状态 1、成功2、失败', - `remark` varchar(255) DEFAULT NULL COMMENT '备注', + `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '备注', `distribute_id` varchar(50) DEFAULT NULL COMMENT 'distribute_id', `api_id` varchar(50) DEFAULT NULL COMMENT 'apiid', `app_id` varchar(50) DEFAULT NULL COMMENT 'app_id',