Commit d9905ac0 authored by huyuchen's avatar huyuchen

派单导出修改

parent 7c29007d
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
/**
* 派单导出Vo
* @author huyc
* @date 2022-10-25 10:40:34
*/
@Data
@Schema(description = "派单审核导出Vo")
public class TDispatchAuditExportVo {
@ExcelAttribute(name = "员工姓名", maxLength = 50)
@Schema(description = "员工姓名")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("员工姓名")
private String empName;
@ExcelAttribute(name = "身份证号", maxLength = 20)
@Schema(description = "身份证号")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("身份证号")
private String empIdcard;
@ExcelAttribute(name = "员工类型", isDataId = true, dataType = ExcelAttributeConstants.EMP_NATRUE)
@Schema(description = "员工类型")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("员工类型")
private String empType;
@ExcelAttribute(name = "客户名称", maxLength = 50)
@Schema(description = "客户名称")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("客户名称")
private String belongUnitName;
@ExcelAttribute(name = "项目名称", maxLength = 50)
@Schema(description = "项目名称")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("项目名称")
private String settleDomainName;
@ExcelAttribute(name = "派单类型", readConverterExp = "0=增加派单,1=减少派单")
@Schema(description = "派单类型:0派增1派减")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("派单类型")
private String type;
@ExcelAttribute(name = "社保户", maxLength = 50)
@Schema(description = "社保户")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保户")
private String socialHouseholdName;
@ExcelAttribute(name = "公积金户", maxLength = 50)
@Schema(description = "公积金户")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("公积金户")
private String providentHouseholdName;
/**
* 合同起始时间
*/
@ExcelAttribute(name = "合同起始时间", isDate = true)
@Schema(description = "合同起始时间" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("合同起始时间" )
private Date contractStart;
/**
* 合同类型(字典值)
*/
@ExcelAttribute(name = "合同类型",maxLength = 10)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="合同类型")
private String contractName;
/**
* 合同到期时间
*/
@ExcelAttribute(name = "合同到期时间", isDate = true)
@Schema(description = "合同到期时间" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("合同到期时间" )
private Date contractEnd;
@Schema(description = "创建人姓名")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("创建人姓名")
private String createName;
@Schema(description = "创建时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
/**
* 委托备注
*/
@Length(max = 100, message = "委托备注 不能超过100个字符" )
@ExcelAttribute(name = "委托备注", maxLength = 100)
@Schema(description = "委托备注" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("委托备注" )
private String trustRemark;
/**
* 备案基数
*/
@Length(max = 255, message = "备案基数 不能超过255 个字符" )
@ExcelAttribute(name = "备案基数", maxLength = 255)
@Schema(description = "备案基数" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("备案基数" )
private String recordBase;
/**
* 工时制:1标准工时 2 综合工时 3不定时工时制
*/
@Length(max = 1, message = "工时制 不能超过1个字符" )
@ExcelAttribute(name = "工时制", maxLength = 1, readConverterExp = "1=标准工时,2=综合工时,3=不定时工时制")
@Schema(description = "工时制:1标准工时 2 综合工时 3不定时工时制" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("工时制" )
private String workingHours;
@ExcelAttribute(name = "缴纳类型", readConverterExp = "0=最低,1=自定义,2=最高")
@Schema(description = "缴纳类型(0最低、1自定义、2最高)")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("缴纳类型")
private String paymentType;
/**
* 离职日期
*/
@ExcelAttribute(name = "离职日期", isDate = true)
@Schema(description = "离职日期" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("离职日期" )
private Date leaveDate;
/**
* 减少原因
*/
@ExcelAttribute(name = "减少原因",isNotEmpty = true, isDataId = true,dataType = ExcelAttributeConstants.REDUCE_SOCIAL_REASON)
@Schema(description = "减少原因" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("减少原因" )
private String reduceReason;
/**
* 社保停缴日期
*/
@ExcelAttribute(name = "社保停缴日期", isDate = true)
@Schema(description = "社保停缴日期" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保停缴日期" )
private Date socialReduceDate;
/**
* 公积金停缴日期
*/
@ExcelAttribute(name = "公积金停缴日期", isDate = true)
@Schema(description = "公积金停缴日期" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("公积金停缴日期" )
private Date fundReduceDate;
/**
* 单位养老基数
*/
@ExcelAttribute(name = "单位养老基数" )
@Schema(description = "单位养老基数" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位养老基数" )
private BigDecimal unitPensionCardinal;
/**
* 单位医疗基数
*/
@ExcelAttribute(name = "单位医疗基数" )
@Schema(description = "单位医疗基数" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位医疗基数" )
private BigDecimal unitMedicalCardinal;
/**
* 个人养老基数
*/
@ExcelAttribute(name = "个人养老基数" )
@Schema(description = "个人养老基数" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人养老基数" )
private BigDecimal personalPensionCardinal;
/**
* 个人医疗基数
*/
@ExcelAttribute(name = "个人医疗基数" )
@Schema(description = "个人医疗基数" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人医疗基数" )
private BigDecimal personalMedicalCardinal;
/**
* 个人失业基数
*/
@ExcelAttribute(name = "个人失业基数" )
@Schema(description = "个人失业基数" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人失业基数" )
private BigDecimal personalUnemploymentCardinal;
/**
* 单位失业基数
*/
@ExcelAttribute(name = "单位失业基数" )
@Schema(description = "单位失业基数" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位失业基数" )
private BigDecimal unitUnemploymentCardinal;
/**
* 单位工伤基数
*/
@ExcelAttribute(name = "单位工伤基数" )
@Schema(description = "单位工伤基数" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位工伤基数" )
private BigDecimal unitWorkInjuryCardinal;
/**
* 单位生育基数
*/
@ExcelAttribute(name = "单位生育基数" )
@Schema(description = "单位生育基数" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位生育基数" )
private BigDecimal unitBirthCardinal;
/**
* 单位大病救助金额
*/
@ExcelAttribute(name = "单位大病金额" )
@Schema(description = "单位大病金额" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位大病金额" )
private BigDecimal unitBigailmentMoney;
/**
* 个人大病金额
*/
@ExcelAttribute(name = "个人大病金额" )
@Schema(description = "个人大病金额" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人大病金额" )
private BigDecimal personalBigailmentMoney;
/**
* 单位公积金缴纳基数
*/
@NotBlank(message = "单位公积金缴纳基数 不能为空" )
@ExcelAttribute(name = "单位公积金缴纳基数", isNotEmpty = true, errorInfo = "单位公积金缴纳基数 不能为空" )
@Schema(description = "单位公积金缴纳基数" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位公积金缴纳基数" )
private BigDecimal unitProvidengCardinal;
/**
* 个人公积金缴纳基数
*/
@NotBlank(message = "个人公积金缴纳基数 不能为空" )
@ExcelAttribute(name = "个人公积金缴纳基数", isNotEmpty = true, errorInfo = "个人公积金缴纳基数 不能为空" )
@Schema(description = "个人公积金缴纳基数" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人公积金缴纳基数" )
private BigDecimal personalProvidentCardinal;
/**
* 单位公积金缴纳比例
*/
@ExcelAttribute(name = "单位公积金缴纳比例" )
@Schema(description = "单位公积金缴纳比例" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位公积金缴纳比例" )
private BigDecimal unitProvidentPer;
/**
* 个人公积金缴纳比例
*/
@ExcelAttribute(name = "个人公积金缴纳比例" )
@Schema(description = "个人公积金缴纳比例" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人公积金缴纳比例" )
private BigDecimal personalProvidentPer;
}
...@@ -336,6 +336,29 @@ public class TDispatchInfoController { ...@@ -336,6 +336,29 @@ public class TDispatchInfoController {
tDispatchInfoService.listExport(response,searchVo); tDispatchInfoService.listExport(response,searchVo);
} }
/**
* 派单审核记录批量导出
* @author huyc
* @date 2022-10-25 15:01:56
**/
@Operation(description = "导出派单审核记录 hasPermission('tdispatchinfo-export')")
@PostMapping("/auditExport")
@PreAuthorize("@pms.hasPermission('tdispatchinfo-export')")
public void auditExport(HttpServletResponse response, @RequestBody TDispatchInfoSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, searchVo);
if (Common.isNotNull(searchVo.getAuthSql())) {
if (searchVo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
searchVo.setAuthSql(searchVo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "a.SETTLE_DOMAIN"));
}
if (searchVo.getAuthSql().contains("1=2 EXISTS")) {
searchVo.setAuthSql(searchVo.getAuthSql().replace("1=2 EXISTS", "EXISTS"));
}
}
searchVo.setCreateBy(user.getId());
tDispatchInfoService.listAuditExport(response,searchVo);
}
/** /**
* 派单信息记录表 批量导入-派减 * 派单信息记录表 批量导入-派减
* *
......
...@@ -52,6 +52,13 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> { ...@@ -52,6 +52,13 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> {
**/ **/
List<TDispatchInfoExportVo> exportDispatch(@Param("tDispatchInfo") TDispatchInfoSearchVo tDispatchInfo); List<TDispatchInfoExportVo> exportDispatch(@Param("tDispatchInfo") TDispatchInfoSearchVo tDispatchInfo);
/**
* @Description: 派单审核导出
* @Author: huyc
* @Date: 2022/10/22 14:45
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchAuditExportVo>
**/
List<TDispatchAuditExportVo> exportAuditDispatch(@Param("tDispatchInfo") TDispatchInfoSearchVo tDispatchInfo);
/** /**
* 导出社保花名册数据查询 * 导出社保花名册数据查询
......
...@@ -52,6 +52,8 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> { ...@@ -52,6 +52,8 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
void listExport(HttpServletResponse response, TDispatchInfoSearchVo searchVo); void listExport(HttpServletResponse response, TDispatchInfoSearchVo searchVo);
void listAuditExport(HttpServletResponse response, TDispatchInfoSearchVo searchVo);
List<TDispatchInfo> noPageDiy(TDispatchInfoSearchVo searchVo); List<TDispatchInfo> noPageDiy(TDispatchInfoSearchVo searchVo);
@Transactional @Transactional
......
...@@ -193,6 +193,65 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -193,6 +193,65 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
} }
} }
@Override
public void listAuditExport(HttpServletResponse response, TDispatchInfoSearchVo searchVo) {
String fileName = "派单审核导出" + DateUtil.getThisTime() + CommonConstants.XLSX;
//获取要导出的列表
List<TDispatchAuditExportVo> list = new ArrayList<>();
long count = noPageCountDiy(searchVo);
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, TDispatchAuditExportVo.class).includeColumnFiledNames(searchVo.getExportFields()).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = exportAuditDispatch(searchVo);
if (Common.isNotNull(list)) {
ExcelUtil<TDispatchAuditExportVo> util = new ExcelUtil<>(TDispatchAuditExportVo.class);
for (TDispatchAuditExportVo vo : list) {
util.convertEntity(vo, null, null, null);
}
}
if (Common.isNotNull(list)) {
WriteSheet writeSheet = EasyExcel.writerSheet("派单审核" + index).build();
excelWriter.write(list, writeSheet);
index++;
}
i = i + CommonConstants.EXCEL_EXPORT_LIMIT;
if (Common.isNotNull(list)) {
list.clear();
}
}
} else {
WriteSheet writeSheet = EasyExcel.writerSheet("派单审核" + index).build();
excelWriter.write(list, writeSheet);
}
if (Common.isNotNull(list)) {
list.clear();
}
out.flush();
excelWriter.finish();
} catch (Exception e) {
log.error("执行异常", e);
} finally {
try {
if (null != out) {
out.close();
}
} catch (IOException e) {
log.error("执行异常", e);
}
}
}
@Override @Override
public List<TDispatchInfo> noPageDiy(TDispatchInfoSearchVo searchVo) { public List<TDispatchInfo> noPageDiy(TDispatchInfoSearchVo searchVo) {
LambdaQueryWrapper<TDispatchInfo> wrapper = buildQueryWrapper(searchVo); LambdaQueryWrapper<TDispatchInfo> wrapper = buildQueryWrapper(searchVo);
...@@ -219,6 +278,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -219,6 +278,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return baseMapper.exportDispatch(searchVo); return baseMapper.exportDispatch(searchVo);
} }
private List<TDispatchAuditExportVo> exportAuditDispatch(TDispatchInfoSearchVo searchVo) {
return baseMapper.exportAuditDispatch(searchVo);
}
private Long noPageCountDiy(TDispatchInfoSearchVo searchVo) { private Long noPageCountDiy(TDispatchInfoSearchVo searchVo) {
LambdaQueryWrapper<TDispatchInfo> wrapper = buildQueryWrapper(searchVo); LambdaQueryWrapper<TDispatchInfo> wrapper = buildQueryWrapper(searchVo);
List<String> idList; List<String> idList;
...@@ -229,12 +292,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -229,12 +292,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
idList = searchVo.getIdList(); idList = searchVo.getIdList();
wrapper.in(TDispatchInfo::getId, idList); wrapper.in(TDispatchInfo::getId, idList);
} }
if (Common.isNotNull(searchVo.getCreateTimeStart())) {
wrapper.ge(TDispatchInfo::getCreateTime, searchVo.getCreateTimeStart());
}
if (Common.isNotNull(searchVo.getCreateTimeEnd())) {
wrapper.le(TDispatchInfo::getCreateTime, searchVo.getCreateTimeEnd());
}
wrapper.eq(TDispatchInfo::getDeleteFlag, CommonConstants.STATUS_NORMAL); wrapper.eq(TDispatchInfo::getDeleteFlag, CommonConstants.STATUS_NORMAL);
return baseMapper.selectCount(wrapper); return baseMapper.selectCount(wrapper);
} }
......
...@@ -133,7 +133,6 @@ ...@@ -133,7 +133,6 @@
<result property="createTime" column="CREATE_TIME"/> <result property="createTime" column="CREATE_TIME"/>
</resultMap> </resultMap>
<resultMap id="fundSupplementaryMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.FundSupplementaryExportVo"> <resultMap id="fundSupplementaryMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.FundSupplementaryExportVo">
<result property="providentStart" column="PROVIDENT_START"/> <result property="providentStart" column="PROVIDENT_START"/>
<result property="unitProvidengCardinal" column="UNIT_PROVIDENG_CARDINAL"/> <result property="unitProvidengCardinal" column="UNIT_PROVIDENG_CARDINAL"/>
...@@ -145,6 +144,47 @@ ...@@ -145,6 +144,47 @@
<result property="empName" column="EMP_NAME"/> <result property="empName" column="EMP_NAME"/>
</resultMap> </resultMap>
<!-- 派单审核导出vo -->
<resultMap id="exportAuditMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchAuditExportVo">
<result property="empName" column="EMP_NAME"/>
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="empType" column="EMP_TYPE"/>
<result property="belongUnitName" column="BELONG_UNIT_NAME"/>
<result property="settleDomainName" column="SETTLE_DOMAIN_NAME"/>
<result property="type" column="TYPE"/>
<result property="socialHouseholdName" column="SOCIAL_HOUSEHOLD_NAME"/>
<result property="providentHouseholdName" column="PROVIDENT_HOUSEHOLD_NAME"/>
<result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="contractStart" column="CONTRACT_START"/>
<result property="contractEnd" column="CONTRACT_END"/>
<result property="trustRemark" column="TRUST_REMARK"/>
<result property="contractName" column="CONTRACT_NAME"/>
<result property="workingHours" column="WORKING_HOURS"/>
<result property="socialReduceDate" column="SOCIAL_REDUCE_DATE"/>
<result property="fundReduceDate" column="FUND_REDUCE_DATE"/>
<result property="leaveDate" column="LEAVE_DATE"/>
<result property="reduceReason" column="REDUCE_REASON"/>
<result property="paymentType" column="PAYMENT_TYPE"/>
<result property="recordBase" column="RECORD_BASE"/>
<result property="unitPensionCardinal" column="UNIT_PENSION_CARDINAL"/>
<result property="unitMedicalCardinal" column="UNIT_MEDICAL_CARDINAL"/>
<result property="unitUnemploymentCardinal" column="UNIT_UNEMPLOYMENT_CARDINAL"/>
<result property="unitWorkInjuryCardinal" column="UNIT_WORK_INJURY_CARDINAL"/>
<result property="unitBirthCardinal" column="UNIT_BIRTH_CARDINAL"/>
<result property="personalPensionCardinal" column="PERSONAL_PENSION_CARDINAL"/>
<result property="personalMedicalCardinal" column="PERSONAL_MEDICAL_CARDINAL"/>
<result property="personalUnemploymentCardinal" column="PERSONAL_UNEMPLOYMENT_CARDINAL"/>
<result property="personalBigailmentMoney" column="PERSONAL_BIGAILMENT_MONEY"/>
<result property="unitBigailmentMoney" column="UNIT_BIGAILMENT_MONEY"/>
<result property="unitProvidengCardinal" column="UNIT_PROVIDENG_CARDINAL"/>
<result property="personalProvidentCardinal" column="PERSONAL_PROVIDENT_CARDINAL"/>
<result property="unitProvidentPer" column="UNIT_PROVIDENT_PER"/>
<result property="personalProvidentPer" column="PERSONAL_PROVIDENT_PER"/>
</resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
a.EMP_ID, a.EMP_ID,
...@@ -434,6 +474,66 @@ ...@@ -434,6 +474,66 @@
</if> </if>
</if> </if>
</sql> </sql>
<sql id="tDispatchInfoAudit_where">
<if test="tDispatchInfo != null">
<if test="tDispatchInfo.idList != null and tDispatchInfo.idList.size >0">
AND a.ID in
<foreach item="idStr" index="index" collection="tDispatchInfo.idList" open="(" separator="," close=")">
#{idStr}
</foreach>
</if>
<if test="tDispatchInfo.empName != null and tDispatchInfo.empName.trim() != ''">
AND a.EMP_NAME = #{tDispatchInfo.empName}
</if>
<if test="tDispatchInfo.empIdcard != null and tDispatchInfo.empIdcard.trim() != ''">
AND a.EMP_IDCARD = #{tDispatchInfo.empIdcard}
</if>
<if test="tDispatchInfo.settleDomainName != null and tDispatchInfo.settleDomainName.trim() != ''">
AND a.SETTLE_DOMAIN_NAME like CONCAT(#{tDispatchInfo.settleDomainName}, '%')
</if>
<if test="tDispatchInfo.settleDomainCode != null and tDispatchInfo.settleDomainCode.trim() != ''">
AND a.SETTLE_DOMAIN_CODE = #{tDispatchInfo.settleDomainCode}
</if>
<if test="tDispatchInfo.socialProvince != null and tDispatchInfo.socialProvince.trim() != ''">
AND a.SOCIAL_PROVINCE = #{tDispatchInfo.socialProvince}
</if>
<if test="tDispatchInfo.socialCity != null and tDispatchInfo.socialCity.trim() != ''">
AND a.SOCIAL_CITY = #{tDispatchInfo.socialCity}
</if>
<if test="tDispatchInfo.socialTown != null and tDispatchInfo.socialTown.trim() != ''">
AND a.SOCIAL_TOWN = #{tDispatchInfo.socialTown}
</if>
<if test="tDispatchInfo.fundProvince != null and tDispatchInfo.fundProvince.trim() != ''">
AND a.FUND_PROVINCE = #{tDispatchInfo.fundProvince}
</if>
<if test="tDispatchInfo.fundCity != null and tDispatchInfo.fundCity.trim() != ''">
AND a.FUND_CITY = #{tDispatchInfo.fundCity}
</if>
<if test="tDispatchInfo.fundTown != null and tDispatchInfo.fundTown.trim() != ''">
AND a.FUND_TOWN = #{tDispatchInfo.fundTown}
</if>
<if test="tDispatchInfo.createName != null and tDispatchInfo.createName.trim() != ''">
AND a.CREATE_NAME = #{tDispatchInfo.createName}
</if>
<if test="tDispatchInfo.socialHouseholdName != null and tDispatchInfo.socialHouseholdName.trim() != ''">
AND a.SOCIAL_HOUSEHOLD_NAME like CONCAT(CONCAT(#{tDispatchInfo.socialHouseholdName}), '%')
</if>
<if test="tDispatchInfo.providentHouseholdName != null and tDispatchInfo.providentHouseholdName.trim() != ''">
AND a.PROVIDENT_HOUSEHOLD_NAME like CONCAT(CONCAT(#{tDispatchInfo.providentHouseholdName}), '%')
</if>
<if test="tDispatchInfo.createTimeStart != null">
AND a.CREATE_TIME <![CDATA[ >= ]]> #{tDispatchInfo.createTimeStart}
</if>
<if test="tDispatchInfo.createTimeEnd != null">
AND a.CREATE_TIME <![CDATA[ <= ]]> #{tDispatchInfo.createTimeEnd}
</if>
<if test="tDispatchInfo.authSql != null and tDispatchInfo.authSql.trim() != ''">
${tDispatchInfo.authSql}
</if>
</if>
</sql>
<!--tDispatchInfo简单分页查询--> <!--tDispatchInfo简单分页查询-->
<select id="getTDispatchInfoPage" resultMap="dispatchPageMap"> <select id="getTDispatchInfoPage" resultMap="dispatchPageMap">
SELECT SELECT
...@@ -507,6 +607,58 @@ ...@@ -507,6 +607,58 @@
limit #{tDispatchInfo.limitStart},#{tDispatchInfo.limitEnd} limit #{tDispatchInfo.limitStart},#{tDispatchInfo.limitEnd}
</if> </if>
</select> </select>
<!-- 派单审核导出 -->
<select id="exportAuditDispatch" resultMap="exportAuditMap">
select
a.EMP_NAME,
a.EMP_IDCARD,
a.EMP_TYPE,
a.BELONG_UNIT_NAME,
a.SETTLE_DOMAIN_NAME,
a.TYPE,
a.SOCIAL_HOUSEHOLD_NAME,
a.PROVIDENT_HOUSEHOLD_NAME,
a.CREATE_NAME,
a.CREATE_TIME,
a.CONTRACT_START,
a.CONTRACT_END,
a.TRUST_REMARK,
a.CONTRACT_NAME,
a.WORKING_HOURS,
a.SOCIAL_REDUCE_DATE,
a.FUND_REDUCE_DATE,
a.LEAVE_DATE,
a.REDUCE_REASON,
b.PAYMENT_TYPE,
b.RECORD_BASE,
b.UNIT_PENSION_CARDINAL,
b.UNIT_MEDICAL_CARDINAL,
b.UNIT_UNEMPLOYMENT_CARDINAL,
b.UNIT_WORK_INJURY_CARDINAL,
b.UNIT_BIRTH_CARDINAL,
b.PERSONAL_PENSION_CARDINAL,
b.PERSONAL_MEDICAL_CARDINAL,
b.PERSONAL_UNEMPLOYMENT_CARDINAL,
b.PERSONAL_BIGAILMENT_MONEY,
b.UNIT_BIGAILMENT_MONEY,
c.UNIT_PROVIDENG_CARDINAL,
c.PERSONAL_PROVIDENT_CARDINAL,
c.UNIT_PROVIDENT_PER,
c.PERSONAL_PROVIDENT_PER
from t_dispatch_info a
left join t_social_info b on a.SOCIAL_ID = b.ID
left join t_provident_fund c on a.FUND_ID = C.ID
<where>
a.DELETE_FLAG = '0'
<include refid="tDispatchInfo_where"/>
</where>
order by a.CREATE_TIME desc
<if test="tDispatchInfo.limitStart != null">
limit #{tDispatchInfo.limitStart},#{tDispatchInfo.limitEnd}
</if>
</select>
<resultMap id="socialHandleExportMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.SocialHandleExportVo"> <resultMap id="socialHandleExportMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.SocialHandleExportVo">
<result property="empName" column="EMP_NAME"/> <result property="empName" column="EMP_NAME"/>
<result property="empIdcard" column="EMP_IDCARD"/> <result property="empIdcard" column="EMP_IDCARD"/>
......
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