Commit af41b75c authored by huyuchen's avatar huyuchen

ldap同步用户部门问题修改

parent cc0c64d8
...@@ -108,6 +108,9 @@ public class TEmployeeInfoController { ...@@ -108,6 +108,9 @@ public class TEmployeeInfoController {
menuUtil.setAuthSql(user, tEmployeeInfo); menuUtil.setAuthSql(user, tEmployeeInfo);
if (Common.isNotNull(tEmployeeInfo.getAuthSql()) && tEmployeeInfo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) { if (Common.isNotNull(tEmployeeInfo.getAuthSql()) && tEmployeeInfo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
tEmployeeInfo.setAuthSql(tEmployeeInfo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "b.DEPT_ID")); tEmployeeInfo.setAuthSql(tEmployeeInfo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "b.DEPT_ID"));
if (tEmployeeInfo.getAuthSql().contains("1=2 or ")) {
tEmployeeInfo.setAuthSql(tEmployeeInfo.getAuthSql().replace("1=2 or ", ""));
}
} }
return R.ok(tEmployeeInfoService.getLeavePage(page, tEmployeeInfo)); return R.ok(tEmployeeInfoService.getLeavePage(page, tEmployeeInfo));
} }
......
...@@ -69,6 +69,7 @@ import javax.servlet.http.HttpServletResponse; ...@@ -69,6 +69,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.text.NumberFormat; import java.text.NumberFormat;
import java.time.LocalDateTime; import java.time.LocalDateTime;
...@@ -235,9 +236,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -235,9 +236,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
List<String> idList = Common.initStrToList(ids, CommonConstants.COMMA_STRING); List<String> idList = Common.initStrToList(ids, CommonConstants.COMMA_STRING);
TPaymentInfo paymentInfo; TPaymentInfo paymentInfo;
if (idList != null) {
for (String id : idList) { for (String id : idList) {
paymentInfo = baseMapper.selectById(id); paymentInfo = baseMapper.selectById(id);
if (null != paymentInfo && Common.isNotNull(paymentInfo.getId())) {
if ((!user.getId().equals(paymentInfo.getCreateBy()) && if ((!user.getId().equals(paymentInfo.getCreateBy()) &&
!CommonConstants.ONE_STRING.equals(user.getId())) || !CommonConstants.ONE_STRING.equals(user.getId())) ||
CommonConstants.ZERO_STRING.equals(paymentInfo.getPushStatus())) { CommonConstants.ZERO_STRING.equals(paymentInfo.getPushStatus())) {
...@@ -275,7 +276,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -275,7 +276,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
List<TPaymentInfo> list = baseMapper.selectList(wrapper); List<TPaymentInfo> list = baseMapper.selectList(wrapper);
List<String> idList = new ArrayList<>(); List<String> idList = new ArrayList<>();
Boolean delFlag = false; boolean delFlag = false;
if (Common.isNotNull(list)) { if (Common.isNotNull(list)) {
for (TPaymentInfo paymentInfo : list) { for (TPaymentInfo paymentInfo : list) {
if ((!user.getId().equals(paymentInfo.getCreateBy()) && if ((!user.getId().equals(paymentInfo.getCreateBy()) &&
...@@ -608,7 +609,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -608,7 +609,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
for (int i = lastIdx + 1; i < list.size(); i++) { for (int i = lastIdx + 1; i < list.size(); i++) {
tempList.add(list.get(i)); tempList.add(list.get(i));
} }
lastIdx += 1;
} }
List<TPaymentInfoVo> finalTempList = tempList; List<TPaymentInfoVo> finalTempList = tempList;
...@@ -1590,7 +1590,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -1590,7 +1590,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
for (int i = lastIdx + 1; i < list.size(); i++) { for (int i = lastIdx + 1; i < list.size(); i++) {
tempList.add(list.get(i)); tempList.add(list.get(i));
} }
lastIdx += 1;
} }
List<TPaymentHeFeiVo> finalTempList = tempList; List<TPaymentHeFeiVo> finalTempList = tempList;
...@@ -2469,14 +2468,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2469,14 +2468,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
} }
} }
for (String key: map.keySet()) { for (Map.Entry<String,Integer> entry : map.entrySet()) {
TSendEkpError error = new TSendEkpError(); TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date()); error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay()); error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING); error.setType(CommonConstants.THREE_STRING);
error.setLinkId(idMap.get(key)); error.setLinkId(idMap.get(entry.getKey()));
error.setTitle(key); error.setTitle(entry.getKey());
error.setNums(map.get(key)); error.setNums(entry.getValue());
tSendEkpErrorService.save(error); tSendEkpErrorService.save(error);
} }
//更新推送状态 //更新推送状态
...@@ -2640,14 +2639,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2640,14 +2639,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
} }
} }
for (String key: map.keySet()) { for (Map.Entry<String,Integer> entry : map.entrySet()) {
TSendEkpError error = new TSendEkpError(); TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date()); error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay()); error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.THREE_STRING); error.setType(CommonConstants.THREE_STRING);
error.setLinkId(idMap.get(key)); error.setLinkId(idMap.get(entry.getKey()));
error.setTitle(key); error.setTitle(entry.getKey());
error.setNums(map.get(key)); error.setNums(entry.getValue());
tSendEkpErrorService.save(error); tSendEkpErrorService.save(error);
} }
//更新推送状态 //更新推送状态
...@@ -2710,9 +2709,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2710,9 +2709,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
// 含有社保,则计算收入 // 含有社保,则计算收入
if (Common.isNotNull(settleDomain.getManageServerItem()) && ((settleDomain.getManageServerItem().contains(CommonConstants.ONE_STRING) if (Common.isNotNull(settleDomain.getManageServerItem()) && ((settleDomain.getManageServerItem().contains(CommonConstants.ONE_STRING)
&& CommonConstants.ONE_STRING.equals(socialFundFlag)) || (settleDomain.getManageServerItem().contains(CommonConstants.TWO_STRING) && CommonConstants.ONE_STRING.equals(socialFundFlag)) || (settleDomain.getManageServerItem().contains(CommonConstants.TWO_STRING)
&& CommonConstants.TWO_STRING.equals(socialFundFlag)))) { && CommonConstants.TWO_STRING.equals(socialFundFlag))) && CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) {
//预估模式 //预估模式
if (CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) {
if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) { if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) {
//预估模式只有按人次和人数收费 //预估模式只有按人次和人数收费
if (!exitFlag) { if (!exitFlag) {
...@@ -2731,11 +2729,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2731,11 +2729,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (CommonConstants.ONE_STRING.equals(socialFundFlag)) { if (CommonConstants.ONE_STRING.equals(socialFundFlag)) {
gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(), gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(),
settleDomain.getManagementFee().divide(new BigDecimal("100"), settleDomain.getManagementFee().divide(new BigDecimal("100"),
CommonConstants.FIVE_INT, BigDecimal.ROUND_HALF_UP)); CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
} else { } else {
gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getProvidentSum(), gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getProvidentSum(),
settleDomain.getManagementFee().divide(new BigDecimal("100"), settleDomain.getManagementFee().divide(new BigDecimal("100"),
CommonConstants.FIVE_INT, BigDecimal.ROUND_HALF_UP)); CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
} }
} }
if (!exitFlag || isSum == 1) { if (!exitFlag || isSum == 1) {
...@@ -2745,12 +2743,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2745,12 +2743,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
} }
} }
}
if (Common.isNotNull(settleDomain.getRiskServerItem()) && ((settleDomain.getRiskServerItem().contains(CommonConstants.ONE_STRING) if (Common.isNotNull(settleDomain.getRiskServerItem()) && ((settleDomain.getRiskServerItem().contains(CommonConstants.ONE_STRING)
&& CommonConstants.ONE_STRING.equals(socialFundFlag)) || (settleDomain.getRiskServerItem().contains(CommonConstants.TWO_STRING) && CommonConstants.ONE_STRING.equals(socialFundFlag)) || (settleDomain.getRiskServerItem().contains(CommonConstants.TWO_STRING)
&& CommonConstants.TWO_STRING.equals(socialFundFlag)))) { && CommonConstants.TWO_STRING.equals(socialFundFlag))) && CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) {
//预估模式 //预估模式
if (CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) {
if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) { if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) {
if (!exitFlag) { if (!exitFlag) {
createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.TWO_STRING, createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.TWO_STRING,
...@@ -2769,11 +2765,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2769,11 +2765,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (CommonConstants.ONE_STRING.equals(socialFundFlag)) { if (CommonConstants.ONE_STRING.equals(socialFundFlag)) {
money = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(), money = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(),
settleDomain.getRiskFundFee().divide(new BigDecimal("100"), settleDomain.getRiskFundFee().divide(new BigDecimal("100"),
CommonConstants.FIVE_INT, BigDecimal.ROUND_HALF_UP)); CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
} else { } else {
money = BigDecimalUtils.safeMultiply(paymentInfo.getProvidentSum(), money = BigDecimalUtils.safeMultiply(paymentInfo.getProvidentSum(),
settleDomain.getRiskFundFee().divide(new BigDecimal("100"), settleDomain.getRiskFundFee().divide(new BigDecimal("100"),
CommonConstants.FIVE_INT, BigDecimal.ROUND_HALF_UP)); CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
} }
} }
if (!exitFlag || isSum == 2) { if (!exitFlag || isSum == 2) {
...@@ -2786,7 +2782,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2786,7 +2782,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
} }
} }
}
incomeService.saveBathDetail(detailList); incomeService.saveBathDetail(detailList);
} }
......
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