Commit 135cebfe authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/develop' into develop

parents bc003539 59d84fc3
......@@ -4,6 +4,7 @@ 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.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -144,6 +145,7 @@ public class TDepartSettlementInfo extends Model<TDepartSettlementInfo> {
*/
@ExcelAttribute(name = "创建时间")
@Schema(description = "创建时间", name = "createTime")
@JsonFormat(shape= JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
private LocalDateTime createTime;
/**
* 最后更新人
......@@ -157,6 +159,7 @@ public class TDepartSettlementInfo extends Model<TDepartSettlementInfo> {
*/
@ExcelAttribute(name = "最后更新时间")
@Schema(description = "最后更新时间", name = "lastUpdateTime")
@JsonFormat(shape= JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
private LocalDateTime lastUpdateTime;
/**
* 结算主体ID
......
......@@ -29,6 +29,7 @@ import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
/**
* 项目档案表
......@@ -364,5 +365,8 @@ public class TEmployeeProject extends BaseEntity {
@Schema(description = "员工类型多个")
@TableField(exist = false)
private String[] empNatureArray;
@TableField(exist = false)
@Schema(description = "选中的idList")
private List<String> idList;
}
......@@ -16,10 +16,12 @@
*/
package com.yifu.cloud.plus.v1.yifu.archives.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.fasterxml.jackson.annotation.JsonFormat;
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;
......@@ -328,5 +330,19 @@ public class TSettleDomain extends BaseEntity {
@Schema(description = "回款周期1-12")
private String backPayCycle;
/**
* 社保类型0:缴费库;1:预估库
*/
@ExcelAttribute(name = "社保类型0:缴费库;1:预估库")
@ExcelProperty("社保类型0:缴费库;1:预估库")
@Schema(description = "社保类型0:缴费库;1:预估库")
private String socialType;
/**
* 公积金类型0:缴费库;1:预估库
*/
@ExcelAttribute(name = "公积金类型0:缴费库;1:预估库")
@ExcelProperty("公积金类型0:缴费库;1:预估库")
@Schema(description = "公积金类型0:缴费库;1:预估库")
private String fundType;
}
......@@ -19,8 +19,10 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
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 io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.Past;
......@@ -428,5 +430,15 @@ public class EmployeeProjectExportVO{
@ExcelProperty(value ="社保所在县")
private String socialTown;
private String[] socialStatusArray;
private String[] fundStatusArray;
private String[] insuranceStatusArray;
private String[] contractStatusArray;
private String[] empNatureArray;
private List<String> idList;
}
......@@ -216,7 +216,7 @@ public class TSettleDomainController {
**/
@Inner
@PostMapping("/inner/getSettleDomainVoById")
public TSettleDomainSelectVo getSettleDomainVoById(String id) {
public TSettleDomainSelectVo getSettleDomainVoById(@RequestBody String id) {
return tSettleDomainService.getSettleDomainVoById(id);
}
......@@ -229,7 +229,7 @@ public class TSettleDomainController {
**/
@Inner
@PostMapping("/inner/getInnerBySettlementId")
public TDepartSettlementInfo getInnerBySettlementId(@RequestParam String deptId) {
public TDepartSettlementInfo getInnerBySettlementId(@RequestBody String deptId) {
TDepartSettlementInfo departSettlementInfo = new TDepartSettlementInfo();
departSettlementInfo.setSettleId(deptId);
QueryWrapper<TDepartSettlementInfo> queryWrapperDs = new QueryWrapper<>();
......
......@@ -89,6 +89,11 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.STATUS_NORMAL).eq(TEmployeeProject::getProjectStatus,CommonConstants.ZERO_INT));
if (Common.isNotNull(updateTEmployeeProject)) {
if (updateTEmployeeProject.getSocialStatus() == CommonConstants.dingleDigitIntArray[1] ||
updateTEmployeeProject.getFundStatus() == CommonConstants.dingleDigitIntArray[1]) {
return R.failed("人员在原项目中存在在途的服务,请先终止后,再进行划转");
}
TSettleDomain tSettleDomain = tSettleDomainMapper.selectOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo, tEmpChangeInfo.getDeptNo()).eq(TSettleDomain::getDepartName, tEmpChangeInfo.getNewSettle())
.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING).eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING));
......@@ -172,6 +177,10 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
.eq(TEmployeeProject::getEmpIdcard, excel.getEmpIdcard()).eq(TEmployeeProject::getDeptNo,excel.getOldSettleCode())
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.STATUS_NORMAL));
if (Common.isNotNull(updateTEmployeePro)) {
if (updateTEmployeePro.getSocialStatus() == CommonConstants.dingleDigitIntArray[1] ||
updateTEmployeePro.getFundStatus() == CommonConstants.dingleDigitIntArray[1]) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.QT_PROJECT_CHANGE_NOT_EXIST, excel.getOldSettleCode()));
}
if (CommonConstants.ONE_INT == updateTEmployeePro.getProjectStatus()) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.PROJECT_PERSON_DELETE_EXIT, excel.getOldSettleCode()));
} else if (Common.isNotNull(tSettleDomain)) {
......
......@@ -100,7 +100,7 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
@Override
public TSettleDomainSelectVo getSettleDomainVoById(String id) {
return baseMapper.selectSettleDomainSelectVosById(id);
return baseMapper.getSettleDomainVoById(id);
}
@Override
......
......@@ -71,64 +71,65 @@
<result property="exceptionRemark" column="EXCEPTION_REMARK"/>
<result property="existAdvancePayment" column="EXIST_ADVANCE_PAYMENT"/>
<result property="backPayCycle" column="BACK_PAY_CYCLE"/>
<result property="socialType" column="SOCIAL_TYPE"/>
<result property="fundType" column="FUND_TYPE"/>
</resultMap>
<sql id="Base_Column_List">
a
.
ID
,
a.DEPART_NO,
a.DEPART_NAME,
a.IS_NEW,
a.NEW_REMARK,
a.DELETE_FLAG,
a.DP_AUDIT_FLAG,
a.OLD_ID,
a.BELONG_CONTRACT,
a.DP_AUDIT_OPINION,
a.DP_AUDIT_MAN,
a.DP_AUDIT_MAN_NAME,
a.LAST_AUDIT_DATE,
a.SERVER_ITEM,
a.INCOME_BELONG,
a.INCOME_BELONG_SUB,
a.CUSTOMER_ID,
a.CREATE_USER_NAME,
a.COMMIT_USER,
a.COMMIT_USER_NAME,
a.BALANCE,
a.INVOICE_BALANCE,
a.FIRST_PASS_FLAG,
a.FIRST_PASS_TIME,
a.PROVINCE,
a.CITY,
a.TOWN,
a.STOP_FLAG,
a.employee_num,
a.STOP_DATE,
a.STOP_REASON,
a.STOP_USER,
a.STOP_USER_NAME,
a.TYPE,
a.BUSINESS_PRIMARY_TYPE,
a.BUSINESS_SECOND_TYPE,
a.BUSINESS_THIRD_TYPE,
a.MANAGER_AUDIT_OPINION,
a.MANAGER_AUDIT_MAN,
a.MANAGER_AUDIT_MAN_NAME,
a.AUDIT_TIME,
a.MANAGER_AUDIT_TIME,
a.CREATE_TYPE,
a.RELATE_FLAG,
a.EXCEPTION_REMARK,
a.EXIST_ADVANCE_PAYMENT,
a.BACK_PAY_CYCLE,
a.CREATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_BY,
a.UPDATE_TIME
a.ID,
a.DEPART_NO,
a.DEPART_NAME,
a.IS_NEW,
a.NEW_REMARK,
a.DELETE_FLAG,
a.DP_AUDIT_FLAG,
a.OLD_ID,
a.BELONG_CONTRACT,
a.DP_AUDIT_OPINION,
a.DP_AUDIT_MAN,
a.DP_AUDIT_MAN_NAME,
a.LAST_AUDIT_DATE,
a.SERVER_ITEM,
a.INCOME_BELONG,
a.INCOME_BELONG_SUB,
a.CUSTOMER_ID,
a.CREATE_USER_NAME,
a.COMMIT_USER,
a.COMMIT_USER_NAME,
a.BALANCE,
a.INVOICE_BALANCE,
a.FIRST_PASS_FLAG,
a.FIRST_PASS_TIME,
a.PROVINCE,
a.CITY,
a.TOWN,
a.STOP_FLAG,
a.employee_num,
a.STOP_DATE,
a.STOP_REASON,
a.STOP_USER,
a.STOP_USER_NAME,
a.TYPE,
a.BUSINESS_PRIMARY_TYPE,
a.BUSINESS_SECOND_TYPE,
a.BUSINESS_THIRD_TYPE,
a.MANAGER_AUDIT_OPINION,
a.MANAGER_AUDIT_MAN,
a.MANAGER_AUDIT_MAN_NAME,
a.AUDIT_TIME,
a.MANAGER_AUDIT_TIME,
a.CREATE_TYPE,
a.RELATE_FLAG,
a.EXCEPTION_REMARK,
a.EXIST_ADVANCE_PAYMENT,
a.BACK_PAY_CYCLE,
a.CREATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_BY,
a.UPDATE_TIME,
a.SOCIAL_TYPE,
a.FUND_TYPE
</sql>
<resultMap id="tSettleDomainSelectVoMap" type="com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo">
......@@ -186,7 +187,8 @@
c.customerId,
c.CUSTOMER_NAME as 'customerName',
c.CUSTOMER_CODE as 'customerCode',
c.INDUSTRY_BELONG as 'industryBelong'
c.INDUSTRY_BELONG as 'industryBelong',
t.COVER_NAME as 'businessSubjectName'
FROM
t_settle_domain a
LEFT JOIN (
......@@ -195,6 +197,7 @@
INDUSTRY_BELONG,
CUSTOMER_CODE from t_customer_info
) c ON a.CUSTOMER_ID = c.customerId
LEFT JOIN t_table_head_salary_cover t on a.id=t.DEPART_ID and t.type = 0
WHERE a.id=#{id} GROUP BY a.id
</select>
......
......@@ -300,7 +300,7 @@ public interface ErrorCodes {
*/
String ARCHIVES_PROJECT_CHANGE_NOT_EXIST = "archives.project.change.not.exist";
/**
* 该人员存在其他进行中的项目,禁止同步减档!
* 人员在原项目中存在在途的服务,请先终止后,再进行划转
*/
String QT_PROJECT_CHANGE_NOT_EXIST = "qt.project.change.not.exist";
/**
......
......@@ -99,7 +99,7 @@ archives.project.change.not.exist=\u4EBA\u5458\u5728\u8BE5\u9879\u76EE\u4E0B\u5B
archives.project.emp.lose.fee.not.empty=\u4E0D\u826F\u8BB0\u5F55\u8D39\u7528\u635F\u5931\u548C\u5176\u4ED6\u635F\u5931\u4E0D\u53EF\u540C\u65F6\u4E3A\u7A7A
qt.project.change.not.exist=\u8BE5\u4EBA\u5458\u5B58\u5728\u5176\u4ED6\u8FDB\u884C\u4E2D\u7684\u9879\u76EE\uFF0C\u7981\u6B62\u540C\u6B65\u51CF\u6863
qt.project.change.not.exist=\u4EBA\u5458\u5728\u539F\u9879\u76EE\u4E2D\u5B58\u5728\u5728\u9014\u7684\u670D\u52A1\uFF0C\u8BF7\u5148\u7EC8\u6B62\u540E\uFF0C\u518D\u8FDB\u884C\u5212\u8F6C
project.search.not.exist=\u672A\u627E\u5230\u5BF9\u5E94\u7684\u9879\u76EE\uFF0C\u8BF7\u6838\u5B9E
change.strat.month.exit=\u5212\u8F6C\u8D77\u59CB\u6708\u4E0D\u80FD\u4E3A\u7A7A
......
......@@ -68,6 +68,12 @@ public class MSalaryEstimate {
@NotBlank(message = "类型:0:社保;1:公积金;不能为空")
@ExcelProperty("类型:0:社保;1:公积金;")
private Integer isSocial;
/**
* 来源类型:0:缴费库;1:预估库;
*/
@ExcelAttribute(name = "来源类型:0:缴费库;1:预估库;", isNotEmpty = true, errorInfo = "来源类型:0:缴费库;1:预估库;不能为空")
@ExcelProperty("来源类型:0:缴费库;1:预估库;")
private Integer type;
/**
* 类型:0:正常扣缴;1:无工资人员;
*/
......
......@@ -207,6 +207,18 @@ public class TSalaryAccount {
@Length(max = 1, message = "公积金优先级0:生成月;1:缴纳月不能超过1个字符")
@ExcelProperty("公积金优先级0:生成月;1:缴纳月")
private String fundPriority;
/**
* 社保类型0:缴费库;1:预估库
*/
@ExcelAttribute(name = "社保类型0:缴费库;1:预估库")
@ExcelProperty("社保类型0:缴费库;1:预估库")
private String socialType;
/**
* 公积金类型0:缴费库;1:预估库
*/
@ExcelAttribute(name = "公积金类型0:缴费库;1:预估库")
@ExcelProperty("公积金类型0:缴费库;1:预估库")
private String fundType;
/**
* 年终奖扣税方案0:合并;1:单独
*/
......
......@@ -97,6 +97,6 @@ public class TSalaryAccountItem extends Model<TSalaryAccountItem> {
* 财务类型0:工资;1:绩效;2:其他;3:劳务费
*/
@TableField(exist = false)
private String salaryType;
private String formType;
}
......@@ -227,6 +227,17 @@ public class TSalaryStandard extends BaseEntity {
@ExcelAttribute(name = "含有特殊金额的强行提交的备注")
private String haveSpecialRemark;
/**
* 本月是否重复金额0:否;1:是重复导入的
*/
@ExcelAttribute(name = "本月是否重复金额0:否;1:是重复导入的")
@ExcelProperty("本月是否重复金额0:否;1:是重复导入的")
private Integer isRepeat;
@Schema(description = "本月重复金额的备注", name = "repeatRemark")
@ExcelAttribute(name = "本月重复金额的备注")
private String repeatRemark;
/**
* 提交备注
*/
......
......@@ -4,8 +4,8 @@ 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.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.tags.Tag;
import lombok.Data;
import lombok.EqualsAndHashCode;
......@@ -13,7 +13,6 @@ import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
......@@ -27,7 +26,7 @@ import java.time.LocalDateTime;
@EqualsAndHashCode(callSuper = true)
@TableName("t_special_deducation_sum")
@Tag(name = "专项扣除")
public class TSpecialDeducationSum extends Model<TSpecialDeducationSum> {
public class TSpecialDeducationSum extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* id
......@@ -35,21 +34,6 @@ public class TSpecialDeducationSum extends Model<TSpecialDeducationSum> {
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty(value = "id")
private String id;
/**
* 创建人
*/
@NotBlank(message = "创建人不能为空")
@Length(max = 32, message = "创建人不能超过32个字符")
@ExcelAttribute(name = "创建人", isNotEmpty = true, errorInfo = "创建人不能为空", maxLength = 32)
@ExcelProperty(value = "创建人")
private String createUser;
/**
* 创建时间
*/
@NotBlank(message = "创建时间不能为空")
@ExcelAttribute(name = "创建时间", isNotEmpty = true, errorInfo = "创建时间不能为空")
@ExcelProperty(value = "创建时间")
private LocalDateTime createTime;
/**
* 导入月份
*/
......
......@@ -39,9 +39,9 @@ import java.math.BigDecimal;
*/
@Data
@TableName("t_statistics_bonus")
@EqualsAndHashCode(callSuper = true)
@EqualsAndHashCode()
@Schema(description = "全年一次性奖金申报表")
public class TStatisticsBonus extends BaseEntity {
public class TStatisticsBonus {
/**
* ID
......
......@@ -66,9 +66,9 @@ public class TStatisticsDeclarer {
/**
* 员工姓名
*/
@ExcelAttribute(name = "员工姓名", maxLength = 20)
@Length(max = 20, message = "员工姓名不能超过20个字符")
@ExcelProperty("员工姓名")
@ExcelAttribute(name = "姓名", maxLength = 20)
@Length(max = 20, message = "姓名不能超过20个字符")
@ExcelProperty("姓名")
private String empName;
/**
* 身份证号
......@@ -87,14 +87,14 @@ public class TStatisticsDeclarer {
/**
* 人员状态
*/
@ExcelAttribute(name = "人员状态", maxLength = 2)
@ExcelAttribute(name = "人员状态", maxLength = 2,readConverterExp = "0=在职,1=离职")
@Length(max = 2, message = "人员状态不能超过2个字符")
@ExcelProperty("人员状态")
private String empStatus;
/**
* 任职受雇从业类型
*/
@ExcelAttribute(name = "任职受雇从业类型", maxLength = 2)
@ExcelAttribute(name = "任职受雇从业类型", maxLength = 2,readConverterExp = "0=雇员,1=其他")
@Length(max = 2, message = "任职受雇从业类型不能超过2个字符")
@ExcelProperty("任职受雇从业类型")
private String occupationType;
......@@ -108,9 +108,9 @@ public class TStatisticsDeclarer {
/**
* 本月是否申报 0 是 1 否
*/
@ExcelAttribute(name = "本月是否申报", maxLength = 1)
@Length(max = 1, message = "本是否申报不能超过1个字符")
@ExcelProperty("本是否申报")
@ExcelAttribute(name = "本期是否申报", maxLength = 1,readConverterExp = "0=是,1=否")
@Length(max = 1, message = "本是否申报不能超过1个字符")
@ExcelProperty("本是否申报")
private String isDeclare;
/**
* 不申报原因
......
......@@ -75,13 +75,6 @@ public class TStatisticsLabor {
@Length(max = 32, message = "身份证号不能超过32个字符")
@ExcelProperty("身份证号")
private String empIdcard;
/**
* 工号
*/
@ExcelAttribute(name = "工号", maxLength = 32)
@Length(max = 32, message = "工号不能超过32个字符")
@ExcelProperty("工号")
private String workNo;
/**
* 证件类型
*/
......
......@@ -94,12 +94,5 @@ public class TStatisticsRemuneration {
@ExcelAttribute(name = "个税")
@ExcelProperty("个税")
private BigDecimal personalTax;
/**
* 工号
*/
@ExcelAttribute(name = "工号", maxLength = 32)
@Length(max = 32, message = "工号不能超过32个字符")
@ExcelProperty("工号")
private String workNo;
}
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import java.io.Serializable;
import java.util.List;
/**
* @Description: 工资导入的返回vo
* @Author: hgw
* @Date: 2021/11/2 15:22
* @return:
**/
@Getter
@Setter
@ToString
public class SalaryUploadReturnVo implements Serializable {
/**
* 用于返回错误信息
*/
private List<ErrorMessage> errorInfo;
// 重复数据
private List<ErrorMessage> repeatInfo;
}
......@@ -308,5 +308,9 @@ public class TSalaryAccountVo implements Serializable {
@ExcelProperty("个税-单位承担")
private BigDecimal salaryTaxUnit;
@ExcelAttribute(name = "是否新员工(默认否)")
@ExcelProperty("是否新员工(默认否)")
private String isNewEmployee;
private List<TSalaryAccountItemVo> saiList = new ArrayList<>(); //工资组成部分明细
}
......@@ -43,9 +43,9 @@ public class TStatisticsDeclarerVo extends RowIndex implements Serializable {
/**
* 员工姓名
*/
@ExcelAttribute(name = "员工姓名", maxLength = 20, isNotEmpty = true)
@Schema(description = "员工姓名")
@ExcelProperty("员工姓名")
@ExcelAttribute(name = "姓名", maxLength = 20, isNotEmpty = true)
@Schema(description = "姓名")
@ExcelProperty("姓名")
private String empName;
/**
* 身份证号
......@@ -57,9 +57,9 @@ public class TStatisticsDeclarerVo extends RowIndex implements Serializable {
/**
* 本月是否申报
*/
@ExcelAttribute(name = "本月是否申报", maxLength = 1, isNotEmpty = true,isDataId = true,readConverterExp = "0=是,1=否")
@Schema(description = "本是否申报")
@ExcelProperty("本是否申报")
@ExcelAttribute(name = "本期是否申报", maxLength = 1, isNotEmpty = true,readConverterExp = "0=是,1=否")
@Schema(description = "本是否申报")
@ExcelProperty("本是否申报")
private String isDeclare;
/**
* 不申报原因
......
......@@ -81,14 +81,6 @@ public class TStatisticsLaborVo extends RowIndex implements Serializable {
@Schema(description = "身份证号")
@ExcelProperty("身份证号")
private String empIdcard;
/**
* 工号
*/
@Length(max = 32, message = "工号 不能超过32 个字符")
@ExcelAttribute(name = "工号", maxLength = 32)
@Schema(description = "工号")
@ExcelProperty("工号")
private String workNo;
/**
* 证件类型
*/
......
......@@ -103,13 +103,5 @@ public class TStatisticsRemunerationVo extends RowIndex implements Serializable
@Schema(description = "个税")
@ExcelProperty("个税")
private BigDecimal personalTax;
/**
* 工号
*/
@Length(max = 32, message = "工号 不能超过32 个字符")
@ExcelAttribute(name = "工号", maxLength = 32)
@Schema(description = "工号")
@ExcelProperty("工号")
private String workNo;
}
......@@ -4,6 +4,7 @@ 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.service.SalaryUploadService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountVo;
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;
......@@ -31,7 +32,6 @@ public class SalaryUploadController {
* @param settleDepart 结算主体id
* @param configId 配置方案id
* @param salaryType 报表类型id
* @param repeatFlag 默认 0:不允许重复导入已存在系统内的数据;1:允许重复导入
* @Description:
* @Author: hgw
* @Date: 2019/9/11 15:21
......@@ -40,9 +40,9 @@ public class SalaryUploadController {
@Operation(description = "上传:jsonString:表格json;settleDepart:结算主体id;configId:工资配置结算月等信息的id;salaryType:工资类型")
@SysLog("上传薪资表")
@PostMapping("/upload")
public R upload(@RequestBody String jsonString, @RequestParam String settleDepart, @RequestParam String configId
, @RequestParam String salaryType, @RequestParam int repeatFlag) {
return salaryUploadService.salaryUpload(jsonString, settleDepart, configId, salaryType, repeatFlag);
public R upload(@RequestBody String jsonString, @RequestParam String settleDepart, @RequestParam(required = false) String configId
, @RequestParam String salaryType) {
return salaryUploadService.salaryUpload(jsonString, settleDepart, configId, salaryType);
}
/**
......@@ -59,4 +59,11 @@ public class SalaryUploadController {
return salaryUploadService.saveAndSubmit(savList);
}
@Operation(description = "打开结算单")
@SysLog("打开结算单")
@PostMapping("openBill")
public R<TSalaryDetailVo> openBill(@RequestParam String salaryFormId) {
return salaryUploadService.getBill(salaryFormId);
}
}
......@@ -71,7 +71,7 @@ public class TSalaryAttaController {
* @Date: 2021-12-8 15:36:58
* @return: com.yifu.cloud.v1.common.core.util.R<java.util.List < com.yifu.cloud.v1.hrms.api.entity.TSalaryAtta>>
**/
@Schema(description = "获取list(linkId, linkType链接类型:0工资;1工程工资;2暂停发;3自定义项暂停发;4打印记录;5核准表打印记录6:非扣税 7发放失败 8自有员工附件 9财务回执附件 10换人换卡附件;11薪资原表;12劳务费或稿酬已有发薪记录;13薪资特殊值(3500、5000))")
@Schema(description = "获取list(linkId, linkType链接类型:0工资;1工程工资;2暂停发;3自定义项暂停发;4打印记录;5核准表打印记录6:非扣税 7发放失败 8自有员工附件 9财务回执附件 10换人换卡附件;11薪资原表;12劳务费或稿酬已有发薪记录;13薪资特殊值(3500、5000);14本月重复金额")
@GetMapping("/getTSalaryAttaListByIdType")
public R<List<TSalaryAtta>> getTSalaryAttaListByIdType(@RequestParam String linkId, @RequestParam Integer linkType) {
return new R<>(tSalaryAttaService.getAttaListHaveSrc(linkId, linkType));
......@@ -86,7 +86,7 @@ public class TSalaryAttaController {
* @throws IOException
*/
@SysLog("薪资附件上传")
@Schema(description = "OSS文件上传接口。linkType类型:0工资;1工程工资;2暂停发;3自定义项暂停发;4薪资打印记录;5核准表打印记录;6:非扣税项;8自有员工附件;9:财务回执附件;10换人换卡附件;11薪资原表")
@Schema(description = "OSS文件上传接口。linkType类型:0工资;1工程工资;2暂停发;3自定义项暂停发;4薪资打印记录;5核准表打印记录;6:非扣税项;8自有员工附件;9:财务回执附件;10换人换卡附件;11薪资原表;12劳务费或稿酬已有发薪记录;13薪资特殊值(3500、5000);14本月重复金额")
/*@ApiImplicitParams({
@ApiImplicitParam(name = "file", value = "Form文件上传", required = true, dataType = "__file", paramType = "form"),
@ApiImplicitParam(name = "filePath", value = "文件上传路径", dataType = "String", paramType = "form"),
......
......@@ -172,6 +172,7 @@ public class TSalaryStandardController {
tApprovalRecord.setApprovalTime(DateUtil.getCurrentDateTime());
auditLogService.save(tApprovalRecord);
tSalaryStandard.setSubmitTime(new Date());
tSalaryStandard.setStatus(CommonConstants.ONE_INT);
tSalaryStandardService.updateById(tSalaryStandard);
return R.ok("提交成功!");
} else {
......
......@@ -136,7 +136,7 @@ public class TStatisticsBonusController {
@SysLog("批量删除全年一次性奖金申报表")
@PostMapping("/batchDelete")
@PreAuthorize("@pms.hasPermission('salary_tstatisticsbonus_del')")
public R batchDelete(@RequestBody String declareMonth){
public R batchDelete(@RequestParam String declareMonth){
return tStatisticsBonusService.batchDelete(declareMonth);
}
}
......@@ -22,6 +22,7 @@ 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.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.TStatisticsDeclarer;
import com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsDeclarerService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsDeclarerSearchVo;
......@@ -79,7 +80,7 @@ public class TStatisticsDeclarerController {
* @param id id
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询:hasPermission('salary_tstatisticsdeclarer_get')")
@Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/{id}" )
public R<TStatisticsDeclarer> getById(@PathVariable("id" ) String id) {
return R.ok(tStatisticsDeclarerService.getById(id));
......@@ -140,6 +141,20 @@ public class TStatisticsDeclarerController {
return tStatisticsDeclarerService.importDiy(file.getInputStream());
}
/**
* @param
* @Description: 生成申报人员
* @Author: huyc
* @Date: 2022-08-17 18:17:48
* @return: com.yifu.cloud.v1.common.core.util.R
**/
@Inner
@Operation(description = "生成申报人员")
@PostMapping("/inner/doStatisticsTaxDeclarer")
public R doStatisticsTaxDeclarer() {
return tStatisticsDeclarerService.doStatisticsTaxDeclarer();
}
/**
* 申报对象表 批量导出
* @author huyc
......@@ -147,7 +162,7 @@ public class TStatisticsDeclarerController {
**/
@Operation(description = "导出申报对象表 hasPermission('salary_tstatisticsdeclarer-export')")
@PostMapping("/export")
// @PreAuthorize("@pms.hasPermission('salary_tstatisticsdeclarer-export')")
@PreAuthorize("@pms.hasPermission('salary_tstatisticsdeclarer-export')")
public void export(HttpServletResponse response, @RequestBody TStatisticsDeclarerSearchVo searchVo) {
tStatisticsDeclarerService.listExport(response,searchVo);
}
......
......@@ -21,6 +21,7 @@ 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.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsLabor;
import com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsLaborService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsLaborSearchVo;
......@@ -36,7 +37,7 @@ import javax.servlet.http.HttpServletResponse;
/**
* 本期劳务费申报表
*
* @author hgw
* @author huyc
* @date 2022-08-05 11:40:14
*/
@RestController
......@@ -90,7 +91,7 @@ public class TStatisticsLaborController {
/**
* 本期劳务费申报表 批量导出
*
* @author hgw
* @author huyc
* @date 2022-08-05 11:40:14
**/
@Operation(description = "导出本期劳务费申报表 hasPermission('salary_tstatisticslabor-export')")
......@@ -99,4 +100,32 @@ public class TStatisticsLaborController {
public void export(HttpServletResponse response, @RequestBody TStatisticsLaborSearchVo searchVo) {
tStatisticsLaborService.listExport(response, searchVo);
}
/**
* 本期劳务费申报表 批量删除
*
* @author huyc
* @date 2022-08-14 21:31:15
**/
@Operation(description = "批量删除本期劳务费申报表 hasPermission('salary_tstatisticslabor_del')")
@SysLog("批量删除本期稿酬申报表")
@PostMapping("/batchDelete")
@PreAuthorize("@pms.hasPermission('salary_tstatisticslabor_del')")
public R batchDelete(@RequestParam String declareMonth){
return tStatisticsLaborService.batchDelete(declareMonth);
}
/**
* @param
* @Description: 生成本期劳务费
* @Author: huyc
* @Date: 2022-08-17 18:17:48
* @return: com.yifu.cloud.v1.common.core.util.R
**/
@Inner
@Operation(description = "生成本期劳务费")
@PostMapping("/inner/doStatisticsLabor")
public R doStatisticsLabor() {
return tStatisticsLaborService.doStatisticsLabor();
}
}
......@@ -47,7 +47,6 @@ public class TStatisticsRemunerationController {
private final TStatisticsRemunerationService tStatisticsRemunerationService;
/**
* 简单分页查询
*
......@@ -67,7 +66,7 @@ public class TStatisticsRemunerationController {
* @param id id
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询:hasPermission('salary_tstatisticsremuneration_get')")
@Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/{id}")
public R<TStatisticsRemuneration> getById(@PathVariable("id") String id) {
return R.ok(tStatisticsRemunerationService.getById(id));
......@@ -99,4 +98,18 @@ public class TStatisticsRemunerationController {
public void export(HttpServletResponse response, @RequestBody TStatisticsRemunerationSearchVo searchVo) {
tStatisticsRemunerationService.listExport(response, searchVo);
}
/**
* 本期稿酬申报表 批量删除
*
* @author huyc
* @date 2022-08-14 21:31:15
**/
@Operation(description = "批量删除本期稿酬申报表 hasPermission('salary_tstatisticsremuneration_del')")
@SysLog("批量删除本期稿酬申报表")
@PostMapping("/batchDelete")
@PreAuthorize("@pms.hasPermission('salary_tstatisticsbonus_del')")
public R batchDelete(@RequestParam String declareMonth){
return tStatisticsRemunerationService.batchDelete(declareMonth);
}
}
......@@ -13,9 +13,6 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.List;
/**
* 工资报账表附加-工资明细
*
......@@ -27,7 +24,7 @@ public interface TSalaryAccountItemMapper extends BaseMapper<TSalaryAccountItem>
List<TSalaryAccountItem> getTSalaryAccountItemPage(@Param("tSalaryAccountItem") TSalaryAccountItem tSalaryAccountItem);
/**
* @param settleDepartId
* @param deptId
* @param settleMonth
* @param javaFiedName
* @Description: 获取报账详情信息
......@@ -35,7 +32,7 @@ public interface TSalaryAccountItemMapper extends BaseMapper<TSalaryAccountItem>
* @Date: 2019/9/29 18:26
* @return: java.util.List<com.yifu.cloud.v1.hrms.api.entity.TSalaryAccountItem>
**/
List<TSalaryAccountItem> getAllTSalaryAccountItem(@Param("settleDepartId") String settleDepartId,
List<TSalaryAccountItem> getAllTSalaryAccountItem(@Param("deptId") String deptId,
@Param("settleMonth") String settleMonth, @Param("javaFiedName") String javaFiedName,
@Param("finallyYear") String finallyYear, @Param("empIdcard") String empIdcard,
@Param("accountId") String accountId);
......@@ -62,17 +59,17 @@ public interface TSalaryAccountItemMapper extends BaseMapper<TSalaryAccountItem>
List<TSalaryAccountItem> getAllItemVoList(@Param("idCardList") List<String> idCardList, @Param("invoiceTitle") String invoiceTitle);
/**
* @param settleDepartId 结算主体id
* @param deptId 结算主体id
* @param javaFiedName 属性名
* @param salaryDate 工资月
* @param salaryMonth 工资月
* @param empIdcard 身份证
* @Description: 获取前几个月总工资
* @Author: hgw
* @Date: 2019/10/29 16:51
* @return: java.math.BigDecimal
**/
BigDecimal getAllMoney(@Param("settleDepartId") String settleDepartId
, @Param("javaFiedName") String javaFiedName, @Param("salaryDate") String salaryDate
BigDecimal getAllMoney(@Param("deptId") String deptId
, @Param("javaFiedName") String javaFiedName, @Param("salaryMonth") String salaryMonth
, @Param("empIdcard") String empIdcard);
/**
......@@ -97,45 +94,45 @@ public interface TSalaryAccountItemMapper extends BaseMapper<TSalaryAccountItem>
, @Param("javaFiedName") String javaFiedName);
/**
* @param settleDepartId 结算主体id
* @param deptId 结算主体id
* @param javaFiedName 属性名
* @param salaryDate 工资月
* @param salaryMonth 工资月
* @param empIdcard 身份证
* @Description: 获取月份条数(前12个月平均工资,要除以工资月数,这里就是工资月数)
* @Author: hgw
* @Date: 2019/10/29 16:51
* @return: java.long.Integer
**/
Integer getAverageSalaryItemMonthCount(@Param("settleDepartId") String settleDepartId
, @Param("javaFiedName") String javaFiedName, @Param("salaryDate") String salaryDate
Integer getAverageSalaryItemMonthCount(@Param("deptId") String deptId
, @Param("javaFiedName") String javaFiedName, @Param("salaryMonth") String salaryMonth
, @Param("empIdcard") String empIdcard);
/**
* @param settleDepartId 结算主体id
* @param deptId 结算主体id
* @param javaFiedName 属性名
* @param salaryDate 工资月
* @param salaryMonth 工资月
* @param empIdcard 身份证
* @Description: 获取前几个月总工资
* @Author: hgw
* @Date: 2019/10/29 16:51
* @return: java.math.BigDecimal
**/
BigDecimal getEngineerAllMoney(@Param("settleDepartId") String settleDepartId
, @Param("javaFiedName") String javaFiedName, @Param("salaryDate") String salaryDate
BigDecimal getEngineerAllMoney(@Param("deptId") String deptId
, @Param("javaFiedName") String javaFiedName, @Param("salaryMonth") String salaryMonth
, @Param("empIdcard") String empIdcard);
/**
* @param settleDepartId 结算主体id
* @param deptId 结算主体id
* @param javaFiedName 属性名
* @param salaryDate 工资月
* @param salaryMonth 工资月
* @param empIdcard 身份证
* @Description: 获取月份条数(前12个月平均工资,要除以工资月数,这里就是工资月数)
* @Author: hgw
* @Date: 2019/10/29 16:51
* @return: java.long.Integer
**/
Integer getEngineerAverageSalaryItemMonthCount(@Param("settleDepartId") String settleDepartId
, @Param("javaFiedName") String javaFiedName, @Param("salaryDate") String salaryDate
Integer getEngineerAverageSalaryItemMonthCount(@Param("deptId") String deptId
, @Param("javaFiedName") String javaFiedName, @Param("salaryMonth") String salaryMonth
, @Param("empIdcard") String empIdcard);
List<TSalaryAccountItem> getAccountItemList(@Param("tSalaryAccount") TSalaryAccount tSalaryAccount
......
......@@ -24,6 +24,8 @@ import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsDeclarer;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 申报对象表
*
......@@ -38,4 +40,11 @@ public interface TStatisticsDeclarerMapper extends BaseMapper<TStatisticsDeclare
* @return
*/
IPage<TStatisticsDeclarer> getTStatisticsDeclarerPage(Page<TStatisticsDeclarer> page, @Param("tStatisticsDeclarer") TStatisticsDeclarer tStatisticsDeclarer);
/**
* @param
* @Description: 统计
* @return:
**/
List<TStatisticsDeclarer> doStatisticsTaxDeclarer(@Param("nowMonth") String nowMonth, @Param("lastYear") String lastYear);
}
......@@ -23,6 +23,9 @@ import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 本期劳务费申报表
*
......@@ -37,4 +40,11 @@ public interface TStatisticsLaborMapper extends BaseMapper<TStatisticsLabor> {
* @return
*/
IPage<TStatisticsLabor> getTStatisticsLaborPage(Page<TStatisticsLabor> page, @Param("tStatisticsLabor") TStatisticsLabor tStatisticsLabor);
/**
* @param
* @Description: 统计
* @return:
**/
List<TStatisticsLabor> doStatisticsLabor(@Param("nowMonth") String nowMonth, @Param("lastYear") String lastYear);
}
......@@ -18,13 +18,13 @@ public interface SalaryUploadService extends IService<TSalaryStandard> {
/**
* @param jsonString
* @param repeatFlag 默认 0:不允许重复导入已存在系统内的数据;1:允许重复导入
*repeatFlag 默认 0:不允许重复导入已存在系统内的数据;1:允许重复导入
* @Description: 普通工资上传
* @Author: hgw
* @Date: 2019/9/4 15:58
* @return: com.yifu.cloud.v1.common.core.util.R
**/
R salaryUpload(String jsonString, String settleDepart, String configId, String formType, int repeatFlag);
R salaryUpload(String jsonString, String settleDepart, String configId, String formType);
/**
* @param savList
......
......@@ -58,4 +58,11 @@ public interface TStatisticsDeclarerService extends IService<TStatisticsDeclarer
* @return
*/
R updateFlagById(String id, String isDeclare, String undeclareReason);
/**
* @param
* @Description: 生成申报人员
* @return
**/
R doStatisticsTaxDeclarer();
}
......@@ -48,4 +48,17 @@ public interface TStatisticsLaborService extends IService<TStatisticsLabor> {
void listExport(HttpServletResponse response, TStatisticsLaborSearchVo searchVo);
List<TStatisticsLabor> noPageDiy(TStatisticsLaborSearchVo searchVo);
/**
* 批量删除本期劳务费申报表
* @param declareMonth 申报月份
* @return
*/
R batchDelete(String declareMonth);
/** 生成本期劳务费
* @param
* @return
**/
R doStatisticsLabor();
}
......@@ -20,6 +20,7 @@ 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.TStatisticsRemuneration;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsRemunerationSearchVo;
......@@ -41,4 +42,11 @@ public interface TStatisticsRemunerationService extends IService<TStatisticsRemu
void listExport(HttpServletResponse response, TStatisticsRemunerationSearchVo searchVo);
/**
* 批量删除本期稿酬申报表
* @param declareMonth 申报月份
* @return
*/
R batchDelete(String declareMonth);
}
......@@ -28,9 +28,14 @@ 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.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
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.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.salary.constants.SalaryConstants;
import com.yifu.cloud.plus.v1.yifu.salary.entity.*;
......@@ -41,6 +46,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardVo;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Service;
import javax.servlet.ServletOutputStream;
......@@ -60,6 +66,7 @@ import java.util.*;
*/
@Log4j2
@Service
@EnableConfigurationProperties({DaprSocialProperties.class})
public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMapper, TSalaryStandard> implements TSalaryStandardService {
@Autowired
......@@ -72,8 +79,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
private MSalaryEstimateService mSalaryEstimateService;
@Autowired
private MSalaryPaymentResService salaryPaymentResService;
private DaprSocialProperties socialProperties;
/**
* 标准薪酬工资表简单分页查询
*
......@@ -311,51 +317,64 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
MSalaryEstimate salaryEstimate = new MSalaryEstimate();
salaryEstimate.setSalaryId(id);
salaryEstimate.setIsSocial(SalaryConstants.IS_SOCIAL_ZERO);
salaryEstimate.setType(CommonConstants.ZERO_INT);
QueryWrapper<MSalaryEstimate> salaryEstimateQueryWrapper = new QueryWrapper<>();
salaryEstimateQueryWrapper.setEntity(salaryEstimate);
//社保
//缴费库社保
List<MSalaryEstimate> socialList = mSalaryEstimateService.list(salaryEstimateQueryWrapper);
salaryEstimate.setIsSocial(SalaryConstants.IS_FUND_ONE);
salaryEstimateQueryWrapper.setEntity(salaryEstimate);
//公积金
//缴费库公积金
List<MSalaryEstimate> fundList = mSalaryEstimateService.list(salaryEstimateQueryWrapper);
if ((socialList != null && !socialList.isEmpty())
|| (fundList != null && !fundList.isEmpty())) {
MSalaryPaymentRes res;
Map<String, MSalaryPaymentRes> saveResMap = new HashMap<>();
if (socialList != null && !socialList.isEmpty()) {
for (MSalaryEstimate est : socialList) {
res = saveResMap.get(est.getEstimateId());
if (res == null) {
res = new MSalaryPaymentRes();
res.setId(est.getEstimateId());
res.setDeptId(deptId);
}
res.setSalarySocialFlag(CommonConstants.ZERO_STRING);
saveResMap.put(est.getEstimateId(), res);
}
salaryEstimate.setType(CommonConstants.ONE_INT);
salaryEstimateQueryWrapper.setEntity(salaryEstimate);
//缴费库公积金
List<MSalaryEstimate> forecastFundList = mSalaryEstimateService.list(salaryEstimateQueryWrapper);
salaryEstimate.setIsSocial(SalaryConstants.IS_SOCIAL_ZERO);
salaryEstimateQueryWrapper.setEntity(salaryEstimate);
//缴费库公积金
List<MSalaryEstimate> forecastSocialList = mSalaryEstimateService.list(salaryEstimateQueryWrapper);
List<String> stringList;
if (socialList != null && !socialList.isEmpty()) {
stringList = new ArrayList<>();
for (MSalaryEstimate s : socialList) {
stringList.add(s.getEstimateId());
}
//更新社保状态为-待结算
HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
, "/tpaymentinfo/inner/updatePaymentSocialStatusToNoSettle", stringList, TDepartSettlementInfo.class, SecurityConstants.FROM_IN);
}
if (fundList != null && !fundList.isEmpty()) {
stringList = new ArrayList<>();
for (MSalaryEstimate s : fundList) {
stringList.add(s.getEstimateId());
}
if (fundList != null && !fundList.isEmpty()) {
for (MSalaryEstimate est : fundList) {
res = saveResMap.get(est.getEstimateId());
if (res == null) {
res = new MSalaryPaymentRes();
res.setId(est.getEstimateId());
res.setDeptId(deptId);
}
res.setSalaryFundFlag(CommonConstants.ZERO_STRING);
saveResMap.put(est.getEstimateId(), res);
}
//更新公积金状态为-待结算
HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
, "/tpaymentinfo/inner/updatePaymentFundStatusToNoSettle", stringList, TDepartSettlementInfo.class, SecurityConstants.FROM_IN);
}
if (forecastSocialList != null && !forecastSocialList.isEmpty()) {
stringList = new ArrayList<>();
for (MSalaryEstimate s : forecastSocialList) {
stringList.add(s.getEstimateId());
}
// 开始更新res
if (!saveResMap.isEmpty()) {
Iterator<MSalaryPaymentRes> iter = saveResMap.values().iterator();
while (iter.hasNext()) {
res = iter.next();
salaryPaymentResService.saveOrUpdate(res);
}
//更新社保状态为-待结算
HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
, "/tforecastlibrary/inner/updateForecastSocialStatusToNoSettle", stringList, TDepartSettlementInfo.class, SecurityConstants.FROM_IN);
}
if (forecastFundList != null && !forecastFundList.isEmpty()) {
stringList = new ArrayList<>();
for (MSalaryEstimate s : forecastFundList) {
stringList.add(s.getEstimateId());
}
//更新公积金状态为-待结算
HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
, "/tforecastlibrary/inner/updateForecastFundStatusToNoSettle", stringList, TDepartSettlementInfo.class, SecurityConstants.FROM_IN);
}
}
}
//6:删除工资表
......
......@@ -142,7 +142,7 @@ public class TSpecialDeducationSumServiceImpl extends ServiceImpl<TSpecialDeduca
for (TSpecialDeducationSum s : sdsList) {
s.setCreateMonth(yearMonth);
s.setCreateTime(nowDate);
s.setCreateUser(String.valueOf(user.getId()));
s.setCreateBy(user.getId());
}
return new R<>(this.saveBatch(sdsList));
}
......
......@@ -152,7 +152,6 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
if (searchVo.getLimitStart() >= 0 && searchVo.getLimitEnd() > 0){
wrapper.last(" limit "+ searchVo.getLimitStart() +","+ searchVo.getLimitEnd());
}
wrapper.orderByDesc(BaseEntity::getCreateTime);
return baseMapper.selectList(wrapper);
}
......
......@@ -16,14 +16,13 @@
*/
package com.yifu.cloud.plus.v1.yifu.salary.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsDeclarer;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsDeclarerVo;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsDeclarerMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsDeclarerService;
import lombok.extern.log4j.Log4j2;
import org.checkerframework.checker.units.qual.C;
import org.springframework.stereotype.Service;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
......@@ -31,7 +30,6 @@ import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsDeclarerSearchVo;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.context.AnalysisContext;
......@@ -90,7 +88,7 @@ public class TStatisticsDeclarerServiceImpl extends ServiceImpl<TStatisticsDecla
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName , "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, TStatisticsDeclarer.class).build();
ExcelWriter excelWriter = EasyExcel.write(out, TStatisticsDeclarer.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT){
for (int i = 0; i <= count; ) {
......@@ -164,6 +162,27 @@ public class TStatisticsDeclarerServiceImpl extends ServiceImpl<TStatisticsDecla
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
@Override
public R doStatisticsTaxDeclarer() {
String nowMonth = DateUtil.addMonth(0); //本月
TStatisticsDeclarer std = new TStatisticsDeclarer();
std.setDeclareMonth(nowMonth);
QueryWrapper<TStatisticsDeclarer> queryWrapperSs = new QueryWrapper<>();
queryWrapperSs.setEntity(std);
long num = this.count(queryWrapperSs);
if (num > 0) {
return R.failed("上月数据已生成,不可重复生成!");
} else {
String lastMonth = DateUtil.addMonth(-1); //上月
String lastYear = lastMonth.substring(0,4);
List<TStatisticsDeclarer> stdvoList = baseMapper.doStatisticsTaxDeclarer(nowMonth,lastYear);
for (TStatisticsDeclarer declarer : stdvoList) {
this.save(declarer);
}
return R.ok();
}
}
private Long noPageCountDiy(TStatisticsDeclarerSearchVo searchVo) {
LambdaQueryWrapper<TStatisticsDeclarer> wrapper = buildQueryWrapper(searchVo);
List<String> idList = Common.getList(searchVo.getIds());
......
......@@ -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.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
......@@ -46,6 +47,7 @@ import java.io.InputStream;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
* 本期劳务费申报表
......@@ -74,7 +76,7 @@ public class TStatisticsLaborServiceImpl extends ServiceImpl<TStatisticsLaborMap
*/
@Override
public void listExport(HttpServletResponse response, TStatisticsLaborSearchVo searchVo) {
String fileName = "不良记录批量导出" + DateUtil.getThisTime() + ".xlsx";
String fileName = "本期劳务费导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<TStatisticsLabor> list = new ArrayList<>();
long count = noPageCountDiy(searchVo);
......@@ -85,7 +87,6 @@ public class TStatisticsLaborServiceImpl extends ServiceImpl<TStatisticsLaborMap
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter excelWriter = EasyExcel.write(out, TStatisticsLabor.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
......@@ -156,6 +157,15 @@ public class TStatisticsLaborServiceImpl extends ServiceImpl<TStatisticsLaborMap
private LambdaQueryWrapper buildQueryWrapper(TStatisticsLaborSearchVo entity) {
LambdaQueryWrapper<TStatisticsLabor> wrapper = Wrappers.lambdaQuery();
if (Common.isNotNull(entity.getDeclareMonth())) {
wrapper.eq(TStatisticsLabor::getDeclareMonth,entity.getDeclareMonth());
}
if (Common.isNotNull(entity.getEmpName())) {
wrapper.eq(TStatisticsLabor::getEmpName,entity.getEmpName());
}
if (Common.isNotNull(entity.getEmpIdcard())) {
wrapper.eq(TStatisticsLabor::getEmpIdcard,entity.getEmpIdcard());
}
return wrapper;
}
......@@ -217,6 +227,42 @@ public class TStatisticsLaborServiceImpl extends ServiceImpl<TStatisticsLaborMap
return R.ok(errorMessageList);
}
@Override
public R batchDelete(String declareMonth) {
if (Common.isNotNull(declareMonth)) {
List<TStatisticsLabor> deleteList = baseMapper.selectList(Wrappers.<TStatisticsLabor>query().lambda()
.eq(TStatisticsLabor::getDeclareMonth, declareMonth));
if (Common.isNotNull(deleteList)) {
List<String> idList = deleteList.stream().map(TStatisticsLabor::getId).collect(Collectors.toList());
baseMapper.deleteBatchIds(idList);
return R.ok();
}
return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
}
return null;
}
@Override
public R doStatisticsLabor() {
String nowMonth = DateUtil.addMonth(0); //本月
TStatisticsLabor std = new TStatisticsLabor();
std.setDeclareMonth(nowMonth);
QueryWrapper<TStatisticsLabor> queryWrapperSs = new QueryWrapper<>();
queryWrapperSs.setEntity(std);
long num = this.count(queryWrapperSs);
if (num > 0) {
return R.failed("上月数据已生成,不可重复生成!");
} else {
String lastMonth = DateUtil.addMonth(-1); //上月
String lastYear = lastMonth.substring(0,4);
List<TStatisticsLabor> stdvoList = baseMapper.doStatisticsLabor(nowMonth,lastYear);
for (TStatisticsLabor declarer : stdvoList) {
this.save(declarer);
}
return R.ok();
}
}
private void importTStatisticsLabor(List<TStatisticsLaborVo> excelVOList, List<ErrorMessage> errorMessageList) {
// 个性化校验逻辑
ErrorMessage errorMsg;
......
......@@ -28,6 +28,7 @@ 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.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ExcelUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsRemuneration;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsRemunerationMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsRemunerationService;
......@@ -41,6 +42,7 @@ import java.io.IOException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
* 本期稿酬申报表
......@@ -69,7 +71,7 @@ public class TStatisticsRemunerationServiceImpl extends ServiceImpl<TStatisticsR
*/
@Override
public void listExport(HttpServletResponse response, TStatisticsRemunerationSearchVo searchVo) {
String fileName = "不良记录批量导出" + DateUtil.getThisTime() + ".xlsx";
String fileName = "本期稿酬申报表导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<TStatisticsRemuneration> list = new ArrayList<>();
long count = noPageCountDiy(searchVo);
......@@ -80,7 +82,6 @@ public class TStatisticsRemunerationServiceImpl extends ServiceImpl<TStatisticsR
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter excelWriter = EasyExcel.write(out, TStatisticsRemuneration.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
......@@ -127,6 +128,21 @@ public class TStatisticsRemunerationServiceImpl extends ServiceImpl<TStatisticsR
}
}
@Override
public R batchDelete(String declareMonth) {
if (Common.isNotNull(declareMonth)) {
List<TStatisticsRemuneration> deleteList = baseMapper.selectList(Wrappers.<TStatisticsRemuneration>query().lambda()
.eq(TStatisticsRemuneration::getDeclareMonth, declareMonth));
if (Common.isNotNull(deleteList)) {
List<String> idList = deleteList.stream().map(TStatisticsRemuneration::getId).collect(Collectors.toList());
baseMapper.deleteBatchIds(idList);
return R.ok();
}
return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
}
return null;
}
private List<TStatisticsRemuneration> noPageDiy(TStatisticsRemunerationSearchVo searchVo) {
LambdaQueryWrapper<TStatisticsRemuneration> wrapper = buildQueryWrapper(searchVo);
List<String> idList = Common.getList(searchVo.getIds());
......@@ -150,6 +166,15 @@ public class TStatisticsRemunerationServiceImpl extends ServiceImpl<TStatisticsR
private LambdaQueryWrapper buildQueryWrapper(TStatisticsRemunerationSearchVo entity) {
LambdaQueryWrapper<TStatisticsRemuneration> wrapper = Wrappers.lambdaQuery();
if (Common.isNotNull(entity.getDeclareMonth())) {
wrapper.eq(TStatisticsRemuneration::getDeclareMonth,entity.getDeclareMonth());
}
if (Common.isNotNull(entity.getEmpName())) {
wrapper.eq(TStatisticsRemuneration::getEmpName,entity.getEmpName());
}
if (Common.isNotNull(entity.getEmpIdcard())) {
wrapper.eq(TStatisticsRemuneration::getEmpIdcard,entity.getEmpIdcard());
}
return wrapper;
}
......
......@@ -49,9 +49,6 @@ public class SalaryAccountUtil implements Serializable {
*/
private List<ErrorMessage> errorInfo;
// 重复数据
private List<ErrorMessage> repeatInfo;
/**
* @param jsonStr 客户原表json内容
* @param dept 项目
......@@ -60,7 +57,7 @@ public class SalaryAccountUtil implements Serializable {
* @param empIdCardMap 当前项目下的员工Map
* @param empNameMap 当前项目下的员工Map
* @param isDuplicateName false:有重名(当前项目下的员工),则不可用姓名查找,必须含有身份证号列
* @param repeatFlag 默认 0:不允许重复导入已存在系统内的数据;1:允许重复导入
* repeatFlag 默认 0:不允许重复导入已存在系统内的数据;1:允许重复导入
* @param ownEmployeeMap 自有员工所在项目Map
* @Description: 将jsonStr数据源的数据导入到 List<TSalaryAccount>
* @Author: hgw
......@@ -71,12 +68,11 @@ public class SalaryAccountUtil implements Serializable {
, TConfigSalary configSalary, Map<String, TSalaryConfigStandard> salaryConfigMap, Map<String, Boolean> isMustMap
, Map<String, TSalaryEmployee> empIdCardMap, Map<String, TSalaryEmployee> empNameMap, boolean isDuplicateName
, String salaryType, String invoiceTitle, TSalaryEmployeeService tSalaryEmployeeService
, Map<String, Integer> checkMap, int repeatFlag, Map<String, Integer> ownEmployeeMap
, Map<String, Integer> checkMap, Map<String, Integer> ownEmployeeMap
, Map<String, Integer> ownDeptMap, TSalaryAccountService tSalaryAccountService) {
List<TSalaryAccountVo> tList = new ArrayList<>();
List<HashMap> list = JSONObject.parseArray(jsonStr, HashMap.class);
List<ErrorMessage> errorList = new ArrayList<>();
List<ErrorMessage> repeatList = new ArrayList<>();
try {
// 得到数据的条数
int rows = list.size();
......@@ -140,6 +136,7 @@ public class SalaryAccountUtil implements Serializable {
salaryStyle = SalaryConstants.SALARY_STYLE_BANK;
relaySalary = null;
actualSalarySum = null;
entity.setSettlementMonth(nowMonth);
entity.setAnnualBonusType(SalaryConstants.ANNUAL_BONUS_TAX_TYPE_VALUE[0]);
for (Map.Entry<String, TSalaryConfigStandard> entry : salaryConfigMap.entrySet()) {
cellValueObj = getFieldValueByName(entry.getKey(), temp);
......@@ -161,6 +158,12 @@ public class SalaryAccountUtil implements Serializable {
if (SalaryConstants.RELAY_SALARY_JAVA.equals(scs.getJavaFiedName())) {
try {
relaySalary = new BigDecimal(cellValueStr);
sai = new TSalaryAccountItemVo();
sai.setCnName(dbFiedName);
sai.setJavaFiedName(scs.getJavaFiedName());
sai.setIsTax(CommonConstants.ZERO_INT);
sai.setSalaryMoney(relaySalary);
saiList.add(sai);
} catch (Exception e) {
error = "第" + (i + 2) + "行:应发工资:'" + cellValueStr + "'错误,请检查数据";
errorList.add(new ErrorMessage((i + 2), error));
......@@ -170,6 +173,7 @@ public class SalaryAccountUtil implements Serializable {
if (SalaryConstants.ACTUAL_SALARY_SUM_JAVA.equals(scs.getJavaFiedName())) {
try {
actualSalarySum = new BigDecimal(cellValueStr);
entity.setActualSalary(actualSalarySum);
} catch (Exception e) {
error = "第" + (i + 2) + "行:实发工资:'" + cellValueStr + "'错误,请检查数据";
errorList.add(new ErrorMessage((i + 2), error));
......@@ -193,7 +197,7 @@ public class SalaryAccountUtil implements Serializable {
}
newEmp.setEmpName(empName);
}
if (SalaryConstants.IF_NEW_EMPLOYEE.equals(dbFiedName)
if ((SalaryConstants.IF_NEW_EMPLOYEE.equals(dbFiedName) || SalaryConstants.IS_NEW_EMPLOYEE.equals(dbFiedName))
&& SalaryConstants.IS_NEW.equals(cellValueStr)) {
isNewEmployee = true;
}
......@@ -274,6 +278,11 @@ public class SalaryAccountUtil implements Serializable {
errorList.add(new ErrorMessage((i + 2), error));
continue;
}
if ("4".equals(salaryType) && actualSalarySum == null) {
error = "第" + (i + 2) + "行:【稿酬】列_不可缺少";
errorList.add(new ErrorMessage((i + 2), error));
continue;
}
// 应发、实发、实发劳务费不可都为空
if (relaySalary == null && actualSalarySum == null) {
......@@ -287,15 +296,12 @@ public class SalaryAccountUtil implements Serializable {
entity.setIsRepeat(CommonConstants.ZERO_INT);
if (relaySalary != null) {
relaySalary = relaySalary.setScale(2, BigDecimal.ROUND_HALF_UP);
if (checkMap.get(entity.getEmpIdcard() + CommonConstants.DOWN_LINE_STRING + DateUtil.addMonth(configSalary.getSalaryMonth())
if (!checkMap.isEmpty() && checkMap.get(entity.getEmpIdcard() + CommonConstants.DOWN_LINE_STRING + DateUtil.addMonth(configSalary.getSalaryMonth())
+ CommonConstants.DOWN_LINE_STRING + salaryType + CommonConstants.DOWN_LINE_STRING + relaySalary) != null) {
entity.setIsRepeat(CommonConstants.ONE_INT);
if (repeatFlag == 0) {
repeatList.add(new ErrorMessage((i + 2), "第" + (i + 2) + "行:同一项目、结算月份、报表类型、工资月份、身份证号、应发金额,存在相同数据"));
continue;
}
}
if (new BigDecimal("3500").equals(relaySalary) || new BigDecimal("5000").equals(relaySalary)) {
if (new BigDecimal("3500").compareTo(relaySalary) == CommonConstants.ZERO_INT
|| new BigDecimal("5000").compareTo(relaySalary) == CommonConstants.ZERO_INT) {
entity.setHaveSpecialFlag(CommonConstants.ONE_INT);
}
}
......@@ -589,7 +595,6 @@ public class SalaryAccountUtil implements Serializable {
}
this.setEntityList(tList);
this.setErrorInfo(errorList);
this.setRepeatInfo(repeatList);
}
/**
......
......@@ -89,6 +89,7 @@ public class SalaryConstants {
public static final String IS_MUST = "1";
public static final String EMP_NAME = "姓名";
public static final String IF_NEW_EMPLOYEE = "是否新员工(默认否)";
public static final String IS_NEW_EMPLOYEE = "是否新员工";
public static final String IS_NEW = "是";
public static final String ID_NUMBER = "身份证号";
public static final String CHECK_ID_NUMBER = "身份证号码";
......
......@@ -50,6 +50,6 @@
</select>
<!--获取自有员工身份证-->
<select id="getOwnEmpList" resultType="String">
SELECT EMP_IDCARD FROM view_own_employee
SELECT EMP_IDCARD FROM view_own_employee
</select>
</mapper>
......@@ -246,25 +246,25 @@
<include refid="Base_Column_List"/>
FROM t_salary_account a
<where>
1=1
<include refid="tSalaryAccount_where"/>
a.DELETE_FLAG = 0
<include refid="tSalaryAccount_where"/>
</where>
</select>
<!-- 获取校验的报账明细 ### 格式:身份证号_工资月份_报表类型_应发金额 -->
<select id="getAccountCheckList" resultType="com.yifu.cloud.plus.v1.yifu.salary.vo.AccountCheckVo">
select
CONCAT(a.EMP_IDCARD,"_",a.SALARY_DATE,"_",a.FORM_TYPE) title,ifnull(ifnull(relaySalary.SALARY_MONEY,actSalary.SALARY_MONEY),0) relaySalary
CONCAT(a.EMP_IDCARD,"_",a.SALARY_MONTH,"_",a.FORM_TYPE) title,ifnull(ifnull(relaySalary.SALARY_MONEY,actSalary.SALARY_MONEY),0) relaySalary
from t_salary_account a
left join t_salary_account_item relaySalary on relaySalary.SALARY_ACCOUNT_ID = a.id and relaySalary.JAVA_FIED_NAME='relaySalary'
left join t_salary_account_item actSalary on actSalary.SALARY_ACCOUNT_ID = a.id and actSalary.JAVA_FIED_NAME='actualSalarySum'
where a.DELETE_FLAG = 0 and a.SETTLE_DEPART_ID = #{settleId} and a.SETTLEMENT_MONTH = #{settleMonth}
where a.DELETE_FLAG = 0 and a.DEPT_ID = #{settleId} and a.SALARY_MONTH = #{settleMonth}
</select>
<!-- 获取当前年最小计税月 -->
<select id="getMinTaxMonthByNowYear" resultType="java.lang.String">
select
min(a.TAX_MONTH - 0)
concat(min(a.TAX_MONTH - 0),'')
from t_salary_account a
where a.EMP_IDCARD = #{empIdCard} and a.DELETE_FLAG = 0 and a.SETTLEMENT_MONTH like concat(#{nowYear},"%")
and a.FORM_TYPE != '3'
......
......@@ -113,7 +113,7 @@
<select id="getTAttaPage" resultMap="tAttaMap">
SELECT
<include refid="selectParams"/>
FROM t_salary_atta
FROM t_salary_atta a
<where>
1=1
<include refid="tSalaryAtta_where"/>
......@@ -125,11 +125,11 @@
<select id="getTAttaList" resultMap="tAttaMap">
SELECT
<include refid="selectParams"/>
FROM t_salary_atta
FROM t_salary_atta a
<where>
1=1
<include refid="tSalaryAtta_where"/>
</where>
order by CREATE_TIME
order by CREATE_TIME desc
</select>
</mapper>
......@@ -218,7 +218,7 @@
<include refid="Base_Column_List"/>
FROM t_salary_standard a
<where>
1=1
a.DELETE_FLAG = 0
<include refid="tSalaryStandard_where"/>
</where>
</select>
......@@ -228,7 +228,7 @@
<include refid="Base_Column_List"/>
FROM t_salary_standard a
<where>
1=1
a.DELETE_FLAG = 0
<include refid="where_page"/>
</where>
order by a.CREATE_TIME desc
......@@ -265,7 +265,7 @@
a.CREATE_TIME
FROM t_salary_standard a
<where>
1=1
a.DELETE_FLAG = 0
<include refid="where_export"/>
<if test="searchVo != null">
<if test="searchVo.limitStart != null">
......@@ -280,7 +280,7 @@
count(1)
FROM t_salary_standard a
<where>
1=1
a.DELETE_FLAG = 0
<include refid="where_export"/>
</where>
</select>
......
......@@ -6,7 +6,7 @@
<resultMap id="tSpecialDeducationSumMap" type="com.yifu.cloud.plus.v1.yifu.salary.entity.TSpecialDeducationSum">
<id property="id" column="id"/>
<result property="createUser" column="CREATE_USER"/>
<result property="createBy" column="CREATE_BY"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="createMonth" column="CREATE_MONTH"/>
<result property="declareTitle" column="DECLARE_TITLE"/>
......@@ -42,7 +42,7 @@
<sql id="Base_Column_List">
id,
CREATE_USER,
CREATE_BY,
CREATE_TIME,
CREATE_MONTH,
DECLARE_TITLE,
......@@ -81,8 +81,8 @@
<if test="tSpecialDeducationSum.id != null and tSpecialDeducationSum.id.trim() != ''">
AND id = #{tSpecialDeducationSum.id}
</if>
<if test="tSpecialDeducationSum.createUser != null and tSpecialDeducationSum.createUser.trim() != ''">
AND CREATE_USER = #{tSpecialDeducationSum.createUser}
<if test="tSpecialDeducationSum.createBy != null and tSpecialDeducationSum.createBy.trim() != ''">
AND CREATE_BY = #{tSpecialDeducationSum.createBy}
</if>
<if test="tSpecialDeducationSum.createTime != null">
AND CREATE_TIME = #{tSpecialDeducationSum.createTime}
......
......@@ -100,5 +100,6 @@
1=1
<include refid="tStatisticsBonus_where"/>
</where>
order by a.DECLARE_MONTH desc
</select>
</mapper>
......@@ -97,4 +97,15 @@
</where>
order by a.DECLARE_MONTH desc
</select>
<!--统计-->
<select id="doStatisticsTaxDeclarer" resultMap="tStatisticsDeclarerMap">
select
#{nowMonth} DECLARE_MONTH,a.EMP_NAME,a.EMP_IDCARD,a.EMP_PHONE,b.FILE_STATUS EMP_STATUS,
b.UNIT_NAME DECLARE_UNIT,'雇员' OCCUPATION_TYPE
from t_salary_account a
left join t_salary_employee b on b.id = a.EMP_ID
where a.DELETE_FLAG = 0 and a.SETTLEMENT_MONTH like '${lastYear}%'
GROUP BY a.EMP_IDCARD
</select>
</mapper>
......@@ -29,7 +29,6 @@
<result property="declareMonth" column="DECLARE_MONTH"/>
<result property="empName" column="EMP_NAME"/>
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="workNo" column="WORK_NO"/>
<result property="cardType" column="CARD_TYPE"/>
<result property="income" column="INCOME"/>
<result property="personalTax" column="PERSONAL_TAX"/>
......@@ -41,7 +40,6 @@
a.DECLARE_MONTH,
a.EMP_NAME,
a.EMP_IDCARD,
a.WORK_NO,
a.CARD_TYPE,
a.INCOME,
a.PERSONAL_TAX,
......@@ -64,9 +62,6 @@
<if test="tStatisticsLabor.empIdcard != null and tStatisticsLabor.empIdcard.trim() != ''">
AND a.EMP_IDCARD = #{tStatisticsLabor.empIdcard}
</if>
<if test="tStatisticsLabor.workNo != null and tStatisticsLabor.workNo.trim() != ''">
AND a.WORK_NO = #{tStatisticsLabor.workNo}
</if>
<if test="tStatisticsLabor.cardType != null and tStatisticsLabor.cardType.trim() != ''">
AND a.CARD_TYPE = #{tStatisticsLabor.cardType}
</if>
......@@ -90,5 +85,18 @@
1=1
<include refid="tStatisticsLabor_where"/>
</where>
group by a.EMP_IDCARD,a.DECLARE_MONTH,a.EMP_NAME
order by a.DECLARE_MONTH desc
</select>
<!--统计-->
<select id="doStatisticsLabor" resultMap="tStatisticsLaborMap">
select
#{nowMonth} DECLARE_MONTH,a.EMP_NAME,a.EMP_IDCARD,a.SALARY_TAX PERSONAL_TAX,a.ACTUAL_SALARY INCOME,
b.UNIT_NAME DECLARE_UNIT,'一般劳务报酬所得' INCOME_ITEM,'居民身份证' CARD_TYPE
from t_salary_account a
left join t_salary_employee b on b.id = a.EMP_ID
where a.DELETE_FLAG = 0 and a.SETTLEMENT_MONTH like '${lastYear}%'
GROUP BY a.EMP_IDCARD
</select>
</mapper>
......@@ -32,7 +32,6 @@
<result property="cardType" column="CARD_TYPE"/>
<result property="income" column="INCOME"/>
<result property="personalTax" column="PERSONAL_TAX"/>
<result property="workNo" column="WORK_NO"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
......@@ -42,8 +41,7 @@
a.EMP_IDCARD,
a.CARD_TYPE,
a.INCOME,
a.PERSONAL_TAX,
a.WORK_NO
a.PERSONAL_TAX
</sql>
<sql id="tStatisticsRemuneration_where">
<if test="tStatisticsRemuneration != null">
......@@ -71,9 +69,6 @@
<if test="tStatisticsRemuneration.personalTax != null">
AND a.PERSONAL_TAX = #{tStatisticsRemuneration.personalTax}
</if>
<if test="tStatisticsRemuneration.workNo != null and tStatisticsRemuneration.workNo.trim() != ''">
AND a.WORK_NO = #{tStatisticsRemuneration.workNo}
</if>
</if>
</sql>
<!--tStatisticsRemuneration简单分页查询-->
......@@ -85,5 +80,7 @@
1=1
<include refid="tStatisticsRemuneration_where"/>
</where>
group by a.EMP_IDCARD,a.DECLARE_MONTH,a.EMP_NAME
order by a.DECLARE_MONTH desc
</select>
</mapper>
......@@ -514,6 +514,19 @@ public class TForecastLibrary extends BaseEntity {
@ExcelProperty("数据类型:预估/差额")
private String diffType;
/**
* 工资社保结算状态 0: 未结算 1: 待结算 2: 已结算
*/
@ExcelAttribute(name = "工资社保结算状态", maxLength = 1,isDataId = true,dataType = "settlement_flag")
@ExcelProperty("工资社保结算状态")
private String salarySocialFlag;
/**
* 工资公积金结算状态 0: 未结算 1: 待结算 2: 已结算
*/
@ExcelAttribute(name = "工资公积金结算状态", maxLength = 1,isDataId = true,dataType = "settlement_flag")
@ExcelProperty("工资公积金结算状态")
private String salaryFundFlag;
@TableField(exist = false)
private List<String> idList;
......
......@@ -23,6 +23,8 @@ 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.vo.TPaymentBySalaryVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TForecastLibrary;
import com.yifu.cloud.plus.v1.yifu.social.service.TForecastLibraryService;
import io.swagger.v3.oas.annotations.Operation;
......@@ -32,6 +34,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
......@@ -179,5 +182,69 @@ public class TForecastLibraryController {
tForecastLibraryService.everyMonthCreateForecastLibary();
}
/**
* @Description: 薪资获取预估库
* @Author: hgw
* @Date: 2022/8/10 18:06
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo>
**/
@Inner
@PostMapping("/inner/selectTForecastBySalaryVo")
public TPaymentVo selectTForecastBySalaryVo(@RequestBody TPaymentBySalaryVo tPaymentBySalaryVo) {
return tForecastLibraryService.selectTForecastBySalaryVo(tPaymentBySalaryVo);
}
//hgw 以下4个方法,薪资变更缴费库预估库结算状态专用
/**
* @param idList
* @Description: 社保变为结算
* @Author: hgw
* @Date: 2022/8/16 18:22
* @return: int
**/
@Inner
@PostMapping("/inner/updateForecastSocialStatusToSettle")
public int updateForecastSocialStatusToSettle(@RequestBody List<String> idList) {
return tForecastLibraryService.updateForecastSocialStatusToSettle(idList);
}
/**
* @param idList
* @Description: 社保变为未结算
* @Author: hgw
* @Date: 2022/8/16 18:23
* @return: int
**/
@Inner
@PostMapping("/inner/updateForecastSocialStatusToNoSettle")
public int updateForecastSocialStatusToNoSettle(@RequestBody List<String> idList) {
return tForecastLibraryService.updateForecastSocialStatusToNoSettle(idList);
}
/**
* @param idList
* @Description: 公积金变为结算
* @Author: hgw
* @Date: 2022/8/16 18:23
* @return: int
**/
@Inner
@PostMapping("/inner/updateForecastFundStatusToSettle")
public int updateForecastFundStatusToSettle(@RequestBody List<String> idList) {
return tForecastLibraryService.updateForecastFundStatusToSettle(idList);
}
/**
* @param idList
* @Description: 公积金变为未结算
* @Author: hgw
* @Date: 2022/8/16 18:23
* @return: int
**/
@Inner
@PostMapping("/inner/updateForecastFundStatusToNoSettle")
public int updateForecastFundStatusToNoSettle(@RequestBody List<String> idList) {
return tForecastLibraryService.updateForecastFundStatusToNoSettle(idList);
}
}
......@@ -223,4 +223,54 @@ public class TPaymentInfoController {
public TPaymentVo selectTPaymentBySalaryVo(@RequestBody TPaymentBySalaryVo tPaymentBySalaryVo) {
return tPaymentInfoService.selectTPaymentBySalaryVo(tPaymentBySalaryVo);
}
//hgw 以下4个方法,薪资变更缴费库预估库结算状态专用
/**
* @param idList
* @Description: 社保变为结算
* @Author: hgw
* @Date: 2022/8/16 18:22
* @return: int
**/
@Inner
@PostMapping("/inner/updatePaymentSocialStatusToSettle")
public int updatePaymentSocialStatusToSettle(@RequestBody List<String> idList) {
return tPaymentInfoService.updatePaymentSocialStatusToSettle(idList);
}
/**
* @param idList
* @Description: 社保变为结算
* @Author: hgw
* @Date: 2022/8/16 18:22
* @return: int
**/
@Inner
@PostMapping("/inner/updatePaymentSocialStatusToNoSettle")
public int updatePaymentSocialStatusToNoSettle(@RequestBody List<String> idList) {
return tPaymentInfoService.updatePaymentSocialStatusToNoSettle(idList);
}
/**
* @param idList
* @Description: 公积金变为结算
* @Author: hgw
* @Date: 2022/8/16 18:22
* @return: int
**/
@Inner
@PostMapping("/inner/updatePaymentFundStatusToSettle")
public int updatePaymentFundStatusToSettle(@RequestBody List<String> idList) {
return tPaymentInfoService.updatePaymentFundStatusToSettle(idList);
}
/**
* @param idList
* @Description: 公积金变为未结算
* @Author: hgw
* @Date: 2022/8/16 18:22
* @return: int
**/
@Inner
@PostMapping("/inner/updatePaymentFundStatusToNoSettle")
public int updatePaymentFundStatusToNoSettle(@RequestBody List<String> idList) {
return tPaymentInfoService.updatePaymentFundStatusToNoSettle(idList);
}
}
......@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.social.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.vo.TPaymentBySalaryVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TForecastLibrary;
import com.yifu.cloud.plus.v1.yifu.social.vo.TForecastLibraryExportVo;
import org.apache.ibatis.annotations.Mapper;
......@@ -51,4 +52,18 @@ public interface TForecastLibraryMapper extends BaseMapper<TForecastLibrary> {
**/
List<TForecastLibraryExportVo> exportLibrary(@Param("tForecastLibrary") TForecastLibrary tForecastLibrary);
List<TPaymentBySalaryVo> selectTForecastBySalaryVo(@Param("tPaymentInfo") TPaymentBySalaryVo tPaymentInfo);
/**
* 更新社保结算状态
* @Author hgw
* @Date 2020-4-13 16:01:59
* @param idList
* @param status
* @return
**/
int updateForecastSocialStatusByIdList(@Param("idList") List<String> idList, @Param("status") String status);
int updateForecastFundStatusByIdList(@Param("idList")List<String> idList, @Param("status") String status);
}
......@@ -94,4 +94,16 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
**/
List<TPaymentBySalaryVo> selectTPaymentBySalaryVo(@Param("tPaymentInfo") TPaymentBySalaryVo tPaymentInfo);
/**
* 更新社保结算状态
* @Author hgw
* @Date 2020-4-13 16:01:59
* @param idList
* @param status
* @return
**/
int updatePaymentSocialStatusByIdList(@Param("idList") List<String> idList, @Param("status") String status);
int updatePaymentFundStatusByIdList(@Param("idList")List<String> idList, @Param("status") String status);
}
......@@ -21,11 +21,14 @@ 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.vo.TPaymentBySalaryVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysBaseSetInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TForecastLibrary;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 预估费用
......@@ -104,4 +107,19 @@ public interface TForecastLibraryService extends IService<TForecastLibrary> {
**/
void everyMonthCreateForecastLibary();
/**
* @param tPaymentBySalaryVo
* @Description: 获取预估库数据
* @Author: hgw
* @Date: 2022/8/16 17:46
* @return: com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo
**/
TPaymentVo selectTForecastBySalaryVo(TPaymentBySalaryVo tPaymentBySalaryVo);
// 以下4个方法,薪资变更缴费库预估库结算状态专用
int updateForecastSocialStatusToSettle(List<String> idList);
int updateForecastSocialStatusToNoSettle(List<String> idList);
int updateForecastFundStatusToSettle(List<String> idList);
int updateForecastFundStatusToNoSettle(List<String> idList);
}
......@@ -122,4 +122,11 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
**/
TPaymentVo selectTPaymentBySalaryVo(TPaymentBySalaryVo tPaymentBySalaryVo);
// 以下4个方法,薪资变更缴费库预估库结算状态专用
int updatePaymentSocialStatusToSettle(List<String> idList);
int updatePaymentSocialStatusToNoSettle(List<String> idList);
int updatePaymentFundStatusToSettle(List<String> idList);
int updatePaymentFundStatusToNoSettle(List<String> idList);
}
......@@ -29,6 +29,8 @@ 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.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
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.constants.SocialConstants;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysBaseSetInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TAgentConfig;
......@@ -2067,4 +2069,44 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
@Override
public TPaymentVo selectTForecastBySalaryVo(TPaymentBySalaryVo tPaymentBySalaryVo) {
List<TPaymentBySalaryVo> list = baseMapper.selectTForecastBySalaryVo(tPaymentBySalaryVo);
TPaymentVo vo = new TPaymentVo();
vo.setPaymentList(list);
return vo;
}
@Override
public int updateForecastSocialStatusToSettle(List<String> idList) {
if (idList != null && !idList.isEmpty()) {
return baseMapper.updateForecastSocialStatusByIdList(idList, CommonConstants.ONE_STRING);
}
return 0;
}
@Override
public int updateForecastSocialStatusToNoSettle(List<String> idList) {
if (idList != null && !idList.isEmpty()) {
return baseMapper.updateForecastSocialStatusByIdList(idList, CommonConstants.ZERO_STRING);
}
return 0;
}
@Override
public int updateForecastFundStatusToSettle(List<String> idList) {
if (idList != null && !idList.isEmpty()) {
return baseMapper.updateForecastFundStatusByIdList(idList, CommonConstants.ONE_STRING);
}
return 0;
}
@Override
public int updateForecastFundStatusToNoSettle(List<String> idList) {
if (idList != null && !idList.isEmpty()) {
return baseMapper.updateForecastFundStatusByIdList(idList, CommonConstants.ZERO_STRING);
}
return 0;
}
}
......@@ -2345,4 +2345,36 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
vo.setPaymentList(list);
return vo;
}
@Override
public int updatePaymentSocialStatusToSettle(List<String> idList) {
if (idList != null && !idList.isEmpty()) {
return baseMapper.updatePaymentSocialStatusByIdList(idList, CommonConstants.ONE_STRING);
}
return 0;
}
@Override
public int updatePaymentSocialStatusToNoSettle(List<String> idList) {
if (idList != null && !idList.isEmpty()) {
return baseMapper.updatePaymentSocialStatusByIdList(idList, CommonConstants.ZERO_STRING);
}
return 0;
}
@Override
public int updatePaymentFundStatusToSettle(List<String> idList) {
if (idList != null && !idList.isEmpty()) {
return baseMapper.updatePaymentFundStatusByIdList(idList, CommonConstants.ONE_STRING);
}
return 0;
}
@Override
public int updatePaymentFundStatusToNoSettle(List<String> idList) {
if (idList != null && !idList.isEmpty()) {
return baseMapper.updatePaymentFundStatusByIdList(idList, CommonConstants.ZERO_STRING);
}
return 0;
}
}
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.yifu.cloud.plus.v1.yifu.archives.config.FddAutoConfigue
\ No newline at end of file
......@@ -102,6 +102,8 @@
<result property="createTime" column="CREATE_TIME"/>
<result property="updateBy" column="UPDATE_BY"/>
<result property="updateTime" column="UPDATE_TIME"/>
<result property="salarySocialFlag" column="SALARY_SOCIAL_FLAG"/>
<result property="salaryFundFlag" column="SALARY_FUND_FLAG"/>
</resultMap>
<!-- 导出 -->
<resultMap id="exportMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TForecastLibraryExportVo">
......@@ -244,6 +246,8 @@
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_BY,
a.SALARY_SOCIAL_FLAG,
a.SALARY_FUND_FLAG,
a.UPDATE_TIME
</sql>
<sql id="tForecastLibrary_where">
......@@ -578,4 +582,84 @@
limit #{tForecastLibrary.limitStart},#{tForecastLibrary.limitEnd}
</if>
</select>
<!--洪光武2022-8-10 18:05:42-->
<resultMap id="tPaymentBySalaryMap" type="com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo">
<id property="id" column="ID"/>
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="unitBitmailmentFee" column="UNIT_BIGMAILMENT_MONEY"/>
<result property="unitSocialSum" column="UNIT_SOCIAL_SUM"/>
<result property="personalSocialSum" column="SOCIAL_SECURITY_PERSONAL_SUM"/>
<result property="unitFundSum" column="UNIT_PROVIDENT_SUM"/>
<result property="personalFundSum" column="PERSONAL_PROVIDENT_SUM"/>
<result property="salarySocialFlag" column="SALARY_SOCIAL_FLAG"/>
<result property="salaryFundFlag" column="SALARY_FUND_FLAG"/>
<result property="socialPayMonth" column="SOCIAL_PAY_MONTH"/>
<result property="socialCreateMonth" column="SOCIAL_CREATE_MONTH"/>
<result property="providentPayMonth" column="PROVIDENT_PAY_MONTH"/>
<result property="providentCreateMonth" column="PROVIDENT_CREATE_MONTH"/>
<result property="settleDomainId" column="SETTLE_DOMAIN_ID"/>
</resultMap>
<!-- 薪资获取缴费库 -->
<select id="selectTForecastBySalaryVo" resultMap="tPaymentBySalaryMap">
SELECT
a.id,
a.EMP_IDCARD,
sum(ifnull(a.UNIT_BITAILMENT_FEE,0)) UNIT_BIGMAILMENT_MONEY,
sum(ifnull(a.UNIT_SOCIAL_SUM,0)) UNIT_SOCIAL_SUM,
sum(ifnull(a.PERSONAL_SOCIAL_SUM,0)) SOCIAL_SECURITY_PERSONAL_SUM,
sum(ifnull(a.UNIT_FUND_SUM,0)) UNIT_PROVIDENT_SUM,
sum(ifnull(a.PERSONAL_FUND_SUM,0)) PERSONAL_PROVIDENT_SUM,
a.SALARY_SOCIAL_FLAG,
a.SALARY_FUND_FLAG,
a.SOCIAL_PAY_MONTH,
a.SOCIAL_CREATE_MONTH,
a.PROVIDENT_PAY_MONTH,
a.PROVIDENT_CREATE_MONTH,
a.SETTLE_DOMAIN_ID
FROM t_forecast_library a
<where>
1=1
<if test="tPaymentInfo != null">
<if test="tPaymentInfo.socialPayMonth != null and tPaymentInfo.socialPayMonth.trim() != ''">
AND a.SOCIAL_PAY_MONTH = #{tPaymentInfo.socialPayMonth}
</if>
<if test="tPaymentInfo.socialCreateMonth != null and tPaymentInfo.socialCreateMonth.trim() != ''">
AND a.SOCIAL_CREATE_MONTH = #{tPaymentInfo.socialCreateMonth}
</if>
<if test="tPaymentInfo.providentPayMonth != null and tPaymentInfo.providentPayMonth.trim() != ''">
AND a.PROVIDENT_PAY_MONTH = #{tPaymentInfo.providentPayMonth}
</if>
<if test="tPaymentInfo.providentCreateMonth != null and tPaymentInfo.providentCreateMonth.trim() != ''">
AND a.PROVIDENT_CREATE_MONTH = #{tPaymentInfo.providentCreateMonth}
</if>
<if test="tPaymentInfo.settleDomainId != null and tPaymentInfo.settleDomainId.trim() != ''">
AND a.SETTLE_DOMAIN_ID = #{tPaymentInfo.settleDomainId}
</if>
</if>
</where>
GROUP BY a.EMP_IDCARD
</select>
<!-- 更改薪资社保结算状态 -->
<update id="updateForecastSocialStatusByIdList">
update t_forecast_library set SALARY_SOCIAL_FLAG = #{status}
where
ID in
<foreach item="item" index="index" collection="idList" open="(" separator="," close=")">
#{item}
</foreach>
</update>
<!-- 更改薪资公积金结算状态 -->
<update id="updateForecastFundStatusByIdList">
update t_forecast_library set SALARY_FUND_FLAG = #{status}
where
ID in
<foreach item="item" index="index" collection="idList" open="(" separator="," close=")">
#{item}
</foreach>
</update>
</mapper>
......@@ -1032,4 +1032,25 @@
</where>
GROUP BY a.EMP_IDCARD
</select>
<!-- 更改薪资社保结算状态 -->
<update id="updatePaymentSocialStatusByIdList">
update t_payment_info set SALARY_SOCIAL_FLAG = #{status}
where
ID in
<foreach item="item" index="index" collection="idList" open="(" separator="," close=")">
#{item}
</foreach>
</update>
<!-- 更改薪资公积金结算状态 -->
<update id="updatePaymentFundStatusByIdList">
update t_payment_info set SALARY_FUND_FLAG = #{status}
where
ID in
<foreach item="item" index="index" collection="idList" open="(" separator="," close=")">
#{item}
</foreach>
</update>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment