Commit 988c0d8d authored by hongguangwu's avatar hongguangwu

MVP1.6.4-换模板

parent d33fcb27
......@@ -5,6 +5,8 @@ import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* @Author hgw
......@@ -18,77 +20,109 @@ public class SocialSoldierYgsAddVo implements Serializable {
@ExcelIgnore
private String socialId;
//企业名称 证件类型 身份证号码 姓名 国籍 个人身份 民族 参加工作日期 工资
// 文化程度 户口性质 增员年月 户口所在地 用工形式 手机号码 通讯地址 就业登记时间 单位就业起始时间 合同期限类型
//合同起始时间 合同终止日期 录用工种代码 合同签订类别 工作时间制度 养老参保日期 工伤参保日期 失业参保日期
// 户口所在地行政区划代码 居住所在地行政区划代码 当前经办行政区划代码 补缴原因 回传信息 回传信息1 回传信息2
@ExcelProperty("企业名称")
private String socialHouseholdName;
@ExcelProperty("证件类型")
private String idCardType;
@ExcelProperty("身份证号码")
private String empIdCard;
@ExcelProperty("姓名")
@ExcelProperty("派单类型")
private String type;
@ExcelProperty("社保办理状态")
private String socialHandleStatus;
@ExcelProperty("养老状态")
private String pensionHandle;
@ExcelProperty("医疗状态")
private String medicalHandle;
@ExcelProperty("失业状态")
private String unemployHandle;
@ExcelProperty("工伤状态")
private String workInjuryHandle;
@ExcelProperty("生育状态")
private String birthHandle;
@ExcelProperty("大病状态")
private String bigailmentHandle;
@ExcelProperty("员工姓名")
private String empName;
@ExcelProperty("国籍")
private String country;
@ExcelProperty("个人身份")
private String personType;
@ExcelProperty("民族")
private String nation;
@ExcelProperty("参加工作日期")
private String workDate;
@ExcelProperty("工资")
private String recordBase;
@ExcelProperty("文化程度")
@ExcelProperty("员工身份证")
private String empIdcard;
@ExcelProperty("学历")
private String educationName;
@ExcelProperty("户口性质")
private String regisType;
@ExcelProperty("增员年月")
private String addDate;
@ExcelProperty("户口所在地")
private String fileAddr;
@ExcelProperty("用工形式")
private String contractName;
@ExcelProperty("客户名称")
private String belongUnit;
@ExcelProperty("项目名称")
private String settleDomain;
@ExcelProperty("员工类型")
private String empType;
@ExcelProperty("岗位")
private String post;
@ExcelProperty("手机号码")
private String empMobile;
@ExcelProperty("通讯地址")
private String mobileAddr;
@ExcelProperty("就业登记时间")
private String dispatchDate;
@ExcelProperty("单位就业起始时间")
private String workStartDate;
@ExcelProperty("合同期限类型")
private String contractDateType;
@ExcelProperty("身份证所在地")
private String idCardAddress;
@ExcelProperty("通信地址")
private String contactAddress;
@ExcelProperty("户口性质")
private String empRegisType;
@ExcelProperty("民族")
private String empNational;
@ExcelProperty("工时制")
private String workingHours;
@ExcelProperty("合同年限")
private String contractTerm;
@ExcelProperty("合同起始时间")
private String contractStart;
@ExcelProperty("合同终止日期")
@ExcelProperty("合同到期时间")
private String contractEnd;
@ExcelProperty("录用工种代码")
private String workCode;
@ExcelProperty("合同签订类别")
private String contractType;
@ExcelProperty("工作时间制度")
private String workingHours;
// 养老参保日期 工伤参保日期 失业参保日期
@ExcelProperty("养老参保日期")
@ExcelProperty("申请人")
private String createUserName;
@ExcelProperty("备案基数")
private String recordBase;
@ExcelProperty("缴纳类型")
private String paymentType;
@ExcelProperty("社保户")
private String socialHouseholdName;
@ExcelProperty("社保缴纳地-省")
private String socialProvince;
@ExcelProperty("社保缴纳地-市")
private String socialCity;
@ExcelProperty("社保缴纳地-县")
private String socialTown;
@ExcelProperty("养老起缴日期")
private String pensionStart;
@ExcelProperty("工伤参保日期")
private String workInjuryStart;
@ExcelProperty("失业参保日期")
;
@ExcelProperty("养老基数")
private BigDecimal unitPensionCardinal;
@ExcelProperty("医疗起缴日期")
private String medicalStart;
@ExcelProperty("医疗基数")
private BigDecimal unitMedicalCardinal;
@ExcelProperty("失业起缴日期")
private String unemployStart;
@ExcelProperty("户口所在地行政区划代码")
private String huAddr;
@ExcelProperty("居住所在地行政区划代码")
private String zhuAddr;
@ExcelProperty("当前经办行政区划代码")
private String banAddr;
@ExcelProperty("补缴原因")
private String buRemark;
@ExcelProperty("回传信息")
private String huiRemark;
@ExcelProperty("回传信息1")
private String huiRemark1;
@ExcelProperty("回传信息2")
private String huiRemark2;
@ExcelProperty("失业基数")
private BigDecimal unitUnemploymentCardinal;
@ExcelProperty("工伤起缴日期")
private String workInjuryStart;
@ExcelProperty("工伤基数")
private BigDecimal unitWorkInjuryCardinal;
@ExcelProperty("生育起缴日期")
private String birthStart;
@ExcelProperty("生育基数")
private BigDecimal unitBirthCardinal;
@ExcelProperty("大病起缴日期")
private String bigailmentStart;
@ExcelProperty("大病缴纳基数")
private BigDecimal unitBigailmentCardinal;
@ExcelProperty("单位大病金额")
private BigDecimal unitBigailmentMoney;
@ExcelProperty("个人大病金额")
private BigDecimal personalBigailmentMoney;
@ExcelProperty("委托备注")
private String socailTrustRemark;
@ExcelProperty("减少原因")
private String reduceReason;
@ExcelProperty("是否已导出")
private String exportSocialFlag;
@ExcelProperty(value = "学校")
private String schoolName;
@ExcelProperty(value = "专业")
private String major;
@ExcelProperty("毕业时间")
private Date graduationTime;
@ExcelProperty(value = "首次至缴纳地时间")
private Date firstPayTime;
}
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @Author hgw
* @Description 社保士兵养工失减少模板
* @Date 2024-5-10 21:05:29
**/
@Data
public class SocialSoldierYgsReduceVo implements Serializable {
// 社保id,用于回写
@ExcelIgnore
private String socialId;
//企业名称 姓名 身份证号码 减员原因 备案解除二级原因 备案解除三级原因 回传信息 回传信息1 回传信息2
@ExcelProperty("企业名称")
private String socialHouseholdName;
@ExcelProperty("姓名")
private String empName;
@ExcelProperty("身份证号码")
private String empIdCard;
@ExcelProperty("减员原因")
private String reduceReason;
@ExcelProperty("备案解除二级原因")
private String twoRemark;
@ExcelProperty("备案解除三级原因")
private String threeRemark;
@ExcelProperty("回传信息")
private String huiRemark;
@ExcelProperty("回传信息1")
private String huiRemark1;
@ExcelProperty("回传信息2")
private String huiRemark2;
}
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* @Author hgw
* @Description 社保士兵医生大增加模板
* @Date 2024-5-11 10:28:45
**/
@Data
public class SocialSoldierYsdAddVo implements Serializable {
// 社保id,用于回写
@ExcelIgnore
private String socialId;
//企业名称 证件类型 证件号码 姓名 民族 学历 手机号码 人员类型 申报工资
//用工形式 编制类型 参保日期 合同起止日期 原参保日期
// 基本医疗保险 大额医疗费用补助 生育保险
// 回传信息 回传信息1 回传信息2
@ExcelProperty("企业名称")
private String socialHouseholdName;
@ExcelProperty("证件类型")
private String idCardType;
@ExcelProperty("证件号码")
private String empIdCard;
@ExcelProperty("姓名")
private String empName;
@ExcelProperty("民族")
private String nation;
@ExcelProperty("学历")
private String educationName;
@ExcelProperty("手机号码")
private String empMobile;
// 人员类型:职工在职
@ExcelProperty("人员类型")
private String empType;
@ExcelProperty("申报工资")
private String recordBase;
@ExcelProperty("用工形式")
private String contractName;
// 编制类型:非在编
@ExcelProperty("编制类型")
private String bianType;
@ExcelProperty("参保日期")
private String socialDate;
// 合同起止日期:空
@ExcelProperty("合同起止日期")
private String contractDate;
// 原参保日期
@ExcelProperty("原参保日期")
private String socialDateOld;
// 基本医疗保险 大额医疗费用补助 生育保险
@ExcelProperty("基本医疗保险")
private BigDecimal unitMedicalMoney;
@ExcelProperty("大额医疗费用补助")
private BigDecimal unitBigailmentMoney;
@ExcelProperty("生育保险")
private BigDecimal unitBirthMoney;
@ExcelProperty("回传信息")
private String huiRemark;
@ExcelProperty("回传信息1")
private String huiRemark1;
@ExcelProperty("回传信息2")
private String huiRemark2;
}
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @Author hgw
* @Description 社保士兵医生大减少模板
* @Date 2024-5-11 10:28:36
**/
@Data
public class SocialSoldierYsdReduceVo implements Serializable {
// 社保id,用于回写
@ExcelIgnore
private String socialId;
//企业名称 证件类型 证件号码 姓名 中断原因 中断时间 回传信息 回传信息1 回传信息2
@ExcelProperty("企业名称")
private String socialHouseholdName;
@ExcelProperty("证件类型")
private String idCardType;
@ExcelProperty("证件号码")
private String empIdCard;
@ExcelProperty("姓名")
private String empName;
@ExcelProperty("中断原因")
private String reduceReason;
@ExcelProperty("中断时间")
private String reduceDate;
@ExcelProperty("回传信息")
private String huiRemark;
@ExcelProperty("回传信息1")
private String huiRemark1;
@ExcelProperty("回传信息2")
private String huiRemark2;
}
......@@ -46,17 +46,17 @@ public interface TSocialSoldierMapper extends BaseMapper<TSocialInfo> {
* @Author hgw
* @Date 2024-5-10 21:16:41
**/
List<SocialSoldierYgsReduceVo> getSocialSoldierYgsReduceVoList(@Param("idsStr") List<String> idsStr);
List<SocialSoldierYgsAddVo> getSocialSoldierYgsReduceVoList(@Param("idsStr") List<String> idsStr);
/**
* 社保士兵养工失增加模板
* @Author hgw
* @Date 2024-5-10 21:16:41
**/
List<SocialSoldierYsdAddVo> getSocialSoldierYsdAddVoList(@Param("idsStr") List<String> idsStr);
List<SocialSoldierYgsAddVo> getSocialSoldierYsdAddVoList(@Param("idsStr") List<String> idsStr);
/**
* 社保士兵养工失增加模板
* @Author hgw
* @Date 2024-5-10 21:16:41
**/
List<SocialSoldierYsdReduceVo> getSocialSoldierYsdReduceVoList(@Param("idsStr") List<String> idsStr);
List<SocialSoldierYgsAddVo> getSocialSoldierYsdReduceVoList(@Param("idsStr") List<String> idsStr);
}
......@@ -3607,6 +3607,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (CommonConstants.THREE_STRING.equals(auditStatus)){
// 自动化处理
if (CommonConstants.ZERO_STRING.equals(autoFlag)){
dis.setSocialHandleStatus(CommonConstants.FOUR_STRING);
dis.setAutoFlag(CommonConstants.ZERO_STRING);
socialTask.pushSoldier(dis.getId());
}else {
......
......@@ -28,9 +28,6 @@ import com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialSoldierMapper;
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.SocialSoldierYgsAddVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYgsReduceVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYsdAddVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYsdReduceVo;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.apache.commons.compress.utils.IOUtils;
......@@ -44,7 +41,6 @@ import org.springframework.web.multipart.commons.CommonsMultipartFile;
import java.io.*;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
......@@ -101,11 +97,11 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
return R.ok("推送成功!");
}
public MultipartFile getFile(Collection<?> list, Class head) {
public MultipartFile getFile(List<SocialSoldierYgsAddVo> list) {
File file = null;
if (list != null) {
String filePath = "socialFile" + DateUtil.getThisTime() + CommonConstants.XLSX;
EasyExcelFactory.write(filePath, head).sheet("社保明细").doWrite(list);
EasyExcelFactory.write(filePath, SocialSoldierYgsAddVo.class).sheet("社保明细").doWrite(list);
file = new File(filePath);
}
if (file != null) {
......@@ -151,52 +147,52 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
socialInfo.setId(vo.getSocialId());
socialIdList.add(socialInfo);
}
MultipartFile file = this.getFile(ygsAddlist, SocialSoldierYgsAddVo.class);
MultipartFile file = this.getFile(ygsAddlist);
if (Common.isNotNull(file)) {
this.getOneAppGetModuleDetail(socialIdList, file, "社保增员");
}
}
// 养工失减少列表
List<SocialSoldierYgsReduceVo> ygsReducelist = baseMapper.getSocialSoldierYgsReduceVoList(dispatchIdList);
List<SocialSoldierYgsAddVo> ygsReducelist = baseMapper.getSocialSoldierYgsReduceVoList(dispatchIdList);
if (ygsReducelist != null && !ygsReducelist.isEmpty()) {
List<TSocialInfo> socialIdList = new ArrayList<>();
TSocialInfo socialInfo;
for (SocialSoldierYgsReduceVo vo : ygsReducelist) {
for (SocialSoldierYgsAddVo vo : ygsReducelist) {
socialInfo = new TSocialInfo();
socialInfo.setId(vo.getSocialId());
socialIdList.add(socialInfo);
}
MultipartFile file = this.getFile(ygsReducelist, SocialSoldierYgsReduceVo.class);
MultipartFile file = this.getFile(ygsReducelist);
if (Common.isNotNull(file)) {
this.getOneAppGetModuleDetail(socialIdList, file, "社保减员");
}
}
// 医生大新增列表
List<SocialSoldierYsdAddVo> ysdAddlist = baseMapper.getSocialSoldierYsdAddVoList(dispatchIdList);
List<SocialSoldierYgsAddVo> ysdAddlist = baseMapper.getSocialSoldierYsdAddVoList(dispatchIdList);
if (ysdAddlist != null && !ysdAddlist.isEmpty()) {
List<TSocialInfo> socialIdList = new ArrayList<>();
TSocialInfo socialInfo;
for (SocialSoldierYsdAddVo vo : ysdAddlist) {
for (SocialSoldierYgsAddVo vo : ysdAddlist) {
socialInfo = new TSocialInfo();
socialInfo.setId(vo.getSocialId());
socialIdList.add(socialInfo);
}
MultipartFile file = this.getFile(ysdAddlist, SocialSoldierYsdAddVo.class);
MultipartFile file = this.getFile(ysdAddlist);
if (Common.isNotNull(file)) {
this.getOneAppGetModuleDetail(socialIdList, file, "医保增员");
}
}
// 医生大减少列表
List<SocialSoldierYsdReduceVo> ysdReducelist = baseMapper.getSocialSoldierYsdReduceVoList(dispatchIdList);
List<SocialSoldierYgsAddVo> ysdReducelist = baseMapper.getSocialSoldierYsdReduceVoList(dispatchIdList);
if (ysdReducelist != null && !ysdReducelist.isEmpty()) {
List<TSocialInfo> socialIdList = new ArrayList<>();
TSocialInfo socialInfo;
for (SocialSoldierYsdReduceVo vo : ysdReducelist) {
for (SocialSoldierYgsAddVo vo : ysdReducelist) {
socialInfo = new TSocialInfo();
socialInfo.setId(vo.getSocialId());
socialIdList.add(socialInfo);
}
MultipartFile file = this.getFile(ysdReducelist, SocialSoldierYsdReduceVo.class);
MultipartFile file = this.getFile(ysdReducelist);
if (Common.isNotNull(file)) {
this.getOneAppGetModuleDetail(socialIdList, file, "医保减员");
}
......
......@@ -449,6 +449,8 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
} else if (CommonConstants.THREE_STRING.equals(failConfig.getReplay())) {
ygsHandleStatus = CommonConstants.FIVE_STRING;
}
} else {
ygsHandleStatus = CommonConstants.FIVE_STRING;
}
}
}
......@@ -485,6 +487,8 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
} else if (CommonConstants.THREE_STRING.equals(failConfig.getReplay())) {
ysdHandleStatus = CommonConstants.FIVE_STRING;
}
} else {
ysdHandleStatus = CommonConstants.FIVE_STRING;
}
}
}
......
......@@ -23,54 +23,88 @@
<mapper namespace="com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialSoldierMapper">
<!-- 社保士兵养工失增加模板-->
<select id="getSocialSoldierYgsAddVoList" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYgsAddVo">
<!-- 社保士兵基本查询-->
<sql id="getSocialSoldierBase" >
SELECT
s.id as socialId,
a.SOCIAL_HOUSEHOLD_NAME socialHouseholdName,
'居民身份证(户口簿)' idCardType,
a.EMP_IDCARD empIdCard,
if(a.TYPE='0','派增','派减') type,
case a.SOCIAL_HANDLE_STATUS when '0' then '未办理' when '1' then '全部办理成功' when '2' then '全部办理失败' when '3' then '部分办理成功' when '4' then '办理中' else '-' end socialHandleStatus,
case if(ifnull(h.id,0) != '0',h.PENSION_HANDLE,s.PENSION_HANDLE) when '0' then '派增待办理' when '1' then '派增办理成功' when '2' then '派增办理失败' when '3' then '派减-已派减' when '4' then '派减失败' when '5' then '派减待办理' else '——' end pensionHandle,
case if(ifnull(h.id,0) != '0',h.MEDICAL_HANDLE,s.MEDICAL_HANDLE) when '0' then '派增待办理' when '1' then '派增办理成功' when '2' then '派增办理失败' when '3' then '派减-已派减' when '4' then '派减失败' when '5' then '派减待办理' else '——' end medicalHandle,
case if(ifnull(h.id,0) != '0',h.UNEMPLOY_HANDLE,s.UNEMPLOY_HANDLE) when '0' then '派增待办理' when '1' then '派增办理成功' when '2' then '派增办理失败' when '3' then '派减-已派减' when '4' then '派减失败' when '5' then '派减待办理' else '——' end unemployHandle,
case if(ifnull(h.id,0) != '0',h.WORK_INJURY_HANDLE,s.WORK_INJURY_HANDLE) when '0' then '派增待办理' when '1' then '派增办理成功' when '2' then '派增办理失败' when '3' then '派减-已派减' when '4' then '派减失败' when '5' then '派减待办理' else '——' end workInjuryHandle,
case if(ifnull(h.id,0) != '0',h.BIRTH_HANDLE,s.BIRTH_HANDLE) when '0' then '派增待办理' when '1' then '派增办理成功' when '2' then '派增办理失败' when '3' then '派减-已派减' when '4' then '派减失败' when '5' then '派减待办理' else '——' end birthHandle,
case if(ifnull(h.id,0) != '0',h.BIGAILMENT_HANDLE,s.BIGAILMENT_HANDLE) when '0' then '派增待办理' when '1' then '派增办理成功' when '2' then '派增办理失败' when '3' then '派减-已派减' when '4' then '派减失败' when '5' then '派减待办理' else '——' end bigailmentHandle,
a.EMP_NAME empName,
'中国' country,
'职员' personType,
nation.label nation,
DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m%d') workDate,
s.RECORD_BASE recordBase,
EDUCATION_NAME educationName,
registype.label regisType,
DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m%d') addDate,
a.FILE_ADDR fileAddr,
a.CONTRACT_NAME contractName,
a.EMP_IDCARD empIdcard,
a.EDUCATION_NAME educationName,
a.BELONG_UNIT_NAME belongUnit,
a.SETTLE_DOMAIN_NAME settleDomain,
emp_natrue.label empType,
a.POST post,
a.EMP_MOBILE empMobile,
a.FILE_ADDR mobileAddr,
DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m%d') dispatchDate,
DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m%d') workStartDate,
a.CONTRACT_NAME contractDateType,
DATE_FORMAT(a.CONTRACT_START,'%Y%m%d') contractStart,
DATE_FORMAT(a.CONTRACT_END,'%Y%m%d') contractEnd,
'办事人员' workCode,
'新签' contractType,
case when a.WORKING_HOURS = 1 then '标准工时'
when a.WORKING_HOURS = 2 then '综合工时'
when a.WORKING_HOURS = 3 then '不定时工时制'
else '-' end as workingHours ,
DATE_FORMAT(s.PENSION_START,'%Y%m%d') pensionStart,
DATE_FORMAT(s.WORK_INJURY_START,'%Y%m%d') workInjuryStart,
DATE_FORMAT(s.UNEMPLOY_START,'%Y%m%d') unemployStart,
a.FILE_ADDR huAddr,
a.FILE_ADDR zhuAddr,
a.FILE_ADDR banAddr,
'' buRemark,
'' huiRemark,
'' huiRemark1,
'' huiRemark2
a.ID_CARD_ADDRESS idCardAddress,
a.CONTACT_ADDRESS contactAddress,
registype.label regisType,
nation.label empNational,
workingHours.label workingHours,
a.CONTRACT_TERM contractTerm,
s.SOCIAL_START_DATE contractStart,
a.CONTRACT_END contractEnd,
a.CREATE_NAME createUserName,
s.RECORD_BASE recordBase,
case s.PAYMENT_TYPE when '0' then '最低' when '1' then '自定义' when '2' then '最高' else '-' end paymentType,
a.SOCIAL_HOUSEHOLD_NAME socialHouseholdName,
if(ifnull(h.id,0) != '0',sp1.AREA_NAME,sp2.AREA_NAME) socialProvince,
if(ifnull(h.id,0) != '0',sc1.AREA_NAME,sc2.AREA_NAME) socialCity,
if(ifnull(h.id,0) != '0',st1.AREA_NAME,st2.AREA_NAME) socialTown,
if(ifnull(h.id,0) != '0',h.PENSION_START,s.PENSION_START) pensionStart,
if(ifnull(h.id,0) != '0',h.UNIT_PENSION_CARDINAL,s.UNIT_PENSION_CARDINAL) unitPensionCardinal,
if(ifnull(h.id,0) != '0',h.MEDICAL_START,s.MEDICAL_START) medicalStart,
if(ifnull(h.id,0) != '0',h.UNIT_MEDICAL_CARDINAL,s.UNIT_MEDICAL_CARDINAL) unitMedicalCardinal,
if(ifnull(h.id,0) != '0',h.UNEMPLOY_START,s.UNEMPLOY_START) unemployStart,
if(ifnull(h.id,0) != '0',h.UNIT_UNEMPLOYMENT_CARDINAL,s.UNIT_UNEMPLOYMENT_CARDINAL) unitUnemploymentCardinal,
if(ifnull(h.id,0) != '0',h.WORK_INJURY_START,s.WORK_INJURY_START) workInjuryStart,
if(ifnull(h.id,0) != '0',h.UNIT_WORK_INJURY_CARDINAL,s.UNIT_WORK_INJURY_CARDINAL) unitWorkInjuryCardinal,
if(ifnull(h.id,0) != '0',h.BIRTH_START,s.BIRTH_START) birthStart,
if(ifnull(h.id,0) != '0',h.UNIT_BIRTH_CARDINAL,s.UNIT_BIRTH_CARDINAL) unitBirthCardinal,
if(ifnull(h.id,0) != '0',h.BIGAILMENT_START,s.BIGAILMENT_START) bigailmentStart,
if(ifnull(h.id,0) != '0',h.UNIT_BIGAILMENT_CARDINAL,s.UNIT_BIGAILMENT_CARDINAL) unitBigailmentCardinal,
if(ifnull(h.id,0) != '0',h.UNIT_BIGAILMENT_MONEY,s.UNIT_BIGAILMENT_MONEY) unitBigailmentMoney,
if(ifnull(h.id,0) != '0',h.PERSONAL_BIGAILMENT_MONEY,s.PERSONAL_BIGAILMENT_MONEY) personalBigailmentMoney,
a.TRUST_REMARK socailTrustRemark,
reduceReason.label reduceReason,
'1' as exportSocialFlag,
a.SCHOOL_NAME schoolName,
a.MAJOR major,
a.FIRST_PAY_TIME graduationTime,
a.GRADUATION_TIME firstPayTime
FROM t_dispatch_info a
left join t_social_info s on a.SOCIAL_ID = s.id
left join t_dispatch_social_fund_info h on a.id = h.REDUCE_SOCIAL_FUND_ID
left join view_sys_dict_item nation on nation.value=a.EMP_NATIONAL and nation.type='emp_national'
left join view_sys_dict_item emp_natrue on emp_natrue.value=a.EMP_TYPE and emp_natrue.type='emp_natrue'
left join view_sys_dict_item registype on registype.value=a.EMP_REGIS_TYPE and registype.type='emp_registype'
left join view_sys_dict_item nation on nation.value=a.EMP_NATIONAL and nation.type='emp_national'
left join view_sys_dict_item workingHours on workingHours.value=a.EMP_NATIONAL and workingHours.type='working_hours'
left join view_sys_dict_item reduceReason on reduceReason.value=a.EMP_NATIONAL and reduceReason.type='social_reduce_reason'
left join sys_area sp1 on sp1.id = h.SOCIAL_PROVINCE
left join sys_area sp2 on sp2.id = s.SOCIAL_PROVINCE
left join sys_area sc1 on sc1.id = h.SOCIAL_CITY
left join sys_area sc2 on sc2.id = s.SOCIAL_CITY
left join sys_area st1 on st1.id = h.SOCIAL_TOWN
left join sys_area st2 on st2.id = s.SOCIAL_TOWN
<include refid="where_getSocialSoldier_base_handler"/>
</sql>
<!-- 社保士兵养工失增加模板-->
<select id="getSocialSoldierYgsAddVoList" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYgsAddVo">
<include refid="getSocialSoldierBase"/>
and a.type = '0'
and (
if(ifnull(h.id,0) != '0',h.PENSION_HANDLE,s.PENSION_HANDLE) = '0' or
if(ifnull(h.id,0) != '0',h.WORK_INJURY_HANDLE,s.WORK_INJURY_HANDLE) = '0' or
if(ifnull(h.id,0) != '0',h.UNEMPLOY_HANDLE,s.UNEMPLOY_HANDLE) = '0'
)
</select>
<sql id="where_getSocialSoldier_base_handler">
......@@ -93,77 +127,36 @@
</sql>
<!-- 社保士兵养工失减少模板-->
<select id="getSocialSoldierYgsReduceVoList" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYgsReduceVo">
SELECT
s.id as socialId,
a.SOCIAL_HOUSEHOLD_NAME socialHouseholdName,
a.EMP_NAME empName,
a.EMP_IDCARD empIdCard,
reduceReason.label reduceReason,
'' twoRemark,
'' threeRemark,
'' huiRemark,
'' huiRemark1,
'' huiRemark2
FROM t_dispatch_info a
left join t_social_info s on a.SOCIAL_ID = s.id
left join t_dispatch_social_fund_info h on a.id = h.REDUCE_SOCIAL_FUND_ID
left join view_sys_dict_item reduceReason on reduceReason.value=a.REDUCE_REASON and reduceReason.type='social_reduce_reason'
<include refid="where_getSocialSoldier_base_handler"/>
<select id="getSocialSoldierYgsReduceVoList" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYgsAddVo">
<include refid="getSocialSoldierBase"/>
and a.type = '1'
and (
if(ifnull(h.id,0) != '0',h.PENSION_HANDLE,s.PENSION_HANDLE) = '5' or
if(ifnull(h.id,0) != '0',h.WORK_INJURY_HANDLE,s.WORK_INJURY_HANDLE) = '5' or
if(ifnull(h.id,0) != '0',h.UNEMPLOY_HANDLE,s.UNEMPLOY_HANDLE) = '5'
)
</select>
<!-- 社保士兵医生大增加模板-->
<select id="getSocialSoldierYsdAddVoList" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYsdAddVo">
SELECT
s.id as socialId,
a.SOCIAL_HOUSEHOLD_NAME socialHouseholdName,
'居民身份证(户口簿)' idCardType,
a.EMP_IDCARD empIdCard,
a.EMP_NAME empName,
nation.label nation,
EDUCATION_NAME educationName,
a.EMP_MOBILE empMobile,
'职工在职' empType,
s.RECORD_BASE recordBase,
a.CONTRACT_NAME contractName,
'非在编' bianType,
DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m%d') socialDate,
'' contractDate,
DATE_FORMAT(s.SOCIAL_START_DATE,'%Y%m%d') socialDateOld,
s.UNIT_MEDICAL_MONEY unitMedicalMoney,
s.UNIT_BIGAILMENT_MONEY unitBigailmentMoney,
s.UNIT_BIRTH_MONEY unitBirthMoney,
'' huiRemark,
'' huiRemark1,
'' huiRemark2
FROM t_dispatch_info a
left join t_social_info s on a.SOCIAL_ID = s.id
left join t_dispatch_social_fund_info h on a.id = h.REDUCE_SOCIAL_FUND_ID
left join view_sys_dict_item nation on nation.value=a.EMP_NATIONAL and nation.type='emp_national'
<include refid="where_getSocialSoldier_base_handler"/>
<select id="getSocialSoldierYsdAddVoList" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYgsAddVo">
<include refid="getSocialSoldierBase"/>
and a.type = '0'
and (
if(ifnull(h.id,0) != '0',h.MEDICAL_HANDLE,s.MEDICAL_HANDLE) = '0' or
if(ifnull(h.id,0) != '0',h.BIRTH_HANDLE,s.BIRTH_HANDLE) = '0' or
if(ifnull(h.id,0) != '0',h.BIGAILMENT_HANDLE,s.BIGAILMENT_HANDLE) = '0'
)
</select>
<!-- 社保士兵医生大减少模板-->
<select id="getSocialSoldierYsdReduceVoList" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYsdReduceVo">
SELECT
s.id as socialId,
a.SOCIAL_HOUSEHOLD_NAME socialHouseholdName,
'居民身份证(户口簿)' idCardType,
a.EMP_IDCARD empIdCard,
a.EMP_NAME empName,
reduceReason.label reduceReason,
DATE_FORMAT(a.LEAVE_DATE,'%Y%m%d') reduceDate,
'' huiRemark,
'' huiRemark1,
'' huiRemark2
FROM t_dispatch_info a
left join t_social_info s on a.SOCIAL_ID = s.id
left join t_dispatch_social_fund_info h on a.id = h.REDUCE_SOCIAL_FUND_ID
left join view_sys_dict_item reduceReason on reduceReason.value=a.REDUCE_REASON and reduceReason.type='social_reduce_reason'
<include refid="where_getSocialSoldier_base_handler"/>
<select id="getSocialSoldierYsdReduceVoList" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYgsAddVo">
<include refid="getSocialSoldierBase"/>
and a.type = '1'
and (
if(ifnull(h.id,0) != '0',h.MEDICAL_HANDLE,s.MEDICAL_HANDLE) = '5' or
if(ifnull(h.id,0) != '0',h.BIRTH_HANDLE,s.BIRTH_HANDLE) = '5' or
if(ifnull(h.id,0) != '0',h.BIGAILMENT_HANDLE,s.BIGAILMENT_HANDLE) = '5'
)
</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