Commit 82c98e4b authored by hongguangwu's avatar hongguangwu

MVP1.6.5-工资申报+工资调整的推送

parent 5c22143a
......@@ -197,7 +197,7 @@ public class SocialTask {
/**
* @Description: 3每日定时任务推送社保士兵审核结果查询
* @Author: hgw
* @Date: 2022/7/27 19:39
* @Date: 2024-5-30 17:33:35
* @return: void
**/
public void doInnerPushSoldierByAudit() {
......@@ -209,7 +209,7 @@ public class SocialTask {
/**
* @Description: 4每日定时任务获取社保士兵审核结果查询
* @Author: hgw
* @Date: 2022/7/27 19:39
* @Date: 2024-5-30 17:33:35
* @return: void
**/
public void doInnerGetSixJobByAudit() {
......@@ -218,4 +218,16 @@ public class SocialTask {
log.info("------------4每日定时任务获取社保士兵审核结果查询-定时任务结束------------");
}
/**
* @Description: 5每月5号推送工资申报、调整(实缴使用)
* @Author: hgw
* @Date: 2024-5-30 17:33:35
* @return: void
**/
public void doInnerPushSalaryByShenBao() {
log.info("------------5每月5号推送工资申报、调整(实缴使用)-定时任务开始------------");
HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tsocialsoldier/inner/doInnerPushSalaryByShenBao","", Object.class, SecurityConstants.FROM_IN);
log.info("------------5每月5号推送工资申报、调整(实缴使用)-定时任务结束------------");
}
}
......@@ -31,16 +31,16 @@ import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
/**
* 社保自动化审核提交后的审核结果查询记录表
* 社保工资申报、调整推送的记录表
*
* @author hgw
* @date 2024-05-23 17:40:37
* @date 2024-5-30 09:53:57
*/
@Data
@TableName("t_social_auto_audit_task")
@TableName("t_social_soldier_shen_bao_task")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "社保自动化审核提交后的审核结果查询记录表")
public class TSocialAutoAuditTask extends BaseEntity {
@Schema(description = "社保工资申报、调整推送记录表")
public class TSocialSoldierShenBaoTask extends BaseEntity {
/**
* id
......@@ -50,22 +50,22 @@ public class TSocialAutoAuditTask extends BaseEntity {
@Schema(description = "id")
private String id;
/**
* 审核查询的任务ID
* 推送的任务ID
*/
@ExcelAttribute(name = "审核查询的任务ID", isNotEmpty = true, errorInfo = "审核查询的任务ID不能为空", maxLength = 32)
@NotBlank(message = "审核查询的任务ID不能为空")
@Length(max = 32, message = "审核查询的任务ID不能超过32个字符")
@ExcelProperty("审核查询的任务ID")
@Schema(description = "审核查询的任务ID")
private String auditId;
@ExcelAttribute(name = "推送的任务ID", isNotEmpty = true, errorInfo = "推送的任务ID不能为空", maxLength = 32)
@NotBlank(message = "推送的任务ID不能为空")
@Length(max = 32, message = "推送的任务ID不能超过32个字符")
@ExcelProperty("推送的任务ID")
@Schema(description = "推送的任务ID")
private String addId;
/**
* 1养工失;2医生大
* 1申报;2调整
*/
@ExcelAttribute(name = "1养工失;2医生大", isNotEmpty = true, errorInfo = "1养工失;2医生大不能为空", maxLength = 1)
@NotBlank(message = "1养工失;2医生大不能为空")
@Length(max = 1, message = "1养工失;2医生大不能超过1个字符")
@ExcelProperty("1养工失;2医生大")
@Schema(description = "1养工失;2医生大")
@ExcelAttribute(name = "1申报;2调整", isNotEmpty = true, errorInfo = "1申报;2调整", maxLength = 1)
@NotBlank(message = "1申报;2调整不能为空")
@Length(max = 1, message = "1申报;2调整不能超过1个字符")
@ExcelProperty("1申报;2调整")
@Schema(description = "1申报;2调整")
private String type;
}
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @Author hgw
* @Description 社保士兵实缴前置-工资申报
* @Date 2024-5-29 18:20:26
**/
@Data
public class SocialSoldierSalaryShenBaoVo implements Serializable {
// #单位编号 单位名称 *姓名 *身份证件类型代码 *身份证件号码 分组 原申报工资 *新缴费工资 养老保险缴费工资
// #失业保险险缴费工资 医疗保险缴费工资 大额医疗补助缴费工资 工伤保险缴费工资 申报方式 回传信息
@ExcelProperty("单位编号")
private String companyNo;
@ExcelProperty("单位名称")
private String companyName;
@ExcelProperty("*姓名")
private String empName;
@ExcelProperty("*身份证件类型代码")
private String empIdCardType;
@ExcelProperty("*身份证件号码")
private String empIdCard;
@ExcelProperty("分组")
private String fenZu;
@ExcelProperty("原申报工资")
private String oldSalary;
@ExcelProperty("*新缴费工资")
private String newSalary;
@ExcelProperty("养老保险缴费工资")
private String yangLao;
@ExcelProperty("失业保险险缴费工资")
private String shiYe;
@ExcelProperty("医疗保险缴费工资")
private String yiLiao;
@ExcelProperty("大额医疗补助缴费工资")
private String daBing;
@ExcelProperty("工伤保险缴费工资")
private String gongShang;
@ExcelProperty("申报方式")
private String shenBaoType;
@ExcelProperty("回传信息")
private String returnInfo;
}
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @Author hgw
* @Description 社保士兵实缴前置-工资调整
* @Date 2024-5-29 18:20:26
**/
@Data
public class SocialSoldierSalaryTiaoZhengVo implements Serializable {
// 单位编号 单位名称 生效年份 *姓名 *身份证件类型代码 *身份证件号码 分组 原申报工资 *新缴费工资 养老保险缴费工资
// 失业保险险缴费工资 医疗保险缴费工资 工伤保险缴费工资 申报方式 回传信息
@ExcelProperty("单位编号")
private String companyNo;
@ExcelProperty("单位名称")
private String companyName;
@ExcelProperty("生效年份")
private String shengXiaoYear;
@ExcelProperty("*姓名")
private String empName;
@ExcelProperty("*身份证件类型代码")
private String empIdCardType;
@ExcelProperty("*身份证件号码")
private String empIdCard;
@ExcelProperty("分组")
private String fenZu;
@ExcelProperty("原申报工资")
private String oldSalary;
@ExcelProperty("*新缴费工资")
private String newSalary;
@ExcelProperty("养老保险缴费工资")
private String yangLao;
@ExcelProperty("失业保险险缴费工资")
private String shiYe;
@ExcelProperty("医疗保险缴费工资")
private String yiLiao;
@ExcelProperty("工伤保险缴费工资")
private String gongShang;
@ExcelProperty("申报方式")
private String shenBaoType;
@ExcelProperty("回传信息")
private String returnInfo;
}
......@@ -117,6 +117,8 @@ public class SocialConfig {
sheMap.put("社保减员", sheBaoArrObj.getString("value"));
} else if ("审核数据查询".equals(sheBaoArrObj.get("label"))) {
sheMap.put("审核数据查询", sheBaoArrObj.getString("value"));
} else if ("社保批量调基文件下载".equals(sheBaoArrObj.get("label"))) {
sheMap.put("社保批量调基文件下载", sheBaoArrObj.getString("value"));
}
}
} else if ("医保".equals(childrenArrObj.get("label"))) {
......@@ -129,6 +131,20 @@ public class SocialConfig {
sheMap.put("医保减员", sheBaoArrObj.getString("value"));
} else if ("审核数据信息查询".equals(sheBaoArrObj.get("label"))) {
sheMap.put("审核数据信息查询", sheBaoArrObj.getString("value"));
} else if ("单位缴费明细查询".equals(sheBaoArrObj.get("label"))) {
sheMap.put("单位缴费明细查询", sheBaoArrObj.getString("value"));
}
}
} else if ("社保费管理客户端".equals(childrenArrObj.get("label"))) {
sheBaoArr = (JSONArray) childrenArrObj.get("children");
for (int k = 0; k<sheBaoArr.size(); k++) {
sheBaoArrObj = (JSONObject) sheBaoArr.get(k);
if ("年度缴费工资申报".equals(sheBaoArrObj.get("label"))) {
sheMap.put("年度缴费工资申报", sheBaoArrObj.getString("value"));
} else if ("年度缴费工资调整".equals(sheBaoArrObj.get("label"))) {
sheMap.put("年度缴费工资调整", sheBaoArrObj.getString("value"));
} else if ("日常申报导出".equals(sheBaoArrObj.get("label"))) {
sheMap.put("日常申报导出", sheBaoArrObj.getString("value"));
}
}
}
......
......@@ -121,10 +121,24 @@ public class TSocialSoldierController {
**/
@Operation(description = "4每日定时任务获取社保士兵审核结果查询")
@PostMapping("/inner/doInnerGetSixJobByAudit")
@SysLog("3每日定时任务获取社保士兵审核结果查询")
@SysLog("4每日定时任务获取社保士兵审核结果查询")
@Inner
public R<String> doInnerGetSixJobByAudit() {
return tSocialSoldierService.getSixJobByAudit();
}
/**
* @Description: 5推送工资申报、调整(实缴使用)
* @Author: hgw
* @Date: 2024-5-30 17:32:43
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Operation(description = "5每月5号推送工资申报、调整(实缴使用)")
@PostMapping("/inner/doInnerPushSalaryByShenBao")
@SysLog("5每月5号推送工资申报、调整(实缴使用)")
@Inner
public R<String> doInnerPushSalaryByShenBao() {
return tSocialSoldierPushService.pushSalaryByShenBao();
}
}
......@@ -79,5 +79,20 @@ public interface TSocialSoldierMapper extends BaseMapper<TSocialInfo> {
**/
List<SocialSoldierYsdAuditVo> getSocialSoldierYsdAddAuditVoList();
/**
* @Description: 工资申报
* @Author: hgw
* @Date: 2024/5/29 18:32
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierSalaryShenBaoVo>
**/
List<SocialSoldierSalaryShenBaoVo> getSoldierSalaryByShenBaoList();
/**
* @Description: 工资调整
* @Author: hgw
* @Date: 2024/5/29 18:32
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierSalaryShenBaoVo>
**/
List<SocialSoldierSalaryTiaoZhengVo> getSoldierSalaryByTiaoZhengList();
}
......@@ -18,7 +18,7 @@
package com.yifu.cloud.plus.v1.yifu.social.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialAutoAuditTask;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialSoldierShenBaoTask;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -31,12 +31,12 @@ import java.util.List;
* @date 2024-05-23 17:40:37
*/
@Mapper
public interface TSocialAutoAuditTaskMapper extends BaseMapper<TSocialAutoAuditTask> {
public interface TSocialSoldierShenBaoTaskMapper extends BaseMapper<TSocialSoldierShenBaoTask> {
/**
* 社保自动化审核提交后的审核结果查询记录表简单分页查询
*
* @param tSocialAutoAuditTask 社保自动化审核提交后的审核结果查询记录表
* @param tSocialSoldierShenBaoTask 社保自动化审核提交后的审核结果查询记录表
* @return
*/
List<TSocialAutoAuditTask> getTSocialAutoAuditTaskList(@Param("tSocialAutoAuditTask") TSocialAutoAuditTask tSocialAutoAuditTask);
List<TSocialSoldierShenBaoTask> getTSocialSoldierShenBaoTaskList(@Param("tSocialSoldierShenBaoTask") TSocialSoldierShenBaoTask tSocialSoldierShenBaoTask);
}
......@@ -58,4 +58,12 @@ public interface TSocialSoldierPushService extends IService<TSocialInfo> {
**/
R<String> pushSoldierByAudit();
/**
* @Description: 推送工资申报、调整(实缴使用)
* @Author: hgw
* @Date: 2024-5-29 17:47:10
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R<String> pushSalaryByShenBao();
}
......@@ -18,7 +18,7 @@
package com.yifu.cloud.plus.v1.yifu.social.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialAutoAuditTask;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialSoldierShenBaoTask;
import java.util.List;
......@@ -28,12 +28,12 @@ import java.util.List;
* @author hgw
* @date 2024-05-23 17:40:37
*/
public interface TSocialAutoAuditTaskService extends IService<TSocialAutoAuditTask> {
public interface TSocialSoldierShenBaoTaskService extends IService<TSocialSoldierShenBaoTask> {
/**
* 社保自动化审核提交后的审核结果查询记录表简单分页查询
*
* @param tSocialAutoAuditTask 社保自动化审核提交后的审核结果查询记录表
* @param tSocialSoldierShenBaoTask 社保自动化审核提交后的审核结果查询记录表
* @return
*/
List<TSocialAutoAuditTask> getTSocialAutoAuditTaskList(TSocialAutoAuditTask tSocialAutoAuditTask);
List<TSocialSoldierShenBaoTask> getTSocialSoldierShenBaoTaskList(TSocialSoldierShenBaoTask tSocialSoldierShenBaoTask);
}
......@@ -25,16 +25,13 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.social.config.SocialConfig;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialAutoAuditTask;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialSoldierShenBaoTask;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialSoldierMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialAutoAuditTaskService;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialSoldierShenBaoTaskService;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialInfoService;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialSoldierPushService;
import com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierSetVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYgsAddVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYgsAuditVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYsdAuditVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.*;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.apache.commons.compress.utils.IOUtils;
......@@ -47,10 +44,7 @@ import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.commons.CommonsMultipartFile;
import java.io.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
* 社保士兵-推送
......@@ -66,7 +60,7 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
private RestTemplate restTemplate = new RestTemplate();
private final SocialConfig socialConfig;
private final TSocialInfoService tSocialInfoService;
private final TSocialAutoAuditTaskService tSocialAutoAuditTaskService;
private final TSocialSoldierShenBaoTaskService tSocialSoldierShenBaoTaskService;
/**
* @param socialList
......@@ -298,6 +292,29 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
return R.ok("推送成功!!");
}
/**
* @Description: 推送审核结果的查询
* @Author: hgw
* @Date: 2024/5/23 18:09
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
public R<String> getOneAppGetModuleDetailByShenBao(TSocialSoldierShenBaoTask task, MultipartFile file, String type) {
// 1获取模板id——社保增员、社保减员、医保增员、医保减员
Map<String, String> moduleDetailMap = socialConfig.getOneModuleDetailMap(restTemplate);
if (moduleDetailMap != null && !moduleDetailMap.isEmpty() && moduleDetailMap.get(type) != null) {
// 2获取机器id
String terminalId = socialConfig.getTwoTerminalId(restTemplate, moduleDetailMap.get(type));
if (Common.isNotNull(terminalId)) {
// 3上传文件,获取文件地址
String fileAddUrl = socialConfig.getThreeTerminalId(restTemplate, file);
// 4 推送办理任务,返回任务id:
String addId = socialConfig.getFourAppAdd(restTemplate, fileAddUrl, moduleDetailMap.get(type), terminalId);
task.setAddId(addId);
tSocialSoldierShenBaoTaskService.save(task);
}
}
return R.ok("推送成功!");
}
/**
* @Description: 推送审核结果的查询
* @Author: hgw
......@@ -328,6 +345,22 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
return R.ok("推送成功!");
}
/**
* @Description: 组装社保与医保的文件流
* @Author: hgw
* @Date: 2024/5/23 17:59
* @return: org.springframework.web.multipart.MultipartFile
**/
public MultipartFile getFile(List list, Class clazz, String sheetName) {
String fileName = "soldierFile" + DateUtil.getThisTime() + new Date().getTime() + CommonConstants.XLSX;
if (list != null) {
EasyExcelFactory.write(fileName, clazz).sheet(sheetName).doWrite(list);
File file = new File(fileName);
return getMultipartFile(file);
}
return null;
}
/**
* @Description: 组装社保与医保的文件流
* @Author: hgw
......@@ -345,4 +378,42 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
return getMultipartFile(file);
}
/**
* @Description: 推送社保士兵工资申报、调整
* @Author: hgw
* @Date: 2024-5-23 18:02:27
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Override
public R<String> pushSalaryByShenBao() {
// 养工失待审核列表
List<SocialSoldierSalaryShenBaoVo> shenBaolist = baseMapper.getSoldierSalaryByShenBaoList();
log.info("工资申报列表="+shenBaolist);
String sheetName = "年度缴费工资申报";
if (shenBaolist != null && !shenBaolist.isEmpty()) {
MultipartFile file = this.getFile(shenBaolist, SocialSoldierSalaryShenBaoVo.class, sheetName);
if (Common.isNotNull(file)) {
TSocialSoldierShenBaoTask task = new TSocialSoldierShenBaoTask();
task.setType(CommonConstants.ONE_STRING);
this.getOneAppGetModuleDetailByShenBao(task, file, sheetName);
}
}
// 养工失待审核列表
List<SocialSoldierSalaryTiaoZhengVo> tiaoZhenglist = baseMapper.getSoldierSalaryByTiaoZhengList();
log.info("工资调整列表="+tiaoZhenglist);
sheetName = "年度缴费工资调整";
if (tiaoZhenglist != null && !tiaoZhenglist.isEmpty()) {
MultipartFile file = this.getFile(tiaoZhenglist, SocialSoldierSalaryTiaoZhengVo.class, sheetName);
if (Common.isNotNull(file)) {
TSocialSoldierShenBaoTask task = new TSocialSoldierShenBaoTask();
task.setType(CommonConstants.TWO_STRING);
this.getOneAppGetModuleDetailByShenBao(task, file, sheetName);
}
}
if (shenBaolist == null || tiaoZhenglist == null) {
return R.failed("无数据,推送结束!");
}
return R.ok("推送成功!!");
}
}
......@@ -52,7 +52,6 @@ import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.text.DecimalFormat;
import java.util.*;
import java.util.zip.ZipEntry;
......
......@@ -17,9 +17,9 @@
package com.yifu.cloud.plus.v1.yifu.social.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialAutoAuditTask;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialAutoAuditTaskMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialAutoAuditTaskService;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialSoldierShenBaoTask;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialSoldierShenBaoTaskMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialSoldierShenBaoTaskService;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
......@@ -33,16 +33,16 @@ import java.util.List;
*/
@Log4j2
@Service
public class TSocialAutoAuditTaskServiceImpl extends ServiceImpl<TSocialAutoAuditTaskMapper, TSocialAutoAuditTask> implements TSocialAutoAuditTaskService {
public class TSocialSoldierShenBaoTaskServiceImpl extends ServiceImpl<TSocialSoldierShenBaoTaskMapper, TSocialSoldierShenBaoTask> implements TSocialSoldierShenBaoTaskService {
/**
* 社保自动化审核提交后的审核结果查询记录表简单分页查询
*
* @param tSocialAutoAuditTask 社保自动化审核提交后的审核结果查询记录表
* @param tSocialSoldierShenBaoTask 社保自动化审核提交后的审核结果查询记录表
* @return
*/
@Override
public List<TSocialAutoAuditTask> getTSocialAutoAuditTaskList(TSocialAutoAuditTask tSocialAutoAuditTask) {
return baseMapper.getTSocialAutoAuditTaskList(tSocialAutoAuditTask);
public List<TSocialSoldierShenBaoTask> getTSocialSoldierShenBaoTaskList(TSocialSoldierShenBaoTask tSocialSoldierShenBaoTask) {
return baseMapper.getTSocialSoldierShenBaoTaskList(tSocialSoldierShenBaoTask);
}
}
......@@ -221,4 +221,63 @@
group by s.id
</select>
<!-- 工资申报 -->
<select id="getSoldierSalaryByShenBaoList" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierSalaryShenBaoVo">
select
a.companyNo,a.companyName,a.empName,a.empIdCardType,a.empIdCard,a.fenZu,a.oldSalary
,a.newSalary,a.yangLao,a.shiYe,a.yiLiao,a.daBing,a.gongShang,a.shenBaoType,a.returnInfo
from (
select
'' companyNo,s.SOCIAL_HOUSEHOLD_NAME companyName,s.EMP_NAME empName,'201 - 居民身份证' empIdCardType
,s.EMP_IDCARD empIdCard,'' fenZu,'' oldSalary,s.RECORD_BASE newSalary,s.UNIT_PENSION_CARDINAL yangLao
,s.UNIT_UNEMPLOYMENT_CARDINAL shiYe,s.UNIT_MEDICAL_CARDINAL yiLiao,s.UNIT_BIGAILMENT_CARDINAL daBing
,s.UNIT_WORK_INJURY_CARDINAL gongShang,'按人申报' shenBaoType,'1' returnInfo
from t_social_info s
left join t_dispatch_info d on s.id=d.SOCIAL_ID
where DATE_FORMAT(d.CREATE_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and s.HANDLE_STATUS in ('1','5','6','7') and d.type = '0' and DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m') <![CDATA[ < ]]> DATE_FORMAT(now(),'%Y%m')
union all
select
'' companyNo,s.SOCIAL_HOUSEHOLD_NAME companyName,s.EMP_NAME empName,'201 - 居民身份证' empIdCardType
,s.EMP_IDCARD empIdCard,'' fenZu,'' oldSalary,s.RECORD_BASE newSalary,s.UNIT_PENSION_CARDINAL yangLao
,s.UNIT_UNEMPLOYMENT_CARDINAL shiYe,s.UNIT_MEDICAL_CARDINAL yiLiao,s.UNIT_BIGAILMENT_CARDINAL daBing
,s.UNIT_WORK_INJURY_CARDINAL gongShang,'按人申报' shenBaoType,'2' returnInfo
from t_social_info s
left join t_dispatch_info d on s.id=d.SOCIAL_ID
where DATE_FORMAT(d.CREATE_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and s.HANDLE_STATUS = '3' and d.type = '0' and DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m') <![CDATA[ < ]]> DATE_FORMAT(now(),'%Y%m')
) a GROUP BY a.empIdCard
</select>
<!-- 工资调整 -->
<select id="getSoldierSalaryByTiaoZhengList" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierSalaryTiaoZhengVo">
select
a.companyNo,a.companyName,a.shengXiaoYear,a.empName,a.empIdCardType,a.empIdCard,a.fenZu,a.oldSalary
,a.newSalary,a.yangLao,a.shiYe,a.yiLiao,a.gongShang,a.shenBaoType,a.returnInfo
from (
select
'' companyNo,s.SOCIAL_HOUSEHOLD_NAME companyName,'' shengXiaoYear,s.EMP_NAME empName,'201 - 居民身份证' empIdCardType
,s.EMP_IDCARD empIdCard,'' fenZu,'' oldSalary,s.RECORD_BASE newSalary,s.UNIT_PENSION_CARDINAL yangLao
,s.UNIT_UNEMPLOYMENT_CARDINAL shiYe,s.UNIT_MEDICAL_CARDINAL yiLiao
,s.UNIT_WORK_INJURY_CARDINAL gongShang,'按人申报' shenBaoType,'1' returnInfo
from t_social_info s
left join t_dispatch_info d on s.id=d.SOCIAL_ID
where DATE_FORMAT(d.CREATE_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and s.HANDLE_STATUS in ('1','5','6','7') and d.type = '0'
and DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m') <![CDATA[ < ]]> DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 YEAR),'%Y12')
union all
select
'' companyNo,s.SOCIAL_HOUSEHOLD_NAME companyName,'' shengXiaoYear,s.EMP_NAME empName,'201 - 居民身份证' empIdCardType
,s.EMP_IDCARD empIdCard,'' fenZu,'' oldSalary,s.RECORD_BASE newSalary,s.UNIT_PENSION_CARDINAL yangLao
,s.UNIT_UNEMPLOYMENT_CARDINAL shiYe,s.UNIT_MEDICAL_CARDINAL yiLiao
,s.UNIT_WORK_INJURY_CARDINAL gongShang,'按人申报' shenBaoType,'2' returnInfo
from t_social_info s
left join t_dispatch_info d on s.id=d.SOCIAL_ID
where DATE_FORMAT(d.CREATE_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and s.HANDLE_STATUS = '3' and d.type = '0'
and DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m') <![CDATA[ < ]]> DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 YEAR),'%Y12')
) a GROUP BY a.empIdCard
</select>
</mapper>
......@@ -21,11 +21,11 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialAutoAuditTaskMapper">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialSoldierShenBaoTaskMapper">
<resultMap id="tSocialAutoAuditTaskMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.TSocialAutoAuditTask">
<resultMap id="tSocialSoldierShenBaoTaskMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.TSocialSoldierShenBaoTask">
<id property="id" column="ID"/>
<result property="auditId" column="AUDIT_ID"/>
<result property="addId" column="ADD_ID"/>
<result property="type" column="TYPE"/>
<result property="createBy" column="CREATE_BY"/>
<result property="updateBy" column="UPDATE_BY"/>
......@@ -35,7 +35,7 @@
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.AUDIT_ID,
a.ADD_ID,
a.TYPE,
a.CREATE_BY,
a.UPDATE_BY,
......@@ -43,42 +43,42 @@
a.UPDATE_TIME,
a.CREATE_TIME
</sql>
<sql id="tSocialAutoAuditTask_where">
<if test="tSocialAutoAuditTask != null">
<if test="tSocialAutoAuditTask.id != null and tSocialAutoAuditTask.id.trim() != ''">
AND a.ID = #{tSocialAutoAuditTask.id}
<sql id="tSocialSoldierShenBaoTask_where">
<if test="tSocialSoldierShenBaoTask != null">
<if test="tSocialSoldierShenBaoTask.id != null and tSocialSoldierShenBaoTask.id.trim() != ''">
AND a.ID = #{tSocialSoldierShenBaoTask.id}
</if>
<if test="tSocialAutoAuditTask.auditId != null and tSocialAutoAuditTask.auditId.trim() != ''">
AND a.AUDIT_ID = #{tSocialAutoAuditTask.auditId}
<if test="tSocialSoldierShenBaoTask.addId != null and tSocialSoldierShenBaoTask.addId.trim() != ''">
AND a.ADD_ID = #{tSocialSoldierShenBaoTask.addId}
</if>
<if test="tSocialAutoAuditTask.type != null and tSocialAutoAuditTask.type.trim() != ''">
AND a.TYPE = #{tSocialAutoAuditTask.type}
<if test="tSocialSoldierShenBaoTask.type != null and tSocialSoldierShenBaoTask.type.trim() != ''">
AND a.TYPE = #{tSocialSoldierShenBaoTask.type}
</if>
<if test="tSocialAutoAuditTask.createBy != null and tSocialAutoAuditTask.createBy.trim() != ''">
AND a.CREATE_BY = #{tSocialAutoAuditTask.createBy}
<if test="tSocialSoldierShenBaoTask.createBy != null and tSocialSoldierShenBaoTask.createBy.trim() != ''">
AND a.CREATE_BY = #{tSocialSoldierShenBaoTask.createBy}
</if>
<if test="tSocialAutoAuditTask.updateBy != null and tSocialAutoAuditTask.updateBy.trim() != ''">
AND a.UPDATE_BY = #{tSocialAutoAuditTask.updateBy}
<if test="tSocialSoldierShenBaoTask.updateBy != null and tSocialSoldierShenBaoTask.updateBy.trim() != ''">
AND a.UPDATE_BY = #{tSocialSoldierShenBaoTask.updateBy}
</if>
<if test="tSocialAutoAuditTask.createName != null and tSocialAutoAuditTask.createName.trim() != ''">
AND a.CREATE_NAME = #{tSocialAutoAuditTask.createName}
<if test="tSocialSoldierShenBaoTask.createName != null and tSocialSoldierShenBaoTask.createName.trim() != ''">
AND a.CREATE_NAME = #{tSocialSoldierShenBaoTask.createName}
</if>
<if test="tSocialAutoAuditTask.updateTime != null">
AND a.UPDATE_TIME = #{tSocialAutoAuditTask.updateTime}
<if test="tSocialSoldierShenBaoTask.updateTime != null">
AND a.UPDATE_TIME = #{tSocialSoldierShenBaoTask.updateTime}
</if>
<if test="tSocialAutoAuditTask.createTime != null">
AND a.CREATE_TIME = #{tSocialAutoAuditTask.createTime}
<if test="tSocialSoldierShenBaoTask.createTime != null">
AND a.CREATE_TIME = #{tSocialSoldierShenBaoTask.createTime}
</if>
</if>
</sql>
<!--list-->
<select id="getTSocialAutoAuditTaskList" resultMap="tSocialAutoAuditTaskMap">
<select id="getTSocialSoldierShenBaoTaskList" resultMap="tSocialSoldierShenBaoTaskMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_social_auto_audit_task a
FROM t_social_soldier_shen_bao_task a
<where>
1=1
<include refid="tSocialAutoAuditTask_where"/>
<include refid="tSocialSoldierShenBaoTask_where"/>
</where>
</select>
</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