Merge pull request 'ax' (#13) from ax into dev
Reviewed-on: http://192.168.2.237:3000/root/kangarooDataCenterV3/pulls/13
This commit is contained in:
commit
baa68da51f
|
@ -3,6 +3,7 @@ logging:
|
|||
#日志级别 指定目录级别
|
||||
level:
|
||||
root: info
|
||||
encodings: GBK
|
||||
file:
|
||||
# 日志保存路径
|
||||
path: E:\yongansystem\log
|
||||
|
|
|
@ -3,6 +3,7 @@ logging:
|
|||
#日志级别 指定目录级别
|
||||
level:
|
||||
root: info
|
||||
encodings: UTF-8
|
||||
file:
|
||||
path: /home/webservice/zt/log
|
||||
spring:
|
||||
|
|
|
@ -3,6 +3,7 @@ logging:
|
|||
#日志级别 指定目录级别
|
||||
level:
|
||||
root: info
|
||||
encodings: UTF-8
|
||||
file:
|
||||
# 日志保存路径
|
||||
path: /Users/apple/Desktop/log/local
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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级别日志输出到文件 -->
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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 >= #{createTimeStart}</if>
|
||||
<if test="createTimeEnd != null">and create_time <= #{createTimeEnd}</if>
|
||||
</trim>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -53,9 +53,9 @@ public class AxServiceImpl extends BaseService<ArchivesEntity, String> implement
|
|||
private final String appId = "800016";
|
||||
private final String pzApiCode = "8000160014";//凭证新增
|
||||
|
||||
private final String ryApiCodexz = "8000160014";//人员对照新增
|
||||
private final String ryApiCodexg = "8000160014";//人员对照修改
|
||||
private final String ryApiCodesc = "8000160014";//人员对照删除
|
||||
private final String ryApiCodexz = "8000160029";//人员对照新增
|
||||
private final String ryApiCodexg = "8000160029";//人员对照修改
|
||||
private final String ryApiCodesc = "8000160030";//人员对照删除
|
||||
|
||||
private final String bmApiCodexz = "8000160015";//部门档案新增
|
||||
private final String bmApiCodexg = "8000160016";//部门档案修改
|
||||
|
@ -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,68 +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());
|
||||
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.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());
|
||||
|
@ -383,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("数据为空,请先传递数据");
|
||||
|
@ -467,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());
|
||||
|
@ -556,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("数据为空,请先传递数据");
|
||||
|
@ -640,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());
|
||||
|
|
Loading…
Reference in New Issue