Commit 29d1e1a4 authored by hongguangwu's avatar hongguangwu

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

parents 518dda86 d4c1ec4b
...@@ -10,7 +10,7 @@ import lombok.Data; ...@@ -10,7 +10,7 @@ import lombok.Data;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.time.LocalDateTime;
/** /**
* 款项认领差额费导入 * 款项认领差额费导入
...@@ -96,7 +96,7 @@ public class ClaimRebackInfotVO implements Serializable { ...@@ -96,7 +96,7 @@ public class ClaimRebackInfotVO implements Serializable {
@ExcelAttribute(name = "入账日期") @ExcelAttribute(name = "入账日期")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="入账日期") @ExcelProperty(value ="入账日期")
private Date claimTime; private LocalDateTime claimTime;
/** /**
* 异常说明 * 异常说明
......
...@@ -334,10 +334,10 @@ public class EkpSalaryInfoServiceImpl extends ServiceImpl<EkpSalaryInfoMapper, E ...@@ -334,10 +334,10 @@ public class EkpSalaryInfoServiceImpl extends ServiceImpl<EkpSalaryInfoMapper, E
money = excel.getMoney(); money = excel.getMoney();
deptName = excel.getDeptName(); deptName = excel.getDeptName();
ClaimRebackInfotVO backInfo = new ClaimRebackInfotVO(); ClaimRebackInfotVO backInfo = new ClaimRebackInfotVO();
if (money.compareTo(BigDecimal.ZERO) >= 0) {
//先找到彭超创建的款项认领明细 //先找到彭超创建的款项认领明细
info = baseMapper.getClaimInfoByDeptNo(deptNo,"1"); info = baseMapper.getClaimInfoByDeptNo(deptNo,"1");
//
if (money.compareTo(BigDecimal.ZERO) > 0) {
//调整金额大于零的先找到彭超创建的款项认领明细直接加 //调整金额大于零的先找到彭超创建的款项认领明细直接加
if (Optional.ofNullable(info).isPresent()) { if (Optional.ofNullable(info).isPresent()) {
info.setAdjustMoney(money); info.setAdjustMoney(money);
...@@ -362,7 +362,7 @@ public class EkpSalaryInfoServiceImpl extends ServiceImpl<EkpSalaryInfoMapper, E ...@@ -362,7 +362,7 @@ public class EkpSalaryInfoServiceImpl extends ServiceImpl<EkpSalaryInfoMapper, E
//调整金额小于零的先找到剩余金额大于零的彭超创建的款项认领明细去扣减 //调整金额小于零的先找到剩余金额大于零的彭超创建的款项认领明细去扣减
info = baseMapper.getClaimInfoByDeptNo(deptNo,"3"); info = baseMapper.getClaimInfoByDeptNo(deptNo,"3");
if (Optional.ofNullable(info).isPresent()) { if (Optional.ofNullable(info).isPresent()) {
if (BigDecimalUtils.safeAdd(info.getSurMoney(),money).compareTo(BigDecimal.ZERO) >=0) { if (info.getSurMoney().add(money).compareTo(BigDecimal.ZERO) >=0) {
info.setAdjustMoney(money); info.setAdjustMoney(money);
info.setAfterAdjustMoney(BigDecimalUtils.safeAdd(info.getSurMoney(),money)); info.setAfterAdjustMoney(BigDecimalUtils.safeAdd(info.getSurMoney(),money));
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), info.getErrorInfo(),info)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), info.getErrorInfo(),info));
...@@ -376,31 +376,21 @@ public class EkpSalaryInfoServiceImpl extends ServiceImpl<EkpSalaryInfoMapper, E ...@@ -376,31 +376,21 @@ public class EkpSalaryInfoServiceImpl extends ServiceImpl<EkpSalaryInfoMapper, E
} }
} }
/**
* @Description: 推送ekp时更改日期格式
* @Author: huyc
**/
public String dateStringInsert(String month) {
StringBuilder sb = new StringBuilder(month);
sb.insert(4, "-");
return sb.toString();
}
public void subSwitch(String deptNo,ClaimRebackInfotVO backInfo,List<ErrorMessage>errorMessageList, public void subSwitch(String deptNo,ClaimRebackInfotVO backInfo,List<ErrorMessage>errorMessageList,
BigDecimal money,String deptName,ClaimInfotVO excel) { BigDecimal money,String deptName,ClaimInfotVO excel) {
List<ClaimRebackInfotVO> infoList = baseMapper.getClaimBigInfoByDeptNoAndUser(deptNo); List<ClaimRebackInfotVO> infoList = baseMapper.getClaimBigInfoByDeptNoAndUser(deptNo);
if (Optional.ofNullable(infoList).isPresent()) { if (Optional.ofNullable(infoList).isPresent()) {
for (ClaimRebackInfotVO subInfo : infoList) { for (ClaimRebackInfotVO subInfo : infoList) {
//分批去减去金额 //分批去减去金额
if (BigDecimalUtils.safeAdd(subInfo.getSurMoney(),money).compareTo(BigDecimal.ZERO) >=0) { if (subInfo.getSurMoney().add(money).compareTo(BigDecimal.ZERO) >=0) {
subInfo.setAdjustMoney(money); subInfo.setAdjustMoney(money);
subInfo.setAfterAdjustMoney(BigDecimalUtils.safeSubtract(subInfo.getSurMoney(),money)); subInfo.setAfterAdjustMoney(BigDecimalUtils.safeAdd(subInfo.getSurMoney(),money));
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), subInfo.getErrorInfo(),subInfo)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), subInfo.getErrorInfo(),subInfo));
break; break;
} else { } else {
subInfo.setAdjustMoney(subInfo.getSurMoney()); subInfo.setAdjustMoney(money);
subInfo.setAfterAdjustMoney(BigDecimal.ZERO); subInfo.setAfterAdjustMoney(BigDecimal.ZERO);
money = BigDecimalUtils.safeAdd(subInfo.getSurMoney(),money); money = subInfo.getSurMoney().add(money);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), subInfo.getErrorInfo(),subInfo)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), subInfo.getErrorInfo(),subInfo));
} }
} }
......
...@@ -158,8 +158,8 @@ ...@@ -158,8 +158,8 @@
fd_3afb4c634ebd08 claimNo, fd_3afb4c634ebd08 claimNo,
fd_3afb46ab98d9a8 claimMoney, fd_3afb46ab98d9a8 claimMoney,
fd_3afb46ac507904 cancelMoney, fd_3afb46ac507904 cancelMoney,
fd_3afb46d05d19ec surMoney, ifnull(fd_3afb46d05d19ec,0) surMoney,
DATE_FORMAT(fd_3b5f41db9fb154,'%Y-%m-%d') claimTime fd_3b5f41db9fb154 claimTime
from from
ekp_94b6cd1535e4b34865c8 ekp_94b6cd1535e4b34865c8
where where
...@@ -184,13 +184,14 @@ ...@@ -184,13 +184,14 @@
fd_3afb4c634ebd08 claimNo, fd_3afb4c634ebd08 claimNo,
fd_3afb46ab98d9a8 claimMoney, fd_3afb46ab98d9a8 claimMoney,
fd_3afb46ac507904 cancelMoney, fd_3afb46ac507904 cancelMoney,
fd_3afb46d05d19ec surMoney, ifnull(fd_3afb46d05d19ec,0) surMoney,
DATE_FORMAT(fd_3b5f41db9fb154,'%Y-%m-%d') claimTime fd_3b5f41db9fb154 claimTime
from from
ekp_94b6cd1535e4b34865c8 ekp_94b6cd1535e4b34865c8
where where
fd_3afb4689209aa2 = #{deptNo} fd_3afb4689209aa2 = #{deptNo}
and fd_3afb46d05d19ec > 0 and fd_3afb46d05d19ec > 0
and fd_3b2a70e26f520a != '1817fbe83899f5f34c1ee9b463bbf9c1'
order by fd_3b5f41db9fb154 asc order by fd_3b5f41db9fb154 asc
</select> </select>
......
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