澳星修改
This commit is contained in:
parent
9e619c8425
commit
a1b46b6dd5
|
@ -1,6 +1,7 @@
|
||||||
package com.hzya.frame.u8c.ax.service.impl;
|
package com.hzya.frame.u8c.ax.service.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
import com.hzya.frame.u8c.ax.dao.IAxDao;
|
import com.hzya.frame.u8c.ax.dao.IAxDao;
|
||||||
|
@ -33,11 +34,13 @@ import java.util.List;
|
||||||
@Service("axServiceImpl")
|
@Service("axServiceImpl")
|
||||||
public class AxServiceImpl extends BaseService<ArchivesEntity, String> implements IAxService {
|
public class AxServiceImpl extends BaseService<ArchivesEntity, String> implements IAxService {
|
||||||
private IAxDao axDao;
|
private IAxDao axDao;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public void setAxDao(IAxDao dao) {
|
public void setAxDao(IAxDao dao) {
|
||||||
this.axDao = dao;
|
this.axDao = dao;
|
||||||
this.dao = dao;
|
this.dao = dao;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Value("${zt.url}")
|
@Value("${zt.url}")
|
||||||
private String voucherUrl;
|
private String voucherUrl;
|
||||||
private final String publicKey = "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj";
|
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();
|
private final Object lock = new Object();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param object
|
||||||
|
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||||
* @Author lvleigang
|
* @Author lvleigang
|
||||||
* @Description 凭证新增
|
* @Description 凭证新增
|
||||||
* @Date 3:42 下午 2024/4/24
|
* @Date 3:42 下午 2024/4/24
|
||||||
* @param object
|
|
||||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
|
||||||
**/
|
**/
|
||||||
@Override
|
@Override
|
||||||
public Object thirdInterfaceVoucherInsert(JSONObject object) {
|
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
|
* @Author lvleigang
|
||||||
* @Description 档案新增
|
* @Description 档案新增
|
||||||
* @Date 3:42 下午 2024/4/24
|
* @Date 3:42 下午 2024/4/24
|
||||||
* @param object
|
|
||||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
|
||||||
**/
|
**/
|
||||||
@Override
|
@Override
|
||||||
public Object thirdInterfaceArchivesInsert(JSONObject object) {
|
public Object thirdInterfaceArchivesInsert(JSONObject object) {
|
||||||
|
@ -342,7 +346,38 @@ public class AxServiceImpl extends BaseService<ArchivesEntity, String> implement
|
||||||
}
|
}
|
||||||
StringBuilder body = new StringBuilder();
|
StringBuilder body = new StringBuilder();
|
||||||
try {
|
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");
|
byteArrayEntity.setContentType("application/json");
|
||||||
post.setEntity(byteArrayEntity);
|
post.setEntity(byteArrayEntity);
|
||||||
response = closeableHttpClient.execute(post);
|
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
|
* @Author lvleigang
|
||||||
* @Description 档案修改
|
* @Description 档案修改
|
||||||
* @Date 3:42 下午 2024/4/24
|
* @Date 3:42 下午 2024/4/24
|
||||||
* @param object
|
|
||||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
|
||||||
**/
|
**/
|
||||||
@Override
|
@Override
|
||||||
public Object thirdInterfaceArchivesUpdate(JSONObject object) {
|
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
|
* @Author lvleigang
|
||||||
* @Description 档案删除
|
* @Description 档案删除
|
||||||
* @Date 3:42 下午 2024/4/24
|
* @Date 3:42 下午 2024/4/24
|
||||||
* @param object
|
|
||||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
|
||||||
**/
|
**/
|
||||||
@Override
|
@Override
|
||||||
public Object thirdInterfaceArchivesDelete(JSONObject object) {
|
public Object thirdInterfaceArchivesDelete(JSONObject object) {
|
||||||
|
|
Loading…
Reference in New Issue