fix
This commit is contained in:
parent
8b14038b90
commit
0898055d77
|
|
@ -56,6 +56,8 @@ public class OtherDeductionRecordDTO {
|
|||
@SalaryTableColumn(text = "手机号", width = "10%", column = "mobile")
|
||||
private String mobile;
|
||||
|
||||
private String idNo;
|
||||
|
||||
//工号
|
||||
@SalaryTableColumn(text = "工号", width = "10%", column = "jobNum")
|
||||
private String jobNum;
|
||||
|
|
|
|||
|
|
@ -318,6 +318,7 @@
|
|||
t2.name AS tax_agent_name,
|
||||
t2.name AS tax_agent_name,
|
||||
e.lastname as username,
|
||||
e.certificatenum as idNo,
|
||||
d.departmentname AS departmentName,
|
||||
e.mobile,
|
||||
e.workcode as job_num,
|
||||
|
|
|
|||
|
|
@ -7,10 +7,14 @@ import com.api.browser.util.ConditionFactory;
|
|||
import com.api.browser.util.ConditionType;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.entity.datacollection.dto.OtherDeductionListDTO;
|
||||
import com.engine.salary.entity.datacollection.dto.OtherDeductionRecordDTO;
|
||||
import com.engine.salary.entity.datacollection.param.OtherDeductionQueryParam;
|
||||
import com.engine.salary.entity.datacollection.po.OtherDeductionPO;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.service.OtherDeductionService;
|
||||
import com.engine.salary.service.SalaryEmployeeService;
|
||||
import com.engine.salary.service.TaxAgentV2Service;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.weaver.common.authority.format.FormatManager;
|
||||
import com.weaver.common.component.table.WeaTable;
|
||||
|
|
@ -18,12 +22,6 @@ import com.weaver.common.component.table.page.Page;
|
|||
import com.weaver.datasecurity.interceptor.DSTenantKeyThreadVar;
|
||||
import com.weaver.framework.rpc.context.impl.TenantRpcContext;
|
||||
import com.weaver.hrm.salary.common.excel.ExcelImportParam;
|
||||
import com.weaver.hrm.salary.entity.datacollection.bo.DataCollectionBO;
|
||||
import com.weaver.hrm.salary.entity.datacollection.dto.OtherDeductionRecordDTO;
|
||||
import com.weaver.hrm.salary.entity.datacollection.po.OtherDeductionPO;
|
||||
import com.weaver.hrm.salary.exception.SalaryRunTimeException;
|
||||
import com.weaver.hrm.salary.util.SalaryI18nUtil;
|
||||
import com.weaver.teams.domain.hr.SimpleUserInfo;
|
||||
import com.weaver.teams.security.context.TenantContext;
|
||||
import com.weaver.teams.security.context.UserContext;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
|
|
@ -63,17 +61,17 @@ public class OtherDeductionWrapper extends Service {
|
|||
List<SearchConditionItem> conditionItems = new ArrayList<SearchConditionItem>();
|
||||
|
||||
//文本输入框
|
||||
SearchConditionItem username = conditionFactory.createCondition(ConditionType.INPUT,25034, "username");
|
||||
SearchConditionItem username = conditionFactory.createCondition(ConditionType.INPUT, 25034, "username");
|
||||
username.setInputType("input");
|
||||
username.setColSpan(2);//定义一行显示条件数,默认值为2,当值为1时标识该条件单独占一行
|
||||
username.setFieldcol(16); //条件输入框所占宽度,默认值18
|
||||
username.setFieldcol(16); //条件输入框所占宽度,默认值18
|
||||
username.setLabelcol(8);
|
||||
username.setViewAttr(2); // 编辑权限 1:只读,2:可编辑, 3:必填 默认2
|
||||
username.setLabel("姓名"); //设置文本值 这个将覆盖多语言标签的值
|
||||
conditionItems.add(username);
|
||||
|
||||
|
||||
SearchConditionItem departmentName = conditionFactory.createCondition(ConditionType.BROWSER,502227,"departmentName","4");
|
||||
SearchConditionItem departmentName = conditionFactory.createCondition(ConditionType.BROWSER, 502227, "departmentName", "4");
|
||||
departmentName.setInputType("browser");
|
||||
departmentName.setColSpan(2);
|
||||
departmentName.setFieldcol(16);
|
||||
|
|
@ -84,7 +82,7 @@ public class OtherDeductionWrapper extends Service {
|
|||
conditionItems.add(departmentName);
|
||||
|
||||
|
||||
SearchConditionItem jobNum = conditionFactory.createCondition(ConditionType.INPUT,25034, "jobNum");
|
||||
SearchConditionItem jobNum = conditionFactory.createCondition(ConditionType.INPUT, 25034, "jobNum");
|
||||
jobNum.setInputType("input");
|
||||
jobNum.setColSpan(2);
|
||||
jobNum.setFieldcol(16);
|
||||
|
|
@ -94,8 +92,7 @@ public class OtherDeductionWrapper extends Service {
|
|||
conditionItems.add(jobNum);
|
||||
|
||||
|
||||
|
||||
SearchConditionItem idNo = conditionFactory.createCondition(ConditionType.INPUT,25034, "idNo");
|
||||
SearchConditionItem idNo = conditionFactory.createCondition(ConditionType.INPUT, 25034, "idNo");
|
||||
idNo.setInputType("input");
|
||||
idNo.setColSpan(2);
|
||||
idNo.setFieldcol(16);
|
||||
|
|
@ -106,8 +103,8 @@ public class OtherDeductionWrapper extends Service {
|
|||
|
||||
//日期范围选项
|
||||
List<SearchConditionOption> dateOptions = new ArrayList<SearchConditionOption>();
|
||||
dateOptions.add(new SearchConditionOption("6", SystemEnv.getHtmlLabelName(32530, user.getLanguage()),true));//指定日期范围(必须为6)
|
||||
SearchConditionItem hiredate = conditionFactory.createCondition(ConditionType.RANGEPICKER, 18648, new String[]{"hiredate","hiredate"});
|
||||
dateOptions.add(new SearchConditionOption("6", SystemEnv.getHtmlLabelName(32530, user.getLanguage()), true));//指定日期范围(必须为6)
|
||||
SearchConditionItem hiredate = conditionFactory.createCondition(ConditionType.RANGEPICKER, 18648, new String[]{"hiredate", "hiredate"});
|
||||
hiredate.setInputType("rangepicker");
|
||||
hiredate.setFormat("yyyy-MM-dd");
|
||||
hiredate.setFieldcol(16);
|
||||
|
|
@ -118,7 +115,7 @@ public class OtherDeductionWrapper extends Service {
|
|||
conditionItems.add(hiredate);
|
||||
|
||||
|
||||
SearchConditionItem mobile = conditionFactory.createCondition(ConditionType.INPUT,25034, "mobile");
|
||||
SearchConditionItem mobile = conditionFactory.createCondition(ConditionType.INPUT, 25034, "mobile");
|
||||
mobile.setInputType("input");
|
||||
mobile.setColSpan(2);
|
||||
mobile.setFieldcol(16);
|
||||
|
|
@ -127,9 +124,9 @@ public class OtherDeductionWrapper extends Service {
|
|||
mobile.setLabel("手机号");
|
||||
conditionItems.add(mobile);
|
||||
|
||||
addGroups.add(new SearchConditionGroup("常用条件",true,conditionItems));
|
||||
addGroups.add(new SearchConditionGroup("常用条件", true, conditionItems));
|
||||
|
||||
apidatas.put("condition",addGroups);
|
||||
apidatas.put("condition", addGroups);
|
||||
return apidatas;
|
||||
}
|
||||
|
||||
|
|
@ -140,44 +137,26 @@ public class OtherDeductionWrapper extends Service {
|
|||
* @return
|
||||
*/
|
||||
public PageInfo<OtherDeductionListDTO> list(OtherDeductionQueryParam queryParam) {
|
||||
queryParam.setDeclareMonthDate(queryParam.getDeclareMonth().stream().map(e-> LocalDate.of(e.getYear(),e.getMonthValue(),1)).collect(Collectors.toList()));
|
||||
// queryParam.setDeclareMonthDate(queryParam.getDeclareMonth().stream().map(e-> LocalDate.of(e.getYear(),e.getMonthValue(),1)).collect(Collectors.toList()));
|
||||
|
||||
PageInfo<OtherDeductionListDTO> page = new Page<>(queryParam.getCurrent(), queryParam.getPageSize(), true);
|
||||
page = otherDeductionService.listPage(page, queryParam, currentEmployeeId, currentTenantKey);
|
||||
return otherDeductionService.listPage(queryParam);
|
||||
|
||||
List<OtherDeductionListDTO> list = page.getRecords();
|
||||
|
||||
List<SimpleUserInfo> simpleUserInfos = salaryEmployeeService.listByEmployeeIds(list.stream().map(OtherDeductionListDTO::getEmployeeId).collect(Collectors.toList()), currentTenantKey);
|
||||
// 人员信息赋值
|
||||
list.forEach(m->{
|
||||
// 身份证号
|
||||
m.setIdNo(DataCollectionBO.getIdNo(m.getEmployeeId(), simpleUserInfos));
|
||||
});
|
||||
WeaTable<OtherDeductionListDTO> weaTable = FormatManager.<OtherDeductionListDTO>getInstance().genTable(OtherDeductionListDTO.class, page);
|
||||
|
||||
// 在外展示操作按钮
|
||||
weaTable.getOperates().get(0).setOuter(Boolean.TRUE);
|
||||
weaTable.setModule("hrmsalary");
|
||||
|
||||
return weaTable;
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据采集-其他免税扣除详情列表(分页)
|
||||
*
|
||||
* @param queryParam
|
||||
* @param currentEmployeeId
|
||||
* @param currentTenantKey
|
||||
* @return
|
||||
*/
|
||||
public WeaTable<OtherDeductionRecordDTO> getDetailList(OtherDeductionQueryParam queryParam, Long currentEmployeeId, String currentTenantKey) {
|
||||
public PageInfo<OtherDeductionRecordDTO> getDetailList(OtherDeductionQueryParam queryParam) {
|
||||
Long id = queryParam.getOtherTaxExemptDeductionId();
|
||||
|
||||
OtherDeductionPO po = otherDeductionService.getById(id, currentTenantKey);
|
||||
OtherDeductionPO po = otherDeductionService.getById(id);
|
||||
if (po == null) {
|
||||
throw new SalaryRunTimeException(String.format(SalaryI18nUtil.getI18nLabel(currentTenantKey, currentEmployeeId, 100415, "其他免税扣除不存在")+"[id:%s]", id));
|
||||
throw new SalaryRunTimeException(String.format(SalaryI18nUtil.getI18nLabel(100415, "其他免税扣除不存在") + "[id:%s]", id));
|
||||
}
|
||||
queryParam.setDeclareMonthDate(CollectionUtils.emptyIfNull(queryParam.getDeclareMonth()).stream().map(e-> LocalDate.of(e.getYear(),e.getMonthValue(),1)).collect(Collectors.toList()));
|
||||
queryParam.setDeclareMonthDate(queryParam.getDeclareMonth().stream().map(e -> LocalDate.of(e.getYear(), e.getMonthValue(), 1)).collect(Collectors.toList()));
|
||||
queryParam.setEmployeeId(po.getEmployeeId());
|
||||
Page<OtherDeductionRecordDTO> page = new Page<>(queryParam.getCurrent(), queryParam.getPageSize(), true);
|
||||
|
||||
|
|
@ -227,7 +206,7 @@ public class OtherDeductionWrapper extends Service {
|
|||
Long id = queryParam.getOtherTaxExemptDeductionId();
|
||||
OtherDeductionPO po = otherDeductionService.getById(id, currentTenantKey);
|
||||
if (po == null) {
|
||||
throw new SalaryRunTimeException(String.format(SalaryI18nUtil.getI18nLabel(currentTenantKey, currentEmployeeId, 100415, "其他免税扣除不存在")+"[id:%s]", id));
|
||||
throw new SalaryRunTimeException(String.format(SalaryI18nUtil.getI18nLabel(currentTenantKey, currentEmployeeId, 100415, "其他免税扣除不存在") + "[id:%s]", id));
|
||||
}
|
||||
boolean isChief = taxAgentService.isChief(currentEmployeeId, currentTenantKey);
|
||||
// 构建异步导出参数
|
||||
|
|
|
|||
Loading…
Reference in New Issue