Commit 5adc21b6 authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/MVP1.5.6' into MVP1.5.6

parents f44b1cdb a3f6d978
......@@ -108,6 +108,4 @@ public interface TSettleDomainMapper extends BaseMapper<TSettleDomain> {
@Param("customerName")String customerName,
@Param("userId")String userId);
TSettleDomain updateHistoryData(@Param("departNo")String DepartNo);
}
......@@ -220,11 +220,8 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
log.error(JSON.toJSONString(vo));
if (Common.isNotNull(tSettleDomainInfo)) {
baseMapper.updateById(domain);
baseMapper.updateHistoryData(domain.getDepartNo());
} else {
baseMapper.insert(domain);
baseMapper.updateHistoryData(domain.getDepartNo());
}
}
return R.ok();
......
......@@ -247,7 +247,7 @@
a.DEPART_NO,
a.SECOND_INDICATOR_BELONG
FROM t_settle_domain a
WHERE a.DELETE_FLAG = '0' and a.STOP_FLAG = '0'
WHERE a.DELETE_FLAG = '0' and a.SECOND_INDICATOR_BELONG is not null
<if test="tSettleDomain != null">
<if test="tSettleDomain.departNo != null and tSettleDomain.departNo.trim() != ''">
and a.DEPART_NO = #{tSettleDomain.departNo}
......@@ -498,7 +498,4 @@
and a.id in (select b.settle_id from m_setttle_customer_user b where b.user_id = #{userId}) and a.DELETE_FLAG = '0'
group by a.CUSTOMER_NO order by CREATE_TIME desc
</select>
<update id="updateHistoryData">
update ekp_24a8e6a7fc143bb8c48a a,t_settle_domain b set b.FIRST_INDICATOR_BELONG = a.fd_3b1abe1f56113e_text,b.SECOND_INDICATOR_BELONG = a.fd_3b1abe1f56113e_text where a.fd_3a37fe508071fe = b.DEPART_NO
</update>
</mapper>
/*
* 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.msg.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import java.util.Date;
/**
* 消息提醒
*
* @author huyc
* @date 2023-07-26 14:19:33
*/
@Data
@TableName("t_message_info")
@EqualsAndHashCode()
@Schema(description = "消息提醒")
public class TMessageInfo {
/**
* ID
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("ID")
@Schema(description = "ID")
private String id;
/**
* 提交人-表单制作人
*/
@ExcelAttribute(name = "提交人-表单制作人", maxLength = 10)
@Length(max = 10, message = "提交人-表单制作人不能超过10个字符")
@ExcelProperty("提交人-表单制作人")
@Schema(description = "提交人-表单制作人")
private String submitUser;
/**
* 0 待办 1 待阅
*/
@ExcelAttribute(name = "0 待办 1 待阅", maxLength = 1)
@Length(max = 1, message = "0 待办 1 待阅不能超过1个字符")
@ExcelProperty("0 待办 1 待阅")
@Schema(description = "0 待办 1 待阅")
private String alertType;
/**
* 0 已处理 1 未处理
*/
@ExcelAttribute(name = "0 已处理 1 未处理", maxLength = 1)
@Length(max = 1, message = "0 已处理 1 未处理不能超过1个字符")
@ExcelProperty("0 已处理 1 未处理")
@Schema(description = "0 已处理 1 未处理")
private String handlerStatus;
/**
* 处理人-当前提醒人
*/
@ExcelAttribute(name = "处理人-当前提醒人", maxLength = 10)
@Length(max = 10, message = "处理人-当前提醒人不能超过10个字符")
@ExcelProperty("处理人-当前提醒人")
@Schema(description = "处理人-当前提醒人")
private String alertUser;
/**
* listUrl
*/
@ExcelAttribute(name = "listUrl", maxLength = 200)
@Length(max = 200, message = "listUrl不能超过200个字符")
@ExcelProperty("listUrl")
@Schema(description = "listUrl")
private String listUrl;
/**
* infoUrl
*/
@ExcelAttribute(name = "infoUrl", maxLength = 200)
@Length(max = 200, message = "infoUrl不能超过200个字符")
@ExcelProperty("infoUrl")
@Schema(description = "infoUrl")
private String infoUrl;
/**
* 模块
*/
@ExcelAttribute(name = "模块", maxLength = 20)
@Length(max = 20, message = "模块不能超过20个字符")
@ExcelProperty("模块")
@Schema(description = "模块")
private String modelType;
/**
* 关联id
*/
@ExcelAttribute(name = "关联id", maxLength = 32)
@Length(max = 32, message = "关联id不能超过32个字符")
@ExcelProperty("关联id")
@Schema(description = "关联id")
private String modelId;
/**
* 创建时间
*/
@ExcelAttribute(name = "创建时间", isDate = true)
@ExcelProperty("创建时间")
@Schema(description = "创建时间")
private Date createTime;
}
/*
* 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.msg.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.msg.entity.TMessageInfo;
import com.yifu.cloud.plus.v1.msg.service.TMessageInfoService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
/**
* 消息提醒
*
* @author huyc
* @date 2023-07-26 14:19:33
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/tmessageinfo" )
@Tag(name = "消息提醒管理")
public class TMessageInfoController {
private final TMessageInfoService tMessageInfoService;
/**
* 简单分页查询
* @param page 分页对象
* @param tMessageInfo 消息提醒
* @return
*/
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TMessageInfo>> getTMessageInfoPage(Page<TMessageInfo> page, TMessageInfo tMessageInfo) {
return new R<>(tMessageInfoService.getTMessageInfoPage(page,tMessageInfo));
}
/**
* 通过id查询消息提醒
* @param id id
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('demo_tmessageinfo_get')" )
public R<TMessageInfo> getById(@PathVariable("id" ) String id) {
return R.ok(tMessageInfoService.getById(id));
}
/**
* 新增消息提醒
* @param tMessageInfo 消息提醒
* @return R
*/
@Operation(summary = "新增消息提醒", description = "新增消息提醒")
@SysLog("新增消息提醒" )
@PostMapping
@PreAuthorize("@pms.hasPermission('demo_tmessageinfo_add')" )
public R<Boolean> save(@RequestBody TMessageInfo tMessageInfo) {
return R.ok(tMessageInfoService.save(tMessageInfo));
}
/**
* 修改消息提醒
* @param tMessageInfo 消息提醒
* @return R
*/
@Operation(summary = "修改消息提醒", description = "修改消息提醒")
@SysLog("修改消息提醒" )
@PutMapping
@PreAuthorize("@pms.hasPermission('demo_tmessageinfo_edit')" )
public R<Boolean> updateById(@RequestBody TMessageInfo tMessageInfo) {
return R.ok(tMessageInfoService.updateById(tMessageInfo));
}
/**
* @Author huyc
* @Description 更新消息信息
* @Date 14:30 2023/7/26
* @Param
* @return
**/
@Operation(summary = "更新消息信息", description = "更新消息信息")
@Inner
@PostMapping("/inner/updateMessageInfo")
public void updateMessageInfo(@RequestBody TMessageInfo tMessageInfo) {
tMessageInfoService.updateMessageInfo(tMessageInfo);
}
/**
* @Author huyc
* @Description 查询消息数量
* @Date 14:30 2023/7/26
* @Param
* @return
**/
@Operation(summary = "查询消息数量", description = "查询消息数量")
@PostMapping("/selectMessageCount")
public long selectMessageCount(@RequestBody TMessageInfo tMessageInfo) {
return tMessageInfoService.selectMessageCount(tMessageInfo);
}
/**
* 通过id删除消息提醒
* @param id id
* @return R
*/
@Operation(summary = "通过id删除消息提醒", description = "通过id删除消息提醒")
@SysLog("通过id删除消息提醒" )
@DeleteMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('demo_tmessageinfo_del')" )
public R<Boolean> removeById(@PathVariable String id) {
return R.ok(tMessageInfoService.removeById(id));
}
}
/*
* 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.msg.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.msg.entity.TMessageInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 消息提醒
*
* @author huyc
* @date 2023-07-26 14:19:33
*/
@Mapper
public interface TMessageInfoMapper extends BaseMapper<TMessageInfo> {
/**
* 消息提醒简单分页查询
* @param tMessageInfo 消息提醒
* @return
*/
IPage<TMessageInfo> getTMessageInfoPage(Page<TMessageInfo> page, @Param("tMessageInfo") TMessageInfo tMessageInfo);
}
/*
* 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.msg.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.msg.entity.TMessageInfo;
import org.springframework.web.bind.annotation.RequestBody;
/**
* 消息提醒
*
* @author huyc
* @date 2023-07-26 14:19:33
*/
public interface TMessageInfoService extends IService<TMessageInfo> {
/**
* 消息提醒简单分页查询
* @param tMessageInfo 消息提醒
* @return
*/
IPage<TMessageInfo> getTMessageInfoPage(Page<TMessageInfo> page, TMessageInfo tMessageInfo);
void updateMessageInfo(@RequestBody TMessageInfo tMessageInfo);
long selectMessageCount(@RequestBody TMessageInfo tMessageInfo);
}
/*
* 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.msg.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.msg.entity.TMessageInfo;
import com.yifu.cloud.plus.v1.msg.mapper.TMessageInfoMapper;
import com.yifu.cloud.plus.v1.msg.service.TMessageInfoService;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
/**
* 消息提醒
*
* @author huyc
* @date 2023-07-26 14:19:33
*/
@Log4j2
@Service
public class TMessageInfoServiceImpl extends ServiceImpl<TMessageInfoMapper, TMessageInfo> implements TMessageInfoService {
/**
* 消息提醒简单分页查询
* @param tMessageInfo 消息提醒
* @return
*/
@Override
public IPage<TMessageInfo> getTMessageInfoPage(Page<TMessageInfo> page, TMessageInfo tMessageInfo){
return baseMapper.getTMessageInfoPage(page,tMessageInfo);
}
@Override
public void updateMessageInfo(TMessageInfo tMessageInfo) {
if (Common.isNotNull(tMessageInfo) && Common.isNotNull(tMessageInfo.getAlertUser())) {
TMessageInfo tMessageInfo1 = null;
if (Common.isNotNull(tMessageInfo.getModelId())) {
tMessageInfo1 = baseMapper.selectOne(Wrappers.<TMessageInfo>query().lambda()
.eq(TMessageInfo::getAlertUser, tMessageInfo.getAlertUser())
.eq(TMessageInfo::getModelId, tMessageInfo.getModelId())
.orderByDesc(TMessageInfo::getCreateTime).last(CommonConstants.LAST_ONE_SQL));
} else if (Common.isNotNull(tMessageInfo.getInfoUrl())){
tMessageInfo1 = baseMapper.selectOne(Wrappers.<TMessageInfo>query().lambda()
.eq(TMessageInfo::getAlertUser, tMessageInfo.getAlertUser())
.eq(TMessageInfo::getInfoUrl, tMessageInfo.getInfoUrl())
.orderByDesc(TMessageInfo::getCreateTime).last(CommonConstants.LAST_ONE_SQL));
}
if (Common.isNotNull(tMessageInfo1)) {
tMessageInfo1.setHandlerStatus(tMessageInfo.getHandlerStatus());
}
}
}
@Override
public long selectMessageCount(TMessageInfo tMessageInfo) {
return baseMapper.selectCount(Wrappers.<TMessageInfo>query().lambda()
.eq(TMessageInfo::getAlertUser,tMessageInfo.getAlertUser())
.eq(TMessageInfo::getModelId,tMessageInfo.getModelId())
.eq(TMessageInfo::getHandlerStatus,CommonConstants.ONE_STRING));
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ 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)
~
-->
<!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.msg.mapper.TMessageInfoMapper">
<resultMap id="tMessageInfoMap" type="com.yifu.cloud.plus.v1.msg.entity.TMessageInfo">
<id property="id" column="ID"/>
<result property="submitUser" column="SUBMIT_USER"/>
<result property="alertType" column="ALERT_TYPE"/>
<result property="handlerStatus" column="HANDLER_STATUS"/>
<result property="alertUser" column="ALERT_USER"/>
<result property="listUrl" column="LIST_URL"/>
<result property="infoUrl" column="INFO_URL"/>
<result property="modelType" column="MODEL_TYPE"/>
<result property="modelId" column="MODEL_ID"/>
<result property="createTime" column="CREATE_TIME"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.SUBMIT_USER,
a.ALERT_TYPE,
a.HANDLER_STATUS,
a.ALERT_USER,
a.LIST_URL,
a.INFO_URL,
a.MODEL_TYPE,
a.MODEL_ID,
a.CREATE_TIME
</sql>
<sql id="tMessageInfo_where">
<if test="tMessageInfo != null">
<if test="tMessageInfo.submitUser != null and tMessageInfo.submitUser.trim() != ''">
AND a.SUBMIT_USER = #{tMessageInfo.submitUser}
</if>
<if test="tMessageInfo.alertType != null and tMessageInfo.alertType.trim() != ''">
AND a.ALERT_TYPE = #{tMessageInfo.alertType}
</if>
<if test="tMessageInfo.handlerStatus != null and tMessageInfo.handlerStatus.trim() != ''">
AND a.HANDLER_STATUS = #{tMessageInfo.handlerStatus}
</if>
<if test="tMessageInfo.alertUser != null and tMessageInfo.alertUser.trim() != ''">
AND a.ALERT_USER = #{tMessageInfo.alertUser}
</if>
<if test="tMessageInfo.infoUrl != null and tMessageInfo.infoUrl.trim() != ''">
AND a.INFO_URL = #{tMessageInfo.infoUrl}
</if>
<if test="tMessageInfo.listUrl != null and tMessageInfo.listUrl.trim() != ''">
AND a.LIST_URL = #{tMessageInfo.listUrl}
</if>
<if test="tMessageInfo.modelType != null and tMessageInfo.modelType.trim() != ''">
AND a.MODEL_TYPE = #{tMessageInfo.modelType}
</if>
</if>
</sql>
<!--tMessageInfo简单分页查询-->
<select id="getTMessageInfoPage" resultMap="tMessageInfoMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_message_info a
<where>
1=1
<include refid="tMessageInfo_where"/>
</where>
order by a.CREATE_TIME desc
</select>
</mapper>
......@@ -361,5 +361,13 @@ public class TSalaryAccountVo implements Serializable {
@ExcelProperty("是否新员工(默认否)")
private String isNewEmployee;
/**
* 通讯补贴(不计税)
*/
@ExcelAttribute(name = "通讯补贴(不计税)")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("通讯补贴(不计税)")
private BigDecimal phoneSubsidy;
private List<TSalaryAccountItemVo> saiList = new ArrayList<>(); //工资组成部分明细
}
......@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccountItem;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmpRosterVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeExportVo;
......@@ -50,5 +51,7 @@ public interface TSalaryEmployeeMapper extends BaseMapper<TSalaryEmployee> {
TSalaryEmployee getByEmpIdCard(@Param("empIdCard") String empIdCard);
TSalaryAccountItem selectByIdCard(@Param("empIdCard") String empIdCard, @Param("nowMonth") String nowMonth);
List<TSalaryEmpRosterVo> getSalaryEmpRoster(@Param("idCards") List<String> idCardList);
}
......@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccountItem;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee;
import com.yifu.cloud.plus.v1.yifu.salary.vo.*;
......@@ -50,6 +51,8 @@ public interface TSalaryEmployeeService extends IService<TSalaryEmployee> {
List<TSalaryEmployeeExportVo> noPageDiy(TSalaryEmployeeSearchVo searchVo);
TSalaryAccountItem selectByIdcard(String idCard,String nowMonth);
/**
* @param notLabour 是:非劳务费人员。 否:劳务费,不保存
* @param employee
......
......@@ -43,6 +43,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprCheckProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccountItem;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryEmployeeMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TBankSetService;
......@@ -164,6 +165,11 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
return baseMapper.noPageDiy(searchVo,Common.getList(searchVo.getIds()));
}
@Override
public TSalaryAccountItem selectByIdcard(String idCard,String nowMonth) {
return baseMapper.selectByIdCard(idCard,nowMonth);
}
private Long noPageCountDiy(TSalaryEmployeeSearchVo searchVo) {
LambdaQueryWrapper<TSalaryEmployee> wrapper = buildQueryWrapper(searchVo);
List<String> idList = Common.getList(searchVo.getIds());
......
......@@ -11,6 +11,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.insurances.util.ValidityUtil;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TConfigSalary;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccountItem;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryConfigStandard;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService;
......@@ -21,6 +22,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountVo;
import lombok.Data;
import lombok.extern.log4j.Log4j2;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.math.NumberUtils;
import java.io.Serializable;
import java.lang.reflect.Field;
......@@ -119,6 +121,7 @@ public class SalaryAccountUtil implements Serializable {
String empName;
String salaryStyle;//工资发放方式(0现金/1银行)/2线下
BigDecimal relaySalary; //应发工资
BigDecimal phoneSubsidy;
BigDecimal relaySalarySum; //应发工资合计,算3500与5000使用的
BigDecimal money3500 = new BigDecimal("3500"); //特殊金额3500
BigDecimal money5000 = new BigDecimal("5000"); //特殊金额5000
......@@ -154,6 +157,7 @@ public class SalaryAccountUtil implements Serializable {
saiList = new ArrayList<>();
salaryStyle = SalaryConstants.SALARY_STYLE_BANK;
relaySalary = null;
phoneSubsidy =null;
actualSalarySum = null;
entity.setSettlementMonth(nowMonth);
for (Map.Entry<String, TSalaryConfigStandard> entry : salaryConfigMap.entrySet()) {
......@@ -174,6 +178,16 @@ public class SalaryAccountUtil implements Serializable {
if (SalaryConstants.ANNUAL_BONUS_JAVA.equals(scs.getJavaFiedName()) && Common.isNotNull(cellValueStr)) {
annualBonusFlag = true;
}
if (SalaryConstants.PHONE_SUBSIDY_JAVA.equals(scs.getJavaFiedName())) {
BigDecimal bigDecimal1 = NumberUtils.createBigDecimal(cellValueStr);
if(bigDecimal1.compareTo(BigDecimal.valueOf(300)) == 1) {
errorFlag = false;
error = "第" + (i + 2) + "行:本次发放"+cellValueStr+"元,超出300元的限制,禁止导入";
errorList.add(new ErrorMessage((i + 2), error));
continue;
}
}
if (SalaryConstants.ANNUAL_BONUS_TAX_TYPE.equals(scs.getJavaFiedName())) {
if (SalaryConstants.ANNUAL_BONUS_ALONE.equals(cellValueStr)) {
entity.setAnnualBonusType(SalaryConstants.ANNUAL_BONUS_TAX_TYPE_VALUE[1]);
......@@ -198,6 +212,22 @@ public class SalaryAccountUtil implements Serializable {
continue;
}
}
if (SalaryConstants.PHONE_SUBSIDY_JAVA.equals(scs.getJavaFiedName())) {
try {
phoneSubsidy = new BigDecimal(cellValueStr.replace(",", ""));
sai = new TSalaryAccountItemVo();
sai.setCnName(dbFiedName);
sai.setJavaFiedName(scs.getJavaFiedName());
sai.setIsTax(CommonConstants.ONE_INT);
sai.setSalaryMoney(phoneSubsidy);
saiList.add(sai);
} catch (Exception e) {
errorFlag = false;
error = "第" + (i + 2) + "行:通讯补贴:'" + cellValueStr + "'错误,请检查数据";
errorList.add(new ErrorMessage((i + 2), error));
continue;
}
}
if (SalaryConstants.ACTUAL_SALARY_SUM_JAVA.equals(scs.getJavaFiedName())) {
try {
actualSalarySum = new BigDecimal(cellValueStr.replace(",", ""));
......@@ -230,6 +260,7 @@ public class SalaryAccountUtil implements Serializable {
}
newEmp.setEmpName(empName);
}
if ((SalaryConstants.IF_NEW_EMPLOYEE.equals(dbFiedName) || SalaryConstants.IS_NEW_EMPLOYEE.equals(dbFiedName))
&& SalaryConstants.IS_NEW.equals(cellValueStr)) {
isNewEmployee = true;
......@@ -250,10 +281,13 @@ public class SalaryAccountUtil implements Serializable {
emp = empIdCardMap.get(cellValueStr);
newEmp.setEmpIdcard(cellValueStr);
}
if (SalaryConstants.SALARY_GIVE_TIME.equals(cellValueStr)) {
salaryGiveTimeFlag = false;
entity.setSalaryGiveTime(CommonConstants.ONE_STRING);
}
field = fieldsMap.get(scs.getJavaFiedName());
if (field == null) {
sai = new TSalaryAccountItemVo();
......@@ -299,13 +333,9 @@ public class SalaryAccountUtil implements Serializable {
errorList.add(new ErrorMessage((i + 2), "请注意:工资发放时间,只能是【立即发】或【暂停发】!你的内容:【"+cellValueStr+"】"));
continue;
}
if (SalaryConstants.SALARY_STYLE.equals(scs.getJavaFiedName())
&& !SalaryConstants.SALARY_STYLE_YIN.equals(cellValueStr)
&& !SalaryConstants.SALARY_STYLE_XIAN.equals(cellValueStr)) {
errorFlag = false;
errorList.add(new ErrorMessage((i + 2), "请注意:发放方式,只能是【银行】或【现金】!你的内容:【"+cellValueStr+"】"));
continue;
}
if (SalaryConstants.IS_PERSON_TAX.equals(scs.getJavaFiedName())
&& !SalaryConstants.IS_COMPANY.equals(cellValueStr)
&& !SalaryConstants.IS_PERSON_OTHER.equals(cellValueStr)
......@@ -341,7 +371,17 @@ public class SalaryAccountUtil implements Serializable {
errorList.add(new ErrorMessage((i + 2), error));
continue;
}
TSalaryAccountItem item=tSalaryEmployeeService.selectByIdcard(newEmp.getEmpIdcard(),nowMonth);
if(Common.isNotNull(item)) {
BigDecimal LL = item.getSalaryMoney().add(phoneSubsidy);
if (LL.compareTo(BigDecimal.valueOf(300)) == 1) {
BigDecimal HH = LL.subtract(phoneSubsidy);
error = "第" + (i + 2) + "行:当月已发" + HH + "元,本次发放" + phoneSubsidy + "元,累计超出300元限制,禁止发放!";
errorList.add(new ErrorMessage((i + 2), error));
continue;
}
}
if (annualBonusFlag && Common.isEmpty(entity.getAnnualBonusType())) {
error = "第" + (i + 2) + "行:年终奖有值,【年终奖扣税方式】需填写【单独】/【合并】";
errorList.add(new ErrorMessage((i + 2), error));
......@@ -369,7 +409,6 @@ public class SalaryAccountUtil implements Serializable {
errorList.add(new ErrorMessage((i + 2), error));
continue;
}
// 版本2.6.6判重:对同一“项目”、同一“结算月份”、同一“报表类型”、同一“工资月份”、同一“身份证号”、同一“应发金额”进行校验
// 2.6.6:校验导入数据重复的Map格式:#身份证号_工资月份_报表类型_应发金额
entity.setIsRepeat(CommonConstants.ZERO_INT);
......@@ -450,6 +489,10 @@ public class SalaryAccountUtil implements Serializable {
entity.setIsDeductFund("0");
}
}
//通讯补贴导入限制
//验证扣社保以及扣公积金时的关联关系
if (CommonConstants.dingleDigitStrArray[1].equals(entity.getIsDeductSocial()) && Common.isEmpty(entity.getDeduSocialMonth())) {
error = "第" + (i + 2) + "行:扣社保无社保扣缴月份";
......@@ -482,6 +525,7 @@ public class SalaryAccountUtil implements Serializable {
List<TSalaryEmployee> saveNewEmpList = new ArrayList<>();
List<String> checkTaxMonthList = new ArrayList<>();
boolean isContinue = true;
if (!newEmpList.isEmpty()) {
TSalaryEmployee newEmps;
for (int i = 0; i < newEmpList.size(); i++) {
......
......@@ -198,6 +198,6 @@ public class SalaryConstants {
public static final String SALARY_STYLE = "salaryStyle";
public static final String SALARY_STYLE_YIN = "银行";
public static final String SALARY_STYLE_XIAN = "现金";
public static final String SALARY_PHONES = "通讯补贴(不计税)";
public static final String IS_PERSON_TAX = "isPersonTax";
}
......@@ -36,12 +36,13 @@
SALARY_ACCOUNT_ID,
CN_NAME,
JAVA_FIED_NAME,
SALARY_MONEY,
SUM(SALARY_MONEY)SALARY_MONEY,
TEXT_VALUE,
IS_TAX
FROM
<if test="tSalaryAccountItem.salaryMonth == null or tSalaryAccountItem.salaryMonth.trim() >= '202201'">
t_salary_account_item a
</if>
<if test="tSalaryAccountItem.salaryMonth != null and tSalaryAccountItem.salaryMonth.trim() &lt; '202201' ">
t_salary_account_item_hro_2021 a
......@@ -63,6 +64,7 @@
AND SALARY_MONEY = #{tSalaryAccountItem.salaryMoney}
</if>
</where>
GROUP BY CN_NAME
</select>
<select id="getAllTSalaryAccountItem" resultMap="tSalaryAccountItemMap">
......
......@@ -264,6 +264,25 @@
where a.EMP_IDCARD = #{empIdCard}
ORDER BY a.BANK_CITY DESC LIMIT 1
</select>
<select id="selectByIdCard" resultType="com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccountItem">
SELECT
a.ID,
a.SALARY_ACCOUNT_ID,
a.CN_NAME,
a.JAVA_FIED_NAME,
SUM(a.SALARY_MONEY)SALARY_MONEY,
a.IS_TAX,
a.TEXT_VALUE,
b.EMP_IDCARD,
b.SALARY_MONTH,
b.DELETE_FLAG
FROM `t_salary_account_item` a LEFT JOIN t_salary_account b on a.SALARY_ACCOUNT_ID =b.ID
WHERE a.JAVA_FIED_NAME ='phoneSubsidy'
and b.EMP_IDCARD= #{empIdCard}
and b.SETTLEMENT_MONTH=#{nowMonth}
and b.DELETE_FLAG='0'
</select>
<!-- 人员花名册薪资信息 -->
<select id="getSalaryEmpRoster" resultMap="salaryEmpRosterMap" parameterType="com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmpRosterVo">
select a.EMP_IDCARD,BANK_NO,BANK_NAME,BANK_SUB_NAME,a.BANK_PROVINCE,a.BANK_CITY from t_salary_employee a
......
......@@ -168,7 +168,7 @@ public class SysHouseHoldInfo extends BaseEntity {
private String handleUserName;
/**
* 类型 0 独立户
* 类型 0 独立户 1 自由户
*/
@ExcelAttribute(name = "类型" )
@Schema(description ="类型")
......@@ -203,15 +203,6 @@ public class SysHouseHoldInfo extends BaseEntity {
@ExcelProperty("公积金承办银行")
private String fundBank;
/**
* 比例
*/
@ExcelAttribute(name = "比例" )
@Schema(description ="比例")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("比例")
private String fundPer;
/**
* 审核人部门
*/
......
......@@ -18,7 +18,6 @@ package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelProperty;
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;
......@@ -73,7 +72,7 @@ public class TDispatchSocialPersionExportVo implements Serializable {
* 民族
*/
@Schema(description = "民族")
@ExcelAttribute(name = "民族", isDataId = true,dataType = ExcelAttributeConstants.EMP_NATIONAL)
@ExcelAttribute(name = "民族")
@ExcelProperty("民族")
private String empNational;
/**
......
/*
* 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.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
*
*
* @author huyc
* @date 2023-07-18 11:38:05
*/
@Data
public class TDispatchSocialPersionReduceExportVo implements Serializable {
/**
* 序号
*/
@Schema(description = "序号" )
@ExcelAttribute(name = "序号" )
@ExcelProperty("序号")
private Integer num;
/**
* 职工编码
*/
@Schema(description = "职工编码" )
@ExcelAttribute(name = "职工编码" )
@ExcelProperty("职工编码")
private String empNo;
/**
* 员工姓名
*/
@Schema(description = "姓名" )
@ExcelAttribute(name = "姓名" )
@ExcelProperty("姓名")
private String empName;
/**
* 社会保障号码
*/
@Schema(description = "社会保障号码(身份证号码)" )
@ExcelAttribute(name = "社会保障号码(身份证号码)" )
@ExcelProperty("社会保障号码(身份证号码)")
private String empIdcard;
/**
* 停止缴费时间
*/
@Schema(description = "停止缴费时间" )
@ExcelAttribute(name = "停止缴费时间" )
@ExcelProperty("停止缴费时间")
private String workDate;
/**
* 辞职
*/
@Schema(description = "辞职" )
@ExcelAttribute(name = "辞职" )
@ExcelProperty("辞职")
private String typeA;
/**
* 辞退
*/
@Schema(description = "辞退" )
@ExcelAttribute(name = "辞退" )
@ExcelProperty("辞退")
private String typeB;
/**
* 参军
*/
@Schema(description = "参军" )
@ExcelAttribute(name = "参军" )
@ExcelProperty("参军")
private String typeC;
/**
* 辞退
*/
@Schema(description = "上学" )
@ExcelAttribute(name = "上学" )
@ExcelProperty("上学")
private String typeD;
/**
* 辞退
*/
@Schema(description = "劳改" )
@ExcelAttribute(name = "劳改" )
@ExcelProperty("劳改")
private String typeE;
/**
* 劳教
*/
@Schema(description = "劳教" )
@ExcelAttribute(name = "劳教" )
@ExcelProperty("劳教")
private String typeW;
/**
* 劳教
*/
@Schema(description = "除名" )
@ExcelAttribute(name = "除名" )
@ExcelProperty("除名")
private String typeF;
/**
* 人员失踪
*/
@Schema(description = "人员失踪" )
@ExcelAttribute(name = "人员失踪" )
@ExcelProperty("人员失踪")
private String typeG;
/**
* 停薪留职
*/
@Schema(description = "停薪留职" )
@ExcelAttribute(name = "停薪留职" )
@ExcelProperty("停薪留职")
private String typeH;
/**
* 解除合同
*/
@Schema(description = "解除合同" )
@ExcelAttribute(name = "解除合同" )
@ExcelProperty("解除合同")
private String typeI;
/**
* 统筹内调出
*/
@Schema(description = "统筹内调出" )
@ExcelAttribute(name = "统筹内调出" )
@ExcelProperty("统筹内调出")
private String typeJ;
/**
* 调出统筹范围
*/
@Schema(description = "调出统筹范围" )
@ExcelAttribute(name = "调出统筹范围" )
@ExcelProperty("调出统筹范围")
private String typeK;
/**
* 退休
*/
@Schema(description = "退休" )
@ExcelAttribute(name = "退休" )
@ExcelProperty("退休")
private String typeL;
/**
* 死亡
*/
@Schema(description = "死亡" )
@ExcelAttribute(name = "死亡" )
@ExcelProperty("死亡")
private String typeM;
/**
* 出国定居
*/
@Schema(description = "出国定居" )
@ExcelAttribute(name = "出国定居" )
@ExcelProperty("出国定居")
private String typeN;
/**
* 港澳台定居
*/
@Schema(description = "港澳台定居" )
@ExcelAttribute(name = "港澳台定居" )
@ExcelProperty("港澳台定居")
private String typeO;
/**
* 退保
*/
@Schema(description = "退保" )
@ExcelAttribute(name = "退保" )
@ExcelProperty("退保")
private String typeP;
/**
* 其他
*/
@Schema(description = "其他" )
@ExcelAttribute(name = "其他" )
@ExcelProperty("其他")
private String typeQ;
/**
* 学历
*/
@Schema(description = "备注")
@ExcelAttribute(name = "备注" )
@ExcelProperty("备注")
private String remark;
}
package com.yifu.cloud.plus.v1.yifu.social.config;
import com.alibaba.excel.metadata.Head;
import com.alibaba.excel.write.metadata.style.WriteCellStyle;
import com.alibaba.excel.write.metadata.style.WriteFont;
import com.alibaba.excel.write.style.AbstractVerticalCellStyleStrategy;
import org.apache.poi.ss.usermodel.BorderStyle;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.IndexedColors;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
public class CustomCellStyleOneStrategy extends AbstractVerticalCellStyleStrategy {
/**
* 操作列
*/
private List<Integer> columnIndexes;
public CustomCellStyleOneStrategy(List<Integer> columnIndexes ) {
this.columnIndexes = columnIndexes;
}
@Override
protected WriteCellStyle headCellStyle(Head head) {
// 获取样式实例
WriteCellStyle headWriteCellStyle = new WriteCellStyle();
// 获取字体实例
WriteFont headWriteFont = new WriteFont();
// 设置字体样式
headWriteFont.setFontName("宋体");
// 设置字体大小
headWriteFont.setFontHeightInPoints((short)12);
// 边框
headWriteFont.setBold(false);
headWriteCellStyle.setFillForegroundColor(IndexedColors.WHITE.getIndex());
headWriteCellStyle.setWriteFont(headWriteFont);
headWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.LEFT);
headWriteCellStyle.setBorderLeft(BorderStyle.NONE);
headWriteCellStyle.setBorderBottom(BorderStyle.NONE);
headWriteCellStyle.setBorderRight(BorderStyle.NONE);
headWriteCellStyle.setBorderTop(BorderStyle.NONE);
return headWriteCellStyle;
}
}
\ No newline at end of file
package com.yifu.cloud.plus.v1.yifu.social.config;
import com.alibaba.excel.metadata.Head;
import com.alibaba.excel.write.metadata.style.WriteCellStyle;
import com.alibaba.excel.write.metadata.style.WriteFont;
import com.alibaba.excel.write.style.AbstractVerticalCellStyleStrategy;
import org.apache.poi.ss.usermodel.BorderStyle;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.IndexedColors;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
public class CustomCellStyleStrategy extends AbstractVerticalCellStyleStrategy {
/**
* 操作列
*/
private List<Integer> columnIndexes;
public CustomCellStyleStrategy( List<Integer> columnIndexes ) {
this.columnIndexes = columnIndexes;
}
@Override
public void setHeadCellStyle(Cell cell, Head head, Integer relativeRowIndex) {
super.setHeadCellStyle(cell, head, relativeRowIndex);
}
@Override
protected WriteCellStyle headCellStyle(Head head) {
// 获取样式实例
WriteCellStyle headWriteCellStyle = new WriteCellStyle();
// 获取字体实例
WriteFont headWriteFont = new WriteFont();
// 设置字体样式
headWriteFont.setFontName("宋体");
// 设置字体大小
headWriteFont.setFontHeightInPoints((short)20);
// 边框
headWriteFont.setBold(true);
headWriteCellStyle.setFillForegroundColor(IndexedColors.WHITE.getIndex());
headWriteCellStyle.setWriteFont(headWriteFont);
headWriteCellStyle.setBorderLeft(BorderStyle.NONE);
headWriteCellStyle.setBorderBottom(BorderStyle.NONE);
headWriteCellStyle.setBorderRight(BorderStyle.NONE);
headWriteCellStyle.setBorderTop(BorderStyle.NONE);
return headWriteCellStyle;
}
}
\ No newline at end of file
package com.yifu.cloud.plus.v1.yifu.social.config;
import com.alibaba.excel.metadata.Head;
import com.alibaba.excel.write.metadata.style.WriteCellStyle;
import com.alibaba.excel.write.metadata.style.WriteFont;
import com.alibaba.excel.write.style.AbstractVerticalCellStyleStrategy;
import org.apache.poi.ss.usermodel.*;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
public class CustomCellStyleThreeStrategy extends AbstractVerticalCellStyleStrategy {
/**
* 操作列
*/
private List<Integer> columnIndexes;
public CustomCellStyleThreeStrategy(List<Integer> columnIndexes ) {
this.columnIndexes = columnIndexes;
}
@Override
public void setHeadCellStyle(Cell cell, Head head, Integer relativeRowIndex) {
super.setHeadCellStyle(cell, head, relativeRowIndex);
}
@Override
protected WriteCellStyle headCellStyle(Head head) {
// 获取样式实例
WriteCellStyle headWriteCellStyle = new WriteCellStyle();
// 获取字体实例
WriteFont headWriteFont = new WriteFont();
// 设置字体样式
headWriteFont.setFontName("宋体");
// 设置字体大小
headWriteFont.setFontHeightInPoints((short)12);
// 边框
headWriteFont.setBold(false);
headWriteCellStyle.setFillForegroundColor(IndexedColors.WHITE.getIndex());
headWriteCellStyle.setWriteFont(headWriteFont);
return headWriteCellStyle;
}
@Override
protected WriteCellStyle contentCellStyle(Head head) {
// 获取样式实例
WriteCellStyle headWriteCellStyle = new WriteCellStyle();
// 获取字体实例
WriteFont headWriteFont = new WriteFont();
// 设置字体样式
headWriteFont.setFontName("宋体");
// 设置字体大小
headWriteFont.setFontHeightInPoints((short)12);
// 边框
headWriteFont.setBold(false);
headWriteCellStyle.setFillForegroundColor(IndexedColors.BLACK.getIndex());
headWriteCellStyle.setWriteFont(headWriteFont);
headWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER);
headWriteCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
headWriteCellStyle.setBorderLeft(BorderStyle.THIN);
headWriteCellStyle.setBorderTop(BorderStyle.THIN);
headWriteCellStyle.setBorderRight(BorderStyle.THIN);
headWriteCellStyle.setBorderBottom(BorderStyle.THIN);
return headWriteCellStyle;
}
}
\ No newline at end of file
package com.yifu.cloud.plus.v1.yifu.social.config;
import com.alibaba.excel.metadata.Head;
import com.alibaba.excel.write.metadata.style.WriteCellStyle;
import com.alibaba.excel.write.metadata.style.WriteFont;
import com.alibaba.excel.write.style.AbstractVerticalCellStyleStrategy;
import org.apache.poi.ss.usermodel.BorderStyle;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.IndexedColors;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
public class CustomCellStyleTwoStrategy extends AbstractVerticalCellStyleStrategy {
/**
* 操作列
*/
private List<Integer> columnIndexes;
public CustomCellStyleTwoStrategy(List<Integer> columnIndexes ) {
this.columnIndexes = columnIndexes;
}
@Override
protected WriteCellStyle headCellStyle(Head head) {
// 获取样式实例
WriteCellStyle headWriteCellStyle = new WriteCellStyle();
// 获取字体实例
WriteFont headWriteFont = new WriteFont();
// 设置字体样式
headWriteFont.setFontName("宋体");
// 设置字体大小
headWriteFont.setFontHeightInPoints((short)12);
// 边框
headWriteFont.setBold(false);
headWriteCellStyle.setFillForegroundColor(IndexedColors.WHITE.getIndex());
headWriteCellStyle.setWriteFont(headWriteFont);
headWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.LEFT);
headWriteCellStyle.setBorderLeft(BorderStyle.NONE);
headWriteCellStyle.setBorderBottom(BorderStyle.NONE);
headWriteCellStyle.setBorderRight(BorderStyle.NONE);
headWriteCellStyle.setBorderTop(BorderStyle.NONE);
return headWriteCellStyle;
}
}
\ No newline at end of file
package com.yifu.cloud.plus.v1.yifu.social.config;
import com.alibaba.excel.metadata.Head;
import com.alibaba.excel.metadata.data.WriteCellData;
import com.alibaba.excel.write.metadata.holder.WriteSheetHolder;
import com.alibaba.excel.write.style.column.AbstractColumnWidthStyleStrategy;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Sheet;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
public class CustomCellWriteWidthConfig extends AbstractColumnWidthStyleStrategy {
@Override
protected void setColumnWidth(WriteSheetHolder writeSheetHolder, List<WriteCellData<?>> cellDataList, Cell cell, Head head, Integer integer, Boolean isHead) {
boolean needSetWidth = isHead || !CollectionUtils.isEmpty(cellDataList);
if (needSetWidth) {
Sheet sheet = writeSheetHolder.getSheet();
int columnIndex = cell.getColumnIndex();
// 单元格文本长度大于45换行
if (columnIndex == 3) {
//要求将当前列的列宽设置为33英寸,理论值应该是33×256=8448,
//但是这里的设值是8648,具体原因请看下面的计算逻辑
sheet.setColumnWidth(0, 1000);
sheet.setColumnWidth(3, 5000);
sheet.setColumnWidth(6, 1500);
sheet.setColumnWidth(7, 1500);
sheet.setColumnWidth(8, 1500);
sheet.setColumnWidth(9, 1500);
sheet.setColumnWidth(10, 3000);
sheet.setColumnWidth(12, 3000);
}
}
}
}
\ No newline at end of file
package com.yifu.cloud.plus.v1.yifu.social.config;
import com.alibaba.excel.metadata.Head;
import com.alibaba.excel.metadata.data.WriteCellData;
import com.alibaba.excel.write.metadata.holder.WriteSheetHolder;
import com.alibaba.excel.write.style.column.AbstractColumnWidthStyleStrategy;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Sheet;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
public class CustomCellWriteWidthOneConfig extends AbstractColumnWidthStyleStrategy {
@Override
protected void setColumnWidth(WriteSheetHolder writeSheetHolder, List<WriteCellData<?>> cellDataList, Cell cell, Head head, Integer integer, Boolean isHead) {
boolean needSetWidth = isHead || !CollectionUtils.isEmpty(cellDataList);
if (needSetWidth) {
Sheet sheet = writeSheetHolder.getSheet();
int columnIndex = cell.getColumnIndex();
// 单元格文本长度大于45换行
if (columnIndex == 3) {
//要求将当前列的列宽设置为33英寸,理论值应该是33×256=8448,
//但是这里的设值是8648,具体原因请看下面的计算逻辑
sheet.setColumnWidth(0, 1000);
sheet.setColumnWidth(2, 3500);
sheet.setColumnWidth(3, 5000);
sheet.setColumnWidth(4, 1000);
sheet.setColumnWidth(6, 5000);
sheet.setColumnWidth(7, 4700);
sheet.setColumnWidth(9, 1000);
sheet.setColumnWidth(10, 1000);
sheet.setColumnWidth(11, 1000);
sheet.setColumnWidth(12, 1000);
sheet.setColumnWidth(13, 1000);
sheet.setColumnWidth(14, 1500);
sheet.setColumnWidth(15, 5000);
sheet.setColumnWidth(16, 3200);
sheet.setColumnWidth(17, 3000);
}
}
}
}
\ No newline at end of file
package com.yifu.cloud.plus.v1.yifu.social.config;
import com.alibaba.excel.metadata.Head;
import com.alibaba.excel.metadata.data.WriteCellData;
import com.alibaba.excel.write.metadata.holder.WriteSheetHolder;
import com.alibaba.excel.write.style.column.AbstractColumnWidthStyleStrategy;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Sheet;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
public class CustomCellWriteWidthTwoConfig extends AbstractColumnWidthStyleStrategy {
@Override
protected void setColumnWidth(WriteSheetHolder writeSheetHolder, List<WriteCellData<?>> cellDataList, Cell cell, Head head, Integer integer, Boolean isHead) {
boolean needSetWidth = isHead || !CollectionUtils.isEmpty(cellDataList);
if (needSetWidth) {
Sheet sheet = writeSheetHolder.getSheet();
int columnIndex = cell.getColumnIndex();
// 单元格文本长度大于45换行
if (columnIndex == 3) {
//要求将当前列的列宽设置为33英寸,理论值应该是33×256=8448,
//但是这里的设值是8648,具体原因请看下面的计算逻辑
sheet.setColumnWidth(0, 1000);
sheet.setColumnWidth(1, 4000);
sheet.setColumnWidth(3, 5000);
sheet.setColumnWidth(5, 1000);
sheet.setColumnWidth(6, 1000);
sheet.setColumnWidth(7, 1000);
sheet.setColumnWidth(8, 1000);
sheet.setColumnWidth(9, 1000);
sheet.setColumnWidth(10, 1000);
sheet.setColumnWidth(11, 1000);
sheet.setColumnWidth(12, 1500);
sheet.setColumnWidth(13, 1500);
sheet.setColumnWidth(14, 1500);
sheet.setColumnWidth(15, 1500);
sheet.setColumnWidth(16, 1500);
sheet.setColumnWidth(17, 1000);
sheet.setColumnWidth(18, 1000);
sheet.setColumnWidth(19, 1500);
sheet.setColumnWidth(20, 1500);
sheet.setColumnWidth(21, 1000);
sheet.setColumnWidth(22, 1000);
sheet.setColumnWidth(23, 4000);
}
}
}
}
\ No newline at end of file
......@@ -190,6 +190,24 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> {
**/
List<TDispatchSocialPersionExportVo> getSocialPersionDisRecord(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo);
/**
* @Author huyc
* @Description 社保派单养老模版count
* @Date 15:47 2023/7/18
* @Param
* @return
**/
int getSocialPersionReduceDisCount(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo);
/**
* @Author huyc
* @Description 社保派单养老模版
* @Date 15:47 2023/7/18
* @Param
* @return
**/
List<TDispatchSocialPersionReduceExportVo> getSocialPersionReduceDisRecord(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo);
List<FundHandleExportVo> getFundRecordList(@Param("tDispatchInfo") SocialHandleSearchVo dispatchInfo,
@Param("idsStr") List<String> idsStr);
/**
......
......@@ -25,6 +25,7 @@ import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import com.alibaba.excel.util.ListUtils;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.excel.write.metadata.WriteTable;
import com.alibaba.excel.write.style.row.SimpleRowHeightStyleStrategy;
import com.baomidou.lock.annotation.Lock4j;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
......@@ -50,6 +51,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.social.config.*;
import com.yifu.cloud.plus.v1.yifu.social.constants.DispatchConstants;
import com.yifu.cloud.plus.v1.yifu.social.constants.PreDispatchConstants;
import com.yifu.cloud.plus.v1.yifu.social.entity.*;
......@@ -2863,9 +2865,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
&& (CommonConstants.THREE_STRING.equals(socialFund.getFundStatus())
|| CommonConstants.EIGHT_STRING.equals(socialFund.getFundStatus())
|| CommonConstants.ZERO_STRING.equals(socialFund.getFundStatus())
|| CommonConstants.ONE_STRING.equals(socialFund.getFundStatus())
|| CommonConstants.FIVE_STRING.equals(socialFund.getFundStatus())
|| CommonConstants.SIX_STRING.equals(socialFund.getFundStatus()))) {
|| CommonConstants.ONE_STRING.equals(socialFund.getFundStatus()))) {
errorMessageList1.add(new ErrorMessage(excel.getRowIndex(), excel.getEmpIdcard() + "-" +excel.getEmpName(), CommonConstants.RED, CommonConstants.ONE_STRING));
}
}
......@@ -5097,11 +5097,47 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, TDispatchSocialExportVo.class).includeColumnFieldNames(searchVo.getExportFields()).build();
ExcelWriter excelWriter = EasyExcel.write(out).build();
WriteSheet writeSheet;
WriteTable writeTable0;
WriteTable writeTable1;
WriteTable writeTable2;
WriteTable writeTable3;
WriteTable writeTable4;
TDispatchSocialExportVo vo;
List<Integer> columnIndexes = Arrays.asList(0,12);
CustomCellStyleStrategy customCellStyleStrategy = new CustomCellStyleStrategy(columnIndexes);
CustomCellStyleOneStrategy customCellStyleStrategyOne = new CustomCellStyleOneStrategy(columnIndexes);
CustomCellStyleTwoStrategy customCellStyleStrategyTwo = new CustomCellStyleTwoStrategy(columnIndexes);
CustomCellStyleThreeStrategy customCellStyleStrategyThree = new CustomCellStyleThreeStrategy(columnIndexes);
writeTable0 = EasyExcel.writerTable(0).
head(headOne()).
registerWriteHandler(customCellStyleStrategy).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)40,(short)20)).
build();
writeTable1 = EasyExcel.writerTable(1).
head(headTwo(searchVo.getSocialHouseholdName(),searchVo.getCustomerNo())).
registerWriteHandler(customCellStyleStrategyOne).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)25,(short)20)).
build();
writeTable2 = EasyExcel.writerTable(2).
head(headThree()).
registerWriteHandler(customCellStyleStrategyThree).
registerWriteHandler(new CustomCellWriteWidthConfig()).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)25,(short)20))
.build();
writeTable3 = EasyExcel.writerTable(3).
head(headFour()).
registerWriteHandler(customCellStyleStrategyTwo).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)50,(short)20))
.build();
writeTable4 = EasyExcel.writerTable(4).
head(headFive()).
registerWriteHandler(customCellStyleStrategyTwo).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)25,(short)20))
.build();
//派增的数据
searchVo.setType(CommonConstants.ZERO_STRING);
long count = getSocialDisRecordCount(searchVo);
......@@ -5111,23 +5147,31 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
//判断list的大小是否大于10
if (list.size() < 10) {
int size = 10 - list.size();
int num = list.size() + 1;
for (int i =1;i<= size;i++) {
vo = new TDispatchSocialExportVo();
vo.setNum(list.size() + i);
vo.setNum(num);
num ++;
list.add(vo);
}
}
writeSheet = EasyExcel.writerSheet("增员").needHead(Boolean.FALSE).build();
writeTable0 = EasyExcel.writerTable(0).head(head(searchVo.getSocialHouseholdName(),searchVo.getCustomerNo())).build();
writeTable1 = EasyExcel.writerTable(1).head(head1()).build();
writeSheet = EasyExcel.writerSheet("增员").build();
// 第一次写入会创建头
excelWriter.write(list, writeSheet, writeTable0);
// 第二次写如也会创建头,然后在第一次的后面写入数据
excelWriter.write(new ArrayList<>(), writeSheet, writeTable0);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable1);
// 第二次写如也会创建头,然后在第一次的后面写入数据
excelWriter.write(list, writeSheet, writeTable2);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable3);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable4);
}
} else {
writeSheet = EasyExcel.writerSheet("增员").build();
excelWriter.write(list,writeSheet);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable0);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable1);
// 第二次写如也会创建头,然后在第一次的后面写入数据
excelWriter.write(new ArrayList<>(), writeSheet, writeTable2);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable3);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable4);
}
//派减的数据
searchVo.setType(CommonConstants.ONE_STRING);
......@@ -5138,23 +5182,31 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
//判断list的大小是否大于10
if (list.size() < 10) {
int size = 10 - list.size();
int num = list.size() + 1;
for (int i =1;i<= size;i++) {
vo = new TDispatchSocialExportVo();
vo.setNum(list.size() + i);
vo.setNum(num);
num ++;
list.add(vo);
}
}
writeSheet = EasyExcel.writerSheet("减员").needHead(Boolean.FALSE).build();
writeTable0 = EasyExcel.writerTable(0).head(head(searchVo.getSocialHouseholdName(),searchVo.getCustomerNo())).build();
writeTable1 = EasyExcel.writerTable(1).head(head1()).build();
writeSheet = EasyExcel.writerSheet("减员").build();
// 第一次写入会创建头
excelWriter.write(list, writeSheet, writeTable0);
// 第二次写如也会创建头,然后在第一次的后面写入数据
excelWriter.write(new ArrayList<>(), writeSheet, writeTable0);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable1);
// 第二次写如也会创建头,然后在第一次的后面写入数据
excelWriter.write(list, writeSheet, writeTable2);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable3);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable4);
}
} else {
writeSheet = EasyExcel.writerSheet("减员").build();
excelWriter.write(list,writeSheet);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable0);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable1);
// 第二次写如也会创建头,然后在第一次的后面写入数据
excelWriter.write(new ArrayList<>(), writeSheet, writeTable2);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable3);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable4);
}
if (excelWriter!= null) {
excelWriter.finish();
......@@ -5180,64 +5232,143 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, TDispatchSocialPersionExportVo.class).includeColumnFieldNames(searchVo.getExportFields()).build();
ExcelWriter excelWriter = EasyExcel.write(out).build();
WriteSheet writeSheet;
WriteTable writeTable0;
WriteTable writeTable1;
WriteTable writeTable2;
WriteTable writeTable3;
WriteTable writeTable4;
TDispatchSocialPersionExportVo vo;
TDispatchSocialPersionReduceExportVo reduceVo;
//派增的数据
searchVo.setType(CommonConstants.ZERO_STRING);
long count = getSocialPersionDisCount(searchVo);
List<Integer> columnIndexes = Arrays.asList(0,17);
CustomCellStyleStrategy customCellStyleStrategy = new CustomCellStyleStrategy(columnIndexes);
CustomCellStyleOneStrategy customCellStyleStrategyOne = new CustomCellStyleOneStrategy(columnIndexes);
CustomCellStyleTwoStrategy customCellStyleStrategyTwo = new CustomCellStyleTwoStrategy(columnIndexes);
CustomCellStyleThreeStrategy customCellStyleStrategyThree = new CustomCellStyleThreeStrategy(columnIndexes);
writeTable0 = EasyExcel.writerTable(0).
head(persionHeadOne()).
registerWriteHandler(customCellStyleStrategy).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)40,(short)20)).
build();
writeTable1 = EasyExcel.writerTable(1).
head(persionHeadTwo(searchVo.getSocialHouseholdName(),searchVo.getCustomerNo())).
registerWriteHandler(customCellStyleStrategyOne).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)20,(short)20)).
build();
writeTable2 = EasyExcel.writerTable(2).
head(persionHead()).
registerWriteHandler(customCellStyleStrategyThree).
registerWriteHandler(new CustomCellWriteWidthOneConfig()).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)30,(short)20))
.build();
writeTable3 = EasyExcel.writerTable(3).
head(persionHeadThree()).
registerWriteHandler(customCellStyleStrategyTwo).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)150,(short)20))
.build();
writeTable4 = EasyExcel.writerTable(4).
head(persionHead1()).
registerWriteHandler(customCellStyleStrategyTwo).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)20,(short)20))
.build();
if (count > CommonConstants.ZERO_INT){
list = getSocialPersionDisRecord(searchVo);
if (Common.isNotNull(list)) {
//判断list的大小是否大于10
if (list.size() < 10) {
int size = 10 - list.size();
int num = list.size() + 1;
for (int i =1;i<= size;i++) {
vo = new TDispatchSocialPersionExportVo();
vo.setNum(list.size() + i);
vo.setNum(num);
num ++;
list.add(vo);
}
}
writeSheet = EasyExcel.writerSheet("增员").needHead(Boolean.FALSE).build();
writeTable0 = EasyExcel.writerTable(0).head(persionHead(searchVo.getSocialHouseholdName(),searchVo.getCustomerNo())).build();
writeTable1 = EasyExcel.writerTable(1).head(persionHead1()).build();
writeSheet = EasyExcel.writerSheet("增员").build();
// 第一次写入会创建头
excelWriter.write(list, writeSheet, writeTable0);
// 第二次写如也会创建头,然后在第一次的后面写入数据
excelWriter.write(new ArrayList<>(), writeSheet, writeTable0);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable1);
excelWriter.write(list, writeSheet, writeTable2);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable3);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable4);
}
} else {
writeSheet = EasyExcel.writerSheet("增员").build();
excelWriter.write(list,writeSheet);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable0);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable1);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable2);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable3);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable4);
}
//派减的数据
searchVo.setType(CommonConstants.ONE_STRING);
long count1 = getSocialPersionDisCount(searchVo);
long count1 = getSocialPersionReduceDisCount(searchVo);
//获取要导出的列表
List<TDispatchSocialPersionReduceExportVo> listReduce = new ArrayList<>();
List<Integer> columnIndex = Arrays.asList(0,23);
CustomCellStyleStrategy customCellStyleStrategy1 = new CustomCellStyleStrategy(columnIndex);
CustomCellStyleOneStrategy customCellStyleStrategy2 = new CustomCellStyleOneStrategy(columnIndex);
CustomCellStyleTwoStrategy customCellStyleStrategy3 = new CustomCellStyleTwoStrategy(columnIndex);
CustomCellStyleThreeStrategy customCellStyleStrategy4 = new CustomCellStyleThreeStrategy(columnIndex);
writeTable0 = EasyExcel.writerTable(0).
head(persionReduceHeadOne()).
registerWriteHandler(customCellStyleStrategy1).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)40,(short)20)).
build();
writeTable1 = EasyExcel.writerTable(1).
head(persionReduceHeadTwo(searchVo.getSocialHouseholdName(),searchVo.getCustomerNo())).
registerWriteHandler(customCellStyleStrategy2).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)20,(short)20)).
build();
writeTable2 = EasyExcel.writerTable(2).
head(persionReduceHead()).
registerWriteHandler(customCellStyleStrategy4).
registerWriteHandler(new CustomCellWriteWidthTwoConfig()).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)50,(short)20))
.build();
writeTable3 = EasyExcel.writerTable(3).
head(persionReduceHead1()).
registerWriteHandler(customCellStyleStrategy3).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)40,(short)20))
.build();
if (count1 > CommonConstants.ZERO_INT){
list = getSocialPersionDisRecord(searchVo);
if (Common.isNotNull(list)) {
listReduce = getSocialPersionReduceDisRecord(searchVo);
if (Common.isNotNull(listReduce)) {
//判断list的大小是否大于10
if (list.size() < 10) {
int size = 10 - list.size();
if (listReduce.size() < 10) {
int size = 10 - listReduce.size();
int num = listReduce.size() + 1;
for (int i =1;i<= size;i++) {
vo = new TDispatchSocialPersionExportVo();
vo.setNum(list.size() + i);
list.add(vo);
reduceVo = new TDispatchSocialPersionReduceExportVo();
reduceVo.setNum(num);
num ++;
listReduce.add(reduceVo);
}
}
writeSheet = EasyExcel.writerSheet("减员").needHead(Boolean.FALSE).build();
writeTable0 = EasyExcel.writerTable(0).head(persionHead(searchVo.getSocialHouseholdName(),searchVo.getCustomerNo())).build();
writeTable1 = EasyExcel.writerTable(1).head(persionHead1()).build();
writeSheet = EasyExcel.writerSheet("减员").build();
// 第一次写入会创建头
excelWriter.write(list, writeSheet, writeTable0);
// 第二次写如也会创建头,然后在第一次的后面写入数据
excelWriter.write(new ArrayList<>(), writeSheet, writeTable0);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable1);
excelWriter.write(listReduce, writeSheet, writeTable2);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable3);
}
} else {
writeSheet = EasyExcel.writerSheet("减员").build();
excelWriter.write(list,writeSheet);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable0);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable1);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable2);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable3);
}
if (excelWriter!= null) {
excelWriter.finish();
......@@ -5247,136 +5378,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
}
/**
* @Author huyc
* @Description 导出社保派单花名册
* @Date 09:05 2023/7/19
* @return
*/
public List<List<String>> head(String houseName,String cusNo) {
List<List<String>> list = new ArrayList<>();
//表头数据
String a="合肥市基本医疗保险参保登记表";
String b="单位名称(盖章): " + houseName + " 单位统一信用代码:" + cusNo;
String c="人员类型: □√单位职工 □灵活就业人员";
String d="变更类别";
//第一列
list.add( Lists.newArrayList(a,b,c,"序号","序号"));
//第二列
list.add( Lists.newArrayList(a,b,c,"姓名","姓名"));
//第三列
list.add( Lists.newArrayList(a,b,c,"身份证件类型","身份证件类型"));
//第四列
list.add( Lists.newArrayList(a,b,c,"身份证件号码","身份证件号码"));
//第五列
list.add( Lists.newArrayList(a,b,c,"参报/停保时间","参报/停保时间"));
//第六列
list.add( Lists.newArrayList(a,b,c,"申报工资(元)","申报工资(元)"));
//变更类别
List<String> orderSpeaces = Lists.newArrayList("新增","续保","中断","终止");
orderSpeaces.forEach(e->{
list.add( Lists.newArrayList(a,b,c,d ,e) );
});
//第十一列
list.add( Lists.newArrayList(a,b,c,"手机号码","手机号码"));
//第十二列
list.add( Lists.newArrayList(a,b,c,"学历","学历"));
//第十三列
list.add( Lists.newArrayList(a,b,c,"备注","备注"));
return list;
}
/**
* @Author huyc
* @Description 导出社保派单花名册
* @Date 09:05 2023/7/19
* @return
*/
public List<List<String>> head1() {
List<List<String>> list = new ArrayList<>();
//表头数据
String a = "备注: 1.身份证类型填写:身份证、护照、港澳台通行证等; \n" +
"2.增加人员勾选新增或续保,减少人员勾选中断或终止,按相应类型进行勾选;\n" +
"3.联系电话务必填写准确的手机号码;\n";
String b="填报人: 联系电话: 经办人(盖章): " +
DateUtil.getYear(DateUtil.getCurrentDateTime())+ " 年" + " " +
DateUtil.getMonth(DateUtil.getCurrentDateTime()) +" 月" + " " +
DateUtil.getDay(DateUtil.getCurrentDateTime()) + " 日";
//第一列
list.add(Lists.newArrayList(a,b));
return list;
}
/**
* @Author huyc
* @Description 导出社保派单花名册
* @Date 09:05 2023/7/21
* @return
*/
public List<List<String>> persionHead(String houseName,String cusNo) {
List<List<String>> list = new ArrayList<>();
//表头数据
String a="职 工 社 会 保 险 增 加 花 名 册";
String b="单位名称(签章): " + houseName + " 单位编码:" + cusNo;
String c="参加保险险种";
//第一列
list.add( Lists.newArrayList(a,b,"序号","序号"));
//第二列
list.add( Lists.newArrayList(a,b,"姓名","姓名"));
//第三列
list.add( Lists.newArrayList(a,b,"职工编码","职工编码"));
//第四列
list.add( Lists.newArrayList(a,b,"社会保障号码(身份证号码)","社会保障号码(身份证号码)"));
//第五列
list.add( Lists.newArrayList(a,b,"性别","性别"));
//第六列
list.add( Lists.newArrayList(a,b,"民族","民族"));
//第七列
list.add( Lists.newArrayList(a,b,"参加工作时间","参加工作时间"));
//第八列
list.add( Lists.newArrayList(a,b,"户口性质","户口性质"));
//第九列
list.add( Lists.newArrayList(a,b,"个人身份","个人身份"));
//参加保险险种
List<String> orderSpeaces = Lists.newArrayList("养老","失业","医疗","工伤","生育");
orderSpeaces.forEach(e->{
list.add( Lists.newArrayList(a,b,c,e) );
});
//第十五列
list.add( Lists.newArrayList(a,b,"月工资收入(元)","月工资收入(元)"));
//第十六列
list.add( Lists.newArrayList(a,b,"补缴保险属期","补缴保险属期"));
//第十七列
list.add( Lists.newArrayList(a,b,"户籍所在地","户籍所在地"));
//第十八列
list.add( Lists.newArrayList(a,b,"备注","备注"));
return list;
}
/**
* @Author huyc
* @Description 导出社保派单花名册
* @Date 11:12 2023/7/21
* @return
*/
public List<List<String>> persionHead1() {
List<List<String>> list = new ArrayList<>();
//表头数据
String a = "1、“户口性质”栏按下列类别填写:非农业户口(城镇)、本地非农业户口(本地城镇)、外地非农业户口(外地城镇)、农业户口(农村)、 \n" +
" 本地农业户口(本地农村)、外地农业户口(外地农村)、港澳台、外籍 \n" +
"2、“个人身份”栏按下列类别填写:“企业职工”、“国家公务员”、“事业单位在编人员”、“编外人员”、“现役军人”、“协保人员”、“公益性岗位”“农民工医保” \n" +
"3、“参加保险险种”栏可对应选项打“√” \n" +
"4、新增人员(含断保再次缴费人员),个人月工资收入按起薪工资额申报。\n" +
"5、补缴时段超过3个月的,缴费基数为历年安徽省社平工资,同时加征利息(含参保当月的缴费基数)。\n" +
"6、如属军队退役人员或劳模人员在备注栏中填写,“退役军人类别”栏按下列类别填写:军队转业干部、计划分配的军队转业干部、自主择业的军队转业干部、退伍复员军人、转业复员士官、退伍 \n" +
"义务兵(含伤病残义务兵)、复员干部,“劳模级别”栏按下列类别填写:国家级、省(自治区、直辖市)级、部(委)级、地(市、厅、局)级、其他 \n" +
"7、本表需填制一式两份,经办机构审核盖章后方可有效,一份单位自存,一份报市社会保险经办机构。";
String b="填报人: 单位联系电话: 社保经办机构审核人: " + "填报日期: " + DateUtil.getYear(DateUtil.getCurrentDateTime())+ " 年" + " " + DateUtil.getMonth(DateUtil.getCurrentDateTime()) +" 月" + " " + DateUtil.getDay(DateUtil.getCurrentDateTime()) + " 日";
//第一列
list.add(Lists.newArrayList(a,b));
return list;
}
private List<FundHandleExportVo> getFundRecordList(SocialHandleSearchVo searchVo, String idStr) {
return baseMapper.getFundRecordList(searchVo,Common.getList(idStr));
}
......@@ -5405,6 +5406,14 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return baseMapper.getSocialPersionDisRecord(searchVo);
}
private long getSocialPersionReduceDisCount(SocialHandleSearchVo searchVo) {
return baseMapper.getSocialPersionReduceDisCount(searchVo);
}
private List<TDispatchSocialPersionReduceExportVo> getSocialPersionReduceDisRecord(SocialHandleSearchVo searchVo) {
return baseMapper.getSocialPersionReduceDisRecord(searchVo);
}
/**
* @param socialFundInfo
* @Description: 获取最小起缴日
......@@ -5954,4 +5963,314 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return false;
}
/**
* @Author huyc
* @Description 导出社保派单花名册
* @Date 09:05 2023/7/19
* @return
*/
public List<List<String>> headOne() {
List<List<String>> list = new ArrayList<>();
//表头数据
String a="合肥市基本医疗保险参保登记表";
//第一列-第十三列
for (int i =1;i<= 13;i++) {
list.add(Lists.newArrayList(a));
}
return list;
}
/**
* @Author huyc
* @Description 导出社保派单花名册
* @Date 09:05 2023/7/19
* @return
*/
public List<List<String>> headTwo(String houseName,String cusNo) {
List<List<String>> list = new ArrayList<>();
//表头数据
String b = "单位名称(盖章): " + houseName + " 单位统一信用代码:" + cusNo;
String c = "人员类型: □√单位职工 □灵活就业人员";
for (int i =1;i<= 13;i++) {
list.add(Lists.newArrayList(b,c));
}
return list;
}
/**
* @Author huyc
* @Description 导出社保派单花名册
* @Date 09:05 2023/7/19
* @return
*/
public List<List<String>> headThree() {
List<List<String>> list = new ArrayList<>();
//表头数据
String d="变更类别";
//第一列
list.add( Lists.newArrayList("序号","序号"));
//第二列
list.add( Lists.newArrayList("姓名","姓名"));
//第三列
list.add( Lists.newArrayList("身份证件类型","身份证件类型"));
//第四列
list.add( Lists.newArrayList("身份证件号码","身份证件号码"));
//第五列
list.add( Lists.newArrayList("参报/停保时间","参报/停保时间"));
//第六列
list.add( Lists.newArrayList("申报工资(元)","申报工资(元)"));
//变更类别
List<String> orderSpeaces = Lists.newArrayList("新增","续保","中断","终止");
orderSpeaces.forEach(e->{
list.add( Lists.newArrayList(d ,e) );
});
//第十一列
list.add( Lists.newArrayList("手机号码","手机号码"));
//第十二列
list.add( Lists.newArrayList("学历","学历"));
//第十三列
list.add( Lists.newArrayList(" 备注"," 备注"));
return list;
}
/**
* @Author huyc
* @Description 导出社保派单花名册
* @Date 09:05 2023/7/19
* @return
*/
public List<List<String>> headFour() {
List<List<String>> list = new ArrayList<>();
//表头数据
String a = "备注: 1.身份证类型填写:身份证、护照、港澳台通行证等; \n" +
" 2.增加人员勾选新增或续保,减少人员勾选中断或终止,按相应类型进行勾选;\n" +
" 3.联系电话务必填写准确的手机号码;\n";
//第一列-第十三列
for (int i =1;i<= 13;i++) {
list.add(Lists.newArrayList(a));
}
return list;
}
/**
* @Author huyc
* @Description 导出社保派单花名册
* @Date 09:05 2023/7/19
* @return
*/
public List<List<String>> headFive() {
List<List<String>> list = new ArrayList<>();
String b="填报人: 联系电话: 经办人(盖章): " +
DateUtil.getYear(DateUtil.getCurrentDateTime())+ " 年" + " " +
DateUtil.getMonth(DateUtil.getCurrentDateTime()) +" 月" + " " +
DateUtil.getDay(DateUtil.getCurrentDateTime()) + " 日";
//第一列-第十三列
for (int i =1;i<= 13;i++) {
list.add(Lists.newArrayList(b));
}
return list;
}
/**
* @Author huyc
* @Description 导出社保派单花名册
* @Date 09:05 2023/7/19
* @return
*/
public List<List<String>> persionHeadOne() {
List<List<String>> list = new ArrayList<>();
//表头数据
String a="职 工 社 会 保 险 增 加 花 名 册";
//第一列-第十八列
for (int i =1;i<= 18;i++) {
list.add(Lists.newArrayList(a));
}
return list;
}
/**
* @Author huyc
* @Description 导出社保派单花名册
* @Date 09:05 2023/7/19
* @return
*/
public List<List<String>> persionHeadTwo(String houseName,String cusNo) {
List<List<String>> list = new ArrayList<>();
//表头数据
String a="单位名称(签章): " + houseName + " 单位编码:" + cusNo;
//第一列-第十八列
for (int i =1;i<= 18;i++) {
list.add(Lists.newArrayList(a));
}
return list;
}
/**
* @Author huyc
* @Description 导出社保派单花名册
* @Date 09:05 2023/7/21
* @return
*/
public List<List<String>> persionHead() {
List<List<String>> list = new ArrayList<>();
//表头数据
String c="参加保险险种";
//第一列
list.add( Lists.newArrayList("序号","序号"));
//第二列
list.add( Lists.newArrayList("姓名","姓名"));
//第三列
list.add( Lists.newArrayList("职工编码","职工编码"));
//第四列
list.add( Lists.newArrayList("社会保障号码(身份证号码)","社会保障号码(身份证号码)"));
//第五列
list.add( Lists.newArrayList("性别","性别"));
//第六列
list.add( Lists.newArrayList("民族","民族"));
//第七列
list.add( Lists.newArrayList("参加工作时间","参加工作时间"));
//第八列
list.add( Lists.newArrayList("户口性质","户口性质"));
//第九列
list.add( Lists.newArrayList("个人身份","个人身份"));
//参加保险险种
List<String> orderSpeaces = Lists.newArrayList("养老","失业","医疗","工伤","生育");
orderSpeaces.forEach(e->{
list.add( Lists.newArrayList(c,e) );
});
//第十五列
list.add( Lists.newArrayList("月工资收入(元)","月工资收入(元)"));
//第十六列
list.add( Lists.newArrayList("补缴保险属期","补缴保险属期"));
//第十七列
list.add( Lists.newArrayList("户籍所在地","户籍所在地"));
//第十八列
list.add( Lists.newArrayList("备注","备注"));
return list;
}
/**
* @Author huyc
* @Description 导出社保派单花名册
* @Date 11:12 2023/7/21
* @return
*/
public List<List<String>> persionHeadThree() {
List<List<String>> list = new ArrayList<>();
//表头数据
String a = "1、“户口性质”栏按下列类别填写:非农业户口(城镇)、本地非农业户口(本地城镇)、外地非农业户口(外地城镇)、农业户口(农村)、 \n" +
" 本地农业户口(本地农村)、外地农业户口(外地农村)、港澳台、外籍 \n" +
"2、“个人身份”栏按下列类别填写:“企业职工”、“国家公务员”、“事业单位在编人员”、“编外人员”、“现役军人”、“协保人员”、“公益性岗位”“农民工医保” \n" +
"3、“参加保险险种”栏可对应选项打“√” \n" +
"4、新增人员(含断保再次缴费人员),个人月工资收入按起薪工资额申报。\n" +
"5、补缴时段超过3个月的,缴费基数为历年安徽省社平工资,同时加征利息(含参保当月的缴费基数)。\n" +
"6、如属军队退役人员或劳模人员在备注栏中填写,“退役军人类别”栏按下列类别填写:军队转业干部、计划分配的军队转业干部、自主择业的军队转业干部、退伍复员军人、转业复员士官、退伍 \n" +
"义务兵(含伤病残义务兵)、复员干部,“劳模级别”栏按下列类别填写:国家级、省(自治区、直辖市)级、部(委)级、地(市、厅、局)级、其他 \n" +
"7、本表需填制一式两份,经办机构审核盖章后方可有效,一份单位自存,一份报市社会保险经办机构。";
//第一列-第十八列
for (int i =1;i<= 18;i++) {
list.add(Lists.newArrayList(a));
}
return list;
}
/**
* @Author huyc
* @Description 导出社保派单花名册
* @Date 11:12 2023/7/21
* @return
*/
public List<List<String>> persionHead1() {
List<List<String>> list = new ArrayList<>();
//表头数据
String b="填报人: 单位联系电话: 社保经办机构审核人: " + "填报日期: " + DateUtil.getYear(DateUtil.getCurrentDateTime())+ " 年" + " " + DateUtil.getMonth(DateUtil.getCurrentDateTime()) +" 月" + " " + DateUtil.getDay(DateUtil.getCurrentDateTime()) + " 日";
//第一列-第十八列
for (int i =1;i<= 18;i++) {
list.add(Lists.newArrayList(b));
}
return list;
}
/**
* @Author huyc
* @Description 导出社保派单花名册
* @Date 09:05 2023/7/19
* @return
*/
public List<List<String>> persionReduceHeadOne() {
List<List<String>> list = new ArrayList<>();
//表头数据
String a=" 社 会 保 险 缴 费 单 位 人 员 减 少 花 名 册";
//第一列-第二十五列
for (int i =1;i<= 24;i++) {
list.add(Lists.newArrayList(a));
}
return list;
}
/**
* @Author huyc
* @Description 导出社保派单花名册
* @Date 09:05 2023/7/19
* @return
*/
public List<List<String>> persionReduceHeadTwo(String houseName,String cusNo) {
List<List<String>> list = new ArrayList<>();
//表头数据
String a="单位名称(签章): " + houseName + " 单位编码:" + cusNo;
//第一列-第二十五列
for (int i =1;i<= 24;i++) {
list.add(Lists.newArrayList(a));
}
return list;
}
/**
* @Author huyc
* @Description 导出社保派单花名册
* @Date 09:05 2023/7/21
* @return
*/
public List<List<String>> persionReduceHead() {
List<List<String>> list = new ArrayList<>();
//表头数据
String c="减少原因";
//第一列
list.add( Lists.newArrayList("序号","序号"));
//第二列
list.add( Lists.newArrayList("职工编码","职工编码"));
//第三列
list.add( Lists.newArrayList("姓名","姓名"));
//第四列
list.add( Lists.newArrayList("社会保障号码(身份证号码)","社会保障号码(身份证号码)"));
//第五列
list.add( Lists.newArrayList("停止缴费时间","停止缴费时间"));
//减少原因
List<String> orderSpeaces = Lists.newArrayList("辞职","辞退","参军","上学","劳改","劳教","除名","人员失踪","停薪留职","解除合同","统筹内调出","调出统筹范围","退休","死亡","出国定居","港澳台定居","退保","其他");
orderSpeaces.forEach(e->{
list.add( Lists.newArrayList(c,e) );
});
list.add( Lists.newArrayList("备注","备注"));
return list;
}
/**
* @Author huyc
* @Description 导出社保派单花名册
* @Date 11:12 2023/7/21
* @return
*/
public List<List<String>> persionReduceHead1() {
List<List<String>> list = new ArrayList<>();
//表头数据
String a = "说明1、“减少原因”栏可对应选项打“√”; \n" +
"2、本表需填制一式二份,经办机构审核盖章后方可有效,一份单位自存,一份报市社会保险经办机构。";
String b="填报人: 单位联系电话: 社保经办机构审核人: " + "填报日期: " + DateUtil.getYear(DateUtil.getCurrentDateTime())+ " 年" + " " + DateUtil.getMonth(DateUtil.getCurrentDateTime()) +" 月" + " " + DateUtil.getDay(DateUtil.getCurrentDateTime()) + " 日";
//第一列-第十八列
for (int i =1;i<= 24;i++) {
list.add(Lists.newArrayList(a,b));
}
return list;
}
}
......@@ -47,7 +47,6 @@
<result property="houseType" column="HOUSE_TYPE"/>
<result property="customerNo" column="CUSTOMER_NO"/>
<result property="unitCreditCode" column="UNIT_CREDIT_CODE"/>
<result property="fundPer" column="FUND_PER"/>
<result property="fundBank" column="FUND_BANK"/>
</resultMap>
......@@ -81,11 +80,9 @@
a.HOUSE_TYPE,
a.CUSTOMER_NO,
a.UNIT_CREDIT_CODE,
a.FUND_PER,
a.FUND_BANK,
a.HANDLE_USER_NAME
</sql>
<sql id="sysHouseHoldInfo_where">
<if test="sysHouseHoldInfo != null">
<if test="sysHouseHoldInfo.id != null and sysHouseHoldInfo.id.trim() != ''">
......@@ -106,6 +103,9 @@
<if test="sysHouseHoldInfo.type != null and sysHouseHoldInfo.type.trim() != ''">
AND a.TYPE = #{sysHouseHoldInfo.type}
</if>
<if test="sysHouseHoldInfo.houseType != null and sysHouseHoldInfo.houseType.trim() != ''">
AND a.HOUSE_TYPE = #{sysHouseHoldInfo.houseType}
</if>
<if test="sysHouseHoldInfo.province != null and sysHouseHoldInfo.province.trim() != ''">
AND a.PROVINCE = #{sysHouseHoldInfo.province}
</if>
......
......@@ -212,6 +212,33 @@
<result property="remark" column="REMARK"/>
</resultMap>
<resultMap id="socialPersionReduceDisExportMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchSocialPersionReduceExportVo">
<result property="num" column="num"/>
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="empNo" column="EMP_NO"/>
<result property="empName" column="EMP_NAME"/>
<result property="workDate" column="WORK_DATE"/>
<result property="typeA" column="typeA"/>
<result property="typeB" column="typeB"/>
<result property="typeC" column="typeC"/>
<result property="typeD" column="typeD"/>
<result property="typeE" column="typeE"/>
<result property="typeW" column="typeW"/>
<result property="typeF" column="typeF"/>
<result property="typeG" column="typeG"/>
<result property="typeH" column="typeH"/>
<result property="typeI" column="typeI"/>
<result property="typeJ" column="typeJ"/>
<result property="typeK" column="typeK"/>
<result property="typeL" column="typeL"/>
<result property="typeM" column="typeM"/>
<result property="typeN" column="typeN"/>
<result property="typeO" column="typeO"/>
<result property="typeP" column="typeP"/>
<result property="typeQ" column="typeQ"/>
<result property="remark" column="REMARK"/>
</resultMap>
<!-- 派单审核导出vo -->
<resultMap id="exportAuditMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchAuditExportVo">
<result property="empName" column="EMP_NAME"/>
......@@ -1240,7 +1267,20 @@
WHEN 1 THEN '男'
WHEN 0 THEN '女'
END sex,
a.EMP_NATIONAL,
case when a.EMP_NATIONAL = 1 then "汉族"
when a.EMP_NATIONAL = 2 then "傣族"
when a.EMP_NATIONAL = 3 then "回族"
when a.EMP_NATIONAL = 4 then "未知"
when a.EMP_NATIONAL = 5 then "满族"
when a.EMP_NATIONAL = 6 then "壮族"
when a.EMP_NATIONAL = 7 then "黎族"
when a.EMP_NATIONAL = 8 then "蒙古族"
when a.EMP_NATIONAL = 9 then "白族"
when a.EMP_NATIONAL = 10 then "仫佬族"
when a.EMP_NATIONAL = 11 then "土家族"
when a.EMP_NATIONAL = 12 then "畬族"
when a.EMP_NATIONAL = 13 then "苗族"
else "汉族" end as EMP_NATIONAL,
concat(ifnull(DATE_FORMAT(a.CONTRACT_START,"%Y%m%d"),''),'-',ifnull(DATE_FORMAT(a.CONTRACT_END,"%Y%m%d"),'')) as WORK_DATE,
'非农业户口(城镇)' as type,
'企业职工' as SIGNLE_TYPE,
......@@ -1262,6 +1302,49 @@
</where>
</select>
<!--tDispatchInfo 社保养老花名册派单数据-->
<select id="getSocialPersionReduceDisCount" resultType="java.lang.Integer">
SELECT count(1)
FROM t_dispatch_info a
<where>
<include refid="where_getSocialPersionDisRecord"/>
</where>
</select>
<!--tDispatchInfo 社保养老花名册派单数据-->
<select id="getSocialPersionReduceDisRecord" resultMap="socialPersionReduceDisExportMap">
SELECT
(@i :=@i+1) as num,
a.EMP_NO,
a.EMP_NAME,
a.EMP_IDCARD,
DATE_FORMAT(a.CREATE_TIME,"%Y%m") as WORK_DATE,
'√' as typeA,
'' as typeB,
'' as typeC,
'' as typeD,
'' as typeE,
'' as typeW,
'' as typeF,
'' as typeG,
'' as typeH,
'' as typeJ,
'' as typeK,
'' as typeL,
'' as typeM,
'' as typeN,
'' as typeO,
'' as typeP,
'' as typeQ,
a.EMP_MOBILE as REMARK
FROM t_dispatch_info a
left join t_social_info s on s.id=a.SOCIAL_ID
,(select @i:=0) as itable
<where>
<include refid="where_getSocialPersionDisRecord"/>
</where>
</select>
<!--tDispatchInfo 公积金变更清册查询-->
<select id="getFundRecordList" resultMap="fundHandleMap">
SELECT
......@@ -1687,9 +1770,6 @@
<if test="tDispatchInfo.type != null and tDispatchInfo.type.trim() != ''">
AND a.TYPE = #{tDispatchInfo.type}
</if>
<if test="tDispatchInfo.socialHouseholdName != null and tDispatchInfo.socialHouseholdName.trim() != ''">
AND a.SOCIAL_HOUSEHOLD_NAME = #{tDispatchInfo.socialHouseholdName}
</if>
<if test="tDispatchInfo.disMonth != null and tDispatchInfo.disMonth.trim() != ''">
AND replace(DATE_FORMAT(a.CREATE_TIME,"%Y-%m"),'-','') = #{tDispatchInfo.disMonth}
</if>
......@@ -1714,9 +1794,6 @@
<if test="tDispatchInfo.type != null and tDispatchInfo.type.trim() != ''">
AND a.TYPE = #{tDispatchInfo.type}
</if>
<if test="tDispatchInfo.socialHouseholdName != null and tDispatchInfo.socialHouseholdName.trim() != ''">
AND a.SOCIAL_HOUSEHOLD_NAME = #{tDispatchInfo.socialHouseholdName}
</if>
<if test="tDispatchInfo.disMonth != null and tDispatchInfo.disMonth.trim() != ''">
AND replace(DATE_FORMAT(a.CREATE_TIME,"%Y-%m"),'-','') = #{tDispatchInfo.disMonth}
</if>
......
......@@ -1474,11 +1474,12 @@
SELECT
count(1)
FROM (
select w.SOCIAL_HOUSEHOLD,w.PROVIDENT_HOUSEHOLD from (
select w.SOCIAL_HOUSEHOLD,w.PROVIDENT_HOUSEHOLD,w.SECOND_INDICATOR_BELONG from (
(SELECT
CONCAT( a.EMP_IDCARD, '_', a.SOCIAL_PAY_MONTH, '_', a.SOCIAL_CREATE_MONTH, '_', a.SETTLE_DOMAIN_CODE ) AS keyGroup,
a.SOCIAL_HOUSEHOLD,
a.PROVIDENT_HOUSEHOLD
a.PROVIDENT_HOUSEHOLD,
a.SECOND_INDICATOR_BELONG
FROM t_payment_info a
<where>
IFNULL(a.SOCIAL_ID,'1') != '1'
......@@ -1490,7 +1491,8 @@
(SELECT
CONCAT( a.EMP_IDCARD, '_', a.PROVIDENT_PAY_MONTH, '_', a.PROVIDENT_CREATE_MONTH, '_', a.SETTLE_DOMAIN_CODE ) AS keyGroup,
a.SOCIAL_HOUSEHOLD,
a.PROVIDENT_HOUSEHOLD
a.PROVIDENT_HOUSEHOLD,
a.SECOND_INDICATOR_BELONG
FROM t_payment_info a
<where>
IFNULL(a.FUND_ID,'1') != '1'
......@@ -2337,6 +2339,7 @@
,p.SETTLE_DOMAIN_CODE = #{dept.departNo}
,p.UNIT_ID = #{dept.customerId}
,p.UNIT_NAME = #{dept.customerName}
,p.SECOND_INDICATOR_BELONG = #{dept.secondIndicatorBelong}
where (p.SALARY_SOCIAL_FLAG = '0' and p.SALARY_FUND_FLAG = '0') and p.id in
<foreach item="item" index="index" collection="idSet" open="(" separator="," close=")">
#{item}
......
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