Commit 80cf0683 authored by hongguangwu's avatar hongguangwu

优化查询条件

parent e531f83f
......@@ -67,18 +67,16 @@ public class EkpSalaryUtil {
}
// 推送主表到ekp
public String sendStandardToEKP(EkpSalaryStandardParam param){
public String sendStandardToEKP(String loginName, EkpSalaryStandardParam param){
log.info("推送EKP开始--薪资主表数据");
RestTemplate yourRestTemplate = new RestTemplate();
try{
//指向EKP的接口url
//把ModelingAppModelParameterAddForm转换成MultiValueMap
JSONObject loginName = new JSONObject();
String formValues = new ObjectMapper().writeValueAsString(param);
loginName.append("LoginName",ekpProperties.getLoginName());
MultiValueMap<String,Object> wholeForm = new LinkedMultiValueMap<>();
wholeForm.add("docSubject",ekpProperties.getDocSubject());
wholeForm.add("docCreator", "{\"LoginName\":\"admin\"}");
wholeForm.add("docCreator", "{\"LoginName\":\"" + loginName+ "\"}");
wholeForm.add("docStatus", ekpProperties.getDocStatus());
wholeForm.add("formValues", formValues);
wholeForm.add("fdModelId", ekpProperties.getStandardFdModelId());
......@@ -106,17 +104,15 @@ public class EkpSalaryUtil {
}
// 退表到ekp
public String backStandardToEKP(EkpSalaryBackParam param){
public String backStandardToEKP(String loginName, EkpSalaryBackParam param){
log.info("推送EKP开始--薪资退表");
RestTemplate yourRestTemplate = new RestTemplate();
try{
//指向EKP的接口url
//把ModelingAppModelParameterAddForm转换成MultiValueMap
JSONObject loginName = new JSONObject();
loginName.append("LoginName",ekpProperties.getLoginName());
MultiValueMap<String,Object> wholeForm = new LinkedMultiValueMap<>();
wholeForm.add("docSubject",ekpProperties.getDocSubject());
wholeForm.add("docCreator", "{\"LoginName\":\"admin\"}");
wholeForm.add("docCreator", "{\"LoginName\":\"" + loginName+ "\"}");
wholeForm.add("docStatus", ekpProperties.getDocStatus());
String formValues = new ObjectMapper().writeValueAsString(param);
wholeForm.add("formValues", formValues);
......
......@@ -120,4 +120,13 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
int noPageCountDiy(@Param("searchVo") TSalaryAccountSearchVo searchVo,
@Param("idList") List<String> idList);
/**
* @param salaryId 工资表id
* @Description: 退表回退状态
* @Author: hgw
* @Date: 2022/11/8 15:41
* @return: void
**/
void backSalaryBySalaryId(@Param("salaryId") String salaryId);
}
......@@ -114,4 +114,13 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam>
**/
List<EkpSalaryParamVo> getEkpSalaryParamList(String salaryId);
/**
* @param salaryId 工资表id
* @Description: 退表回退状态
* @Author: hgw
* @Date: 2022/11/8 15:41
* @return: void
**/
void backSalaryBySalaryId(String salaryId);
}
......@@ -229,4 +229,9 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
return baseMapper.getEkpSalaryParamList(salaryId);
}
@Override
public void backSalaryBySalaryId(String salaryId) {
baseMapper.backSalaryBySalaryId(salaryId);
}
}
......@@ -594,9 +594,9 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
standardParam.setFd_3b3d3ec85bfeb0(s.getSalaryMonth().substring(0,4)
+ CommonConstants.CENTER_SPLIT_LINE_STRING + s.getSalaryMonth().substring(4,6));
// 推送主表信息
sendBack = ekpSalaryUtil.sendStandardToEKP(standardParam);
sendBack = ekpSalaryUtil.sendStandardToEKP(s.getCreateName(), standardParam);
if (Common.isEmpty(sendBack) || sendBack.length() != 32) {
sendBack = ekpSalaryUtil.sendStandardToEKP(standardParam);
sendBack = ekpSalaryUtil.sendStandardToEKP(s.getCreateName(), standardParam);
}
s.setSendTime(new Date());
s.setSendMonth(nowMonth);
......@@ -901,9 +901,9 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
param.setFd_3b3c293745e7b4(ss.getDeptName());
param.setFd_3b3c2935c13056(ss.getDeptNo());
param.setFd_3b3c293811c0ee(ss.getApplyNo());
String sendBack = ekpSalaryUtil.backStandardToEKP(param);
String sendBack = ekpSalaryUtil.backStandardToEKP(ss.getCreateName(), param);
if (Common.isEmpty(sendBack) || sendBack.length() != 32) {
sendBack = ekpSalaryUtil.backStandardToEKP(param);
sendBack = ekpSalaryUtil.backStandardToEKP(ss.getCreateName(), param);
}
if (Common.isNotNull(sendBack) && sendBack.length() == 32) {
// 更新薪资为确认不通过
......@@ -911,6 +911,8 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
ss.setBackTime(new Date());
ss.setBackEkpId(sendBack);
this.updateById(ss);
// 更新报账表
salaryAccountService.backSalaryBySalaryId(ss.getId());
TIncome income = new TIncome();
income.setApplyNo(applyNo);
// 删除收入对应编号的明细
......
......@@ -838,4 +838,9 @@
</if>
</if>
</sql>
<!-- 退表回退状态 -->
<update id="backSalaryBySalaryId" >
update t_salary_account a set a.SEND_STATUS = '0' where a.SALARY_FORM_ID = #{salaryId}
</update>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment