调整凭证接口,增加部门代码

This commit is contained in:
hecan 2024-10-31 10:14:35 +08:00
parent 7a90623777
commit 47b511b98b
3 changed files with 27 additions and 6 deletions

View File

@ -261,7 +261,7 @@
<!-- 查询列表 商学院所需要的凭证数据--> <!-- 查询列表 商学院所需要的凭证数据-->
<select id="queryGlPzmlSxy" resultMap="get-SenderGlPzmlEntity-result" parameterType = "com.hzya.frame.grpU8.nxproof.glPzml.entity.SenderGlPzmlEntity"> <select id="queryGlPzmlSxy" resultMap="get-SenderGlPzmlEntity-result" parameterType = "com.hzya.frame.grpU8.nxproof.glPzml.entity.SenderGlPzmlEntity">
select <!-- select
pzml.idpzh as idpzh, pzml.idpzh as idpzh,
pzml.kjqj as kjqj, pzml.kjqj as kjqj,
pzml.srrq as srrq, pzml.srrq as srrq,
@ -278,8 +278,28 @@
pzml.kjqj, pzml.kjqj,
pzml.srrq, pzml.srrq,
pzml.pzzy, pzml.pzzy,
pzml.gsdm,pzml.zth,pzml.kjqj,pzml.pzh pzml.gsdm,pzml.zth,pzml.kjqj,pzml.pzh-->
select
pznr.idpznr as idpzh,
pznr.kjqj as kjqj,
pzml.srrq as srrq,
pznr.bmdm,
pznr.zy as pzzy,
sum(pznr.je) as pzje,
pznr.gsdm,pznr.zth,pznr.kjqj,pznr.pzh
from GL_Pzml pzml
left join gl_pznr pznr on pznr.idpzh=pzml.idpzh and pzml.kjqj=pznr.kjqj
<trim prefix="where" prefixOverrides="and">
<if test="idpzh !=null and idpzh!='' "> and pzml.idpzh = #{idpzh} </if>
and (pzml.srrq>=#{srrq} or pzml.shrq >=#{shrq} or pzml.jzrq>=#{jzrq}) and pznr.zbid!=0
</trim>
group by pznr.idpznr,
pznr.kjqj,
pzml.srrq,
pznr.zy,
pznr.bmdm,
pznr.gsdm,pznr.zth,pznr.kjqj,pznr.pzh
</select> </select>
<!--新增所有列--> <!--新增所有列-->

View File

@ -706,12 +706,13 @@ public class SenderGlPzmlServiceImpl extends BaseService<SenderGlPzmlEntity, Str
jsonObjectParams.put("code",pzmlEntity.getIdpzh());//pzid jsonObjectParams.put("code",pzmlEntity.getIdpzh());//pzid
jsonObjectParams.put("budgetYear",pzmlEntity.getKjqj().substring(0,4));//预算年度 jsonObjectParams.put("budgetYear",pzmlEntity.getKjqj().substring(0,4));//预算年度
jsonObjectParams.put("applyDate",outputDateString);//日期 jsonObjectParams.put("applyDate",outputDateString);//日期
jsonObjectParams.put("depCode",pzmlEntity.getBmdm());//部门代码
jsonObjectParams.put("description",pzmlEntity.getPzzy());//说明 jsonObjectParams.put("description",pzmlEntity.getPzzy());//说明
jsonObjectParams.put("amount",roundedValue.doubleValue());//金额 jsonObjectParams.put("amount",roundedValue.doubleValue());//金额
jsonObjectParams.put("pzNum",pzNum);//凭证号 例如公司代码+账套号+会计期间+凭证号001_001_202408_付款_1 jsonObjectParams.put("pzNum",pzNum);//凭证号 例如公司代码+账套号+会计期间+凭证号001_001_202408_付款_1
//根据idpzh查询指标id和指标金额以及部门经济科目 //根据idpzh查询指标id和指标金额以及部门经济科目
SenderGlPznrEntity senderGlPznrEntity=new SenderGlPznrEntity(); SenderGlPznrEntity senderGlPznrEntity=new SenderGlPznrEntity();
senderGlPznrEntity.setIdpzh(pzmlEntity.getIdpzh()); senderGlPznrEntity.setIdpznr(pzmlEntity.getIdpzh());
senderGlPznrEntity.setDataSourceCode(glPzmlEntity.getDataSourceCode()); senderGlPznrEntity.setDataSourceCode(glPzmlEntity.getDataSourceCode());
List<SenderGlPznrEntity> senderGlPznrEntities = senderGlPznrDao.queryGlPznrSxy(senderGlPznrEntity); List<SenderGlPznrEntity> senderGlPznrEntities = senderGlPznrDao.queryGlPznrSxy(senderGlPznrEntity);
logger.info("=======根据凭证idpzh:{}查询的指标金额和指标id以及部门经济科目数据有{}条",pzmlEntity.getIdpzh(),senderGlPznrEntities.size()); logger.info("=======根据凭证idpzh:{}查询的指标金额和指标id以及部门经济科目数据有{}条",pzmlEntity.getIdpzh(),senderGlPznrEntities.size());
@ -736,7 +737,7 @@ public class SenderGlPzmlServiceImpl extends BaseService<SenderGlPzmlEntity, Str
jsonObjectData.put("data",jsonArray); jsonObjectData.put("data",jsonArray);
String params = jsonObjectData.toJSONString(); String params = jsonObjectData.toJSONString();
logger.info("调用商学院凭证保存接口请求参数:{}",params); logger.info("调用商学院凭证保存接口请求参数:{}",params);
result = HttpRequest.post(URL + "nky/service/zsApi/saveZJSYPZReimburse?accessToken="+token).header("Content-Type", "application/json;charset=UTF-8").timeout(30000).body(params).execute().body(); result = HttpRequest.post(URLTest + "nky/service/zsApi/saveZJSYPZReimburse?accessToken="+token).header("Content-Type", "application/json;charset=UTF-8").timeout(30000).body(params).execute().body();
logger.info("调用商学院凭证保存接口返回参数:{}",result); logger.info("调用商学院凭证保存接口返回参数:{}",result);
} }
JSONObject jsonObjectResult=new JSONObject(); JSONObject jsonObjectResult=new JSONObject();
@ -758,7 +759,7 @@ public class SenderGlPzmlServiceImpl extends BaseService<SenderGlPzmlEntity, Str
String params = jsonObject.toJSONString(); String params = jsonObject.toJSONString();
logger.info("=========获取凭证token请求参数:{}========",params); logger.info("=========获取凭证token请求参数:{}========",params);
String urlToken="nky/service/session/getAccessToken"; String urlToken="nky/service/session/getAccessToken";
String result = HttpRequest.post(URL + urlToken).header("Content-Type", "application/json;charset=UTF-8").timeout(30000).body(params).execute().body(); String result = HttpRequest.post(URLTest + urlToken).header("Content-Type", "application/json;charset=UTF-8").timeout(30000).body(params).execute().body();
logger.info("=========获取凭证token返回结果:{}========",result); logger.info("=========获取凭证token返回结果:{}========",result);
JSONObject jsonObjectResult=JSONObject.parseObject(result); JSONObject jsonObjectResult=JSONObject.parseObject(result);
String value=jsonObjectResult.getString("value"); String value=jsonObjectResult.getString("value");

View File

@ -473,7 +473,7 @@
</select> </select>
<select id="queryGlPznrSxy" resultMap="get-SenderGlPznrEntity-result" parameterType = "com.hzya.frame.grpU8.nxproof.glPznr.entity.SenderGlPznrEntity"> <select id="queryGlPznrSxy" resultMap="get-SenderGlPznrEntity-result" parameterType = "com.hzya.frame.grpU8.nxproof.glPznr.entity.SenderGlPznrEntity">
select je,fzdm5,zbid from gl_pznr where zbid !=0 and idpzh=#{idpzh} select je,fzdm5,zbid from gl_pznr where zbid !=0 and idpznr=#{idpznr}
</select> </select>
<!--新增所有列--> <!--新增所有列-->