2022-04-12 10:11:53 +08:00
|
|
|
|
package com.engine.salary.wrapper;
|
|
|
|
|
|
|
2022-04-14 16:11:44 +08:00
|
|
|
|
import com.api.browser.bean.SearchConditionGroup;
|
|
|
|
|
|
import com.api.browser.bean.SearchConditionItem;
|
|
|
|
|
|
import com.api.browser.bean.SearchConditionOption;
|
|
|
|
|
|
import com.api.browser.util.ConditionFactory;
|
|
|
|
|
|
import com.api.browser.util.ConditionType;
|
2022-04-12 10:11:53 +08:00
|
|
|
|
import com.cloudstore.eccom.constant.WeaBoolAttr;
|
|
|
|
|
|
import com.cloudstore.eccom.pc.table.WeaTable;
|
|
|
|
|
|
import com.cloudstore.eccom.pc.table.WeaTableCheckboxpopedom;
|
|
|
|
|
|
import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
|
|
|
|
|
import com.cloudstore.eccom.result.WeaResultMsg;
|
|
|
|
|
|
import com.engine.common.util.ServiceUtil;
|
|
|
|
|
|
import com.engine.core.impl.Service;
|
|
|
|
|
|
import com.engine.salary.constant.SalaryItemConstant;
|
|
|
|
|
|
import com.engine.salary.entity.salaryBill.dto.*;
|
|
|
|
|
|
import com.engine.salary.entity.salaryBill.param.*;
|
|
|
|
|
|
import com.engine.salary.entity.salaryBill.po.SalarySendPO;
|
|
|
|
|
|
import com.engine.salary.entity.salaryBill.po.SalaryTemplatePO;
|
2022-06-06 16:55:02 +08:00
|
|
|
|
import com.engine.salary.entity.salarysob.po.SalarySobPO;
|
2022-05-31 16:41:11 +08:00
|
|
|
|
import com.engine.salary.entity.taxagent.dto.TaxAgentListDTO;
|
2022-04-14 16:11:44 +08:00
|
|
|
|
import com.engine.salary.enums.UserStatusEnum;
|
2022-04-12 10:11:53 +08:00
|
|
|
|
import com.engine.salary.enums.salarybill.SalarySendStatusEnum;
|
|
|
|
|
|
import com.engine.salary.exception.SalaryRunTimeException;
|
|
|
|
|
|
import com.engine.salary.mapper.salarybill.SalarySendMapper;
|
|
|
|
|
|
import com.engine.salary.service.SalarySendService;
|
2022-06-06 16:55:02 +08:00
|
|
|
|
import com.engine.salary.service.SalarySobService;
|
2022-04-12 10:11:53 +08:00
|
|
|
|
import com.engine.salary.service.SalaryTemplateService;
|
2022-05-31 21:05:59 +08:00
|
|
|
|
import com.engine.salary.service.TaxAgentService;
|
2022-04-12 10:11:53 +08:00
|
|
|
|
import com.engine.salary.service.impl.SalarySendServiceImpl;
|
2022-06-06 16:55:02 +08:00
|
|
|
|
import com.engine.salary.service.impl.SalarySobServiceImpl;
|
2022-04-12 10:11:53 +08:00
|
|
|
|
import com.engine.salary.service.impl.SalaryTemplateServiceImpl;
|
2022-05-31 21:05:59 +08:00
|
|
|
|
import com.engine.salary.service.impl.TaxAgentServiceImpl;
|
2022-06-24 18:05:08 +08:00
|
|
|
|
import com.engine.salary.util.SalaryDateUtil;
|
2022-06-06 16:55:02 +08:00
|
|
|
|
import com.engine.salary.util.SalaryEntityUtil;
|
2022-04-12 10:11:53 +08:00
|
|
|
|
import com.engine.salary.util.SalaryI18nUtil;
|
|
|
|
|
|
import com.engine.salary.util.page.PageInfo;
|
2022-05-25 13:10:03 +08:00
|
|
|
|
import com.engine.salary.util.page.SalaryPageUtil;
|
2022-04-12 10:11:53 +08:00
|
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
2022-06-06 16:55:02 +08:00
|
|
|
|
import org.apache.commons.lang3.math.NumberUtils;
|
2022-04-12 10:11:53 +08:00
|
|
|
|
import org.apache.ibatis.session.SqlSession;
|
2022-04-14 19:32:09 +08:00
|
|
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
2022-04-12 10:11:53 +08:00
|
|
|
|
import weaver.conn.mybatis.MyBatisFactory;
|
|
|
|
|
|
import weaver.hrm.User;
|
|
|
|
|
|
|
2022-04-22 11:02:15 +08:00
|
|
|
|
import java.text.ParseException;
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
2022-04-12 10:11:53 +08:00
|
|
|
|
import java.util.*;
|
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* @Description: 工资单发放
|
|
|
|
|
|
* @Author: wangxiangzhong
|
|
|
|
|
|
* @Date: 2022/3/16 13:57
|
|
|
|
|
|
*/
|
|
|
|
|
|
public class SalarySendWrapper extends Service {
|
2022-05-31 21:05:59 +08:00
|
|
|
|
private TaxAgentService getTaxAgentService(User user) {
|
|
|
|
|
|
return ServiceUtil.getService(TaxAgentServiceImpl.class, user);
|
2022-04-12 10:11:53 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private SalarySendService getSalarySendService(User user) {
|
|
|
|
|
|
return ServiceUtil.getService(SalarySendServiceImpl.class, user);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private SalaryTemplateService getSalaryTemplateService(User user) {
|
|
|
|
|
|
return ServiceUtil.getService(SalaryTemplateServiceImpl.class, user);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2022-06-06 16:55:02 +08:00
|
|
|
|
private SalarySobService getSalarySobService(User user) {
|
|
|
|
|
|
return ServiceUtil.getService(SalarySobServiceImpl.class, user);
|
|
|
|
|
|
}
|
2022-04-12 10:11:53 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 工资单发放列表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param queryParam
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
public Map<String, Object> list(SalarySendQueryParam queryParam) {
|
2022-12-02 17:35:14 +08:00
|
|
|
|
|
|
|
|
|
|
// 处理工资单发放历史数据
|
|
|
|
|
|
getSalarySendService(user).handleHistory();
|
|
|
|
|
|
|
2022-06-06 16:55:02 +08:00
|
|
|
|
long currentEmployeeId = user.getUID();
|
|
|
|
|
|
|
2022-04-12 10:11:53 +08:00
|
|
|
|
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
|
|
|
|
|
Map<String, Object> datas = new HashMap<>(16);
|
|
|
|
|
|
try {
|
2022-06-24 18:05:08 +08:00
|
|
|
|
queryParam.setSalaryMonth(queryParam.getSalaryYearMonth().stream().map(e -> e + "-01 00:00:00").collect(Collectors.toList()));
|
|
|
|
|
|
queryParam.setSalaryMonthDate(queryParam.getSalaryYearMonth().stream().map(e -> e + "-01 00:00:00").map(SalaryDateUtil::dateStrToLocalTime).collect(Collectors.toList()));
|
2022-06-06 16:55:02 +08:00
|
|
|
|
//分权,获取当前人员管理的账套
|
|
|
|
|
|
Boolean needAuth = getTaxAgentService(user).isNeedAuth(currentEmployeeId);
|
2022-06-09 17:45:28 +08:00
|
|
|
|
List<SalarySendListDTO> list = new ArrayList<>();
|
|
|
|
|
|
if (needAuth) {
|
2022-06-06 16:55:02 +08:00
|
|
|
|
List<SalarySobPO> salarySobPOS = getSalarySobService(user).listByDisable(NumberUtils.INTEGER_ZERO);
|
|
|
|
|
|
Set<Long> salarySobIds = SalaryEntityUtil.properties(salarySobPOS, SalarySobPO::getId);
|
2022-06-09 17:45:28 +08:00
|
|
|
|
if (CollectionUtils.isNotEmpty(salarySobIds)) {
|
|
|
|
|
|
queryParam.setSalarySobIds(salarySobIds);
|
|
|
|
|
|
SalarySendMapper salarySendMapper = sqlSession.getMapper(SalarySendMapper.class);
|
|
|
|
|
|
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
|
|
|
|
|
|
list = salarySendMapper.list(queryParam);
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
|
|
|
SalarySendMapper salarySendMapper = sqlSession.getMapper(SalarySendMapper.class);
|
|
|
|
|
|
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
|
|
|
|
|
|
list = salarySendMapper.list(queryParam);
|
2022-06-06 16:55:02 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2022-04-12 10:11:53 +08:00
|
|
|
|
PageInfo<SalarySendListDTO> pageInfo = new PageInfo<>(list, SalarySendListDTO.class);
|
|
|
|
|
|
List<SalarySendListDTO> pageList = pageInfo.getList();
|
|
|
|
|
|
List<Long> salarySobIds = pageList.stream().map(SalarySendListDTO::getSalarySobId).distinct().collect(Collectors.toList());
|
|
|
|
|
|
// 获取默认模板
|
2022-06-09 17:45:28 +08:00
|
|
|
|
if (salarySobIds.size() > 0) {
|
2022-04-14 16:11:44 +08:00
|
|
|
|
List<SalaryTemplatePO> salaryTemplates = getSalaryTemplateService(user).getDefaultTemplates(salarySobIds);
|
|
|
|
|
|
pageList.forEach(e -> {
|
|
|
|
|
|
// 已发放
|
|
|
|
|
|
e.setSendSituation(e.getSendNum() + "/" + e.getSendTotal());
|
|
|
|
|
|
// 工资单模板
|
|
|
|
|
|
Optional<SalaryTemplatePO> optional = salaryTemplates.stream().filter(s -> s.getSalarySobId().equals(e.getSalarySobId())).findFirst();
|
|
|
|
|
|
if (optional.isPresent()) {
|
|
|
|
|
|
e.setTemplate(optional.get().getName());
|
|
|
|
|
|
e.setTemplateId(optional.get().getId());
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
2022-04-12 10:11:53 +08:00
|
|
|
|
|
|
|
|
|
|
List<WeaTableColumn> columns = buildWeaTableColumns();
|
|
|
|
|
|
WeaTable table = new WeaTable();
|
|
|
|
|
|
table.setColumns(columns);
|
|
|
|
|
|
//设置check是否可用
|
|
|
|
|
|
List<WeaTableCheckboxpopedom> checkboxpopedomList = new ArrayList<>();
|
|
|
|
|
|
WeaTableCheckboxpopedom checkboxpopedom = new WeaTableCheckboxpopedom();
|
|
|
|
|
|
checkboxpopedom.setPopedompara("column:system_type");
|
|
|
|
|
|
checkboxpopedom.setShowmethod("com.engine.salary.transmethod.TaxRateTransMethod.getCheckBoxPopedom");
|
|
|
|
|
|
checkboxpopedomList.add(checkboxpopedom);
|
|
|
|
|
|
table.setCheckboxList(checkboxpopedomList);
|
|
|
|
|
|
table.setCheckboxpopedom(null);
|
|
|
|
|
|
|
|
|
|
|
|
WeaResultMsg result = new WeaResultMsg(false);
|
|
|
|
|
|
result.putAll(table.makeDataResult());
|
|
|
|
|
|
result.success();
|
|
|
|
|
|
|
|
|
|
|
|
datas.put("pageInfo", pageInfo);
|
|
|
|
|
|
datas.put("datas", pageList);
|
|
|
|
|
|
datas.put("columns", columns);
|
2022-06-09 17:45:28 +08:00
|
|
|
|
datas.put("dataKey", result.getResultMap());
|
2022-04-12 10:11:53 +08:00
|
|
|
|
return datas;
|
2022-06-09 17:45:28 +08:00
|
|
|
|
} catch (Exception e) {
|
2022-04-14 16:11:44 +08:00
|
|
|
|
throw new SalaryRunTimeException(e.getMessage());
|
|
|
|
|
|
} finally {
|
2022-04-12 10:11:53 +08:00
|
|
|
|
sqlSession.close();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 创建表展示字段
|
2022-06-09 17:45:28 +08:00
|
|
|
|
*
|
2022-04-12 10:11:53 +08:00
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
private List<WeaTableColumn> buildWeaTableColumns() {
|
|
|
|
|
|
List<WeaTableColumn> list = new ArrayList<>();
|
|
|
|
|
|
WeaTableColumn idColumn = new WeaTableColumn("0px", "id", "id");
|
|
|
|
|
|
idColumn.setDisplay(WeaBoolAttr.FALSE);
|
2022-06-09 17:45:28 +08:00
|
|
|
|
list.add(new WeaTableColumn("10%", "薪资所属月", "salaryYearMonth"));
|
|
|
|
|
|
list.add(new WeaTableColumn("35%", "薪资账套", "salarySob"));
|
|
|
|
|
|
list.add(new WeaTableColumn("25%", "工资单模板", "template"));
|
|
|
|
|
|
list.add(new WeaTableColumn("15%", "已发放", "sendSituation"));
|
|
|
|
|
|
list.add(new WeaTableColumn("15%", "最后发送时间", "lastSendTime"));
|
2022-04-12 10:11:53 +08:00
|
|
|
|
return list;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 工资单发放基本信息
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param id
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
public SalarySendBaseInfoDTO getBaseInfo(Long id) {
|
|
|
|
|
|
return getSalarySendService(user).getBaseInfo(id);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 工资单发放信息列表的高级搜索
|
|
|
|
|
|
*
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2022-04-14 16:11:44 +08:00
|
|
|
|
public Map<String, Object> getInfoSearchCondition() {
|
|
|
|
|
|
Map<String, Object> apidatas = new HashMap<String, Object>();
|
|
|
|
|
|
ConditionFactory conditionFactory = new ConditionFactory(user);
|
|
|
|
|
|
|
|
|
|
|
|
//条件组
|
|
|
|
|
|
List<SearchConditionGroup> addGroups = new ArrayList<SearchConditionGroup>();
|
|
|
|
|
|
List<SearchConditionItem> conditionItems = new ArrayList<SearchConditionItem>();
|
|
|
|
|
|
|
|
|
|
|
|
//文本输入框
|
2022-06-09 17:45:28 +08:00
|
|
|
|
SearchConditionItem username = conditionFactory.createCondition(ConditionType.INPUT, 25034, "username");
|
2022-04-14 16:11:44 +08:00
|
|
|
|
username.setColSpan(2);//定义一行显示条件数,默认值为2,当值为1时标识该条件单独占一行
|
2022-06-09 17:45:28 +08:00
|
|
|
|
username.setFieldcol(16); //条件输入框所占宽度,默认值18
|
2022-04-14 16:11:44 +08:00
|
|
|
|
username.setLabelcol(8);
|
|
|
|
|
|
username.setViewAttr(2); // 编辑权限 1:只读,2:可编辑, 3:必填 默认2
|
|
|
|
|
|
username.setLabel("姓名"); //设置文本值 这个将覆盖多语言标签的值
|
2022-04-18 09:19:07 +08:00
|
|
|
|
username.setInputType("");
|
2022-04-14 16:11:44 +08:00
|
|
|
|
conditionItems.add(username);
|
|
|
|
|
|
|
|
|
|
|
|
// 个税扣缴义务人
|
2022-06-09 17:45:28 +08:00
|
|
|
|
SearchConditionItem taxAgent = conditionFactory.createCondition(ConditionType.SELECT, 25034, "taxAgent");
|
2022-04-14 16:11:44 +08:00
|
|
|
|
taxAgent.setColSpan(2);//定义一行显示条件数,默认值为2,当值为1时标识该条件单独占一行
|
2022-06-09 17:45:28 +08:00
|
|
|
|
taxAgent.setFieldcol(16); //条件输入框所占宽度,默认值18
|
2022-04-14 16:11:44 +08:00
|
|
|
|
taxAgent.setLabelcol(8);
|
|
|
|
|
|
List<SearchConditionOption> searchConditionOptions = new ArrayList<>();
|
2022-05-31 16:41:11 +08:00
|
|
|
|
Collection<TaxAgentListDTO> taxAgentLists = getTaxAgentService(user).findAll();
|
2022-04-14 16:11:44 +08:00
|
|
|
|
taxAgentLists.forEach(e -> searchConditionOptions.add(new SearchConditionOption(e.getId().toString(), e.getName())));
|
|
|
|
|
|
taxAgent.setOptions(searchConditionOptions);
|
2022-04-18 09:19:07 +08:00
|
|
|
|
taxAgent.setInputType("");
|
2022-04-14 16:11:44 +08:00
|
|
|
|
taxAgent.setViewAttr(2); // 编辑权限 1:只读,2:可编辑, 3:必填 默认2
|
|
|
|
|
|
taxAgent.setLabel("个税扣缴义务人"); //设置文本值 这个将覆盖多语言标签的值
|
|
|
|
|
|
conditionItems.add(taxAgent);
|
|
|
|
|
|
|
|
|
|
|
|
// 部门
|
2022-06-09 17:45:28 +08:00
|
|
|
|
SearchConditionItem departmentName = conditionFactory.createCondition(ConditionType.BROWSER, 502227, "department", "4");
|
2022-04-14 16:11:44 +08:00
|
|
|
|
departmentName.setColSpan(2);
|
2022-06-02 10:34:24 +08:00
|
|
|
|
departmentName.setFieldcol(16);
|
2022-04-14 16:11:44 +08:00
|
|
|
|
departmentName.setLabelcol(8);
|
|
|
|
|
|
departmentName.setViewAttr(2);
|
|
|
|
|
|
departmentName.setIsQuickSearch(false);
|
|
|
|
|
|
departmentName.setLabel("部门");
|
2022-04-18 09:19:07 +08:00
|
|
|
|
departmentName.setInputType("");
|
2022-04-14 16:11:44 +08:00
|
|
|
|
conditionItems.add(departmentName);
|
|
|
|
|
|
|
|
|
|
|
|
// 岗位
|
2022-06-09 17:45:28 +08:00
|
|
|
|
SearchConditionItem position = conditionFactory.createCondition(ConditionType.BROWSER, 502227, "position", "24");
|
2022-04-14 16:11:44 +08:00
|
|
|
|
position.setColSpan(2);
|
2022-06-02 10:34:24 +08:00
|
|
|
|
position.setFieldcol(16);
|
2022-04-14 16:11:44 +08:00
|
|
|
|
position.setLabelcol(8);
|
|
|
|
|
|
position.setViewAttr(2);
|
|
|
|
|
|
position.setIsQuickSearch(false);
|
|
|
|
|
|
position.setLabel("岗位");
|
2022-04-18 09:19:07 +08:00
|
|
|
|
position.setInputType("");
|
2022-04-14 16:11:44 +08:00
|
|
|
|
conditionItems.add(position);
|
|
|
|
|
|
|
|
|
|
|
|
//状态
|
2022-09-29 10:28:46 +08:00
|
|
|
|
SearchConditionItem status = conditionFactory.createCondition(ConditionType.SELECT, 25034, "userstatus");
|
2022-04-14 16:11:44 +08:00
|
|
|
|
status.setColSpan(2);//定义一行显示条件数,默认值为2,当值为1时标识该条件单独占一行
|
2022-06-09 17:45:28 +08:00
|
|
|
|
status.setFieldcol(16); //条件输入框所占宽度,默认值18
|
2022-04-14 16:11:44 +08:00
|
|
|
|
status.setLabelcol(8);
|
|
|
|
|
|
List<SearchConditionOption> userStatusOptions = new ArrayList<>();
|
|
|
|
|
|
UserStatusEnum.getList().forEach(e -> userStatusOptions.add(new SearchConditionOption(e.get("id"), e.get("content"))));
|
|
|
|
|
|
status.setOptions(userStatusOptions);
|
2022-04-18 09:19:07 +08:00
|
|
|
|
status.setInputType("");
|
2022-04-14 16:11:44 +08:00
|
|
|
|
status.setViewAttr(2); // 编辑权限 1:只读,2:可编辑, 3:必填 默认2
|
|
|
|
|
|
status.setLabel("状态"); //设置文本值 这个将覆盖多语言标签的值
|
|
|
|
|
|
conditionItems.add(status);
|
|
|
|
|
|
|
2022-09-29 10:28:46 +08:00
|
|
|
|
// //入职日期
|
|
|
|
|
|
// SearchConditionItem hiredate = conditionFactory.createCondition(ConditionType.RANGEPICKER, 25034, "hiredate");
|
|
|
|
|
|
// hiredate.setColSpan(2);//定义一行显示条件数,默认值为2,当值为1时标识该条件单独占一行
|
|
|
|
|
|
// hiredate.setFieldcol(16); //条件输入框所占宽度,默认值18
|
|
|
|
|
|
// hiredate.setLabelcol(8);
|
|
|
|
|
|
// hiredate.setViewAttr(2); // 编辑权限 1:只读,2:可编辑, 3:必填 默认2
|
|
|
|
|
|
// Map<String, Object> otherParams1 = new HashMap<String, Object>();
|
|
|
|
|
|
// otherParams1.put("format", "yyyy-MM-dd");
|
|
|
|
|
|
// hiredate.setOtherParams(otherParams1);
|
|
|
|
|
|
// hiredate.setInputType("day");
|
|
|
|
|
|
// hiredate.setMode("day");
|
|
|
|
|
|
// hiredate.setLabel("入职日期"); //设置文本值 这个将覆盖多语言标签的值
|
|
|
|
|
|
// conditionItems.add(hiredate);
|
2022-04-14 16:11:44 +08:00
|
|
|
|
|
2022-04-14 19:32:09 +08:00
|
|
|
|
//发送状态
|
|
|
|
|
|
SearchConditionItem sendStatus = conditionFactory.createCondition(ConditionType.SELECT, 25034, "sendStatus");
|
|
|
|
|
|
sendStatus.setColSpan(2);//定义一行显示条件数,默认值为2,当值为1时标识该条件单独占一行
|
2022-06-09 17:45:28 +08:00
|
|
|
|
sendStatus.setFieldcol(16); //条件输入框所占宽度,默认值18
|
2022-04-14 19:32:09 +08:00
|
|
|
|
sendStatus.setLabelcol(8);
|
|
|
|
|
|
List<SearchConditionOption> sendStatusOptions = new ArrayList<>();
|
|
|
|
|
|
UserStatusEnum.getList().forEach(e -> sendStatusOptions.add(new SearchConditionOption(e.get("id"), e.get("content"))));
|
|
|
|
|
|
status.setOptions(sendStatusOptions);
|
2022-04-18 09:19:07 +08:00
|
|
|
|
status.setInputType("");
|
2022-04-14 19:32:09 +08:00
|
|
|
|
sendStatus.setViewAttr(2); // 编辑权限 1:只读,2:可编辑, 3:必填 默认2
|
|
|
|
|
|
sendStatus.setLabel("发送状态"); //设置文本值 这个将覆盖多语言标签的值
|
|
|
|
|
|
conditionItems.add(sendStatus);
|
2022-04-14 16:11:44 +08:00
|
|
|
|
|
2022-06-09 17:45:28 +08:00
|
|
|
|
addGroups.add(new SearchConditionGroup("常用条件", true, conditionItems));
|
2022-04-14 16:11:44 +08:00
|
|
|
|
|
2022-06-09 17:45:28 +08:00
|
|
|
|
apidatas.put("condition", addGroups);
|
2022-04-14 16:11:44 +08:00
|
|
|
|
return apidatas;
|
|
|
|
|
|
}
|
2022-04-12 10:11:53 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 工资单发放信息列表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param queryParam
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2022-06-22 19:26:05 +08:00
|
|
|
|
public PageInfo<SalarySendInfoListDTO> infoList(SalarySendInfoQueryParam queryParam) {
|
2022-04-12 10:11:53 +08:00
|
|
|
|
|
|
|
|
|
|
SalarySendInfoQueryParam.checkParam(queryParam);
|
|
|
|
|
|
// 发送状态
|
|
|
|
|
|
if (queryParam.getSendStatus() != null) {
|
|
|
|
|
|
queryParam.setSendStatusVal(queryParam.getSendStatus().getValue());
|
|
|
|
|
|
}
|
2022-06-22 19:26:05 +08:00
|
|
|
|
|
2022-04-12 10:11:53 +08:00
|
|
|
|
PageInfo<SalarySendInfoListDTO> pageInfo = getSalarySendService(user).salarySendInfoListPage(queryParam);
|
|
|
|
|
|
List<SalarySendInfoListDTO> list = pageInfo.getList();
|
|
|
|
|
|
list.forEach(e -> {
|
|
|
|
|
|
// 发放状态
|
|
|
|
|
|
int sendStatus = Integer.parseInt(e.getSendStatus());
|
|
|
|
|
|
e.setSendStatus(SalarySendStatusEnum.getDefaultLabelByValue(sendStatus));
|
2022-06-22 19:26:05 +08:00
|
|
|
|
// e.setOperation(SalarySendStatusEnum.getNameByValue(sendStatus));
|
2022-04-12 10:11:53 +08:00
|
|
|
|
});
|
|
|
|
|
|
|
2022-06-22 19:26:05 +08:00
|
|
|
|
return pageInfo;
|
2022-04-12 10:11:53 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 工资单信息列表
|
2022-06-09 17:45:28 +08:00
|
|
|
|
*
|
2022-04-12 10:11:53 +08:00
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
private List<WeaTableColumn> buildInfoListWeaTableColumns() {
|
|
|
|
|
|
List<WeaTableColumn> list = new ArrayList<>();
|
|
|
|
|
|
WeaTableColumn idColumn = new WeaTableColumn("0px", "id", "id");
|
|
|
|
|
|
idColumn.setDisplay(WeaBoolAttr.TRUE);
|
2022-06-09 17:45:28 +08:00
|
|
|
|
list.add(new WeaTableColumn("20%", "姓名", "username"));
|
|
|
|
|
|
list.add(new WeaTableColumn("20%", "个税扣缴义务人", "taxAgent"));
|
|
|
|
|
|
list.add(new WeaTableColumn("20%", "部门", "department"));
|
|
|
|
|
|
list.add(new WeaTableColumn("20%", "手机号", "mobile"));
|
|
|
|
|
|
list.add(new WeaTableColumn("20%", "工号", "jobNum"));
|
|
|
|
|
|
list.add(new WeaTableColumn("20%", "发送状态", "sendStatus"));
|
|
|
|
|
|
list.add(new WeaTableColumn("20%", "操作", "operation"));
|
2022-04-12 10:11:53 +08:00
|
|
|
|
return list;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 导出-工资单发放信息列表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param queryParam
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2022-04-14 19:32:09 +08:00
|
|
|
|
public XSSFWorkbook exportInfoList(SalarySendInfoQueryParam queryParam) {
|
|
|
|
|
|
return getSalarySendService(user).exportInfoList(queryParam);
|
2022-04-14 16:11:44 +08:00
|
|
|
|
}
|
2022-04-12 10:11:53 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 工资单发放
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param queryParam
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2022-04-14 19:32:09 +08:00
|
|
|
|
public Map<String, Object> grant(SalarySendGrantParam queryParam) {
|
2022-04-12 10:11:53 +08:00
|
|
|
|
return getSalarySendService(user).grant(queryParam);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 工资单撤回
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param queryParam
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2022-04-14 19:32:09 +08:00
|
|
|
|
public Map<String, Object> withdraw(SalarySendWithdrawParam queryParam) {
|
2022-04-12 10:11:53 +08:00
|
|
|
|
return getSalarySendService(user).withdraw(queryParam);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 工资单发放详情列表的高级搜索
|
|
|
|
|
|
*
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2022-04-14 19:32:09 +08:00
|
|
|
|
public Map<String, Object> getDetailSearchCondition() {
|
|
|
|
|
|
Map<String, Object> apidatas = new HashMap<String, Object>();
|
|
|
|
|
|
ConditionFactory conditionFactory = new ConditionFactory(user);
|
|
|
|
|
|
|
|
|
|
|
|
//条件组
|
|
|
|
|
|
List<SearchConditionGroup> addGroups = new ArrayList<SearchConditionGroup>();
|
|
|
|
|
|
List<SearchConditionItem> conditionItems = new ArrayList<SearchConditionItem>();
|
|
|
|
|
|
|
|
|
|
|
|
//文本输入框
|
2022-06-09 17:45:28 +08:00
|
|
|
|
SearchConditionItem username = conditionFactory.createCondition(ConditionType.INPUT, 25034, "username");
|
2022-04-14 19:32:09 +08:00
|
|
|
|
username.setColSpan(2);//定义一行显示条件数,默认值为2,当值为1时标识该条件单独占一行
|
2022-06-09 17:45:28 +08:00
|
|
|
|
username.setFieldcol(16); //条件输入框所占宽度,默认值18
|
2022-04-14 19:32:09 +08:00
|
|
|
|
username.setLabelcol(8);
|
|
|
|
|
|
username.setViewAttr(2); // 编辑权限 1:只读,2:可编辑, 3:必填 默认2
|
|
|
|
|
|
username.setLabel("姓名"); //设置文本值 这个将覆盖多语言标签的值
|
2022-04-18 09:19:07 +08:00
|
|
|
|
username.setInputType("");
|
2022-04-14 19:32:09 +08:00
|
|
|
|
conditionItems.add(username);
|
|
|
|
|
|
|
|
|
|
|
|
// 个税扣缴义务人
|
2022-06-09 17:45:28 +08:00
|
|
|
|
SearchConditionItem taxAgent = conditionFactory.createCondition(ConditionType.SELECT, 25034, "taxAgent");
|
2022-04-14 19:32:09 +08:00
|
|
|
|
taxAgent.setColSpan(2);//定义一行显示条件数,默认值为2,当值为1时标识该条件单独占一行
|
2022-06-09 17:45:28 +08:00
|
|
|
|
taxAgent.setFieldcol(16); //条件输入框所占宽度,默认值18
|
2022-04-14 19:32:09 +08:00
|
|
|
|
taxAgent.setLabelcol(8);
|
|
|
|
|
|
List<SearchConditionOption> searchConditionOptions = new ArrayList<>();
|
2022-05-31 16:41:11 +08:00
|
|
|
|
Collection<TaxAgentListDTO> taxAgentLists = getTaxAgentService(user).findAll();
|
2022-04-14 19:32:09 +08:00
|
|
|
|
taxAgentLists.forEach(e -> searchConditionOptions.add(new SearchConditionOption(e.getId().toString(), e.getName())));
|
|
|
|
|
|
taxAgent.setOptions(searchConditionOptions);
|
2022-04-18 09:19:07 +08:00
|
|
|
|
taxAgent.setInputType("");
|
2022-04-14 19:32:09 +08:00
|
|
|
|
taxAgent.setViewAttr(2); // 编辑权限 1:只读,2:可编辑, 3:必填 默认2
|
|
|
|
|
|
taxAgent.setLabel("个税扣缴义务人"); //设置文本值 这个将覆盖多语言标签的值
|
|
|
|
|
|
conditionItems.add(taxAgent);
|
|
|
|
|
|
|
|
|
|
|
|
// 部门
|
2022-06-09 17:45:28 +08:00
|
|
|
|
SearchConditionItem departmentName = conditionFactory.createCondition(ConditionType.BROWSER, 502227, "department", "4");
|
2022-04-14 19:32:09 +08:00
|
|
|
|
departmentName.setColSpan(2);
|
2022-06-02 10:34:24 +08:00
|
|
|
|
departmentName.setFieldcol(16);
|
2022-04-14 19:32:09 +08:00
|
|
|
|
departmentName.setLabelcol(8);
|
|
|
|
|
|
departmentName.setViewAttr(2);
|
2022-04-18 09:19:07 +08:00
|
|
|
|
departmentName.setInputType("");
|
2022-04-14 19:32:09 +08:00
|
|
|
|
departmentName.setIsQuickSearch(false);
|
|
|
|
|
|
departmentName.setLabel("部门");
|
|
|
|
|
|
conditionItems.add(departmentName);
|
|
|
|
|
|
|
|
|
|
|
|
// 岗位
|
2022-06-09 17:45:28 +08:00
|
|
|
|
SearchConditionItem position = conditionFactory.createCondition(ConditionType.BROWSER, 502227, "position", "24");
|
2022-04-14 19:32:09 +08:00
|
|
|
|
position.setColSpan(2);
|
2022-06-02 10:34:24 +08:00
|
|
|
|
position.setFieldcol(16);
|
2022-04-18 09:19:07 +08:00
|
|
|
|
position.setInputType("");
|
2022-04-14 19:32:09 +08:00
|
|
|
|
position.setLabelcol(8);
|
|
|
|
|
|
position.setViewAttr(2);
|
|
|
|
|
|
position.setIsQuickSearch(false);
|
|
|
|
|
|
position.setLabel("岗位");
|
|
|
|
|
|
conditionItems.add(position);
|
|
|
|
|
|
|
|
|
|
|
|
//状态
|
2022-09-29 10:28:46 +08:00
|
|
|
|
SearchConditionItem status = conditionFactory.createCondition(ConditionType.SELECT, 25034, "userstatus");
|
2022-04-14 19:32:09 +08:00
|
|
|
|
status.setColSpan(2);//定义一行显示条件数,默认值为2,当值为1时标识该条件单独占一行
|
2022-06-09 17:45:28 +08:00
|
|
|
|
status.setFieldcol(16); //条件输入框所占宽度,默认值18
|
2022-04-14 19:32:09 +08:00
|
|
|
|
status.setLabelcol(8);
|
|
|
|
|
|
List<SearchConditionOption> userStatusOptions = new ArrayList<>();
|
|
|
|
|
|
UserStatusEnum.getList().forEach(e -> userStatusOptions.add(new SearchConditionOption(e.get("id"), e.get("content"))));
|
|
|
|
|
|
status.setOptions(userStatusOptions);
|
2022-04-18 09:19:07 +08:00
|
|
|
|
status.setInputType("");
|
2022-04-14 19:32:09 +08:00
|
|
|
|
status.setViewAttr(2); // 编辑权限 1:只读,2:可编辑, 3:必填 默认2
|
|
|
|
|
|
status.setLabel("状态"); //设置文本值 这个将覆盖多语言标签的值
|
|
|
|
|
|
conditionItems.add(status);
|
|
|
|
|
|
|
2022-09-29 10:28:46 +08:00
|
|
|
|
// //入职日期
|
|
|
|
|
|
// SearchConditionItem hiredate = conditionFactory.createCondition(ConditionType.RANGEPICKER, 25034, "hiredate");
|
|
|
|
|
|
// hiredate.setColSpan(2);//定义一行显示条件数,默认值为2,当值为1时标识该条件单独占一行
|
|
|
|
|
|
// hiredate.setFieldcol(16); //条件输入框所占宽度,默认值18
|
|
|
|
|
|
// hiredate.setLabelcol(8);
|
|
|
|
|
|
// hiredate.setViewAttr(2); // 编辑权限 1:只读,2:可编辑, 3:必填 默认2
|
|
|
|
|
|
// Map<String, Object> otherParams1 = new HashMap<String, Object>();
|
|
|
|
|
|
// otherParams1.put("format", "yyyy-MM-dd");
|
|
|
|
|
|
// hiredate.setOtherParams(otherParams1);
|
|
|
|
|
|
// hiredate.setInputType("day");
|
|
|
|
|
|
// hiredate.setMode("day");
|
|
|
|
|
|
// hiredate.setLabel("入职日期"); //设置文本值 这个将覆盖多语言标签的值
|
|
|
|
|
|
// conditionItems.add(hiredate);
|
2022-04-14 19:32:09 +08:00
|
|
|
|
|
|
|
|
|
|
//合并计税
|
|
|
|
|
|
SearchConditionItem mergeCountTax = conditionFactory.createCondition(ConditionType.CHECKBOX, 25034, "mergeCountTax");
|
|
|
|
|
|
mergeCountTax.setColSpan(2);//定义一行显示条件数,默认值为2,当值为1时标识该条件单独占一行
|
2022-06-09 17:45:28 +08:00
|
|
|
|
mergeCountTax.setFieldcol(16); //条件输入框所占宽度,默认值18
|
2022-04-14 19:32:09 +08:00
|
|
|
|
mergeCountTax.setLabelcol(8);
|
2022-04-18 09:19:07 +08:00
|
|
|
|
mergeCountTax.setInputType("switch");
|
2022-04-14 19:32:09 +08:00
|
|
|
|
mergeCountTax.setViewAttr(2); // 编辑权限 1:只读,2:可编辑, 3:必填 默认2
|
|
|
|
|
|
mergeCountTax.setLabel("合并计税"); //设置文本值 这个将覆盖多语言标签的值
|
|
|
|
|
|
conditionItems.add(mergeCountTax);
|
|
|
|
|
|
|
2022-06-09 17:45:28 +08:00
|
|
|
|
addGroups.add(new SearchConditionGroup("常用条件", true, conditionItems));
|
2022-04-14 19:32:09 +08:00
|
|
|
|
|
2022-06-09 17:45:28 +08:00
|
|
|
|
apidatas.put("condition", addGroups);
|
2022-04-14 19:32:09 +08:00
|
|
|
|
return apidatas;
|
|
|
|
|
|
}
|
2022-04-12 10:11:53 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 工资单发放详情列表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param queryParam
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
public Map<String, Object> detailList(SalarySendDetailQueryParam queryParam) {
|
|
|
|
|
|
Map<String, Object> datas = new HashMap<>();
|
|
|
|
|
|
SalarySendDetailQueryParam.checkParam(queryParam);
|
|
|
|
|
|
SalarySendPO salarySend = getSalarySendService(user).getById(queryParam.getSalarySendId());
|
|
|
|
|
|
|
|
|
|
|
|
if (salarySend == null) {
|
|
|
|
|
|
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100510, "工资发放不存在"));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 1.根据模板获取薪资项目设置
|
|
|
|
|
|
List<SalaryTemplatePO> salaryTemplates = getSalaryTemplateService(user).getDefaultTemplates(Collections.singletonList(salarySend.getSalarySobId()));
|
|
|
|
|
|
List<SalaryTemplateSalaryItemListDTO> salaryItems = getSalarySendService(user).getSalaryItemsSetting(CollectionUtils.isNotEmpty(salaryTemplates) ? salaryTemplates.get(0) : null);
|
|
|
|
|
|
|
|
|
|
|
|
// 2.获取基本数据
|
|
|
|
|
|
PageInfo<SalarySendDetailListDTO> pageInfo = getSalarySendService(user).salarySendInfoDetailListPage(queryParam);
|
|
|
|
|
|
|
|
|
|
|
|
List<SalarySendDetailListDTO> records = pageInfo.getList();
|
|
|
|
|
|
// 3.组装详情数据
|
|
|
|
|
|
List<Map<String, Object>> listMaps = getSalarySendService(user).buildDetailList(salaryItems, records, salarySend.getSalaryAccountingId());
|
|
|
|
|
|
|
2022-11-02 17:20:34 +08:00
|
|
|
|
// List<Long> employeeIds = records.stream().map(SalarySendDetailListDTO::getEmployeeId).collect(Collectors.toList());
|
2022-04-12 10:11:53 +08:00
|
|
|
|
|
|
|
|
|
|
// 是否合并计税
|
|
|
|
|
|
// TODO: 1/25/22 判断是否合并计税
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<WeaTableColumn> columns = buildDetailListWeaTableColumns();
|
|
|
|
|
|
|
2022-04-18 09:19:07 +08:00
|
|
|
|
for (SalaryTemplateSalaryItemListDTO salaryItem : salaryItems) {
|
2022-06-01 14:53:16 +08:00
|
|
|
|
columns.add(new WeaTableColumn("100px", salaryItem.getName(), salaryItem.getId() + SalaryItemConstant.DYNAMIC_SUFFIX));
|
2022-04-18 09:19:07 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2022-04-12 10:11:53 +08:00
|
|
|
|
|
|
|
|
|
|
WeaTable table = new WeaTable();
|
|
|
|
|
|
table.setColumns(columns);
|
|
|
|
|
|
//设置check是否可用
|
|
|
|
|
|
List<WeaTableCheckboxpopedom> checkboxpopedomList = new ArrayList<>();
|
|
|
|
|
|
WeaTableCheckboxpopedom checkboxpopedom = new WeaTableCheckboxpopedom();
|
|
|
|
|
|
checkboxpopedom.setPopedompara("column:system_type");
|
|
|
|
|
|
checkboxpopedom.setShowmethod("com.engine.salary.transmethod.TaxRateTransMethod.getCheckBoxPopedom");
|
|
|
|
|
|
checkboxpopedomList.add(checkboxpopedom);
|
|
|
|
|
|
table.setCheckboxList(checkboxpopedomList);
|
|
|
|
|
|
table.setCheckboxpopedom(null);
|
|
|
|
|
|
|
|
|
|
|
|
WeaResultMsg result = new WeaResultMsg(false);
|
|
|
|
|
|
result.putAll(table.makeDataResult());
|
|
|
|
|
|
result.success();
|
|
|
|
|
|
|
|
|
|
|
|
datas.put("pageInfo", pageInfo);
|
2022-06-01 14:53:16 +08:00
|
|
|
|
datas.put("datas", listMaps);
|
2022-06-09 17:45:28 +08:00
|
|
|
|
datas.put("columns", columns);
|
|
|
|
|
|
datas.put("dataKey", result.getResultMap());
|
2022-04-12 10:11:53 +08:00
|
|
|
|
|
|
|
|
|
|
return datas;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private List<WeaTableColumn> buildDetailListWeaTableColumns() {
|
|
|
|
|
|
List<WeaTableColumn> list = new ArrayList<>();
|
|
|
|
|
|
WeaTableColumn idColumn = new WeaTableColumn("0px", "id", "id");
|
|
|
|
|
|
idColumn.setDisplay(WeaBoolAttr.TRUE);
|
2022-06-09 17:45:28 +08:00
|
|
|
|
list.add(new WeaTableColumn("100px", "姓名", "username"));
|
|
|
|
|
|
list.add(new WeaTableColumn("100px", "个税扣缴义务人", "taxAgent"));
|
|
|
|
|
|
list.add(new WeaTableColumn("100px", "部门", "department"));
|
|
|
|
|
|
list.add(new WeaTableColumn("100px", "手机号", "mobile"));
|
|
|
|
|
|
list.add(new WeaTableColumn("100px", "工号", "jobNum"));
|
2022-04-12 10:11:53 +08:00
|
|
|
|
return list;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 导出-工资单发放详情列表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param queryParam
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2022-04-14 19:32:09 +08:00
|
|
|
|
public XSSFWorkbook exportDetailList(SalarySendDetailQueryParam queryParam) {
|
2022-04-12 10:11:53 +08:00
|
|
|
|
// 获取发放详情
|
2022-04-14 19:32:09 +08:00
|
|
|
|
SalarySendDetailQueryParam.checkParam(queryParam);
|
|
|
|
|
|
|
|
|
|
|
|
SalarySendPO salarySend = getSalarySendService(user).getById(queryParam.getSalarySendId());
|
|
|
|
|
|
if (salarySend == null) {
|
|
|
|
|
|
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100512, "工资单发放不存在"));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return getSalarySendService(user).exportDetailList(salarySend, queryParam);
|
2022-04-12 10:11:53 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 我的工资单列表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param queryParam
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
public Map<String, Object> mySalaryBillList(SalaryBillQueryParam queryParam) {
|
|
|
|
|
|
Map<String, Object> datas = new HashMap<>();
|
2022-06-09 17:45:28 +08:00
|
|
|
|
queryParam.setEmployeeId((long) user.getUID());
|
2022-04-22 11:02:15 +08:00
|
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
2022-04-12 10:11:53 +08:00
|
|
|
|
queryParam.setSalaryMonth(
|
2022-04-22 11:02:15 +08:00
|
|
|
|
queryParam.getSalaryYearMonth().stream().map(e -> {
|
|
|
|
|
|
try {
|
|
|
|
|
|
return simpleDateFormat.parse(e + "-01");
|
|
|
|
|
|
} catch (ParseException parseException) {
|
|
|
|
|
|
throw new SalaryRunTimeException("日期转换错误");
|
|
|
|
|
|
}
|
|
|
|
|
|
}).collect(Collectors.toList()));
|
2022-04-12 10:11:53 +08:00
|
|
|
|
PageInfo<SalaryMySalaryBillListDTO> pageInfo = getSalarySendService(user).mySalaryBillListPage(queryParam);
|
|
|
|
|
|
List<SalaryMySalaryBillListDTO> records = pageInfo.getList();
|
|
|
|
|
|
|
|
|
|
|
|
records.forEach(e -> {
|
|
|
|
|
|
e.setTaxAgent(StringUtils.isEmpty(e.getTaxAgent()) ? "" : e.getTaxAgent());
|
|
|
|
|
|
e.setAcctTimes(e.getAcctTimes());
|
|
|
|
|
|
});
|
|
|
|
|
|
List<WeaTableColumn> columns = buildMySalaryBillListColumns();
|
|
|
|
|
|
WeaTable table = new WeaTable();
|
|
|
|
|
|
table.setColumns(columns);
|
|
|
|
|
|
//设置check是否可用
|
|
|
|
|
|
List<WeaTableCheckboxpopedom> checkboxpopedomList = new ArrayList<>();
|
|
|
|
|
|
WeaTableCheckboxpopedom checkboxpopedom = new WeaTableCheckboxpopedom();
|
|
|
|
|
|
checkboxpopedom.setPopedompara("column:system_type");
|
|
|
|
|
|
checkboxpopedom.setShowmethod("com.engine.salary.transmethod.TaxRateTransMethod.getCheckBoxPopedom");
|
|
|
|
|
|
checkboxpopedomList.add(checkboxpopedom);
|
|
|
|
|
|
table.setCheckboxList(checkboxpopedomList);
|
|
|
|
|
|
table.setCheckboxpopedom(null);
|
|
|
|
|
|
|
|
|
|
|
|
WeaResultMsg result = new WeaResultMsg(false);
|
|
|
|
|
|
result.putAll(table.makeDataResult());
|
|
|
|
|
|
result.success();
|
|
|
|
|
|
|
|
|
|
|
|
datas.put("pageInfo", pageInfo);
|
|
|
|
|
|
datas.put("datas", records);
|
2022-06-09 17:45:28 +08:00
|
|
|
|
datas.put("columns", columns);
|
|
|
|
|
|
datas.put("dataKey", result.getResultMap());
|
2022-04-12 10:11:53 +08:00
|
|
|
|
|
|
|
|
|
|
return datas;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private List<WeaTableColumn> buildMySalaryBillListColumns() {
|
|
|
|
|
|
List<WeaTableColumn> list = new ArrayList<>();
|
|
|
|
|
|
WeaTableColumn idColumn = new WeaTableColumn("0px", "id", "id");
|
|
|
|
|
|
idColumn.setDisplay(WeaBoolAttr.TRUE);
|
2022-06-09 17:45:28 +08:00
|
|
|
|
list.add(new WeaTableColumn("20%", "薪资所属月", "salaryYearMonth"));
|
|
|
|
|
|
list.add(new WeaTableColumn("40%", "个税扣缴义务人", "taxAgent"));
|
|
|
|
|
|
list.add(new WeaTableColumn("40%", "发放时间", "sendTime"));
|
2022-04-12 10:11:53 +08:00
|
|
|
|
return list;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 我的工资单
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param salaryInfoId
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
public Map<String, Object> mySalaryBill(Long salaryInfoId) {
|
|
|
|
|
|
return getSalarySendService(user).mySalaryBill(salaryInfoId, (long) user.getUID());
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|