Commit 6b763454 authored by fangxinjiang's avatar fangxinjiang

有工资无社保消息优化

parent a3282b83
......@@ -111,12 +111,12 @@ public class THaveSalaryNosocial extends BaseEntity {
private String settlementOrganNo;
/**
* 结算月
* 生成月--- 生成数据的月份 删除用
*/
@Length(max = 10, message = "结算月不能超过10个字符")
@ExcelAttribute(name = "结算月", maxLength = 10, needExport = true)
@Schema(description = "结算月", name = "settleMonth")
private String settleMonth;
@Length(max = 10, message = "生成月不能超过10个字符")
@ExcelAttribute(name = "生成月", maxLength = 10, needExport = true)
@Schema(description = "生成月", name = "createMonth")
private String createMonth;
/**
......
......@@ -117,7 +117,7 @@ public class THaveSalaryNosocialServiceImpl extends ServiceImpl<THaveSalaryNosoc
@Override
public void generate(String salaryMonth) {
//重新跑上月数据
this.remove(Wrappers.<THaveSalaryNosocial>query().lambda().eq(THaveSalaryNosocial::getMonth,salaryMonth));
this.remove(Wrappers.<THaveSalaryNosocial>query().lambda().eq(THaveSalaryNosocial::getCreateMonth,salaryMonth));
List<THaveSalaryNosocial> haveSalaryNosocialList = salaryAccountService.getLastMonthTHaveSalaryNosocial(salaryMonth);
if(!Common.isNotEmpty(haveSalaryNosocialList)){
log.error("获取有社保无工资数据为空");
......@@ -126,7 +126,13 @@ public class THaveSalaryNosocialServiceImpl extends ServiceImpl<THaveSalaryNosoc
//去缴费库查询查询这些人社保是否存在
Map<String, TPaymentInfo> empPaymentInfoMap=Maps.newHashMap();
R<HaveSalaryNoSocialVo> noSocialVoR = socialDaprUtils.getPaymentinfoListByEmpdIdCard(Common.listObjectToStrList(haveSalaryNosocialList, "employeeIdCard"), salaryMonth);
if (Common.isNotNull(noSocialVoR)&& Common.isNotNull(noSocialVoR.getData())) {
if (Common.isEmpty(noSocialVoR) || noSocialVoR.getCode() == CommonConstants.FAIL){
log.error("获取社保公积金信息失败");
return;
}
if (Common.isNotNull(noSocialVoR)
&& Common.isNotNull(noSocialVoR.getData())
&& Common.isNotNull(noSocialVoR.getData().getPaymentInfos())) {
for (TPaymentInfo paymentInfo : noSocialVoR.getData().getPaymentInfos()) {
empPaymentInfoMap.put(paymentInfo.getEmpIdcard(),paymentInfo);
}
......@@ -134,6 +140,10 @@ public class THaveSalaryNosocialServiceImpl extends ServiceImpl<THaveSalaryNosoc
//结算主体
R<TSettleDomainListVo> domainListVoR = archivesDaprUtil.selectAllSettleDomainSelectVos();
HashMap<String, TSettleDomainSelectVo> settleDomainSelectVoMap = Maps.newHashMap();
if (Common.isEmpty(domainListVoR) || domainListVoR.getCode() == CommonConstants.FAIL){
log.error("获取项目信息失败");
return;
}
if (Common.isNotNull(domainListVoR)
&& Common.isNotNull(domainListVoR.getData())
&& Common.isNotNull(domainListVoR.getData().getListSelectVO()))
......@@ -163,6 +173,7 @@ public class THaveSalaryNosocialServiceImpl extends ServiceImpl<THaveSalaryNosoc
haveSalaryNosocial.setCreateBy(allUserDTOMap.get(haveSalaryNosocial.getCreateBy()));
}
haveSalaryNosocial.setCreateTime(LocalDateTime.now());
haveSalaryNosocial.setCreateMonth(salaryMonth);
this.save(haveSalaryNosocial);
}
......
......@@ -209,6 +209,7 @@
LEFT JOIN t_salary_account_item i ON i.SALARY_ACCOUNT_ID = a.id and i.JAVA_FIED_NAME = 'actualSalarySum'
LEFT JOIN t_salary_account_item l ON l.SALARY_ACCOUNT_ID = a.id and l.JAVA_FIED_NAME = 'relaySalary'
WHERE
(t.`STATUS`=1 or t.id is null) and (c.`STATUS`=1 or c.id is null) and
a.DELETE_FLAG = 0
and a.FORM_TYPE='0'
and a.SALARY_MONTH = #{settleMonth}
......
......@@ -37,7 +37,7 @@
a.SETTLEMENT_ORGAN_NAME,
a.SETTLEMENT_ORGAN_NO,
a.month,
a.SETTLE_MONTH,
a.CREATE_MONTH,
a.relay_salary,
a.FEED_BACK,
a.CREATE_NAME,
......@@ -75,8 +75,8 @@
<if test="tHaveSalaryNosocial.month != null">
AND a.month = #{tHaveSalaryNosocial.month}
</if>
<if test="tHaveSalaryNosocial.settleMonth != null">
AND a.SETTLE_MONTH = #{tHaveSalaryNosocial.settleMonth}
<if test="tHaveSalaryNosocial.createMonth != null">
AND a.CREATE_MONTH = #{tHaveSalaryNosocial.createMonth}
</if>
<if test="tHaveSalaryNosocial.createName != null">
AND a.CREATE_NAME = #{tHaveSalaryNosocial.createName}
......@@ -205,7 +205,7 @@
,b.*
FROM t_have_salary_nosocial a
left join t_feed_back b on a.ID=b.RELATE_ID
where a.SETTLE_MONTH in(#{lastOneMonth},#{lastTwoMonth},#{lastThreeMonth}) and b.REASON_TYPE is not null
where a.CREATE_MONTH in(#{lastOneMonth},#{lastTwoMonth},#{lastThreeMonth}) and b.REASON_TYPE is not null
</select>
<select id="noPageDiy" resultMap="haveSalaryNoSocialExportMap">
......
......@@ -387,7 +387,7 @@
, a.EMP_IDCARD employee_id_card
, a.EMP_NAME employee_name
, GROUP_CONCAT(a.relaySalary) relay_salary
, a.CREATE_BY CREATE_USER_ID
, a.CREATE_BY CREATE_BY
, GROUP_CONCAT(a.SALARY_MONTH) month
, a.EMP_NAME employee_name
, a.EMP_IDCARD employee_id_card
......@@ -395,6 +395,7 @@
, a.DEPT_NAME SETTLEMENT_ORGAN_NAME
, a.DEPT_NO SETTLEMENT_ORGAN_NO
, a.SETTLEMENT_MONTH SETTLE_MONTH
,a.CREATE_NAME,a.CREATE_TIME
from (
select a.id
, s.DEPT_ID
......@@ -411,6 +412,7 @@
, sum(if(item.JAVA_FIED_NAME in
('unitSocial', 'personalSocial', 'withholidingUnitSocial', 'withholidingPersonSocial'),
item.SALARY_MONEY, 0)) social
,a.CREATE_NAME,a.CREATE_TIME
from mvp_salary.t_salary_account a
left join mvp_salary.t_salary_account_item item on item.SALARY_ACCOUNT_ID = a.id
LEFT JOIN mvp_salary.t_salary_standard s on a.SALARY_FORM_ID = s.id
......
......@@ -282,7 +282,7 @@ public class UserController {
* @return
**/
@Inner
@GetMapping(value = {"/inner/getAllUserName"})
@PostMapping(value = {"/inner/getAllUserName"})
public AllUserNaVo getAllUserDTO() {
AllUserNaVo naVo = new AllUserNaVo();
List<SysUser> sysUsers = userService.list(Wrappers.<SysUser>query().lambda());
......
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