Commit 1ba90044 authored by fangxinjiang's avatar fangxinjiang

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

parents 986ee6c0 694b7e9d
...@@ -52,6 +52,8 @@ public class EmployeeConstants { ...@@ -52,6 +52,8 @@ public class EmployeeConstants {
public static final String CONTRACT_REDUCE_INFO_NOT_EMPTY = "合同终止时离职日期和减少原因必填"; public static final String CONTRACT_REDUCE_INFO_NOT_EMPTY = "合同终止时离职日期和减少原因必填";
public static final String CONTRACT_REDUCE_REASON_NOT_EMPTY = "终止原因为其他时原因说明必填";
/** /**
* 无数据可更新 * 无数据可更新
**/ **/
......
...@@ -858,12 +858,17 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -858,12 +858,17 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
if (EmployeeConstants.SITUATION_SIX.equals(insert.getSituation()) if (EmployeeConstants.SITUATION_SIX.equals(insert.getSituation())
|| EmployeeConstants.SITUATION_SEVEN.equals(insert.getSituation())) { || EmployeeConstants.SITUATION_SEVEN.equals(insert.getSituation())) {
// 终止 离职日期 和减少原因必填 // 终止 离职日期 和减少原因必填
if (EmployeeConstants.SITUATION_SEVEN.equals(insert.getSituation()) if (EmployeeConstants.SITUATION_SEVEN.equals(insert.getSituation())) {
&& (Common.isEmpty(insert.getReduceReason()) if (Common.isEmpty(insert.getReduceReason()) || Common.isEmpty(insert.getLeaveDate())) {
|| Common.isEmpty(insert.getLeaveDate()))){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EmployeeConstants.CONTRACT_REDUCE_INFO_NOT_EMPTY)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EmployeeConstants.CONTRACT_REDUCE_INFO_NOT_EMPTY));
return; return;
} }
if (EmployeeConstants.OTHERS.equals(insert.getReduceReason()) &&
Common.isEmpty(insert.getReason())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EmployeeConstants.CONTRACT_REDUCE_REASON_NOT_EMPTY));
return;
}
}
TEmployeeContractInfo contractInfo = this.getOne(Wrappers.<TEmployeeContractInfo>query().lambda() TEmployeeContractInfo contractInfo = this.getOne(Wrappers.<TEmployeeContractInfo>query().lambda()
.eq(TEmployeeContractInfo::getEmpIdcard, insert.getEmpIdcard()) .eq(TEmployeeContractInfo::getEmpIdcard, insert.getEmpIdcard())
.eq(TEmployeeContractInfo::getDeptNo, insert.getDeptNo()) .eq(TEmployeeContractInfo::getDeptNo, insert.getDeptNo())
......
...@@ -3781,7 +3781,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3781,7 +3781,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceOperate operate = new TInsuranceOperate(); TInsuranceOperate operate = new TInsuranceOperate();
LambdaUpdateWrapper<TInsuranceRefund> refund = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<TInsuranceRefund> refund = new LambdaUpdateWrapper<>();
refund.eq(TInsuranceRefund :: getInsDetailId ,param.getId()) refund.eq(TInsuranceRefund :: getInsDetailId ,param.getId())
.set(TInsuranceRefund :: getRemark,param.getRemark()) //.set(TInsuranceRefund :: getRemark,param.getRemark())
.set(TInsuranceRefund :: getUpdateTime,LocalDateTime.now()) .set(TInsuranceRefund :: getUpdateTime,LocalDateTime.now())
.set(TInsuranceRefund :: getUpdateBy,user.getId()); .set(TInsuranceRefund :: getUpdateBy,user.getId());
LambdaUpdateWrapper<TInsuranceDetail> updateWrapper = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<TInsuranceDetail> updateWrapper = new LambdaUpdateWrapper<>();
......
...@@ -1506,7 +1506,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1506,7 +1506,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
List<TSalaryAccount> aList = new ArrayList<>(); List<TSalaryAccount> aList = new ArrayList<>();
TSalaryAccount a;//定库: TSalaryAccount a;//定库:
BigDecimal relaySalarySum = BigDecimal.ZERO; //工资应发 BigDecimal relaySalarySum = BigDecimal.ZERO; //工资应发
List<TSalaryAccountItem> asList; //累计扣税
int size = savList.size(); int size = savList.size();
// 自有员工人数 // 自有员工人数
int ownNum = 0; int ownNum = 0;
...@@ -1518,16 +1517,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1518,16 +1517,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
// 是否重复金额false:否;true:是 // 是否重复金额false:否;true:是
boolean repeatFlag = false; boolean repeatFlag = false;
List<String> idCardList = new ArrayList<>();
for (TSalaryAccountVo vo : savList) {
if (Common.isNotNull(vo.getEmpIdcard())) {
idCardList.add(vo.getEmpIdcard());
}
}
// 工资查询所需的全部list,组装Map来使用
Map<String, List<TSalaryAccountItem>> itemMap = tSalaryAccountItemService.getAllItemVoList(idCardList, invoiceTitle);
TSalaryAccountItem sai; TSalaryAccountItem sai;
for (int i = CommonConstants.ZERO_INT; i < size; i++) { for (int i = CommonConstants.ZERO_INT; i < size; i++) {
a = new TSalaryAccount(); a = new TSalaryAccount();
...@@ -1549,14 +1538,10 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1549,14 +1538,10 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
} }
} }
//累计扣税list
asList = this.getLaborAsList(itemMap.get(a.getEmpIdcard()), a.getSettlementMonth());
// 实发劳务费,按月累计扣税 // 实发劳务费,按月累计扣税
this.saveNewItems(saiList, SalaryConstants.SALARY_TAX, this.saveNewItems(saiList, SalaryConstants.SALARY_TAX,
SalaryConstants.SALARY_TAX_JAVA, SalaryConstants.SALARY_TAX_JAVA,
calculationLabor(saiList, asList calculationLabor(saiList, saiList, a), CommonConstants.ZERO_INT);
, saiList, a), CommonConstants.ZERO_INT);
// 自有员工以及自有员工应发金额 // 自有员工以及自有员工应发金额
if (Common.isNotNull(a.getOwnFlag()) && a.getOwnFlag() == 1) { if (Common.isNotNull(a.getOwnFlag()) && a.getOwnFlag() == 1) {
...@@ -1584,6 +1569,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1584,6 +1569,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
salary.setHaveSpecialFlag(CommonConstants.ZERO_INT); salary.setHaveSpecialFlag(CommonConstants.ZERO_INT);
salary.setIsRepeat(CommonConstants.ZERO_INT); salary.setIsRepeat(CommonConstants.ZERO_INT);
salary.setStatus(SalaryConstants.AUDIT_STATUS[0]); salary.setStatus(SalaryConstants.AUDIT_STATUS[0]);
salary.setSalaryMonth(DateUtil.getThisMonth());
if (haveSalaryFlag || ownNum > 0 || repeatFlag) { if (haveSalaryFlag || ownNum > 0 || repeatFlag) {
if (haveSalaryFlag) { if (haveSalaryFlag) {
salary.setHaveSalaryFlag(CommonConstants.ONE_INT); salary.setHaveSalaryFlag(CommonConstants.ONE_INT);
...@@ -1612,6 +1598,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1612,6 +1598,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
account.setSaiList(null); account.setSaiList(null);
account.setOrderId(salary.getOrderId()); account.setOrderId(salary.getOrderId());
account.setSalaryFormId(salary.getId()); account.setSalaryFormId(salary.getId());
account.setSalaryMonth(DateUtil.getThisMonth());
tSalaryAccountService.save(account); tSalaryAccountService.save(account);
for (TSalaryAccountItem item : saiList) { for (TSalaryAccountItem item : saiList) {
item.setSalaryAccountId(account.getId()); item.setSalaryAccountId(account.getId());
...@@ -1629,15 +1616,13 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1629,15 +1616,13 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
/** /**
* @param itemList * @param itemList
* @param itemHistoryList
* @param saiList * @param saiList
* @Description: 计算劳务费个税、应发 * @Description: 计算劳务费个税、应发
* @Author: hgw * @Author: hgw
* @Date: 2022/3/3 11:30 * @Date: 2022/3/3 11:30
* @return: java.math.BigDecimal * @return: java.math.BigDecimal
**/ **/
private BigDecimal calculationLabor(List<TSalaryAccountItem> itemList, List<TSalaryAccountItem> itemHistoryList, private BigDecimal calculationLabor(List<TSalaryAccountItem> itemList,List<TSalaryAccountItem> saiList, TSalaryAccount a) {
List<TSalaryAccountItem> saiList, TSalaryAccount a) {
// B7 = 当月实发合计 // B7 = 当月实发合计
// 税=ROUND(IF(B7<=800,0,IF(B7<=3360,(B7-800)/4,IF(B7<=21000,0.16*B7/0.84,IF(B7<=49500,(0.24*B7-2000)/0.76,(0.32*B7-7000)/0.68)))),2) // 税=ROUND(IF(B7<=800,0,IF(B7<=3360,(B7-800)/4,IF(B7<=21000,0.16*B7/0.84,IF(B7<=49500,(0.24*B7-2000)/0.76,(0.32*B7-7000)/0.68)))),2)
// 本次实发 // 本次实发
......
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