提交 2b11fc5c authored 作者: 李炎's avatar 李炎

微调

上级 fb2fcd17
...@@ -70,9 +70,9 @@ public class KingdeeApiClient { ...@@ -70,9 +70,9 @@ public class KingdeeApiClient {
iden.setlCID(2052); iden.setlCID(2052);
iden.setServerUrl(_serverUrl); iden.setServerUrl(_serverUrl);
api = new K3CloudApi(iden); api = new K3CloudApi(iden);
String data = "{\"CreateOrgId\": 0,\"Number\": \"111\",\"Id\": \"\",\"IsSortBySeq\": \"false\"}"; // String data = "{\"CreateOrgId\": 0,\"Number\": \"111\",\"Id\": \"\",\"IsSortBySeq\": \"false\"}";
String result = api.view("BD_Material", data); // String result = api.view("BD_Material", data);
System.out.println("<=====test:" + result); // System.out.println("<=====test:" + result);
RepoResult repoResult = api.CheckAuthInfo(); RepoResult repoResult = api.CheckAuthInfo();
RepoStatus responseStatus = repoResult.getResponseStatus(); RepoStatus responseStatus = repoResult.getResponseStatus();
boolean isSuccess = responseStatus.isIsSuccess(); boolean isSuccess = responseStatus.isIsSuccess();
......
...@@ -72,13 +72,13 @@ public class ImsNondefectiveFlittingServiceImpl extends ServiceImpl<ImsNondefect ...@@ -72,13 +72,13 @@ public class ImsNondefectiveFlittingServiceImpl extends ServiceImpl<ImsNondefect
qidList.add(maps.get("QUEUE_ID").toString()); qidList.add(maps.get("QUEUE_ID").toString());
//打印测试信息 //打印测试信息
try { try {
System.out.println(getCurrentTime()+" "+code+"业务开始,父单据编码为:"+maps.get("ALLOT_CODE").toString()+",唯一标识为:"+maps.get("QUEUE_ID").toString()); System.out.println(getCurrentTime() + " " + code + "业务开始,父单据编码为:" + maps.get("ALLOT_CODE").toString() + ",唯一标识为:" + maps.get("QUEUE_ID").toString());
} catch (Exception e) { } catch (Exception e) {
System.out.println("打印测试信息失败"); System.out.println("打印测试信息失败");
e.printStackTrace(); e.printStackTrace();
} }
} }
log.info("qidList_"+String.valueOf(qidList)); log.info("qidList_" + String.valueOf(qidList));
QueryWrapper<ImsNondefectiveFlitting> qw = new QueryWrapper(); QueryWrapper<ImsNondefectiveFlitting> qw = new QueryWrapper();
qw.in("queue_id", qidList); qw.in("queue_id", qidList);
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
...@@ -92,10 +92,10 @@ public class ImsNondefectiveFlittingServiceImpl extends ServiceImpl<ImsNondefect ...@@ -92,10 +92,10 @@ public class ImsNondefectiveFlittingServiceImpl extends ServiceImpl<ImsNondefect
} }
qw.orderByAsc("FIELD(queue_id," + builder.toString() + ")"); qw.orderByAsc("FIELD(queue_id," + builder.toString() + ")");
List<ImsNondefectiveFlitting> repeatLists = this.getBaseMapper().selectList(qw); List<ImsNondefectiveFlitting> repeatLists = this.getBaseMapper().selectList(qw);
log.info("repeatLists_"+String.valueOf(repeatLists)); log.info("repeatLists_" + String.valueOf(repeatLists));
if (!CollectionUtils.isEmpty(repeatLists)) { if (!CollectionUtils.isEmpty(repeatLists)) {
queue_idRepeatResult = ResultSplitOne(repeatLists); queue_idRepeatResult = ResultSplitOne(repeatLists);
log.info("queue_idRepeatResult_"+String.valueOf(queue_idRepeatResult)); log.info("queue_idRepeatResult_" + String.valueOf(queue_idRepeatResult));
} }
if (!CollectionUtils.isEmpty(queue_idRepeatResult)) { if (!CollectionUtils.isEmpty(queue_idRepeatResult)) {
throw new KingdeeRepeatException("操作失败!", queue_idRepeatResult.get(0), code); throw new KingdeeRepeatException("操作失败!", queue_idRepeatResult.get(0), code);
...@@ -106,16 +106,16 @@ public class ImsNondefectiveFlittingServiceImpl extends ServiceImpl<ImsNondefect ...@@ -106,16 +106,16 @@ public class ImsNondefectiveFlittingServiceImpl extends ServiceImpl<ImsNondefect
List<String> pushResultLists = new ArrayList<>(); List<String> pushResultLists = new ArrayList<>();
if (!CollectionUtils.isEmpty(needLists)) { if (!CollectionUtils.isEmpty(needLists)) {
if (needLists.get(0).containsKey(wipOrde) && needLists.get(0).containsKey(SEQ)) { if (needLists.get(0).containsKey(wipOrde) && needLists.get(0).containsKey(SEQ)) {
log.info("wss_1"); log.info("wss_1 " + needLists);
if (StringUtils.isNotBlank(String.valueOf(needLists.get(0).get(wipOrde))) && StringUtils.isNotBlank(String.valueOf(needLists.get(0).get(SEQ)))) { if (StringUtils.isNotBlank(String.valueOf(needLists.get(0).get(wipOrde))) && StringUtils.isNotBlank(String.valueOf(needLists.get(0).get(SEQ)))) {
//判断需要修改的needLists里面有没有元素,有元素说明有东西未修改过,没有说明添加进来的数据都已经修改过了 //判断需要修改的needLists里面有没有元素,有元素说明有东西未修改过,没有说明添加进来的数据都已经修改过了
List<String> Father_FEntryIDs = new ArrayList<>(); List<String> Father_FEntryIDs = new ArrayList<>();
log.info("wss_2"); log.info("wss_2");
if (!ObjectUtils.isEmpty(needLists)) { if (!ObjectUtils.isEmpty(needLists)) {
Father_FEntryIDs = ImsNondefectiveFlittingApi.queryFatherFEntryIDs(needLists, SelectFatherFentryIdFailLists); Father_FEntryIDs = ImsNondefectiveFlittingApi.queryFatherFEntryIDs(needLists, SelectFatherFentryIdFailLists);
log.info("Father_FEntryIDs_"+String.valueOf(Father_FEntryIDs)); log.info("Father_FEntryIDs_" + String.valueOf(Father_FEntryIDs));
SelectFatherFentryIdFailResult = ResultSplitTwo(SelectFatherFentryIdFailLists); SelectFatherFentryIdFailResult = ResultSplitTwo(SelectFatherFentryIdFailLists);
log.info("SelectFatherFentryIdFailResult_"+String.valueOf(SelectFatherFentryIdFailResult)); log.info("SelectFatherFentryIdFailResult_" + String.valueOf(SelectFatherFentryIdFailResult));
} }
if (!CollectionUtils.isEmpty(SelectFatherFentryIdFailResult)) { if (!CollectionUtils.isEmpty(SelectFatherFentryIdFailResult)) {
throw new kingdeeException("操作失败!", SelectFatherFentryIdFailResult, code); throw new kingdeeException("操作失败!", SelectFatherFentryIdFailResult, code);
...@@ -131,24 +131,24 @@ public class ImsNondefectiveFlittingServiceImpl extends ServiceImpl<ImsNondefect ...@@ -131,24 +131,24 @@ public class ImsNondefectiveFlittingServiceImpl extends ServiceImpl<ImsNondefect
org.jeecg.modules.iost.ims.entity.KingdeeResultObject.AddResultObject.Result result = null; org.jeecg.modules.iost.ims.entity.KingdeeResultObject.AddResultObject.Result result = null;
try { try {
//打印测试信息 //打印测试信息
System.out.println(getCurrentTime()+" "+code+"下推开始,下推数据为:"+needLists); System.out.println(getCurrentTime() + " " + code + "下推开始,下推数据为:" + needLists);
result = ImsNondefectiveFlittingApi.push(needLists, Father_FEntryIDs); result = ImsNondefectiveFlittingApi.push(needLists, Father_FEntryIDs);
log.info("result_"+String.valueOf(result)); log.info("result_" + String.valueOf(result));
pushResultLists = ResultSplitThree(result); pushResultLists = ResultSplitThree(result);
log.info("pushResultLists_"+String.valueOf(pushResultLists)); log.info("pushResultLists_" + String.valueOf(pushResultLists));
} catch (Exception e) { } catch (Exception e) {
//如果下推错误,打印异常信息 //如果下推错误,打印异常信息
System.out.println(getCurrentTime()+" "+code+"下推异常,父数据为"+needLists+"错误信息为:"); System.out.println(getCurrentTime() + " " + code + "下推异常,父数据为" + needLists + "错误信息为:");
e.printStackTrace(); e.printStackTrace();
} }
if (!CollectionUtils.isEmpty(pushResultLists)) { if (!CollectionUtils.isEmpty(pushResultLists)) {
//打印测试信息 //打印测试信息
System.out.println(getCurrentTime()+" "+code+"下推失败"+pushResultLists); System.out.println(getCurrentTime() + " " + code + "下推失败" + pushResultLists);
throw new kingdeeException("操作失败!下推失败!", pushResultLists, code); throw new kingdeeException("操作失败!下推失败!", pushResultLists, code);
} }
//打印下推成功数据 //打印下推成功数据
System.out.println(getCurrentTime()+" "+code+"下推成功,父单据数据为"+needLists+"下推子单据数据为"+result.getResponseStatus().getSuccessEntitys()); System.out.println(getCurrentTime() + " " + code + "下推成功,父单据数据为" + needLists + "下推子单据数据为" + result.getResponseStatus().getSuccessEntitys());
//查询子单据行内码maps.get("AUDIT_ID").toString()+maps.get("AUDIT_SEQ").toString() //查询子单据行内码maps.get("AUDIT_ID").toString()+maps.get("AUDIT_SEQ").toString()
for (Map<String, Object> needmap : needLists) { for (Map<String, Object> needmap : needLists) {
String Son_FEntry_ID = ImsNondefectiveFlittingApi.querySonFEntryID(needmap.get(needmap.get(wipOrde).toString() + needmap.get(SEQ).toString()).toString(), needmap.get(SEQ).toString(), result.getResponseStatus().getSuccessEntitys().get(0).getId()); String Son_FEntry_ID = ImsNondefectiveFlittingApi.querySonFEntryID(needmap.get(needmap.get(wipOrde).toString() + needmap.get(SEQ).toString()).toString(), needmap.get(SEQ).toString(), result.getResponseStatus().getSuccessEntitys().get(0).getId());
...@@ -179,9 +179,11 @@ public class ImsNondefectiveFlittingServiceImpl extends ServiceImpl<ImsNondefect ...@@ -179,9 +179,11 @@ public class ImsNondefectiveFlittingServiceImpl extends ServiceImpl<ImsNondefect
this.saveBatch(ImsNondefectiveFlittings); this.saveBatch(ImsNondefectiveFlittings);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
System.out.println(getCurrentTime()+" "+code+"保存数据库异常"); System.out.println(getCurrentTime() + " " + code + "保存数据库异常");
} }
return ImsNondefectiveFlittings.get(0).getFbillNo(); String fbillNo = ImsNondefectiveFlittings.get(0).getFbillNo();
log.info("<========code 30 返回: " + fbillNo);
return fbillNo;
} }
public List<String> ResultSplitFour(org.jeecg.modules.iost.ims.entity.KingdeeResultObject.AddResultObject.Result AddResult) { public List<String> ResultSplitFour(org.jeecg.modules.iost.ims.entity.KingdeeResultObject.AddResultObject.Result AddResult) {
...@@ -251,9 +253,9 @@ public class ImsNondefectiveFlittingServiceImpl extends ServiceImpl<ImsNondefect ...@@ -251,9 +253,9 @@ public class ImsNondefectiveFlittingServiceImpl extends ServiceImpl<ImsNondefect
return rustList; return rustList;
} }
public String getCurrentTime(){ public String getCurrentTime() {
Date date = new Date(); Date date = new Date();
SimpleDateFormat dateFormat= new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
return dateFormat.format(date); return dateFormat.format(date);
} }
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论