feat: 修复bug
This commit is contained in:
parent
2877d58a1f
commit
fcca6950ac
|
|
@ -155,9 +155,9 @@ public class SalarySendRangeBO {
|
|||
case POSITION:
|
||||
isInRange = doJudgeInRange(targetType, dto.getJobTitle());
|
||||
break;
|
||||
case TAX_AGENT:
|
||||
isInRange = doJudgeInRange(targetType, dto.getTaxAgentIds());
|
||||
break;
|
||||
// case TAX_AGENT:
|
||||
// isInRange = doJudgeInRange(targetType, dto.getTaxAgentIds());
|
||||
// break;
|
||||
case SUB_COMPANY:
|
||||
isInRange = doJudgeInRange(targetType, dto.getSubCompanyId());
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ public enum SalarySendRangeTargetTypeEnum implements BaseEnum<Integer> {
|
|||
DEPT(2, "部门", 86185),
|
||||
SUB_COMPANY(3, "分部", 107369),
|
||||
POSITION(4, "岗位", 90633),
|
||||
TAX_AGENT(5, "个税扣缴义务人", 86184),
|
||||
// TAX_AGENT(5, "个税扣缴义务人", 86184),
|
||||
ALL(0, "所有人", 107729);
|
||||
|
||||
private final int value;
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import com.engine.salary.enums.salarysend.SalarySendRangeTargetTypeEnum;
|
|||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.service.SalarySendRangeObjService;
|
||||
import com.engine.salary.service.SalarySendService;
|
||||
import com.engine.salary.service.SalarySobService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
|
||||
import java.util.Collection;
|
||||
|
|
@ -33,6 +34,10 @@ public class SalarySendRangeObjServiceImpl extends Service implements SalarySend
|
|||
return ServiceUtil.getService(RolesMembersServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private SalarySobService getSalarySobService() {
|
||||
return ServiceUtil.getService(SalarySobServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private final SalarySendRangeObjBiz salarySendRangeObjBiz = new SalarySendRangeObjBiz();
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ import com.engine.salary.entity.salaryBill.param.SalarySendRangeQueryParam;
|
|||
import com.engine.salary.entity.salaryBill.param.SalarySendRangeSaveParam;
|
||||
import com.engine.salary.entity.salaryBill.po.SalarySendRangeObj;
|
||||
import com.engine.salary.entity.salaryBill.po.SalarySendRangePO;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
||||
import com.engine.salary.enums.salarysend.SalarySendGrantTypeEnum;
|
||||
import com.engine.salary.enums.salarysend.SalarySendRangeTargetTypeEnum;
|
||||
import com.engine.salary.enums.salarysend.SalarySendRangeTypeEnum;
|
||||
|
|
@ -134,10 +133,10 @@ public class SalarySendRangeServiceImpl extends Service implements SalarySendRan
|
|||
.stream().findFirst()
|
||||
.map(PositionInfo::getName).orElse(null);
|
||||
break;
|
||||
case TAX_AGENT:
|
||||
targetName = Optional.ofNullable(getTaxAgentService().getById(rangeObj.getTargetId()))
|
||||
.map(TaxAgentPO::getName).orElse(null);
|
||||
break;
|
||||
// case TAX_AGENT:
|
||||
// targetName = Optional.ofNullable(getTaxAgentService().getById(rangeObj.getTargetId()))
|
||||
// .map(TaxAgentPO::getName).orElse(null);
|
||||
// break;
|
||||
}
|
||||
return SalarySendRangeObjDTO.builder()
|
||||
.targetType(rangeObj.getTargetType())
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ import com.engine.salary.util.JsonUtil;
|
|||
import com.engine.salary.util.SalaryDateUtil;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.engine.salary.util.excel.ExcelUtil;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.util.page.SalaryPageUtil;
|
||||
|
|
@ -493,7 +494,7 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
|||
}
|
||||
}
|
||||
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
|
||||
List<SalarySendDetailListDTO> list = salarySendInfoMapper.detailList(queryParam, otherSalaryAcctRecordIds);
|
||||
List<SalarySendDetailListDTO> list = MapperProxyFactory.getProxy(SalarySendInfoMapper.class).detailList(queryParam, otherSalaryAcctRecordIds);
|
||||
PageInfo<SalarySendDetailListDTO> pageInfo = new PageInfo<>(list, SalarySendDetailListDTO.class);
|
||||
return pageInfo;
|
||||
}
|
||||
|
|
@ -613,6 +614,7 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
|||
SalaryAcctResultPO po = new SalaryAcctResultPO();
|
||||
po.setDeleteType(0);
|
||||
po.setSalaryAcctRecordId(salaryAccountingId);
|
||||
po.setEmployeeIds(list.stream().map(SalarySendDetailListDTO::getEmployeeId).collect(Collectors.toList()));
|
||||
List<SalaryAcctResultPO> salaryAccountingResults = getSalaryAcctResultMapper().listSome(po);
|
||||
SalaryAcctResultPOEncrypt.decryptList(salaryAccountingResults);
|
||||
// 动态列
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ import com.engine.salary.util.SalaryEntityUtil;
|
|||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.util.page.SalaryPageUtil;
|
||||
import com.engine.salary.util.valid.ValidUtil;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
|
|
@ -201,7 +200,7 @@ public class SalarySendWrapper extends Service {
|
|||
conditionItems.add(username);
|
||||
|
||||
// 个税扣缴义务人
|
||||
SearchConditionItem taxAgent = conditionFactory.createCondition(ConditionType.SELECT, 25034, "taxAgent");
|
||||
SearchConditionItem taxAgent = conditionFactory.createCondition(ConditionType.SELECT, 25034, "taxAgentId");
|
||||
taxAgent.setColSpan(2);//定义一行显示条件数,默认值为2,当值为1时标识该条件单独占一行
|
||||
taxAgent.setFieldcol(16); //条件输入框所占宽度,默认值18
|
||||
taxAgent.setLabelcol(8);
|
||||
|
|
@ -215,7 +214,7 @@ public class SalarySendWrapper extends Service {
|
|||
conditionItems.add(taxAgent);
|
||||
|
||||
// 部门
|
||||
SearchConditionItem departmentName = conditionFactory.createCondition(ConditionType.BROWSER, 502227, "department", "4");
|
||||
SearchConditionItem departmentName = conditionFactory.createCondition(ConditionType.BROWSER, 502227, "departmentIds", "4");
|
||||
departmentName.setColSpan(2);
|
||||
departmentName.setFieldcol(16);
|
||||
departmentName.setLabelcol(8);
|
||||
|
|
@ -226,7 +225,7 @@ public class SalarySendWrapper extends Service {
|
|||
conditionItems.add(departmentName);
|
||||
|
||||
// 岗位
|
||||
SearchConditionItem position = conditionFactory.createCondition(ConditionType.BROWSER, 502227, "position", "24");
|
||||
SearchConditionItem position = conditionFactory.createCondition(ConditionType.BROWSER, 502227, "positionIds", "24");
|
||||
position.setColSpan(2);
|
||||
position.setFieldcol(16);
|
||||
position.setLabelcol(8);
|
||||
|
|
@ -249,29 +248,16 @@ public class SalarySendWrapper extends Service {
|
|||
status.setLabel("状态"); //设置文本值 这个将覆盖多语言标签的值
|
||||
conditionItems.add(status);
|
||||
|
||||
// //入职日期
|
||||
// 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);
|
||||
|
||||
//发送状态
|
||||
SearchConditionItem sendStatus = conditionFactory.createCondition(ConditionType.SELECT, 25034, "sendStatus");
|
||||
SearchConditionItem sendStatus = conditionFactory.createCondition(ConditionType.SELECT, 25034, "sendStatusVal");
|
||||
sendStatus.setColSpan(2);//定义一行显示条件数,默认值为2,当值为1时标识该条件单独占一行
|
||||
sendStatus.setFieldcol(16); //条件输入框所占宽度,默认值18
|
||||
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);
|
||||
status.setInputType("");
|
||||
Arrays.asList(SalarySendStatusEnum.values())
|
||||
.forEach(e -> sendStatusOptions.add(new SearchConditionOption(e.getValue().toString(), e.getDefaultLabel())));
|
||||
sendStatus.setOptions(sendStatusOptions);
|
||||
sendStatus.setInputType("");
|
||||
sendStatus.setViewAttr(2); // 编辑权限 1:只读,2:可编辑, 3:必填 默认2
|
||||
sendStatus.setLabel("发送状态"); //设置文本值 这个将覆盖多语言标签的值
|
||||
conditionItems.add(sendStatus);
|
||||
|
|
@ -486,13 +472,6 @@ public class SalarySendWrapper extends Service {
|
|||
// 3.组装详情数据
|
||||
List<Map<String, Object>> listMaps = getSalarySendService(user).buildDetailList(salaryItems, records, salarySend.getSalaryAccountingId());
|
||||
|
||||
// List<Long> employeeIds = records.stream().map(SalarySendDetailListDTO::getEmployeeId).collect(Collectors.toList());
|
||||
|
||||
// 是否合并计税
|
||||
// TODO: 1/25/22 判断是否合并计税
|
||||
|
||||
|
||||
|
||||
List<WeaTableColumn> columns = buildDetailListWeaTableColumns();
|
||||
|
||||
for (SalaryTemplateSalaryItemListDTO salaryItem : salaryItems) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue