refactor(buildpackage): 优化插件执行日志和线程名称
- 在 SoSaleOutPluginInitializerToC 和 SoSaleReturnPluginInitializerToC 类中: - 添加 requestJsonParam 变量以获取请求参数 - 在创建线程时,将插件名称和请求参数作为线程名称 - 优化日志输出,增加请求参数信息 - 在 DeleteU8cDataUtil 类中: - 更新 JsonRootBean 属性名称,使用驼峰命名法 - 修改 deleteinfo 和 queryinfo 的 getter 和 setter 方法 - 在 DeleteU8cDataUtilTest 类中: - 注释掉删除销售发票的测试方法 - 新增删除销售出库单和销售订单的测试方法
This commit is contained in:
parent
4b0473e700
commit
3a08dee5cc
|
@ -124,6 +124,8 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
||||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||||
logger.info("触发调用:{}" + getPluginName());
|
logger.info("触发调用:{}" + getPluginName());
|
||||||
try {
|
try {
|
||||||
|
String requestJsonParam = String.valueOf(requestJson.get("param"));
|
||||||
|
|
||||||
Thread thread = new Thread(new Runnable() {
|
Thread thread = new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
@ -162,7 +164,7 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
||||||
logger.info("executeBusiness方法调用结束:" + getPluginName() + "-插件 执行耗时:{}", (endMillis - startMillis));
|
logger.info("executeBusiness方法调用结束:" + getPluginName() + "-插件 执行耗时:{}", (endMillis - startMillis));
|
||||||
// return null;
|
// return null;
|
||||||
}
|
}
|
||||||
}, "执行插件:" + getPluginName());
|
}, "执行插件:" + getPluginName() + " " + requestJsonParam);
|
||||||
thread.start();
|
thread.start();
|
||||||
|
|
||||||
if (requestJson != null && requestJson.get("type") != null && ProfilesActiveConstant.TYPE_DETAIL_ERROR.equals(requestJson.get("type"))) {
|
if (requestJson != null && requestJson.get("type") != null && ProfilesActiveConstant.TYPE_DETAIL_ERROR.equals(requestJson.get("type"))) {
|
||||||
|
|
|
@ -113,6 +113,8 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity {
|
||||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||||
logger.info("触发调用:{}" + getPluginName());
|
logger.info("触发调用:{}" + getPluginName());
|
||||||
try {
|
try {
|
||||||
|
String requestJsonParam = String.valueOf(requestJson.get("param"));
|
||||||
|
|
||||||
Thread thread = new Thread(new Runnable() {
|
Thread thread = new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
@ -149,7 +151,7 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity {
|
||||||
logger.info("executeBusiness方法调用结束:" + getPluginName() + "-插件 执行耗时:{}", (endMillis - startMillis));
|
logger.info("executeBusiness方法调用结束:" + getPluginName() + "-插件 执行耗时:{}", (endMillis - startMillis));
|
||||||
// return null;
|
// return null;
|
||||||
}
|
}
|
||||||
}, "执行插件:" + getPluginName());
|
}, "执行插件:" + getPluginName() + " " + requestJsonParam);
|
||||||
thread.start();
|
thread.start();
|
||||||
|
|
||||||
if (requestJson != null && requestJson.get("type") != null && ProfilesActiveConstant.TYPE_DETAIL_ERROR.equals(requestJson.get("type"))) {
|
if (requestJson != null && requestJson.get("type") != null && ProfilesActiveConstant.TYPE_DETAIL_ERROR.equals(requestJson.get("type"))) {
|
||||||
|
|
|
@ -26,7 +26,11 @@ public class DeleteU8cDataUtilTest {
|
||||||
@Test
|
@Test
|
||||||
public void deleteSoSaleinvoice() {
|
public void deleteSoSaleinvoice() {
|
||||||
try {
|
try {
|
||||||
deleteU8cDataUtil.deleteSoSaleinvoice();
|
//删除销售发票
|
||||||
|
// deleteU8cDataUtil.deleteSoSaleinvoice();
|
||||||
|
//删除销售出库单
|
||||||
|
deleteU8cDataUtil.deleteIcGeneralH();
|
||||||
|
//删除销售订单
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,8 +89,8 @@ public class DeleteU8cDataUtil {
|
||||||
queryinfo.setBillcode(deleteU8cDataUtilEntity.getVbillcode());
|
queryinfo.setBillcode(deleteU8cDataUtilEntity.getVbillcode());
|
||||||
|
|
||||||
JsonRootBean jsonRootBean = new JsonRootBean();
|
JsonRootBean jsonRootBean = new JsonRootBean();
|
||||||
jsonRootBean.setDeleteinfo(deleteinfo);
|
jsonRootBean.setDeleteInfo(deleteinfo);
|
||||||
jsonRootBean.setQueryinfo(queryinfo);
|
jsonRootBean.setQueryInfo(queryinfo);
|
||||||
sendU8C("http://39.170.109.90:8088/u8cloud/api/ic/saleout/delete", JSON.toJSONString(jsonRootBean));
|
sendU8C("http://39.170.109.90:8088/u8cloud/api/ic/saleout/delete", JSON.toJSONString(jsonRootBean));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -122,8 +122,8 @@ public class DeleteU8cDataUtil {
|
||||||
queryinfo.setCode(deleteU8cDataUtilEntity.getVreceiptcode());
|
queryinfo.setCode(deleteU8cDataUtilEntity.getVreceiptcode());
|
||||||
|
|
||||||
JsonRootBean jsonRootBean = new JsonRootBean();
|
JsonRootBean jsonRootBean = new JsonRootBean();
|
||||||
jsonRootBean.setDeleteinfo(deleteinfo);
|
jsonRootBean.setDeleteInfo(deleteinfo);
|
||||||
jsonRootBean.setQueryinfo(queryinfo);
|
jsonRootBean.setQueryInfo(queryinfo);
|
||||||
sendU8C("http://39.170.109.90:8088/u8cloud/api/so/saleinvoice/delete", JSON.toJSONString(jsonRootBean));
|
sendU8C("http://39.170.109.90:8088/u8cloud/api/so/saleinvoice/delete", JSON.toJSONString(jsonRootBean));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,20 +14,38 @@ public class JsonRootBean {
|
||||||
private Deleteinfo deleteinfo;
|
private Deleteinfo deleteinfo;
|
||||||
private Queryinfo queryinfo;
|
private Queryinfo queryinfo;
|
||||||
|
|
||||||
public void setDeleteinfo(Deleteinfo deleteinfo) {
|
private Deleteinfo deleteInfo;
|
||||||
this.deleteinfo = deleteinfo;
|
private Queryinfo queryInfo;
|
||||||
}
|
|
||||||
|
|
||||||
public Deleteinfo getDeleteinfo() {
|
public Deleteinfo getDeleteinfo() {
|
||||||
return deleteinfo;
|
return deleteinfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setQueryinfo(Queryinfo queryinfo) {
|
public void setDeleteinfo(Deleteinfo deleteinfo) {
|
||||||
this.queryinfo = queryinfo;
|
this.deleteinfo = deleteinfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Queryinfo getQueryinfo() {
|
public Queryinfo getQueryinfo() {
|
||||||
return queryinfo;
|
return queryinfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setQueryinfo(Queryinfo queryinfo) {
|
||||||
|
this.queryinfo = queryinfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Deleteinfo getDeleteInfo() {
|
||||||
|
return deleteInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeleteInfo(Deleteinfo deleteInfo) {
|
||||||
|
this.deleteInfo = deleteInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Queryinfo getQueryInfo() {
|
||||||
|
return queryInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQueryInfo(Queryinfo queryInfo) {
|
||||||
|
this.queryInfo = queryInfo;
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue