Commit 27f4f995 authored by huyuchen's avatar huyuchen

Merge remote-tracking branch 'origin/develop' into develop

parents 217940f3 9cb1d7ff
...@@ -73,7 +73,8 @@ public class TCertRecordServiceImpl extends ServiceImpl<TCertRecordMapper, TCert ...@@ -73,7 +73,8 @@ public class TCertRecordServiceImpl extends ServiceImpl<TCertRecordMapper, TCert
TEmployeeContractInfo first = contractInfoMapper.selectOne(Wrappers.<TEmployeeContractInfo>query().lambda() TEmployeeContractInfo first = contractInfoMapper.selectOne(Wrappers.<TEmployeeContractInfo>query().lambda()
.eq(TEmployeeContractInfo::getDeleteFlag,CommonConstants.ZERO_STRING) .eq(TEmployeeContractInfo::getDeleteFlag,CommonConstants.ZERO_STRING)
.eq(TEmployeeContractInfo::getAuditStatus,CommonConstants.TWO_STRING) .eq(TEmployeeContractInfo::getAuditStatus,CommonConstants.TWO_STRING)
.eq(TEmployeeContractInfo::getIsObsolete,CommonConstants.ZERO_STRING) .ne(TEmployeeContractInfo::getSituation,"终止")
.ne(TEmployeeContractInfo::getSituation,"作废")
.eq(TEmployeeContractInfo::getEmpIdcard,employeeInfo.getEmpIdcard()) .eq(TEmployeeContractInfo::getEmpIdcard,employeeInfo.getEmpIdcard())
.orderByAsc(TEmployeeContractInfo::getContractStart) .orderByAsc(TEmployeeContractInfo::getContractStart)
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
...@@ -82,9 +83,11 @@ public class TCertRecordServiceImpl extends ServiceImpl<TCertRecordMapper, TCert ...@@ -82,9 +83,11 @@ public class TCertRecordServiceImpl extends ServiceImpl<TCertRecordMapper, TCert
TEmployeeContractInfo last = contractInfoMapper.selectOne(Wrappers.<TEmployeeContractInfo>query().lambda() TEmployeeContractInfo last = contractInfoMapper.selectOne(Wrappers.<TEmployeeContractInfo>query().lambda()
.eq(TEmployeeContractInfo::getDeleteFlag,CommonConstants.ZERO_STRING) .eq(TEmployeeContractInfo::getDeleteFlag,CommonConstants.ZERO_STRING)
.eq(TEmployeeContractInfo::getAuditStatus,CommonConstants.TWO_STRING) .eq(TEmployeeContractInfo::getAuditStatus,CommonConstants.TWO_STRING)
.eq(TEmployeeContractInfo::getIsObsolete,CommonConstants.ZERO_STRING) .ne(TEmployeeContractInfo::getSituation,"终止")
.ne(TEmployeeContractInfo::getSituation,"作废")
.eq(TEmployeeContractInfo::getEmpIdcard,employeeInfo.getEmpIdcard()) .eq(TEmployeeContractInfo::getEmpIdcard,employeeInfo.getEmpIdcard())
.orderByDesc(TEmployeeContractInfo::getCreateTime) .isNotNull(TEmployeeContractInfo::getContractEnd)
.orderByDesc(TEmployeeContractInfo::getContractEnd)
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
TCertRecordVo vo = new TCertRecordVo(); TCertRecordVo vo = new TCertRecordVo();
vo.setEmpIdcard(project.getEmpIdcard()); vo.setEmpIdcard(project.getEmpIdcard());
......
...@@ -64,21 +64,7 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper, ...@@ -64,21 +64,7 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
*/ */
@Override @Override
public IPage<TSalaryAccount> getTSalaryAccountPage(Page<TSalaryAccount> page, TSalaryAccountSearchVo tSalaryAccount) { public IPage<TSalaryAccount> getTSalaryAccountPage(Page<TSalaryAccount> page, TSalaryAccountSearchVo tSalaryAccount) {
long pageCount = baseMapper.getTSalaryAccountPageCountDiy(tSalaryAccount); return baseMapper.getTSalaryAccountPage(page, tSalaryAccount);
page.setTotal(pageCount);
if (pageCount > 0L) {
page.setPages((long) Math.ceil(1.0*pageCount / page.getSize()));
}
if (page.getCurrent() < 1) {
page.setCurrent(1L);
}
if (page.getSize() < 1) {
page.setSize(10L);
}
if (pageCount > ((page.getCurrent() - 1) * page.getSize())) {
page.setRecords(baseMapper.getTSalaryAccountPageDiy(tSalaryAccount, (page.getCurrent() - 1) * page.getSize(), page.getSize()));
}
return page;
} }
/** /**
......
...@@ -526,71 +526,75 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -526,71 +526,75 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
//报账表 //报账表
List<EkpSalaryParamVo> ekpList = salaryAccountService.getEkpSalaryParamList(id); List<EkpSalaryParamVo> ekpList = salaryAccountService.getEkpSalaryParamList(id);
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
if (user != null && ekpList != null && !ekpList.isEmpty()) { if (user != null) {
boolean sendStatus = true; if (ekpList != null && !ekpList.isEmpty()){
String sendBack; boolean sendStatus = true;
List<TSalaryAccount> accountList = new ArrayList<>(); String sendBack;
TSalaryAccount account; List<TSalaryAccount> accountList = new ArrayList<>();
Date sendTime = new Date(); TSalaryAccount account;
String nowMonth = DateUtil.addMonth(0); Date sendTime = new Date();
EkpSalaryParam salaryParam; String nowMonth = DateUtil.addMonth(0);
for (EkpSalaryParamVo sendParam : ekpList) { EkpSalaryParam salaryParam;
salaryParam = new EkpSalaryParam(); for (EkpSalaryParamVo sendParam : ekpList) {
BeanUtils.copyProperties(sendParam, salaryParam); salaryParam = new EkpSalaryParam();
// 转化报账表的参数 BeanUtils.copyProperties(sendParam, salaryParam);
account = new TSalaryAccount(); // 转化报账表的参数
account.setId(sendParam.getFd_3b10af838eab5c()); account = new TSalaryAccount();
// 社保 account.setId(sendParam.getFd_3b10af838eab5c());
if (Common.isNotNull(sendParam.getFd_3b16ce48a9735c()) // 社保
&& !CommonConstants.ZERO_STRING.equals(sendParam.getFd_3b16ce48a9735c())) { if (Common.isNotNull(sendParam.getFd_3b16ce48a9735c())
doSendForecastSocialToEkp(sendParam, s); && !CommonConstants.ZERO_STRING.equals(sendParam.getFd_3b16ce48a9735c())) {
} doSendForecastSocialToEkp(sendParam, s);
// 公积金 }
if (Common.isNotNull(sendParam.getFd_3b16ce4b7fc42a()) // 公积金
&& !CommonConstants.ZERO_STRING.equals(sendParam.getFd_3b16ce4b7fc42a())) { if (Common.isNotNull(sendParam.getFd_3b16ce4b7fc42a())
doSendForecastFundToEkp(sendParam, s); && !CommonConstants.ZERO_STRING.equals(sendParam.getFd_3b16ce4b7fc42a())) {
} doSendForecastFundToEkp(sendParam, s);
sendBack = ekpSalaryUtil.sendToEKP(salaryParam); }
if (Common.isEmpty(sendBack) || sendBack.length() != 32) {
sendBack = ekpSalaryUtil.sendToEKP(salaryParam); sendBack = ekpSalaryUtil.sendToEKP(salaryParam);
if (Common.isEmpty(sendBack) || sendBack.length() != 32) {
sendBack = ekpSalaryUtil.sendToEKP(salaryParam);
}
account.setSendTime(sendTime);
account.setSendUser(user.getId());
account.setSendUserName(user.getNickname());
if (Common.isNotNull(sendBack) && sendBack.length() == 32) {
account.setSendStatus(CommonConstants.ONE_STRING);
account.setSendMonth(nowMonth);
account.setEkpId(sendBack);
} else {
sendStatus = false;
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.ONE_STRING);
error.setCreateUserName(s.getCreateName());
error.setLinkId(account.getId());
error.setTitle(sendBack);
error.setNums(CommonConstants.ONE_INT);
HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
, "/tsendekperror/inner/saveError", error, Boolean.class, SecurityConstants.FROM_IN);
}
accountList.add(account);
} }
account.setSendTime(sendTime); salaryAccountService.updateBatchById(accountList);
account.setSendUser(user.getId()); if (sendStatus) {
account.setSendUserName(user.getNickname()); s.setSendTime(new Date());
if (Common.isNotNull(sendBack) && sendBack.length() == 32) { s.setSendMonth(DateUtil.addMonth(0));
account.setSendStatus(CommonConstants.ONE_STRING); s.setStatus(SalaryConstants.STATUS[3]);
account.setSendMonth(nowMonth); this.updateById(s);
account.setEkpId(sendBack); // 添加流程进展明细
this.saveRecordLog(s, user, CommonConstants.ZERO_STRING, "发送数字化平台-成功");
return R.ok("发送成功!");
} else { } else {
sendStatus = false; s.setStatus(SalaryConstants.STATUS[10]);
TSendEkpError error = new TSendEkpError(); this.updateById(s);
error.setCreateTime(new Date()); // 添加流程进展明细
error.setCreateDay(DateUtil.getThisDay()); this.saveRecordLog(s, user, CommonConstants.ONE_STRING, "发送数字化平台-失败");
error.setType(CommonConstants.ONE_STRING); return R.ok("发送失败!");
error.setCreateUserName(s.getCreateName());
error.setLinkId(account.getId());
error.setTitle(sendBack);
error.setNums(CommonConstants.ONE_INT);
HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
, "/tsendekperror/inner/saveError", error, Boolean.class, SecurityConstants.FROM_IN);
} }
accountList.add(account); }else {
} return R.ok("无数据可发送!");
salaryAccountService.updateBatchById(accountList);
if (sendStatus) {
s.setSendTime(new Date());
s.setSendMonth(DateUtil.addMonth(0));
s.setStatus(SalaryConstants.STATUS[3]);
this.updateById(s);
// 添加流程进展明细
this.saveRecordLog(s, user, CommonConstants.ZERO_STRING, "发送数字化平台-成功");
return R.ok("发送成功!");
} else {
s.setStatus(SalaryConstants.STATUS[10]);
this.updateById(s);
// 添加流程进展明细
this.saveRecordLog(s, user, CommonConstants.ONE_STRING, "发送数字化平台-失败");
return R.ok("发送失败!");
} }
} else { } else {
return R.failed("请登录!"); return R.failed("请登录!");
......
...@@ -348,9 +348,11 @@ ...@@ -348,9 +348,11 @@
SELECT SELECT
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
FROM t_salary_account a FROM t_salary_account a
LEFT JOIN t_dept_see d ON a.DEPT_NO = d.DEPT_NO
<where> <where>
a.DELETE_FLAG = 0 AND (d.CAN_SEE = 0 OR d.id is null) a.DELETE_FLAG = 0
and not EXISTS (
select 1 from t_dept_see d where a.DEPT_NO = d.DEPT_NO and d.CAN_SEE = 1
)
<include refid="tSalaryAccount_where"/> <include refid="tSalaryAccount_where"/>
<if test="tSalaryAccount.authSql != null and tSalaryAccount.authSql.trim() != ''"> <if test="tSalaryAccount.authSql != null and tSalaryAccount.authSql.trim() != ''">
${tSalaryAccount.authSql} ${tSalaryAccount.authSql}
...@@ -578,9 +580,10 @@ ...@@ -578,9 +580,10 @@
SELECT SELECT
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
FROM t_salary_account a FROM t_salary_account a
LEFT JOIN t_dept_see d ON a.DEPT_NO = d.DEPT_NO
<where> <where>
a.DELETE_FLAG = 0 AND (d.CAN_SEE = 0 OR d.id is null) a.DELETE_FLAG = 0 and not EXISTS (
select 1 from t_dept_see d where a.DEPT_NO = d.DEPT_NO and d.CAN_SEE = 1
)
<include refid="where_export"/> <include refid="where_export"/>
<if test="searchVo.authSql != null and searchVo.authSql.trim() != ''"> <if test="searchVo.authSql != null and searchVo.authSql.trim() != ''">
${searchVo.authSql} ${searchVo.authSql}
...@@ -617,9 +620,10 @@ ...@@ -617,9 +620,10 @@
SELECT SELECT
count(1) count(1)
FROM t_salary_account a FROM t_salary_account a
LEFT JOIN t_dept_see d ON a.DEPT_NO = d.DEPT_NO
<where> <where>
a.DELETE_FLAG = 0 AND (d.CAN_SEE = 0 OR d.id is null) a.DELETE_FLAG = 0 and not EXISTS (
select 1 from t_dept_see d where a.DEPT_NO = d.DEPT_NO and d.CAN_SEE = 1
)
<include refid="where_export"/> <include refid="where_export"/>
<if test="searchVo.authSql != null and searchVo.authSql.trim() != ''"> <if test="searchVo.authSql != null and searchVo.authSql.trim() != ''">
${searchVo.authSql} ${searchVo.authSql}
......
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