凭证查询配置

This commit is contained in:
lvleigang 2024-08-29 15:13:42 +08:00
parent 00ff2d08a4
commit f9ba6ac3dd
7 changed files with 154 additions and 6 deletions

View File

@ -39,6 +39,8 @@ spring:
savefile: savefile:
# 文件保存路径 # 文件保存路径
path: /Users/apple/Desktop/log/local path: /Users/apple/Desktop/log/local
pluginpath:
tomcatpath:
zt: zt:
url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface
cbs8: cbs8:

View File

@ -42,4 +42,6 @@ public interface IAcctVouchInfoService extends IBaseService<AcctVouchInfoEntity,
Object queryPznr(JSONObject object); Object queryPznr(JSONObject object);
Object queryPz(JSONObject object); Object queryPz(JSONObject object);
Object queryPzPage(JSONObject object);
} }

View File

@ -240,7 +240,7 @@ public class AcctVouchInfoServiceImpl extends BaseService<AcctVouchInfoEntity, S
} }
if(glFzxzlNrEntityDtos.size() > 0) { if(glFzxzlNrEntityDtos.size() > 0) {
glFzxzlEntityDto.setGlFzxzlNrEntityDtos(glFzxzlNrEntityDtos); glFzxzlEntityDto.setGlFzxzlNrEntityDtos(glFzxzlNrEntityDtos);
//todo 查询数据设置值 // 查询数据设置值
List<JSONObject> fzhss = glFzxzlDao.queryFzhs(glFzxzlEntityDto); List<JSONObject> fzhss = glFzxzlDao.queryFzhs(glFzxzlEntityDto);
if(fzhss != null && fzhss.size() > 0){ if(fzhss != null && fzhss.size() > 0){
for (int i = 0; i < list.size(); i++) { for (int i = 0; i < list.size(); i++) {
@ -296,4 +296,134 @@ public class AcctVouchInfoServiceImpl extends BaseService<AcctVouchInfoEntity, S
return returnObject; return returnObject;
} }
} }
@Override
public Object queryPzPage(JSONObject object) {
SenderGlPzmlEntity entity = getData("jsonStr", object,SenderGlPzmlEntity.class);
//判断分页
if (entity.getPageNum() != null && entity.getPageSize() != null) {
PageHelper.startPage(entity.getPageNum(), entity.getPageSize());
List<SenderGlPzmlEntity> list = senderGlPzmlDao.querySenderGlPzmlEntity(entity);
PageInfo pageInfo = new PageInfo(list);
doPznrAndPzmlFzhs(list,entity.getDataSourceCode());
JSONObject returnObject = new JSONObject();
returnObject.put("status","success");
returnObject.put("data",pageInfo);
returnObject.put("msg","查询成功");
return returnObject;
}else {
JSONObject returnObject = new JSONObject();
returnObject.put("status","false");
returnObject.put("msg","请先传递分页参数");
return returnObject;
}
}
/**
* @Author lvleigang
* @Description 处理凭证内容和辅助核算
* @Date 2:15 下午 2024/8/29
* @param senderGlPzmlEntities
* @param dataSourceCode
* @return void
**/
private void doPznrAndPzmlFzhs(List<SenderGlPzmlEntity> senderGlPzmlEntities, String dataSourceCode) {
if(senderGlPzmlEntities == null || senderGlPzmlEntities.size() == 0 ){
return;
}
//查询凭证内容
List<String> idpzhs = new ArrayList<>();
for (int i = 0; i < senderGlPzmlEntities.size(); i++) {
idpzhs.add(senderGlPzmlEntities.get(i).getIdpzh());
}
SenderGlPznrEntity senderGlPznrEntity = new SenderGlPznrEntity();
senderGlPznrEntity.setDataSourceCode(dataSourceCode);
senderGlPznrEntity.setIdpzhs(idpzhs);
List<SenderGlPznrEntity> list = senderGlPznrDao.querySenderGlPznrEntityByIdpzh(senderGlPznrEntity);
if(list == null || list.size() == 0 ){
return;
}
GlFzxzlEntityDto glFzxzlEntityDto = new GlFzxzlEntityDto();
glFzxzlEntityDto.setDataSourceCode(dataSourceCode);
glFzxzlEntityDto.setSfyz("0");
List<GlFzxzlNrEntityDto> glFzxzlNrEntityDtos = new ArrayList<>();
for (int i = 0; i < list.size(); i++) {
if(list.get(i).getKjqj() != null && list.get(i).getKjqj().length() >= 4){
GlFzxzlNrEntityDto glFzxzlNrEntityDto = new GlFzxzlNrEntityDto();
glFzxzlNrEntityDto.setGsdm(list.get(i).getGsdm());
glFzxzlNrEntityDto.setKjnd(list.get(i).getKjqj().substring(0,4));
List<GlFzxzlNrDmEntityDto> glFzxzlNrDmEntityDtos = new ArrayList<>();
if(list.get(i).getFzhs() != null && !"".equals(list.get(i).getFzhs())){
JSONObject jsonObject = (JSONObject) JSONObject.toJSON(list.get(i));
String[] fzhs = list.get(i).getFzhs().split(",");
if(fzhs != null && fzhs.length > 0){
for (int i1 = 0; i1 < fzhs.length; i1++) {
if(fzhs[i1] != null && !"".equals(fzhs[i1])){
if(jsonObject.get("fzdm"+fzhs[i1]) != null && !"".equals(jsonObject.get("fzdm"+fzhs[i1]))){
GlFzxzlNrDmEntityDto glFzxzlNrDmEntityDto = new GlFzxzlNrDmEntityDto();
glFzxzlNrDmEntityDto.setLbdm(fzhs[i1]);
glFzxzlNrDmEntityDto.setFzdm(jsonObject.getString("fzdm"+fzhs[i1]));
glFzxzlNrDmEntityDtos.add(glFzxzlNrDmEntityDto);
}
}
}
}
}
if(glFzxzlNrDmEntityDtos.size() > 0){
glFzxzlNrEntityDto.setGlFzxzlNrDmEntityDtos(glFzxzlNrDmEntityDtos);
glFzxzlNrEntityDtos.add(glFzxzlNrEntityDto);
}
}
}
if(glFzxzlNrEntityDtos.size() > 0) {
glFzxzlEntityDto.setGlFzxzlNrEntityDtos(glFzxzlNrEntityDtos);
// 查询数据设置值
List<JSONObject> fzhss = glFzxzlDao.queryFzhs(glFzxzlEntityDto);
if(fzhss != null && fzhss.size() > 0){
for (int i = 0; i < list.size(); i++) {
List<JSONObject> fzhslist = new ArrayList<>();
list.get(i).setFzhslist(fzhslist);
if (list.get(i).getKjqj() != null && list.get(i).getKjqj().length() >= 4) {
if (list.get(i).getFzhs() != null && !"".equals(list.get(i).getFzhs())) {
JSONObject jsonObject = (JSONObject) JSONObject.toJSON(list.get(i));
String[] fzhs = list.get(i).getFzhs().split(",");
if (fzhs != null && fzhs.length > 0) {
for (int i1 = 0; i1 < fzhs.length; i1++) {
if (fzhs[i1] != null && !"".equals(fzhs[i1])) {
if (jsonObject.get("fzdm" + fzhs[i1]) != null && !"".equals(jsonObject.get("fzdm" + fzhs[i1]))) {
for (int i2 = 0; i2 < fzhss.size(); i2++) {
if(fzhss.get(i2).getString("lbdm").equals(fzhs[i1])
&& fzhss.get(i2).getString("gsdm").equals(list.get(i).getGsdm())
&& fzhss.get(i2).getString("kjnd").equals(list.get(i).getKjqj().substring(0,4))
&& fzhss.get(i2).getString("fzdm").equals(jsonObject.get("fzdm" + fzhs[i1]))
){
JSONObject a = new JSONObject();
a.put("lbdm",fzhss.get(i2).getString("lbdm"));
a.put("fzdm",fzhss.get(i2).getString("fzdm"));
a.put("fzmc",fzhss.get(i2).getString("fzmc"));
fzhslist.add(a);
}
}
}
}
}
}
}
}
}
}
}
for (int i = 0; i < senderGlPzmlEntities.size(); i++) {
List<SenderGlPznrEntity> senderGlPznrEntities = new ArrayList<>();
for (int i1 = 0; i1 < list.size(); i1++) {
if(senderGlPzmlEntities.get(i).getIdpzh().equals(list.get(i1).getIdpzh())){
senderGlPznrEntities.add(list.get(i1));
}
}
senderGlPzmlEntities.get(i).setSenderGlPznrEntities(senderGlPznrEntities);
}
}
} }

View File

@ -77,11 +77,7 @@ public class SenderGlPzmlDaoImpl extends MybatisGenericDao<SenderGlPzmlEntity, S
} }
@Override
@DS("#senderGlPzmlEntity.dataSourceCode")
public List<SenderGlPzmlEntity> queryGlPzmlSxy(SenderGlPzmlEntity senderGlPzmlEntity) {
return (List<SenderGlPzmlEntity>) super.selectList("queryGlPzmlSxy",senderGlPzmlEntity);
}
} }

View File

@ -114,6 +114,7 @@ private String dqrq;
private String glidpznr; private String glidpznr;
private String fzhs; private String fzhs;
private List<JSONObject> fzhslist; private List<JSONObject> fzhslist;
private List<String> idpzhs;
public String getBxdid() { public String getBxdid() {
return bxdid; return bxdid;
} }
@ -833,5 +834,13 @@ private String fzhs;
public void setFzhslist(List<JSONObject> fzhslist) { public void setFzhslist(List<JSONObject> fzhslist) {
this.fzhslist = fzhslist; this.fzhslist = fzhslist;
} }
public List<String> getIdpzhs() {
return idpzhs;
}
public void setIdpzhs(List<String> idpzhs) {
this.idpzhs = idpzhs;
}
} }

View File

@ -1036,6 +1036,14 @@ update gl_pznr set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{mo
<if test="zbid != null"> and pznr.ZBID like concat('%',#{zbid},'%') </if> <if test="zbid != null"> and pznr.ZBID like concat('%',#{zbid},'%') </if>
<if test="edid != null"> and pznr.EDID like concat('%',#{edid},'%') </if> <if test="edid != null"> and pznr.EDID like concat('%',#{edid},'%') </if>
<if test="jfsqid != null"> and pznr.JFSQID like concat('%',#{jfsqid},'%') </if> <if test="jfsqid != null"> and pznr.JFSQID like concat('%',#{jfsqid},'%') </if>
<if test="idpzhs != null and idpzhs.size > 0">
AND pznr.idpzh in
<foreach collection="idpzhs" item="item" index="index" open="(" close=")"
separator=",">
#{item}
</foreach>
</if>
</trim> </trim>
</select> </select>

View File

@ -92,6 +92,7 @@ public class GrpU8ServiceImpl implements IGrpU8Service {
returnObject = acctVouchInfoService.queryPz(object); returnObject = acctVouchInfoService.queryPz(object);
break; break;
case "13"://总账凭证查询分页接口 ml nr fzhs 分页 case "13"://总账凭证查询分页接口 ml nr fzhs 分页
returnObject = acctVouchInfoService.queryPzPage(object);
break; break;
default: default:
JSONObject jsonObject1 = new JSONObject(); JSONObject jsonObject1 = new JSONObject();