fix
This commit is contained in:
parent
e1a075cab3
commit
b357bd18a6
|
|
@ -31,7 +31,8 @@ public class AddUpDeductionBiz extends BaseBean {
|
|||
try {
|
||||
AddUpDeductionMapper mapper = sqlSession.getMapper(AddUpDeductionMapper.class);
|
||||
List<AddUpDeductionDTO> list = mapper.list(param);
|
||||
return AddUpDeductionStrDTOEncrypt.decryptAddUpDeductionList(list);
|
||||
AddUpDeductionStrDTOEncrypt.decryptAddUpDeductionList(list);
|
||||
return list;
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,9 +3,7 @@ package com.engine.salary.encrypt.datacollection;
|
|||
import com.engine.salary.encrypt.AESEncryptUtil;
|
||||
import com.engine.salary.entity.datacollection.dto.AddUpDeductionDTO;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* hrsa_add_up_deduction: 数据加解密
|
||||
|
|
@ -17,9 +15,9 @@ import java.util.stream.Collectors;
|
|||
* add_up_support_elderly
|
||||
*/
|
||||
public class AddUpDeductionStrDTOEncrypt {
|
||||
public static List<AddUpDeductionDTO> decryptAddUpDeductionList(List<AddUpDeductionDTO> list) {
|
||||
if(list == null || list.size() == 0) {
|
||||
return new ArrayList<>();
|
||||
public static void decryptAddUpDeductionList(List<AddUpDeductionDTO> list) {
|
||||
if (list == null || list.size() == 0) {
|
||||
return;
|
||||
}
|
||||
list.forEach(item -> {
|
||||
item.setAddUpChildEducation(AESEncryptUtil.decrypt(item.getAddUpChildEducation()));
|
||||
|
|
@ -30,27 +28,6 @@ public class AddUpDeductionStrDTOEncrypt {
|
|||
item.setAddUpIllnessMedical(AESEncryptUtil.decrypt(item.getAddUpIllnessMedical()));
|
||||
item.setAddUpInfantCare(AESEncryptUtil.decrypt(item.getAddUpInfantCare()));
|
||||
});
|
||||
return list.stream().map(item -> {
|
||||
return AddUpDeductionDTO.builder()
|
||||
.id(item.getId())
|
||||
.employeeId(item.getEmployeeId())
|
||||
.username(item.getUsername())
|
||||
.taxAgentName(item.getTaxAgentName())
|
||||
.departmentName(item.getDepartmentName())
|
||||
.mobile(item.getMobile())
|
||||
.jobNum(item.getJobNum())
|
||||
.idNo(item.getIdNo())
|
||||
.hiredate(item.getHiredate())
|
||||
.addUpChildEducation(item.getAddUpChildEducation())
|
||||
.addUpContinuingEducation(item.getAddUpContinuingEducation())
|
||||
.addUpHousingLoanInterest(item.getAddUpHousingLoanInterest())
|
||||
.addUpHousingRent(item.getAddUpHousingRent())
|
||||
.addUpSupportElderly(item.getAddUpSupportElderly())
|
||||
.addUpIllnessMedical(item.getAddUpIllnessMedical())
|
||||
.addUpInfantCare(item.getAddUpInfantCare())
|
||||
.operate(item.getOperate())
|
||||
.build();
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -432,7 +432,8 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
|||
|
||||
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
|
||||
List<AddUpDeductionDTO> list = getAddUpDeductionMapper().list(queryParam);
|
||||
return new PageInfo<>(AddUpDeductionStrDTOEncrypt.decryptAddUpDeductionList(list), AddUpDeductionDTO.class);
|
||||
AddUpDeductionStrDTOEncrypt.decryptAddUpDeductionList(list);
|
||||
return new PageInfo<>(list, AddUpDeductionDTO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -450,7 +451,8 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
|||
|
||||
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
|
||||
List<AddUpDeductionRecordDTO> list = getAddUpDeductionMapper().recordList(queryParam);
|
||||
return new PageInfo<>(AddUpDeductionRecordStrDTOEncrypt.decryptAddUpDeductionRecordDTO(list), AddUpDeductionRecordDTO.class);
|
||||
AddUpDeductionRecordStrDTOEncrypt.decryptAddUpDeductionRecordDTO(list);
|
||||
return new PageInfo<>(list, AddUpDeductionRecordDTO.class);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -419,7 +419,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
|||
// AttendQuoteDataBO.buildAttendDataFromRemote("day", attendResult.getData(), attendQuoteFields, attendQuoteSyncData);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("获取考勤数据错误失败:{}", String.format("参数:%s,错误信息:%s", JSONObject.toJSONString(attend4Salary), e.getMessage()),e);
|
||||
log.error("获取考勤数据错误失败:{}", String.format("参数:%s,错误信息:%s", JSONObject.toJSONString(attend4Salary), e.getMessage()), e);
|
||||
return attendQuoteSyncData;
|
||||
}
|
||||
log.info("同步的考勤数据:{}", JSONUtils.toJSONString(attendQuoteSyncData));
|
||||
|
|
@ -579,13 +579,26 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
|||
// 表头
|
||||
List<String> headers = ExcelSupport.getSheetHeader(sheet, 0);
|
||||
|
||||
boolean isValidHeader = checkHeaders(headers, attendQuoteFields);
|
||||
|
||||
// 错误sheet数据
|
||||
List<Map<String, Object>> errorData = new ArrayList<>();
|
||||
// 错误提示
|
||||
List<Map<String, String>> excelComments = new ArrayList<>();
|
||||
|
||||
//验证字段是否缺失
|
||||
String isValidHeader = checkHeaders(headers, attendQuoteFields);
|
||||
if (StringUtils.isNotBlank(isValidHeader)) {
|
||||
Map<String, Object> apidatas = new HashMap<String, Object>();
|
||||
apidatas.put("successCount", successCount);
|
||||
apidatas.put("errorCount", errorCount);
|
||||
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", isValidHeader);
|
||||
excelComments.add(errorMessageMap);
|
||||
apidatas.put("errorData", excelComments);
|
||||
return apidatas;
|
||||
}
|
||||
|
||||
|
||||
// 处理数值
|
||||
List<Map<String, Object>> data = ExcelParseHelper.parse2Map(sheet, 1);
|
||||
total = data.size();
|
||||
|
|
@ -813,7 +826,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
|||
*
|
||||
* @return
|
||||
*/
|
||||
private boolean checkHeaders(List<String> headerList, List<AttendQuoteFieldPO> attendQuoteFields) {
|
||||
private String checkHeaders(List<String> headerList, List<AttendQuoteFieldPO> attendQuoteFields) {
|
||||
boolean isValid = true;
|
||||
String userNameI18n = SalaryI18nUtil.getI18nLabel(85429, "姓名");
|
||||
|
||||
|
|
@ -830,9 +843,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
|||
} else if (CollectionUtils.isNotEmpty(lackHeaders)) {
|
||||
errorMsg = checkHeaderI18n + Joiner.on(",").join((Iterable<?>) lackHeaders);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(errorMsg)) {
|
||||
throw new SalaryRunTimeException(errorMsg);
|
||||
}
|
||||
return isValid;
|
||||
|
||||
return errorMsg;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -384,6 +384,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
List<String> title = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "入职日期", "商业健康保险", "税延养老保险", "其他", "准予扣除的捐赠额");
|
||||
|
||||
List<OtherDeductionListDTO> list = getOtherDeductionMapper().list(param);
|
||||
OtherDeductionListDTOEncrypt.decryptOtherDeductionListDTOList(list);
|
||||
// 开启分权并且不是薪酬模块总管理员
|
||||
if (getTaxAgentService(user).isOpenDevolution() && !getTaxAgentService(user).isChief(employeeId)) {
|
||||
List<Long> taxAgentIdsAsAdmin = getTaxAgentService(user).listAllTaxAgentsAsAdmin(employeeId).stream().map(TaxAgentPO::getId).collect(Collectors.toList());
|
||||
|
|
@ -476,6 +477,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM");
|
||||
//查询详细信息
|
||||
List<OtherDeductionRecordDTO> list = getOtherDeductionMapper().recordList(param);
|
||||
OtherDeductionRecordDTOEncrypt.decryptOtherDeductionRecordDTOList(list);
|
||||
final List<List<String>> dataRowList = Optional.ofNullable(list)
|
||||
.map(List::stream)
|
||||
.map(operatorStream -> operatorStream.map(dto -> {
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
map.put("departmentId", item.getDepartmentId());
|
||||
map.put("jobNum", item.getJobNum());
|
||||
map.put("mobile", item.getTelephone());
|
||||
map.put("status", item.getUserStatusEnum() == null ? "" : item.getUserStatusEnum().getDescription());
|
||||
map.put("status", item.getUserStatus() == null ? "" : UserStatusEnum.getDefaultLabelByValue(item.getUserStatus()));
|
||||
if (socialItem != null) {
|
||||
map.put("socialName", getSiSchemeService().querySchemeName(socialItem.getSocialSchemeId()));
|
||||
Map<String, Object> socialJson = JSON.parseObject(socialItem.getSocialPaymentBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
|
|
|
|||
|
|
@ -71,8 +71,10 @@ public class AttendQuoteDataWrapper extends Service {
|
|||
// 获取最终结果
|
||||
List<Map<String, Object>> listMaps = getAttendQuoteDataService(user).getListMaps(attendQuoteDataBases);
|
||||
|
||||
PageInfo<Map<String, Object>> listPage = new PageInfo<>();
|
||||
listPage.setList(listMaps);
|
||||
PageInfo<Map<String, Object>> listPage = new PageInfo<>(listMaps);
|
||||
listPage.setPageNum(page.getPageNum());
|
||||
listPage.setPageSize(page.getPageSize());
|
||||
listPage.setTotal(page.getTotal());
|
||||
|
||||
|
||||
// 表格表头
|
||||
|
|
@ -117,7 +119,7 @@ public class AttendQuoteDataWrapper extends Service {
|
|||
}
|
||||
|
||||
/**
|
||||
* 到处考勤引用数据
|
||||
* 导出考勤引用数据
|
||||
*
|
||||
* @param queryParam
|
||||
* @return
|
||||
|
|
|
|||
Loading…
Reference in New Issue