!19 福利台账相关接口

Merge pull request !19 from reset/archive
This commit is contained in:
reset 2022-04-15 11:02:47 +00:00 committed by Gitee
commit ed096261d3
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
8 changed files with 115 additions and 29 deletions

View File

@ -174,7 +174,7 @@
<select id="getEmployeeIdsByUserName" resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
select
a.LASTNAME as username,
a.LASTNAME as username
from hrmresource a
where
1 = 1

View File

@ -83,7 +83,7 @@
<sql id="paramSql">
<if test="param.startTime != null and param.startTime != '' and param.endTime != null and param.endTime != ''">
AND
t.bill_month between param.startTime and param.endTime
t.bill_month between #{param.startTime} and #{param.endTime}
</if>
</sql>

View File

@ -79,4 +79,6 @@ public interface InsuranceAccountDetailMapper {
void batchUnConfirmedInspectDetails(@Param("ids") Collection<Long> ids);
void batchIgnoreInspectDetails(@Param("ids") Collection<Long> ids);
}

View File

@ -97,11 +97,11 @@
<sql id="paramSql">
<if test="param.billMonth != null and param.billMonth != ''">
AND
t.bill_month = param.billMonth
t.bill_month = #{param.billMonth}
</if>
<if test="param.paymentStatus != null and param.paymentStatus != ''">
AND
t.payment_status = param.paymentStatus
t.payment_status = #{param.paymentStatus}
</if>
<if test="param.employeeIds != null and param.employeeIds.size()>0">
AND t.employee_id IN
@ -118,7 +118,6 @@
FROM
hrsa_bill_detail t
WHERE t.delete_type = 0
1 = 1
<include refid="paramSql"/>
ORDER BY t.update_time DESC
</select>
@ -183,6 +182,19 @@
</foreach>
</update>
<update id="batchIgnoreInspectDetails">
UPDATE
hrsa_bill_inspect
SET
inspect_status = 1
WHERE
delete_type = 0
AND id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</update>
<!-- 批量删除 -->
<delete id="batchDelAccountDetails">

View File

@ -105,6 +105,14 @@
WHERE data_type= #{dataType} AND delete_type = 0
</select>
<select id="listAll" resultMap="BaseResultMap">
SELECT
<include refid="baseColumns"/>
FROM hrsa_insurance_category t
WHERE delete_type = 0
</select>
<!-- 更新,更新修改字段 -->
<update id="update" parameterType="com.engine.salary.entity.sicategory.po.ICategoryPO">
UPDATE hrsa_insurance_category

View File

@ -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<String, Boolean> buttonCheck(String s);
Map<String, Boolean> buttonCheck(String billMonth);
/**
* 忽略核算异常
* @param longs
*/
void ignore(Collection<Long> longs);
/**
* tab信息
* @param billMonth
*/
InsuranceAccountTabDTO tabList(String billMonth);
}

View File

@ -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<Map<String, Object>> records = getService(user).buildCommonRecords(insuranceAccountDetailPOS, employeeId);
PageInfo<Map<String, Object>> pageInfos = new PageInfo<Map<String, Object>>(records);
PageInfo<Map<String, Object>> 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<String,Object> datas = new HashMap<>();
//正常缴纳列表
//补缴缴纳列表
queryParam.setPaymentStatus(PaymentStatusEnum.REPAIR.getValue());
List<InsuranceAccountDetailPO> list = MapperProxyFactory.getProxy(InsuranceAccountDetailMapper.class).list(queryParam);
PageInfo<InsuranceAccountDetailPO> pageInfo = new PageInfo<>(list,InsuranceAccountDetailPO.class);
@ -325,5 +327,51 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
return result;
}
@Override
public void ignore(Collection<Long> ids) {
List<InsuranceAccountInspectPO> 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<Map<String, Object>> tabList = new ArrayList<>();
Map<String, Object> common = new HashMap<>();
common.put("id", "1");
common.put("content", SalaryI18nUtil.getI18nLabel( 92265, "正常缴纳"));
tabList.add(common);
if (isShow) {
Map<String, Object> change = new HashMap<>();
change.put("id", "2");
change.put("content", SalaryI18nUtil.getI18nLabel( 100509, "异动清单"));
tabList.add(change);
}
Map<String, Object> repair = new HashMap<>();
repair.put("id", "3");
repair.put("content", SalaryI18nUtil.getI18nLabel(92267, "补缴"));
tabList.add(repair);
Map<String, Object> 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;
}
}

View File

@ -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<InsuranceAccountTabDTO> 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<String, InsuranceAccountTabDTO>().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<String> ignore(@RequestBody Collection<Long> ids) {
// return siAccountWrapper.ignore(ids, TenantContext.getCurrentTenantKey());
// }
//
// @PostMapping("unconfirmed")
// @ApiOperation("重置核算异常")
// @WeaPermission
// public WeaResult<String> unconfirmed(@RequestBody Collection<Long> 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<Long> ids) {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<Collection<Long>, String>().run(getService(user)::ignore, ids);
}
@POST
@Path("/unconfirmed")