From 1deb5de07d1164ea894062bfc087ac3e080d7156 Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Mon, 15 Jul 2024 16:07:37 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BC=81=E4=B8=9A=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E5=8F=91=E9=80=81=E6=97=A5=E5=BF=97=E8=BF=BD?= =?UTF-8?q?=E8=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/op/common/core/utils/http/HttpUtils.java | 4 ++-- .../java/com/op/open/service/impl/OpenServiceImpl.java | 3 ++- .../service/impl/QcCheckTaskIncomeServiceImpl.java | 5 +++-- .../service/impl/QcCheckUnqualifiedServiceImpl.java | 8 ++++---- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/op-common/op-common-core/src/main/java/com/op/common/core/utils/http/HttpUtils.java b/op-common/op-common-core/src/main/java/com/op/common/core/utils/http/HttpUtils.java index a9716114..bb3e5a57 100644 --- a/op-common/op-common-core/src/main/java/com/op/common/core/utils/http/HttpUtils.java +++ b/op-common/op-common-core/src/main/java/com/op/common/core/utils/http/HttpUtils.java @@ -162,13 +162,13 @@ public class HttpUtils { conn.setRequestProperty("user-agent" , "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); conn.setRequestProperty("Accept-Charset" , "utf-8"); // conn.setRequestProperty("contentType" , "utf-8"); - conn.setRequestProperty("content-Type", "application/json; charset=GBK"); + conn.setRequestProperty("content-Type", "application/json; charset=utf-8"); conn.setDoOutput(true); conn.setDoInput(true); out = new PrintWriter(conn.getOutputStream()); out.print(param); out.flush(); - in = new BufferedReader(new InputStreamReader(conn.getInputStream(), "GBK")); + in = new BufferedReader(new InputStreamReader(conn.getInputStream(), "utf-8")); String line; while ((line = in.readLine()) != null) { result.append(line); diff --git a/op-modules/op-open/src/main/java/com/op/open/service/impl/OpenServiceImpl.java b/op-modules/op-open/src/main/java/com/op/open/service/impl/OpenServiceImpl.java index f534ac2c..3f51aa13 100644 --- a/op-modules/op-open/src/main/java/com/op/open/service/impl/OpenServiceImpl.java +++ b/op-modules/op-open/src/main/java/com/op/open/service/impl/OpenServiceImpl.java @@ -542,7 +542,7 @@ public class OpenServiceImpl implements OpenService { } String postData = postDataBuilder.toString(); String result = HttpUtils.sendPostOA(oa_url, postData); - logger.info(result); + logger.info("result:"+result); //返回示例{"result":"0","info":"成功","requestid":"2193799"} Map resultMap=JSONObject.parseObject(result); if (resultMap.get("result").equals(Constants.LOGIN_SUCCESS_STATUS)){ @@ -613,6 +613,7 @@ public class OpenServiceImpl implements OpenService { @Override public AjaxResult sendWeChartMessage(List dtos) { try { + JSONObject.toJSONString("open企业微信发送参数"+dtos); String result = HttpUtils.sendPostWechart(weChartUrl, JSON.toJSONString(dtos)); return success(result); } catch (Exception e) { diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java index cb645337..41b62061 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java @@ -813,6 +813,7 @@ public class QcCheckTaskIncomeServiceImpl implements //不合格描述 unqualified.setRemark(qcCheckTaskIncome.getRemark()); if("produce".equals(qcCheckTaskIncome.getTypeCode())){ + unqualified.setTypeCode(qcCheckTaskIncome.getTypeCode()); unqualified.setSfgyswt(qcCheckTaskIncome.getSfgyswt()); //申请人- @@ -873,9 +874,9 @@ public class QcCheckTaskIncomeServiceImpl implements unqualified.setSqr(qcCheckTaskIncome.getSqr()); unqualified.setUser(qcCheckTaskIncome.getUpdateBy()); //转出方 - unqualified.setZcf(qcCheckTaskIncome.getUpdateBy()); + unqualified.setZcf(qcCheckTaskIncome.getZcf()); //转出OEM厂名 - unqualified.setZcoemcm(qcCheckTaskIncome.getUpdateBy()); + unqualified.setZcoemcm(qcCheckTaskIncome.getZcoemcm()); } qcCheckUnqualifiedService.updateQcCheckUnqualified(unqualified); diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckUnqualifiedServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckUnqualifiedServiceImpl.java index 13995dc5..39466663 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckUnqualifiedServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckUnqualifiedServiceImpl.java @@ -184,18 +184,18 @@ public class QcCheckUnqualifiedServiceImpl implements IQcCheckUnqualifiedService //QcCheckTaskIncome detailInfo = qcCheckTaskIncomeMapper.getTaskInfo(task.getTaskId()); //发起来料检验OA流程 Map paramMap = new HashMap<>(); - paramMap.put("user",task.getUser());//提交人工号 + paramMap.put("user",task.getSqr());//提交人工号 paramMap.put("requestLevel",0);//流程紧急度 paramMap.put("requestName","ZL0010-来料检验不合格控制流程");//流程名称 paramMap.put("workflowId",113454);//该流程对应的唯- workFlowld if(StringUtils.isEmpty(task.getIncomeBatchNo())){ - task.setIncomeBatchNo(DateUtils.parseDateToStr("yyyy-MM-dd",new Date())); + task.setIncomeBatchNo(DateUtils.parseDateToStr("yyyyMMdd",new Date())); } StringBuffer mainObject = new StringBuffer(); mainObject.append("{"); - mainObject.append("\"SQR\":"+"\""+task.getSqr()+"\"");//申请人-- + mainObject.append("\"SQR\":"+"\""+task.getSqr()+"");//申请人-- mainObject.append(",\"CQ\":"+task.getOaFactory());//厂区-- mainObject.append(",\"LLLB\":"+task.getMaterialType());//来料类别【0、1】 mainObject.append(",\"MATNR\":"+"\""+task.getMaterialCode()+"\"");//物料编码 @@ -210,7 +210,7 @@ public class QcCheckUnqualifiedServiceImpl implements IQcCheckUnqualifiedService mainObject.append(",\"BJY\":"+"\""+task.getCzbjr()+"\"");//仓储报检人-- mainObject.append(",\"WLLY\":"+"\""+task.getMaterialFrom()+"\"");//物料来源 mainObject.append(",\"ZCF\":"+"\""+task.getZcf()+"\"");//转出方 - mainObject.append(",\"ZCOEMCM \":"+"\""+task.getZcoemcm()+"\"");//转出OEM厂名 + mainObject.append(",\"ZCOEMCM\":"+"\""+task.getZcoemcm()+"\"");//转出OEM厂名 mainObject.append(",\"memo\":"+"\""+task.getRemark()+"\"");//不合格描述 mainObject.append(",\"PZGLBZG\":"+"\""+task.getQczg()+"\"");//qc主管-- mainObject.append("}"); From f16b434b1b341fa8231ea06f552ffdfdb8d24b8b Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Mon, 15 Jul 2024 16:25:22 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BC=81=E4=B8=9A=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E5=8F=91=E9=80=81=E6=97=A5=E5=BF=97=E8=BF=BD?= =?UTF-8?q?=E8=B8=AA2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/op/open/service/impl/OpenServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/op-modules/op-open/src/main/java/com/op/open/service/impl/OpenServiceImpl.java b/op-modules/op-open/src/main/java/com/op/open/service/impl/OpenServiceImpl.java index 3f51aa13..caa9ff0a 100644 --- a/op-modules/op-open/src/main/java/com/op/open/service/impl/OpenServiceImpl.java +++ b/op-modules/op-open/src/main/java/com/op/open/service/impl/OpenServiceImpl.java @@ -613,7 +613,7 @@ public class OpenServiceImpl implements OpenService { @Override public AjaxResult sendWeChartMessage(List dtos) { try { - JSONObject.toJSONString("open企业微信发送参数"+dtos); + logger.info(JSONObject.toJSONString("open企业微信发送参数"+dtos)); String result = HttpUtils.sendPostWechart(weChartUrl, JSON.toJSONString(dtos)); return success(result); } catch (Exception e) {