澳星档案新增

This commit is contained in:
lvleigang 2024-04-28 10:38:58 +08:00
parent 7cc29e995d
commit 845f6b93f2
10 changed files with 292 additions and 219 deletions

View File

@ -3,6 +3,7 @@ logging:
#日志级别 指定目录级别
level:
root: info
encodings: GBK
file:
# 日志保存路径
path: E:\yongansystem\log

View File

@ -3,6 +3,7 @@ logging:
#日志级别 指定目录级别
level:
root: info
encodings: UTF-8
file:
path: /home/webservice/zt/log
spring:

View File

@ -3,6 +3,7 @@ logging:
#日志级别 指定目录级别
level:
root: info
encodings: UTF-8
file:
# 日志保存路径
path: /Users/apple/Desktop/log/local

View File

@ -60,6 +60,7 @@ logging:
#日志配置路径
# config: classpath:log/logback-spring.xml
config: classpath:logback-spring.xml
encodings: UTF-8
file:
path: /Users/apple/Desktop/log/dev
mybatis:

View File

@ -17,6 +17,7 @@
<property name="CONSOLE_LOG_PATTERN"
value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%1p}) %clr(${PID:- }){magenta} %clr(--){faint} %clr([%1.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
<springProperty scope="context" name="logPath" source="logging.file.path" defaultValue="logdir"/>
<springProperty scope="context" name="encodings" source="logging.encodings" defaultValue="UTF-8"/>
<!--定义日志文档的存储地址 勿在 LogBack 的配置中使用相对路径-->
<property name="LOG_HOME" value="${logPath}"/>
<property name="MAX_HISTORY" value="50"/>
@ -26,7 +27,7 @@
<encoder>
<Pattern>${CONSOLE_LOG_PATTERN}</Pattern>
<!-- 设置字符集 -->
<charset>UTF-8</charset>
<charset>${encodings}</charset>
</encoder>
</appender>
<!-- INFO级别日志输出到文件 -->

View File

@ -1,6 +1,8 @@
package com.hzya.frame.sysnew.application.service.impl;
import cn.dev33.satoken.stp.StpUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.extra.servlet.ServletUtil;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSONObject;
@ -867,6 +869,16 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
if (entity == null || entity.getPageNum() == null || entity.getPageSize() == null) {
return BaseResult.getFailureMessageEntity("分页查询参数不存在");
}
//日期转换
if(entity.getCreateTimeStart() != null){
DateTime beginOfDay = DateUtil.beginOfDay(entity.getCreateTimeStart());
entity.setCreateTimeStart(beginOfDay);
}
//日期转换
if(entity.getCreateTimeEnd() != null){
DateTime endOfDay = DateUtil.endOfDay(entity.getCreateTimeEnd());
entity.setCreateTimeEnd(endOfDay);
}
PageHelper.startPage(entity.getPageNum(), entity.getPageSize());
List<String> ids = sysMessageManageLogDao.querySysMessageManageLogIds(entity);
PageInfo pageInfo = new PageInfo(ids);
@ -1955,7 +1967,41 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
sysMessageManageLogEntity.setTargetData(send.toString());//目标data
sysMessageManageLogEntity.setReturnData(body);//返回信息
//status 状态1待发送 2发送中3发送成功 4发送失败
sysMessageManageLogEntity.setStatus("3");//返回信息
//{"ResCode":0,"Success":true,"ResMsg":"登录成功,token有效时间为10分钟","Data":"123123"}
List<String> st = Arrays.asList(new String[]{"8000060000"});
//{"orderNo":"DB1003108862178","ErrorCode":"","ResultString":"success","ResultInt":0}
List<String> rs = Arrays.asList(new String[]{"8000080005", "8000080000", "8000080002", "8000080004"});
//{"status":"success","data":"[{\\"pk_corp\\":\\"1015\\",\\"unitcode\\":\\"3401\\",\\"unitname\\":\\"hjx建设银行有限公司\\",\\"createdate\\":\\"2023-01-01\\",\\"deptattr\\":\\"1\\",\\"deptname\\":\\"API新增部门02\\",\\"deptcode\\":\\"DEV02\\",\\"pk_deptdoc\\":\\"1015A210000000001QJ7\\"}]","taskNumber":"202309110119"}
List<String> ss = Arrays.asList(new String[]{"8000160014", "8000160015", "8000160016", "8000160017", "8000160021" , "8000160022" , "8000160023" , "8000160018", "8000160019","8000160020","8000160025","8000160026","8000160027","8000160029","8000160030"});
sysMessageManageLogEntity.setStatus("4");//返回信息
if(st.contains(receiveApi.getApiCode().toString())){
if(JSONUtil.isTypeJSON(body)){
JSONObject cheackdatas = JSONObject.parseObject(body);
String checkdata = cheackdatas.getString("Success");
if("true".equals(checkdata)){
sysMessageManageLogEntity.setStatus("3");//返回信息
}
}
}else if(rs.contains(receiveApi.getApiCode().toString())){
if(JSONUtil.isTypeJSON(body)){
JSONObject cheackdatas = JSONObject.parseObject(body);
String checkdata = cheackdatas.getString("ResultString");
if("success".equals(checkdata)){
sysMessageManageLogEntity.setStatus("3");//返回信息
}
}
}else if(ss.contains(receiveApi.getApiCode().toString())){
if(JSONUtil.isTypeJSON(body)){
JSONObject cheackdatas = JSONObject.parseObject(body);
String checkdata = cheackdatas.getString("status");
if("success".equals(checkdata)){
sysMessageManageLogEntity.setStatus("3");//返回信息
}
}
}else {
sysMessageManageLogEntity.setStatus("3");//返回信息
}
//remark 备注
long s1 = jrff - fsqsj;
long s2 = fsqsj - fshsj;

View File

@ -2,6 +2,7 @@ package com.hzya.frame.sysnew.messageManageLog.entity;
import com.hzya.frame.web.entity.BaseEntity;
import java.util.Date;
import java.util.List;
/**
@ -42,7 +43,8 @@ public class SysMessageManageLogEntity extends BaseEntity {
private String returnType;
/** 失败状态1、需要重新发送 2、不需要重新发送 */
private String errorStatus;
private Date createTimeStart;
private Date createTimeEnd;
private List<String> ids;
public String getReturnType() {
return returnType;
@ -178,5 +180,21 @@ public class SysMessageManageLogEntity extends BaseEntity {
public void setIds(List<String> ids) {
this.ids = ids;
}
public Date getCreateTimeStart() {
return createTimeStart;
}
public void setCreateTimeStart(Date createTimeStart) {
this.createTimeStart = createTimeStart;
}
public Date getCreateTimeEnd() {
return createTimeEnd;
}
public void setCreateTimeEnd(Date createTimeEnd) {
this.createTimeEnd = createTimeEnd;
}
}

View File

@ -605,19 +605,15 @@ where id = #{id}
<if test="receiveApp != null and receiveApp != ''">and receive_app = #{receiveApp}</if>
<if test="receiveApi != null and receiveApi != ''">and receive_api = #{receiveApi}</if>
<if test="status != null and status != ''">and status = #{status}</if>
<if test="sourceData != null and sourceData != ''">and MATCH(source_data) AGAINST (#{sourceData} IN
BOOLEAN MODE)
</if>
<if test="targetData != null and targetData != ''">and MATCH(target_data) AGAINST (#{targetData} IN
BOOLEAN MODE)
</if>
<if test="returnData != null and returnData != ''">and MATCH(return_data) AGAINST (#{returnData} IN
BOOLEAN MODE)
</if>
<if test="sourceData != null and sourceData != ''">and source_data like concat('%',#{sourceData},'%')</if>
<if test="targetData != null and targetData != ''">and target_data like concat('%',#{targetData},'%')</if>
<if test="returnData != null and returnData != ''">and return_data like concat('%',#{returnData},'%')</if>
<if test="createTimeStart != null">and create_time &gt;= #{createTimeStart}</if>
<if test="createTimeEnd != null">and create_time &lt;= #{createTimeEnd}</if>
</trim>
ORDER BY create_time DESC
</select>
</mapper>

View File

@ -21,7 +21,7 @@ public interface IAxService extends IBaseService<ArchivesEntity, String>{
* @param object
* @return com.hzya.frame.web.entity.JsonResultEntity
**/
JsonResultEntity thirdInterfaceArchivesInsert(JSONObject object);
Object thirdInterfaceArchivesInsert(JSONObject object);
/**
* @Author lvleigang
* @Description 档案修改
@ -29,7 +29,7 @@ public interface IAxService extends IBaseService<ArchivesEntity, String>{
* @param object
* @return com.hzya.frame.web.entity.JsonResultEntity
**/
JsonResultEntity thirdInterfaceArchivesUpdate(JSONObject object);
Object thirdInterfaceArchivesUpdate(JSONObject object);
/**
* @Author lvleigang
* @Description 档案删除
@ -37,5 +37,5 @@ public interface IAxService extends IBaseService<ArchivesEntity, String>{
* @param object
* @return com.hzya.frame.web.entity.JsonResultEntity
**/
JsonResultEntity thirdInterfaceArchivesDelete(JSONObject object);
Object thirdInterfaceArchivesDelete(JSONObject object);
}

View File

@ -65,9 +65,9 @@ public class AxServiceImpl extends BaseService<ArchivesEntity, String> implement
private final String chApiCodexg = "8000160022";//存货对照修改
private final String chApiCodesc = "8000160023";//存货对照删除
private final String ksApiCodexz = "8000160014";//客商辅助核算新增
private final String ksApiCodexg = "8000160014";//客商辅助核算修改
private final String ksApiCodesc = "8000160014";//客商辅助核算删除
private final String ksApiCodexz = "8000160018";//客商辅助核算新增
private final String ksApiCodexg = "8000160019";//客商辅助核算修改
private final String ksApiCodesc = "8000160020";//客商辅助核算删除
private final String slApiCodexz = "8000160014";//税率新增
private final String slApiCodexg = "8000160014";//税率修改
@ -181,7 +181,8 @@ public class AxServiceImpl extends BaseService<ArchivesEntity, String> implement
}
logger.info("返回结果:" + body);
JsonResultEntity resultEntity = JSON.parseObject(body.toString(),JsonResultEntity.class);
return resultEntity.getAttribute();
return resultEntity;
//return resultEntity.getAttribute();
} catch (Exception e) {
logger.error("请求错误:" + e.getMessage());
@ -210,7 +211,7 @@ public class AxServiceImpl extends BaseService<ArchivesEntity, String> implement
* @return com.hzya.frame.web.entity.JsonResultEntity
**/
@Override
public JsonResultEntity thirdInterfaceArchivesInsert(JSONObject object) {
public Object thirdInterfaceArchivesInsert(JSONObject object) {
JSONObject jsonObject = object.getJSONObject("jsonStr");
if(jsonObject == null ){
return BaseResult.getFailureMessageEntity("数据为空,请先传递数据");
@ -294,78 +295,81 @@ public class AxServiceImpl extends BaseService<ArchivesEntity, String> implement
}
logger.info("返回结果:" + body);
JsonResultEntity resultEntity = JSON.parseObject(body.toString(),JsonResultEntity.class);
if(resultEntity.isFlag() && "200".equals(resultEntity.getStatus())){
if(JSONUtil.isTypeJSON(resultEntity.getAttribute().toString())){
JSONObject attribute = JSONObject.parseObject(resultEntity.getAttribute().toString());
if("success".equals(attribute.getString("status"))){
if(attribute.getString("data") == null || "".equals(attribute.getString("data")) ){
return resultEntity;
}
JSONArray jsonArray = JSONArray.parseArray(attribute.getString("data"));
if(jsonArray == null || jsonArray.size() == 0 ){
return resultEntity;
}
//解析具体数据
switch (jsonObject.getString("archivesType")){
case "1"://人员对照
break;
case "2"://部门档案
//[{"pk_corp":"1001","unitcode":"01","unitname":"临安奥星电子股份有限公司","createdate":"2024-04-24","deptattr":"1","deptname":"DEV测试一级部门","deptcode":"99","pk_deptdoc":"1001F1100000000067BR"}]
for (int i = 0; i < jsonArray.size(); i++) {
JSONObject object1 = jsonArray.getJSONObject(i);
ArchivesEntity archivesEntity = new ArchivesEntity();
archivesEntity.setArchivesType(jsonObject.getString("archivesType"));
archivesEntity.setCreate();
archivesEntity.setLeftCode(object1.getString("unitcode"));//
archivesEntity.setLeftName(object1.getString("unitname"));//
archivesEntity.setRightId(object1.getString("pk_deptdoc"));//
archivesEntity.setRightCode(object1.getString("unitcode"));//
archivesEntity.setRightName(object1.getString("unitname"));//
axDao.saveArchivesByType(archivesEntity);
}
break;
case "6"://存货对照
for (int i = 0; i < jsonArray.size(); i++) {
JSONObject object1 = jsonArray.getJSONObject(i);
ArchivesEntity archivesEntity = new ArchivesEntity();
archivesEntity.setArchivesType(jsonObject.getString("archivesType"));
archivesEntity.setCreate();
archivesEntity.setLeftCode(object1.getString("invclasscode"));//
archivesEntity.setLeftName(object1.getString("invclassname"));//
archivesEntity.setRightId(object1.getString("pk_invcl"));//
archivesEntity.setRightCode(object1.getString("invclasscode"));//
archivesEntity.setRightName(object1.getString("invclassname"));//
axDao.saveArchivesByType(archivesEntity);
}
break;
case "73"://客商辅助核算
break;
case "D01"://税率
break;
case "jobass"://项目辅助核算
break;
case "93"://银行类别
break;
case "96"://银行账户
break;
case "22"://资产类别
break;
default:
break;
}
return resultEntity;
}else {
return resultEntity;
}
}else {
return resultEntity;
}
}else {
//解析返回
return resultEntity;
}
return resultEntity;
//todo 暂时不保存
//JsonResultEntity resultEntity = JSON.parseObject(body.toString(),JsonResultEntity.class);
//if(resultEntity.isFlag() && "200".equals(resultEntity.getStatus())){
// if(JSONUtil.isTypeJSON(resultEntity.getAttribute().toString())){
// JSONObject attribute = JSONObject.parseObject(resultEntity.getAttribute().toString());
// if("success".equals(attribute.getString("status"))){
// if(attribute.getString("data") == null || "".equals(attribute.getString("data")) ){
// return resultEntity;
// }
// JSONArray jsonArray = JSONArray.parseArray(attribute.getString("data"));
// if(jsonArray == null || jsonArray.size() == 0 ){
// return resultEntity;
// }
// //解析具体数据
// switch (jsonObject.getString("archivesType")){
// case "1"://人员对照
//
//
// break;
// case "2"://部门档案
// //[{"pk_corp":"1001","unitcode":"01","unitname":"临安奥星电子股份有限公司","createdate":"2024-04-24","deptattr":"1","deptname":"DEV测试一级部门","deptcode":"99","pk_deptdoc":"1001F1100000000067BR"}]
// for (int i = 0; i < jsonArray.size(); i++) {
// JSONObject object1 = jsonArray.getJSONObject(i);
// ArchivesEntity archivesEntity = new ArchivesEntity();
// archivesEntity.setArchivesType(jsonObject.getString("archivesType"));
// archivesEntity.setCreate();
// archivesEntity.setLeftCode(object1.getString("unitcode"));//
// archivesEntity.setLeftName(object1.getString("unitname"));//
// archivesEntity.setRightId(object1.getString("pk_deptdoc"));//
// archivesEntity.setRightCode(object1.getString("unitcode"));//
// archivesEntity.setRightName(object1.getString("unitname"));//
// axDao.saveArchivesByType(archivesEntity);
// }
// break;
// case "6"://存货对照
// for (int i = 0; i < jsonArray.size(); i++) {
// JSONObject object1 = jsonArray.getJSONObject(i);
// ArchivesEntity archivesEntity = new ArchivesEntity();
// archivesEntity.setArchivesType(jsonObject.getString("archivesType"));
// archivesEntity.setCreate();
// archivesEntity.setLeftCode(object1.getString("invclasscode"));//
// archivesEntity.setLeftName(object1.getString("invclassname"));//
// archivesEntity.setRightId(object1.getString("pk_invcl"));//
// archivesEntity.setRightCode(object1.getString("invclasscode"));//
// archivesEntity.setRightName(object1.getString("invclassname"));//
// axDao.saveArchivesByType(archivesEntity);
// }
// break;
// case "73"://客商辅助核算
// break;
// case "D01"://税率
// break;
// case "jobass"://项目辅助核算
// break;
// case "93"://银行类别
// break;
// case "96"://银行账户
// break;
// case "22"://资产类别
// break;
// default:
// break;
// }
// return resultEntity;
// }else {
// return resultEntity;
// }
// }else {
// return resultEntity;
// }
//}else {
// //解析返回
// return resultEntity;
//}
} catch (Exception e) {
logger.error("请求错误:" + e.getMessage());
body.append(e.getMessage());
@ -393,7 +397,7 @@ public class AxServiceImpl extends BaseService<ArchivesEntity, String> implement
* @return com.hzya.frame.web.entity.JsonResultEntity
**/
@Override
public JsonResultEntity thirdInterfaceArchivesUpdate(JSONObject object) {
public Object thirdInterfaceArchivesUpdate(JSONObject object) {
JSONObject jsonObject = object.getJSONObject("jsonStr");
if(jsonObject == null ){
return BaseResult.getFailureMessageEntity("数据为空,请先传递数据");
@ -477,68 +481,70 @@ public class AxServiceImpl extends BaseService<ArchivesEntity, String> implement
}
logger.info("返回结果:" + body);
JsonResultEntity resultEntity = JSON.parseObject(body.toString(),JsonResultEntity.class);
if(resultEntity.isFlag() && "200".equals(resultEntity.getStatus())){
if(JSONUtil.isTypeJSON(resultEntity.getAttribute().toString())){
//JSONObject attribute = JSONObject.parseObject(resultEntity.getAttribute().toString());
JSONObject attribute = JSONObject.parseObject("{\n" +
" \"status\": \"success\",\n" +
" \"data\": \"[{\\\"pk_invcl\\\":\\\"0001F11000000000I6NN\\\",\\\"invclasscode\\\":\\\"04\\\",\\\"invclassname\\\":\\\"成品测试\\\",\\\"invclasslev\\\":\\\"1\\\",\\\"pk_corp\\\":\\\"0001\\\",\\\"unitcode\\\":\\\"0001\\\",\\\"unitname\\\":\\\"集团\\\"}]\",\n" +
" \"taskNumber\": \"202404250048\"\n" +
"}");
if("success".equals(attribute.getString("status"))){
if(attribute.getString("data") == null || "".equals(attribute.getString("data")) ){
return resultEntity;
}
JSONArray jsonArray = JSONArray.parseArray(attribute.getString("data"));
if(jsonArray == null || jsonArray.size() == 0 ){
return resultEntity;
}
//解析具体数据
switch (jsonObject.getString("archivesType")){
case "1"://人员对照
break;
case "2"://部门档案
break;
case "6"://存货对照
for (int i = 0; i < jsonArray.size(); i++) {
JSONObject object1 = jsonArray.getJSONObject(i);
ArchivesEntity archivesEntity = new ArchivesEntity();
archivesEntity.setArchivesType(jsonObject.getString("archivesType"));
archivesEntity.setUpdate();
archivesEntity.setLeftCode(object1.getString("invclasscode"));//
archivesEntity.setLeftName(object1.getString("invclassname"));//
archivesEntity.setRightId(object1.getString("pk_invcl"));//
archivesEntity.setRightCode(object1.getString("invclasscode"));//
archivesEntity.setRightName(object1.getString("invclassname"));//
axDao.updateArchivesByType(archivesEntity);
}
break;
case "73"://客商辅助核算
break;
case "D01"://税率
break;
case "jobass"://项目辅助核算
break;
case "93"://银行类别
break;
case "96"://银行账户
break;
case "22"://资产类别
break;
default:
break;
}
return resultEntity;
}else {
return resultEntity;
}
}else {
return resultEntity;
}
}else {
//解析返回
return resultEntity;
}
return resultEntity;
//JsonResultEntity resultEntity = JSON.parseObject(body.toString(),JsonResultEntity.class);
//if(resultEntity.isFlag() && "200".equals(resultEntity.getStatus())){
// if(JSONUtil.isTypeJSON(resultEntity.getAttribute().toString())){
// //JSONObject attribute = JSONObject.parseObject(resultEntity.getAttribute().toString());
// JSONObject attribute = JSONObject.parseObject("{\n" +
// " \"status\": \"success\",\n" +
// " \"data\": \"[{\\\"pk_invcl\\\":\\\"0001F11000000000I6NN\\\",\\\"invclasscode\\\":\\\"04\\\",\\\"invclassname\\\":\\\"成品测试\\\",\\\"invclasslev\\\":\\\"1\\\",\\\"pk_corp\\\":\\\"0001\\\",\\\"unitcode\\\":\\\"0001\\\",\\\"unitname\\\":\\\"集团\\\"}]\",\n" +
// " \"taskNumber\": \"202404250048\"\n" +
// "}");
// if("success".equals(attribute.getString("status"))){
// if(attribute.getString("data") == null || "".equals(attribute.getString("data")) ){
// return resultEntity;
// }
// JSONArray jsonArray = JSONArray.parseArray(attribute.getString("data"));
// if(jsonArray == null || jsonArray.size() == 0 ){
// return resultEntity;
// }
// //解析具体数据
// switch (jsonObject.getString("archivesType")){
// case "1"://人员对照
// break;
// case "2"://部门档案
// break;
// case "6"://存货对照
// for (int i = 0; i < jsonArray.size(); i++) {
// JSONObject object1 = jsonArray.getJSONObject(i);
// ArchivesEntity archivesEntity = new ArchivesEntity();
// archivesEntity.setArchivesType(jsonObject.getString("archivesType"));
// archivesEntity.setUpdate();
// archivesEntity.setLeftCode(object1.getString("invclasscode"));//
// archivesEntity.setLeftName(object1.getString("invclassname"));//
// archivesEntity.setRightId(object1.getString("pk_invcl"));//
// archivesEntity.setRightCode(object1.getString("invclasscode"));//
// archivesEntity.setRightName(object1.getString("invclassname"));//
// axDao.updateArchivesByType(archivesEntity);
// }
// break;
// case "73"://客商辅助核算
// break;
// case "D01"://税率
// break;
// case "jobass"://项目辅助核算
// break;
// case "93"://银行类别
// break;
// case "96"://银行账户
// break;
// case "22"://资产类别
// break;
// default:
// break;
// }
// return resultEntity;
// }else {
// return resultEntity;
// }
// }else {
// return resultEntity;
// }
//}else {
// //解析返回
// return resultEntity;
//}
} catch (Exception e) {
logger.error("请求错误:" + e.getMessage());
body.append(e.getMessage());
@ -566,7 +572,7 @@ public class AxServiceImpl extends BaseService<ArchivesEntity, String> implement
* @return com.hzya.frame.web.entity.JsonResultEntity
**/
@Override
public JsonResultEntity thirdInterfaceArchivesDelete(JSONObject object) {
public Object thirdInterfaceArchivesDelete(JSONObject object) {
JSONObject jsonObject = object.getJSONObject("jsonStr");
if(jsonObject == null ){
return BaseResult.getFailureMessageEntity("数据为空,请先传递数据");
@ -650,68 +656,70 @@ public class AxServiceImpl extends BaseService<ArchivesEntity, String> implement
}
logger.info("返回结果:" + body);
JsonResultEntity resultEntity = JSON.parseObject(body.toString(),JsonResultEntity.class);
if(resultEntity.isFlag() && "200".equals(resultEntity.getStatus())){
if(JSONUtil.isTypeJSON(resultEntity.getAttribute().toString())){
//JSONObject attribute = JSONObject.parseObject(resultEntity.getAttribute().toString());
JSONObject attribute = JSONObject.parseObject("{\n" +
" \"status\": \"success\",\n" +
" \"data\": \"[{\\\"pk_invcl\\\":\\\"0001F11000000000I6NN\\\",\\\"invclasscode\\\":\\\"04\\\",\\\"invclassname\\\":\\\"成品测试\\\",\\\"invclasslev\\\":\\\"1\\\",\\\"pk_corp\\\":\\\"0001\\\",\\\"unitcode\\\":\\\"0001\\\",\\\"unitname\\\":\\\"集团\\\"}]\",\n" +
" \"taskNumber\": \"202404250048\"\n" +
"}");
if("success".equals(attribute.getString("status"))){
if(attribute.getString("data") == null || "".equals(attribute.getString("data")) ){
return resultEntity;
}
JSONArray jsonArray = JSONArray.parseArray(attribute.getString("data"));
if(jsonArray == null || jsonArray.size() == 0 ){
return resultEntity;
}
//解析具体数据
switch (jsonObject.getString("archivesType")){
case "1"://人员对照
break;
case "2"://部门档案
break;
case "6"://存货对照
for (int i = 0; i < jsonArray.size(); i++) {
JSONObject object1 = jsonArray.getJSONObject(i);
ArchivesEntity archivesEntity = new ArchivesEntity();
archivesEntity.setArchivesType(jsonObject.getString("archivesType"));
archivesEntity.setUpdate();
archivesEntity.setLeftCode(object1.getString("invclasscode"));//
archivesEntity.setLeftName(object1.getString("invclassname"));//
archivesEntity.setRightId(object1.getString("pk_invcl"));//
archivesEntity.setRightCode(object1.getString("invclasscode"));//
archivesEntity.setRightName(object1.getString("invclassname"));//
axDao.deleteArchivesByType(archivesEntity);
}
break;
case "73"://客商辅助核算
break;
case "D01"://税率
break;
case "jobass"://项目辅助核算
break;
case "93"://银行类别
break;
case "96"://银行账户
break;
case "22"://资产类别
break;
default:
break;
}
return resultEntity;
}else {
return resultEntity;
}
}else {
return resultEntity;
}
}else {
//解析返回
return resultEntity;
}
return resultEntity;
//JsonResultEntity resultEntity = JSON.parseObject(body.toString(),JsonResultEntity.class);
//if(resultEntity.isFlag() && "200".equals(resultEntity.getStatus())){
// if(JSONUtil.isTypeJSON(resultEntity.getAttribute().toString())){
// //JSONObject attribute = JSONObject.parseObject(resultEntity.getAttribute().toString());
// JSONObject attribute = JSONObject.parseObject("{\n" +
// " \"status\": \"success\",\n" +
// " \"data\": \"[{\\\"pk_invcl\\\":\\\"0001F11000000000I6NN\\\",\\\"invclasscode\\\":\\\"04\\\",\\\"invclassname\\\":\\\"成品测试\\\",\\\"invclasslev\\\":\\\"1\\\",\\\"pk_corp\\\":\\\"0001\\\",\\\"unitcode\\\":\\\"0001\\\",\\\"unitname\\\":\\\"集团\\\"}]\",\n" +
// " \"taskNumber\": \"202404250048\"\n" +
// "}");
// if("success".equals(attribute.getString("status"))){
// if(attribute.getString("data") == null || "".equals(attribute.getString("data")) ){
// return resultEntity;
// }
// JSONArray jsonArray = JSONArray.parseArray(attribute.getString("data"));
// if(jsonArray == null || jsonArray.size() == 0 ){
// return resultEntity;
// }
// //解析具体数据
// switch (jsonObject.getString("archivesType")){
// case "1"://人员对照
// break;
// case "2"://部门档案
// break;
// case "6"://存货对照
// for (int i = 0; i < jsonArray.size(); i++) {
// JSONObject object1 = jsonArray.getJSONObject(i);
// ArchivesEntity archivesEntity = new ArchivesEntity();
// archivesEntity.setArchivesType(jsonObject.getString("archivesType"));
// archivesEntity.setUpdate();
// archivesEntity.setLeftCode(object1.getString("invclasscode"));//
// archivesEntity.setLeftName(object1.getString("invclassname"));//
// archivesEntity.setRightId(object1.getString("pk_invcl"));//
// archivesEntity.setRightCode(object1.getString("invclasscode"));//
// archivesEntity.setRightName(object1.getString("invclassname"));//
// axDao.deleteArchivesByType(archivesEntity);
// }
// break;
// case "73"://客商辅助核算
// break;
// case "D01"://税率
// break;
// case "jobass"://项目辅助核算
// break;
// case "93"://银行类别
// break;
// case "96"://银行账户
// break;
// case "22"://资产类别
// break;
// default:
// break;
// }
// return resultEntity;
// }else {
// return resultEntity;
// }
// }else {
// return resultEntity;
// }
//}else {
// //解析返回
// return resultEntity;
//}
} catch (Exception e) {
logger.error("请求错误:" + e.getMessage());
body.append(e.getMessage());