Commit 4029aa2b authored by zhaji's avatar zhaji

Merge branch 'develop' into feature-zhaji

parents 3d0ef50a 353a4e12
...@@ -175,6 +175,13 @@ public class DispatchEmpVo implements Serializable { ...@@ -175,6 +175,13 @@ public class DispatchEmpVo implements Serializable {
@Schema(description = "合同年限", name = "contractTerm") @Schema(description = "合同年限", name = "contractTerm")
private String contractTerm; private String contractTerm;
/**
* 合同ID
*/
@ExcelAttribute(name = "合同ID")
@Schema(description = "合同ID")
private String contractId;
/** /**
* 业务细分 * 业务细分
*/ */
......
...@@ -66,7 +66,7 @@ public class EmployeeVO extends RowIndex implements Serializable { ...@@ -66,7 +66,7 @@ public class EmployeeVO extends RowIndex implements Serializable {
* 项目编码 * 项目编码
*/ */
@ExcelProperty(value = "项目编码") @ExcelProperty(value = "项目编码")
@ExcelAttribute(name = "项目编码", maxLength = 32, needExport = true, errorInfo = "身份证号必填且不可超过20位") @ExcelAttribute(name = "项目编码", maxLength = 32, needExport = true, errorInfo = "项目编码必填且不可超过20位")
@Size(max = 32, message = "项目编码不可超过32位") @Size(max = 32, message = "项目编码不可超过32位")
private String deptNo; private String deptNo;
......
...@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo; ...@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
...@@ -57,7 +58,7 @@ public class ProjectSetInfoVo implements Serializable { ...@@ -57,7 +58,7 @@ public class ProjectSetInfoVo implements Serializable {
* 商险结算类型:0预估 1 实缴 * 商险结算类型:0预估 1 实缴
*/ */
@Schema(description = "商险结算类型") @Schema(description = "商险结算类型")
private String insuranceSettleType; private String insuranceSettleType = CommonConstants.ONE_STRING;
} }
...@@ -28,6 +28,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; ...@@ -28,6 +28,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog; import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
...@@ -279,4 +280,18 @@ public class TEmployeeContractInfoController { ...@@ -279,4 +280,18 @@ public class TEmployeeContractInfoController {
tEmployeeContractInfoService.exportContractInfoHistory(contractInfo, response); tEmployeeContractInfoService.exportContractInfoHistory(contractInfo, response);
} }
/**
* @Author fxj
* @Description 通过id查询员工合同
* @Date 10:41 2022/7/25
* @Param
* @return
**/
@Operation(summary = "通过id查询", description = "通过id查询员工合同")
@Inner
@PostMapping("/getContractById")
public R<TEmployeeContractInfo> getContractById(@RequestBody String id) {
return R.ok(tEmployeeContractInfoService.getById(id));
}
} }
...@@ -416,10 +416,12 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -416,10 +416,12 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
} }
if (tEmployeeContractInfo.getAuditStatus() == CommonConstants.dingleDigitIntArray[2]) { if (tEmployeeContractInfo.getAuditStatus() == CommonConstants.dingleDigitIntArray[2]) {
// 作废、终止,不变为在用 // 非作废、终止,本条变为在用
if (Common.isEmpty(contractInfo.getSituation()) if (Common.isEmpty(contractInfo.getSituation())
|| (!EmployeeConstants.SITUATION_SIX.equals(contractInfo.getSituation()) || (!EmployeeConstants.SITUATION_SIX.equals(contractInfo.getSituation())
&& !EmployeeConstants.SITUATION_SEVEN.equals(contractInfo.getSituation()))) { && !EmployeeConstants.SITUATION_SEVEN.equals(contractInfo.getSituation()))) {
// 其他变为不在用
baseMapper.updateInUseStatusById(contractInfo.getEmpId(), contractInfo.getSettleDomain(), contractInfo.getId(), CommonConstants.ONE_STRING);
tEmployeeContractInfo.setAuditTimeLast(LocalDateTime.now()); tEmployeeContractInfo.setAuditTimeLast(LocalDateTime.now());
tEmployeeContractInfo.setInUse(CommonConstants.ZERO_STRING); tEmployeeContractInfo.setInUse(CommonConstants.ZERO_STRING);
// 更新档案、项目合同状态为(1可用) // 更新档案、项目合同状态为(1可用)
......
...@@ -149,6 +149,7 @@ ...@@ -149,6 +149,7 @@
<result property="contractEnd" column="CONTRACT_END"/> <result property="contractEnd" column="CONTRACT_END"/>
<result property="contractTerm" column="CONTRACT_TERM"/> <result property="contractTerm" column="CONTRACT_TERM"/>
<result property="contractSubName" column="CONTRACT_SUB_NAME"/> <result property="contractSubName" column="CONTRACT_SUB_NAME"/>
<result property="contractId" column="CONTRACT_ID"/>
<result property="unitName" column="UNIT_NAME"/> <result property="unitName" column="UNIT_NAME"/>
<result property="unitNo" column="UNIT_NO"/> <result property="unitNo" column="UNIT_NO"/>
...@@ -669,7 +670,7 @@ ...@@ -669,7 +670,7 @@
a.ID_TOWN,a.EMP_REGIS_TYPE,a.FILE_PROVINCE,a.FILE_CITY,a.FILE_TOWN,a.HIGN_EDUCATION,a.FILE_STATUS, a.ID_TOWN,a.EMP_REGIS_TYPE,a.FILE_PROVINCE,a.FILE_CITY,a.FILE_TOWN,a.HIGN_EDUCATION,a.FILE_STATUS,
b.CONTRACT_NAME,b.CONTRACT_TYPE, b.CONTRACT_NAME,b.CONTRACT_TYPE,
b.CONTRACT_START,b.CONTRACT_END,b.CONTRACT_TERM,b.CONTRACT_SUB_NAME, b.CONTRACT_START,b.CONTRACT_END,b.CONTRACT_TERM,b.CONTRACT_SUB_NAME,b.CONTRACT_ID
c.UNIT_NAME, c.UNIT_NAME,
c.UNIT_NO,c.DEPT_ID,c.DEPT_NAME,c.DEPT_NO,c.POST c.UNIT_NO,c.DEPT_ID,c.DEPT_NAME,c.DEPT_NO,c.POST
...@@ -710,7 +711,8 @@ ...@@ -710,7 +711,8 @@
x.CONTRACT_START, x.CONTRACT_START,
x.CONTRACT_END, x.CONTRACT_END,
x.CONTRACT_TERM, x.CONTRACT_TERM,
x.CONTRACT_SUB_NAME x.CONTRACT_SUB_NAME,
x.ID as "CONTRACT_ID"
FROM FROM
t_employee_contract_info x t_employee_contract_info x
WHERE WHERE
......
...@@ -22,7 +22,7 @@ public class ErrorMessage implements Serializable { ...@@ -22,7 +22,7 @@ public class ErrorMessage implements Serializable {
/** /**
* @param 用于展示勾选的名称 * @param 用于展示勾选的名称
* @Author: wangan * @Author: fxj
**/ **/
private String name; private String name;
/** /**
......
...@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.common.dapr.util; ...@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.common.dapr.util;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference; import com.alibaba.fastjson.TypeReference;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*; import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
...@@ -143,4 +144,21 @@ public class ArchivesDaprUtil { ...@@ -143,4 +144,21 @@ public class ArchivesDaprUtil {
} }
return res; return res;
} }
/**
* @param id
* @Description: 获取档案合同
* @Author: fxj
* @Date: 2022/7/25 10:38
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo>
**/
public R<TEmployeeContractInfo> getContractById(String id) {
R<TEmployeeContractInfo> res = HttpDaprUtil.invokeMethodPost(
daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId()
,"/temployeeinfo/inner/getContractById" , id, TEmployeeContractInfo.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){
return R.failed("获取档案信息失败!");
}
return res;
}
} }
...@@ -144,18 +144,34 @@ public class InsurancesConstants { ...@@ -144,18 +144,34 @@ public class InsurancesConstants {
* 商险购买地省名称不能为空 * 商险购买地省名称不能为空
*/ */
public static final String INSURANCE_PROVINCE_NAME_NOT_EMPTY = "商险购买地省名称不能为空"; public static final String INSURANCE_PROVINCE_NAME_NOT_EMPTY = "商险购买地省名称不能为空";
/**
* 商险购买地省名称不存在
*/
public static final String INSURANCE_PROVINCE_NAME_NOT_EXIST = "商险购买地省名称不存在";
/** /**
* 商险购买地市名称 * 商险购买地市名称
*/ */
public static final String INSURANCE_CITY_NAME_NOT_EMPTY = "商险购买地市名称不能为空"; public static final String INSURANCE_CITY_NAME_NOT_EMPTY = "商险购买地市名称不能为空";
/**
* 商险购买地市名称不存在
*/
public static final String INSURANCE_CITY_NAME_NOT_EXIST = "商险购买地市名称不存在";
/** /**
* 商险办理省名称不能为空 * 商险办理省名称不能为空
*/ */
public static final String INSURANCE_HANDLE_PROVINCE_NAME_NOT_EMPTY = "商险办理省名称不能为空"; public static final String INSURANCE_HANDLE_PROVINCE_NAME_NOT_EMPTY = "商险办理省名称不能为空";
/**
* 商险办理省名称不存在
*/
public static final String INSURANCE_HANDLE_PROVINCE_NAME_NOT_EXIST = "商险办理省名称不存在";
/** /**
* 商险办理城市名称不能为空 * 商险办理城市名称不能为空
*/ */
public static final String INSURANCE_HANDLE_CITY_NAME_NOT_EMPTY = "商险办理城市名称不能为空"; public static final String INSURANCE_HANDLE_CITY_NAME_NOT_EMPTY = "商险办理城市名称不能为空";
/**
* 商险办理城市名称不存在
*/
public static final String INSURANCE_HANDLE_CITY_NAME_NOT_EXIST = "商险办理城市名称不存在";
/** /**
* 结算月不能为空 * 结算月不能为空
*/ */
......
...@@ -35,5 +35,11 @@ ...@@ -35,5 +35,11 @@
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId> <artifactId>fastjson</artifactId>
</dependency> </dependency>
</dependencies> <dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-archives-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project> </project>
...@@ -134,4 +134,26 @@ public class TAuditInfo implements Serializable { ...@@ -134,4 +134,26 @@ public class TAuditInfo implements Serializable {
@ExcelProperty("type类型" ) @ExcelProperty("type类型" )
private String type; private String type;
/**
* 部门---员工所在部门
*/
@ExcelAttribute(name = "部门")
@Schema(description = "部门---员工所在部门" )
private String organName;
/**
* 操作内容
*/
@ExcelAttribute(name = "操作内容")
@Schema(description = "操作内容" )
private String title;
/**
* 颜色: red green yellow grey
*/
@ExcelAttribute(name = "颜色")
@Schema(description = "颜色: red green yellow grey" )
private String color;
} }
...@@ -265,6 +265,14 @@ public class TDispatchInfo extends BaseEntity { ...@@ -265,6 +265,14 @@ public class TDispatchInfo extends BaseEntity {
@Schema(description = "合同年限" ) @Schema(description = "合同年限" )
@ExcelProperty("合同年限" ) @ExcelProperty("合同年限" )
private String contractTerm; private String contractTerm;
/**
* 合同ID ---- 派增持有
*/
@ExcelAttribute(name = "合同ID" )
@Schema(description = "合同ID---- 派增持有" )
@ExcelProperty("合同ID" )
private String contractId;
/** /**
* 户口性质 * 户口性质
*/ */
......
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.social.entity.TAuditInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TProvidentFund;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @Author fxj
* @Date 2022/7/25
* @Description
* @Version 1.0
*/
@Data
public class DispatchDetailVo implements Serializable {
/**
* 员工信息
**/
private TEmployeeInfo employee;
/**
* 员工信息
**/
private TEmployeeProject project;
/**
* 合同
**/
private TEmployeeContractInfo contract;
/**
* 派单
**/
private TDispatchInfo dispatch;
/**
* 社保
**/
private TSocialInfo social;
/**
* 公积金
**/
private TProvidentFund fund;
/**
* 流程进展明细
**/
private List<TAuditInfo> audits;
}
...@@ -8,4 +8,5 @@ package com.yifu.cloud.plus.v1.yifu.social.constants; ...@@ -8,4 +8,5 @@ package com.yifu.cloud.plus.v1.yifu.social.constants;
public class SocialConstants { public class SocialConstants {
// 社保补缴配置有误! // 社保补缴配置有误!
public static final String SOCIAL_SET_ERROR = "社保补缴配置有误!"; public static final String SOCIAL_SET_ERROR = "社保补缴配置有误!";
public static final String EMP_NAME_ERROR = "员工姓名错误!";
} }
...@@ -19,11 +19,16 @@ package com.yifu.cloud.plus.v1.yifu.social.controller; ...@@ -19,11 +19,16 @@ package com.yifu.cloud.plus.v1.yifu.social.controller;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog; 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.entity.TDispatchInfo;
import com.yifu.cloud.plus.v1.yifu.social.service.TDispatchInfoService; 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.TDispatchInfoSearchVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoSearchVo;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.security.SecurityRequirement;
...@@ -65,6 +70,7 @@ public class TDispatchInfoController { ...@@ -65,6 +70,7 @@ public class TDispatchInfoController {
public R<IPage<TDispatchInfo>> getTDispatchInfoPage(Page<TDispatchInfo> page, TDispatchInfoSearchVo tDispatchInfo) { public R<IPage<TDispatchInfo>> getTDispatchInfoPage(Page<TDispatchInfo> page, TDispatchInfoSearchVo tDispatchInfo) {
return new R<>(tDispatchInfoService.getTDispatchInfoPage(page,tDispatchInfo)); return new R<>(tDispatchInfoService.getTDispatchInfoPage(page,tDispatchInfo));
} }
/** /**
* 不分页查询 * 不分页查询
* @param tDispatchInfo 派单信息记录表 * @param tDispatchInfo 派单信息记录表
...@@ -76,7 +82,48 @@ public class TDispatchInfoController { ...@@ -76,7 +82,48 @@ public class TDispatchInfoController {
public R<List<TDispatchInfo>> getTDispatchInfoNoPage(@RequestBody TDispatchInfoSearchVo tDispatchInfo) { public R<List<TDispatchInfo>> getTDispatchInfoNoPage(@RequestBody TDispatchInfoSearchVo tDispatchInfo) {
return R.ok(tDispatchInfoService.noPageDiy(tDispatchInfo)); return R.ok(tDispatchInfoService.noPageDiy(tDispatchInfo));
} }
/**
* 简单分页查询--申请
* @param page 分页对象
* @param tDispatchInfo 派单信息记录表--申请
* @return
*/
@Operation(description = "简单分页查询--申请")
@GetMapping("/pageApply")
public R<IPage<TDispatchInfo>> getTDispatchApplyPage(Page<TDispatchInfo> page, TDispatchInfoSearchVo tDispatchInfo) {
YifuUser user = SecurityUtils.getUser();
if (Common.isEmpty(user)){
return R.failed(CommonConstants.USER_FAIL);
}
tDispatchInfo.setCreateBy(user.getId());
return new R<>(tDispatchInfoService.getTDispatchInfoPage(page,tDispatchInfo));
}
/**
* 简单分页查询--审核
* @param page 分页对象
* @param tDispatchInfo 派单信息记录表--审核
* @return
*/
@Operation(description = "简单分页查询--审核")
@GetMapping("/pageAudit")
public R<IPage<TDispatchInfo>> getTDispatchAuditPage(Page<TDispatchInfo> page, TDispatchInfoSearchVo tDispatchInfo) {
tDispatchInfo.setStatus(CommonConstants.ZERO_STRING);
return new R<>(tDispatchInfoService.getTDispatchInfoPage(page,tDispatchInfo));
}
/**
* 简单分页查询--审核
* @param page 分页对象
* @param tDispatchInfo 派单信息记录表--审核
* @return
*/
@Operation(description = "简单分页查询--审核")
@GetMapping("/pageHandle")
public R<IPage<TDispatchInfo>> getTDispatchHandlePage(Page<TDispatchInfo> page, TDispatchInfoSearchVo tDispatchInfo) {
tDispatchInfo.setStatus(CommonConstants.ONE_STRING);
return new R<>(tDispatchInfoService.getTDispatchInfoPage(page,tDispatchInfo));
}
/** /**
* 通过id查询派单信息记录表 * 通过id查询派单信息记录表
* @param id id * @param id id
...@@ -89,7 +136,21 @@ public class TDispatchInfoController { ...@@ -89,7 +136,21 @@ public class TDispatchInfoController {
return R.ok(tDispatchInfoService.getById(id)); return R.ok(tDispatchInfoService.getById(id));
} }
/** /**
* 通过id查询派单相关系信息
* @author fxj
* @param id id
* @return R
* @date 2022-07-25 10:19
*/
@Operation(summary = "通过id查询派单相关系信息", description = "通过id查询派单相关系信息")
@GetMapping("/getSocialAndFundInfoById" )
public R<DispatchDetailVo> getSocialAndFundInfoById(@RequestParam(value = "id") String id) {
return R.ok(tDispatchInfoService.getSocialAndFundInfoById(id));
}
/**
* 新增派单信息记录表 * 新增派单信息记录表
* @param tDispatchInfo 派单信息记录表 * @param tDispatchInfo 派单信息记录表
* @return R * @return R
......
...@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; 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.entity.TDispatchInfo;
import com.yifu.cloud.plus.v1.yifu.social.vo.DispatchDetailVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoSearchVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
...@@ -50,4 +51,6 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> { ...@@ -50,4 +51,6 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
R<List<ErrorMessage>> importReduceDiy(InputStream inputStream); R<List<ErrorMessage>> importReduceDiy(InputStream inputStream);
R<Boolean> removeByIdDiy(String id); R<Boolean> removeByIdDiy(String id);
DispatchDetailVo getSocialAndFundInfoById(String id);
} }
...@@ -30,6 +30,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -30,6 +30,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*; import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes; import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes;
...@@ -41,6 +44,7 @@ import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils; ...@@ -41,6 +44,7 @@ import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.social.entity.*; import com.yifu.cloud.plus.v1.yifu.social.entity.*;
import com.yifu.cloud.plus.v1.yifu.social.mapper.*; import com.yifu.cloud.plus.v1.yifu.social.mapper.*;
import com.yifu.cloud.plus.v1.yifu.social.service.TDispatchInfoService; 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.TDispatchImportVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchImportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoSearchVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchReduceVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchReduceVo;
...@@ -79,6 +83,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -79,6 +83,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
private final TProvidentFundMapper fundMapper; private final TProvidentFundMapper fundMapper;
/** /**
* 派单信息记录表简单分页查询 * 派单信息记录表简单分页查询
* *
...@@ -394,7 +399,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -394,7 +399,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
Map<String, EmpProjectDispatchVo> projectsMap = null; Map<String, EmpProjectDispatchVo> projectsMap = null;
TDispatchImportVo excel; TDispatchImportVo excel;
DispatchEmpVo empVo; DispatchEmpVo empVo;
EmpContractDispatchVo contract; EmpContractDispatchVo contract = null;
EmpProjectDispatchVo project = null; EmpProjectDispatchVo project = null;
EmpAddDispatchVo emp = null; EmpAddDispatchVo emp = null;
TSocialInfo social = null; TSocialInfo social = null;
...@@ -458,6 +463,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -458,6 +463,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(fund)){ if (Common.isNotNull(fund)){
dispatch.setFundId(fund.getId()); dispatch.setFundId(fund.getId());
} }
if (Common.isNotNull(contract)){
dispatch.setContractId(contract.getId());
}
} }
insertDispatch(emp, dispatch); insertDispatch(emp, dispatch);
} }
...@@ -789,6 +797,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -789,6 +797,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatch.setFileProvince(empVo.getFileProvince()); dispatch.setFileProvince(empVo.getFileProvince());
dispatch.setFileCity(empVo.getFileCity()); dispatch.setFileCity(empVo.getFileCity());
dispatch.setFileTown(empVo.getFileTown()); dispatch.setFileTown(empVo.getFileTown());
dispatch.setContractId(empVo.getContractId());
} }
dispatchMap.put(excel.getEmpIdcard(),dispatch); dispatchMap.put(excel.getEmpIdcard(),dispatch);
...@@ -1593,7 +1602,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1593,7 +1602,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
@Override @Override
public R<Boolean> removeByIdDiy(String id) { public R<Boolean> removeByIdDiy(String id) {
if (Common.isEmpty(id)){ if (Common.isEmpty(id)){
return R.failed(CommonConstants.PARAM_IS_NOT_EMPTY) return R.failed(CommonConstants.PARAM_IS_NOT_EMPTY);
} }
TDispatchInfo dispatch = baseMapper.selectById(id); TDispatchInfo dispatch = baseMapper.selectById(id);
if (Common.isEmpty(dispatch)){ if (Common.isEmpty(dispatch)){
...@@ -1606,4 +1615,47 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1606,4 +1615,47 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return R.failed(false,CommonConstants.SAVE_FAILED); return R.failed(false,CommonConstants.SAVE_FAILED);
} }
} }
/**
* 通过id查询派单相关系信息
* @author fxj
* @param id id
* @return R
* @date 2022-07-25 10:19
*/
@Override
public DispatchDetailVo getSocialAndFundInfoById(String id) {
DispatchDetailVo detailVo = new DispatchDetailVo();
TDispatchInfo dispatch = baseMapper.selectById(id);
detailVo.setDispatch(dispatch);
if (Common.isNotNull(dispatch)){
if (Common.isNotNull(dispatch.getSocialId())){
detailVo.setSocial(socialMapper.selectById(dispatch.getSocialId()));
}
if (Common.isNotNull(dispatch.getFundId())){
detailVo.setFund(fundMapper.selectById(dispatch.getFundId()));
}
if (Common.isNotNull(dispatch.getContractId())){
R<TEmployeeContractInfo> res = archivesDaprUtil.getContractById(dispatch.getContractId());
if (Common.isNotNull(res)){
detailVo.setContract(res.getData());
}
}
if (Common.isNotNull(dispatch.getSettleDomain()) && Common.isNotNull(dispatch.getEmpId())){
TEmployeeProject temp = new TEmployeeProject();
temp.setDeptId(dispatch.getSettleDomain());
temp.setEmpId(dispatch.getEmpId());
R<TEmployeeProject> res = archivesDaprUtil.getTEmployeeProjectById(temp);
if (Common.isNotNull(res)){
detailVo.setProject(res.getData());
}
}
if (Common.isNotNull(dispatch.getEmpId())){
R<TEmployeeInfo> res = archivesDaprUtil.getTEmployeeInfoById(dispatch.getEmpId());
if (Common.isNotNull(res)){
detailVo.setEmployee(res.getData());
}
}
}
return detailVo;
}
} }
...@@ -36,15 +36,11 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; ...@@ -36,15 +36,11 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*; import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil; import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity; import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import com.yifu.cloud.plus.v1.yifu.social.entity.TAuditInfo; import com.yifu.cloud.plus.v1.yifu.social.constants.SocialConstants;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo; import com.yifu.cloud.plus.v1.yifu.social.entity.*;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialLog;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialFundInfoMapper; import com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialFundInfoMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TAuditInfoService; import com.yifu.cloud.plus.v1.yifu.social.service.*;
import com.yifu.cloud.plus.v1.yifu.social.service.TDispatchInfoService; import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundHistoryVo;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialFundInfoService;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialLogService;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoDetailVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoDetailVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoSearchVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoVo;
...@@ -58,7 +54,9 @@ import java.io.IOException; ...@@ -58,7 +54,9 @@ import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 社保公积金查询表 * 社保公积金查询表
...@@ -75,6 +73,7 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe ...@@ -75,6 +73,7 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
private final TDispatchInfoService tDispatchInfoService; private final TDispatchInfoService tDispatchInfoService;
private final TSocialLogService tSocialLogService; private final TSocialLogService tSocialLogService;
private final TAuditInfoService tAuditInfoService; private final TAuditInfoService tAuditInfoService;
private final TForecastLibraryService tForecastLibraryService;
/** /**
* 社保公积金查询表简单分页查询 * 社保公积金查询表简单分页查询
...@@ -191,12 +190,12 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe ...@@ -191,12 +190,12 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
@Override @Override
public R<List<ErrorMessage>> importDiy(InputStream inputStream) { public R<List<ErrorMessage>> importDiy(InputStream inputStream) {
List<ErrorMessage> errorMessageList = new ArrayList<>(); List<ErrorMessage> errorMessageList = new ArrayList<>();
ExcelUtil<TSocialFundInfoVo> util1 = new ExcelUtil<>(TSocialFundInfoVo.class); ExcelUtil<TSocialFundHistoryVo> util1 = new ExcelUtil<>(TSocialFundHistoryVo.class);
// 写法2: // 写法2:
// 匿名内部类 不用额外写一个DemoDataListener // 匿名内部类 不用额外写一个DemoDataListener
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭 // 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
try { try {
EasyExcel.read(inputStream, TSocialFundInfoVo.class, new ReadListener<TSocialFundInfoVo>() { EasyExcel.read(inputStream, TSocialFundInfoVo.class, new ReadListener<TSocialFundHistoryVo>() {
/** /**
* 单次缓存的数据量 * 单次缓存的数据量
*/ */
...@@ -204,10 +203,10 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe ...@@ -204,10 +203,10 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
/** /**
*临时存储 *临时存储
*/ */
private List<TSocialFundInfoVo> cachedDataList = ListUtils.newArrayListWithExpectedSize(BATCH_COUNT); private List<TSocialFundHistoryVo> cachedDataList = ListUtils.newArrayListWithExpectedSize(BATCH_COUNT);
@Override @Override
public void invoke(TSocialFundInfoVo data, AnalysisContext context) { public void invoke(TSocialFundHistoryVo data, AnalysisContext context) {
ReadRowHolder readRowHolder = context.readRowHolder(); ReadRowHolder readRowHolder = context.readRowHolder();
Integer rowIndex = readRowHolder.getRowIndex(); Integer rowIndex = readRowHolder.getRowIndex();
data.setRowIndex(rowIndex + 1); data.setRowIndex(rowIndex + 1);
...@@ -245,24 +244,56 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe ...@@ -245,24 +244,56 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
return R.ok(errorMessageList); return R.ok(errorMessageList);
} }
private void importTSocialFundInfo(List<TSocialFundInfoVo> excelVOList, List<ErrorMessage> errorMessageList) { private void importTSocialFundInfo(List<TSocialFundHistoryVo> excelVOList, List<ErrorMessage> errorMessageList) {
// 个性化校验逻辑 // 个性化校验逻辑
ErrorMessage errorMsg; ErrorMessage errorMsg;
// 执行数据插入操作 组装 // 执行数据插入操作 组装
TSocialFundHistoryVo excel;
List<String> idCardList = new ArrayList<>();
for (int i = 0; i < excelVOList.size(); i++) {
idCardList.add(excelVOList.get(i).getIdCard());
}
List<TSocialFundInfo> socialFundInfoList = this.list(Wrappers.<TSocialFundInfo>query().lambda()
.in(TSocialFundInfo::getEmpIdcard, idCardList));
Map<String, TSocialFundInfo> socialFundInfoMap = new HashMap<>();
if (socialFundInfoList != null && !socialFundInfoList.isEmpty()) {
for (TSocialFundInfo socialFundInfo : socialFundInfoList) {
socialFundInfoMap.put(socialFundInfo.getEmpIdcard(), socialFundInfo);
}
socialFundInfoList.clear();
}
TSocialFundInfo oldSocialFundInfo;
TSocialFundInfo socialFundInfo;
for (int i = 0; i < excelVOList.size(); i++) { for (int i = 0; i < excelVOList.size(); i++) {
TSocialFundInfoVo excel = excelVOList.get(i); excel = excelVOList.get(i);
// 数据合法情况 TODO socialFundInfo = socialFundInfoMap.get(excel.getIdCard());
if (socialFundInfo.getEmpName().equals(excel.getName())) {
// 插入 // 0:校验数据有效性-TODO
insertExcel(excel);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), CommonConstants.SAVE_SUCCESS)); // 1:更新社保公积金查询-TODO
//updateSocialFundInfo(socialFundInfo, excel);
// 2:新增调基记录
insertExcel(excel);
// 3:新增变更日志
oldSocialFundInfo = new TSocialFundInfo();
BeanUtil.copyProperties(socialFundInfo, oldSocialFundInfo);
tSocialLogService.saveModificationRecord(CommonConstants.ONE_INT, oldSocialFundInfo.getId(), oldSocialFundInfo, socialFundInfo);
// 4:同步预估库-TODO
//tForecastLibraryService.
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), CommonConstants.SAVE_SUCCESS, CommonConstants.GREEN));
} else {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), SocialConstants.EMP_NAME_ERROR));
}
} }
} }
/** /**
* 插入excel bad record * 插入excel bad record
*/ */
private void insertExcel(TSocialFundInfoVo excel) { private void insertExcel(TSocialFundHistoryVo excel) {
TSocialFundInfo insert = new TSocialFundInfo(); TSocialFundInfo insert = new TSocialFundInfo();
BeanUtil.copyProperties(excel, insert); BeanUtil.copyProperties(excel, insert);
this.save(insert); this.save(insert);
......
...@@ -32,10 +32,9 @@ ...@@ -32,10 +32,9 @@
<result property="auditTime" column="AUDIT_TIME"/> <result property="auditTime" column="AUDIT_TIME"/>
<result property="isCommision" column="IS_COMMISION"/> <result property="isCommision" column="IS_COMMISION"/>
<result property="providentId" column="PROVIDENT_ID"/> <result property="providentId" column="PROVIDENT_ID"/>
<result property="cardinalId" column="CARDINAL_ID"/> <result property="organName" column="ORGAN_NAME"/>
<result property="forecastFormId" column="FORECAST_FORM_ID"/> <result property="title" column="TITLE"/>
<result property="empLeaveId" column="EMP_LEAVE_ID"/> <result property="color" column="COLOR"/>
<result property="aprovalFormId" column="APROVAL_FORM_ID"/>
<result property="dispatchInfoId" column="DISPATCH_INFO_ID"/> <result property="dispatchInfoId" column="DISPATCH_INFO_ID"/>
<result property="type" column="TYPE"/> <result property="type" column="TYPE"/>
</resultMap> </resultMap>
...@@ -48,10 +47,9 @@ ...@@ -48,10 +47,9 @@
a.AUDIT_TIME, a.AUDIT_TIME,
a.IS_COMMISION, a.IS_COMMISION,
a.PROVIDENT_ID, a.PROVIDENT_ID,
a.CARDINAL_ID, a.ORGAN_NAME,
a.FORECAST_FORM_ID, a.TITLE,
a.EMP_LEAVE_ID, a.COLOR,
a.APROVAL_FORM_ID,
a.DISPATCH_INFO_ID, a.DISPATCH_INFO_ID,
a.TYPE a.TYPE
</sql> </sql>
...@@ -81,18 +79,6 @@ ...@@ -81,18 +79,6 @@
<if test="tAuditInfo.providentId != null and tAuditInfo.providentId.trim() != ''"> <if test="tAuditInfo.providentId != null and tAuditInfo.providentId.trim() != ''">
AND a.PROVIDENT_ID = #{tAuditInfo.providentId} AND a.PROVIDENT_ID = #{tAuditInfo.providentId}
</if> </if>
<if test="tAuditInfo.cardinalId != null and tAuditInfo.cardinalId.trim() != ''">
AND a.CARDINAL_ID = #{tAuditInfo.cardinalId}
</if>
<if test="tAuditInfo.forecastFormId != null and tAuditInfo.forecastFormId.trim() != ''">
AND a.FORECAST_FORM_ID = #{tAuditInfo.forecastFormId}
</if>
<if test="tAuditInfo.empLeaveId != null and tAuditInfo.empLeaveId.trim() != ''">
AND a.EMP_LEAVE_ID = #{tAuditInfo.empLeaveId}
</if>
<if test="tAuditInfo.aprovalFormId != null and tAuditInfo.aprovalFormId.trim() != ''">
AND a.APROVAL_FORM_ID = #{tAuditInfo.aprovalFormId}
</if>
<if test="tAuditInfo.dispatchInfoId != null and tAuditInfo.dispatchInfoId.trim() != ''"> <if test="tAuditInfo.dispatchInfoId != null and tAuditInfo.dispatchInfoId.trim() != ''">
AND a.DISPATCH_INFO_ID = #{tAuditInfo.dispatchInfoId} AND a.DISPATCH_INFO_ID = #{tAuditInfo.dispatchInfoId}
</if> </if>
......
...@@ -85,6 +85,8 @@ ...@@ -85,6 +85,8 @@
<result property="belongUnitName" column="BELONG_UNIT_NAME"/> <result property="belongUnitName" column="BELONG_UNIT_NAME"/>
<result property="dispatchCode" column="DISPATCH_CODE"/> <result property="dispatchCode" column="DISPATCH_CODE"/>
<result property="contractSubName" column="CONTRACT_SUB_NAME"/> <result property="contractSubName" column="CONTRACT_SUB_NAME"/>
<result property="contractId" column="CONTRACT_ID"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
...@@ -149,7 +151,8 @@ ...@@ -149,7 +151,8 @@
a.BELONG_UNIT_NAME, a.BELONG_UNIT_NAME,
a.DISPATCH_CODE, a.DISPATCH_CODE,
a.SETTLE_DOMAIN_CODE, a.SETTLE_DOMAIN_CODE,
a.CONTRACT_SUB_NAME a.CONTRACT_SUB_NAME,
a.CONTRACT_ID
</sql> </sql>
<sql id="tDispatchInfo_where"> <sql id="tDispatchInfo_where">
<if test="tDispatchInfo != null"> <if test="tDispatchInfo != null">
......
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