Commit e6ebeb74 authored by fangxinjiang's avatar fangxinjiang

批量办理 100%

parent 6f0dd3ee
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Set;
/**
* 派单信息记录表
*
* @author fxj
* @date 2022-07-15 11:38:05
*/
@Data
public class TDispatchInfoPageVo extends TDispatchInfo {
/**
* 社保户名称
*/
@ExcelAttribute(name = "社保户名称", maxLength = 32)
@Schema(description = "社保户名称" )
@ExcelProperty("社保户名称" )
private String socialHouseholdName;
/**
* 公积金户名称
*/
@ExcelAttribute(name = "公积金户名称", maxLength = 32)
@Schema(description = "公积金户名称" )
@ExcelProperty("公积金户名称" )
private String providentHouseholdName;
}
......@@ -16,7 +16,9 @@
*/
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -64,4 +66,21 @@ public class TDispatchInfoSearchVo extends TDispatchInfo {
@Schema(description = "查询limit 数据条数")
private int limitEnd;
/**
* 社保户名称
*/
@ExcelAttribute(name = "社保户名称", maxLength = 32)
@Schema(description = "社保户名称" )
@ExcelProperty("社保户名称" )
private String socialHouseholdName;
/**
* 公积金户名称
*/
@ExcelAttribute(name = "公积金户名称", maxLength = 32)
@Schema(description = "公积金户名称" )
@ExcelProperty("公积金户名称" )
private String providentHouseholdName;
}
......@@ -28,10 +28,7 @@ import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo;
import com.yifu.cloud.plus.v1.yifu.social.service.TDispatchInfoService;
import com.yifu.cloud.plus.v1.yifu.social.vo.DispatchDetailVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.FundSupplementaryExportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.SocialHandleSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.*;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
......@@ -69,7 +66,7 @@ public class TDispatchInfoController {
*/
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TDispatchInfo>> getTDispatchInfoPage(Page<TDispatchInfo> page, TDispatchInfoSearchVo tDispatchInfo) {
public R<IPage<TDispatchInfoPageVo>> getTDispatchInfoPage(Page<TDispatchInfo> page, TDispatchInfoSearchVo tDispatchInfo) {
tDispatchInfo.setDeleteFlag(CommonConstants.ZERO_STRING);
return new R<>(tDispatchInfoService.getTDispatchInfoPage(page,tDispatchInfo));
}
......@@ -94,7 +91,7 @@ public class TDispatchInfoController {
*/
@Operation(description = "简单分页查询--申请")
@GetMapping("/pageApply")
public R<IPage<TDispatchInfo>> getTDispatchApplyPage(Page<TDispatchInfo> page, TDispatchInfoSearchVo tDispatchInfo) {
public R<IPage<TDispatchInfoPageVo>> getTDispatchApplyPage(Page<TDispatchInfo> page, TDispatchInfoSearchVo tDispatchInfo) {
YifuUser user = SecurityUtils.getUser();
if (Common.isEmpty(user)){
return R.failed(CommonConstants.USER_FAIL);
......@@ -112,7 +109,7 @@ public class TDispatchInfoController {
*/
@Operation(description = "简单分页查询--审核")
@GetMapping("/pageAudit")
public R<IPage<TDispatchInfo>> getTDispatchAuditPage(Page<TDispatchInfo> page, TDispatchInfoSearchVo tDispatchInfo) {
public R<IPage<TDispatchInfoPageVo>> getTDispatchAuditPage(Page<TDispatchInfo> page, TDispatchInfoSearchVo tDispatchInfo) {
tDispatchInfo.setDeleteFlag(CommonConstants.ZERO_STRING);
tDispatchInfo.setStatus(CommonConstants.ONE_STRING);
return new R<>(tDispatchInfoService.getTDispatchInfoPage(page,tDispatchInfo));
......
......@@ -22,12 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo;
import com.yifu.cloud.plus.v1.yifu.social.vo.FundHandleExportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.FundSupplementaryExportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.SocialHandleExportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.SocialHandleSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoExportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -46,7 +41,7 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> {
* @param tDispatchInfo 派单信息记录表
* @return
*/
IPage<TDispatchInfo> getTDispatchInfoPage(Page<TDispatchInfo> page, @Param("tDispatchInfo") TDispatchInfo tDispatchInfo);
IPage<TDispatchInfoPageVo> getTDispatchInfoPage(Page<TDispatchInfo> page, @Param("tDispatchInfo") TDispatchInfoSearchVo tDispatchInfo);
/**
* @Description: 派单导出
......
......@@ -42,7 +42,7 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
* @param tDispatchInfo 派单信息记录表
* @return
*/
IPage<TDispatchInfo> getTDispatchInfoPage(Page<TDispatchInfo> page, TDispatchInfo tDispatchInfo);
IPage<TDispatchInfoPageVo> getTDispatchInfoPage(Page<TDispatchInfo> page, TDispatchInfoSearchVo tDispatchInfo);
R<List<ErrorMessage>> importDiy(InputStream inputStream);
......
......@@ -93,7 +93,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
* @param tDispatchInfo 派单信息记录表
*/
@Override
public IPage<TDispatchInfo> getTDispatchInfoPage(Page<TDispatchInfo> page, TDispatchInfo tDispatchInfo) {
public IPage<TDispatchInfoPageVo> getTDispatchInfoPage(Page<TDispatchInfo> page, TDispatchInfoSearchVo tDispatchInfo) {
return baseMapper.getTDispatchInfoPage(page, tDispatchInfo);
}
......@@ -760,6 +760,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
TDispatchImportVo excel) {
TDispatchInfo dispatch;
dispatch = new TDispatchInfo();
dispatch.setOrganName(user.getDeptName());
dispatch.setCreateBy(user.getNickname());
dispatch.setCreateTime(LocalDateTime.now());
dispatch.setContractSubName(excel.getContractSubName());
dispatch.setContractName(excel.getContractName());
dispatch.setEmpIdcard(excel.getEmpIdcard());
......@@ -1936,7 +1939,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
remark += "公积金";
}
providentFund = fundMapper.selectById(dis.getFundId());
if (Common.isNotNull(providentFund)) {
if (Common.isEmpty(providentFund)) {
errorList.add(new ErrorMessage(-1, "找不到员工公积金派单数据:" + dis.getEmpName()));
continue;
}
......
......@@ -94,7 +94,10 @@
<result property="idCardTown" column="ID_CARD_TOWN"/>
<result property="idCardAddress" column="ID_CARD_ADDRESS"/>
</resultMap>
<resultMap id="dispatchPageMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoPageVo" extends="tDispatchInfoMap">
<result property="providentHouseholdName" column="PROVIDENT_HOUSEHOLD_NAME"/>
<result property="socialHouseholdName" column="SOCIAL_HOUSEHOLD_NAME"/>
</resultMap>
<!-- 派单导出vo -->
<resultMap id="exportMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoExportVo">
<id property="id" column="ID"/>
......@@ -249,6 +252,13 @@
<if test="tDispatchInfo.settleDomain != null and tDispatchInfo.settleDomain.trim() != ''">
AND a.SETTLE_DOMAIN = #{tDispatchInfo.settleDomain}
</if>
<if test="tDispatchInfo.settleDomainName != null and tDispatchInfo.settleDomainName.trim() != ''">
AND a.SETTLE_DOMAIN_NAME like CONCAT(CONCAT(#{tDispatchInfo.settleDomainName}), '%')
</if>
<if test="tDispatchInfo.settleDomainCode != null and tDispatchInfo.settleDomainCode.trim() != ''">
AND a.SETTLE_DOMAIN_CODE = #{tDispatchInfo.settleDomainCode}
</if>
<if test="tDispatchInfo.deleteFlag != null and tDispatchInfo.deleteFlag.trim() != ''">
AND a.DELETE_FLAG = #{tDispatchInfo.deleteFlag}
</if>
......@@ -372,19 +382,27 @@
<if test="tDispatchInfo.dispatchItem != null and tDispatchInfo.dispatchItem.trim() != ''">
AND a.DISPATCH_ITEM = #{tDispatchInfo.dispatchItem}
</if>
<if test="tDispatchInfo.settleDomainName != null and tDispatchInfo.settleDomainName.trim() != ''">
AND a.SETTLE_DOMAIN_NAME = #{tDispatchInfo.settleDomainName}
</if>
<if test="tDispatchInfo.belongUnitName != null and tDispatchInfo.belongUnitName.trim() != ''">
AND a.BELONG_UNIT_NAME = #{tDispatchInfo.belongUnitName}
</if>
<if test="tDispatchInfo.socialHouseholdName != null and tDispatchInfo.socialHouseholdName.trim() != ''">
AND s.SOCIAL_HOUSEHOLD_NAME = #{tDispatchInfo.socialHouseholdName}
</if>
<if test="tDispatchInfo.providentHouseholdName != null and tDispatchInfo.providentHouseholdName.trim() != ''">
AND f.PROVIDENT_HOUSEHOLD_NAME = #{tDispatchInfo.providentHouseholdName}
</if>
</if>
</sql>
<!--tDispatchInfo简单分页查询-->
<select id="getTDispatchInfoPage" resultMap="tDispatchInfoMap">
<select id="getTDispatchInfoPage" resultMap="dispatchPageMap">
SELECT
<include refid="Base_Column_List"/>
<include refid="Base_Column_List"/>,
s.SOCIAL_HOUSEHOLD_NAME,
f.PROVIDENT_HOUSEHOLD_NAME
FROM t_dispatch_info a
left join t_social_info s on s.id=a.SOCIAL_ID
left join t_provident_fund f on f.id=a.FUND_ID
<where>
1=1
<include refid="tDispatchInfo_where"/>
......@@ -553,15 +571,17 @@
</select>
<!--tDispatchInfo 社保办理数据查询-->
<select id="getTDispatchSocialHandlePage" resultMap="tDispatchInfoMap">
<select id="getTDispatchSocialHandlePage" resultMap="dispatchPageMap">
SELECT
<include refid="Base_Column_List"/>
<include refid="Base_Column_List"/>,
b.SOCIAL_HOUSEHOLD_NAME
<include refid="where_getSocialRecordRoster"/>
</select>
<!--tDispatchInfo 公积金办理数据查询-->
<select id="getTDispatchFundHandlePage" resultMap="tDispatchInfoMap">
<select id="getTDispatchFundHandlePage" resultMap="dispatchPageMap">
SELECT
<include refid="Base_Column_List"/>
<include refid="Base_Column_List"/>,
c.PROVIDENT_HOUSEHOLD_NAME
<include refid="where_getFundRecord"/>
</select>
......@@ -712,7 +732,7 @@
FROM t_dispatch_info a
left join t_provident_fund c on a.FUND_ID = c.id
<where>
1=1 and b.DELETE_FLAG = 0
1=1 and a.DELETE_FLAG = 0
<if test="idsStr != null">
AND a.ID in
<foreach item="items" index="index" collection="idsStr" open="(" separator="," close=")">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment