Commit df720a78 authored by 李灿灿's avatar 李灿灿

Merge branch 'develop' into feature-licancan

parents 423e2098 226f6f3f
...@@ -28,10 +28,8 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService; ...@@ -28,10 +28,8 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*; import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog; 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.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
...@@ -246,8 +244,7 @@ public class TSettleDomainController { ...@@ -246,8 +244,7 @@ public class TSettleDomainController {
*/ */
@Operation(summary = "修改项目表", description = "修改项目表") @Operation(summary = "修改项目表", description = "修改项目表")
@SysLog("修改项目表") @SysLog("修改项目表")
@PutMapping("/updateProjectInfo") @PostMapping("/updateProjectInfo")
@PreAuthorize("@pms.hasPermission('tsettledomain_edit')")
public R updateProjectInfo(@RequestBody TSettleDomain tSettleDomain) { public R updateProjectInfo(@RequestBody TSettleDomain tSettleDomain) {
return tSettleDomainService.updateProjectInfo(tSettleDomain); return tSettleDomainService.updateProjectInfo(tSettleDomain);
} }
......
...@@ -40,7 +40,6 @@ import org.springframework.stereotype.Service; ...@@ -40,7 +40,6 @@ import org.springframework.stereotype.Service;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
...@@ -55,6 +54,9 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T ...@@ -55,6 +54,9 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
@Autowired @Autowired
private RedisUtil redisUtil; private RedisUtil redisUtil;
@Autowired
private UpmsDaprUtils upmsDaprUtils;
private final TCutsomerDataPermissonMapper permissonMapper; private final TCutsomerDataPermissonMapper permissonMapper;
/** /**
* @Author fxj * @Author fxj
...@@ -117,14 +119,24 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T ...@@ -117,14 +119,24 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
@Override @Override
public R updateProjectInfo(TSettleDomain tSettleDomain) { public R updateProjectInfo(TSettleDomain tSettleDomain) {
if (Common.isNotNull(tSettleDomain)) { if (Common.isNotNull(tSettleDomain)) {
if (Common.isNotNull(tSettleDomain.getEProvince())) {
tSettleDomain.setProvince(Integer.valueOf(RedisUtil.redis.opsForValue().get(CacheConstants.AREA_VALUE + tSettleDomain.getEProvince()).toString())); R<AreaVo> areaListR = upmsDaprUtils.getAreaListR();
} if (null == areaListR || areaListR.getCode() != CommonConstants.SUCCESS) {
if (Common.isNotNull(tSettleDomain.getECity())) { return R.failed("获取区域数据失败!");
tSettleDomain.setCity(Integer.valueOf(RedisUtil.redis.opsForValue().get(CacheConstants.AREA_VALUE + tSettleDomain.getECity()).toString()));
} }
if (Common.isNotNull(tSettleDomain.getETown())) { AreaVo areaList = areaListR.getData();
tSettleDomain.setTown(Integer.valueOf(RedisUtil.redis.opsForValue().get(CacheConstants.AREA_VALUE + tSettleDomain.getETown()).toString())); if (null != areaList && !areaList.getSysAreaList().isEmpty()) {
for (SysArea area : areaList.getSysAreaList()) {
if (Common.isNotNull(tSettleDomain.getEProvince()) && area.getAreaName().equals(tSettleDomain.getEProvince())) {
tSettleDomain.setProvince(area.getId());
}
if (Common.isNotNull(tSettleDomain.getECity()) && area.getAreaName().equals(tSettleDomain.getECity())) {
tSettleDomain.setCity(area.getId());
}
if (Common.isNotNull(tSettleDomain.getETown()) && area.getAreaName().equals(tSettleDomain.getETown())) {
tSettleDomain.setTown(area.getId());
}
}
} }
TSettleDomain tSettleDomainInfo = baseMapper.selectById(tSettleDomain.getId()); TSettleDomain tSettleDomainInfo = baseMapper.selectById(tSettleDomain.getId());
if (Common.isNotNull(tSettleDomainInfo)) { if (Common.isNotNull(tSettleDomainInfo)) {
......
...@@ -517,6 +517,11 @@ public class InsurancesConstants { ...@@ -517,6 +517,11 @@ public class InsurancesConstants {
*/ */
public static final String SETTLE_MONTH_CHANGE_LIST_IS_EMPTY ="当前变更结算月列表为空"; public static final String SETTLE_MONTH_CHANGE_LIST_IS_EMPTY ="当前变更结算月列表为空";
/**
* 减员办理导入列表为空
*/
public static final String INSURANCE_REFUND_IMPORT_LIST_IS_EMPTY ="减员办理导入列表为空";
/** /**
* 替换类型无法变更项目 * 替换类型无法变更项目
*/ */
...@@ -696,12 +701,12 @@ public class InsurancesConstants { ...@@ -696,12 +701,12 @@ public class InsurancesConstants {
/** /**
* 导入减员数据 * 导入减员数据
*/ */
public static final String INSURANCE_REFUND_IMPORT = "导入减员数据"; public static final String INSURANCE_REFUND_IMPORT = "减员提交申请";
/** /**
* 减员导出办理 * 减员导出办理
*/ */
public static final String INSURANCE_REFUND_EXPORT = "减员导出办理"; public static final String INSURANCE_REFUND_EXPORT = "减员办理中";
/** /**
* 减员办理成功 * 减员办理成功
...@@ -712,7 +717,7 @@ public class InsurancesConstants { ...@@ -712,7 +717,7 @@ public class InsurancesConstants {
/** /**
* 减员退回成功 * 减员退回成功
*/ */
public static final String INSURANCE_REFUND_FAILED = "减员退回"; public static final String INSURANCE_REFUND_FAILED = "减员办理退回";
/** /**
* 变更所属项目 * 变更所属项目
...@@ -806,5 +811,96 @@ public class InsurancesConstants { ...@@ -806,5 +811,96 @@ public class InsurancesConstants {
*/ */
public static final String INSURANCES_DETAIL_IS_OVERDUE_ERROR = "保单信息已过期,不能进行出险操作"; public static final String INSURANCES_DETAIL_IS_OVERDUE_ERROR = "保单信息已过期,不能进行出险操作";
/**
* 当前的操作类型不正确
*/
/**
* 减员办理列表为空
*/
/**
* 减员退回的办理意见不能为空
*/
public static final String REFUND_MESSAGE_IS_EMPTY = "减员退回的办理意见不能为空";
/**
* 该保单信息已被更新为减员退回
*/
/**
* 该保单信息已被更新为减员成功
*/
/**
* 该保单信息已被删除
*/
public static final String INSURANCES_IS_DELETE = "该保单信息已被删除";
/**
* 导入成功
*/
public static final String IMPORT_SUCCESS = "导入成功";
/**
* 成功
*/
public static final String SUCCESS = "成功";
/**
* 失败
*/
public static final String FAILED = "失败";
/**
* 办理结果类型错误
*/
public static final String HAND_RESULT_ERROR = "办理结果类型错误";
/**
* 办理结果为空
*/
public static final String HAND_RESULT_IS_EMPTY = "办理结果为空";
/**
* 无该条数据的操作权限
*/
public static final String NO_DETAIL_JURISDICTION = "无该条数据的操作权限";
/**
* 当前为待投保状态,不可办理
*/
public static final String BUY_HANDLE_STATUS_ONE_HANDLE_ERROR = "当前为待投保状态,不可办理";
/**
* 当前为投保中状态,不可办理
*/
public static final String BUY_HANDLE_STATUS_TWO_HANDLE_ERROR = "当前为投保中状态,不可办理";
/**
* 当前为已投保状态,不可办理
*/
public static final String BUY_HANDLE_STATUS_THREE_HANDLE_ERROR = "当前为已投保状态,不可办理";
/**
* 当前为投保退回状态,不可办理
*/
public static final String BUY_HANDLE_STATUS_FOUR_HANDLE_ERROR = "当前为投保退回状态,不可办理";
/**
* 当前为待减员状态,不可办理
*/
public static final String REFUND_STATUS_ONE_HANDLE_ERROR = "当前为待减员状态,不可办理";
/**
* 当前为已减员状态,不可办理
*/
public static final String REFUND_STATUS_THREE_HANDLE_ERROR = "当前为已减员状态,不可办理";
/**
* 当前为减员退回状态,不可办理
*/
public static final String REFUND_STATUS_FOUR_HANDLE_ERROR = "当前为减员退回状态,不可办理";
} }
...@@ -238,7 +238,7 @@ public class TInsuranceDetail extends BaseEntity { ...@@ -238,7 +238,7 @@ public class TInsuranceDetail extends BaseEntity {
/** /**
* 减员状态 1待减员 2减员中3减员退回 * 减员状态 1待减员 2减员中3减员退回
*/ */
@Schema(description = "减员状态 1待减员 2减员中3减员退回") @Schema(description = "减员状态 1待减员 2减员中3减员退回,4减员成功")
private Integer reduceHandleStatus; private Integer reduceHandleStatus;
/** /**
......
...@@ -83,7 +83,7 @@ public class EKPUtil { ...@@ -83,7 +83,7 @@ public class EKPUtil {
* 注意key的书写格式,类似EL表达式的方式,属性关系用'.', 列表和数组关系用[],Map关系用["xxx"] * 注意key的书写格式,类似EL表达式的方式,属性关系用'.', 列表和数组关系用[],Map关系用["xxx"]
*/ */
public static String sendToEKP(EKPInteractiveParam param){ public static String sendToEKP(EKPInteractiveParam param){
System.out.println("开始推送EKP"); log.info("推送EKP开始");
RestTemplate yourRestTemplate = new RestTemplate(); RestTemplate yourRestTemplate = new RestTemplate();
TInsuranceSettlePushParam pushParam = InsuranceDetail2PushParam(param); TInsuranceSettlePushParam pushParam = InsuranceDetail2PushParam(param);
try{ try{
...@@ -112,21 +112,18 @@ public class EKPUtil { ...@@ -112,21 +112,18 @@ public class EKPUtil {
//必须设置上传类型,如果入参是字符串,使用MediaType.TEXT_PLAIN;如果 //必须设置上传类型,如果入参是字符串,使用MediaType.TEXT_PLAIN;如果
HttpEntity<MultiValueMap<String,Object>> entity = new HttpEntity<MultiValueMap<String,Object>>(wholeForm,headers); HttpEntity<MultiValueMap<String,Object>> entity = new HttpEntity<MultiValueMap<String,Object>>(wholeForm,headers);
//有返回值的情况 VO可以替换成具体的JavaBean //有返回值的情况 VO可以替换成具体的JavaBean
System.out.println("交易开始");
ResponseEntity<String> obj = yourRestTemplate.exchange(url, HttpMethod.POST, entity, String.class); ResponseEntity<String> obj = yourRestTemplate.exchange(url, HttpMethod.POST, entity, String.class);
System.out.println("交易结束");
System.out.println("obj"+obj);
String body = obj.getBody(); String body = obj.getBody();
if (StringUtils.isBlank(body)){ if (StringUtils.isBlank(body)){
System.out.println("交易失败"+body); log.error("交易失败");
return body; return null;
}else{ }else{
System.out.println("交易成功"+body); log.info("交易成功:"+body);
return body; return body;
} }
}catch (Exception e){ }catch (Exception e){
log.info(e.toString()); log.info(e.getMessage());
return e.getMessage(); return null;
} }
} }
......
package com.yifu.cloud.plus.v1.yifu.insurances.vo; package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data; import lombok.Data;
...@@ -24,9 +22,60 @@ public class InsuranceRefundImportParam implements Serializable { ...@@ -24,9 +22,60 @@ public class InsuranceRefundImportParam implements Serializable {
@Schema(description = "商险id") @Schema(description = "商险id")
private String id; private String id;
/**
* 员工姓名
*/
@Schema(description = "员工姓名")
private String empName;
/**
* 员工身份证号码
*/
@Schema(description = "员工身份证号码")
private String empIdcardNo;
/**
* 保险公司名称
*/
@Schema(description = "保险公司名称")
private String insuranceCompanyName;
/**
* 险种名称
*/
@Schema(description = "险种名称")
private String insuranceTypeName;
/**
* 保单开始日期
*/
@Schema(description = "保单开始日期")
private String policyStart;
/**
* 保单结束日期
*/
@Schema(description = "保单结束日期")
private String policyEnd;
/**
* 购买标准
*/
@Schema(description = "购买标准")
private String buyStandard;
/**
* 办理类型
*/
@Schema(description = "办理类型")
private String handType;
/** /**
* 办理意见 * 办理意见
*/ */
@Schema(description = "办理意见") @Schema(description = "办理意见")
private String remark; private String remark;
/**
* 错误信息
*/
@Schema(description = "错误信息")
private String errorMessage;
} }
...@@ -379,6 +379,19 @@ public class TInsuranceDetailController { ...@@ -379,6 +379,19 @@ public class TInsuranceDetailController {
return tInsuranceDetailService.updateInsuranceRefund(insuranceDetail); return tInsuranceDetailService.updateInsuranceRefund(insuranceDetail);
} }
/**
* 减员办理导入
*
* @author zhaji
* @param insuranceRefundImportList 减员信息
* @return {@link R<List<InsuranceRefundImportParam>>}
*/
@Operation(summary = "减员办理导入", description = "减员办理导入")
@PostMapping("/insuranceRefundImport")
public R insuranceRefundImport(@RequestBody List<InsuranceRefundImportParam> insuranceRefundImportList) {
return tInsuranceDetailService.insuranceRefundImport(insuranceRefundImportList);
}
/** /**
* 根据保险公司名称查询保单明细 * 根据保险公司名称查询保单明细
* *
......
...@@ -244,6 +244,16 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> { ...@@ -244,6 +244,16 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*/ */
R updateInsuranceRefund(InsuranceRefundListParam insuranceDetail); R updateInsuranceRefund(InsuranceRefundListParam insuranceDetail);
/**
* 减员办理导入
*
* @author zhaji
* @param insuranceRefundImportList 减员办理导入
* @return {@link R}
*/
R insuranceRefundImport(List<InsuranceRefundImportParam> insuranceRefundImportList);
/** /**
* 变更结算月 * 变更结算月
* *
......
package com.yifu.cloud.plus.v1.yifu.salary.entity; package com.yifu.cloud.plus.v1.yifu.salary.entity;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model; 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.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity; import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
...@@ -47,12 +45,14 @@ public class TMinSalary extends BaseEntity { ...@@ -47,12 +45,14 @@ public class TMinSalary extends BaseEntity {
*/ */
@ExcelAttribute(name = "市") @ExcelAttribute(name = "市")
@ExcelProperty(value = "市") @ExcelProperty(value = "市")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Integer city; private Integer city;
/** /**
* 县 * 县
*/ */
@ExcelAttribute(name = "县") @ExcelAttribute(name = "县")
@ExcelProperty(value = "县") @ExcelProperty(value = "县")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Integer town; private Integer town;
/** /**
* 最低工资标准 * 最低工资标准
......
...@@ -243,5 +243,22 @@ public class TSalaryAccount2022 { ...@@ -243,5 +243,22 @@ public class TSalaryAccount2022 {
@ExcelAttribute(name = "累计婴幼儿照护费用") @ExcelAttribute(name = "累计婴幼儿照护费用")
@ExcelProperty("累计婴幼儿照护费用") @ExcelProperty("累计婴幼儿照护费用")
private BigDecimal sumBabyMoney; private BigDecimal sumBabyMoney;
/**
* 是否当月新增人员
*/
@ExcelAttribute(name = "是否当月新增人员", readConverterExp = "0=否,1=是")
@ExcelProperty("是否当月新增人员")
private String isNewEmployee;
/**
* 入职年月
*/
@ExcelAttribute(name = "入职年月")
@ExcelProperty("入职年月")
private String createMonth;
/**
* 手机号码
*/
@ExcelAttribute(name = "手机号码")
@ExcelProperty("手机号码")
private String empPhone;
} }
...@@ -39,14 +39,14 @@ public class TSpecialDeducationSum extends BaseEntity { ...@@ -39,14 +39,14 @@ public class TSpecialDeducationSum extends BaseEntity {
*/ */
@NotBlank(message = "导入月份不能为空") @NotBlank(message = "导入月份不能为空")
@Length(max = 6, message = "导入月份不能超过6个字符") @Length(max = 6, message = "导入月份不能超过6个字符")
@ExcelAttribute(name = "导入月份", isNotEmpty = true, errorInfo = "导入月份不能为空", maxLength = 6) @ExcelAttribute(name = "导入月份", maxLength = 6)
@ExcelProperty(value = "导入月份") @ExcelProperty(value = "导入月份")
private String createMonth; private String createMonth;
/** /**
* 申报单位 * 申报单位
*/ */
@Length(max = 20, message = "申报单位不能超过20个字符") @Length(max = 50, message = "申报单位不能超过50个字符")
@ExcelAttribute(name = "申报单位", maxLength = 20) @ExcelAttribute(name = "申报单位", maxLength = 50, isNotEmpty = true)
@ExcelProperty(value = "申报单位") @ExcelProperty(value = "申报单位")
private String declareTitle; private String declareTitle;
/** /**
...@@ -60,101 +60,101 @@ public class TSpecialDeducationSum extends BaseEntity { ...@@ -60,101 +60,101 @@ public class TSpecialDeducationSum extends BaseEntity {
* 姓名 * 姓名
*/ */
@Length(max = 20, message = "姓名不能超过20个字符") @Length(max = 20, message = "姓名不能超过20个字符")
@ExcelAttribute(name = "姓名", maxLength = 20) @ExcelAttribute(name = "姓名", maxLength = 20, isNotEmpty = true)
@ExcelProperty(value = "姓名") @ExcelProperty(value = "姓名")
private String name; private String name;
/** /**
* 证照类型 * 证照类型
*/ */
@Length(max = 20, message = "证照类型不能超过20个字符") @Length(max = 20, message = "证照类型不能超过20个字符")
@ExcelAttribute(name = "证照类型", maxLength = 20) @ExcelAttribute(name = "证照类型", maxLength = 20, isNotEmpty = true)
@ExcelProperty(value = "证照类型") @ExcelProperty(value = "证照类型")
private String type; private String type;
/** /**
* 证照号码 * 证照号码
*/ */
@Length(max = 20, message = "证照号码不能超过20个字符") @Length(max = 20, message = "证照号码不能超过20个字符")
@ExcelAttribute(name = "证照号码", maxLength = 20) @ExcelAttribute(name = "证照号码", maxLength = 20, isNotEmpty = true)
@ExcelProperty(value = "证照号码") @ExcelProperty(value = "证照号码")
private String idNumber; private String idNumber;
/** /**
* 所得期间起 * 所得期间起
*/ */
@Length(max = 20, message = "所得期间起不能超过20个字符") @Length(max = 20, message = "所得期间起不能超过20个字符")
@ExcelAttribute(name = "所得期间起", maxLength = 20) @ExcelAttribute(name = "所得期间起", maxLength = 20, isNotEmpty = true)
@ExcelProperty(value = "所得期间起") @ExcelProperty(value = "所得期间起")
private String createStart; private String createStart;
/** /**
* 所得期间止 * 所得期间止
*/ */
@Length(max = 20, message = "所得期间止不能超过20个字符") @Length(max = 20, message = "所得期间止不能超过20个字符")
@ExcelAttribute(name = "所得期间止", maxLength = 20) @ExcelAttribute(name = "所得期间止", maxLength = 20, isNotEmpty = true)
@ExcelProperty(value = "所得期间止") @ExcelProperty(value = "所得期间止")
private String createEnd; private String createEnd;
/** /**
* 本期收入 * 本期收入
*/ */
@ExcelAttribute(name = "本期收入") @ExcelAttribute(name = "本期收入", isFloat = true,max = "999999999.99")
@ExcelProperty(value = "本期收入") @ExcelProperty(value = "本期收入")
private BigDecimal currentIncome; private BigDecimal currentIncome;
/** /**
* 本期免税收入 * 本期免税收入
*/ */
@ExcelAttribute(name = "本期免税收入") @ExcelAttribute(name = "本期免税收入", isFloat = true,max = "999999999.99")
@ExcelProperty(value = "本期免税收入") @ExcelProperty(value = "本期免税收入")
private BigDecimal currentIncomeTaxFree; private BigDecimal currentIncomeTaxFree;
/** /**
* 基本医疗保险费 * 基本医疗保险费
*/ */
@ExcelAttribute(name = "基本医疗保险费") @ExcelAttribute(name = "基本医疗保险费", isFloat = true,max = "999999999.99")
@ExcelProperty(value = "基本医疗保险费") @ExcelProperty(value = "基本医疗保险费")
private BigDecimal insurancePension; private BigDecimal insurancePension;
/** /**
* 基本医疗保险费 * 基本医疗保险费
*/ */
@ExcelAttribute(name = "基本医疗保险费") @ExcelAttribute(name = "基本医疗保险费", isFloat = true,max = "999999999.99")
@ExcelProperty(value = "基本医疗保险费") @ExcelProperty(value = "基本医疗保险费")
private BigDecimal insuranceMedical; private BigDecimal insuranceMedical;
/** /**
* 失业保险费 * 失业保险费
*/ */
@ExcelAttribute(name = "失业保险费") @ExcelAttribute(name = "失业保险费", isFloat = true,max = "999999999.99")
@ExcelProperty(value = "失业保险费") @ExcelProperty(value = "失业保险费")
private BigDecimal insuranceUnemployment; private BigDecimal insuranceUnemployment;
/** /**
* 住房公积金 * 住房公积金
*/ */
@ExcelAttribute(name = "住房公积金") @ExcelAttribute(name = "住房公积金", isFloat = true,max = "999999999.99")
@ExcelProperty(value = "住房公积金") @ExcelProperty(value = "住房公积金")
private BigDecimal fund; private BigDecimal fund;
/** /**
* 累计子女教育 * 累计子女教育
*/ */
@ExcelAttribute(name = "累计子女教育") @ExcelAttribute(name = "累计子女教育", isFloat = true,max = "999999999.99")
@ExcelProperty(value = "累计子女教育") @ExcelProperty(value = "累计子女教育")
private BigDecimal sumChildEduMoney; private BigDecimal sumChildEduMoney;
/** /**
* 累计住房贷款利息 * 累计住房贷款利息
*/ */
@ExcelAttribute(name = "累计住房贷款利息") @ExcelAttribute(name = "累计住房贷款利息", isFloat = true,max = "999999999.99")
@ExcelProperty(value = "累计住房贷款利息") @ExcelProperty(value = "累计住房贷款利息")
private BigDecimal sumHousingLoanMoney; private BigDecimal sumHousingLoanMoney;
/** /**
* 累计住房租金 * 累计住房租金
*/ */
@ExcelAttribute(name = "累计住房租金") @ExcelAttribute(name = "累计住房租金", isFloat = true,max = "999999999.99")
@ExcelProperty(value = "累计住房租金") @ExcelProperty(value = "累计住房租金")
private BigDecimal sumHousingRentMoney; private BigDecimal sumHousingRentMoney;
/** /**
* 累计赡养老人 * 累计赡养老人
*/ */
@ExcelAttribute(name = "累计赡养老人") @ExcelAttribute(name = "累计赡养老人", isFloat = true,max = "999999999.99")
@ExcelProperty(value = "累计赡养老人") @ExcelProperty(value = "累计赡养老人")
private BigDecimal sumSupportElderlyMoney; private BigDecimal sumSupportElderlyMoney;
/** /**
* 累计继续教育 * 累计继续教育
*/ */
@ExcelAttribute(name = "累计继续教育") @ExcelAttribute(name = "累计继续教育", isFloat = true,max = "999999999.99")
@ExcelProperty(value = "累计继续教育") @ExcelProperty(value = "累计继续教育")
private BigDecimal sumContinuingEducationMoney; private BigDecimal sumContinuingEducationMoney;
...@@ -162,62 +162,62 @@ public class TSpecialDeducationSum extends BaseEntity { ...@@ -162,62 +162,62 @@ public class TSpecialDeducationSum extends BaseEntity {
* 累计婴幼儿照护费用 (累计3岁以下婴幼儿照护) * 累计婴幼儿照护费用 (累计3岁以下婴幼儿照护)
* hgw 2022-4-2 11:05:44 樊青青提的需求 * hgw 2022-4-2 11:05:44 樊青青提的需求
*/ */
@ExcelAttribute(name = "累计婴幼儿照护费用") @ExcelAttribute(name = "累计婴幼儿照护费用", isFloat = true,max = "999999999.99")
@ExcelProperty(value = "累计婴幼儿照护费用") @ExcelProperty(value = "累计婴幼儿照护费用")
private BigDecimal sumBabyMoney; private BigDecimal sumBabyMoney;
/** /**
* 企业(职业)年金 * 企业(职业)年金
*/ */
@ExcelAttribute(name = "企业(职业)年金") @ExcelAttribute(name = "企业(职业)年金", isFloat = true,max = "999999999.99")
@ExcelProperty(value = "企业(职业)年金") @ExcelProperty(value = "企业(职业)年金")
private BigDecimal enterpriseAnnuity; private BigDecimal enterpriseAnnuity;
/** /**
* 商业健康保险 * 商业健康保险
*/ */
@ExcelAttribute(name = "商业健康保险") @ExcelAttribute(name = "商业健康保险", isFloat = true,max = "999999999.99")
@ExcelProperty(value = "商业健康保险") @ExcelProperty(value = "商业健康保险")
private BigDecimal takingRisks; private BigDecimal takingRisks;
/** /**
* 税延养老保险 * 税延养老保险
*/ */
@ExcelAttribute(name = "税延养老保险") @ExcelAttribute(name = "税延养老保险", isFloat = true,max = "999999999.99")
@ExcelProperty(value = "税延养老保险") @ExcelProperty(value = "税延养老保险")
private BigDecimal taxDeferredInsurance; private BigDecimal taxDeferredInsurance;
/** /**
* 其他 * 其他
*/ */
@ExcelAttribute(name = "其他") @ExcelAttribute(name = "其他", isFloat = true,max = "999999999.99")
@ExcelProperty(value = "其他") @ExcelProperty(value = "其他")
private BigDecimal otherMoney; private BigDecimal otherMoney;
/** /**
* 准予扣除的捐赠额 * 准予扣除的捐赠额
*/ */
@ExcelAttribute(name = "准予扣除的捐赠额") @ExcelAttribute(name = "准予扣除的捐赠额", isFloat = true,max = "999999999.99")
@ExcelProperty(value = "准予扣除的捐赠额") @ExcelProperty(value = "准予扣除的捐赠额")
private BigDecimal donationAmount; private BigDecimal donationAmount;
/** /**
* 税前扣除项目合计 * 税前扣除项目合计
*/ */
@ExcelAttribute(name = "税前扣除项目合计") @ExcelAttribute(name = "税前扣除项目合计", isFloat = true,max = "999999999.99")
@ExcelProperty(value = "税前扣除项目合计") @ExcelProperty(value = "税前扣除项目合计")
private BigDecimal preTaxDeduction; private BigDecimal preTaxDeduction;
/** /**
* 减免税额 * 减免税额
*/ */
@ExcelAttribute(name = "减免税额") @ExcelAttribute(name = "减免税额", isFloat = true,max = "999999999.99")
@ExcelProperty(value = "减免税额") @ExcelProperty(value = "减免税额")
private BigDecimal taxSavings; private BigDecimal taxSavings;
/** /**
* 减除费用 * 减除费用
*/ */
@ExcelAttribute(name = "减除费用") @ExcelAttribute(name = "减除费用", isFloat = true,max = "999999999.99")
@ExcelProperty(value = "减除费用") @ExcelProperty(value = "减除费用")
private BigDecimal costReduction; private BigDecimal costReduction;
/** /**
* 已扣缴税额 * 已扣缴税额
*/ */
@ExcelAttribute(name = "已扣缴税额") @ExcelAttribute(name = "已扣缴税额", isFloat = true,max = "999999999.99")
@ExcelProperty(value = "已扣缴税额") @ExcelProperty(value = "已扣缴税额")
private BigDecimal taxesWithheld; private BigDecimal taxesWithheld;
/** /**
......
...@@ -49,49 +49,18 @@ public class TStatisticsCurrentReport { ...@@ -49,49 +49,18 @@ public class TStatisticsCurrentReport {
/** /**
* 税务主体(封面抬头) * 税务主体(封面抬头)
*/ */
@ExcelAttribute(name = "税务主体(封面抬头)", maxLength = 50) @ExcelAttribute(name = "申报单位", maxLength = 50)
@Length(max = 50, message = "税务主体(封面抬头)不能超过50个字符") @Length(max = 50, message = "申报单位不能超过50个字符")
@ExcelProperty("税务主体(封面抬头)") @ExcelProperty("申报单位")
private String invoiceTitle; private String invoiceTitle;
/**
* 结算部门id
*/
@ExcelAttribute(name = "结算部门id", isNotEmpty = true, errorInfo = "结算部门id不能为空", maxLength = 32)
@NotBlank(message = "结算部门id不能为空")
@Length(max = 32, message = "结算部门id不能超过32个字符")
@ExcelProperty("结算部门id")
private String settleDepartId;
/**
* 结算部门no
*/
@ExcelAttribute(name = "结算部门no", isNotEmpty = true, errorInfo = "结算部门no不能为空", maxLength = 50)
@NotBlank(message = "结算部门no不能为空")
@Length(max = 50, message = "结算部门no不能超过50个字符")
@ExcelProperty("结算部门no")
private String settleDepartNo;
/**
* 结算部门name
*/
@ExcelAttribute(name = "结算部门name", isNotEmpty = true, errorInfo = "结算部门name不能为空", maxLength = 50)
@NotBlank(message = "结算部门name不能为空")
@Length(max = 50, message = "结算部门name不能超过50个字符")
@ExcelProperty("结算部门name")
private String settleDepartName;
/** /**
* 申报月份(YYYYMM) * 申报月份(YYYYMM)
*/ */
@ExcelAttribute(name = "申报月份(YYYYMM)", isNotEmpty = true, errorInfo = "申报月份(YYYYMM)不能为空", maxLength = 6) @ExcelAttribute(name = "申报月份", isNotEmpty = true, errorInfo = "申报月份(YYYYMM)不能为空", maxLength = 6)
@NotBlank(message = "申报月份(YYYYMM)不能为空") @NotBlank(message = "申报月份(YYYYMM)不能为空")
@Length(max = 6, message = "申报月份(YYYYMM)不能超过6个字符") @Length(max = 6, message = "申报月份(YYYYMM)不能超过6个字符")
@ExcelProperty("申报月份(YYYYMM)") @ExcelProperty("申报月份")
private String declareMonth; private String declareMonth;
/**
* 员工 ID
*/
@ExcelAttribute(name = "员工 ID", maxLength = 32)
@Length(max = 32, message = "员工 ID不能超过32个字符")
@ExcelProperty("员工 ID")
private String empId;
/** /**
* 姓名 * 姓名
*/ */
...@@ -106,12 +75,60 @@ public class TStatisticsCurrentReport { ...@@ -106,12 +75,60 @@ public class TStatisticsCurrentReport {
@Length(max = 25, message = "身份证号不能超过25个字符") @Length(max = 25, message = "身份证号不能超过25个字符")
@ExcelProperty("身份证号") @ExcelProperty("身份证号")
private String empIdcard; private String empIdcard;
/**
* 本期收入
*/
@ExcelAttribute(name = "本期收入")
@ExcelProperty("本期收入")
private BigDecimal realSalary;
/**
* 本期应纳税额
*/
@ExcelAttribute(name = "本期应纳税额")
@ExcelProperty("本期应纳税额")
private BigDecimal salaryTax;
/**
* 本期基本养老保险
*/
@ExcelAttribute(name = "本期基本养老保险")
@ExcelProperty("本期基本养老保险")
private BigDecimal personalPensionMoney;
/**
* 本期基本医疗保险
*/
@ExcelAttribute(name = "本期基本医疗保险")
@ExcelProperty("本期基本医疗保险")
private BigDecimal personalMedicalMoney;
/**
* 本期失业保险
*/
@ExcelAttribute(name = "本期失业保险")
@ExcelProperty("本期失业保险")
private BigDecimal personalUnemploymentMoney;
/**
* 本期住房公积金
*/
@ExcelAttribute(name = "本期住房公积金")
@ExcelProperty("本期住房公积金")
private BigDecimal personalProvidentFee;
/**
* 本期企业年金
*/
@ExcelAttribute(name = "本期企业年金")
@ExcelProperty("本期企业年金")
private BigDecimal enterpriseAnnuity;
/** /**
* 累计减除费用 * 累计减除费用
*/ */
@ExcelAttribute(name = "累计减除费用") @ExcelAttribute(name = "累计减除费用")
@ExcelProperty("累计减除费用") @ExcelProperty("累计减除费用")
private BigDecimal costReduction; private BigDecimal costReduction;
/**
* 累计应纳税所得额
*/
@ExcelAttribute(name = "累计应纳税所得额")
@ExcelProperty("累计应纳税所得额")
private BigDecimal taxable;
/** /**
* 累计子女教育 * 累计子女教育
*/ */
...@@ -119,17 +136,23 @@ public class TStatisticsCurrentReport { ...@@ -119,17 +136,23 @@ public class TStatisticsCurrentReport {
@ExcelProperty("累计子女教育") @ExcelProperty("累计子女教育")
private BigDecimal childEduinfoMoney; private BigDecimal childEduinfoMoney;
/** /**
* 累计住房租金 * 累计继续教育
*/ */
@ExcelAttribute(name = "累计住房租金") @ExcelAttribute(name = "累计继续教育")
@ExcelProperty("累计住房租金") @ExcelProperty("累计继续教育")
private BigDecimal housingRentalinfoMoney; private BigDecimal continuingEducationExpenseMoney;
/** /**
* 累计住房贷款 * 累计住房贷款
*/ */
@ExcelAttribute(name = "累计住房贷款") @ExcelAttribute(name = "累计住房贷款")
@ExcelProperty("累计住房贷款") @ExcelProperty("累计住房贷款")
private BigDecimal housingLoanInterestExpenseMoney; private BigDecimal housingLoanInterestExpenseMoney;
/**
* 累计住房租金
*/
@ExcelAttribute(name = "累计住房租金")
@ExcelProperty("累计住房租金")
private BigDecimal housingRentalinfoMoney;
/** /**
* 累计赡养老人 * 累计赡养老人
*/ */
...@@ -137,59 +160,69 @@ public class TStatisticsCurrentReport { ...@@ -137,59 +160,69 @@ public class TStatisticsCurrentReport {
@ExcelProperty("累计赡养老人") @ExcelProperty("累计赡养老人")
private BigDecimal supportElderlyExpenseMoney; private BigDecimal supportElderlyExpenseMoney;
/** /**
* 累计继续教育 * 累计3岁以下婴幼儿照护
*/ */
@ExcelAttribute(name = "累计继续教育") @ExcelAttribute(name = "累计3岁以下婴幼儿照护")
@ExcelProperty("累计继续教育") @ExcelProperty("累计3岁以下婴幼儿照护")
private BigDecimal continuingEducationExpenseMoney; private BigDecimal sumBabyMoney;
/** /**
* 累计应发 * 是否当月新增人员
*/ */
@ExcelAttribute(name = "累计应发") @ExcelAttribute(name = "是否当月新增人员", readConverterExp = "0=否,1=是")
@ExcelProperty("累计应发") @ExcelProperty("是否当月新增人员")
private BigDecimal realSalary; private String isNewEmployee;
/** /**
* 累计基本养老 * 入职年月
*/ */
@ExcelAttribute(name = "累计基本养老") @ExcelAttribute(name = "入职年月")
@ExcelProperty("累计基本养老") @ExcelProperty("入职年月")
private BigDecimal personalPensionMoney; private String createMonth;
/** /**
* 累计基本医疗 * 手机号码
*/ */
@ExcelAttribute(name = "累计基本医疗") @ExcelAttribute(name = "手机号码")
@ExcelProperty("累计基本医疗") @ExcelProperty("手机号码")
private BigDecimal personalMedicalMoney; private String empPhone;
// 以下导出不需要
/** /**
* 累计失业 * 员工 ID
*/ */
@ExcelAttribute(name = "累计失业") @ExcelAttribute(name = "员工ID", maxLength = 32)
@ExcelProperty("累计失业") @Length(max = 32, message = "员工 ID不能超过32个字符")
private BigDecimal personalUnemploymentMoney; @ExcelProperty("员工ID")
private String empId;
/** /**
* 个人社保 * 结算部门id
*/ */
@ExcelAttribute(name = "个人社保") @ExcelAttribute(name = "结算部门id", isNotEmpty = true, errorInfo = "结算部门id不能为空", maxLength = 32)
@ExcelProperty("个人社保") @NotBlank(message = "结算部门id不能为空")
private BigDecimal personalSocial; @Length(max = 32, message = "结算部门id不能超过32个字符")
@ExcelProperty("结算部门id")
private String settleDepartId;
/** /**
* 累计住房公积金 * 结算部门no
*/ */
@ExcelAttribute(name = "累计住房公积金") @ExcelAttribute(name = "结算部门no", isNotEmpty = true, errorInfo = "结算部门no不能为空", maxLength = 50)
@ExcelProperty("累计住房公积金") @NotBlank(message = "结算部门no不能为空")
private BigDecimal personalProvidentFee; @Length(max = 50, message = "结算部门no不能超过50个字符")
@ExcelProperty("结算部门no")
private String settleDepartNo;
/** /**
* 累计企业年金 * 结算部门name
*/ */
@ExcelAttribute(name = "累计企业年金") @ExcelAttribute(name = "结算部门name", isNotEmpty = true, errorInfo = "结算部门name不能为空", maxLength = 50)
@ExcelProperty("累计企业年金") @NotBlank(message = "结算部门name不能为空")
private BigDecimal enterpriseAnnuity; @Length(max = 50, message = "结算部门name不能超过50个字符")
@ExcelProperty("结算部门name")
private String settleDepartName;
/** /**
* 累计应纳税所得 * 个人社保
*/ */
@ExcelAttribute(name = "累计应纳税所得") @ExcelAttribute(name = "个人社保")
@ExcelProperty("累计应纳税所得") @ExcelProperty("个人社保")
private BigDecimal taxable; private BigDecimal personalSocial;
/** /**
* 税率 * 税率
*/ */
...@@ -202,12 +235,7 @@ public class TStatisticsCurrentReport { ...@@ -202,12 +235,7 @@ public class TStatisticsCurrentReport {
@ExcelAttribute(name = "速算扣除") @ExcelAttribute(name = "速算扣除")
@ExcelProperty("速算扣除") @ExcelProperty("速算扣除")
private BigDecimal quickDeducation; private BigDecimal quickDeducation;
/**
* 累计应纳税额
*/
@ExcelAttribute(name = "累计应纳税额")
@ExcelProperty("累计应纳税额")
private BigDecimal salaryTax;
/** /**
* 单位id * 单位id
*/ */
...@@ -235,11 +263,6 @@ public class TStatisticsCurrentReport { ...@@ -235,11 +263,6 @@ public class TStatisticsCurrentReport {
@ExcelAttribute(name = "专项汇总") @ExcelAttribute(name = "专项汇总")
@ExcelProperty("专项汇总") @ExcelProperty("专项汇总")
private BigDecimal specialDeduMoney; private BigDecimal specialDeduMoney;
/**
* 累计婴幼儿照护费用
*/
@ExcelAttribute(name = "累计婴幼儿照护费用")
@ExcelProperty("累计婴幼儿照护费用")
private BigDecimal sumBabyMoney;
} }
...@@ -241,5 +241,22 @@ public class TStatisticsTaxSalary { ...@@ -241,5 +241,22 @@ public class TStatisticsTaxSalary {
@ExcelAttribute(name = "累计婴幼儿照护费用") @ExcelAttribute(name = "累计婴幼儿照护费用")
@ExcelProperty("累计婴幼儿照护费用") @ExcelProperty("累计婴幼儿照护费用")
private BigDecimal sumBabyMoney; private BigDecimal sumBabyMoney;
/**
* 是否当月新增人员
*/
@ExcelAttribute(name = "是否当月新增人员", readConverterExp = "0=否,1=是")
@ExcelProperty("是否当月新增人员")
private String isNewEmployee;
/**
* 入职年月
*/
@ExcelAttribute(name = "入职年月")
@ExcelProperty("入职年月")
private String createMonth;
/**
* 手机号码
*/
@ExcelAttribute(name = "手机号码")
@ExcelProperty("手机号码")
private String empPhone;
} }
...@@ -16,11 +16,13 @@ ...@@ -16,11 +16,13 @@
*/ */
package com.yifu.cloud.plus.v1.yifu.salary.vo; package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsCurrentReport; import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsCurrentReport;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.Set;
/** /**
* 统计-本期申报 * 统计-本期申报
...@@ -37,6 +39,10 @@ public class TStatisticsCurrentReportSearchVo extends TStatisticsCurrentReport { ...@@ -37,6 +39,10 @@ public class TStatisticsCurrentReportSearchVo extends TStatisticsCurrentReport {
@Schema(description = "选中ID,多个逗号分割") @Schema(description = "选中ID,多个逗号分割")
private String ids; private String ids;
@TableField(exist = false)
@Schema(description = "导出的表头的Set")
private Set<String> exportFields;
/** /**
* 创建时间区间 [开始时间,结束时间] * 创建时间区间 [开始时间,结束时间]
*/ */
......
package com.yifu.cloud.plus.v1.yifu.salary.controller; package com.yifu.cloud.plus.v1.yifu.salary.controller;
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.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog; import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
...@@ -68,14 +73,8 @@ public class TMinSalaryController { ...@@ -68,14 +73,8 @@ public class TMinSalaryController {
@Operation(description = "新增(wxhr:tminsalary_add)") @Operation(description = "新增(wxhr:tminsalary_add)")
@PostMapping @PostMapping
@PreAuthorize("@pms.hasPermission('wxhr:tminsalary_add')") @PreAuthorize("@pms.hasPermission('wxhr:tminsalary_add')")
public R save(@Valid @RequestBody TMinSalary tMinSalary) { public R<Boolean> save(@Valid @RequestBody TMinSalary tMinSalary) {
YifuUser user = SecurityUtils.getUser(); return tMinSalaryService.saveDiy(tMinSalary);
if (null == user || null == user.getId()) {
return R.failed("获取登录用户信息失败!");
}
tMinSalary.setCreateTime(LocalDateTime.now());
tMinSalary.setCreateBy(String.valueOf(user.getId()));
return new R<>(tMinSalaryService.save(tMinSalary));
} }
/** /**
......
package com.yifu.cloud.plus.v1.yifu.salary.controller; package com.yifu.cloud.plus.v1.yifu.salary.controller;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; 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.Common;
...@@ -119,6 +120,11 @@ public class TSalaryConfigStandardController { ...@@ -119,6 +120,11 @@ public class TSalaryConfigStandardController {
if (null == user || null == user.getId()) { if (null == user || null == user.getId()) {
return R.failed(NO_USER); return R.failed(NO_USER);
} }
long res = tSalaryConfigStandardService.count(Wrappers.<TSalaryConfigStandard>query().lambda()
.eq(TSalaryConfigStandard::getDbFiedName,tSalaryConfigStandard.getDbFiedName()));
if (res > 0){
return R.failed("已存在系统标准数据项");
}
// 填充个人代扣等java字段 // 填充个人代扣等java字段
this.setJavaFiedName(tSalaryConfigStandard); this.setJavaFiedName(tSalaryConfigStandard);
tSalaryConfigStandard.setCreateBy(String.valueOf(user.getId())); tSalaryConfigStandard.setCreateBy(String.valueOf(user.getId()));
...@@ -144,6 +150,12 @@ public class TSalaryConfigStandardController { ...@@ -144,6 +150,12 @@ public class TSalaryConfigStandardController {
if (null == user || null == user.getId()) { if (null == user || null == user.getId()) {
return R.failed(NO_USER); return R.failed(NO_USER);
} }
long res = tSalaryConfigStandardService.count(Wrappers.<TSalaryConfigStandard>query().lambda()
.eq(TSalaryConfigStandard::getDbFiedName,tSalaryConfigStandard.getDbFiedName())
.ne(TSalaryConfigStandard::getId,tSalaryConfigStandard.getId()));
if (res > 0){
return R.failed("已存在系统标准数据项");
}
// 填充个人代扣等java字段 // 填充个人代扣等java字段
this.setJavaFiedName(tSalaryConfigStandard); this.setJavaFiedName(tSalaryConfigStandard);
if (String.valueOf(user.getId()).equals(tSalaryConfigStandard.getCreateBy())) { if (String.valueOf(user.getId()).equals(tSalaryConfigStandard.getCreateBy())) {
......
...@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; ...@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 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.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil; 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.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog; import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSpecialDeducationSum; import com.yifu.cloud.plus.v1.yifu.salary.entity.TSpecialDeducationSum;
...@@ -13,8 +14,10 @@ import com.yifu.cloud.plus.v1.yifu.salary.service.TSpecialDeducationSumService; ...@@ -13,8 +14,10 @@ import com.yifu.cloud.plus.v1.yifu.salary.service.TSpecialDeducationSumService;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.SneakyThrows;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.validation.Valid; import javax.validation.Valid;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
...@@ -73,7 +76,7 @@ public class TSpecialDeducationSumController { ...@@ -73,7 +76,7 @@ public class TSpecialDeducationSumController {
@Operation(description = "新增(wxhr:tspecialdeducationsum_add)") @Operation(description = "新增(wxhr:tspecialdeducationsum_add)")
@PostMapping @PostMapping
@PreAuthorize("@pms.hasPermission('wxhr:tspecialdeducationsum_add')") @PreAuthorize("@pms.hasPermission('wxhr:tspecialdeducationsum_add')")
public R save(@Valid @RequestBody TSpecialDeducationSum tSpecialDeducationSum) { public R<Boolean> save(@Valid @RequestBody TSpecialDeducationSum tSpecialDeducationSum) {
return new R<>(tSpecialDeducationSumService.save(tSpecialDeducationSum)); return new R<>(tSpecialDeducationSumService.save(tSpecialDeducationSum));
} }
...@@ -87,7 +90,7 @@ public class TSpecialDeducationSumController { ...@@ -87,7 +90,7 @@ public class TSpecialDeducationSumController {
@SysLog("修改") @SysLog("修改")
@PutMapping @PutMapping
@PreAuthorize("@pms.hasPermission('wxhr:tspecialdeducationsum_edit')") @PreAuthorize("@pms.hasPermission('wxhr:tspecialdeducationsum_edit')")
public R update(@RequestBody TSpecialDeducationSum tSpecialDeducationSum) { public R<Boolean> update(@RequestBody TSpecialDeducationSum tSpecialDeducationSum) {
return new R<>(tSpecialDeducationSumService.updateById(tSpecialDeducationSum)); return new R<>(tSpecialDeducationSumService.updateById(tSpecialDeducationSum));
} }
...@@ -101,7 +104,7 @@ public class TSpecialDeducationSumController { ...@@ -101,7 +104,7 @@ public class TSpecialDeducationSumController {
@SysLog("删除") @SysLog("删除")
@DeleteMapping("/{id}") @DeleteMapping("/{id}")
@PreAuthorize("@pms.hasPermission('wxhr:tspecialdeducationsum_del')") @PreAuthorize("@pms.hasPermission('wxhr:tspecialdeducationsum_del')")
public R removeById(@PathVariable String id) { public R<Boolean> removeById(@PathVariable String id) {
return new R<>(tSpecialDeducationSumService.removeById(id)); return new R<>(tSpecialDeducationSumService.removeById(id));
} }
...@@ -116,7 +119,7 @@ public class TSpecialDeducationSumController { ...@@ -116,7 +119,7 @@ public class TSpecialDeducationSumController {
@SysLog("上传专项扣除") @SysLog("上传专项扣除")
@PostMapping("/uploadSds") @PostMapping("/uploadSds")
//@PreAuthorize("@pms.hasPermission('wxhr:salary_upload')") //@PreAuthorize("@pms.hasPermission('wxhr:salary_upload')")
public R uploadSds(@RequestBody List<TSpecialDeducationSum> savList) { public R<List<ErrorMessage>> uploadSds(@RequestBody List<TSpecialDeducationSum> savList) {
return tSpecialDeducationSumService.uploadSds(savList); return tSpecialDeducationSumService.uploadSds(savList);
} }
...@@ -148,7 +151,7 @@ public class TSpecialDeducationSumController { ...@@ -148,7 +151,7 @@ public class TSpecialDeducationSumController {
@Operation(description = "删除本月全部专项扣除") @Operation(description = "删除本月全部专项扣除")
@SysLog("删除本月全部专项扣除") @SysLog("删除本月全部专项扣除")
@PostMapping("/doDeleteTSumSpecialDeducationAll") @PostMapping("/doDeleteTSumSpecialDeducationAll")
public R doDeleteTSumSpecialDeducationAll(String yearMonth, String declareTitle) { public R<Boolean> doDeleteTSumSpecialDeducationAll(String yearMonth, String declareTitle) {
if (Common.isEmpty(yearMonth)) { if (Common.isEmpty(yearMonth)) {
SimpleDateFormat df = new SimpleDateFormat("yyyyMM"); SimpleDateFormat df = new SimpleDateFormat("yyyyMM");
yearMonth = df.format(new Date()); yearMonth = df.format(new Date());
...@@ -160,7 +163,7 @@ public class TSpecialDeducationSumController { ...@@ -160,7 +163,7 @@ public class TSpecialDeducationSumController {
if (num == 0) { if (num == 0) {
return R.failed("当前条件查询无数据,未删除"); return R.failed("当前条件查询无数据,未删除");
} else { } else {
return new R<>("已删除" + num + "条数据"); return R.ok(null,"已删除" + num + "条数据");
} }
} }
...@@ -174,7 +177,7 @@ public class TSpecialDeducationSumController { ...@@ -174,7 +177,7 @@ public class TSpecialDeducationSumController {
@Operation(description = "导出专项扣除") @Operation(description = "导出专项扣除")
@SysLog("导出专项扣除") @SysLog("导出专项扣除")
@GetMapping("/doExportSpecialDeducationSum") @GetMapping("/doExportSpecialDeducationSum")
public R doExportSpecialDeducationSum(TSpecialDeducationSum tSpecialDeducationSum) { public R<List<TSpecialDeducationSum>> doExportSpecialDeducationSum(TSpecialDeducationSum tSpecialDeducationSum) {
if (Common.isEmpty(tSpecialDeducationSum.getCreateMonth())) { if (Common.isEmpty(tSpecialDeducationSum.getCreateMonth())) {
String nowMonth = DateUtil.addMonth(0); //本月 String nowMonth = DateUtil.addMonth(0); //本月
tSpecialDeducationSum.setCreateMonth(nowMonth); tSpecialDeducationSum.setCreateMonth(nowMonth);
......
...@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -22,6 +22,7 @@ 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.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil; 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.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.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsCurrentReport; import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsCurrentReport;
import com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsCurrentReportService; import com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsCurrentReportService;
...@@ -92,6 +93,20 @@ public class TStatisticsCurrentReportController { ...@@ -92,6 +93,20 @@ public class TStatisticsCurrentReportController {
tStatisticsCurrentReportService.listExport(response, searchVo); tStatisticsCurrentReportService.listExport(response, searchVo);
} }
/**
* 通过id删除统计-工资薪金
*
* @param id id
* @return R
*/
@Operation(summary = "通过id删除统计-本期申报", description = "通过id删除统计-本期申报:hasPermission('salary_tstatisticscurrentreport_del')")
@SysLog("通过id删除统计-本期申报")
@DeleteMapping("/{id}")
@PreAuthorize("@pms.hasPermission('salary_tstatisticscurrentreport_del')")
public R<Boolean> removeById(@PathVariable String id) {
return R.ok(tStatisticsCurrentReportService.removeById(id));
}
/** /**
* @param * @param
* @Description: 生成本期申报 * @Description: 生成本期申报
......
...@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.service; ...@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.service;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; 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.TMinSalary; import com.yifu.cloud.plus.v1.yifu.salary.entity.TMinSalary;
/** /**
...@@ -22,4 +23,5 @@ public interface TMinSalaryService extends IService<TMinSalary> { ...@@ -22,4 +23,5 @@ public interface TMinSalaryService extends IService<TMinSalary> {
IPage<TMinSalary> getTMinSalaryPage(Page<TMinSalary> page, TMinSalary tMinSalary); IPage<TMinSalary> getTMinSalaryPage(Page<TMinSalary> page, TMinSalary tMinSalary);
R<Boolean> saveDiy(TMinSalary tMinSalary);
} }
...@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.service; ...@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.service;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; 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.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSpecialDeducationSum; import com.yifu.cloud.plus.v1.yifu.salary.entity.TSpecialDeducationSum;
...@@ -73,7 +74,7 @@ public interface TSpecialDeducationSumService extends IService<TSpecialDeducatio ...@@ -73,7 +74,7 @@ public interface TSpecialDeducationSumService extends IService<TSpecialDeducatio
* @Date: 2019/10/14 14:48 * @Date: 2019/10/14 14:48
* @return: com.yifu.cloud.v1.common.core.util.R * @return: com.yifu.cloud.v1.common.core.util.R
**/ **/
R uploadSds(List<TSpecialDeducationSum> sdsList); R<List<ErrorMessage>> uploadSds(List<TSpecialDeducationSum> sdsList);
} }
...@@ -7,10 +7,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo; ...@@ -7,10 +7,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; 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.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.BigDecimalUtils; import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
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.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; 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.DaprArchivesProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties; import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties;
...@@ -519,14 +516,14 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -519,14 +516,14 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
// 年终奖是否已存在 (true:已存在,不可导入) // 年终奖是否已存在 (true:已存在,不可导入)
boolean yearEndError = false; boolean yearEndError = false;
// 年终奖错误信息合计:
List<ErrorMessage> errorInfo = new ArrayList<>();
// 劳务费、稿酬是否含有发薪false:否;true:是 // 劳务费、稿酬是否含有发薪false:否;true:是
boolean haveSalaryFlag = false; boolean haveSalaryFlag = false;
// 是否含有特殊金额false:否;true:是 // 是否含有特殊金额false:否;true:是
boolean haveSpecialFlag = false; boolean haveSpecialFlag = false;
// 是否重复金额false:否;true:是 // 是否重复金额false:否;true:是
boolean repeatFlag = false; boolean repeatFlag = false;
// 年终奖错误信息合计:
StringBuilder yearEndInfo = new StringBuilder();
List<String> idCardList = new ArrayList<>(); List<String> idCardList = new ArrayList<>();
for (TSalaryAccountVo vo : savList) { for (TSalaryAccountVo vo : savList) {
if (Common.isNotNull(vo.getEmpIdcard())) { if (Common.isNotNull(vo.getEmpIdcard())) {
...@@ -706,12 +703,11 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -706,12 +703,11 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
annualBonusList = tSalaryAccountItemService.getAllTSalaryAccountItem( annualBonusList = tSalaryAccountItemService.getAllTSalaryAccountItem(
null, null, SalaryConstants.ANNUAL_BONUS_JAVA, null, null, SalaryConstants.ANNUAL_BONUS_JAVA,
a.getSettlementMonth().substring(0, 4), a.getEmpIdcard(), null); a.getSettlementMonth().substring(0, 4), a.getEmpIdcard(), null);
if (annualBonusList != null && annualBonusList.size() > CommonConstants.ZERO_INT) { if (annualBonusList != null && !annualBonusList.isEmpty()) {
if (!yearEndError) { if (!yearEndError) {
yearEndError = true; yearEndError = true;
yearEndInfo.append("以下人员,年终奖重复发放(一个结算年只能发一次): ||");
} }
yearEndInfo.append("第" + (i + 2) + "行:【" + a.getEmpIdcard() + "】 ||"); errorInfo.add(new ErrorMessage((i + 2), a.getEmpIdcard()+"年终奖重复发放"));
} else { } else {
//年终奖优化方案 2:自动计算 //年终奖优化方案 2:自动计算
if (CommonConstants.TWO_STRING.equals(checkYearFinalStyle)) { if (CommonConstants.TWO_STRING.equals(checkYearFinalStyle)) {
...@@ -774,7 +770,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -774,7 +770,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
} }
} }
if (yearEndError) { if (yearEndError) {
return new R<>(CommonConstants.TWO_INT, "年终奖重复", yearEndInfo.toString()); return new R<>(CommonConstants.TWO_INT, "年终奖重复", errorInfo);
} }
salary.setOwnNums(ownNum); salary.setOwnNums(ownNum);
salary.setOwnMoney(ownMoney); salary.setOwnMoney(ownMoney);
...@@ -940,7 +936,8 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -940,7 +936,8 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
List<TSalaryAccountItem> backList = new ArrayList<>(); List<TSalaryAccountItem> backList = new ArrayList<>();
if (itemList != null && !itemList.isEmpty()) { if (itemList != null && !itemList.isEmpty()) {
for (TSalaryAccountItem item : itemList) { for (TSalaryAccountItem item : itemList) {
if ("4".equals(item.getFormType()) && settleMonth.equals(item.getSettlementMonth())) { if (("3".equals(item.getFormType()) || "4".equals(item.getFormType()))
&& settleMonth.equals(item.getSettlementMonth())) {
backList.add(item); backList.add(item);
} }
} }
...@@ -1677,6 +1674,8 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1677,6 +1674,8 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
BigDecimal actualSalarySum = BigDecimal.ZERO; BigDecimal actualSalarySum = BigDecimal.ZERO;
// 历史个税合计 // 历史个税合计
BigDecimal sumTax = BigDecimal.ZERO; BigDecimal sumTax = BigDecimal.ZERO;
// 历史应发合计
BigDecimal sumSalaryTax = BigDecimal.ZERO;
// 本次实发 // 本次实发
for (TSalaryAccountItem item : itemList) { for (TSalaryAccountItem item : itemList) {
if (SalaryConstants.ACTUAL_SALARY_SUM_JAVA.equals(item.getJavaFiedName())) { if (SalaryConstants.ACTUAL_SALARY_SUM_JAVA.equals(item.getJavaFiedName())) {
...@@ -1689,6 +1688,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1689,6 +1688,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
if (SalaryConstants.SALARY_TAX_JAVA.equals(item.getJavaFiedName())) { if (SalaryConstants.SALARY_TAX_JAVA.equals(item.getJavaFiedName())) {
sumTax = sumTax.add(item.getSalaryMoney()); sumTax = sumTax.add(item.getSalaryMoney());
} }
if (SalaryConstants.RELAY_SALARY_JAVA.equals(item.getJavaFiedName())) {
sumSalaryTax = sumSalaryTax.add(item.getSalaryMoney());
}
if (SalaryConstants.ACTUAL_SALARY_SUM_JAVA.equals(item.getJavaFiedName())) { if (SalaryConstants.ACTUAL_SALARY_SUM_JAVA.equals(item.getJavaFiedName())) {
actualSalarySum = actualSalarySum.add(item.getSalaryMoney()); actualSalarySum = actualSalarySum.add(item.getSalaryMoney());
} }
...@@ -1701,10 +1703,15 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1701,10 +1703,15 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
BigDecimal salaryTax = BigDecimal.ZERO; BigDecimal salaryTax = BigDecimal.ZERO;
if (CommonConstants.ONE_STRING.equals(a.getIsPersonTax())) { if (CommonConstants.ONE_STRING.equals(a.getIsPersonTax())) {
nowTaxT = getNowTax(actualSalarySumNow); nowTaxT = getNowTax(actualSalarySumNow);
if (actualSalarySum != actualSalarySumNow) { if (actualSalarySum.compareTo(actualSalarySumNow) != 0) {
actualSalarySumT = BigDecimalUtils.safeAdd(nowTaxT, sumTax, actualSalarySum).setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP); actualSalarySumT = BigDecimalUtils.safeAdd(nowTaxT, sumSalaryTax, actualSalarySumNow).setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP);
nowTaxY = getNowTaxNew(actualSalarySumT); nowTaxY = getNowTaxNew(actualSalarySumT);
salaryTax = BigDecimalUtils.safeSubtract(nowTaxY, BigDecimalUtils.safeAdd(nowTaxT, sumTax)); if (sumTax.compareTo(BigDecimal.ZERO) != 0) {
nowTaxY = BigDecimalUtils.safeSubtract(nowTaxY, sumTax).setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP);
}
salaryTax = BigDecimalUtils.safeSubtract(nowTaxY, nowTaxT);
} else {
nowTaxY = nowTaxT;
} }
relaySalary = BigDecimalUtils.safeAdd(actualSalarySumNow, nowTaxT).setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP); relaySalary = BigDecimalUtils.safeAdd(actualSalarySumNow, nowTaxT).setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP);
...@@ -1712,13 +1719,14 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1712,13 +1719,14 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
a.setSalaryTaxUnit(nowTaxT); a.setSalaryTaxUnit(nowTaxT);
a.setActualSalary(BigDecimalUtils.safeSubtract(actualSalarySumNow, salaryTax)); a.setActualSalary(BigDecimalUtils.safeSubtract(actualSalarySumNow, salaryTax));
} else { } else {
nowTaxT = getNowTax(actualSalarySumNow);
nowTaxY = getNowTax(actualSalarySum); nowTaxY = getNowTax(actualSalarySum);
relaySalary = BigDecimalUtils.safeAdd(actualSalarySumNow, nowTaxY).setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP);
a.setActualSalary(actualSalarySumNow); a.setActualSalary(actualSalarySumNow);
if (sumTax.compareTo(BigDecimal.ZERO) != 0) { if (sumTax.compareTo(BigDecimal.ZERO) != 0) {
nowTaxY = BigDecimalUtils.safeSubtract(nowTaxY, sumTax).setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP); nowTaxY = BigDecimalUtils.safeSubtract(nowTaxY, sumTax).setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP);
} }
a.setSalaryTaxUnit(nowTaxY); a.setSalaryTaxUnit(nowTaxY);
relaySalary = BigDecimalUtils.safeAdd(actualSalarySumNow, nowTaxY).setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP);
} }
a.setRelaySalaryUnit(relaySalary); a.setRelaySalaryUnit(relaySalary);
a.setRelaySalary(actualSalarySumNow); a.setRelaySalary(actualSalarySumNow);
...@@ -1727,13 +1735,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1727,13 +1735,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
sai.setCnName(SalaryConstants.RELAY_SALARY); sai.setCnName(SalaryConstants.RELAY_SALARY);
sai.setJavaFiedName(SalaryConstants.RELAY_SALARY_JAVA); sai.setJavaFiedName(SalaryConstants.RELAY_SALARY_JAVA);
sai.setIsTax(CommonConstants.ZERO_INT); sai.setIsTax(CommonConstants.ZERO_INT);
sai.setSalaryMoney(relaySalary); sai.setSalaryMoney(BigDecimalUtils.safeAdd(nowTaxT,actualSalarySumNow).setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP));
saiList.add(sai); saiList.add(sai);
if (CommonConstants.ONE_STRING.equals(a.getIsPersonTax())) { return nowTaxY;
return nowTaxT;
}else {
return nowTaxY;
}
} }
public static BigDecimal getNowTax(BigDecimal actualSalarySum) { public static BigDecimal getNowTax(BigDecimal actualSalarySum) {
...@@ -1988,3 +1992,4 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1988,3 +1992,4 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
return nowTax; return nowTax;
} }
} }
package com.yifu.cloud.plus.v1.yifu.salary.service.impl; package com.yifu.cloud.plus.v1.yifu.salary.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 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.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
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.entity.TMinSalary; import com.yifu.cloud.plus.v1.yifu.salary.entity.TMinSalary;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TMinSalaryMapper; import com.yifu.cloud.plus.v1.yifu.salary.mapper.TMinSalaryMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TMinSalaryService; import com.yifu.cloud.plus.v1.yifu.salary.service.TMinSalaryService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
/** /**
* @Author fxj * @Author fxj
* @Description 各地市最低工资标准 * @Description 各地市最低工资标准
...@@ -28,4 +36,31 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal ...@@ -28,4 +36,31 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
return baseMapper.getTMinSalaryPage(page,tMinSalary); return baseMapper.getTMinSalaryPage(page,tMinSalary);
} }
@Override
public R<Boolean> saveDiy(TMinSalary tMinSalary) {
YifuUser user = SecurityUtils.getUser();
if (null == user || null == user.getId()) {
return R.failed("获取登录用户信息失败!");
}
tMinSalary.setCreateTime(LocalDateTime.now());
tMinSalary.setCreateBy(String.valueOf(user.getId()));
LambdaQueryWrapper<TMinSalary> query = new LambdaQueryWrapper<>();
if (Common.isNotNull(tMinSalary.getProvince())){
query.eq(TMinSalary::getProvince,tMinSalary.getProvince());
}
if (Common.isNotNull(tMinSalary.getCity())){
query.eq(TMinSalary::getCity,tMinSalary.getCity());
}
if (Common.isNotNull(tMinSalary.getTown())){
query.eq(TMinSalary::getTown,tMinSalary.getTown());
}
query.eq(TMinSalary::getStatus, CommonConstants.ONE_INT);
long res = baseMapper.selectCount(query);
if (res > CommonConstants.ZERO_INT){
return R.failed("已存在对应区域在用的配置信息");
}
baseMapper.insert(tMinSalary);
return R.ok(true,CommonConstants.SAVE_SUCCESS);
}
} }
...@@ -5,9 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -5,9 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 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.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
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.core.vo.YifuUser; 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.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSpecialDeducationSum; import com.yifu.cloud.plus.v1.yifu.salary.entity.TSpecialDeducationSum;
...@@ -16,6 +14,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.service.TSpecialDeducationSumService; ...@@ -16,6 +14,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.service.TSpecialDeducationSumService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -107,12 +106,17 @@ public class TSpecialDeducationSumServiceImpl extends ServiceImpl<TSpecialDeduca ...@@ -107,12 +106,17 @@ public class TSpecialDeducationSumServiceImpl extends ServiceImpl<TSpecialDeduca
* @return: com.yifu.cloud.v1.common.core.util.R * @return: com.yifu.cloud.v1.common.core.util.R
**/ **/
@Override @Override
public R uploadSds(List<TSpecialDeducationSum> sdsList) { public R<List<ErrorMessage>> uploadSds(List<TSpecialDeducationSum> sdsList) {
if (sdsList != null && sdsList.size() > CommonConstants.ZERO_INT) { if (Common.isNotNull(sdsList)) {
TSpecialDeducationSum sds = null; List<ErrorMessage> errorMessages = new ArrayList<>();
int rowNum = sdsList.size(); errorMessages = checkImport(sdsList,errorMessages);
if (Common.isNotNull(errorMessages)) {
return R.ok(errorMessages);
}
String nowYearMonth = DateUtil.getCurrentDateString("yyyyMM"); String nowYearMonth = DateUtil.getCurrentDateString("yyyyMM");
String yearMonth = DateUtil.getYearMonth(sdsList.get(0).getCreateStart()); String yearMonth = DateUtil.getYearMonth(sdsList.get(0).getCreateStart()
.replace("/","")
.replace("-",""));
if (Common.isNotNull(yearMonth)) { if (Common.isNotNull(yearMonth)) {
if (!yearMonth.equals(nowYearMonth)) { if (!yearMonth.equals(nowYearMonth)) {
return R.failed("所得期间-不是当前年月:" + nowYearMonth + ",不允许导入"); return R.failed("所得期间-不是当前年月:" + nowYearMonth + ",不允许导入");
...@@ -144,9 +148,32 @@ public class TSpecialDeducationSumServiceImpl extends ServiceImpl<TSpecialDeduca ...@@ -144,9 +148,32 @@ public class TSpecialDeducationSumServiceImpl extends ServiceImpl<TSpecialDeduca
s.setCreateTime(nowDate); s.setCreateTime(nowDate);
s.setCreateBy(String.valueOf(user.getId())); s.setCreateBy(String.valueOf(user.getId()));
} }
return new R<>(this.saveBatch(sdsList)); if (this.saveBatch(sdsList)){
return R.failed(CommonConstants.SAVE_SUCCESS);
}else {
return R.failed(CommonConstants.SAVE_FAILED);
}
} }
return R.failed("数据不可为空"); return R.failed("数据不可为空");
} }
private List<ErrorMessage> checkImport(List<TSpecialDeducationSum> sdsList,List<ErrorMessage> errorMessages) {
ErrorMessage errorMessage;
ExcelUtil<TSpecialDeducationSum> util1 = new ExcelUtil<>(TSpecialDeducationSum.class);
int i =0;
for (TSpecialDeducationSum data: sdsList) {
i++;
errorMessage = util1.checkEntity(data, -1);
if (Common.isNotNull(errorMessage)) {
errorMessages.add(errorMessage);
}else {
continue;
}
}
if (Common.isNotNull(errorMessages)){
return errorMessages;
}
return null;
}
} }
...@@ -74,7 +74,7 @@ public class TStatisticsCurrentReportServiceImpl extends ServiceImpl<TStatistics ...@@ -74,7 +74,7 @@ public class TStatisticsCurrentReportServiceImpl extends ServiceImpl<TStatistics
*/ */
@Override @Override
public void listExport(HttpServletResponse response, TStatisticsCurrentReportSearchVo searchVo) { public void listExport(HttpServletResponse response, TStatisticsCurrentReportSearchVo searchVo) {
String fileName = "不良记录批量导出" + DateUtil.getThisTime() + ".xlsx"; String fileName = "本期申报批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表 //获取要导出的列表
List<TStatisticsCurrentReport> list = new ArrayList<>(); List<TStatisticsCurrentReport> list = new ArrayList<>();
long count = noPageCountDiy(searchVo); long count = noPageCountDiy(searchVo);
...@@ -85,8 +85,7 @@ public class TStatisticsCurrentReportServiceImpl extends ServiceImpl<TStatistics ...@@ -85,8 +85,7 @@ public class TStatisticsCurrentReportServiceImpl extends ServiceImpl<TStatistics
response.setCharacterEncoding("utf-8"); response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, "UTF-8")); response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭 // 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list); ExcelWriter excelWriter = EasyExcel.write(out, TStatisticsCurrentReport.class).includeColumnFiledNames(searchVo.getExportFields()).build();
ExcelWriter excelWriter = EasyExcel.write(out, TStatisticsCurrentReport.class).build();
int index = 0; int index = 0;
if (count > CommonConstants.ZERO_INT) { if (count > CommonConstants.ZERO_INT) {
for (int i = 0; i <= count; ) { for (int i = 0; i <= count; ) {
...@@ -101,7 +100,7 @@ public class TStatisticsCurrentReportServiceImpl extends ServiceImpl<TStatistics ...@@ -101,7 +100,7 @@ public class TStatisticsCurrentReportServiceImpl extends ServiceImpl<TStatistics
} }
} }
if (Common.isNotNull(list)) { if (Common.isNotNull(list)) {
WriteSheet writeSheet = EasyExcel.writerSheet("统计-本期申报" + index).build(); WriteSheet writeSheet = EasyExcel.writerSheet("本期申报" + index).build();
excelWriter.write(list, writeSheet); excelWriter.write(list, writeSheet);
index++; index++;
} }
...@@ -111,7 +110,7 @@ public class TStatisticsCurrentReportServiceImpl extends ServiceImpl<TStatistics ...@@ -111,7 +110,7 @@ public class TStatisticsCurrentReportServiceImpl extends ServiceImpl<TStatistics
} }
} }
} else { } else {
WriteSheet writeSheet = EasyExcel.writerSheet("统计-本期申报" + index).build(); WriteSheet writeSheet = EasyExcel.writerSheet("本期申报" + index).build();
excelWriter.write(list, writeSheet); excelWriter.write(list, writeSheet);
} }
if (Common.isNotNull(list)) { if (Common.isNotNull(list)) {
......
...@@ -304,6 +304,12 @@ public class SalaryAccountUtil implements Serializable { ...@@ -304,6 +304,12 @@ public class SalaryAccountUtil implements Serializable {
errorList.add(new ErrorMessage((i + 2), error)); errorList.add(new ErrorMessage((i + 2), error));
continue; continue;
} }
if ("3".equals(salaryType) && Common.isEmpty(entity.getIsPersonTax())) {
errorFlag = false;
error = "第" + (i + 2) + "行:【是否个人承担部分税费】列_不可为空";
errorList.add(new ErrorMessage((i + 2), error));
continue;
}
if ("4".equals(salaryType) && actualSalarySum == null) { if ("4".equals(salaryType) && actualSalarySum == null) {
errorFlag = false; errorFlag = false;
error = "第" + (i + 2) + "行:【稿酬】列_不可缺少"; error = "第" + (i + 2) + "行:【稿酬】列_不可缺少";
...@@ -478,6 +484,7 @@ public class SalaryAccountUtil implements Serializable { ...@@ -478,6 +484,7 @@ public class SalaryAccountUtil implements Serializable {
newEmp.setUnitNo(dept.getCustomerCode()); newEmp.setUnitNo(dept.getCustomerCode());
newEmp.setCreateBy(String.valueOf(user.getId())); newEmp.setCreateBy(String.valueOf(user.getId()));
newEmp.setCreateName(user.getNickname()); newEmp.setCreateName(user.getNickname());
newEmp.setInvoiceTitle(invoiceTitle);
if (!"3".equals(salaryType) && !"4".equals(salaryType)) { if (!"3".equals(salaryType) && !"4".equals(salaryType)) {
minTaxMonth = tSalaryAccountService.getMinTaxMonthByNowYear(newEmp.getEmpIdcard(), nowYear); minTaxMonth = tSalaryAccountService.getMinTaxMonthByNowYear(newEmp.getEmpIdcard(), nowYear);
if (Common.isNotNull(minTaxMonth) if (Common.isNotNull(minTaxMonth)
...@@ -495,7 +502,11 @@ public class SalaryAccountUtil implements Serializable { ...@@ -495,7 +502,11 @@ public class SalaryAccountUtil implements Serializable {
} }
emp = newEmp; emp = newEmp;
} else { } else {
error = "第" + (i + 2) + "行:薪酬人员查询处中,该客户下无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、计税月份、手机号码!!"; if ("3".equals(salaryType) || "4".equals(salaryType)) {
error = "第" + (i + 2) + "行:薪酬人员查询处中,该客户下无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、手机号码!";
}else {
error = "第" + (i + 2) + "行:薪酬人员查询处中,该客户下无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、计税月份、手机号码!";
}
errorList.add(new ErrorMessage((i + 2), error)); errorList.add(new ErrorMessage((i + 2), error));
continue; continue;
} }
...@@ -572,8 +583,21 @@ public class SalaryAccountUtil implements Serializable { ...@@ -572,8 +583,21 @@ public class SalaryAccountUtil implements Serializable {
errorList.add(new ErrorMessage((i + 2), error)); errorList.add(new ErrorMessage((i + 2), error));
continue; continue;
} }
if (Common.isEmpty(emp.getBankProvince())) {
error = "第" + (i + 2) + "行:员工:" + emp.getEmpIdcard() + "-发放方式为银行发放,但是-开户行省-为空,请去薪酬人员查询处更新!";
errorList.add(new ErrorMessage((i + 2), error));
continue;
}
if (Common.isEmpty(emp.getBankCity())) {
error = "第" + (i + 2) + "行:员工:" + emp.getEmpIdcard() + "-发放方式为银行发放,但是-开户行市-为空,请去薪酬人员查询处更新!";
errorList.add(new ErrorMessage((i + 2), error));
continue;
}
entity.setBankName(emp.getBankName()); entity.setBankName(emp.getBankName());
entity.setBankNo(emp.getBankNo()); entity.setBankNo(emp.getBankNo());
entity.setBankProvince(String.valueOf(emp.getBankProvince()));
entity.setBankCity(String.valueOf(emp.getBankCity()));
entity.setBankSubName(emp.getBankSubName());
} else { } else {
if (Common.isNotNull(emp.getBankName())) { if (Common.isNotNull(emp.getBankName())) {
entity.setBankName(emp.getBankName()); entity.setBankName(emp.getBankName());
...@@ -585,6 +609,21 @@ public class SalaryAccountUtil implements Serializable { ...@@ -585,6 +609,21 @@ public class SalaryAccountUtil implements Serializable {
} else { } else {
entity.setBankNo(null); entity.setBankNo(null);
} }
if (Common.isNotNull(emp.getBankSubName())) {
entity.setBankSubName(emp.getBankSubName());
} else {
entity.setBankSubName(null);
}
if (Common.isNotNull(emp.getBankProvince())) {
entity.setBankProvince(String.valueOf(emp.getBankProvince()));
} else {
entity.setBankProvince(null);
}
if (Common.isNotNull(emp.getBankCity())) {
entity.setBankCity(String.valueOf(emp.getBankCity()));
} else {
entity.setBankCity(null);
}
} }
if (!"3".equals(salaryType) && !"4".equals(salaryType)) { if (!"3".equals(salaryType) && !"4".equals(salaryType)) {
if (emp.getTaxMonth().length() > CommonConstants.dingleDigitIntArray[6]) { if (emp.getTaxMonth().length() > CommonConstants.dingleDigitIntArray[6]) {
...@@ -609,7 +648,11 @@ public class SalaryAccountUtil implements Serializable { ...@@ -609,7 +648,11 @@ public class SalaryAccountUtil implements Serializable {
saiList.add(sai); saiList.add(sai);
} }
} else { } else {
error = "第" + (i + 2) + "行:薪酬人员查询处中,该客户下无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、计税月份、手机号码!"; if ("3".equals(salaryType) || "4".equals(salaryType)) {
error = "第" + (i + 2) + "行:薪酬人员查询处中,该客户下无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、手机号码!";
}else {
error = "第" + (i + 2) + "行:薪酬人员查询处中,该客户下无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、计税月份、手机号码!";
}
errorList.add(new ErrorMessage((i + 2), error)); errorList.add(new ErrorMessage((i + 2), error));
continue; continue;
} }
......
...@@ -53,6 +53,9 @@ ...@@ -53,6 +53,9 @@
<if test="tDeptSee.deptName != null and tDeptSee.deptName.trim() != ''"> <if test="tDeptSee.deptName != null and tDeptSee.deptName.trim() != ''">
AND a.DEPT_NAME = #{tDeptSee.deptName} AND a.DEPT_NAME = #{tDeptSee.deptName}
</if> </if>
<if test="tDeptSee.deptNo != null and tDeptSee.deptNo.trim() != ''">
AND a.DEPT_NO = #{tDeptSee.deptNo}
</if>
<if test="tDeptSee.canSee != null"> <if test="tDeptSee.canSee != null">
AND a.CAN_SEE = #{tDeptSee.canSee} AND a.CAN_SEE = #{tDeptSee.canSee}
</if> </if>
...@@ -81,6 +84,7 @@ ...@@ -81,6 +84,7 @@
<where> <where>
1=1 1=1
<include refid="tDeptSee_where"/> <include refid="tDeptSee_where"/>
order by a.CREATE_TIME DESC
</where> </where>
</select> </select>
</mapper> </mapper>
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
AND create_user = #{tMinSalary.createBy} AND create_user = #{tMinSalary.createBy}
</if> </if>
</where> </where>
ORDER BY CREATE_TIME DESC
</select> </select>
......
...@@ -56,6 +56,9 @@ ...@@ -56,6 +56,9 @@
<result property="unitNo" column="unit_no"/> <result property="unitNo" column="unit_no"/>
<result property="unitName" column="unit_name"/> <result property="unitName" column="unit_name"/>
<result property="sumBabyMoney" column="sum_baby_money"/> <result property="sumBabyMoney" column="sum_baby_money"/>
<result property="isNewEmployee" column="IS_NEW_EMPLOYEE"/>
<result property="createMonth" column="CREATE_MONTH"/>
<result property="empPhone" column="EMP_PHONE"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
...@@ -89,7 +92,10 @@ ...@@ -89,7 +92,10 @@
a.unit_id, a.unit_id,
a.unit_no, a.unit_no,
a.unit_name, a.unit_name,
a.sum_baby_money a.sum_baby_money,
a.IS_NEW_EMPLOYEE,
a.CREATE_MONTH,
a.EMP_PHONE
</sql> </sql>
<sql id="tSalaryAccount2022_where"> <sql id="tSalaryAccount2022_where">
<if test="tSalaryAccount2022 != null"> <if test="tSalaryAccount2022 != null">
...@@ -211,7 +217,7 @@ ...@@ -211,7 +217,7 @@
insert into ${tableName} ( insert into ${tableName} (
select select
a.id,a.INVOICE_TITLE,a.EMP_ID,a.EMP_NAME,a.EMP_IDCARD, a.id,a.INVOICE_TITLE,a.EMP_ID,a.EMP_NAME,a.EMP_IDCARD,
a.SETTLE_DEPART_ID,a.SETTLE_DEPART_NO,a.SETTLE_DEPART_NAME,a.SETTLEMENT_MONTH,a.TAX_MONTH, a.DEPT_ID SETTLE_DEPART_ID,a.DEPT_NO SETTLE_DEPART_NO,a.DEPT_NAME SETTLE_DEPART_NAME,a.SETTLEMENT_MONTH,a.TAX_MONTH,
ifnull(sum(relaySalary.SALARY_MONEY),0) REAL_SALARY, ifnull(sum(relaySalary.SALARY_MONEY),0) REAL_SALARY,
ifnull(max(costReduction.SALARY_MONEY),0) cost_reduction, ifnull(max(costReduction.SALARY_MONEY),0) cost_reduction,
ifnull(max(specialDeduMoney.SALARY_MONEY),0) SPECIAL_DEDU_MONEY, ifnull(max(specialDeduMoney.SALARY_MONEY),0) SPECIAL_DEDU_MONEY,
...@@ -230,12 +236,14 @@ ...@@ -230,12 +236,14 @@
ifnull(sum(if(annualBonusTax.SALARY_MONEY > 0,annualBonus.SALARY_MONEY,0)),0) annual_bonus, ifnull(sum(if(annualBonusTax.SALARY_MONEY > 0,annualBonus.SALARY_MONEY,0)),0) annual_bonus,
ifnull(sum(annualBonusTax.SALARY_MONEY),0) annual_bonus_tax, ifnull(sum(annualBonusTax.SALARY_MONEY),0) annual_bonus_tax,
ifnull(sum(exemptionPersionTax.SALARY_MONEY),0) exemption_persion_tax, ifnull(sum(exemptionPersionTax.SALARY_MONEY),0) exemption_persion_tax,
i.id unit_id,i.CUSTOMER_CODE unit_no,i.CUSTOMER_NAME unit_name, s.unit_id,s.unit_no,s.unit_name,
ifnull(max(sumBabyMoney.SALARY_MONEY),0) sum_baby_money ifnull(max(sumBabyMoney.SALARY_MONEY),0) sum_baby_money,
if(#{lastMonth} = DATE_FORMAT(e.CREATE_TIME,'%Y%m'),1,0) IS_NEW_EMPLOYEE,
DATE_FORMAT(e.CREATE_TIME,'%Y%m') CREATE_MONTH,
e.EMP_PHONE
from t_salary_account a from t_salary_account a
left join t_salary_standard s on s.id = a.SALARY_FORM_ID left join t_salary_standard s on s.id = a.SALARY_FORM_ID
left join hrms.t_settle_domain d on d.id = a.SETTLE_DEPART_ID left join t_salary_employee e on e.id = a.EMP_ID
left join hrms.t_customer_info i on i.id = d.CUSTOMER_ID
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 relaySalary on relaySalary.SALARY_ACCOUNT_ID = a.id and relaySalary.JAVA_FIED_NAME='relaySalary'
left join t_salary_account_item exemptionPersionTax on exemptionPersionTax.SALARY_ACCOUNT_ID = a.id and exemptionPersionTax.JAVA_FIED_NAME='exemptionPersionTax' left join t_salary_account_item exemptionPersionTax on exemptionPersionTax.SALARY_ACCOUNT_ID = a.id and exemptionPersionTax.JAVA_FIED_NAME='exemptionPersionTax'
left join t_salary_account_item costReduction on costReduction.SALARY_ACCOUNT_ID = a.id and costReduction.JAVA_FIED_NAME='costReduction' left join t_salary_account_item costReduction on costReduction.SALARY_ACCOUNT_ID = a.id and costReduction.JAVA_FIED_NAME='costReduction'
...@@ -256,8 +264,7 @@ ...@@ -256,8 +264,7 @@
left join t_salary_account_item annualBonusTax on annualBonusTax.SALARY_ACCOUNT_ID = a.id and annualBonusTax.JAVA_FIED_NAME='annualBonusTax' left join t_salary_account_item annualBonusTax on annualBonusTax.SALARY_ACCOUNT_ID = a.id and annualBonusTax.JAVA_FIED_NAME='annualBonusTax'
left join t_salary_account_item annualBonus on annualBonus.SALARY_ACCOUNT_ID = a.id and annualBonus.JAVA_FIED_NAME='annualBonus' left join t_salary_account_item annualBonus on annualBonus.SALARY_ACCOUNT_ID = a.id and annualBonus.JAVA_FIED_NAME='annualBonus'
where where
a.SETTLEMENT_MONTH = #{lastMonth} and a.DELETE_FLAG = 0 and a.SALARY_TYPE != '7' and a.SALARY_TYPE != '3' a.SETTLEMENT_MONTH = #{lastMonth} and a.DELETE_FLAG = 0 and a.FORM_TYPE != '7' and a.FORM_TYPE != '3' and s.DELETE_FLAG = 0
and s.DELETE_FLAG = 0
GROUP BY a.EMP_IDCARD,a.INVOICE_TITLE,a.SETTLEMENT_MONTH) GROUP BY a.EMP_IDCARD,a.INVOICE_TITLE,a.SETTLEMENT_MONTH)
</insert> </insert>
......
...@@ -276,7 +276,7 @@ ...@@ -276,7 +276,7 @@
concat(min(a.TAX_MONTH - 0),'') concat(min(a.TAX_MONTH - 0),'')
from t_salary_account a from t_salary_account a
where a.EMP_IDCARD = #{empIdCard} and a.DELETE_FLAG = 0 and a.SETTLEMENT_MONTH like concat(#{nowYear},"%") where a.EMP_IDCARD = #{empIdCard} and a.DELETE_FLAG = 0 and a.SETTLEMENT_MONTH like concat(#{nowYear},"%")
and a.FORM_TYPE != '3' and a.FORM_TYPE != '3' and a.FORM_TYPE != '4'
</select> </select>
<select id="getLastMonthTHaveSalaryNosocial" resultType="com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial"> <select id="getLastMonthTHaveSalaryNosocial" resultType="com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial">
......
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
<where> <where>
1=1 1=1
<include refid="tSalaryConfigStandard_where"/> <include refid="tSalaryConfigStandard_where"/>
order by CREATE_TIME DESC
</where> </where>
</select> </select>
......
...@@ -188,6 +188,7 @@ ...@@ -188,6 +188,7 @@
<where> <where>
1=1 1=1
<include refid="tSpecialDeducationSum_where"/> <include refid="tSpecialDeducationSum_where"/>
ORDER BY CREATE_TIME
</where> </where>
</select> </select>
......
...@@ -55,6 +55,9 @@ ...@@ -55,6 +55,9 @@
<result property="unitName" column="UNIT_NAME"/> <result property="unitName" column="UNIT_NAME"/>
<result property="specialDeduMoney" column="SPECIAL_DEDU_MONEY"/> <result property="specialDeduMoney" column="SPECIAL_DEDU_MONEY"/>
<result property="sumBabyMoney" column="sum_baby_money"/> <result property="sumBabyMoney" column="sum_baby_money"/>
<result property="isNewEmployee" column="IS_NEW_EMPLOYEE"/>
<result property="createMonth" column="CREATE_MONTH"/>
<result property="empPhone" column="EMP_PHONE"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.id, a.id,
...@@ -87,7 +90,10 @@ ...@@ -87,7 +90,10 @@
a.UNIT_NO, a.UNIT_NO,
a.UNIT_NAME, a.UNIT_NAME,
a.SPECIAL_DEDU_MONEY, a.SPECIAL_DEDU_MONEY,
a.sum_baby_money a.sum_baby_money,
a.IS_NEW_EMPLOYEE,
a.CREATE_MONTH,
a.EMP_PHONE
</sql> </sql>
<sql id="tStatisticsCurrentReport_where"> <sql id="tStatisticsCurrentReport_where">
<if test="tStatisticsCurrentReport != null"> <if test="tStatisticsCurrentReport != null">
...@@ -231,7 +237,10 @@ ...@@ -231,7 +237,10 @@
s.UNIT_NO, s.UNIT_NO,
s.UNIT_NAME, s.UNIT_NAME,
s.SPECIAL_DEDU_MONEY, s.SPECIAL_DEDU_MONEY,
s.sum_baby_money s.sum_baby_money,
s.IS_NEW_EMPLOYEE,
s.CREATE_MONTH,
s.EMP_PHONE
from t_statistics_tax_salary s from t_statistics_tax_salary s
left join left join
( (
......
...@@ -55,6 +55,9 @@ ...@@ -55,6 +55,9 @@
<result property="unitName" column="UNIT_NAME"/> <result property="unitName" column="UNIT_NAME"/>
<result property="specialDeduMoney" column="SPECIAL_DEDU_MONEY"/> <result property="specialDeduMoney" column="SPECIAL_DEDU_MONEY"/>
<result property="sumBabyMoney" column="sum_baby_money"/> <result property="sumBabyMoney" column="sum_baby_money"/>
<result property="isNewEmployee" column="IS_NEW_EMPLOYEE"/>
<result property="createMonth" column="CREATE_MONTH"/>
<result property="empPhone" column="EMP_PHONE"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.id, a.id,
...@@ -87,7 +90,10 @@ ...@@ -87,7 +90,10 @@
a.UNIT_NO, a.UNIT_NO,
a.UNIT_NAME, a.UNIT_NAME,
a.SPECIAL_DEDU_MONEY, a.SPECIAL_DEDU_MONEY,
a.sum_baby_money a.sum_baby_money,
a.IS_NEW_EMPLOYEE,
a.CREATE_MONTH,
a.EMP_PHONE
</sql> </sql>
<sql id="tStatisticsTaxSalary_where"> <sql id="tStatisticsTaxSalary_where">
<if test="tStatisticsTaxSalary != null"> <if test="tStatisticsTaxSalary != null">
...@@ -207,7 +213,10 @@ ...@@ -207,7 +213,10 @@
,a.REAL_SALARY,a.PERSONAL_PENSION_MONEY,a.PERSONAL_MEDICAL_MONEY,a.PERSONAL_UNEMPLOYMENT_MONEY ,a.REAL_SALARY,a.PERSONAL_PENSION_MONEY,a.PERSONAL_MEDICAL_MONEY,a.PERSONAL_UNEMPLOYMENT_MONEY
,a.PERSONAL_SOCIAL,a.PERSONAL_FUND,a.enterprise_annuity,a.taxable,ifnull(c.WITHHOLDING_RATE,0) tax_fee ,a.PERSONAL_SOCIAL,a.PERSONAL_FUND,a.enterprise_annuity,a.taxable,ifnull(c.WITHHOLDING_RATE,0) tax_fee
,ifnull(c.QUICK_DEDUCATION,0) QUICK_DEDUCATION,a.salary_tax,a.unit_id,a.unit_no,a.unit_name,a.SPECIAL_DEDU_MONEY ,ifnull(c.QUICK_DEDUCATION,0) QUICK_DEDUCATION,a.salary_tax,a.unit_id,a.unit_no,a.unit_name,a.SPECIAL_DEDU_MONEY
,a.sum_baby_money ,a.sum_baby_money,
a.IS_NEW_EMPLOYEE,
a.CREATE_MONTH,
a.EMP_PHONE
from ( from (
SELECT SELECT
concat(a.id,#{nowMonth}) id, concat(a.id,#{nowMonth}) id,
...@@ -244,7 +253,10 @@ ...@@ -244,7 +253,10 @@
sum(a.enterprise_annuity) enterprise_annuity, sum(a.enterprise_annuity) enterprise_annuity,
a.unit_id, a.unit_id,
a.unit_no, a.unit_no,
a.unit_name a.unit_name,
a.IS_NEW_EMPLOYEE,
a.CREATE_MONTH,
a.EMP_PHONE
FROM ${tableName} a FROM ${tableName} a
where a.SETTLEMENT_MONTH <![CDATA[ <= ]]> #{nowMonth} and a.SETTLEMENT_MONTH like concat(#{lastYear},'%') where a.SETTLEMENT_MONTH <![CDATA[ <= ]]> #{nowMonth} and a.SETTLEMENT_MONTH like concat(#{lastYear},'%')
GROUP BY a.EMP_IDCARD,a.INVOICE_TITLE ORDER BY a.settle_depart_id asc GROUP BY a.EMP_IDCARD,a.INVOICE_TITLE ORDER BY a.settle_depart_id asc
......
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