diff --git a/src/com/engine/salary/mapper/datacollection/EmployMapper.xml b/src/com/engine/salary/mapper/datacollection/EmployMapper.xml index 932b5827a..513b4a35d 100644 --- a/src/com/engine/salary/mapper/datacollection/EmployMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/EmployMapper.xml @@ -174,7 +174,7 @@ @@ -183,6 +182,19 @@ + + UPDATE + hrsa_bill_inspect + SET + inspect_status = 1 + WHERE + delete_type = 0 + AND id IN + + #{id} + + + diff --git a/src/com/engine/salary/mapper/sicategory/ICategoryMapper.xml b/src/com/engine/salary/mapper/sicategory/ICategoryMapper.xml index d68b0c03b..24c617ab0 100644 --- a/src/com/engine/salary/mapper/sicategory/ICategoryMapper.xml +++ b/src/com/engine/salary/mapper/sicategory/ICategoryMapper.xml @@ -105,6 +105,14 @@ WHERE data_type= #{dataType} AND delete_type = 0 + + + UPDATE hrsa_insurance_category diff --git a/src/com/engine/salary/service/SIAccountService.java b/src/com/engine/salary/service/SIAccountService.java index d78f826ee..0eb66576a 100644 --- a/src/com/engine/salary/service/SIAccountService.java +++ b/src/com/engine/salary/service/SIAccountService.java @@ -1,5 +1,6 @@ package com.engine.salary.service; +import com.engine.salary.entity.siaccount.dto.InsuranceAccountTabDTO; import com.engine.salary.entity.siaccount.param.*; import java.util.Collection; @@ -113,10 +114,21 @@ public interface SIAccountService { /** * 获取核算异常列表页是否导出档案开关 - * @param s + * @param billMonth */ - Map buttonCheck(String s); + Map buttonCheck(String billMonth); + /** + * 忽略核算异常 + * @param longs + */ + void ignore(Collection longs); + + /** + * tab信息 + * @param billMonth + */ + InsuranceAccountTabDTO tabList(String billMonth); } diff --git a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java index 295e439a4..7e7b2cc5f 100644 --- a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java @@ -13,6 +13,7 @@ import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.salaryarchive.dto.SalaryArchiveListDTO; import com.engine.salary.entity.siaccount.bo.InsuranceAccountBO; import com.engine.salary.entity.siaccount.dto.InsuranceAccountBatchListDTO; +import com.engine.salary.entity.siaccount.dto.InsuranceAccountTabDTO; import com.engine.salary.entity.siaccount.param.*; import com.engine.salary.entity.siaccount.po.InsuranceAccountBatchPO; import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO; @@ -33,6 +34,7 @@ import java.util.stream.Collectors; import com.engine.salary.util.SalaryDateUtil; import com.engine.salary.util.SalaryFormItemUtil; +import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.valid.ValidUtil; @@ -136,7 +138,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { //数据组装 List> records = getService(user).buildCommonRecords(insuranceAccountDetailPOS, employeeId); - PageInfo> pageInfos = new PageInfo>(records); + PageInfo> pageInfos = new PageInfo<>(records); pageInfos.setTotal(records.size()); pageInfos.setPageNum(queryParam.getCurrent()); pageInfos.setPageSize(queryParam.getPageSize()); @@ -174,7 +176,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { Long employeeId = (long)user.getUID(); Map datas = new HashMap<>(); - //正常缴纳列表 + //补缴缴纳列表 queryParam.setPaymentStatus(PaymentStatusEnum.REPAIR.getValue()); List list = MapperProxyFactory.getProxy(InsuranceAccountDetailMapper.class).list(queryParam); PageInfo pageInfo = new PageInfo<>(list,InsuranceAccountDetailPO.class); @@ -325,5 +327,51 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { return result; } + @Override + public void ignore(Collection ids) { + List insuranceAccountInspectPOS = MapperProxyFactory.getProxy(InsuranceAccountInspectMapper.class).getByInspectStatusAndIds(InspectStatusEnum.IGNORE.getValue(),ids); + + if (CollectionUtils.isNotEmpty(insuranceAccountInspectPOS)) { + MapperProxyFactory.getProxy(InsuranceAccountDetailMapper.class).batchIgnoreInspectDetails(insuranceAccountInspectPOS.stream().map(InsuranceAccountInspectPO::getId).collect(Collectors.toList())); + } + } + + @Override + public InsuranceAccountTabDTO tabList(String billMonth) { + InsuranceAccountTabDTO insuranceAccountTabDTO = InsuranceAccountTabDTO.builder().build(); + InsuranceAccountBatchPO insuranceAccountBatchPO = MapperProxyFactory.getProxy(InsuranceAccountBatchMapper.class).getByBillMonth(billMonth); + boolean isShow = false; + if (insuranceAccountBatchPO == null || insuranceAccountBatchPO.getBillStatus() == BillStatusEnum.NOT_ARCHIVED.getValue()) { + isShow = true; + } + if (insuranceAccountBatchPO != null) { + insuranceAccountTabDTO.setRemarks(insuranceAccountBatchPO.getRemarks()); + } + List> tabList = new ArrayList<>(); + Map common = new HashMap<>(); + common.put("id", "1"); + common.put("content", SalaryI18nUtil.getI18nLabel( 92265, "正常缴纳")); + tabList.add(common); + if (isShow) { + Map change = new HashMap<>(); + change.put("id", "2"); + change.put("content", SalaryI18nUtil.getI18nLabel( 100509, "异动清单")); + tabList.add(change); + } + Map repair = new HashMap<>(); + repair.put("id", "3"); + repair.put("content", SalaryI18nUtil.getI18nLabel(92267, "补缴")); + tabList.add(repair); + + Map overView = new HashMap<>(); + overView.put("id", "4"); + overView.put("content", SalaryI18nUtil.getI18nLabel( 99927, "总览")); + tabList.add(overView); + insuranceAccountTabDTO.setTabList(tabList); + insuranceAccountTabDTO.setShow(isShow); + insuranceAccountTabDTO.setBillMonth(billMonth); + return insuranceAccountTabDTO; + } + } diff --git a/src/com/engine/salary/web/SIAccountController.java b/src/com/engine/salary/web/SIAccountController.java index 36d8313c6..86aed3402 100644 --- a/src/com/engine/salary/web/SIAccountController.java +++ b/src/com/engine/salary/web/SIAccountController.java @@ -2,6 +2,7 @@ package com.engine.salary.web; import com.engine.common.util.ParamUtil; import com.engine.common.util.ServiceUtil; +import com.engine.salary.entity.siaccount.dto.InsuranceAccountTabDTO; import com.engine.salary.entity.siaccount.param.*; import com.engine.salary.service.impl.SIAccountServiceImpl; import com.engine.salary.util.ResponseResult; @@ -275,13 +276,18 @@ public class SIAccountController { // return siAccountWrapper.overView(billMonth, UserContext.getCurrentUser().getEmployeeId(), TenantContext.getCurrentTenantKey()); // } // -// @GetMapping("tabList") -// @ApiOperation("tab信息") -// @WeaPermission -// public WeaResult tabList(@RequestParam(value = "billMonth") String billMonth) { -// return siAccountWrapper.tabList(billMonth, UserContext.getCurrentUser().getEmployeeId(), TenantContext.getCurrentTenantKey()); -// } -// + + @GET + @Path("/tabList") + @Produces(MediaType.APPLICATION_JSON) + public String tabList(@Context HttpServletRequest request, @Context HttpServletResponse response, + @QueryParam("billMonth") String billMonth) { + User user = HrmUserVarify.getUser(request, response); + return new ResponseResult().run(getService(user)::tabList, billMonth); + } + + + // @GetMapping("inspectList") // @ApiOperation("核算失败列表") // @WeaPermission @@ -296,19 +302,17 @@ public class SIAccountController { // return siAccountWrapper.accountInspect(param.getIds(), param.getBillMonth(), UserContext.getCurrentUser().getEmployeeId(), TenantContext.getCurrentTenantKey()); // } // -// @PostMapping("ignore") -// @ApiOperation("忽略核算异常") -// @WeaPermission -// public WeaResult ignore(@RequestBody Collection ids) { -// return siAccountWrapper.ignore(ids, TenantContext.getCurrentTenantKey()); -// } -// -// @PostMapping("unconfirmed") -// @ApiOperation("重置核算异常") -// @WeaPermission -// public WeaResult unconfirmed(@RequestBody Collection ids) { -// return siAccountWrapper.unConfirmed(ids, TenantContext.getCurrentTenantKey()); -// } + + + @POST + @Path("/ignore") + @Produces(MediaType.APPLICATION_JSON) + public String ignore(@Context HttpServletRequest request, @Context HttpServletResponse response, + @RequestBody Collection ids) { + User user = HrmUserVarify.getUser(request, response); + return new ResponseResult, String>().run(getService(user)::ignore, ids); + } + @POST @Path("/unconfirmed")