Commit 7678c11b authored by huyuchen's avatar huyuchen

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

parents 2201f1a0 618ebc2a
...@@ -94,7 +94,7 @@ public class TProveRecord extends Model<TProveRecord> { ...@@ -94,7 +94,7 @@ public class TProveRecord extends Model<TProveRecord> {
@ExcelAttribute(name = "开具日期") @ExcelAttribute(name = "开具日期")
@ExcelProperty("开具日期") @ExcelProperty("开具日期")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDate creatDate; private Date creatDate;
/** /**
* 开始月份 * 开始月份
*/ */
......
package com.yifu.cloud.plus.v1.yifu.archives.controller;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.yifu.cloud.plus.v1.yifu.archives.entity.LUnitInfoForProve;
import com.yifu.cloud.plus.v1.yifu.archives.service.LUnitInfoForProveService;
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 io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* @author pwang
* @date 2019-11-05 15:24:25
*/
@RestController
@AllArgsConstructor
@RequestMapping("/lunitinfoforprove")
@Tag(name = "工资证明操作数据")
public class LUnitInfoForProveController {
private final LUnitInfoForProveService lUnitInfoForProveService;
/**
* 简单分页查询
* 获取用户自己的操作数据
*
* @return
*/
@Operation(summary = "获取用户自己的操作数据")
@GetMapping("/ownList")
public R<List<LUnitInfoForProve>> getownList() {
YifuUser user = SecurityUtils.getUser();
return new R<>(lUnitInfoForProveService.list(Wrappers.<LUnitInfoForProve>lambdaQuery().eq(LUnitInfoForProve::getCreatUser, user.getId())));
}
}
...@@ -31,6 +31,7 @@ import javax.servlet.http.HttpServletResponse; ...@@ -31,6 +31,7 @@ import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid; import javax.validation.Valid;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDate; import java.time.LocalDate;
import java.util.Date;
import java.util.List; import java.util.List;
...@@ -151,7 +152,7 @@ public class SalaryProveController { ...@@ -151,7 +152,7 @@ public class SalaryProveController {
record.setEmployeeName(em.getEmpName()); record.setEmployeeName(em.getEmpName());
record.setEmployeeIdCard(em.getEmpIdcard()); record.setEmployeeIdCard(em.getEmpIdcard());
record.setEmployeeInfo(emId); record.setEmployeeInfo(emId);
record.setCreatDate(LocalDate.now()); record.setCreatDate(new Date());
record.setEmployeeSettleDepartName(em.getDeptName()); record.setEmployeeSettleDepartName(em.getDeptName());
record.setPost(em.getPost()); record.setPost(em.getPost());
count = LocalDateTimeUtils.getBeginOfMonth(endDate.concat("01"), startDate.concat("01"), "yyyyMMdd") + 1; count = LocalDateTimeUtils.getBeginOfMonth(endDate.concat("01"), startDate.concat("01"), "yyyyMMdd") + 1;
...@@ -188,12 +189,12 @@ public class SalaryProveController { ...@@ -188,12 +189,12 @@ public class SalaryProveController {
, "/tsalaryaccount/inner/findAverageSalaryForProve", pd, WageProofDto.class, SecurityConstants.FROM_IN); , "/tsalaryaccount/inner/findAverageSalaryForProve", pd, WageProofDto.class, SecurityConstants.FROM_IN);
if (null != wpR) { if (null != wpR) {
WageProofDto wp = wpR.getData(); WageProofDto wp = wpR.getData();
if (CommonConstants.SUCCESS.equals(wpR.getCode()) && null != wp) { if (Common.isEmpty(wp.getErrorInfo())) {
record.setProveSalary(wp.getSalary()); record.setProveSalary(wp.getSalary());
record.setSalary(wp.getSalary()); record.setSalary(wp.getSalary());
record.setCapital(NumberToCN.number2CNMontrayUnit(wp.getSalary())); record.setCapital(NumberToCN.number2CNMontrayUnit(wp.getSalary()));
} else { } else {
return R.failed(Common.isNotNull(wpR.getMsg()) ? wpR.getMsg() : "调取工资服务返回数据出错!"); return R.failed(wp.getErrorInfo());
} }
} else { } else {
return R.failed("调取工资服务返回数据出错!"); return R.failed("调取工资服务返回数据出错!");
...@@ -206,8 +207,7 @@ public class SalaryProveController { ...@@ -206,8 +207,7 @@ public class SalaryProveController {
} else { } else {
return R.failed("参数出错!"); return R.failed("参数出错!");
} }
return R.ok(record);
return new R(record);
} }
/** /**
......
...@@ -394,4 +394,16 @@ public class InsuranceDetailVO implements Serializable { ...@@ -394,4 +394,16 @@ public class InsuranceDetailVO implements Serializable {
*/ */
@Schema(description = "操作记录列表") @Schema(description = "操作记录列表")
List<TBusinessOperate> operateList; List<TBusinessOperate> operateList;
/**
* 忽略提醒 0:忽略 1:不忽略
*/
@Schema(description = "有忽略提醒 0:忽略 1:不忽略")
private String expireIgnoreFlag;
/**
* 消息提醒备注
*/
@Schema(description = "消息提醒备注")
private String expireRemark;
} }
...@@ -17,7 +17,6 @@ import com.yifu.cloud.plus.v1.yifu.social.vo.ChangeDeptVo; ...@@ -17,7 +17,6 @@ import com.yifu.cloud.plus.v1.yifu.social.vo.ChangeDeptVo;
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;
import org.apache.commons.lang3.RandomStringUtils;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
......
...@@ -106,7 +106,7 @@ public class TInsurancesWarnController { ...@@ -106,7 +106,7 @@ public class TInsurancesWarnController {
@SysLog("到期提醒批量忽略") @SysLog("到期提醒批量忽略")
@PutMapping("/batchexpireIgnore") @PutMapping("/batchexpireIgnore")
@PreAuthorize("@pms.hasPermission('wxhr:insurance_expireignore')") @PreAuthorize("@pms.hasPermission('wxhr:insurance_expireignore')")
public R<Object> batchexpireIgnore(@RequestParam("ids") String ids) { public R<Object> batchexpireIgnore(@RequestBody String ids) {
return insuranceDetailService.batchexpireIgnore(ids); return insuranceDetailService.batchexpireIgnore(ids);
} }
......
...@@ -355,7 +355,9 @@ ...@@ -355,7 +355,9 @@
a.BILLING_TYPE as billingType, a.BILLING_TYPE as billingType,
a.DEFAULT_SETTLE_ID as defaultSettleId, a.DEFAULT_SETTLE_ID as defaultSettleId,
a.RATE as rate, a.RATE as rate,
a.REFUND_ID as refundId a.REFUND_ID as refundId,
a.EXPIRE_REMARK,
a.EXPIRE_IGNORE_FLAG
from t_insurance_detail a from t_insurance_detail a
left join t_insurance_settle tis on a.DEFAULT_SETTLE_ID = tis.ID left join t_insurance_settle tis on a.DEFAULT_SETTLE_ID = tis.ID
where a.ID = #{id} where a.ID = #{id}
...@@ -1720,17 +1722,14 @@ ...@@ -1720,17 +1722,14 @@
order by a.CREATE_TIME desc order by a.CREATE_TIME desc
</select> </select>
<update id="batchexpireIgnore"> <update id="batchexpireIgnore">
update t_insurance_detail a
set a.EXPIRE_IGNORE_FLAG = '0'
where
<if test="idList != null and idList.size() > 0"> <if test="idList != null and idList.size() > 0">
update t_insurance_detail a
set a.EXPIRE_IGNORE_FLAG = '0'
where
a.id in a.id in
<foreach collection="idList" item="param" index="index" open="(" close=")" separator=","> <foreach collection="idList" item="param" index="index" open="(" close=")" separator=",">
#{param} #{param}
</foreach> </foreach>
</if> </if>
<if test="idList == null or idList.size() = 0">
1=2
</if>
</update> </update>
</mapper> </mapper>
...@@ -75,10 +75,6 @@ public class TSalaryAccountExportVo { ...@@ -75,10 +75,6 @@ public class TSalaryAccountExportVo {
private BigDecimal salaryTax; private BigDecimal salaryTax;
@ExcelProperty(value = "年终奖扣税") @ExcelProperty(value = "年终奖扣税")
private BigDecimal annualBonusTax; private BigDecimal annualBonusTax;
@ExcelProperty(value = "代扣个人社保")
private BigDecimal withholidingPersonSocial;
@ExcelProperty(value = "代扣个人公积金")
private BigDecimal withholidingPersonFund;
@ExcelProperty("个人社保") @ExcelProperty("个人社保")
private BigDecimal personSocial; private BigDecimal personSocial;
@ExcelProperty("个人公积金") @ExcelProperty("个人公积金")
...@@ -91,10 +87,6 @@ public class TSalaryAccountExportVo { ...@@ -91,10 +87,6 @@ public class TSalaryAccountExportVo {
private BigDecimal unitSocial; private BigDecimal unitSocial;
@ExcelProperty("单位公积金") @ExcelProperty("单位公积金")
private BigDecimal unitFund; private BigDecimal unitFund;
@ExcelProperty("代扣单位社保")
private BigDecimal withholidingUnitSocial;
@ExcelProperty("代扣单位公积金")
private BigDecimal withholidingUnitFund;
// 子女教育专项扣除 住房贷款利息专项扣除 住房租金专项扣除 继续教育专项扣除 赡养老人专项扣除 婴幼儿照护费 累计个人养老金 // 子女教育专项扣除 住房贷款利息专项扣除 住房租金专项扣除 继续教育专项扣除 赡养老人专项扣除 婴幼儿照护费 累计个人养老金
@ExcelProperty(value = "子女教育专项扣除") @ExcelProperty(value = "子女教育专项扣除")
private BigDecimal sumChildEduMoney; private BigDecimal sumChildEduMoney;
......
...@@ -21,4 +21,5 @@ public class WageProofDto implements Serializable { ...@@ -21,4 +21,5 @@ public class WageProofDto implements Serializable {
private String endMouth; private String endMouth;
private String emIdCard; private String emIdCard;
private String sumType; private String sumType;
private String errorInfo;
} }
...@@ -329,7 +329,7 @@ public class TSalaryAccountController { ...@@ -329,7 +329,7 @@ public class TSalaryAccountController {
**/ **/
@Inner @Inner
@PostMapping("/inner/findAverageSalaryForProve") @PostMapping("/inner/findAverageSalaryForProve")
public R<WageProofDto> findAverageSalaryForProve(WageProofDto pd) { public WageProofDto findAverageSalaryForProve(WageProofDto pd) {
return getWageProofDtoR(pd.getStartMouth(), pd.getEndMouth(), pd.getEmIdCard(), pd.getSumType(), null); return getWageProofDtoR(pd.getStartMouth(), pd.getEndMouth(), pd.getEmIdCard(), pd.getSumType(), null);
} }
...@@ -350,10 +350,15 @@ public class TSalaryAccountController { ...@@ -350,10 +350,15 @@ public class TSalaryAccountController {
if( Common.isEmpty(startMouth) || Common.isEmpty(endMouth) || Common.isEmpty(emIdCard) || Common.isEmpty(sumType) ){ if( Common.isEmpty(startMouth) || Common.isEmpty(endMouth) || Common.isEmpty(emIdCard) || Common.isEmpty(sumType) ){
return R.failed("参数不完整"); return R.failed("参数不完整");
} }
return getWageProofDtoR(startMouth, endMouth, emIdCard, sumType, settleDepartId); WageProofDto wp = getWageProofDtoR(startMouth, endMouth, emIdCard, sumType, settleDepartId);
if (Common.isEmpty(wp.getErrorInfo())) {
return R.failed(wp.getErrorInfo());
} else {
return R.ok(wp);
}
} }
private R<WageProofDto> getWageProofDtoR(String startMouth, String endMouth, String emIdCard, String sumType, String settleDepartId) { private WageProofDto getWageProofDtoR(String startMouth, String endMouth, String emIdCard, String sumType, String settleDepartId) {
WageProofDto wp = new WageProofDto(); WageProofDto wp = new WageProofDto();
List<String> accountIdForProve = tSalaryAccountService.getAccountIdForProve(startMouth, endMouth, emIdCard, settleDepartId); List<String> accountIdForProve = tSalaryAccountService.getAccountIdForProve(startMouth, endMouth, emIdCard, settleDepartId);
String accIdStr; String accIdStr;
...@@ -367,10 +372,12 @@ public class TSalaryAccountController { ...@@ -367,10 +372,12 @@ public class TSalaryAccountController {
realMonthCount = accountMonthForProve.size(); realMonthCount = accountMonthForProve.size();
int count = LocalDateTimeUtils.getBeginOfMonth(endMouth.concat("01"), startMouth.concat("01"), "yyyyMMdd") + 1; int count = LocalDateTimeUtils.getBeginOfMonth(endMouth.concat("01"), startMouth.concat("01"), "yyyyMMdd") + 1;
if (count != realMonthCount) { if (count != realMonthCount) {
return R.failed("信息不一致,实际发工资月份为:" + SalaryCommonUtil.listToStrEasy(accountMonthForProve)); wp.setErrorInfo("信息不一致,实际发工资月份为:" + SalaryCommonUtil.listToStrEasy(accountMonthForProve));
return wp;
} }
} else { } else {
return R.failed("实发工资月份有误!"); wp.setErrorInfo("实发工资月份有误!");
return wp;
} }
//普通工资信息 //普通工资信息
accIdStr = SalaryCommonUtil.listForSqlIn(accountIdForProve); accIdStr = SalaryCommonUtil.listForSqlIn(accountIdForProve);
...@@ -382,11 +389,12 @@ public class TSalaryAccountController { ...@@ -382,11 +389,12 @@ public class TSalaryAccountController {
} }
} }
if (null == salary) { if (null == salary) {
return R.failed("无工资信息!"); wp.setErrorInfo("无工资信息!");
return wp;
} }
wp.setRealMonthCount(realMonthCount); wp.setRealMonthCount(realMonthCount);
wp.setSalary(salary.divide(new BigDecimal(realMonthCount), SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP)); wp.setSalary(salary.divide(new BigDecimal(realMonthCount), SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP));
return new R(wp); return wp;
} }
} }
...@@ -788,16 +788,12 @@ ...@@ -788,16 +788,12 @@
annualBonus.SALARY_MONEY as annualBonus, annualBonus.SALARY_MONEY as annualBonus,
ifnull(a.SALARY_TAX,0) + ifnull(a.SALARY_TAX_UNIT,0) as salaryTax, ifnull(a.SALARY_TAX,0) + ifnull(a.SALARY_TAX_UNIT,0) as salaryTax,
a.ANNUAL_BONUS_TAX as annualBonusTax, a.ANNUAL_BONUS_TAX as annualBonusTax,
withholidingPersonSocial.SALARY_MONEY as withholidingPersonSocial,
withholidingPersonFund.SALARY_MONEY as withholidingPersonFund,
a.PERSON_SOCIAL as personSocial, a.PERSON_SOCIAL as personSocial,
a.PERSON_FUND as personFund, a.PERSON_FUND as personFund,
exemptionPersionTax.SALARY_MONEY as exemptionPersionTax, exemptionPersionTax.SALARY_MONEY as exemptionPersionTax,
enterpriseAnnuity.SALARY_MONEY as enterpriseAnnuity, enterpriseAnnuity.SALARY_MONEY as enterpriseAnnuity,
a.UNIT_SOCIAL as unitSocial, a.UNIT_SOCIAL as unitSocial,
a.UNIT_FUND as unitFund, a.UNIT_FUND as unitFund,
withholidingUnitSocial.SALARY_MONEY as withholidingUnitSocial,
withholidingUnitFund.SALARY_MONEY as withholidingUnitFund,
a.SUM_BABY_MONEY as sumBabyMoney, a.SUM_BABY_MONEY as sumBabyMoney,
a.SUM_CHILD_EDU_MONEY as sumChildEduMoney, a.SUM_CHILD_EDU_MONEY as sumChildEduMoney,
a.SUM_CONTINUING_EDUCATION_MONEY as sumContinuingEducationMoney, a.SUM_CONTINUING_EDUCATION_MONEY as sumContinuingEducationMoney,
...@@ -810,10 +806,6 @@ ...@@ -810,10 +806,6 @@
from from
t_salary_account a t_salary_account a
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'
left join t_salary_account_item withholidingPersonSocial on withholidingPersonSocial.SALARY_ACCOUNT_ID = a.id and withholidingPersonSocial.JAVA_FIED_NAME='withholidingPersonSocial'
left join t_salary_account_item withholidingPersonFund on withholidingPersonFund.SALARY_ACCOUNT_ID = a.id and withholidingPersonFund.JAVA_FIED_NAME='withholidingPersonFund'
left join t_salary_account_item withholidingUnitSocial on withholidingUnitSocial.SALARY_ACCOUNT_ID = a.id and withholidingUnitSocial.JAVA_FIED_NAME='withholidingUnitSocial'
left join t_salary_account_item withholidingUnitFund on withholidingUnitFund.SALARY_ACCOUNT_ID = a.id and withholidingUnitFund.JAVA_FIED_NAME='withholidingUnitFund'
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 enterpriseAnnuity on enterpriseAnnuity.SALARY_ACCOUNT_ID = a.id and enterpriseAnnuity.JAVA_FIED_NAME='enterpriseAnnuity' left join t_salary_account_item enterpriseAnnuity on enterpriseAnnuity.SALARY_ACCOUNT_ID = a.id and enterpriseAnnuity.JAVA_FIED_NAME='enterpriseAnnuity'
<where> <where>
......
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