Commit 82659bb9 authored by fangxinjiang's avatar fangxinjiang

check update

parent 76ab6527
......@@ -5,7 +5,7 @@ metadata:
namespace: qas-mvp
spec:
gateways:
- istio-system/qas-yifu-gateway
- istio-system/qas-worfu
hosts:
- qas-mvp-yifu-auth.yifucenter.com
http:
......
......@@ -5,7 +5,7 @@ metadata:
namespace: qas-mvp
spec:
gateways:
- istio-system/qas-yifu-gateway
- istio-system/qas-worfu
hosts:
- qas-mvp-yifu-upms.yifucenter.com
http:
......
......@@ -136,14 +136,10 @@ public class TSettleDomainController {
**/
@Operation(description = "获取登录用户拥有的项目数据)")
@Inner
@GetMapping("/getSettleDomainIdsByUserId")
public TSettleDomainListVo getSettleDomainIdsByUserId() {
YifuUser user = SecurityUtils.getUser();
if (null == user || null == user.getId()) {
return null;
}
@PostMapping("/getSettleDomainIdsByUserId")
public TSettleDomainListVo getSettleDomainIdsByUserId(@RequestBody String userId) {
TSettleDomainListVo vo = new TSettleDomainListVo();
vo.setDeptIds(tSettleDomainService.getSettleDomainIdsByUserId(user.getId()));
vo.setDeptIds(tSettleDomainService.getSettleDomainIdsByUserId(userId));
return vo;
}
......
......@@ -42,7 +42,7 @@ public interface TCutsomerDataPermissonMapper extends BaseMapper<TCutsomerDataPe
* @param userId
* @return
**/
List<TCutsomerDataPermisson> selectAllSettleDomainPermissionByUserId(@Param("userId")int userId);
List<TCutsomerDataPermisson> selectAllSettleDomainPermissionByUserId(@Param("userId")String userId);
String getCustomerServiceByid(@Param("id")String id);
......
......@@ -77,7 +77,7 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
if (settleDomainVoR != null) {
return (List<String>) settleDomainVoR;
} else {
List<TCutsomerDataPermisson> permissonList = permissonMapper.selectAllSettleDomainPermissionByUserId(Integer.parseInt(userId));
List<TCutsomerDataPermisson> permissonList = permissonMapper.selectAllSettleDomainPermissionByUserId(userId);
if (Common.isNotNull(permissonList)) {
domainIds = permissonList.stream().map(TCutsomerDataPermisson::getSettleDomainId).collect(Collectors.toList());
redisUtil.set(userKey, domainIds);
......
......@@ -123,10 +123,10 @@
<select id="selectAllSettleDomainPermissionByUserId" resultMap="tCutsomerDataPermissonMap">
SELECT
<include refid="base_column_list"/>
FROM t_cutsomer_data_permisson
FROM t_cutsomer_data_permisson a
WHERE 1=1
AND SETTLE_DOMAIN_ID IS NOT NULL
AND BE_PERMISSON_USER = '${userId}'
AND BE_PERMISSON_USER = ${userId}
</select>
<select id="getCustomerServiceByid" resultType="java.lang.String">
SELECT
......
......@@ -46,7 +46,6 @@ public class TCheckBankNoServiceImpl extends ServiceImpl<TCheckBankNoMapper, TCh
@Override
public CheckBankNoVo checkBankNoTwo(String name, String cardNo) {
R<TCheckBankNo> res;
CheckBankNoVo vo = new CheckBankNoVo();
if (Common.isEmpty(name) || Common.isEmpty(cardNo)){
vo.setRes(R.failed(MsgUtils.getMessage(ErrorCodes.CHECKS_BANK_NO_REQUEST_PARAM_ERROR)));
......
......@@ -135,4 +135,11 @@ public class ExcelAttributeConstants {
//身份证
public static final String EMPIDCARD = "empIdcard";
//最低工资提醒
public static final String SYS_MESSAGE_SALARY_TYPE="SYS_MESSAGE_SALARY_TYPE";
//有工资无社保
public static final String HAVE_SALARY_NO_SOCIAL_TYPE="HAVE_SALARY_NO_SOCIAL_TYPE";
}
......@@ -377,6 +377,20 @@ public class Common {
return year < 0?0:year;
}
public static int getYearOfTime(Date start, Date end) {
int year = 0;
if (Common.isEmpty(start) || Common.isEmpty(end)){
return year;
}
String startYear = DateUtil.getYear(start).substring(0,4);
String endYear = DateUtil.getYear(end).substring(0,4);
if (!Common.isNumber(startYear) || !Common.isNumber(endYear)){
return year;
}
year = Integer.valueOf(endYear).intValue() - Integer.valueOf(startYear).intValue() ;
return year < 0?0:year;
}
/**
* 公积金单边小数点格式化
......
......@@ -29,6 +29,12 @@
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-social-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<properties>
......
package com.yifu.cloud.plus.v1.yifu.common.dapr.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;
/**
* @Author hgw
* @Date 2022-7-27 19:38:08
* @Description
* @Version 1.0
*/
@Data
@Component
@PropertySource("classpath:daprConfig.properties")
@ConfigurationProperties(value = "dapr.salary", ignoreInvalidFields = false)
public class DaprSalaryProperties {
/*
* @author fxj
* @date 14:34
* @Description dapr sidercar url 如:http://localhost:3005/v1.0/invoke/
**/
String appUrl;
/*
* @author fxj
* @date 14:35
* @decription app_id 如:"yifu_upms_sider"
**/
String appId;
String appPort;
String httpPort;
String grpcPort;
String metricsPort;
}
package com.yifu.cloud.plus.v1.yifu.common.dapr.util;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSalaryProperties;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
/**
* @Author fxj
* @Date 2022/8/17
* @Description
* @Version 1.0
*/
@Log4j2
@EnableConfigurationProperties(DaprSalaryProperties.class)
public class SalaryDaprUtil {
@Autowired
private DaprSalaryProperties daprProperties;
}
package com.yifu.cloud.plus.v1.yifu.common.dapr.util;
import com.alibaba.fastjson.JSON;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprUpmsProperties;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
import com.yifu.cloud.plus.v1.yifu.social.vo.HaveSalaryNoSocialSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.HaveSalaryNoSocialVo;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import java.util.List;
/**
* @Author fxj
* @Date 2022-07-18
* @Description
* @Version 1.0
*/
@Log4j2
@EnableConfigurationProperties(DaprSocialProperties.class)
public class SocialDaprUtils {
@Autowired
private DaprSocialProperties daprProperties;
/**
* @Author fxj
* @Description 去缴费库查询查询这些人社保是否存在
* @Date 17:38 2022/8/16
* @Param
* @return
**/
public R<HaveSalaryNoSocialVo> getPaymentinfoListByEmpdIdCard(List<String> idCards, String settleMonth) {
HaveSalaryNoSocialSearchVo searchVo = new HaveSalaryNoSocialSearchVo();
searchVo.setIdCards(idCards);
searchVo.setSettleMonth(settleMonth);
R<HaveSalaryNoSocialVo> noSocialVoR = HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tpaymentinfo/inner/listByEmpdIdCard", JSON.toJSONString(searchVo), HaveSalaryNoSocialVo.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(noSocialVoR)){
return R.failed("查询人员社保是否存在失败!");
}
return noSocialVoR;
}
}
package com.yifu.cloud.plus.v1.yifu.common.dapr.util;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysArea;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AllUserNaVo;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprUpmsProperties;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import java.util.List;
/**
* @Author huyc
* @Date 2022-07-18
......@@ -39,4 +36,19 @@ public class UpmsDaprUtils {
}
return areaListR;
}
/**
* @Author fxj
* @Description 获取所有用户数据
* @Date 17:57 2022/8/16
* @Param
* @return
**/
public R<AllUserNaVo> getAllUserName() {
R<AllUserNaVo> allUserVoR = HttpDaprUtil.invokeMethodPost(daprUpmsProperties.getAppUrl(),daprUpmsProperties.getAppId(),"/user/inner/getAllUserName","", AllUserNaVo.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(allUserVoR)){
return R.failed("获取所有用户数据失败!");
}
return allUserVoR;
}
}
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil,\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils,\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.CheckDaprUtil
com.yifu.cloud.plus.v1.yifu.common.dapr.util.CheckDaprUtil,\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.SocialDaprUtils,\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.SalaryDaprUtil
......@@ -87,4 +87,17 @@ public class salaryTask {
TStatisticsBonus.class, SecurityConstants.FROM_IN);
log.info("-------------生成全年一次性奖金-定时任务结束------------");
}
/**
* @Author fxj
* @Description 定时生成有工资无社保数据
* @Date 17:31 2022/8/17
* @Param
* @return
**/
public void generate() {
log.info("------------定时生成时生成有工资无社保数据-定时任务开始------------");
HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/thavesalarynosocial/inner/generate","", Object.class, SecurityConstants.FROM_IN);
log.info("------------定时生成时生成有工资无社保数据-定时任务结束------------");
}
}
......@@ -22,6 +22,7 @@ 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 com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
......@@ -38,7 +39,7 @@ import java.math.BigDecimal;
@Data
@TableName("sys_message_salary")
@Schema(description = "最低工资提醒-每月更新一次")
public class SysMessageSalary {
public class SysMessageSalary extends BaseEntity {
/**
* id
......
package com.yifu.cloud.plus.v1.yifu.salary.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
/**
* 最低工资提醒-临时人员连续购买最低工资次数
*
* @author wangan
* @date 2020-12-17 09:23:30
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("sys_message_salary_temp")
@Tag(name = "最低工资提醒-临时人员连续购买最低工资次数")
public class SysMessageSalaryTemp extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
*
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "")
private String id;
/**
* 最低工资表数据id
*/
@Length(max = 32, message = "最低工资表数据id 不能超过32个字符")
@ExcelAttribute(name = "最低工资表数据id ", maxLength = 32)
@Schema(description = "最低工资表数据id ", name = "relateId")
private String relateId;
/**
* 次数
*/
@ExcelAttribute(name = "次数")
@Schema(description = "次数", name = "times")
private Integer times;
/**
* 结算月
*/
@Length(max = 10, message = "结算月不能超过10个字符")
@ExcelAttribute(name = "结算月", maxLength = 10, needExport = true)
@Schema(description = "结算月", name = "settleMonth")
private String settleMonth;
}
......@@ -77,6 +77,14 @@ public class TConfigSalary extends Model<TConfigSalary> implements Serializable
/**
* 社保月份
* '-6': '前6月',
* '-5': '前5月',
* '-4': '前4月',
* '-3': '前3月',
* '-2': '前2月',
* '-1': '上月',
* 0: '本月',
* 1: '下月',
*/
@NotNull(message = "社保月份不能为空")
@ExcelAttribute(name = "社保月份", isNotEmpty = true,errorInfo = "社保月份不能为空" )
......
package com.yifu.cloud.plus.v1.yifu.salary.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;
/**
* 有工资没有社保(首页提醒定时任务)
*
* @author wangan
* @date 2019-11-26 09:34:58
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_have_salary_nosocial")
@Tag(name = "有资没有社保(首页提醒定时任务)")
public class THaveSalaryNosocial extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键", name = "id")
private String id;
/**
* 员工ID
*/
@Length(max = 32, message = "员工ID不能超过32个字符")
@ExcelAttribute(name = "员工ID", maxLength = 32)
@Schema(description = "员工ID", name = "employeeId")
private String employeeId;
/**
* 客户名称
*/
@Length(max = 50, message = "客户名称不能超过50个字符")
@ExcelAttribute(name = "客户名称", maxLength = 50,needExport=true)
@Schema(description = "客户名称", name = "customerName")
private String customerName;
/**
* 结算主体名称
*/
@NotBlank(message = "结算主体名称不能为空")
@Length(max = 50, message = "结算主体名称不能超过50个字符")
@ExcelAttribute(name = "结算主体名称", isNotEmpty = true, errorInfo = "结算主体名称不能为空", maxLength = 50,needExport=true)
@Schema(description = "结算主体名称", name = "settlementOrganName")
private String settlementOrganName;
/**
* 员工名称
*/
@Length(max = 32, message = "员工名称不能超过32个字符")
@ExcelAttribute(name = "员工名称", maxLength = 32,needExport=true)
@Schema(description = "员工名称", name = "employeeName")
private String employeeName;
/**
* 身份证号
*/
@Length(max = 32, message = "身份证号不能超过32个字符")
@ExcelAttribute(name = "身份证号", maxLength = 32,needExport=true)
@Schema(description = "身份证号", name = "employeeIdCard")
private String employeeIdCard;
/**
* 工资月份
*/
@NotBlank(message = "工资月份不能为空")
@ExcelAttribute(name = "工资月份", isNotEmpty = true, errorInfo = "工资月份不能为空",needExport=true)
@Schema(description = "工资月份", name = "month")
private String month;
/**
* 应发工资
*/
@Schema(description = "应发工资", name = "relaySalary")
@ExcelAttribute(name = "应发工资", isNotEmpty = true, errorInfo = "应发工资不能为空", needExport = true)
private String relaySalary;
/**
* 单位ID
*/
@Length(max = 255, message = "单位ID不能超过255个字符")
@ExcelAttribute(name = "单位ID", maxLength = 255)
@Schema(description = "单位ID", name = "customerId")
private String customerId;
/**
* 部门ID
*/
@Length(max = 255, message = "部门ID不能超过255个字符")
@ExcelAttribute(name = "部门ID", maxLength = 255)
@Schema(description = "部门ID", name = "settleDomainId")
private String settleDomainId;
/**
* 结算主体编码
*/
@NotBlank(message = "结算主体编码不能为空")
@Length(max = 50, message = "结算主体编码不能超过50个字符")
@ExcelAttribute(name = "结算主体编码", isNotEmpty = true, errorInfo = "结算主体编码不能为空", maxLength = 50,needExport=true)
@Schema(description = "结算主体编码", name = "settlementOrganNo")
private String settlementOrganNo;
/**
* 结算月
*/
@Length(max = 10, message = "结算月不能超过10个字符")
@ExcelAttribute(name = "结算月", maxLength = 10, needExport = true)
@Schema(description = "结算月", name = "settleMonth")
private String settleMonth;
/**
* 原因大类 根据数据字典来判断
*/
@TableField(exist = false)
@Schema(description = "原因大类 根据数据字典来判断 ", name = "reasonType")
@ExcelAttribute(name = "原因大类", errorInfo = "原因大类不能为空", maxLength = 32, isDataId = true, dataType = ExcelAttributeConstants.HAVE_SALARY_NO_SOCIAL_TYPE, needExport = true)
private Integer reasonType;
}
......@@ -134,10 +134,10 @@ public class TSpecialDeducationSum extends BaseEntity {
@ExcelProperty(value = "累计子女教育")
private BigDecimal sumChildEduMoney;
/**
* 累计住房租金
* 累计住房贷款利息
*/
@ExcelAttribute(name = "累计住房租金")
@ExcelProperty(value = "累计住房租金")
@ExcelAttribute(name = "累计住房贷款利息")
@ExcelProperty(value = "累计住房贷款利息")
private BigDecimal sumHousingLoanMoney;
/**
* 累计住房租金
......
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import com.yifu.cloud.plus.v1.yifu.salary.entity.SysMessageSalary;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 最低工资提醒-每月更新一次
*
* @author hgw
* @date 2019-11-21 17:18:10
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Tag(name = "最低工资提醒-每月更新一次")
public class SysMessageSalaryHandelExportVo extends SysMessageSalary {
private static final long serialVersionUID = 1L;
@Schema(description = "原因大类 根据数据字典来判断")
@ExcelAttribute(name = "前一月原因大类", maxLength = 32, isDataId = true, dataType = ExcelAttributeConstants.SYS_MESSAGE_SALARY_TYPE, needExport = true)
private Integer lastOneReasonType;
@Schema(description = "原因大类 根据数据字典来判断 ")
@ExcelAttribute(name = "前二月原因大类", maxLength = 32, isDataId = true, dataType = ExcelAttributeConstants.SYS_MESSAGE_SALARY_TYPE, needExport = true)
private Integer lastTwoReasonType;
@Schema(description = "原因大类 根据数据字典来判断 ")
@ExcelAttribute(name = "前三月原因大类", maxLength = 32, isDataId = true, dataType = ExcelAttributeConstants.SYS_MESSAGE_SALARY_TYPE, needExport = true)
private Integer lastThreeReasonType;
}
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import com.yifu.cloud.plus.v1.yifu.salary.entity.SysMessageSalary;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 最低工资提醒-临时人员连续购买最低工资次数
*
* @author wangan
* @date 2019-11-21 17:18:10
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Tag(name = "最低工资提醒-临时人员连续购买最低工资次数")
public class SysMessageSalaryTemplExportVo extends SysMessageSalary {
private static final long serialVersionUID = 1L;
@TableField(exist = false)
@Schema(description = "原因大类 根据数据字典来判断 ", name = "lastOneReasonType")
@ExcelAttribute(name = "前一月原因大类", maxLength = 32, isDataId = true, dataType = ExcelAttributeConstants.SYS_MESSAGE_SALARY_TYPE, needExport = true)
private Integer lastOneReasonType;
@TableField(exist = false)
@Schema(description = "原因大类 根据数据字典来判断 ", name = "lastTwoReasonType")
@ExcelAttribute(name = "前二月原因大类", maxLength = 32, isDataId = true, dataType = ExcelAttributeConstants.SYS_MESSAGE_SALARY_TYPE, needExport = true)
private Integer lastTwoReasonType;
@TableField(exist = false)
@Schema(description = "原因大类 根据数据字典来判断 ", name = "lastThreeReasonType")
@ExcelAttribute(name = "前三月原因大类", maxLength = 32, isDataId = true, dataType = ExcelAttributeConstants.SYS_MESSAGE_SALARY_TYPE)
private Integer lastThreeReasonType;
@ExcelAttribute(name = "前三月原因大类", maxLength = 32, needExport = true)
private Integer times;
}
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author fxj
* @Date 2022/8/17
* @Description 有工资无社保导出对象
* @Version 1.0
*/
@Data
public class THaveSalaryNoSocialExportVo extends THaveSalaryNosocial implements Serializable {
/**
* 客户名称
*/
@Length(max = 50, message = "客户名称不能超过50个字符")
@ExcelAttribute(name = "客户名称", maxLength = 50,needExport=true)
@Schema(description = "客户名称", name = "customerName")
private String customerName;
/**
* 结算主体名称
*/
@NotBlank(message = "结算主体名称不能为空")
@Length(max = 50, message = "结算主体名称不能超过50个字符")
@ExcelAttribute(name = "结算主体名称", isNotEmpty = true, errorInfo = "结算主体名称不能为空", maxLength = 50,needExport=true)
@Schema(description = "结算主体名称", name = "settlementOrganName")
private String settlementOrganName;
/**
* 员工名称
*/
@Length(max = 32, message = "员工名称不能超过32个字符")
@ExcelAttribute(name = "员工名称", maxLength = 32,needExport=true)
@Schema(description = "员工名称", name = "employeeName")
private String employeeName;
/**
* 身份证号
*/
@Length(max = 32, message = "身份证号不能超过32个字符")
@ExcelAttribute(name = "身份证号", maxLength = 32,needExport=true)
@Schema(description = "身份证号", name = "employeeIdCard")
private String employeeIdCard;
/**
* 员工类型
*/
@TableField(exist = false)
@ExcelAttribute(name = "员工类型", errorInfo = "员工类型不能为空", maxLength = 32, isDataId = true, dataType = ExcelAttributeConstants.PERSONNEL_TYPE, needExport = true)
@Schema(description = "员工类型", name = "empType")
private String empType;
/**
* 工资月份
*/
@NotBlank(message = "工资月份不能为空")
@ExcelAttribute(name = "工资月份", isNotEmpty = true, errorInfo = "工资月份不能为空",needExport=true)
@Schema(description = "工资月份", name = "month")
private String month;
/**
* 应发工资
*/
@Schema(description = "应发工资", name = "relaySalary")
@ExcelAttribute(name = "应发工资", isNotEmpty = true, errorInfo = "应发工资不能为空", needExport = true)
private String relaySalary;
/**
* 在职状态 (0在职;1离职)
*/
@TableField(exist = false)
@ExcelAttribute(name = "在职状态", errorInfo = "在职状态 0是/1否不能为空", maxLength = 1, isDataId = true, readConverterExp = "0=在职,1=离职", needExport = true)
@Schema(description = "在职状态 0是/1否", name = "workFlag")
private String workFlag;
/**
* 原因大类 根据数据字典来判断
*/
@TableField(exist = false)
@Schema(description = "原因大类 根据数据字典来判断 ", name = "reasonType")
@ExcelAttribute(name = "原因大类", errorInfo = "原因大类不能为空", maxLength = 32, isDataId = true, dataType = ExcelAttributeConstants.HAVE_SALARY_NO_SOCIAL_TYPE, needExport = true)
private Integer reasonType;
/**
* 创建者-姓名
*/
@Schema(description = "创建人-姓名")
@TableField(fill = FieldFill.INSERT)
@ExcelProperty("创建人")
private String createName;
}
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 有工资没有社保(首页提醒定时任务)
*
* @author wangan
* @date 2019-11-26 09:34:58
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Tag(name = "有资没有社保(首页提醒定时任务)")
public class THaveSalaryNosocialHandleExportVo extends THaveSalaryNosocial {
private static final long serialVersionUID = 1L;
@TableField(exist = false)
@Schema(description = "原因大类 根据数据字典来判断 ", name = "lastOneReasonType")
@ExcelAttribute(name = "前一月原因大类", maxLength = 32, isDataId = true, dataType = ExcelAttributeConstants.HAVE_SALARY_NO_SOCIAL_TYPE, needExport = true)
private Integer lastOneReasonType;
@TableField(exist = false)
@Schema(description = "原因大类 根据数据字典来判断 ", name = "lastTwoReasonType")
@ExcelAttribute(name = "前二月原因大类", maxLength = 32, isDataId = true, dataType = ExcelAttributeConstants.HAVE_SALARY_NO_SOCIAL_TYPE, needExport = true)
private Integer lastTwoReasonType;
@TableField(exist = false)
@Schema(description = "原因大类 根据数据字典来判断 ", name = "lastThreeReasonType")
@ExcelAttribute(name = "前三月原因大类", maxLength = 32, isDataId = true, dataType = ExcelAttributeConstants.HAVE_SALARY_NO_SOCIAL_TYPE, needExport = true)
private Integer lastThreeReasonType;
}
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
/**
* @Author fxj
* @Date 2022/8/17
* @Description 有工资无社保人员
* @Version 1.0
*/
@Data
public class THaveSalaryNosocialSearchVo extends THaveSalaryNosocial {
/**
* 多选导出或删除等操作
*/
private String ids;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema(description = "创建时间区间")
private LocalDateTime[] createTimes;
/**
* @Author fxj
* 查询数据起
**/
private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
private int limitEnd;
}
......@@ -77,7 +77,13 @@
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-social-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<plugins>
......
package com.yifu.cloud.plus.v1.yifu.salary.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.salary.entity.SysMessageSalaryTemp;
import com.yifu.cloud.plus.v1.yifu.salary.service.SysMessageSalaryTempService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
/**
* 最低工资提醒-临时人员连续购买最低工资次数
*
* @author wangan
* @date 2020-12-17 09:23:30
*/
@RestController
@AllArgsConstructor
@RequestMapping("/sysmessagesalarytemp")
@Tag(name = "最低工资提醒-临时人员连续购买最低工资次数")
public class SysMessageSalaryTempController {
private final SysMessageSalaryTempService sysMessageSalaryTempService;
/**
* 简单分页查询
* @param page 分页对象
* @param sysMessageSalaryTemp 最低工资提醒-临时人员连续购买最低工资次数
* @return
*/
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<SysMessageSalaryTemp>> getSysMessageSalaryTempPage(Page<SysMessageSalaryTemp> page, SysMessageSalaryTemp sysMessageSalaryTemp) {
return new R<>(sysMessageSalaryTempService.getSysMessageSalaryTempPage(page,sysMessageSalaryTemp));
}
/**
* 通过id查询单条记录
* @param id
* @return R
*/
@Operation(description = "id查询")
@GetMapping("/{id}")
public R<SysMessageSalaryTemp> getById(@PathVariable("id") String id){
return new R<>(sysMessageSalaryTempService.getById(id));
}
/**
* 新增记录
* @param sysMessageSalaryTemp
* @return R
*/
@Operation(description = "新增(wxhr:sysmessagesalarytemp_add)")
@PostMapping
@PreAuthorize("@pms.hasPermission('wxhr:sysmessagesalarytemp_add')")
public R<Boolean> save(@Valid @RequestBody SysMessageSalaryTemp sysMessageSalaryTemp){
return new R<>(sysMessageSalaryTempService.save(sysMessageSalaryTemp));
}
/**
* 修改记录
* @param sysMessageSalaryTemp
* @return R
*/
@Operation(description = "修改(wxhr:sysmessagesalarytemp_edit)")
@SysLog("修改最低工资提醒-临时人员连续购买最低工资次数")
@PutMapping
@PreAuthorize("@pms.hasPermission('wxhr:sysmessagesalarytemp_edit')")
public R<Boolean> update(@RequestBody SysMessageSalaryTemp sysMessageSalaryTemp){
return new R<>(sysMessageSalaryTempService.updateById(sysMessageSalaryTemp));
}
/**
* 通过id删除一条记录
* @param id
* @return R
*/
@Operation(description = "删除(wxhr:sysmessagesalarytemp_del)")
@SysLog("删除最低工资提醒-临时人员连续购买最低工资次数")
@DeleteMapping("/{id}")
@PreAuthorize("@pms.hasPermission('wxhr:sysmessagesalarytemp_del')")
public R<Boolean> removeById(@PathVariable String id){
return new R<>(sysMessageSalaryTempService.removeById(id));
}
}
package com.yifu.cloud.plus.v1.yifu.salary.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial;
import com.yifu.cloud.plus.v1.yifu.salary.service.THaveSalaryNosocialService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.THaveSalaryNosocialSearchVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
/**
* 有资没有社保(首页提醒定时任务)
*
* @author wangan
* @date 2019-11-26 09:34:58
*/
@RestController
@AllArgsConstructor
@RequestMapping("/thavesalarynosocial")
@Tag(name = "有工资没有社保(首页提醒定时任务)")
@Slf4j
public class THaveSalaryNosocialController {
private final THaveSalaryNosocialService tHaveSalaryNosocialService;
/**
* 简单分页查询
*
* @param page 分页对象
* @param tHaveSalaryNosocial 有资没有社保(首页提醒定时任务)
* @return
*/
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<THaveSalaryNosocial>> getTHaveSalaryNosocialPage(Page<THaveSalaryNosocial> page, THaveSalaryNosocial tHaveSalaryNosocial) {
return new R<>(tHaveSalaryNosocialService.getTHaveSalaryNosocialPage(page, tHaveSalaryNosocial));
}
/**
* 简单分页查询
*
* @param page 分页对象
* @param tHaveSalaryNosocial 有资没有社保(首页提醒定时任务)
* @return
*/
@Operation(description = "有工资无社保处理简单分页查询")
@GetMapping("/handle/page")
public R<IPage<THaveSalaryNosocial>> getTHaveSalaryNosocialHandelPage(Page<THaveSalaryNosocial> page, THaveSalaryNosocial tHaveSalaryNosocial) {
return new R<>(tHaveSalaryNosocialService.getTHaveSalaryNosocialHandelPage(page, tHaveSalaryNosocial));
}
/**
* 通过id查询单条记录
*
* @param id
* @return R
*/
@Operation(description = "id查询")
@GetMapping("/{id}")
public R<THaveSalaryNosocial> getById(@PathVariable("id") String id) {
return new R<>(tHaveSalaryNosocialService.getById(id));
}
/**
* 新增记录
*
* @param tHaveSalaryNosocial
* @return R
*/
@Operation(description = "新增(wxhr:thavesalarynosocial_add)")
@PostMapping
@PreAuthorize("@pms.hasPermission('wxhr:thavesalarynosocial_add')")
public R<Object> save(@Valid @RequestBody THaveSalaryNosocial tHaveSalaryNosocial) {
return new R<>(tHaveSalaryNosocialService.save(tHaveSalaryNosocial));
}
/**
* 修改记录
*
* @param tHaveSalaryNosocial
* @return R
*/
@Operation(description = "修改(wxhr:thavesalarynosocial_edit)")
@SysLog("修改有资没有社保(首页提醒定时任务)")
@PutMapping
@PreAuthorize("@pms.hasPermission('wxhr:thavesalarynosocial_edit')")
public R<Object> update(@RequestBody THaveSalaryNosocial tHaveSalaryNosocial) {
return new R<>(tHaveSalaryNosocialService.updateById(tHaveSalaryNosocial));
}
/**
* 通过id删除一条记录
*
* @param id
* @return R
*/
@Operation(description = "删除(wxhr:thavesalarynosocial_del)")
@SysLog("删除有资没有社保(首页提醒定时任务)")
@DeleteMapping("/{id}")
@PreAuthorize("@pms.hasPermission('wxhr:thavesalarynosocial_del')")
public R<Object> removeById(@PathVariable String id) {
return new R<>(tHaveSalaryNosocialService.removeById(id));
}
/**
* @Author fxj
* @Description 消息提醒导出
* @Date 15:28 2022/8/17
* @Param
* @return
**/
@SysLog("消息提醒导出")
@Operation(description = "导出")
@PostMapping("/export")
public void export(HttpServletResponse response,
THaveSalaryNosocialSearchVo searchVo) {
tHaveSalaryNosocialService.listExport(response,searchVo);
}
/**
* @Author fxj
* @Description 只有创建人为自己才能反馈
* @Date 17:15 2022/8/17
* @Param
* @return
**/
@Operation(description = "反馈")
@PostMapping("/feedback")
public R<String> feedback(@RequestParam(name = "reasonType",required = true) Integer reasonType,
@RequestParam(name = "id",required = true) String id) {
return tHaveSalaryNosocialService.feedback(reasonType,id);
}
/**
* @Author fxj
* @Description 有资没有社保(首页提醒定时任务 每月1号 6点)
* @Date 17:16 2022/8/17
* @Param
* @return
**/
@Inner
@PostMapping("/inner/generate")
public void generate() {
String settleMonth = DateUtil.addMonth(-1);
tHaveSalaryNosocialService.generate(settleMonth);
}
}
......@@ -17,24 +17,32 @@
package com.yifu.cloud.plus.v1.yifu.salary.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
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 com.yifu.cloud.plus.v1.yifu.salary.constants.SalaryConstants;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccountItem;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountItemService;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSearchVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryDetailVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
......@@ -51,6 +59,8 @@ public class TSalaryAccountController {
private final TSalaryAccountService tSalaryAccountService;
private final TSalaryAccountItemService tSalaryAccountItemService;
/**
* 简单分页查询
......@@ -144,4 +154,91 @@ public class TSalaryAccountController {
public void export(HttpServletResponse response, @RequestBody TSalaryAccountSearchVo searchVo) {
tSalaryAccountService.listExport(response, searchVo);
}
/**
* @Author fxj
* @Description 获取工资条
* @Date 14:53 2022/8/15
* @Param
* @return
**/
@Operation(description = "获取工资条")
@GetMapping("/getEmpAccount")
public R<TSalaryDetailVo> getEmpAccount(String empIdcard, String settleDepartId, String settlementMonth
, String settleDepartNo, String settleDepartName, String empName) {
TSalaryDetailVo salaryDetailVo = new TSalaryDetailVo();
if (Common.isEmpty(empIdcard) && Common.isEmpty(settleDepartId) && Common.isEmpty(settlementMonth)
&& Common.isEmpty(settleDepartNo) && Common.isEmpty(settleDepartName) && Common.isEmpty(empName)) {
return R.failed("请输入查询条件");
}
if (Common.isNotNull(settlementMonth) && Common.isEmpty(empIdcard) && Common.isEmpty(settleDepartId)
&& Common.isEmpty(settleDepartNo) && Common.isEmpty(settleDepartName) && Common.isEmpty(empName)) {
return R.failed("结算月需配合其他查询条件一起使用,请输入其他查询条件!");
}
//报账表
TSalaryAccount salaryAccount = new TSalaryAccount();
salaryAccount.setDeleteFlag(SalaryConstants.NOT_DELETE);
if (Common.isNotNull(empIdcard)) {
salaryAccount.setEmpIdcard(empIdcard);
}
if (Common.isNotNull(settleDepartId)) {
salaryAccount.setDeptId(settleDepartId);
}
if (Common.isNotNull(settlementMonth) && settlementMonth.length() == 6) {
salaryAccount.setSettlementMonth(settlementMonth);
}
QueryWrapper<TSalaryAccount> queryWrapperSa = new QueryWrapper<>();
queryWrapperSa.setEntity(salaryAccount);
if (Common.isNotNull(empName)) {
queryWrapperSa.eq("EMP_NAME", empName);
}
if (Common.isNotNull(settleDepartNo)) {
queryWrapperSa.eq("SETTLE_DEPART_NO", settleDepartNo);
}
if (Common.isNotNull(settleDepartName)) {
queryWrapperSa.like("SETTLE_DEPART_NAME", settleDepartName);
}
if (Common.isNotNull(settlementMonth) && settlementMonth.length() < 6) {
queryWrapperSa.like("SETTLEMENT_MONTH", settlementMonth);
}
queryWrapperSa.orderByAsc("SETTLEMENT_MONTH");
List<TSalaryAccount> salaryAccountList = tSalaryAccountService.list(queryWrapperSa);
Map<String, String> accountTitle = new HashMap<>();
if (salaryAccountList != null && salaryAccountList.size() > CommonConstants.ZERO_INT) {
//报账表明细
TSalaryAccountItem item;
QueryWrapper<TSalaryAccountItem> queryWrapperAi;
List<TSalaryAccountItem> itemList;
for (TSalaryAccount a : salaryAccountList) {
item = new TSalaryAccountItem();
item.setSalaryAccountId(a.getId());
queryWrapperAi = new QueryWrapper<>();
queryWrapperAi.setEntity(item);
itemList = tSalaryAccountItemService.list(queryWrapperAi);
if (itemList != null && itemList.size() > CommonConstants.ZERO_INT) {
for (TSalaryAccountItem items : itemList) {
accountTitle.put(items.getCnName(), items.getJavaFiedName());
}
}
a.setSaiList(itemList);
}
}
salaryDetailVo.setSalaryAccountList(salaryAccountList);
salaryDetailVo.setAccountTitle(accountTitle);
return new R<>(salaryDetailVo);
}
/**
* @Author fxj
* @Description 获取有工资无社保数据
* @Date 17:20 2022/8/16
* @Param
* @return
**/
@Inner
@PostMapping("/inner/getLastMonthTHaveSalaryNosocial")
public R<List<THaveSalaryNosocial>> getLastMonthTHaveSalaryNosocial(@RequestParam(name = "month") String month){
return new R<>(tSalaryAccountService.getLastMonthTHaveSalaryNosocial(month));
}
}
......@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.metadata.OrderItem;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
......@@ -119,6 +120,24 @@ public class TSpecialDeducationSumController {
return tSpecialDeducationSumService.uploadSds(savList);
}
/**
* @Author fxj
* @Description
* @Date 14:31 2022/8/17
* @Param
* @return
**/
@Operation(description = "获取申报单位对应月份专项扣除条数")
@GetMapping("/getCountOfDeclareTitle")
public R<Long> uploadSds(String yearMonth, String declareTitle) {
if (Common.isEmpty(yearMonth)) {
SimpleDateFormat df = new SimpleDateFormat("yyyyMM");
yearMonth = df.format(new Date());
}
return R.ok(tSpecialDeducationSumService.count(Wrappers.<TSpecialDeducationSum>query().lambda()
.eq(TSpecialDeducationSum::getDeclareTitle,declareTitle)
.eq(TSpecialDeducationSum::getCreateMonth,yearMonth)));
}
/**
* @param declareTitle
* @Description: 删除当月全部-专项扣除汇总
......
/*
* 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.salary.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.salary.entity.SysMessageSalary;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.salary.entity.SysMessageSalary;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalaryHandelExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalaryTemplExportVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 最低工资提醒-每月更新一次
*
* @author hgw
* @date 2022-08-05 11:40:14
* @date 2019-11-21 17:18:10
*/
@Mapper
public interface SysMessageSalaryMapper extends BaseMapper<SysMessageSalary> {
/**
* 最低工资提醒-每月更新一次简单分页查询
* @param sysMessageSalary 最低工资提醒-每月更新一次
* @return
*/
IPage<SysMessageSalary> getSysMessageSalaryPage(Page<SysMessageSalary> page, @Param("sysMessageSalary") SysMessageSalary sysMessageSalary);
/**
* 最低工资提醒-每月更新一次简单分页查询
*
* @param sysMessageSalary 最低工资提醒-每月更新一次
* @return
*/
IPage<SysMessageSalary> getSysMessageSalaryPage(Page<SysMessageSalary> page, @Param("sysMessageSalary") SysMessageSalary sysMessageSalary, @Param("settleDomainVos") List<TSettleDomainSelectVo> settleDomainVos);
IPage<SysMessageSalary> getSysMessageSalaryHandlePage(Page<SysMessageSalary> page, @Param("sysMessageSalary") SysMessageSalary sysMessageSalary);
/**
* @param settleMonth
* @Description: 新增-普通工资
* @Author: hgw
* @Date: 2019/11/21 18:10
* @return: java.util.List<com.yifu.cloud.v1.hrms.api.vo.SysMessageSalaryVo>
**/
List<SysMessageSalary> insertSalaryBySettleMonth(@Param("settleMonth") String settleMonth);
/**
* @param settleMonth
* @Description: 新增-工程工资
* @Author: hgw
* @Date: 2019/11/21 18:10
* @return: java.util.List<com.yifu.cloud.v1.hrms.api.vo.SysMessageSalaryVo>
**/
List<SysMessageSalary> insertEngineerBySettleMonth(@Param("settleMonth") String settleMonth);
/**
* @param settleMonth 结算月
* @Description: 生成前,先删除老数据
* @Author: hgw
* @Date: 2019/11/21 17:28
* @return: void
**/
void deleteAllBySettleMonth(@Param("settleMonth") String settleMonth);
List<SysMessageSalary> getByIdExport(String[] ids);
List<SysMessageSalary> getExport(@Param("sysMessageSalary") SysMessageSalary vo, @Param("settleDomainVos") List<TSettleDomainSelectVo> settleDomainVos);
List<SysMessageSalaryHandelExportVo> getByIdHandleExport(String[] ids);
List<SysMessageSalaryHandelExportVo> getHandleExport(@Param("sysMessageSalary") SysMessageSalaryHandelExportVo vo);
List<SysMessageSalary> getLastTHaveSalaryNosocial(@Param("lastOneMonth")String lastOneMonth,@Param("lastTwoMonth") String lastTwoMonth,@Param("lastThreeMonth") String lastThreeMonth);
List<SysMessageSalaryTemplExportVo> getTempExport(@Param("settleMonth")String settleMonth);
}
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.SysMessageSalaryTemp;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 最低工资提醒-临时人员连续购买最低工资次数
*
* @author wangan
* @date 2020-12-17 09:23:30
*/
@Mapper
public interface SysMessageSalaryTempMapper extends BaseMapper<SysMessageSalaryTemp> {
/**
* 最低工资提醒-临时人员连续购买最低工资次数简单分页查询
* @param sysMessageSalaryTemp 最低工资提醒-临时人员连续购买最低工资次数
* @return
*/
IPage<SysMessageSalaryTemp> getSysMessageSalaryTempPage(Page<SysMessageSalaryTemp> page, @Param("sysMessageSalaryTemp") SysMessageSalaryTemp sysMessageSalaryTemp);
}
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.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial;
import com.yifu.cloud.plus.v1.yifu.salary.vo.THaveSalaryNoSocialExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.THaveSalaryNosocialHandleExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.THaveSalaryNosocialSearchVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 有资没有社保(首页提醒定时任务)
*
* @author wangan
* @date 2019-11-26 09:34:58
*/
@Mapper
public interface THaveSalaryNosocialMapper extends BaseMapper<THaveSalaryNosocial> {
/**
* 有资没有社保(首页提醒定时任务)简单分页查询
* @param tHaveSalaryNosocial 有资没有社保(首页提醒定时任务)
* @return
*/
IPage<THaveSalaryNosocial> getTHaveSalaryNosocialPage(Page<THaveSalaryNosocial> page, @Param("tHaveSalaryNosocial") THaveSalaryNosocial tHaveSalaryNosocial, @Param("settleDomainVos") List<TSettleDomainSelectVo> settleDomainVos );
IPage<THaveSalaryNosocial> getTHaveSalaryNosocialHandelPage(Page<THaveSalaryNosocial> page, @Param("tHaveSalaryNosocial") THaveSalaryNosocial tHaveSalaryNosocial );
List<THaveSalaryNosocial> getByIdExport(String[] ids);
List<THaveSalaryNosocial> getExport(@Param("tHaveSalaryNosocial") THaveSalaryNosocial vo,@Param("settleDomainVos") List<TSettleDomainSelectVo> settleDomainVos);
List<THaveSalaryNosocialHandleExportVo> getByIdHandleExport(String[] ids);
List<THaveSalaryNosocialHandleExportVo> getHandleExport(@Param("tHaveSalaryNosocial") THaveSalaryNosocial vo);
List<THaveSalaryNosocial> getLastTHaveSalaryNosocial(@Param("lastOneMonth")String lastOneMonth,@Param("lastTwoMonth") String lastTwoMonth,@Param("lastThreeMonth") String lastThreeMonth);
/**
* @Author fxj
* @Description 获取有工资无数据不分页数据
* @Date 16:57 2022/8/17
* @Param
* @return
**/
List<THaveSalaryNoSocialExportVo> noPageDiy(@Param("tHaveSalaryNosocial")THaveSalaryNosocialSearchVo searchVo,
@Param("settleDomainIds")List<String> settleDomains,
@Param("idsStr") List<String> idsStr,
@Param("sql")String sql);
/**
* @Author fxj
* @Description 获取有工资无数据不分页数据COUNT
* @Date 16:58 2022/8/17
* @Param
* @return
**/
int noPageCountDiy(@Param("tHaveSalaryNosocial")THaveSalaryNosocialSearchVo searchVo,
@Param("settleDomainIds")List<String> settleDomains,
@Param("idsStr") List<String> idsStr,
@Param("sql")String sql);
}
......@@ -18,6 +18,7 @@
package com.yifu.cloud.plus.v1.yifu.salary.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.vo.AccountCheckVo;
import org.apache.ibatis.annotations.Mapper;
......@@ -65,4 +66,15 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
**/
String getMinTaxMonthByNowYear(@Param("empIdCard") String empIdCard, @Param("nowYear") int nowYear);
/**
* @Author fxj
* @Description 获取有工资无社保数据
* @Date 17:23 2022/8/16
* @Param
* @return
**/
List<THaveSalaryNosocial> getLastMonthTHaveSalaryNosocial(@Param("month")String month,
@Param("month2")String month2,
@Param("month3")String month3);
}
/*
* 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.salary.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.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.SysMessageSalary;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalarySearchVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalaryHandelExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalaryTemplExportVo;
import org.apache.ibatis.annotations.Param;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
/**
* 最低工资提醒-每月更新一次
*
* @author hgw
* @date 2022-08-05 11:40:14
* @date 2019-11-21 17:18:10
*/
public interface SysMessageSalaryService extends IService<SysMessageSalary> {
/**
* 最低工资提醒-每月更新一次简单分页查询
* @param sysMessageSalary 最低工资提醒-每月更新一次
* @return
*/
IPage<SysMessageSalary> getSysMessageSalaryPage(Page<SysMessageSalary> page, SysMessageSalarySearchVo sysMessageSalary);
R<List<ErrorMessage>> importDiy(InputStream inputStream);
/**
* 最低工资提醒-每月更新一次简单分页查询
*
* @param sysMessageSalary 最低工资提醒-每月更新一次
* @return
*/
IPage<SysMessageSalary> getSysMessageSalaryPage(Page<SysMessageSalary> page, SysMessageSalary sysMessageSalary);
IPage<SysMessageSalary> getSysMessageSalaryHandlePage(Page<SysMessageSalary> page, SysMessageSalary sysMessageSalary);
/**
* @param settleMonth
* @Description: 新增-普通工资
* @Author: hgw
* @Date: 2019/11/21 18:10
* @return: java.util.List<com.yifu.cloud.v1.hrms.api.vo.SysMessageSalaryVo>
**/
void insertSalaryBySettleMonth(@Param("settleMonth") String settleMonth);
/**
* @param settleMonth 结算月
* @Description: 生成前,先删除老数据
* @Author: hgw
* @Date: 2019/11/21 17:28
* @return: void
**/
void deleteAllBySettleMonth(String settleMonth);
List<SysMessageSalary> getByIdExport(String[] ids);
List<SysMessageSalary> getExport(SysMessageSalary vo);
List<SysMessageSalaryHandelExportVo> getByIdHandleExport(String[] ids);
List<SysMessageSalaryHandelExportVo> getHandleExport(SysMessageSalaryHandelExportVo vo);
List<SysMessageSalaryTemplExportVo> getTempExport(String settleMonth);
void listExport(HttpServletResponse response, SysMessageSalarySearchVo searchVo);
List<SysMessageSalary> getLastTHaveSalaryNosocial(String lastOneMonth, String lastTwoMonth, String lastThreeMonth);
List<SysMessageSalary> noPageDiy(SysMessageSalarySearchVo searchVo);
void createSysMessageSalaryTemp(String settleMonth);
}
package com.yifu.cloud.plus.v1.yifu.salary.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.yifu.salary.entity.SysMessageSalaryTemp;
/**
* 最低工资提醒-临时人员连续购买最低工资次数
*
* @author wangan
* @date 2020-12-17 09:23:30
*/
public interface SysMessageSalaryTempService extends IService<SysMessageSalaryTemp> {
/**
* 最低工资提醒-临时人员连续购买最低工资次数简单分页查询
* @param sysMessageSalaryTemp 最低工资提醒-临时人员连续购买最低工资次数
* @return
*/
IPage<SysMessageSalaryTemp> getSysMessageSalaryTempPage(Page<SysMessageSalaryTemp> page, SysMessageSalaryTemp sysMessageSalaryTemp);
}
package com.yifu.cloud.plus.v1.yifu.salary.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.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial;
import com.yifu.cloud.plus.v1.yifu.salary.vo.THaveSalaryNosocialHandleExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.THaveSalaryNosocialSearchVo;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 有资没有社保(首页提醒定时任务)
*
* @author wangan
* @date 2019-11-26 09:34:58
*/
public interface THaveSalaryNosocialService extends IService<THaveSalaryNosocial> {
/**
* 有资没有社保(首页提醒定时任务)简单分页查询
*
* @param tHaveSalaryNosocial 有资没有社保(首页提醒定时任务)
* @return
*/
IPage<THaveSalaryNosocial> getTHaveSalaryNosocialPage(Page<THaveSalaryNosocial> page, THaveSalaryNosocial tHaveSalaryNosocial);
IPage<THaveSalaryNosocial> getTHaveSalaryNosocialHandelPage(Page<THaveSalaryNosocial> page, THaveSalaryNosocial tHaveSalaryNosocial);
void generate(String settleMonth);
List<THaveSalaryNosocial> getByIdExport(String[] ids);
List<THaveSalaryNosocial> getExport(THaveSalaryNosocial vo);
List<THaveSalaryNosocialHandleExportVo> getByIdHandleExport(String[] ids);
List<THaveSalaryNosocialHandleExportVo> getHandleExport(THaveSalaryNosocial vo);
List<THaveSalaryNosocial> getLastTHaveSalaryNosocial(String lastOneMonth,String lastTwoMonth,String lastThreeMonth);
void listExport(HttpServletResponse response, THaveSalaryNosocialSearchVo searchVo);
R<String> feedback(Integer reasonType, String id);
}
......@@ -18,6 +18,7 @@
package com.yifu.cloud.plus.v1.yifu.salary.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
......@@ -68,4 +69,13 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
**/
String getMinTaxMonthByNowYear(String empIdCard, int nowYear);
/**
* @Author fxj
* @Description 获取有工资无社保数据 3个月的工资
* @Date 17:21 2022/8/16
* @Param
* @return
**/
List<THaveSalaryNosocial> getLastMonthTHaveSalaryNosocial(String month);
}
package com.yifu.cloud.plus.v1.yifu.salary.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.salary.entity.SysMessageSalaryTemp;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.SysMessageSalaryTempMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.SysMessageSalaryTempService;
import org.springframework.stereotype.Service;
/**
* 最低工资提醒-临时人员连续购买最低工资次数
*
* @author wangan
* @date 2020-12-17 09:23:30
*/
@Service("sysMessageSalaryTempService")
public class SysMessageSalaryTempServiceImpl extends ServiceImpl<SysMessageSalaryTempMapper, SysMessageSalaryTemp> implements SysMessageSalaryTempService {
/**
* 最低工资提醒-临时人员连续购买最低工资次数简单分页查询
* @param sysMessageSalaryTemp 最低工资提醒-临时人员连续购买最低工资次数
* @return
*/
@Override
public IPage<SysMessageSalaryTemp> getSysMessageSalaryTempPage(Page<SysMessageSalaryTemp> page, SysMessageSalaryTemp sysMessageSalaryTemp){
return baseMapper.getSysMessageSalaryTempPage(page,sysMessageSalaryTemp);
}
}
......@@ -50,7 +50,7 @@ public class TConfigSalaryServiceImpl extends ServiceImpl<TConfigSalaryMapper, T
throw new RuntimeException("调用结算服务返回失败");
}
vo = domainListVoR.getData();
if (Common.isEmpty(vo) || Common.isEmpty(vo.getDeptIds())) {
if (Common.isEmpty(vo) || !Common.isNotEmpty(vo.getDeptIds())) {
throw new RuntimeException("未获取到相关结算信息");
}
}
......
......@@ -33,6 +33,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryAccountMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService;
......@@ -187,4 +188,18 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
public String getMinTaxMonthByNowYear(String empIdCard, int nowYear) {
return baseMapper.getMinTaxMonthByNowYear(empIdCard, nowYear);
}
/**
* @Author fxj
* @Description 获取有工资无社保数据
* @Date 17:22 2022/8/16
* @Param
* @return
**/
@Override
public List<THaveSalaryNosocial> getLastMonthTHaveSalaryNosocial(String month) {
return baseMapper.getLastMonthTHaveSalaryNosocial(month,
DateUtil.getYearAndMonth(month,CommonConstants.ONE_INT),
DateUtil.getYearAndMonth(month,CommonConstants.TWO_INT));
}
}
......@@ -142,7 +142,7 @@ public class TSpecialDeducationSumServiceImpl extends ServiceImpl<TSpecialDeduca
for (TSpecialDeducationSum s : sdsList) {
s.setCreateMonth(yearMonth);
s.setCreateTime(nowDate);
s.setCreateBy(user.getId());
s.setCreateBy(String.valueOf(user.getId()));
}
return new R<>(this.saveBatch(sdsList));
}
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.salary.mapper.SysMessageSalaryTempMapper">
<resultMap id="sysMessageSalaryTempMap" type="com.yifu.cloud.plus.v1.yifu.salary.entity.SysMessageSalaryTemp">
<id property="id" column="id"/>
<result property="relateId" column="RELATE_ID"/>
<result property="times" column="times"/>
</resultMap>
<sql id="Base_Column_List">
a.id,
a.RELATE_ID,
a.times
</sql>
<sql id="sysMessageSalaryTemp_where">
<if test="sysMessageSalaryTemp != null">
<if test="sysMessageSalaryTemp.id != null and sysMessageSalaryTemp.id.trim() != ''">
AND a.id = #{sysMessageSalaryTemp.id}
</if>
<if test="sysMessageSalaryTemp.relateId != null and sysMessageSalaryTemp.relateId.trim() != ''">
AND a.RELATE_ID = #{sysMessageSalaryTemp.relateId}
</if>
<if test="sysMessageSalaryTemp.times != null">
AND a.times = #{sysMessageSalaryTemp.times}
</if>
</if>
</sql>
<!--sysMessageSalaryTemp简单分页查询-->
<select id="getSysMessageSalaryTempPage" resultMap="sysMessageSalaryTempMap">
SELECT
<include refid="Base_Column_List"/>
FROM sys_message_salary_temp a
<where>
1=1
<include refid="sysMessageSalaryTemp_where"/>
</where>
</select>
</mapper>
......@@ -269,4 +269,43 @@
where a.EMP_IDCARD = #{empIdCard} and a.DELETE_FLAG = 0 and a.SETTLEMENT_MONTH like concat(#{nowYear},"%")
and a.FORM_TYPE != '3'
</select>
<select id="getLastMonthTHaveSalaryNosocial" resultType="com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial">
select a.EMP_ID employee_id
, a.EMP_IDCARD employee_id_card
, a.EMP_NAME employee_name
, a.relaySalary relay_salary
, s.CREATE_USER CREATE_USER_ID
, a.SALARY_DATE month
, a.EMP_NAME employee_name
, a.EMP_IDCARD employee_id_card
, s.DEPART_ID settle_domain_id
, s.DEPART_NAME SETTLEMENT_ORGAN_NAME
, s.DEPART_NO SETTLEMENT_ORGAN_NO
, a.SETTLEMENT_MONTH SETTLE_MONTH
from (
select a.id
, a.SALARY_FORM_ID
, a.EMP_ID
, DISTINCT(a.EMP_IDCARD)
, a.EMP_NAME
, a.SALARY_DATE
, a.SETTLEMENT_MONTH
, if(item.JAVA_FIED_NAME = 'relaySalary', item.SALARY_MONEY, 0) relaySalary
, sum(if(item.JAVA_FIED_NAME in
('unitSocial', 'personalSocial', 'withholidingUnitSocial', 'withholidingPersonSocial'),
item.SALARY_MONEY, 0)) social
from hr_salary.t_salary_account a
left join hr_salary.t_salary_account_item item on item.SALARY_ACCOUNT_ID = a.id
where
<!-- a.SETTLEMENT_MONTH = '202006' and EMP_ID='1242371741017026561' -->
a.SETTLEMENT_MONTH in ( #{month} , #{month2} , #{month3})
and a.DELETE_FLAG = 0
GROUP BY a.EMP_IDCARD, a.SALARY_DATE
) a
LEFT JOIN hr_salary.t_salary_standard s on a.SALARY_FORM_ID = s.id
where a.relaySalary > 0
and a.social = 0
</select>
</mapper>
......@@ -574,5 +574,13 @@ public class TDispatchInfo extends BaseEntity {
@ExcelProperty("申请编码" )
private String applyNo;
/**
* 首次购买时间(第一派单月份)
*/
@ExcelAttribute(name = "首次购买时间(第一派单月份)", isDate = true)
@Schema(description = "首次购买时间(第一派单月份)" )
@ExcelProperty("首次购买时间(第一派单月份)" )
private Date firstBuyMonthSocial;
}
......@@ -67,7 +67,7 @@ public class FundHandleExportVo implements Serializable {
@ExcelAttribute(name = "申请人",needExport = true)
@Schema(description = "申请人")
@ExcelProperty("申请人" )
private String creasteUserName;
private String createUserName;
/**
* 公积金缴纳地-省
*/
......
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
import lombok.Data;
import java.util.List;
/**
* @Author fxj
* @Date 2022/8/16
* @Description
* @Version 1.0
*/
@Data
public class HaveSalaryNoSocialSearchVo {
private List<String> idCards;
private String settleMonth;
}
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
import lombok.Data;
import java.util.List;
/**
* @Author fxj
* @Date 2022/8/16
* @Description
* @Version 1.0
*/
@Data
public class HaveSalaryNoSocialVo {
List<TPaymentInfo> paymentInfos;
}
......@@ -186,7 +186,7 @@ public class SocialHandleExportVo implements Serializable {
@ExcelAttribute(name = "申请人",needExport = true)
@Schema(description = "申请人")
@ExcelProperty("申请人" )
private String creasteUserName;
private String createUserName;
/**
* 备案基数
......@@ -342,7 +342,7 @@ public class SocialHandleExportVo implements Serializable {
/**
* 减少原因
*/
@ExcelAttribute(name = "减少原因" ,needExport = true)
@ExcelAttribute(name = "减少原因" ,needExport = true , isDataId = true, dataType = ExcelAttributeConstants.REDUCE_SOCIAL_REASON)
@Schema(description="减少原因")
@ExcelProperty("减少原因" )
private String reduceReason;
......
......@@ -16,7 +16,9 @@ package com.yifu.cloud.plus.v1.yifu.social.controller;/*
*/
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
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.common.log.annotation.SysLog;
......@@ -25,6 +27,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
import com.yifu.cloud.plus.v1.yifu.social.service.TPaymentInfoService;
import com.yifu.cloud.plus.v1.yifu.social.vo.HaveSalaryNoSocialSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoSearchVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
......@@ -273,4 +276,25 @@ public class TPaymentInfoController {
public int updatePaymentFundStatusToNoSettle(@RequestBody List<String> idList) {
return tPaymentInfoService.updatePaymentFundStatusToNoSettle(idList);
}
/**
* @Author fxj
* @Description 有工资无社保提醒:通过身份证号和月份获取对应的缴费库数据
* @Date 17:45 2022/8/16
* @Param
* @return
**/
@Inner
@PostMapping("/inner/listByEmpdIdCard")
public R<List<TPaymentInfo>> getPaymentinfoListByEmpdIdCard(@RequestBody HaveSalaryNoSocialSearchVo searchVo) {
return new R<>(tPaymentInfoService.list(Wrappers.<TPaymentInfo>query().lambda()
.in(TPaymentInfo::getEmpIdcard, searchVo.getIdCards())
.and(obj->obj.eq(TPaymentInfo::getSocialCreateMonth,searchVo.getSettleMonth())
.or()
.eq(TPaymentInfo::getSocialCreateMonth, DateUtil.getYearAndMonth(searchVo.getSettleMonth(),1))
.or()
.eq(TPaymentInfo::getSocialCreateMonth,DateUtil.getYearAndMonth(searchVo.getSettleMonth(),1))
)
.groupBy(TPaymentInfo::getEmpIdcard)));
}
}
......@@ -380,7 +380,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
&& Common.isEmpty(excel.getUnemployStart())
&& Common.isEmpty(excel.getBigailmentStart())
&& Common.isNotNull(excel.getWorkInjuryStart())
&& (BigDecimal.ZERO.compareTo(excel.getWorkInjuryCardinal()) <= 0);
&& (BigDecimal.ZERO.compareTo(BigDecimalUtils.isNullToZero(excel.getWorkInjuryCardinal())) <= 0);
}
// 失败项社保派单 和已有派单户不一致
if (dispatchPart && Common.isNotNull(socialFund)
......@@ -554,6 +554,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatch.setEmpNo(project.getEmpNo());
}
}
dispatch.setFirstBuyMonthSocial(getFirstBuyMonthSocial(social));
insertDispatch(emp, dispatch,setInfoVo);
}
// 插入或更新社保公积金查询信息 大病在封装社保的时候已经算了 大病技术和金额了
......@@ -669,7 +670,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
socialFund.setSocialReduceStatus(CommonConstants.ONE_STRING_NEGATE);
socialFund.setSocialId(social.getId());
if (Common.isEmpty(socialFund.getFirstBuyMonthSocial())){
socialFund.setFirstBuyMonthSocial(social.getSocialStartDate());
socialFund.setFirstBuyMonthSocial(getFirstBuyMonthSocial(social));
}
if (!CommonConstants.ONE_STRING.equals(socialFund.getBigailmentHandle())
&& CommonConstants.ZERO_STRING.equals(socialFund.getIsIllness())
......@@ -834,6 +835,38 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
}
/**
* @Author fxj
* @Description 获取首次购买月份
* @Date 14:12 2022/8/17
* @Param
* @return
**/
private Date getFirstBuyMonthSocial(TSocialInfo social) {
if (Common.isEmpty(social.getSocialStartDate())){
return null;
}
if (Common.isNotNull(social.getPensionStart()) && social.getPensionStart().after(social.getSocialStartDate())){
return social.getPensionStart();
}
if (Common.isNotNull(social.getMedicalStart()) && social.getMedicalStart().after(social.getSocialStartDate())){
return social.getMedicalStart();
}
if (Common.isNotNull(social.getBirthStart()) && social.getBirthStart().after(social.getSocialStartDate())){
return social.getBirthStart();
}
if (Common.isNotNull(social.getUnemployStart()) && social.getUnemployStart().after(social.getSocialStartDate())){
return social.getUnemployStart();
}
if (Common.isNotNull(social.getWorkInjuryStart()) && social.getWorkInjuryStart().after(social.getSocialStartDate())){
return social.getWorkInjuryStart();
}
if (Common.isNotNull(social.getBigailmentStart()) && social.getBigailmentStart().after(social.getSocialStartDate())){
return social.getPensionStart();
}
return social.getSocialStartDate();
}
private void initSocialFundAddInfo(Map<String, TSocialFundInfo> socialFundAddMap,
DispatchEmpVo empVo,
SysBaseSetInfo socialSet,
......@@ -1015,12 +1048,20 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatch.setContractTerm(excel.getContractTerm());
dispatch.setContractType(excel.getContractType());
dispatch.setWorkingHours(excel.getWorkingHours());
dispatch.setEmpRegisType(excel.getEmpRegisType());
dispatch.setPost(excel.getPost());
// 封装客户信息
if (Common.isNotNull(empVo)){
dispatch.setEmpId(empVo.getId());
dispatch.setEmpNo(empVo.getEmpNo());
dispatch.setEmpName(empVo.getEmpName());
if (Common.isEmpty(dispatch.getEmpRegisType())){
dispatch.setEmpRegisType(empVo.getEmpRegisType());
}
if (Common.isNotNull(dispatch.getPost())){
dispatch.setPost(empVo.getPost());
}
// 封装合同信息 如果有合同取值实际合同信息
if (Common.isNotNull(empVo.getContractStart())){
dispatch.setContractStart(empVo.getContractStart());
......@@ -1692,6 +1733,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
contract.setFileCity(empVo.getFileCity());
contract.setFileTown(empVo.getFileTown());
}
if (Common.isEmpty(contract.getContractTerm()) && Common.isNotNull(contract.getContractStart()) && Common.isNotNull(contract.getContractEnd())){
contract.setContractTerm(Integer.toString(Common.getYearOfTime(contract.getContractStart(), contract.getContractEnd())));
}
contracts.put(excel.getEmpIdcard()+CommonConstants.DOWN_LINE_STRING+excel.getSettleDomainCode(),contract);
}
......@@ -2079,7 +2123,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return true;
}
// 业务细分(合同类型为其他时必填)
if (excel.getContractType().equals(CommonConstants.TWENTY_ONE_STRING)
if (excel.getContractName().equals(CommonConstants.TWENTY_ONE_STRING)
&& Common.isEmpty(excel.getContractSubName())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_EMP_CONTRACT_NOT_EMPTY)));
return true;
......@@ -2120,23 +2164,35 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
// 备案基数和养老基数 养老起缴日期 必填在前面已必填校验,这里不重复校验
if (Common.isNotNull(excel.getRecordBase()) && Common.isNotNull(excel.getSocialHousehold())){
// 自定义 只要有一个不相当同的 日期或基数 就要提示
if (CommonConstants.ONE_STRING.equals(excel.getPaymentType()) && Common.isEmpty(excel.getTrustRemark())
&& ((Common.isNotNull(excel.getPensionCardinal())
&& excel.getPensionCardinal().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT)
|| (Common.isNotNull(excel.getMedicalCardinal())
&& excel.getMedicalCardinal().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT)
|| (Common.isNotNull(excel.getUnemploymentCardinal())
&& excel.getUnemploymentCardinal().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT)
|| (Common.isNotNull(excel.getWorkInjuryCardinal())
&& excel.getWorkInjuryCardinal().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT)
|| (Common.isNotNull(excel.getBirthCardinal())
&& excel.getBirthCardinal().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT)
|| (Common.isNotNull(excel.getBigailmentCardinal())
&& excel.getBigailmentCardinal().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT)
)){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_SOCIAL_BASE_LIMIT_ERROR)));
return true;
// 自定义 只要有一个不相同的 日期或基数 就要提示
if (CommonConstants.ONE_STRING.equals(excel.getPaymentType()) && Common.isEmpty(excel.getTrustRemark())){
boolean flag = (Common.isNotNull(excel.getPensionCardinal())
&& excel.getPensionCardinal().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT)
|| (Common.isNotNull(excel.getMedicalCardinal())
&& excel.getMedicalCardinal().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT)
|| (Common.isNotNull(excel.getUnemploymentCardinal())
&& excel.getUnemploymentCardinal().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT)
|| (Common.isNotNull(excel.getWorkInjuryCardinal())
&& excel.getWorkInjuryCardinal().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT)
|| (Common.isNotNull(excel.getBirthCardinal())
&& excel.getBirthCardinal().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT)
|| (Common.isNotNull(excel.getBigailmentCardinal())
&& excel.getBigailmentCardinal().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT);
if (flag){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_SOCIAL_BASE_LIMIT_ERROR)));
return true;
}
flag = (Common.isNotNull(excel.getContractStart())
&& ((!excel.getContractStart().equals(excel.getPensionStart()) && Common.isNotNull(excel.getPensionStart()))
|| (!excel.getContractStart().equals(excel.getMedicalStart()) && Common.isNotNull(excel.getMedicalStart()))
|| (!excel.getContractStart().equals(excel.getUnemployStart()) && Common.isNotNull(excel.getUnemployStart()))
|| (!excel.getContractStart().equals(excel.getBirthStart()) && Common.isNotNull(excel.getBirthStart()))
|| (!excel.getContractStart().equals(excel.getWorkInjuryStart()) && Common.isNotNull(excel.getWorkInjuryStart()))
|| (!excel.getContractStart().equals(excel.getBigailmentStart()) && Common.isNotNull(excel.getBigailmentStart()))));
if (flag){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_SOCIAL_DATE_LIMIT_ERROR2)));
return true;
}
}
Date temp;
if (Common.isEmpty(empVo)){
......@@ -3692,7 +3748,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
**/
@Override
public void doexportSocialRecordRoster(HttpServletResponse response, SocialHandleSearchVo searchVo, String idStr, String[] exportFields) {
String fileName = DispatchConstants.SOCIAL_RECORD_ROSTER_EXPORT + LocalDateTime.now() + ".xlsx";
String fileName = DispatchConstants.SOCIAL_RECORD_ROSTER_EXPORT + ".xlsx";
//获取要导出的列表
List<SocialHandleExportVo> list = new ArrayList<>();
// 项目权限 TODO
......
......@@ -494,6 +494,7 @@
<result property="socialTown" column="SOCIAL_TOWN"/>
<result property="workingHours" column="WORKING_HOURS"/>
<result property="educationName" column="EDUCATION_NAME"/>
<result property="createUserName" column="CREATE_NAME"/>
<result property="socialHouseholdName" column="SOCIAL_HOUSEHOLD_NAME"/>
<result property="socialProvince" column="SOCIAL_PROVINCE"/>
......@@ -524,7 +525,7 @@
<result property="belongUnit" column="BELONG_UNIT_NAME"/>
<result property="settleDomain" column="SETTLE_DOMAIN_NAME"/>
<result property="empMobile" column="EMP_MOBILE"/>
<result property="creasteUserName" column="CREATE_NAME"/>
<result property="createUserName" column="CREATE_NAME"/>
<result property="providentHouseholdName" column="PROVIDENT_HOUSEHOLD_NAME"/>
<result property="providentStart" column="PROVIDENT_START"/>
......
package com.yifu.cloud.plus.v1.yifu.admin.api.vo;
import lombok.Data;
import java.io.Serializable;
import java.util.HashMap;
/**
* @Author fxj
* @Date 2022/8/16
* @Description
* @Version 1.0
*/
@Data
public class AllUserNaVo implements Serializable {
private HashMap<String,String> userNames;
}
......@@ -25,11 +25,14 @@ import com.pig4cloud.plugin.excel.annotation.ResponseExcel;
import com.yifu.cloud.plus.v1.yifu.admin.api.dto.UserDTO;
import com.yifu.cloud.plus.v1.yifu.admin.api.dto.UserInfo;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AllUserNaVo;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.UserExcelVO;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.UserInfoVO;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.UserVO;
import com.yifu.cloud.plus.v1.yifu.admin.service.SysUserService;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.MsgUtils;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
......@@ -43,6 +46,7 @@ import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.HashMap;
import java.util.List;
import java.util.Set;
......@@ -269,4 +273,26 @@ public class UserController {
public SysUser getSimpleUser(@PathVariable Integer id) {
return userService.getById(id);
}
/**
* @Author fxj
* @Description 获取所有用户极
* @Date 18:20 2022/8/16
* @Param
* @return
**/
@Inner
@GetMapping(value = {"/inner/getAllUserName"})
public AllUserNaVo getAllUserDTO() {
AllUserNaVo naVo = new AllUserNaVo();
List<SysUser> sysUsers = userService.list(Wrappers.<SysUser>query().lambda());
if (Common.isNotEmpty(sysUsers)){
HashMap<String,String> nameMap = new HashMap<>();
for (SysUser u:sysUsers){
nameMap.put(u.getUserId(),u.getNickname());
}
naVo.setUserNames(nameMap);
}
return naVo;
}
}
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