Commit 1427f488 authored by hongguangwu's avatar hongguangwu

MVP1.6.6-社保士兵实缴——加个拦截

parent 34a29526
......@@ -17,20 +17,16 @@
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;
/**
* 预入职-主表
* 预入职批量完善信息使用
*
* @author hgw
* @date 2024-06-17 11:31:08
......@@ -38,215 +34,28 @@ import java.util.Date;
@Data
public class TPreEmpMainVo extends RowIndex implements Serializable {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@NotBlank(message = "主键 不能为空")
@Length(max = 32, message = "主键 不能超过32 个字符")
@ExcelAttribute(name = "主键", isNotEmpty = true, errorInfo = "主键 不能为空", maxLength = 32)
@Schema(description = "主键")
@ExcelProperty("主键")
private String id;
/**
* 审核状态(0待完善;1待审核;2审核通过;3审核不通过)
*/
@NotBlank(message = "审核状态(0待完善;1待审核;2审核通过;3审核不通过) 不能为空")
@Length(max = 1, message = "审核状态(0待完善;1待审核;2审核通过;3审核不通过) 不能超过1 个字符")
@ExcelAttribute(name = "审核状态(0待完善;1待审核;2审核通过;3审核不通过)", isNotEmpty = true, errorInfo = "审核状态(0待完善;1待审核;2审核通过;3审核不通过) 不能为空", maxLength = 1)
@Schema(description = "审核状态(0待完善;1待审核;2审核通过;3审核不通过)")
@ExcelProperty("审核状态(0待完善;1待审核;2审核通过;3审核不通过)")
private String status;
/**
* 员工ID
*/
@Length(max = 32, message = "员工ID 不能超过32 个字符")
@ExcelAttribute(name = "员工ID", maxLength = 32)
@Schema(description = "员工ID")
@ExcelProperty("员工ID")
private String empId;
/**
* 员工姓名
*/
@Length(max = 32, message = "员工姓名 不能超过32 个字符")
@ExcelAttribute(name = "员工姓名", maxLength = 32)
@Schema(description = "员工姓名")
@ExcelProperty("员工姓名")
private String empName;
/**
* 身份证号
*/
@Length(max = 20, message = "身份证号 不能超过20 个字符")
@ExcelAttribute(name = "身份证号", maxLength = 20)
@Schema(description = "身份证号")
@ExcelProperty("身份证号")
private String empIdcard;
/**
* 手机号码
*/
@Length(max = 32, message = "手机号码 不能超过32 个字符")
@ExcelAttribute(name = "手机号码", maxLength = 32)
@Schema(description = "手机号码")
@ExcelProperty("手机号码")
private String empPhone;
/**
* 微信名
*/
@Length(max = 32, message = "微信名 不能超过32 个字符")
@ExcelAttribute(name = "微信名", maxLength = 32)
@Schema(description = "微信名")
@ExcelProperty("微信名")
private String empWx;
/**
* 客户id
*/
@Length(max = 32, message = "客户id 不能超过32 个字符")
@ExcelAttribute(name = "客户id", maxLength = 32)
@Schema(description = "客户id")
@ExcelProperty("客户id")
private String unitId;
/**
* 客户名称
*/
@Length(max = 50, message = "客户名称 不能超过50 个字符")
@ExcelAttribute(name = "客户名称", maxLength = 50)
@Schema(description = "客户名称")
@ExcelProperty("客户名称")
private String unitName;
/**
* 客户编码
*/
@Length(max = 32, message = "客户编码 不能超过32 个字符")
@ExcelAttribute(name = "客户编码", maxLength = 32)
@Schema(description = "客户编码")
@ExcelProperty("客户编码")
private String unitNo;
/**
* 项目id
*/
@Length(max = 32, message = "项目id 不能超过32 个字符")
@ExcelAttribute(name = "项目id", maxLength = 32)
@Schema(description = "项目id")
@ExcelProperty("项目id")
private String deptId;
/**
* 项目名称
*/
@Length(max = 50, message = "项目名称 不能超过50 个字符")
@ExcelAttribute(name = "项目名称", maxLength = 50)
@Schema(description = "项目名称")
@ExcelProperty("项目名称")
private String deptName;
/**
* 项目编码
*/
@NotBlank(message = "项目编码 不能为空")
@Length(max = 30, message = "项目编码 不能超过30 个字符")
@ExcelAttribute(name = "项目编码", isNotEmpty = true, errorInfo = "项目编码 不能为空", maxLength = 30)
@Schema(description = "项目编码")
@Length(max = 32, message = "项目编码 不能超过32 个字符")
@ExcelAttribute(name = "项目编码", maxLength = 32)
@ExcelProperty("项目编码")
private String deptNo;
/**
* 业务类型一级分类
*/
@Length(max = 32, message = "业务类型一级分类 不能超过32 个字符")
@ExcelAttribute(name = "业务类型一级分类", maxLength = 32)
@Schema(description = "业务类型一级分类")
@ExcelProperty("业务类型一级分类")
private String businessPrimaryType;
/**
* 业务类型二级分类
*/
@Length(max = 32, message = "业务类型二级分类 不能超过32 个字符")
@ExcelAttribute(name = "业务类型二级分类", maxLength = 32)
@Schema(description = "业务类型二级分类")
@ExcelProperty("业务类型二级分类")
private String businessSecondType;
/**
* 业务类型三级分类
*/
@Length(max = 32, message = "业务类型三级分类 不能超过32 个字符")
@ExcelAttribute(name = "业务类型三级分类", maxLength = 32)
@Schema(description = "业务类型三级分类")
@ExcelProperty("业务类型三级分类")
private String businessThirdType;
/**
* 员工类型(字典值,0外包1派遣2代理)
*/
@NotBlank(message = "员工类型(字典值,0外包1派遣2代理) 不能为空")
@Length(max = 2, message = "员工类型(字典值,0外包1派遣2代理) 不能超过2 个字符")
@ExcelAttribute(name = "员工类型(字典值,0外包1派遣2代理)", isNotEmpty = true, errorInfo = "员工类型(字典值,0外包1派遣2代理) 不能为空", maxLength = 2)
@Schema(description = "员工类型(字典值,0外包1派遣2代理)")
@ExcelProperty("员工类型(字典值,0外包1派遣2代理)")
@ExcelAttribute(name = "身份证号")
@ExcelProperty("身份证号")
private String empIdcard;
@ExcelAttribute(name = "员工类型", isDataId = true, dataType = ExcelAttributeConstants.EMP_NATRUE)
@ExcelProperty("员工类型")
private String empNatrue;
/**
* 审核人ID
*/
@Length(max = 32, message = "审核人ID 不能超过32 个字符")
@ExcelAttribute(name = "审核人ID", maxLength = 32)
@Schema(description = "审核人ID")
@ExcelProperty("审核人ID")
private String auditId;
/**
* 审核人姓名
*/
@Length(max = 20, message = "审核人姓名 不能超过20 个字符")
@ExcelAttribute(name = "审核人姓名", maxLength = 20)
@Schema(description = "审核人姓名")
@ExcelProperty("审核人姓名")
private String auditName;
/**
* 审核时间
*/
@ExcelAttribute(name = "审核时间", isDate = true)
@Schema(description = "审核时间")
@ExcelProperty("审核时间")
private Date auditTime;
/**
* 创建者
*/
@Length(max = 64, message = "创建者 不能超过64 个字符")
@ExcelAttribute(name = "创建者", maxLength = 64)
@Schema(description = "创建者")
@ExcelProperty("创建者")
private String createBy;
/**
* 更新人
*/
@Length(max = 64, message = "更新人 不能超过64 个字符")
@ExcelAttribute(name = "更新人", maxLength = 64)
@Schema(description = "更新人")
@ExcelProperty("更新人")
private String updateBy;
/**
* 创建人姓名
*/
@Length(max = 32, message = "创建人姓名 不能超过32 个字符")
@ExcelAttribute(name = "创建人姓名", maxLength = 32)
@Schema(description = "创建人姓名")
@ExcelProperty("创建人姓名")
private String createName;
/**
* 创建时间
*/
@ExcelAttribute(name = "创建时间", isDate = true)
@Schema(description = "创建时间")
@ExcelProperty("创建时间")
private Date createTime;
/**
* 更新时间
*/
@ExcelAttribute(name = "更新时间", isDate = true)
@Schema(description = "更新时间")
@ExcelProperty("更新时间")
private Date updateTime;
/**
* 结算主体ID
*/
@Length(max = 32, message = "结算主体ID 不能超过32 个字符")
@ExcelAttribute(name = "结算主体ID", maxLength = 32)
@Schema(description = "结算主体ID")
@ExcelProperty("结算主体ID")
private String settleDomain;
@ExcelAttribute(name = "档案所在地省", isArea = true)
@ExcelProperty("档案所在地省")
private String fileProvince;
@ExcelAttribute(name = "档案所在地市", isArea = true)
@ExcelProperty("档案所在地市")
private String fileCity;
@ExcelAttribute(name = "档案所在地县", isArea = true)
@ExcelProperty("档案所在地县")
private String fileTown;
}
......@@ -67,6 +67,24 @@ public class FileUploadController {
return fileUploadService.uploadImg(file,filePath,type,domain);
}
/**
* @Author fxj
* @Description
* @Date 13:49 2022/6/17
* @Param
* @return
**/
@Operation(description = "OSS文件上传接口" +
"@ApiImplicitParam(name = \"file\", value = \"Form文件上传\", required = true, dataType = \"__file\", paramType = \"form\"),\n" +
"\t\t\t@ApiImplicitParam(name = \"filePath\", value = \"文件上传路径\", required = false, dataType = \"String\", paramType = \"form\"),\n" +
"\t\t\t@ApiImplicitParam(name = \"type\", value = \"关系类型(0员工附件-学历 1 员工附件-伤残 2.员工附件-职业 3.员工附件-不良记录 4.员工附件-合同;5收入证明)\", required = true, dataType = \"int\", paramType = \"form\"),\n" +
"\t\t\t@ApiImplicitParam(name = \"domain\", value = \"实体id(传入就插入对应关系,用于编辑)\", required = false, paramType = \"form\")\n" +
"\t")
@PostMapping(value = "/uploadFileReturnAtta")
public R<TAttaInfo> uploadFileReturnAtta(@RequestBody MultipartFile file, String filePath, Integer type, String domain) throws IOException {
return fileUploadService.uploadFileReturnAtta(file,filePath,type,domain);
}
/**
* @Author fxj
......
......@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmpMain;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.service.TPreEmpMainService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.PreEmpMainDetailVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TPreEmpMainSearchVo;
......@@ -111,6 +112,32 @@ public class TPreEmpMainController {
return tPreEmpMainService.getInfoById(id);
}
/**
* 预入职单个完善信息
* hgw
* 2024-6-21 11:49:35
*/
@Operation(summary = "预入职单个完善信息", description = "预入职单个完善信息")
@SysLog("预入职单个完善信息")
@PostMapping("/doImproveInformation")
public R<String> doImproveInformation(@RequestBody PreEmpMainDetailVo vo) {
return tPreEmpMainService.doImproveInformation(vo);
}
/**
* 预入职批量完善信息
* @author hgw
* @date 2024-6-21 15:25:20
**/
@SneakyThrows
@Operation(description = "预入职批量完善信息hasPermission('archives_tpreempmain-batch-import')")
@SysLog("预入职批量完善信息")
@PostMapping("/importListAdd")
@PreAuthorize("@pms.hasPermission('archives_tpreempmain-batch-import')")
public R<List<ErrorMessage>> importListAdd(@RequestBody MultipartFile file) {
return tPreEmpMainService.importDiy(file.getInputStream());
}
/**
* 草稿预入职
* hgw
......@@ -165,21 +192,6 @@ public class TPreEmpMainController {
return R.ok(tPreEmpMainService.removeById(id));
}
/**
* 预入职-主表 批量导入
*
* @author hgw
* @date 2024-06-17 11:31:08
**/
@SneakyThrows
@Operation(description = "批量新增预入职-主表 hasPermission('archives_tpreempmain-batch-import')")
@SysLog("批量新增预入职-主表")
@PostMapping("/importListAdd")
@PreAuthorize("@pms.hasPermission('archives_tpreempmain-batch-import')")
public R<List<ErrorMessage>> importListAdd(@RequestBody MultipartFile file) {
return tPreEmpMainService.importDiy(file.getInputStream());
}
/**
* 预入职-主表 批量导出
*
......
......@@ -42,4 +42,6 @@ public interface TPreEmpMainMapper extends BaseMapper<TPreEmpMain> {
TPreEmpMain getTPreEmpMainByCardAndDept(@Param("empIdCard") String empIdCard, @Param("deptId") String deptId);
TPreEmpMain getTPreEmpMainByCardAndDeptNo(@Param("empIdCard") String empIdCard, @Param("deptNo") String deptNo);
}
......@@ -17,5 +17,7 @@ public interface FileUploadService {
R<FileVo> uploadImg(MultipartFile file, String filePath, Integer type, String domain) throws IOException;
R<TAttaInfo> uploadFileReturnAtta(MultipartFile file, String filePath, Integer type, String domain) throws IOException;
R<FileVo> createQrCode(String domainId, String url, String name);
}
......@@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmpMain;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.PreEmpMainDetailVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TPreEmpMainSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
......@@ -61,11 +62,14 @@ public interface TPreEmpMainService extends IService<TPreEmpMain> {
**/
R<PreEmpMainDetailVo> getByCardAndDeptId(String empIdCard, String deptId);
// 单个完善信息
R<String> doImproveInformation(PreEmpMainDetailVo vo);
// 草稿
R<String> saveDraftPreEmpMain(PreEmpMainDetailVo vo);
// 保存
R<String> savePreEmpMain(PreEmpMainDetailVo vo);
// 批量完善信息
R<List<ErrorMessage>> importDiy(InputStream inputStream);
void listExport(HttpServletResponse response, TPreEmpMainSearchVo searchVo);
......
......@@ -32,6 +32,52 @@ public class FileUploadServiceImpl implements FileUploadService {
private final QrCodeUtil codeUtil;
@Override
public R<TAttaInfo> uploadFileReturnAtta(MultipartFile file, String filePath, Integer type, String domain) throws IOException {
if (null == file) {
return R.failed("文件删除异常,请重新上传!");
}
String fileName = file.getOriginalFilename();
if (fileName == null || Common.isEmpty(fileName)) {
return R.failed("文件名不能为空!!");
}
if (fileName.length() > 100) {
return R.failed("文件名不能超过100个字符!");
}
//filePath不传默认存储空间的根目录
//jpg,jpeg,png,bmp
String key = "";
if (Common.isNotNull(filePath)) {
key = filePath + "/" + System.currentTimeMillis() + fileName;
} else {
key = System.currentTimeMillis() + fileName;
}
if (!Common.checkFile(key)) {
return R.failed("非法上传类型!");
}
boolean flag = ossUtil.uploadFileByStream(file.getInputStream(), key, null);
TAttaInfo attaInfo;
URL url;
if (flag) {
log.info("文件:" + fileName + "上传到存储空间" + ossUtil.getBucketName() + "成功!");
attaInfo = initUnitAttaForInsert(fileName, key, file.getSize());
attaInfo.setRelationType(String.valueOf(type));
try {
attaInfo.setDomainId(domain);
attaInfo = tAttaInfoService.add(attaInfo);
} catch (Exception e) {
log.error("OSS文件上传异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("上传异常:" + e.getMessage());
}
url = ossUtil.getObjectUrl(null, attaInfo.getAttaSrc());
attaInfo.setAttaUrl(String.valueOf(url));
return R.ok(attaInfo);
} else {
return R.failed("fail:上传异常");
}
}
@Override
public R<FileVo> uploadImg(MultipartFile file, String filePath, Integer type, String domain) throws IOException {
if (null == file) {
......
......@@ -186,4 +186,14 @@
where a.EMP_IDCARD = #{empIdCard} AND a.DEPT_ID = #{deptId}
limit 1
</select>
<!--tPreEmpMain简单分页查询-->
<select id="getTPreEmpMainByCardAndDeptNo" resultMap="tPreEmpMainMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_pre_emp_main a
where a.EMP_IDCARD = #{empIdCard} AND a.DEPT_NO = #{deptNo}
limit 1
</select>
</mapper>
......@@ -116,10 +116,10 @@ public interface TSocialSoldierMapper extends BaseMapper<TSocialInfo> {
**/
List<SocialSoldierPaymentSelectThreeVo> getSoldierPaymentSelectThreeList();
void getSoldierPaymentErrorInfoOne(@Param("parentId") String parentId);
void getSoldierPaymentErrorInfoTwo(@Param("parentId") String parentId);
void getSoldierPaymentErrorInfoOne(@Param("paymentTableName") String paymentTableName, @Param("parentId") String parentId);
void getSoldierPaymentErrorInfoTwo(@Param("paymentTableName") String paymentTableName, @Param("parentId") String parentId);
void getSoldierPaymentErrorInfoOneByRe(@Param("parentId") String parentId);
void getSoldierPaymentErrorInfoTwoByRe(@Param("parentId") String parentId);
void getSoldierPaymentErrorInfoOneByRe(@Param("paymentTableName") String paymentTableName, @Param("parentId") String parentId);
void getSoldierPaymentErrorInfoTwoByRe(@Param("paymentTableName") String paymentTableName, @Param("parentId") String parentId);
}
......@@ -289,11 +289,11 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
|| detailListThree != null && !detailListThree.isEmpty()
|| detailListFour != null && !detailListFour.isEmpty()
) {
String paymentTableName = DateUtil.getYear(new Date());
// 复核-核验1:
baseMapper.getSoldierPaymentErrorInfoOneByRe(mainAuto.getId());
baseMapper.getSoldierPaymentErrorInfoOneByRe(paymentTableName, mainAuto.getId());
// 复核-核验2:
baseMapper.getSoldierPaymentErrorInfoTwoByRe(mainAuto.getId());
baseMapper.getSoldierPaymentErrorInfoTwoByRe(paymentTableName, mainAuto.getId());
// 重新复核状态
TimeUnit.SECONDS.sleep(10);
......@@ -534,10 +534,11 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
|| detailListThree != null && !detailListThree.isEmpty()
|| detailListFour != null && !detailListFour.isEmpty()
) {
String paymentTableName = DateUtil.getYear(new Date());
// 核验1:
baseMapper.getSoldierPaymentErrorInfoOne(mainAuto.getId());
baseMapper.getSoldierPaymentErrorInfoOne(paymentTableName, mainAuto.getId());
// 核验2:
baseMapper.getSoldierPaymentErrorInfoTwo(mainAuto.getId());
baseMapper.getSoldierPaymentErrorInfoTwo(paymentTableName, mainAuto.getId());
TimeUnit.SECONDS.sleep(10);
long count = tAutoPaymentErrorService.getCountByParentId(mainAuto.getId());
if (count > 0) {
......@@ -1059,6 +1060,9 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
} else if ("工伤保险".equals(insuranceType)) {
insuranceTypeUnit = "工伤保险";
}
if (insuranceType.contains("【")) {
insuranceType = insuranceType.split("【")[0];
}
if (Common.isNotNull(unitLimit)) {
detail.setInsuranceType(insuranceTypeUnit);
}
......
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