艾志增加人员分类

This commit is contained in:
Harryxzy 2023-08-18 17:56:34 +08:00
parent ea1a46839d
commit ed9a924e29
6 changed files with 68 additions and 4 deletions

View File

@ -88,4 +88,7 @@ public class SalaryArchiveBaseInfoFormDTO {
// //个税扣缴义务人")
private String taxAgent;
// 艾志人员分类
private String ryfl;
}

View File

@ -233,4 +233,11 @@ public interface SalaryArchiveService {
* @param salaryArchiveIds
*/
void deleteSalaryArchive(Collection<Long> salaryArchiveIds);
/**
* 获取人员分类信息
* @param asList
* @return
*/
Map<Long, String> getAzRyflInfo(List<Long> asList);
}

View File

@ -25,6 +25,7 @@ import com.engine.salary.mapper.siarchives.InsuranceBaseInfoMapper;
import com.engine.salary.mapper.siarchives.OtherSchemeMapper;
import com.engine.salary.mapper.siarchives.SocialSchemeMapper;
import com.engine.salary.service.SIArchivesService;
import com.engine.salary.service.SalaryArchiveService;
import com.engine.salary.service.TaxAgentEmpChangeService;
import com.engine.salary.service.TaxAgentService;
import com.engine.salary.sys.constant.SalarySysConstant;
@ -93,6 +94,10 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
return MapperProxyFactory.getProxy(OtherSchemeMapper.class);
}
private SalaryArchiveService getSalaryArchiveService(User user) {
return ServiceUtil.getService(SalaryArchiveServiceImpl.class, user);
}
@Override
public Map<String, Object> getTips(Map<String, Object> params) {
return commandExecutor.execute(new SIArchivesTipsCmd(params, user));
@ -112,6 +117,10 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
Long employeeId = Long.valueOf(Util.null2String(params.get("employeeId")));
Long paymentOrganization = welfareTypeEnum != null ? Long.valueOf(Util.null2String(params.get("paymentOrganization"))) : null;
apidatas = siArchivesBiz.getBaseForm(welfareTypeEnum, employeeId, (long) user.getUID(), user, paymentOrganization);
// 人员分类信息
Map<Long, String> ryflInfoMap = getSalaryArchiveService(user).getAzRyflInfo(Arrays.asList(employeeId));
apidatas.put("ryfl",ryflInfoMap.getOrDefault(employeeId, ""));
return apidatas;
}

View File

@ -38,10 +38,7 @@ import com.engine.salary.mapper.sischeme.InsuranceSchemeDetailMapper;
import com.engine.salary.mapper.sischeme.InsuranceSchemeMapper;
import com.engine.salary.mapper.sys.SalarySysConfMapper;
import com.engine.salary.mapper.taxagent.TaxAgentMapper;
import com.engine.salary.service.SIImportService;
import com.engine.salary.service.SISchemeService;
import com.engine.salary.service.SalaryEmployeeService;
import com.engine.salary.service.TaxAgentService;
import com.engine.salary.service.*;
import com.engine.salary.sys.entity.po.SalarySysConfPO;
import com.engine.salary.sys.entity.vo.OrderRuleVO;
import com.engine.salary.sys.service.SalarySysConfService;
@ -141,6 +138,10 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
return MapperProxyFactory.getProxy(InsuranceBaseInfoMapper.class);
}
private SalaryArchiveService getSalaryArchiveService(User user) {
return ServiceUtil.getService(SalaryArchiveServiceImpl.class, user);
}
@Override
public Map<String, Object> getForm(Map<String, Object> params) {
return commandExecutor.execute(new SISchemeGetFormCmd(params, user));
@ -254,6 +255,8 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
if (CollectionUtils.isEmpty(employeeIds)) {
return records;
}
// 人员分类信息
Map<Long, String> ryflInfoMap = getSalaryArchiveService(user).getAzRyflInfo(employeeIds);
List<InsuranceArchivesSocialSchemePO> socialList = new ArrayList<>();
List<InsuranceArchivesFundSchemePO> fundList = new ArrayList<>();
List<InsuranceArchivesOtherSchemePO> otherList = new ArrayList<>();
@ -289,6 +292,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
map.put("paymentOrganizationName", longTaxAgentPOMap.get(item.getPaymentOrganization()) != null ? longTaxAgentPOMap.get(item.getPaymentOrganization()).getName() : "");
map.put("mobile", item.getTelephone());
map.put("status", item.getUserStatus() == null ? "" : UserStatusEnum.getDefaultLabelByValue(item.getUserStatus()));
map.put("jobactivities",ryflInfoMap.getOrDefault(item.getEmployeeId(),""));
if (socialItem != null) {
map.put("socialName", getSiSchemeService().querySchemeName(socialItem.getSocialSchemeId()));
Map<String, Object> socialJson = JSON.parseObject(socialItem.getSocialPaymentBaseString(), new TypeReference<Map<String, Object>>() {
@ -469,6 +473,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(86186, "手机号"), "mobile"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(86187, "员工状态"), "status"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(1933, "工号"), "jobNum"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "人员分类"), "jobactivities"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(91323, "社保方案名称"), "socialName"));
titleMap.get(WelfareTypeEnum.SOCIAL_SECURITY.getValue()).forEach((k, v) -> list.add(new WeaTableColumn("150px", v, k)));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(91324, "社保账号"), "socialAccount"));

View File

@ -57,6 +57,7 @@ import org.apache.poi.util.IOUtils;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.beans.BeanUtils;
import org.springframework.transaction.annotation.Transactional;
import weaver.conn.RecordSet;
import weaver.file.ImageFileManager;
import weaver.general.Util;
import weaver.hrm.User;
@ -504,6 +505,7 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
SalaryI18nUtil.getI18nLabel(86185, "部门"),
SalaryI18nUtil.getI18nLabel(86176, "工号"),
SalaryI18nUtil.getI18nLabel(86186, "手机号"),
SalaryI18nUtil.getI18nLabel(0, "人员分类"),
SalaryI18nUtil.getI18nLabel(15890, "员工状态"),
SalaryI18nUtil.getI18nLabel(91075, "起始发薪日期"),
SalaryI18nUtil.getI18nLabel(91075, "最后发薪日期")};
@ -549,6 +551,12 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
}
List<Map<String, Object>> listMaps = buildSalaryArchiveData(salaryArchives, taxAgentList, salaryItems, Boolean.FALSE);
// 获取人员分类信息
Map<String, String> ryflInfo = new HashMap<>();
getAzRyflInfo(salaryArchives.stream().map(SalaryArchiveListDTO::getEmployeeId).collect(Collectors.toList()))
.forEach((k,v) -> {
ryflInfo.put(k.toString(),v);
});
// 组装数据
List<List<Object>> rows = new ArrayList<>();
rows.add(headerList);
@ -559,6 +567,7 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
row.add(Util.null2String(e.get("departmentName")));
row.add(Util.null2String(e.get("workcode")));
row.add(Util.null2String(e.get("mobile")));
row.add(ryflInfo.getOrDefault(Util.null2String(e.get("employeeId")), ""));
row.add(Util.null2String(e.get("employeeStatus")));
row.add(Util.null2String(e.get("payStartDate")));
row.add(Util.null2String(e.get("payEndDate")));
@ -1285,4 +1294,31 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
return result;
}
@Override
public Map<Long, String> getAzRyflInfo(List<Long> employeeIds) {
Map<Long, String> result = new HashMap<>();
if (CollectionUtils.isEmpty(employeeIds)){
return result;
}
String employeeIdStr = "(" + StringUtils.join(employeeIds, ",") + ")";
RecordSet rs = new RecordSet();
// 获取人事中设置的人员分类信息
String sql =" select a.id,b.jobactivityname from cus_fielddata a left join hrmjobactivities b on a.field16=b.id where a.scopeid=3 and a.id in "+employeeIdStr;
rs.execute(sql);
while (rs.next()) {
String jobactivityname = Util.null2String(rs.getString("jobactivityname"));
if (StringUtils.contains(jobactivityname,"~`~`7")) {
String[] split = StringUtils.split(jobactivityname, "~`");
for(String str : split){
if (StringUtils.startsWith(str, "7")){
String flName = str.substring(2, str.length());
result.put(Long.valueOf(rs.getInt("id")), flName);
}
}
} else {
result.put(Long.valueOf(rs.getInt("id")), jobactivityname);
}
}
return result;
}
}

View File

@ -346,6 +346,8 @@ public class SalaryArchiveWrapper extends Service {
// 1.基本信息表单
Map<String, Object> baseInfo = new HashMap<>();
DataCollectionEmployee employee = employeeList.get(0);
// 查询人员分类信息
Map<Long, String> ryflInfoMap = getSalaryArchiveService(user).getAzRyflInfo(Arrays.asList(employee.getEmployeeId()));
SalaryArchiveBaseInfoFormDTO build = SalaryArchiveBaseInfoFormDTO.builder()
.username(employee.getUsername())
.department(employee.getDepartmentName())
@ -353,6 +355,7 @@ public class SalaryArchiveWrapper extends Service {
.hiredate(employee.getCompanystartdate())
.mobile(employee.getMobile())
.taxAgent(taxAgent.getName())
.ryfl(ryflInfoMap.getOrDefault(employee.getEmployeeId(), ""))
.build();
baseInfo.put("employee", build);
@ -389,6 +392,7 @@ public class SalaryArchiveWrapper extends Service {
}
/**
* 保存发薪设置
*