澳星修改

This commit is contained in:
lvleigang 2024-08-09 13:37:29 +08:00
parent 9e619c8425
commit a1b46b6dd5
1 changed files with 785 additions and 748 deletions

View File

@ -1,6 +1,7 @@
package com.hzya.frame.u8c.ax.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.basedao.service.impl.BaseService;
import com.hzya.frame.u8c.ax.dao.IAxDao;
@ -33,11 +34,13 @@ import java.util.List;
@Service("axServiceImpl")
public class AxServiceImpl extends BaseService<ArchivesEntity, String> implements IAxService {
private IAxDao axDao;
@Autowired
public void setAxDao(IAxDao dao) {
this.axDao = dao;
this.dao = dao;
}
@Value("${zt.url}")
private String voucherUrl;
private final String publicKey = "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj";
@ -87,11 +90,11 @@ public class AxServiceImpl extends BaseService<ArchivesEntity, String> implement
private final Object lock = new Object();
/**
* @param object
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 凭证新增
* @Date 3:42 下午 2024/4/24
* @param object
* @return com.hzya.frame.web.entity.JsonResultEntity
**/
@Override
public Object thirdInterfaceVoucherInsert(JSONObject object) {
@ -260,12 +263,13 @@ public class AxServiceImpl extends BaseService<ArchivesEntity, String> implement
}
}
}
/**
* @param object
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 档案新增
* @Date 3:42 下午 2024/4/24
* @param object
* @return com.hzya.frame.web.entity.JsonResultEntity
**/
@Override
public Object thirdInterfaceArchivesInsert(JSONObject object) {
@ -342,7 +346,38 @@ public class AxServiceImpl extends BaseService<ArchivesEntity, String> implement
}
StringBuilder body = new StringBuilder();
try {
ByteArrayEntity byteArrayEntity = new ByteArrayEntity(jsonObject.getString("data").getBytes("UTF-8"));
String senddata = jsonObject.getString("data");
if ("1".equals(jsonObject.getString("archivesType"))) {
JSONObject sendJson = JSONObject.parseObject(senddata);
JSONObject sendObject = new JSONObject();
if (sendJson != null) {
JSONArray psn = sendJson.getJSONArray("psn");
JSONArray sendpsn = new JSONArray();
if (psn != null && psn.size() > 0) {
for (int i = 0; i < psn.size(); i++) {
JSONObject person = psn.getJSONObject(i);
JSONObject parentvo = person.getJSONObject("parentvo");
JSONObject psnmanvo = parentvo.getJSONObject("psnmanvo");
ArchivesEntity archivesEntity = new ArchivesEntity();
archivesEntity.setArchivesType("2");
archivesEntity.setLeftCode(psnmanvo.getString("pk_deptdoc"));
archivesEntity.setLeftOrg(parentvo.getString("currentcorp"));
List<ArchivesEntity> archivesEntities = axDao.queryArchivesData(archivesEntity);
if (archivesEntities != null && archivesEntities.size() > 0) {
psnmanvo.put("pk_deptdoc",archivesEntities.get(0).getRightCode());
}
parentvo.put("psnmanvo",psnmanvo);
person.put("parentvo",parentvo);
sendpsn.add(person);
}
}
sendObject.put("psn",sendpsn);
}
senddata = sendObject.toJSONString();
}
ByteArrayEntity byteArrayEntity = new ByteArrayEntity(senddata.getBytes("UTF-8"));
byteArrayEntity.setContentType("application/json");
post.setEntity(byteArrayEntity);
response = closeableHttpClient.execute(post);
@ -446,12 +481,13 @@ public class AxServiceImpl extends BaseService<ArchivesEntity, String> implement
}
}
}
/**
* @param object
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 档案修改
* @Date 3:42 下午 2024/4/24
* @param object
* @return com.hzya.frame.web.entity.JsonResultEntity
**/
@Override
public Object thirdInterfaceArchivesUpdate(JSONObject object) {
@ -621,12 +657,13 @@ public class AxServiceImpl extends BaseService<ArchivesEntity, String> implement
}
}
}
/**
* @param object
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 档案删除
* @Date 3:42 下午 2024/4/24
* @param object
* @return com.hzya.frame.web.entity.JsonResultEntity
**/
@Override
public Object thirdInterfaceArchivesDelete(JSONObject object) {