Commit 28bfaa0c authored by huyuchen's avatar huyuchen

Merge branch 'MVP1.5.1' into develop

# Conflicts:
#	yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
#	yifu-social/yifu-social-biz/src/main/resources/mapper/TPaymentInfoMapper.xml
parents 97cd618e 120c187e
package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
/**
* @author pwang
* @date 2019-11-05 15:24:25
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("l_unit_info_for_prove")
@Schema(description = "工资证明用户操作数据表")
public class LUnitInfoForProve extends Model<LUnitInfoForProve> {
private static final long serialVersionUID = 1L;
/**
*
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键")
private String id;
/**
*
*/
@NotBlank(message = "创建人不能为空")
@ExcelAttribute(name = "", isNotEmpty = true, errorInfo = "不能为空")
@Schema(description = "创建人", name = "creatUser")
private String creatUser;
/**
*
*/
@NotBlank(message = "单位全称不能为空")
@Length(max = 20, message = "单位全称不能超过20个字符")
@Schema(description = "单位全称", name = "unitName")
private String unitName;
/**
*
*/
@NotBlank(message = "单位地址不能为空")
@Length(max = 50, message = "单位地址不能超过50个字符")
@Schema(description = "单位地址", name = "unitAddr")
private String unitAddr;
/**
* 单位固定电话
*/
@NotBlank(message = "单位固定电话不能为空")
@Length(max = 20, message = "单位固定电话不能超过20个字符")
@ExcelAttribute(name = "单位固定电话", isNotEmpty = true, errorInfo = "单位固定电话不能为空", maxLength = 20)
@Schema(description = "单位固定电话", name = "phone")
private String phone;
}
package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Date;
/**
* @author pwang
* @date 2019-11-05 15:24:25
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_prove_apply")
@Schema(description = "工资证明申请表")
public class TProveApply extends Model<TProveApply> {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键", name = "id")
private String id;
/**
* 员工id
*/
@NotBlank(message = "员工id不能为空")
@Length(max = 32, message = "员工id不能超过32个字符")
@ExcelAttribute(name = "员工id", isNotEmpty = true, errorInfo = "员工id不能为空", maxLength = 32)
@Schema(description = "员工id", name = "employeeInfo")
private String employeeInfo;
/**
* 申请人
*/
@ExcelAttribute(name = "申请人", isNotEmpty = true, errorInfo = "申请人不能为空")
@Schema(description = "申请人", name = "creatUser")
private String creatUser;
@Schema(description = "申请人名称")
private String creatUserName;
/**
* 申请日期
*/
@ExcelAttribute(name = "申请日期", isNotEmpty = true, errorInfo = "申请日期不能为空")
@Schema(description = "申请日期", name = "creatDate")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date creatDate;
/**
* 开始月
*/
@NotBlank(message = "开始月不能为空")
@Length(max = 6, message = "开始月不能超过6个字符")
@ExcelAttribute(name = "开始月", isNotEmpty = true, errorInfo = "开始月不能为空", maxLength = 6)
@Schema(description = "开始月", name = "startMonth")
private String startMonth;
/**
* 结束月
*/
@NotBlank(message = "结束月不能为空")
@Length(max = 6, message = "结束月不能超过6个字符")
@ExcelAttribute(name = "结束月", isNotEmpty = true, errorInfo = "结束月不能为空", maxLength = 6)
@Schema(description = "结束月", name = "endMonth")
private String endMonth;
/**
* 证明的工资
*/
@NotNull(message = "证明的工资不能为空")
@ExcelAttribute(name = "证明的工资")
@Schema(description = "证明的工资", name = "proveSalary")
private BigDecimal proveSalary;
/**
* 申请理由
*/
@Length(max = 100, message = "申请理由不能超过100个字符")
@ExcelAttribute(name = "申请理由", maxLength = 100)
@Schema(description = "申请理由", name = "applyReason")
private String applyReason;
/**
* 审核状态 0待审核1审核通过2审核不通过
*/
@Length(max = 1, message = "审核状态不能超过1个字符")
@Schema(description = "审核状态 0待审核1审核通过2审核不通过", name = "auditStatus")
private String auditStatus;
/**
* 审核人
*/
@ExcelAttribute(name = "审核人")
@Schema(description = "审核人", name = "auditUser")
private String auditUser;
@Schema(description = "审核人名称")
private String auditUserName;
/**
* 审核日期
*/
@ExcelAttribute(name = "审核日期")
@Schema(description = "审核日期", name = "auditDate")
private LocalDate auditDate;
/* @Length(max = 100, message = "附件id逗号隔开不能超过100个字符")
@ExcelAttribute(name = "附件id逗号隔开", maxLength = 100)
@Schema(description = "附件id逗号隔开", name = "fileId")
private String fileId;*/
/**
* 0实发平均1应发平均
*/
@NotBlank(message = "实发应发不能为空")
@Length(max = 1, message = "实发应发类型不能超过1个字符")
@Schema(description = "0实发平均1应发平均", name = "sumType")
private String sumType;
/**
* 实际工资
*/
@NotNull(message = "实际工资不能为空")
@ExcelAttribute(name = "实际工资")
@Schema(description = "实际工资", name = "salary")
private BigDecimal salary;
/**
* 员工身份证号
*
* @Author pwang
* @Date 2019-11-07 10:27
* @return
**/
@Schema(description = "员工身份证号")
private String employeeIdCard;
@Schema(description = "员工姓名")
@ExcelAttribute(name = "姓名")
private String employeeName;
/**
* 结算主体id
*
* @Author pwang
* @Date 2019-11-07 10:27
* @return
**/
@Schema(description = "结算主体id")
private String settleDomain;
@Schema(description = "结算主体名称")
private String settleDomainName;
}
package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Date;
import java.util.List;
import java.util.Set;
/**
* @author pwang
* @date 2019-11-05 15:24:25
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_prove_record")
@Schema(description = "工资证明记录表")
public class TProveRecord extends Model<TProveRecord> {
private static final long serialVersionUID = 1L;
/**
*
*/
@TableId(type = IdType.ASSIGN_ID)
private String id;
/**
* 员工id
*/
@NotBlank(message = "员工id不能为空")
@Length(max = 32, message = "员工id不能超过32个字符")
private String employeeInfo;
/**
* 员工姓名
*
* @Author pwang
* @Date 2019-11-07 10:27
* @return
**/
@Schema(description = "员工姓名")
@ExcelAttribute(name = "员工姓名")
@NotBlank(message = "员工姓名不能为空")
@ExcelProperty("员工姓名")
private String employeeName;
/**
* 员工身份证号
*
* @Author pwang
* @Date 2019-11-07 10:27
* @return
**/
@Schema(description = "身份证号")
@NotBlank(message = "身份证号不能为空")
@ExcelAttribute(name = "身份证号")
@ExcelProperty("身份证号")
private String employeeIdCard;
/**
* 结算主体(部门)名称
*
* @Author pwang
* @Date 2019-11-07 10:27
* @return
**/
@Schema(description = "项目名称")
@NotBlank(message = "项目名称不能为空")
@ExcelAttribute(name = "项目名称")
@ExcelProperty("项目名称")
private String employeeSettleDepartName;
/**
*
*/
private String creatUser;
@Schema(description = "开具人")
@ExcelAttribute(name = "开具人")
@ExcelProperty("开具人")
private String creatUserName;
/**
* 创建日期
*/
@Schema(description = "开具日期", name = "creatDate")
@ExcelAttribute(name = "开具日期")
@ExcelProperty("开具日期")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date creatDate;
/**
* 开始月份
*/
@NotBlank(message = "开始月份不能为空")
@Length(max = 6, message = "开始月份(yyyyMM)不能超过6个字符")
@ExcelAttribute(name = "开始月份", isNotEmpty = true, errorInfo = "不能为空", maxLength = 6)
@Schema(description = "开始月份", name = "startMonth")
@ExcelProperty("开始月份")
private String startMonth;
/**
* 结束月份
*/
@NotBlank(message = "结束月份不能为空")
@Length(max = 6, message = "结束月份(yyyyMM)不能超过6个字符")
@ExcelAttribute(name = "结束月份", isNotEmpty = true, errorInfo = "不能为空", maxLength = 6)
@Schema(description = "结束月份", name = "endMonth")
@ExcelProperty("结束月份")
private String endMonth;
/**
* 计算的工资
*/
@NotNull(message = "计算的工资不能为空")
@ExcelAttribute(name = "计算的工资")
@Schema(description = "计算的工资(数据库数字)", name = "salary")
private BigDecimal salary;
/**
* 证明的工资
*/
@NotNull(message = "证明的工资不能为空")
@ExcelAttribute(name = "平均工资")
@Schema(description = "证明的工资(显示的数字)", name = "proveSalary")
@ExcelProperty("平均工资")
private BigDecimal proveSalary;
/**
* 是否作废 0否1是
*/
@Length(max = 1, message = "是否作废不能超过1个字符")
@ExcelAttribute(name = "是否作废", dataType = "isInvalid", isDataId = true)
@ExcelProperty("是否作废")
private String isInvalid;
/**
* 作废原因
*/
@Length(max = 100, message = "作废原因不能超过100个字符")
@ExcelAttribute(name = "作废原因")
@ExcelProperty("作废原因")
@Schema(description = "作废原因", name = "invalidReason")
private String invalidReason;
/**
* 证明编号
*/
@Length(max = 20, message = "证明编号不能超过20个字符")
@ExcelAttribute(name = "证明编号")
@Schema(description = "证明编号", name = "no")
@ExcelProperty("证明编号")
private String no;
/**
* 用途
*/
@Length(max = 100, message = "用途不能超过100个字符")
@ExcelAttribute(name = "用途")
@Schema(description = "用途", name = "purpose")
@ExcelProperty("用途")
private String purpose;
/**
* 0实发平均1应发平均
*/
@NotBlank(message = "实发应发不能为空")
@Length(max = 1, message = "实发应发不能超过1个字符")
@ExcelAttribute(name = "计算类型", dataType = "sumType", isDataId = true)
@Schema(description = "0实发平均1应发平均", name = "sumType")
@ExcelProperty("计算类型")
private String sumType;
/**
* 证明类型 0正式员工证明1试用期员工证明
*/
@NotBlank(message = "证明类型不能为空")
@Length(max = 1, message = "证明类型不能超过1个字符")
@Schema(description = "证明类型 0正式员工证明1试用期员工证明", name = "proveType")
private String proveType;
/**
* 打印次数
*/
@ExcelAttribute(name = "打印次数")
@Schema(description = "打印次数", name = "number")
private Integer number;
/**
*
*/
@NotBlank(message = "单位全称不能为空")
@Length(max = 100, message = "不能超过100个字符")
@Schema(description = "单位全称", name = "unitName")
private String unitName;
/**
*
*/
@NotBlank(message = "单位地址不能为空")
@Length(max = 100, message = "不能超过100个字符")
@Schema(description = "单位地址", name = "unitAddr")
private String unitAddr;
/**
* 单位固定电话
*/
@NotBlank(message = "单位固定电话不能为空")
@Length(max = 20, message = "单位固定电话不能超过20个字符")
@Schema(description = "单位固定电话", name = "phone")
private String phone;
/**
* 合同结束时间
*/
@Schema(description = "合同结束时间")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date contractEndDate;
/**
* 入职时间
*/
@Schema(description = "入职时间")
private LocalDate entryDate;
/**
* 合同类型
*/
@Schema(description = "合同类型")
private String contractType;
/**
* 岗位
*
* @Author
* @Date 2019-11-07 10:27pwang
* @return
**/
@Schema(description = "岗位")
private String post;
@Schema(description = "计算月份数")
private Integer mouthCount;
/**
* 申请人部门所在城市id
*
* @Author pwang
* @Date 2019-11-07 18:18
* @param null
* @return
**/
private String belongDepartCity;
/**
* 根据证明工资手动在方法中转换NumberToCN.number2CNMontrayUnit(re.getProveSalary())
*
* @Author pwang
* @Date 2019-11-07 10:43
* @return
**/
@Schema(description = "大写")
@TableField(exist = false)
private String capital;
@TableField(exist = false)
private List<String> idList;
@TableField(exist = false)
@Schema(description = "导出的表头的Set")
private Set<String> exportFields;
@TableField(exist = false)
@Schema(description = "查询limit 开始")
private int limitStart;
@TableField(exist = false)
@Schema(description = "查询limit 数据条数")
private int limitEnd;
}
......@@ -51,7 +51,7 @@ public class FileUploadController {
@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.员工附件-合同)\", required = true, dataType = \"int\", 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")
/*@ApiImplicitParams({
......
package com.yifu.cloud.plus.v1.yifu.archives.controller;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.yifu.cloud.plus.v1.yifu.archives.entity.LUnitInfoForProve;
import com.yifu.cloud.plus.v1.yifu.archives.service.LUnitInfoForProveService;
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.security.util.SecurityUtils;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* @author pwang
* @date 2019-11-05 15:24:25
*/
@RestController
@AllArgsConstructor
@RequestMapping("/lunitinfoforprove")
@Tag(name = "工资证明操作数据")
public class LUnitInfoForProveController {
private final LUnitInfoForProveService lUnitInfoForProveService;
/**
* 简单分页查询
* 获取用户自己的操作数据
*
* @return
*/
@Operation(summary = "获取用户自己的操作数据")
@GetMapping("/ownList")
public R<List<LUnitInfoForProve>> getownList() {
YifuUser user = SecurityUtils.getUser();
return new R<>(lUnitInfoForProveService.list(Wrappers.<LUnitInfoForProve>lambdaQuery().eq(LUnitInfoForProve::getCreatUser, user.getId())));
}
}
......@@ -126,8 +126,9 @@ public class TEmpChangeInfoController {
@Operation(description = "分页查询")
@GetMapping("/getAllDeptPage" )
public R<IPage<TSettleDomain>> getItemNamePage(Page page,@RequestParam(required = false) String departName
,@RequestParam(required = false) String nameOrNo
, @RequestParam(required = false) String customerId, @RequestParam(required = false) String flag) {
return new R<>(tEmpChangeInfoService.getAllDeptPage(page, departName, customerId,flag));
return new R<>(tEmpChangeInfoService.getAllDeptPage(page, departName, nameOrNo, customerId,flag));
}
/**
......
package com.yifu.cloud.plus.v1.yifu.archives.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.archives.entity.LUnitInfoForProve;
import org.apache.ibatis.annotations.Mapper;
/**
* @author pwang
* @date 2019-11-05 15:24:25
*/
@Mapper
public interface LUnitInfoForProveMapper extends BaseMapper<LUnitInfoForProve> {
}
......@@ -39,4 +39,6 @@ public interface TAttaInfoMapper extends BaseMapper<TAttaInfo> {
List<TAttaInfo> getKeenAtta(@Param("dayStart")LocalDateTime dayStart, @Param("values")Collection<String> values);
int updateDomainId(@Param("domainId")String domainId, @Param("ids")List<String> ids);
List<TAttaInfo> getAttaByApplyId(@Param("applyId")String applyId);
}
package com.yifu.cloud.plus.v1.yifu.archives.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TProveApply;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* @author pwang
* @date 2019-11-05 15:24:25
*/
@Mapper
public interface TProveApplyMapper extends BaseMapper<TProveApply> {
/**
* 简单分页查询
*
* @param tProveApply
* @return
*/
IPage<TProveApply> getTProveApplyPage(Page page, @Param("tProveApply") TProveApply tProveApply);
}
package com.yifu.cloud.plus.v1.yifu.archives.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TProveRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author pwang
* @date 2019-11-05 15:24:25
*/
@Mapper
public interface TProveRecordMapper extends BaseMapper<TProveRecord> {
/**
* 简单分页查询
*
* @param tProveRecord
* @return
*/
IPage<TProveRecord> getTProveRecordPage(Page page, @Param("tProveRecord") TProveRecord tProveRecord);
/**
* @param tProveRecord
* @Description: 导出查条数
* @Author: hgw
* @Date: 2023/2/22 14:56
* @return: int
**/
int getCountByExport(@Param("tProveRecord") TProveRecord tProveRecord);
/**
* @param tProveRecord
* @Description: 导出list
* @Author: hgw
* @Date: 2023/2/22 14:56
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.archives.entity.TProveRecord>
**/
List<TProveRecord> getRecordInfoNoPage(@Param("tProveRecord") TProveRecord tProveRecord);
Integer createNo(@Param("str") String str);
}
package com.yifu.cloud.plus.v1.yifu.archives.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.LUnitInfoForProve;
/**
* @author pwang
* @date 2019-11-05 15:24:25
*/
public interface LUnitInfoForProveService extends IService<LUnitInfoForProve> {
}
......@@ -4,6 +4,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.TAttaInfo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import java.time.LocalDateTime;
import java.util.Collection;
......@@ -51,4 +52,14 @@ public interface TAttaInfoService extends IService<TAttaInfo> {
List<TAttaInfo> getKeenAtta(LocalDateTime dayStart, Collection<String> values);
Boolean updateDomainId(String domainId, List<String> ids);
/**
* @param applyId
* @Description: 收入证明使用
* @Author: hgw
* @Date: 2023/2/22 10:50
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.yifu.cloud.plus.v1.yifu.archives.entity.TAttaInfo>>
**/
R<List<TAttaInfo>> getAttaByApplyId(String applyId);
}
......@@ -70,5 +70,5 @@ public interface TEmpChangeInfoService extends IService<TEmpChangeInfo> {
*/
R<List<TCustomerInfo>> getAllUint(String customerName);
IPage<TSettleDomain> getAllDeptPage(Page page, String deptName, String customerId,String flag);
IPage<TSettleDomain> getAllDeptPage(Page page, String deptName, String nameOrNo, String customerId,String flag);
}
package com.yifu.cloud.plus.v1.yifu.archives.service;
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.TProveApply;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
/**
* @author pwang
* @date 2019-11-05 15:24:25
*/
public interface TProveApplyService extends IService<TProveApply> {
/**
* 简单分页查询
*
* @param tProveApply
* @return
*/
IPage<TProveApply> getTProveApplyPage(Page<TProveApply> page, TProveApply tProveApply);
R<String> validSave(TProveApply proveApply, String[] attaIdArray);
}
package com.yifu.cloud.plus.v1.yifu.archives.service;
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.TProveRecord;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* @author pwang
* @date 2019-11-05 15:24:25
*/
public interface TProveRecordService extends IService<TProveRecord> {
/**
* 简单分页查询
*/
IPage<TProveRecord> getTProveRecordPage(Page<TProveRecord> page, TProveRecord tProveRecord);
void saveNo(TProveRecord record);
List<TProveRecord> getRecordInfoNoPage(TProveRecord pr);
void listExport(HttpServletResponse response, TProveRecord searchVo);
}
package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.LUnitInfoForProve;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.LUnitInfoForProveMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.LUnitInfoForProveService;
import org.springframework.stereotype.Service;
/**
* @author pwang
* @date 2019-11-05 15:24:25
*/
@Service
public class LUnitInfoForProveServiceImpl extends ServiceImpl<LUnitInfoForProveMapper, LUnitInfoForProve> implements LUnitInfoForProveService {
}
......@@ -8,9 +8,11 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TAttaInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TAttaInfoService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.net.URL;
import java.time.LocalDateTime;
import java.util.Collection;
import java.util.List;
......@@ -107,4 +109,19 @@ public class TAttaInfoServiceImpl extends ServiceImpl<TAttaInfoMapper, TAttaInfo
}
return baseMapper.updateDomainId(domainId,ids) > 0;
}
@Override
public R<List<TAttaInfo>> getAttaByApplyId(String applyId) {
List<TAttaInfo> list = baseMapper.getAttaByApplyId(applyId);
if (Common.isNotNull(list)) {
URL url;
for (TAttaInfo atta:list) {
url = ossUtil.getObjectUrl(null, atta.getAttaSrc());
atta.setAttaUrl(url.toString());
}
return R.ok(list);
}else{
return R.failed("没有附件");
}
}
}
......@@ -28,12 +28,12 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TElecEmployeeInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.FileUploadService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TElecEmployeeInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeInfoService;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.util.RedisUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprUpmsProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import lombok.RequiredArgsConstructor;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileItemFactory;
......@@ -145,19 +145,19 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
*/
private R unZip(File srcFile, String destDirPath) throws RuntimeException {
// 调用字典服务,渲染字典值
R<Map<String, Map<String, Map<String, String>>>> dictR = HttpDaprUtil.invokeMethodPost(daprUpmsProperties.getAppUrl(), daprUpmsProperties.getAppId()
, "/dict/inner/getDictToLable", null, Map.class, SecurityConstants.FROM_IN);
Map<String, Map<String, Map<String, String>>> dictMap;
// 电子档案类型
Map<String, Map<String, String>> elecTypeMapData;
Map<String, String> elecTypeMap;
if (dictR == null) {
Map<String, String> elecTypeMap = new HashMap<>();
// 渲染字典值
Map<String,String> dicObj = (Map<String, String>) RedisUtil.redis.opsForValue()
.get(CacheConstants.DICT_DETAILS
+ CommonConstants.COLON_STRING
+ "literature_types");
if (Common.isNotNull(dicObj)) {
for (Map.Entry<String, String> entry : dicObj.entrySet()) {
elecTypeMap.put(entry.getValue(),entry.getKey());
}
}
if (elecTypeMap.isEmpty()) {
return R.failed("获取字典失败!");
} else {
dictMap = dictR.getData();
elecTypeMapData = dictMap.get("data");
elecTypeMap = elecTypeMapData.get("literature_types");
}
// 判断源文件是否存在
if (!srcFile.exists()) {
......@@ -173,15 +173,23 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
Set<String> infoList =new HashSet<>();
Set<String> idCardList =new HashSet<>();
Set<String> cardType =new HashSet<>();
TEmployeeInfo tEmployeeInfo;
ZipEntry entry;
String idCard;
String empInfo;
while (entriesCheck.hasMoreElements()) {
ZipEntry entry = (ZipEntry) entriesCheck.nextElement();
entry = (ZipEntry) entriesCheck.nextElement();
//添加进filesName
String empInfo = entry.getName();
empInfo = entry.getName();
infoList.add(empInfo);
String dataType = "";
if (empInfo.length() == empInfo.lastIndexOf("/") + 1) {
String idCard = empInfo.substring(0, empInfo.indexOf("/"));
TEmployeeInfo tEmployeeInfo = tEmployeeInfoService.getOne((Wrappers.<TEmployeeInfo>query().lambda()
if (empInfo.lastIndexOf("/") != empInfo.indexOf("/")) {
if (!empInfo.contains("-")) {
return R.failed("请使用正确的文件夹命名格式:身份证-员工姓名");
}
idCard = empInfo.substring(0, empInfo.indexOf("-"));
tEmployeeInfo = tEmployeeInfoService.getOne((Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getEmpIdcard, idCard)).eq(TEmployeeInfo::getFileStatus, CommonConstants.ZERO_INT)
.eq(TEmployeeInfo::getDeleteFlag, CommonConstants.ZERO_STRING)
.eq(TEmployeeInfo::getFileStatus, CommonConstants.ZERO_INT));
......@@ -191,36 +199,32 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
idCardList.add(idCard);
if (empInfo.length() > 20) {
dataType = empInfo.substring(empInfo.indexOf("/") + 1, empInfo.lastIndexOf("/"));
if (Common.isNotNull(elecTypeMap)) {
if (!Common.isNotNull(elecTypeMap.get(dataType))) {
return R.failed("资料类型错误:" + dataType);
}
cardType.add(idCard + "/" + dataType);
}
cardType.add(idCard + "_" + dataType);
}
}
}
for (String idCarInfo : idCardList) {
if (!infoList.stream().anyMatch(e-> containsCheckTwo(e,idCarInfo))) {
if (infoList.stream().noneMatch(e-> containsCheckTwo(e,idCarInfo))) {
return R.failed(idCarInfo + ":"+"证件数据不可为空");
}
}
if (cardType.size() > CommonConstants.ZERO_INT) {
for (String typeInfo :cardType) {
if (!infoList.stream().anyMatch(e -> containsCheckOne(e, typeInfo))) {
if (infoList.stream().noneMatch(e -> containsCheckOne(e, typeInfo))) {
return R.failed(typeInfo + ":" + "证件数据不可为空");
}
}
}
Map<String, String> insMap = new HashMap<>();
List<TElecEmployeeInfo> infolist = new ArrayList<>();
List<String> list = new ArrayList<>();
TEmployeeInfo employeeInfo;
while (entries.hasMoreElements()) {
ZipEntry entry = (ZipEntry) entries.nextElement();
entry = (ZipEntry) entries.nextElement();
//添加进filesName
String empInfo = entry.getName();
empInfo = entry.getName();
// 如果是文件夹,就创建个文件夹
if (entry.isDirectory()) {
String dirPath = destDirPath + "/" + entry.getName();
......@@ -246,29 +250,25 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
TElecEmployeeInfo tElecEmployeeInfo = new TElecEmployeeInfo();
if (empInfo.length() > empInfo.lastIndexOf("/") + 1) {
String idCard = empInfo.substring(0, empInfo.indexOf("/"));
idCard = empInfo.substring(0, empInfo.indexOf("-"));
String dataType = empInfo.substring(empInfo.indexOf("/") + 1, empInfo.lastIndexOf("/"));
String empName = "";
TEmployeeInfo tEmployeeInfo = tEmployeeInfoService.getOne((Wrappers.<TEmployeeInfo>query().lambda()
employeeInfo = tEmployeeInfoService.getOne((Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getEmpIdcard, idCard)).eq(TEmployeeInfo::getFileStatus, CommonConstants.ZERO_INT)
.eq(TEmployeeInfo::getDeleteFlag, CommonConstants.ZERO_STRING));
if (Common.isNotNull(tEmployeeInfo)) {
empName = tEmployeeInfo.getEmpName();
if (Common.isNotNull(employeeInfo)) {
empName = employeeInfo.getEmpName();
}
tElecEmployeeInfo.setEmpIdcard(idCard);
tElecEmployeeInfo.setEmpName(empName);
if (Common.isNotNull(elecTypeMap)) {
if (Common.isNotNull(elecTypeMap.get(dataType))) {
tElecEmployeeInfo.setDataType(elecTypeMap.get(dataType));
}
}
String id = insMap.get(idCard + CommonConstants.DOWN_LINE_STRING + dataType);
if (Common.isEmpty(id)) {
infolist.add(tElecEmployeeInfo);
this.save(tElecEmployeeInfo);
insMap.put(idCard + CommonConstants.DOWN_LINE_STRING + dataType, tElecEmployeeInfo.getId());
}
list.add(insMap.get(idCard + CommonConstants.DOWN_LINE_STRING + dataType));
fileUploadService.uploadImg(fileCovertMultipartFile(targetFile), "", CommonConstants.EIGHT_INT, insMap.get(idCard + CommonConstants.DOWN_LINE_STRING + dataType));
}
......@@ -393,16 +393,12 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
}
public boolean containsCheckTwo(String e,String idCard) {
if (e.contains(idCard) && e.length() > 20) {
return true;
}
return false;
return e.contains(idCard) && e.length() > 20;
}
public boolean containsCheckOne(String e,String cardType) {
if (e.contains(cardType) && e.contains(CommonConstants.SPOT)) {
return true;
}
return false;
String empIdcard = cardType.substring(0,cardType.indexOf("_"));
String fileName = cardType.substring(cardType.indexOf("_") +1);
return e.contains(empIdcard) && e.contains(fileName) && e.contains(CommonConstants.SPOT);
}
}
......@@ -23,10 +23,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pig4cloud.plugin.excel.vo.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpChangeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.entity.*;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpChangeInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TSettleDomainMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TCustomerInfoService;
......@@ -117,11 +114,11 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
updateTEmployeeProject.setBusinessPrimaryType(tSettleDomain.getBusinessPrimaryType());
updateTEmployeeProject.setBusinessSecondType(tSettleDomain.getBusinessSecondType());
updateTEmployeeProject.setBusinessThirdType(tSettleDomain.getBusinessThirdType());
// 记录变更日志
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1], "", updateTEmployeeProject.getId(), tEmployeeProjectOld, updateTEmployeeProject);
updateTEmployeeProject.setOdlDeptId(tEmployeeProjectOld.getDeptId());
tEmployeeProjectService.updateById(updateTEmployeeProject);
tEmpChangeInfo.setProId(updateTEmployeeProject.getId());
// 记录变更日志
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1], "", updateTEmployeeProject.getId(), tEmployeeProjectOld, updateTEmployeeProject);
UpdateSocialFoundVo updateSocialFoundVo = new UpdateSocialFoundVo();
updateSocialFoundVo.setOldDeptId(updateTEmployeeProject.getOdlDeptId());
......@@ -162,6 +159,12 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
List<TEmployeeProject> updateList = new ArrayList<>();
Set<String> errorMsg;
//对象声明
TEmpChangeInfoVO excel;
TSettleDomain tSettleDomain;
TEmployeeProject employeeProject;
TEmployeeProject updateTEmployeePro;
TEmployeeProject tEmployeeProjectOld;
// 执行数据插入操作 组装
for (int i = 0; i < excelVOList.size(); i++) {
// 已有验证报错直接下一个
......@@ -169,7 +172,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
continue;
}
errorMsg = new HashSet<>();
TEmpChangeInfoVO excel = excelVOList.get(i);
excel = excelVOList.get(i);
excel.setUnsettleDeal(CommonConstants.IS_NO_CHANGE);
if (Common.isNotNull(excel.getChangeStartMonth()) && excel.getChangeStartMonth().length() > CommonConstants.dingleDigitIntArray[6]) {
errorMsg.add("划转起始月长度不能超过6位");
......@@ -187,7 +190,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
}
//项目编码校验
TSettleDomain tSettleDomain = tSettleDomainMapper.selectOne(Wrappers.<TSettleDomain>query().lambda()
tSettleDomain = tSettleDomainMapper.selectOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo, excel.getNewSettleCode())
.eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING)
.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING));
......@@ -196,17 +199,17 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
}
//待划转员工已在目标项目下不可划转
TEmployeeProject tEmployeeProject = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query().lambda()
employeeProject = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getEmpIdcard, excel.getEmpIdcard()).eq(TEmployeeProject::getDeptNo,excel.getNewSettleCode())
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.STATUS_NORMAL)
.eq(TEmployeeProject::getProjectStatus,CommonConstants.ZERO_INT));
if (Common.isNotNull(tEmployeeProject)) {
if (Common.isNotNull(employeeProject)) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.PROJECT_NEW_SEARCH_NOT_EXIST, excel.getNewSettleCode()));
}
// 数据合法情况
if (CollUtil.isEmpty(errorMsg)) {
//划转,更新项目信息
TEmployeeProject updateTEmployeePro = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query().lambda()
updateTEmployeePro = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getEmpIdcard, excel.getEmpIdcard()).eq(TEmployeeProject::getDeptNo,excel.getOldSettleCode())
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.STATUS_NORMAL));
if (Common.isNotNull(updateTEmployeePro)) {
......@@ -217,7 +220,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
if (CommonConstants.ONE_INT == updateTEmployeePro.getProjectStatus()) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.PROJECT_PERSON_DELETE_EXIT, excel.getOldSettleCode()));
} else if (Common.isNotNull(tSettleDomain)) {
TEmployeeProject tEmployeeProjectOld = tEmployeeProjectService.getById(updateTEmployeePro.getId());
tEmployeeProjectOld = tEmployeeProjectService.getById(updateTEmployeePro.getId());
updateTEmployeePro.setDeptNo(tSettleDomain.getDepartNo());
updateTEmployeePro.setDeptId(tSettleDomain.getId());
updateTEmployeePro.setDeptName(tSettleDomain.getDepartName());
......@@ -229,10 +232,10 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
updateTEmployeePro.setUnitName(tSettleDomain.getCustomerName());
updateTEmployeePro.setChangeStartMonth(excel.getChangeStartMonth());
updateTEmployeePro.setUnsettleDeal(CommonConstants.IS_NO_CHANGE);
// 记录变更日志
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1], "", updateTEmployeePro.getId(), tEmployeeProjectOld, updateTEmployeePro);
updateTEmployeePro.setOdlDeptId(tEmployeeProjectOld.getDeptId());
updateList.add(updateTEmployeePro);
// 记录变更日志
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1], "", tEmployeeProjectOld.getId(), tEmployeeProjectOld, updateTEmployeePro);
}
} else {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.PROJECT_PERSON_SEARCH_EXIT, excel.getOldSettleCode()));
......@@ -283,7 +286,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
*/
@Override
public R<List<TSettleDomain>> getAllDept(String customerName) {
List<TSettleDomain> list = null;
List<TSettleDomain> list;
if (Common.isNotNull(customerName)){
list = tSettleDomainMapper.selectList(Wrappers.<TSettleDomain>query().lambda().eq(TSettleDomain::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.eq(TSettleDomain::getStopFlag,CommonConstants.STATUS_NORMAL).eq(TSettleDomain::getCustomerName,customerName));
......@@ -303,7 +306,6 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
*/
@Override
public R<List<TCustomerInfo>> getAllUint(String customerName) {
//List<TCustomerInfo> list = tCustomerInfoService.list(Wrappers.<TCustomerInfo>query().lambda().eq(TCustomerInfo::getDeleteFlag, CommonConstants.STATUS_NORMAL));
List<TCustomerInfo> list = tCustomerInfoService.getAllUnit(customerName);
return R.ok(list);
}
......@@ -315,16 +317,21 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
* @Date 2022-07-26
*/
@Override
public IPage<TSettleDomain> getAllDeptPage(Page page, String deptName, String customerId,String flag) {
LambdaQueryWrapper<TSettleDomain> wrapper = buildQueryWrapper(deptName, customerId,flag);
public IPage<TSettleDomain> getAllDeptPage(Page page, String deptName, String nameOrNo, String customerId,String flag) {
LambdaQueryWrapper<TSettleDomain> wrapper = buildQueryWrapper(deptName, nameOrNo, customerId,flag);
return tSettleDomainMapper.selectPage(page,wrapper);
}
private LambdaQueryWrapper buildQueryWrapper(String deptName, String customerId,String flag) {
private LambdaQueryWrapper buildQueryWrapper(String deptName, String nameOrNo, String customerId,String flag) {
LambdaQueryWrapper<TSettleDomain> wrapper = Wrappers.lambdaQuery();
if (Common.isNotNull(deptName)) {
wrapper.like(TSettleDomain::getDepartName, deptName);
}
if (Common.isNotNull(nameOrNo)) {
wrapper.and(obj->obj.like(TSettleDomain::getDepartName, nameOrNo)
.or()
.like(TSettleDomain::getDepartNo, nameOrNo));
}
if (Common.isNotNull(customerId)) {
wrapper.eq(TSettleDomain::getCustomerId, customerId);
}
......
......@@ -949,9 +949,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
// 新老项目档案List
List<EmployeeProjectNewOldVO> updateProjectList = new ArrayList<>();
EmployeeProjectUpdateVO excel;
TEmployeeProject tEmployeeProject;
TEmployeeInfo tEmployeeInfo;
TEmployeeProject tEmployeeProjectOld;
// 执行数据插入操作 组装
for (int i = 0; i < excelVOList.size(); i++) {
EmployeeProjectUpdateVO excel = excelVOList.get(i);
excel = excelVOList.get(i);
String checkCount = excel.getEmpIdcard().concat(excel.getDeptNo());
if (Common.isNotNull(checkCountMap.get(checkCount))) {
......@@ -960,7 +964,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
checkCountMap.put(checkCount, i + 2);
}
//根据身份证和项目编码获取项目档案
TEmployeeProject tEmployeeProject = this.getOne(Wrappers.<TEmployeeProject>query().lambda()
tEmployeeProject = this.getOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getEmpIdcard, excel.getEmpIdcard())
.eq(TEmployeeProject::getDeptNo, excel.getDeptNo())
.eq(TEmployeeProject::getDeleteFlag, CommonConstants.STATUS_NORMAL));
......@@ -971,13 +975,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.CHECKS_EMP_DELETE_ERROR)));
} else {
updateExcelProj(excel, updateList, tEmployeeProject);
TEmployeeProject tEmployeeProjectOld = this.getById(tEmployeeProject.getId());
tEmployeeProjectOld = this.getById(tEmployeeProject.getId());
newOldProject = new EmployeeProjectNewOldVO();
newOldProject.setOldProjectEmployee(tEmployeeProjectOld);
newOldProject.setNewProjectEmployee(tEmployeeProject);
updateProjectList.add(newOldProject);
TEmployeeInfo tEmployeeInfo = tEmployeeInfoMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda()
tEmployeeInfo = tEmployeeInfoMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getEmpIdcard, excel.getEmpIdcard())
.eq(TEmployeeInfo::getFileStatus, CommonConstants.ZERO_INT)
.eq(TEmployeeInfo::getDeleteFlag, CommonConstants.STATUS_NORMAL));
......@@ -1065,6 +1069,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
.eq(TEmployeeProject::getProjectStatus, CommonConstants.ZERO_INT));
}
if (Common.isNotEmpty(list)) {
TEmployeeInfo tEmployeeInfo;
int i = 0;
for (TEmployeeProject delProject : list) {
++i;
......@@ -1072,7 +1077,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if (CommonConstants.dingleDigitIntArray[0] == delProject.getStatus()) {
delProject.setDeleteFlag(CommonConstants.ONE_STRING);
updList.add(delProject);
TEmployeeInfo tEmployeeInfo = tEmployeeInfoMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda()
tEmployeeInfo = tEmployeeInfoMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getEmpIdcard, delProject.getEmpIdcard())
.eq(TEmployeeInfo::getDeleteFlag, CommonConstants.STATUS_NORMAL));
infoUpdList.add(tEmployeeInfo);
......
package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TAttaInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TProveApply;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TProveApplyMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TAttaInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TProveApplyService;
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.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* @author pwang
* @date 2019-11-05 15:24:25
*/
@Service
public class TProveApplyServiceImpl extends ServiceImpl<TProveApplyMapper, TProveApply> implements TProveApplyService {
@Autowired
private TAttaInfoService tAttaInfoService;
/**
* 简单分页查询
*
* @param tProveApply
* @return
*/
@Override
public IPage<TProveApply> getTProveApplyPage(Page<TProveApply> page, TProveApply tProveApply) {
return baseMapper.getTProveApplyPage(page, tProveApply);
}
@Override
public R<String> validSave(TProveApply proveApply, String[] attaIdArray) {
YifuUser user = SecurityUtils.getUser();
//查重
long count = this.count(Wrappers.<TProveApply>lambdaQuery()
.eq(TProveApply::getEmployeeInfo, proveApply.getEmployeeInfo())
.eq(TProveApply::getStartMonth, proveApply.getStartMonth())
.eq(TProveApply::getEndMonth, proveApply.getEndMonth())
.eq(TProveApply::getSumType, proveApply.getSumType())
.ne(TProveApply::getAuditStatus, CommonConstants.dingleDigitStrArray[2]));
if (count > 0) {
return R.failed("该员工这段时间内已存在申请记录");
}
proveApply.setId(null);
//初始化数据填充
proveApply.setAuditStatus(CommonConstants.ZERO_STRING);//待审核
proveApply.setCreatDate(new Date());
proveApply.setCreatUser(user.getId());
proveApply.setCreatUserName(user.getNickname());
//保存数据
this.save(proveApply);
if (Common.isNotNull(attaIdArray)) {
//保存关系
List<TAttaInfo> mList = new ArrayList<>();
TAttaInfo m;
for (String id : attaIdArray) {
m = new TAttaInfo();
m.setId(id);
m.setDomainId(proveApply.getId());
mList.add(m);
}
tAttaInfoService.updateBatchById(mList);
}
return R.ok("操作成功!");
}
}
package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import com.alibaba.excel.EasyExcelFactory;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TProveRecord;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TProveRecordMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TProveRecordService;
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.DateUtil;
import org.springframework.stereotype.Service;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Set;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import java.util.stream.Collectors;
/**
* @author pwang
* @date 2019-11-05 15:24:25
*/
@Service
public class TProveRecordServiceImpl extends ServiceImpl<TProveRecordMapper, TProveRecord> implements TProveRecordService {
private Lock lock = new ReentrantLock();
/**
* 简单分页查询
*
* @param tProveRecord
* @return
*/
@Override
public IPage<TProveRecord> getTProveRecordPage(Page<TProveRecord> page, TProveRecord tProveRecord) {
return baseMapper.getTProveRecordPage(page, tProveRecord);
}
@Override
public synchronized void saveNo(TProveRecord record) {
String str = "WX-";
if (record.getUnitName() != null) {
if (record.getUnitName().contains("易服")) {
str = "YF-";
} else if (record.getUnitName().contains("柯恩")) {
str = "KE-";
}
}
Integer count = 0;
//cityName = cityName.replace("市", "");
//str += PingYinUtil.getPYIndexStr(cityName, true) + "-";
count = baseMapper.createNo(str);
if (count != null) {
count++;
if (count < 10000) {
str += new DecimalFormat("00000").format(count);
} else {
str += String.valueOf(count);
}
} else {
str += "00001";
}
record.setNo(str);
this.save(record);
}
@Override
public List<TProveRecord> getRecordInfoNoPage(TProveRecord pr) {
return baseMapper.getRecordInfoNoPage(pr);
}
/**
* 工资报账主表(工资条)批量导出
*
* @return
*/
@Override
public void listExport(HttpServletResponse response, TProveRecord searchVo) {
String fileName = "证明记录导出" + DateUtil.getThisTime() + CommonConstants.XLSX;
//获取要导出的列表
List<TProveRecord> list = new ArrayList<>();
int count = baseMapper.getCountByExport(searchVo);
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
if (Common.isEmpty(searchVo.getExportFields())) {
//String[] exportFields = {"姓名", "证明编号", "身份证", "结算主体", "计算类型", "开始月份", "结束月份"
// , "平均工资", "开具人", "开具日期", "用途", "是否作废", "作废原因"}
String[] exportFields = {"employeeName", "no", "employeeIdCard", "employeeSettleDepartName", "sumType"
, "startMonth", "endMonth", "proveSalary", "creatUserName", "creatDate", "purpose", "isInvalid"
, "invalidReason"};
Set<String> exportSet = Arrays.stream(exportFields).collect(Collectors.toSet());
searchVo.setExportFields(exportSet);
}
ExcelWriter excelWriter = EasyExcelFactory.write(out, TProveRecord.class).includeColumnFiledNames(searchVo.getExportFields()).build();
int index = 0;
WriteSheet writeSheet;
if (count > CommonConstants.ZERO_INT) {
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT_3) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT_3);
list = baseMapper.getRecordInfoNoPage(searchVo);
if (Common.isNotNull(list)) {
writeSheet = EasyExcelFactory.writerSheet("证明记录" + index).build();
excelWriter.write(list, writeSheet);
index++;
list.clear();
}
}
} else {
writeSheet = EasyExcelFactory.writerSheet("证明记录" + index).build();
excelWriter.write(list, writeSheet);
}
if (Common.isNotNull(list)) {
list.clear();
}
out.flush();
excelWriter.finish();
} catch (Exception e) {
log.error("执行异常", e);
} finally {
try {
if (null != out) {
out.close();
}
} catch (IOException e) {
log.error("执行异常", e);
}
}
}
}
/**
* Copyright © 2017yifu. All rights reserved.
*
* @Title: NumberToCN.java
* @Prject: wanxin_hr
* @Package: com.yifu.util
* @Description: TODO
* @author: Administrator
* @date: 2017年5月8日 下午6:45:01
* @version: V1.0
*/
package com.yifu.cloud.plus.v1.yifu.archives.utils;
import java.math.BigDecimal;
/**
* @Author: wangan
* @Date: 2019/8/9
* @Description: 金额转换金额大写, 从老hr复制过
* @return:
**/
public class NumberToCN {
/**
* 汉语中数字大写
*/
private static final String[] CN_UPPER_NUMBER = {"零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"};
/**
* 汉语中货币单位大写,这样的设计类似于占位符
*/
private static final String[] CN_UPPER_MONETRAY_UNIT = {"分", "角", "元", "拾", "佰", "仟", "万", "拾", "佰", "仟", "亿", "拾",
"佰", "仟", "兆", "拾", "佰", "仟"};
/**
* 特殊字符:整
*/
private static final String CN_FULL = "整";
/**
* 特殊字符:负
*/
private static final String CN_NEGATIVE = "负";
/**
* 金额的精度,默认值为2
*/
private static final int MONEY_PRECISION = 2;
/**
* 特殊字符:零元整
*/
private static final String CN_ZEOR_FULL = "零元" + CN_FULL;
/**
* 把输入的金额转换为汉语中人民币的大写
*
* @param numberOfMoney
* 输入的金额
* @return 对应的汉语大写
*/
public static String number2CNMontrayUnit(BigDecimal numberOfMoney) {
if (null == numberOfMoney) {
numberOfMoney = BigDecimal.ZERO;
}
StringBuffer sb = new StringBuffer();
// -1, 0, or 1 as the value of this BigDecimal is negative, zero, or
// positive.
int signum = numberOfMoney.signum();
// 零元整的情况
if (signum == 0) {
return CN_ZEOR_FULL;
}
// 这里会进行金额的四舍五入
long number = numberOfMoney.movePointRight(MONEY_PRECISION).setScale(0, 4).abs().longValue();
// 得到小数点后两位值
long scale = number % 100;
int numUnit = 0;
int numIndex = 0;
boolean getZero = false;
// 判断最后两位数,一共有四中情况:00 = 0, 01 = 1, 10, 11
if (!(scale > 0)) {
numIndex = 2;
number = number / 100;
getZero = true;
}
if ((scale > 0) && (!(scale % 10 > 0))) {
numIndex = 1;
number = number / 10;
getZero = true;
}
int zeroSize = 0;
while (true) {
if (number <= 0) {
break;
}
// 每次获取到最后一个数
numUnit = (int) (number % 10);
if (numUnit > 0) {
if ((numIndex == 9) && (zeroSize >= 3)) {
sb.insert(0, CN_UPPER_MONETRAY_UNIT[6]);
}
if ((numIndex == 13) && (zeroSize >= 3)) {
sb.insert(0, CN_UPPER_MONETRAY_UNIT[10]);
}
sb.insert(0, CN_UPPER_MONETRAY_UNIT[numIndex]);
sb.insert(0, CN_UPPER_NUMBER[numUnit]);
getZero = false;
zeroSize = 0;
} else {
++zeroSize;
if (!(getZero)) {
sb.insert(0, CN_UPPER_NUMBER[numUnit]);
}
if (numIndex == 2) {
if (number > 0) {
sb.insert(0, CN_UPPER_MONETRAY_UNIT[numIndex]);
}
} else if (((numIndex - 2) % 4 == 0) && (number % 1000 > 0)) {
sb.insert(0, CN_UPPER_MONETRAY_UNIT[numIndex]);
}
getZero = true;
}
// 让number每次都去掉最后一个数
number = number / 10;
++numIndex;
}
// 如果signum == -1,则说明输入的数字为负数,就在最前面追加特殊字符:负
if (signum == -1) {
sb.insert(0, CN_NEGATIVE);
}
// 输入的数字小数点后两位为"00"的情况,则要在最后追加特殊字符:整
if (!(scale > 0)) {
sb.append(CN_FULL);
}
return sb.toString();
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.archives.mapper.LUnitInfoForProveMapper">
<resultMap id="lUnitInfoForProveMap" type="com.yifu.cloud.plus.v1.yifu.archives.entity.LUnitInfoForProve">
<id property="id" column="id"/>
<result property="creatUser" column="creat_user"/>
<result property="unitName" column="unit_name"/>
<result property="unitAddr" column="unit_addr"/>
<result property="phone" column="phone"/>
</resultMap>
<sql id="Base_Column_List">
a.id,
a.creat_user,
a.unit_name,
a.unit_addr,
a.phone
</sql>
<sql id="lUnitInfoForProve_where">
<if test="lUnitInfoForProve != null">
<if test="lUnitInfoForProve.id != null">
AND a.id = #{lUnitInfoForProve.id}
</if>
<if test="lUnitInfoForProve.creatUser != null">
AND a.creat_user = #{lUnitInfoForProve.creatUser}
</if>
<if test="lUnitInfoForProve.unitName != null and lUnitInfoForProve.unitName.trim() != ''">
AND a.unit_name = #{lUnitInfoForProve.unitName}
</if>
<if test="lUnitInfoForProve.unitAddr != null and lUnitInfoForProve.unitAddr.trim() != ''">
AND a.unit_addr = #{lUnitInfoForProve.unitAddr}
</if>
<if test="lUnitInfoForProve.phone != null and lUnitInfoForProve.phone.trim() != ''">
AND a.phone = #{lUnitInfoForProve.phone}
</if>
</if>
</sql>
</mapper>
......@@ -8,7 +8,7 @@
<result property="attaSrc" column="atta_src"/>
<result property="attaSize" column="atta_size"/>
<result property="attaType" column="atta_type"/>
<result property="createUser" column="create_user"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="relationType" column="relation_type"/>
<result property="domainId" column="domain_id"/>
......@@ -19,7 +19,7 @@
a.atta_src,
a.atta_size,
a.atta_type,
a.create_user,
a.create_by,
a.create_time,
a.relation_type,
a.domain_id
......@@ -41,8 +41,8 @@
<if test="tAttaInfo.attaType != null and tAttaInfo.attaType.trim() != ''">
AND a.atta_type = #{tAttaInfo.attaType}
</if>
<if test="tAttaInfo.createUser != null and tAttaInfo.createUser.trim() != ''">
AND a.create_user = #{tAttaInfo.createUser}
<if test="tAttaInfo.createBy != null and tAttaInfo.createBy.trim() != ''">
AND a.create_by = #{tAttaInfo.createBy}
</if>
<if test="tAttaInfo.createTime != null">
AND a.create_time = #{tAttaInfo.createTime}
......@@ -106,4 +106,12 @@
</foreach>
</if>
</update>
<select id="getAttaByApplyId" resultMap="tAttaInfoMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_atta_info a
where EXISTS (select 1 from m_salary_prova_atta b where b.SALARY_PROVA_ID = #{applyId} and a.id = b.ATTA_ID);
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.archives.mapper.TProveApplyMapper">
<resultMap id="tProveApplyMap" type="com.yifu.cloud.plus.v1.yifu.archives.entity.TProveApply">
<id property="id" column="id"/>
<result property="employeeInfo" column="employee_info"/>
<result property="creatUser" column="creat_user"/>
<result property="creatDate" column="creat_date"/>
<result property="startMonth" column="start_month"/>
<result property="endMonth" column="end_month"/>
<result property="proveSalary" column="prove_salary"/>
<result property="applyReason" column="apply_reason"/>
<result property="auditStatus" column="audit_status"/>
<result property="auditUser" column="audit_user"/>
<result property="auditDate" column="audit_date"/>
<result property="sumType" column="sum_type"/>
<result property="salary" column="salary"/>
<result property="employeeName" column="EMPLOYEE_NAME"/>
<result property="employeeIdCard" column="EMPLOYEE_ID_CARD"/>
<result property="settleDomainName" column="SETTLE_DOMAIN_NAME"/>
<result property="creatUserName" column="CREAT_USER_NAME"/>
</resultMap>
<sql id="Base_Column_List">
a.id,
a.employee_info,
a.creat_user,
a.creat_date,
a.start_month,
a.end_month,
a.prove_salary,
a.apply_reason,
a.audit_status,
a.audit_user,
a.audit_date,
a.sum_type,
a.salary,
a.EMPLOYEE_NAME,
a.EMPLOYEE_ID_CARD,
a.SETTLE_DOMAIN_NAME,
a.AUDIT_USER_NAME,
a.CREAT_USER_NAME
</sql>
<sql id="tProveApply_where">
<if test="tProveApply != null">
<if test="tProveApply.employeeIdCard != null and tProveApply.employeeIdCard.trim() != ''">
AND a.EMPLOYEE_ID_CARD like '%${tProveApply.employeeIdCard}%'
</if>
<if test="tProveApply.employeeName != null and tProveApply.employeeName.trim() != ''">
AND a.EMPLOYEE_NAME like '%${tProveApply.employeeName}%'
</if>
<if test="tProveApply.employeeInfo != null and tProveApply.employeeInfo.trim() != ''">
AND a.employee_info = #{tProveApply.employeeInfo}
</if>
<if test="tProveApply.creatUser != null">
AND a.creat_user = #{tProveApply.creatUser}
</if>
<if test="tProveApply.creatDate != null">
AND a.creat_date = #{tProveApply.creatDate}
</if>
<if test="tProveApply.startMonth != null and tProveApply.startMonth.trim() != ''">
AND a.start_month = #{tProveApply.startMonth}
</if>
<if test="tProveApply.endMonth != null and tProveApply.endMonth.trim() != ''">
AND a.end_month = #{tProveApply.endMonth}
</if>
<if test="tProveApply.proveSalary != null">
AND a.prove_salary = #{tProveApply.proveSalary}
</if>
<if test="tProveApply.applyReason != null and tProveApply.applyReason.trim() != ''">
AND a.apply_reason = #{tProveApply.applyReason}
</if>
<if test="tProveApply.auditStatus != null">
AND a.audit_status = #{tProveApply.auditStatus}
</if>
<if test="tProveApply.auditUser != null">
AND a.audit_user = #{tProveApply.auditUser}
</if>
<if test="tProveApply.auditDate != null">
AND a.audit_date = #{tProveApply.auditDate}
</if>
<if test="tProveApply.sumType != null">
AND a.sum_type = #{tProveApply.sumType}
</if>
<if test="tProveApply.salary != null">
AND a.salary = #{tProveApply.salary}
</if>
</if>
</sql>
<!--tProveApply简单分页查询-->
<select id="getTProveApplyPage" resultMap="tProveApplyMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_prove_apply a
<where>
1=1
<include refid="tProveApply_where"/>
</where>
order by a.creat_date desc
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.archives.mapper.TProveRecordMapper">
<resultMap id="tProveRecordMap" type="com.yifu.cloud.plus.v1.yifu.archives.entity.TProveRecord">
<id property="id" column="id"/>
<result property="employeeInfo" column="employee_info"/>
<result property="creatUser" column="creat_user"/>
<result property="creatDate" column="creat_date"/>
<result property="startMonth" column="start_month"/>
<result property="endMonth" column="end_month"/>
<result property="salary" column="salary"/>
<result property="proveSalary" column="prove_salary"/>
<result property="isInvalid" column="is_invalid"/>
<result property="invalidReason" column="invalid_reason"/>
<result property="no" column="no"/>
<result property="purpose" column="purpose"/>
<result property="sumType" column="sum_type"/>
<result property="proveType" column="prove_type"/>
<result property="number" column="number"/>
<result property="unitName" column="unit_name"/>
<result property="unitAddr" column="unit_addr"/>
<result property="phone" column="phone"/>
<result property="employeeIdCard" column="EMPLOYEE_ID_CARD"/>
<result property="employeeName" column="EMPLOYEE_NAME"/>
<result property="employeeSettleDepartName" column="EMPLOYEE_SETTLE_DEPART_NAME"/>
<result property="creatUserName" column="CREAT_USER_NAME"/>
</resultMap>
<sql id="Base_Column_List">
a.id,
a.employee_info,
a.creat_user,
a.creat_date,
a.start_month,
a.end_month,
a.salary,
a.prove_salary,
a.is_invalid,
a.invalid_reason,
a.no,
a.purpose,
a.sum_type,
a.prove_type,
a.number,
a.unit_name,
a.unit_addr,
a.phone,
a.EMPLOYEE_ID_CARD,
a.EMPLOYEE_NAME,
a.EMPLOYEE_SETTLE_DEPART_NAME,
a.CREAT_USER_NAME
</sql>
<sql id="tProveRecord_where">
<if test="tProveRecord != null">
<if test="tProveRecord.idList != null and tProveRecord.idList.size>0">
AND a.id in
<foreach item="idStr" index="index" collection="tProveRecord.idList" open="(" separator="," close=")">
#{idStr}
</foreach>
</if>
<if test="tProveRecord.creatUser != null">
AND a.creat_user = #{tProveRecord.creatUser}
</if>
<if test="tProveRecord.employeeIdCard != null and tProveRecord.employeeIdCard.trim() != ''">
AND a.EMPLOYEE_ID_CARD like '%${tProveRecord.employeeIdCard}%'
</if>
<if test="tProveRecord.employeeName != null and tProveRecord.employeeName.trim() != ''">
AND a.EMPLOYEE_NAME like '%${tProveRecord.employeeName}%'
</if>
<if test="tProveRecord.creatDate != null">
AND a.creat_date = #{tProveRecord.creatDate}
</if>
<if test="tProveRecord.startMonth != null and tProveRecord.startMonth.trim() != ''">
AND a.start_month = #{tProveRecord.startMonth}
</if>
<if test="tProveRecord.endMonth != null and tProveRecord.endMonth.trim() != ''">
AND a.end_month = #{tProveRecord.endMonth}
</if>
<if test="tProveRecord.salary != null">
AND a.salary = #{tProveRecord.salary}
</if>
<if test="tProveRecord.proveSalary != null">
AND a.prove_salary = #{tProveRecord.proveSalary}
</if>
<if test="tProveRecord.isInvalid != null">
AND a.is_invalid = #{tProveRecord.isInvalid}
</if>
<if test="tProveRecord.invalidReason != null and tProveRecord.invalidReason.trim() != ''">
AND a.invalid_reason = #{tProveRecord.invalidReason}
</if>
<if test="tProveRecord.no != null and tProveRecord.no.trim() != ''">
AND a.no = #{tProveRecord.no}
</if>
<if test="tProveRecord.purpose != null and tProveRecord.purpose.trim() != ''">
AND a.purpose = #{tProveRecord.purpose}
</if>
<if test="tProveRecord.sumType != null">
AND a.sum_type = #{tProveRecord.sumType}
</if>
<if test="tProveRecord.proveType != null">
AND a.prove_type = #{tProveRecord.proveType}
</if>
<if test="tProveRecord.number != null">
AND a.number = #{tProveRecord.number}
</if>
<if test="tProveRecord.unitName != null and tProveRecord.unitName.trim() != ''">
AND a.unit_name = #{tProveRecord.unitName}
</if>
<if test="tProveRecord.unitAddr != null and tProveRecord.unitAddr.trim() != ''">
AND a.unit_addr = #{tProveRecord.unitAddr}
</if>
<if test="tProveRecord.phone != null and tProveRecord.phone.trim() != ''">
AND a.phone = #{tProveRecord.phone}
</if>
</if>
</sql>
<!--tProveRecord简单分页查询-->
<select id="getTProveRecordPage" resultMap="tProveRecordMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_prove_record a
<where>
1=1
<include refid="tProveRecord_where"/>
</where>
order by a.creat_date desc
</select>
<!--导出查条数-->
<select id="getCountByExport" resultType="java.lang.Integer">
SELECT
count(1)
FROM t_prove_record a
<where>
1=1
<include refid="tProveRecord_where"/>
</where>
</select>
<!--导出list-->
<select id="getRecordInfoNoPage" resultMap="tProveRecordMap">
SELECT
a.id,
a.creat_date,
a.start_month,
a.end_month,
a.salary,
a.prove_salary,
if(a.is_invalid='0','否','是') as is_invalid,
a.invalid_reason,
a.no,
a.purpose,
if(a.sum_type='0','实发平均','应发平均') as sum_type,
if(a.prove_type='0','正式员工证明','试用期员工证明') as prove_type,
a.number,
a.unit_name,
a.unit_addr,
a.phone,
a.EMPLOYEE_ID_CARD,
a.EMPLOYEE_NAME,
a.EMPLOYEE_SETTLE_DEPART_NAME,
a.CREAT_USER_NAME
FROM t_prove_record a
<where>
1=1
<include refid="tProveRecord_where"/>
</where>
order by a.creat_date desc
<if test="tProveRecord != null">
<if test="tProveRecord.limitStart != null">
limit #{tProveRecord.limitStart},#{tProveRecord.limitEnd}
</if>
</if>
</select>
<select id="createNo" resultType="java.lang.Integer">
select max(right(a.`no`,5))+1 from t_prove_record a where a.`no` like '${str}%'
</select>
</mapper>
......@@ -97,7 +97,7 @@ public class ChecksUtil {
}
}
private static R<TCheckBankNo> checkBankNoTwoMethod(String name, String cardNo) {
public static R<TCheckBankNo> checkBankNoTwoMethod(String name, String cardNo) {
final JsonObject jsonObject = ChecksUtil.invokeBankNoTwoAuth(name,cardNo);
TCheckBankNo checkBankNo = new TCheckBankNo();
// 2.处理返回结果
......
......@@ -33,6 +33,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.concurrent.ExecutionException;
/**
......@@ -135,7 +136,7 @@ public class TCheckBankNoController {
@SysLog("批量银行卡号校验" )
@Inner
@PostMapping("/inner/checkBankNoBatch" )
public CheckBatchVo checkBankNoBatch(@RequestBody List<TCheckBankNo> list) {
public CheckBatchVo checkBankNoBatch(@RequestBody List<TCheckBankNo> list) throws ExecutionException, InterruptedException{
return tCheckBankNoService.checkBankNoBatch(list);
}
......
......@@ -173,5 +173,15 @@ public class TCheckMobileController {
public CheckBatchVo checkMobileBatch(@RequestBody List<String> list) {
return tCheckMobileService.checkMobileBatch(list);
}
/**
* @Author fxj
* @Description 批量手机号校验
* @Date 18:20 2023/3/1
**/
@Operation(description = "批量手机号校验")
@SysLog("批量手机号校验" )
@PostMapping("/checkMobileBatch" )
public CheckBatchVo checkMobileBatchs(@RequestBody List<String> list) {
return tCheckMobileService.checkMobileBatch(list);
}
}
......@@ -24,6 +24,7 @@ import com.yifu.cloud.plus.v1.check.vo.CheckBatchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import java.util.List;
import java.util.concurrent.ExecutionException;
/**
* 银行卡卡号 校验
......@@ -50,6 +51,6 @@ public interface TCheckBankNoService extends IService<TCheckBankNo> {
* @Date: 2023/2/9 11:19
* @return: com.yifu.cloud.plus.v1.check.vo.CheckBatchVo
**/
CheckBatchVo checkBankNoBatch(List<TCheckBankNo> list);
CheckBatchVo checkBankNoBatch(List<TCheckBankNo> list) throws ExecutionException, InterruptedException;
}
......@@ -18,6 +18,7 @@ package com.yifu.cloud.plus.v1.check.service.impl;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.check.constant.ChecksConstants;
import com.yifu.cloud.plus.v1.check.entity.TCheckBankNo;
import com.yifu.cloud.plus.v1.check.mapper.TCheckBankNoMapper;
import com.yifu.cloud.plus.v1.check.service.TCanCheckService;
......@@ -37,6 +38,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.*;
/**
* 银行卡卡号 校验
......@@ -98,7 +100,7 @@ public class TCheckBankNoServiceImpl extends ServiceImpl<TCheckBankNoMapper, TCh
}
@Override
public CheckBatchVo checkBankNoBatch(List<TCheckBankNo> list) {
public CheckBatchVo checkBankNoBatch(List<TCheckBankNo> list) throws ExecutionException, InterruptedException{
CheckBatchVo vo = new CheckBatchVo();
List<String> noList = new ArrayList<>();
for (TCheckBankNo no : list) {
......@@ -136,25 +138,117 @@ public class TCheckBankNoServiceImpl extends ServiceImpl<TCheckBankNoMapper, TCh
}
List<TCheckBankNo> saveList = new ArrayList<>();
if (!noCurlist.isEmpty()) {
synchronized (this) {
TCheckBankNo newNo;
R<TCheckBankNo> resR;
boolean canCheck = canCheckService.getCanCheck();
for (TCheckBankNo no : noCurlist) {
resR = ChecksUtil.checkBankNoTwo(no.getName(), no.getBankNo(), canCheck);
if (Common.isNotNull(resR) && Common.isNotNull(resR.getData())) {
newNo = resR.getData();
bankMap.put(newNo.getBankNo(), CommonConstants.ZERO_ONE.equals(newNo.getResult()));
saveList.add(newNo);
int taskSize = 4;
// 创建一个线程池
ExecutorService pool = Executors.newFixedThreadPool(taskSize);
List<Future> listF = new ArrayList<>();
if (noCurlist.size()>=4) {
int l = 4;
Callable c;
Future f;
for (int k=0;k<l;k++) {
if ((k+1)==l) {
List<TCheckBankNo> finalList = noCurlist.subList(k * (noCurlist.size() / l), noCurlist.size());
if (canCheck) {
c = new MyCallable(bankMap, finalList, saveList);
// 执行任务并获取Future对象
f = pool.submit(c);
listF.add(f);
} else {
doNomal(bankMap, saveList, finalList);
}
} else {
List<TCheckBankNo> finalList = noCurlist.subList(k * (noCurlist.size() / l), (k + 1) * (noCurlist.size() / l));
if (canCheck) {
c = new MyCallable(bankMap, finalList, saveList);
// 执行任务并获取Future对象
f = pool.submit(c);
listF.add(f);
} else {
doNomal(bankMap, saveList, finalList);
}
if (!saveList.isEmpty()) {
this.saveBatch(saveList);
}
}
} else {
if (canCheck) {
Callable c = new MyCallable(bankMap, noCurlist, saveList);
// 执行任务并获取Future对象
Future f = pool.submit(c);
listF.add(f);
} else {
doNomal(bankMap, saveList, noCurlist);
}
}
if (canCheck) {
// 关闭线程池
pool.shutdown();
for (Future fs : listF) {
// 从Future对象上获取任务的返回值,并输出到控制台
fs.get();
}
}
//fo (TCheckBankNo no : noCurlist)
// 原代码
/*resR = ChecksUtil.checkBankNoTwo(no.getName(), no.getBankNo(), canCheck)
f (Common.isNotNull(resR) && resR.getCode() == CommonConstants.SUCCESS
&& Common.isNotNull(resR.getData()))
newNo = resR.getData()
bankMap.put(no.getBankNo(), CommonConstants.ZERO_ONE.equals(newNo.getResult()))
saveList.add(newNo)
else
bankMap.put(no.getBankNo(), false)
*/
if (!saveList.isEmpty()) {
this.saveOrUpdateBatch(saveList);
saveList.clear();
}
}
vo.setCheckMap(bankMap);
return vo;
}
private void doNomal(Map<String, Boolean> bankMap, List<TCheckBankNo> saveList, List<TCheckBankNo> finalList) {
TCheckBankNo newNo;
for (TCheckBankNo no : finalList) {
newNo = new TCheckBankNo();
newNo.setBankNo(no.getBankNo());
newNo.setName(no.getName());
newNo.setMessage(ChecksConstants.CHECK_CONFIG_ACCESS);
newNo.setResult("01");
newNo.setType(CommonConstants.ONE_STRING);
newNo.setRemark(ChecksConstants.CHECK_CONFIG_ACCESS);
saveList.add(newNo);
bankMap.put(no.getBankNo(), true);
}
}
static class MyCallable implements Callable<Object> {
private final List<TCheckBankNo> saveList;
private final List<TCheckBankNo> noList;
private final Map<String, Boolean> bankMap;
MyCallable(Map<String, Boolean> bankMap, List<TCheckBankNo> no, List<TCheckBankNo> saveList) {
this.noList = no;
this.bankMap = bankMap;
this.saveList = saveList;
}
public Map<String, Boolean> call() {
for (TCheckBankNo no : noList) {
// 1.调用银行卡信息校验api
R<TCheckBankNo> resR = ChecksUtil.checkBankNoTwoMethod(no.getName(), no.getBankNo());
if (Common.isNotNull(resR) && resR.getCode() == CommonConstants.SUCCESS
&& Common.isNotNull(resR.getData())) {
TCheckBankNo newNo = resR.getData();
bankMap.put(no.getBankNo(), CommonConstants.ZERO_ONE.equals(newNo.getResult()));
saveList.add(newNo);
} else {
bankMap.put(no.getBankNo(), false);
}
}
return bankMap;
}
}
}
......@@ -178,9 +178,35 @@ public class TCheckMobileServiceImpl extends ServiceImpl<TCheckMobileMapper, TCh
}
}
List<String> noCurlist = new ArrayList<>();
Boolean cur;
Map<String, Boolean> backMap = new HashMap<>();
List<String> tempList = new ArrayList<>();
// 因手机号码最多50个所以这里 要特殊处理下
if (Common.isNotNull(list)){
//计数器
int count =1;
for (String phone:list){
tempList.add(phone);
if (count == 50){
checkMobiles(tempList, vo, noMap, noCurlist, backMap);
tempList.clear();
// 重置
count =1;
}else {
count ++;
}
}
}
checkMobiles(tempList, vo, noMap, noCurlist, backMap);
return vo;
}
private void checkMobiles(List<String> list,
CheckBatchVo vo,
Map<String, Boolean> noMap,
List<String> noCurlist,
Map<String, Boolean> backMap) {
StringBuilder phones = new StringBuilder();
Boolean cur;
for (String check : list) {
cur = noMap.get(check);
if (cur != null) {
......@@ -211,12 +237,11 @@ public class TCheckMobileServiceImpl extends ServiceImpl<TCheckMobileMapper, TCh
}
}
if (!saveList.isEmpty()) {
this.saveBatch(saveList);
this.saveOrUpdateBatch(saveList);
}
saveList.clear();
}
}
vo.setCheckMap(backMap);
return vo;
}
}
......@@ -342,6 +342,8 @@ public interface CommonConstants {
int BATCH_COUNT = 100;
int BATCH_COUNT1 = 2000;
String IMPORT_DATA_ANALYSIS_ERROR = "数据导入解析异常,请检查表数据格式(1.日期格式:yyyy-MM-dd,2.比例为整数且不含%)";
String IMPORT_DATA_ANALYSIS_ERROR_TWO = "数据导入解析异常,请检查表数据格式";
String CREATE_TIME = "CREATE_TIME";
String ID = "ID";
String PARAM_IS_NOT_ERROR = "传参异常,请检查参数";
......
......@@ -1296,4 +1296,23 @@ public class InsurancesConstants {
*/
public static final String AGAIN_UPDATE_STATUS = "再次同步状态成功";
public static final String UPLOAD_PARAM_CHECK_FAIL="上传必要参数不能为空";
/**
* 商险忽略备注
*/
public static final String[] INSURANCE_IGNORE_REMARK = {"已续保", "不续保-员工已离职", "不续保-客户停止合作", "不续保-客户要求不续保", "不续保-客户要求转社保", "未续保"};
/**
* 项目名称不可为空
*/
public static final String PROJECT_NAME_IS_NOT_EMPTY = "项目名称不可为空";
/**
* 项目编码不可为空
*/
public static final String PROJECT_NO_IS_NOT_EMPTY = "项目编码不可为空";
/**
* 商险到期提醒批量导出
*/
public static final String INSURANCE_ALERT_EXPORT = "商险到期提醒批量导出";
}
......@@ -72,14 +72,14 @@ public class TInsuranceAreaRes extends BaseEntity {
@NotBlank(message = "档案-省不能为空")
@ExcelProperty("档案-省")
@Schema(description = "档案-省")
private Integer province;
private String province;
/**
* 档案-市
*/
@ExcelAttribute(name = "档案-市",isArea = true,parentField = "province")
@ExcelProperty("档案-市")
@Schema(description = "档案-市")
private Integer city;
private String city;
/**
......
......@@ -207,7 +207,7 @@ public class TInsuranceDetail extends BaseEntity {
/**
* 结算类型 (0、与薪资合并结算 1、单独结算)
*/
@Schema(description = "结算类型 (0、预估 1、实缴)")
@Schema(description = "结算类型 (0、与薪资合并结算 1、单独结算)")
private Integer settleType;
/**
......@@ -385,5 +385,17 @@ public class TInsuranceDetail extends BaseEntity {
@Schema(description = "退回原因")
private String backRemark;
/**
* 忽略提醒 0:忽略 1:不忽略
*/
@Schema(description = "有忽略提醒 0:忽略 1:不忽略")
private String expireIgnoreFlag;
/**
* 消息提醒备注
*/
@Schema(description = "消息提醒备注")
private String expireRemark;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
......@@ -56,6 +56,12 @@ public class DeptChangeCheckParam implements Serializable {
@Schema(description = "新项目编码")
private String newDeptNo;
/**
* 新项目id
*/
@Schema(description = "新项目id")
private String newDeptId;
/**
* 保险公司名称
*/
......@@ -134,6 +140,12 @@ public class DeptChangeCheckParam implements Serializable {
@Schema(description = "客户编码")
private String newCustomerCode;
/**
* 客户id
*/
@Schema(description = "客户id")
private String newCustomerId;
/**
* 客户名称
*/
......
......@@ -394,4 +394,16 @@ public class InsuranceDetailVO implements Serializable {
*/
@Schema(description = "操作记录列表")
List<TBusinessOperate> operateList;
/**
* 忽略提醒 0:忽略 1:不忽略
*/
@Schema(description = "有忽略提醒 0:忽略 1:不忽略")
private String expireIgnoreFlag;
/**
* 消息提醒备注
*/
@Schema(description = "消息提醒备注")
private String expireRemark;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -106,4 +108,16 @@ public class InsuranceListParam extends BaseEntity {
@Schema(description = "购买标准结束")
private Integer buyStandardMax;
@Schema(description ="客户名称")
private String unitName;
@Schema(description ="客户编码")
private String unitNo;
/**
* 是否有效 0有效 1无效
*/
@Schema(description = "是否有效 0有效 1无效")
private Integer isEffect;
}
......@@ -159,4 +159,16 @@ public class InsuranceListVO implements Serializable {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("派单日期")
private LocalDateTime createTime;
@Schema(description ="客户名称")
private String unitName;
@Schema(description ="客户编码")
private String unitNo;
/**
* 是否有效 0有效 1无效
*/
@Schema(description = "是否有效 0有效 1无效")
private Integer isEffect;
}
......@@ -209,4 +209,10 @@ public class InsuranceRefundListVo implements Serializable {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("派单日期")
private LocalDateTime createTime;
/**
* 是否有效 0有效 1无效
*/
@Schema(description = "是否有效 0有效 1无效")
private Integer isEffect;
}
......@@ -85,4 +85,10 @@ public class InsuranceRefundParam extends BaseEntity implements Serializable {
*/
@Schema(description = "派单结束时间")
private String endDate;
/**
* 是否有效 0有效 1无效
*/
@Schema(description = "是否有效 0有效 1无效")
private Integer isEffect;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import lombok.Data;
import java.util.List;
/**
* @Author fxj
* @Date 2023/2/21
* @Description
* @Version 1.0
*/
@Data
public class InsuranceSearchVo extends TBusinessInsuranceVo{
private List<String> idList;
/**
* @Author fxj
* 查询数据起
**/
private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
private int limitEnd;
/**
* @Author fxj
* 导出字段
**/
List<String> exportFields;
/**
* @Author fxj
* 导出选择的ID
**/
private String idStr;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* @Author fxj
* @Date 2023/2/22
* @Description
* @Version 1.0
*/
@ColumnWidth(10)
@Data
public class InsuranceWarnExportVo implements Serializable {
/**
* 员工姓名
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "员工姓名")
@Schema(name = "员工姓名")
private String empName;
/**
* 员工身份证号
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "员工身份证号码")
@Schema(name = "员工身份证号码")
private String empIdcardNo;
/**
* 客户名称
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "客户")
@Schema(name = "客户")
private String customerName;
/**
* 结算部门名称中文(内部组织架构)
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "项目名称")
@Schema(name = "项目名称")
private String deptName;
/**
* 结算部门编码(内部组织架构)
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "项目编码")
@Schema(name = "项目编码")
private String deptNo;
/**
* 保险公司(配置项)
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "保险公司")
@Schema(name = "保险公司(配置项)")
private String insuranceCompanyName;
/**
* 险种名称中文(配置项) 用于导入
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "险种名称")
@Schema(name = "险种名称")
private String insuranceTypeName;
/**
* 保单开始时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "保单开始时间")
@Schema(name = "保单开始时间")
private String policyStart;
/**
* 保单结束时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "保单结束时间")
@Schema(name = "保单结束时间")
private String policyEnd;
/**
* 购买标准
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "购买标准")
@Schema(name = "购买标准")
private String buyStandard;
/**
* 实际保费
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "保费")
@Schema(name = "保费")
private BigDecimal actualPremium;
/**
* 创建人
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "创建人")
@Schema(name = "创建人")
private String createName;
/**
* 创建时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "创建时间")
@Schema(name = "创建时间")
private String createTime;
/**
* 投保办理状态 1待投保 2投保中 3已投保 4投保退回 5 已减员
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "办理状态")
@Schema(name = "办理状态")
private String buyHandleStatus;
/**
* 出险状态(0未出险;1已出险)
*/
/*@Schema(name = "出险状态(0未出险;1已出险)")
private Integer useStatus;*/
/**
* 保单号
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "保单号")
@Schema(name = "保单号")
private String policyNo;
/**
* 医保
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "医保")
@Schema(name = "医保")
private BigDecimal medicalQuota;
/**
* 身故或残疾
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "身故或残疾")
@Schema(name = "身故或残疾")
private BigDecimal dieDisableQuota;
/**
* 结算月份
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "结算月份")
@Schema(name = "结算月份")
private String settleMonth;
/**
* 发票号
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "发票号")
@Schema(name = "发票号")
private String invoiceNo;
/**
* 被替换时间
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "被替换时间")
@Schema(name = "被替换时间")
private String replaceTime;
/**
* 保单生效时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "保单生效时间")
@Schema(name = "保单生效时间")
private String policyEffect;
/**
* 备注
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "备注")
@Schema(name = "备注")
private String remark;
/**
* 商险购买地省
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "商险购买地省")
@Schema(name = "商险购买地省")
private String insuranceProvince;
/**
* 商险购买地
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "商险购买地市")
@Schema(name = "商险购买地市")
private String insuranceCityName;
/**
* 是否有效 0有效 1无效
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "是否有效")
@Schema(name = "是否有效 0有效 1无效")
private String isEffect;
/**
* 岗位
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "岗位")
@Schema(name = "岗位")
private String post;
//替换人名称,用户展示
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "被替换人姓名")
@Schema(name = "被替换人姓名")
private String fromEmpName;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "替换人姓名")
@Schema(name = "替换人姓名")
//被替换名称,用户展示
private String toEmpName;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "替换时间")
@Schema(name = "替换时间")
private String toReplaceTime;
/**
* 是否过期状态 0 未过期 1已过期。主要用于页面查询展示
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "是否过期")
@Schema(name = "是否过期")
private String isOverdue;
/**
* 预估保费
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "预估保费")
@Schema(name = "预估保费")
private BigDecimal estimatePremium;
/**
* 结算类型 (0、与薪资合并结算 1、单独结算)
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "结算类型")
@Schema(description = "结算类型 (0、与薪资合并结算 1、单独结算)")
private String settleType;
/**
* 退费金额
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "退费金额")
@Schema(name = "退费金额")
private BigDecimal refundMoney;
/**
* 退费时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "退费时间")
@Schema(name = "退费时间")
private String refundCreateTime;
/**
* 退费人
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "退费人")
@Schema(name = "退费人")
private String refundCreateUser;
/**
* 派单人所属部门
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "派单人所属部门")
@Schema(name = "派单人所属部门")
private String createUserDeptName;
/**
* 消息提醒备注
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "消息提醒备注")
private String expireRemark;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* @Author fxj
* @Date 2023/2/21
* @Description
* @Version 1.0
*/
@Schema(description = "商险备注批量操作")
@Data
public class InsurancesWarnUpdateVo extends RowIndex implements Serializable {
/**
* 员工姓名
*/
@ExcelAttribute(name = "员工姓名", errorInfo = "员工姓名不能为空", maxLength = 32, needExport = true)
private String empName;
/**
* 员工身份证号
*/
@ExcelAttribute(name = "员工身份证号码", errorInfo = "员工身份证号不能为空", maxLength = 32, needExport = true)
private String empIdcardNo;
/**
* 结算部门名称中文(内部组织架构)
*/
@Schema(name = "项目名称")
@ExcelAttribute(name = "项目名称")
private String deptName;
/**
* 结算部门编码(内部组织架构)
*/
@Schema(name = "项目编码")
@ExcelAttribute(name = "项目编码")
private String deptNo;
/**
* 保险公司(配置项)
*/
@ExcelAttribute(name = "保险公司名称", errorInfo = "保险公司(配置项)不能为空", maxLength = 32, needExport = true)
private String insuranceCompanyName;
/**
* 险种名称中文(配置项) 用于导入
*/
@ExcelAttribute(name = "险种名称", errorInfo = "险种名称不能为空", maxLength = 32, needExport = true)
private String insuranceTypeName;
/**
* 保单开始时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@ExcelAttribute(name = "保单开始时间", errorInfo = "保单开始时间不能为空", needExport = true)
private String policyStart;
/**
* 保单结束时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@ExcelAttribute(name = "保单结束时间", needExport = true)
private String policyEnd;
/**
* 购买标准
*/
@Schema(name = "购买标准")
private String buyStandard;
/**
* 到期消息提醒批量导入是否续保
*/
@ExcelAttribute(name = "是否续保", maxLength = 32)
private String renewal;
/**
* 备注(未续保原因)
*/
@ExcelAttribute(name = "备注(未续保原因)")
private String expireRemark;
}
......@@ -56,7 +56,22 @@ public class InsuredListVo implements Serializable {
@ExcelProperty(value = "投保类型")
@ExcelAttribute(name = "投保类型", readConverterExp = "1=新增,3=批增,4=替换")
private String buyType;
/**
* 客户名称
*/
@HeadFontStyle(fontHeightInPoints = 11)
@Schema(description ="客户")
@ExcelProperty(value = "客户")
private String unitName;
/**
* 客户编码
*/
@HeadFontStyle(fontHeightInPoints = 11)
@Schema(description ="客户编码")
@ExcelProperty(value = "客户编码")
@ExcelIgnore
private String unitNo;
/**
* 项目名称
*/
......@@ -314,6 +329,4 @@ public class InsuredListVo implements Serializable {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "封面抬头")
private String invoiceTitle;
}
......@@ -131,4 +131,9 @@ public class InsuredParam extends BaseEntity implements Serializable {
**/
private int limitEnd;
@Schema(description ="客户名称")
private String unitName;
@Schema(description ="客户编码")
private String unitNo;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
/**
* @Author fxj
* @Description 商险派单信息表
* @Date 16:59 2023/2/20
**/
@ColumnWidth(10)
@Data
@Schema(name = "商险派单信息表")
public class TBusinessInsuranceVo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(name = "编码")
private String id;
/**
* 员工姓名
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "员工姓名")
@Schema(name = "员工姓名")
private String empName;
/**
* 员工身份证号
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "员工身份证号码")
@Schema(name = "员工身份证号码")
private String empIdcardNo;
/**
* 结算部门名称中文(内部组织架构)
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "项目名称")
@Schema(name = "项目名称")
private String deptName;
/**
* 结算部门编码(内部组织架构)
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "项目编码")
@Schema(name = "项目编码")
private String deptNo;
/**
* 保险公司(配置项)
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "保险公司")
@Schema(name = "保险公司(配置项)")
private String insuranceCompanyName;
/**
* 险种名称中文(配置项) 用于导入
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "险种名称")
@Schema(name = "险种名称")
private String insuranceTypeName;
/**
* 保单开始时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "保单开始时间")
@Schema(name = "保单开始时间")
private LocalDate policyStart;
/**
* 保单结束时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "保单结束时间")
@Schema(name = "保单结束时间")
private LocalDate policyEnd;
/**
* 购买标准
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "购买标准")
@Schema(name = "购买标准")
private String buyStandard;
/**
* 实际保费
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "保费")
@Schema(name = "保费")
private BigDecimal actualPremium;
/**
* 创建人
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "创建人")
@Schema(name = "创建人")
private String createName;
/**
* 创建时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "创建时间")
@Schema(name = "创建时间")
private LocalDateTime createTime;
/**
* 投保办理状态 1待投保 2投保中 3已投保 4投保退回 5 已减员
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "办理状态")
@Schema(name = "办理状态")
private String buyHandleStatus;
/**
* 出险状态(0未出险;1已出险)
*/
/*@Schema(name = "出险状态(0未出险;1已出险)")
private Integer useStatus;*/
/**
* 保单号
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "保单号")
@Schema(name = "保单号")
private String policyNo;
/**
* 医保
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "医保")
@Schema(name = "医保")
private BigDecimal medicalQuota;
/**
* 身故或残疾
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "身故或残疾")
@Schema(name = "身故或残疾")
private BigDecimal dieDisableQuota;
/**
* 结算月份
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "结算月份")
@Schema(name = "结算月份")
private String settleMonth;
/**
* 发票号
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "发票号")
@Schema(name = "发票号")
private String invoiceNo;
/**
* 被替换时间
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "被替换时间")
@Schema(name = "被替换时间")
private String replaceTime;
/**
* 保单生效时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "保单生效时间")
@Schema(name = "保单生效时间")
private String policyEffect;
/**
* 客户名称
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "客户名称")
@Schema(name = "客户名称")
private String customerName;
/**
* 备注
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "备注")
@Schema(name = "备注")
private String remark;
/**
* 商险购买地省
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "商险购买地省")
@Schema(name = "商险购买地省")
private String insuranceProvince;
/**
* 商险购买地
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "商险购买地市")
@Schema(name = "商险购买地市")
private String insuranceCityName;
/**
* 是否有效 0有效 1无效
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "是否有效")
@Schema(name = "是否有效 0有效 1无效")
private String isEffect;
/**
* 岗位
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "岗位")
@Schema(name = "岗位")
private String post;
//替换人名称,用户展示
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "被替换人姓名")
@Schema(name = "被替换人姓名")
private String fromEmpName;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "替换人姓名")
@Schema(name = "替换人姓名")
//被替换名称,用户展示
private String toEmpName;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "替换时间")
@Schema(name = "替换时间")
private String toReplaceTime;
/**
* 是否过期状态 0 未过期 1已过期。主要用于页面查询展示
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "是否过期")
@Schema(name = "是否过期")
private String isOverdue;
/**
* 预估保费
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "预估保费")
@Schema(name = "预估保费")
private BigDecimal estimatePremium;
/**
* 结算类型 (0、与薪资合并结算 1、单独结算)
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "结算类型")
@Schema(description = "结算类型 (0、与薪资合并结算 1、单独结算)")
private Integer settleType;
/**
* 退费金额
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "退费金额")
@Schema(name = "退费金额")
private BigDecimal refundMoney;
/**
* 退费时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "退费时间")
@Schema(name = "退费时间")
private LocalDateTime refundCreateTime;
/**
* 退费人
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "退费人")
@Schema(name = "退费人")
private String refundCreateUser;
/*
*/
/**
* 行业类型
*//*
@Schema(name = "行业类型")
private String industryBelong;
*/
/**
* 我司到款单位名称
*//*
@Schema(name = "我司到款单位名称")
private String selfTomoneyUnitName;
*/
/**
* 派单人所属部门
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "派单人所属部门")
@Schema(name = "派单人所属部门")
private String createUserDeptName;
/**
* 消息提醒备注
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "消息提醒备注")
private String expireRemark;
/**
* 商险购买地省
*/
@Schema(name = "商险购买地省")
private List<String> insuranceProvinces;
/**
* 商险购买地
*/
@Schema(name = "商险购买地市")
private List<String> insuranceCitys;
/**
* 创建人ID
*/
@Schema(name = "创建人ID")
private String createBy;
/**
* 忽略提醒 0:忽略 1:不忽略
*/
@Schema(description = "有忽略提醒 0:忽略 1:不忽略")
private String expireIgnoreFlag;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import lombok.Data;
import java.io.Serializable;
/**
* @auther wangan
* @date 2019/12/3
* @Description: 工作台消息提醒
*/
@Data
public class WorkBanchWarnVo implements Serializable {
private static final long serialVersionUID = 1L;
//消息中文
String mesage;
//总数
int count;
//跳转url
String url;
}
package com.yifu.cloud.plus.v1.yifu.insurances.controller;
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.ErrorMessage;
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.insurances.service.insurance.TInsuranceDetailService;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceSearchVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TBusinessInsuranceVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* @Author fxj
* @Date 2023/2/16
* @Description 商险提醒相关
* @Version 1.0
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/insuranceWarn")
@Tag(name = "商险提醒相关")
public class TInsurancesWarnController {
@Resource
private TInsuranceDetailService insuranceDetailService;
/**
* @Author fxj
* @Description 商险到期提醒分页查询
* @Date 16:51 2023/2/16
**/
@Operation(description = "商险到期提醒分页查询")
@GetMapping("/getExpireWarn/Vopage")
public R<IPage<TBusinessInsuranceVo>> getTBusinessInsuranceExpireWarnVoPage(Page<TBusinessInsuranceVo> page, InsuranceSearchVo tBusinessInsurance) {
return R.ok(insuranceDetailService.getInsuranceExpireWarnVoPage(page, tBusinessInsurance));
}
/**
* @Author fxj
* @Description 备注批量导入
* @Date 16:57 2023/2/16
**/
@SneakyThrows
@Operation(description = "备注批量导入(wxhr:insurance_Warn_batch_update)")
@SysLog("备注批量导入")
@PostMapping("/remark/batchAdd")
//@PreAuthorize("@pms.hasPermission('insurance_Warn_batch_update')")
public R<List<ErrorMessage>> remarkBatchAdd(@RequestBody MultipartFile file) {
return insuranceDetailService.remarkBatchAdd(file.getInputStream());
}
/**
* @Author fxj
* @Description 商险到期提醒分页查询导出
* @Date 16:57 2023/2/16
**/
@PostMapping("/getExpireWarn/export")
@Operation(description = "商险到期提醒分页查询导出 hasPermission('wxhr:insurance_expirewarnexport')")
@SysLog("商险到期提醒分页查询导出")
//@PreAuthorize("@pms.hasPermission('wxhr:insurance_expirewarnexport')")
public void getExpireWarnExport(HttpServletResponse response, HttpServletRequest request, @RequestBody InsuranceSearchVo vo) {
insuranceDetailService.exportInsurancesWarn(vo, response,vo.getExportFields(),vo.getIdStr());
}
/**
* @Author fxj
* @Description 到期提醒备注
* @Date 17:01 2023/2/16
**/
@Operation(description = "到期提醒备注")
@SysLog("到期提醒备注")
@PutMapping("/expireRemark")
public R<Object> expireRemark(@RequestBody TBusinessInsuranceVo vo) {
return insuranceDetailService.expireRemark(vo);
}
/**
* @Author fxj
* @Description 到期提醒忽略
* @Date 17:01 2023/2/16
**/
@Operation(description = "到期提醒忽略(wxhr:insurance_expireignore)")
@SysLog("到期提醒忽略")
@PutMapping("/expireIgnore")
@PreAuthorize("@pms.hasPermission('wxhr:insurance_expireignore')")
public R<Object> expireIgnore(@RequestBody TBusinessInsuranceVo vo) {
return insuranceDetailService.expireIgnore(vo);
}
/**
* @Author fxj
* @Description 到期提醒批量忽略
* @Date 17:06 2023/2/16
**/
@Operation(description = "到期提醒批量忽略(wxhr:insurance_expireignore)")
@SysLog("到期提醒批量忽略")
@PutMapping("/batchexpireIgnore")
@PreAuthorize("@pms.hasPermission('wxhr:insurance_expireignore')")
public R<Object> batchexpireIgnore(@RequestBody String ids) {
return insuranceDetailService.batchexpireIgnore(ids);
}
/**
* @Author fxj
* @Description 工作台消息提醒:商险到期总数通知提醒
* @Date 17:03 2023/2/16
**/
@Operation(description = "商险到期总数通知提醒")
@PostMapping("/workBranch/getWorkBanchInsuranceMessageWarn")
public R<Integer> getExpireInsuranceWarn() {
return insuranceDetailService.getExpireInsuranceWarn();
}
}
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceRefund;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
......@@ -276,4 +277,18 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
**/
List<InsuranceUpdateVO> selectByIds(@Param("ids") List<String> ids);
/**
* @Author fxj
* @Description 商险提醒分页查询
* @Date 16:33 2023/2/20
**/
IPage<TBusinessInsuranceVo> getInsuranceExpireWarnVoPage(Page<TBusinessInsuranceVo> page,
@Param("param")InsuranceSearchVo param,
@Param("domains")List<TSettleDomainSelectVo> domains);
List<InsuranceWarnExportVo> noPageDiy(@Param("param")InsuranceSearchVo searchVo, @Param("domains")List<TSettleDomainSelectVo> listSelectVO);
int noPageCountDiy(@Param("param")InsuranceSearchVo searchVo, @Param("domains")List<TSettleDomainSelectVo> listSelectVO);
void batchexpireIgnore(@Param("idList")List<String> idList);
}
......@@ -4,9 +4,6 @@ package com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author licancan
......@@ -15,6 +12,4 @@ import java.util.List;
*/
@Mapper
public interface TInsuranceOperateMapper extends BaseMapper<TInsuranceOperate> {
int saveOperateInfo(@Param("list") List<TInsuranceOperate> list);
}
......@@ -4,6 +4,7 @@ package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance;
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.common.core.util.ErrorMessage;
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.insurances.entity.TInsuranceDetail;
......@@ -12,6 +13,7 @@ import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
import com.yifu.cloud.plus.v1.yifu.social.vo.ChangeDeptVo;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
/**
......@@ -509,4 +511,18 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @return:
**/
void updateSettleStatus();
IPage<TBusinessInsuranceVo> getInsuranceExpireWarnVoPage(Page<TBusinessInsuranceVo> page, InsuranceSearchVo tBusinessInsurance);
R<Integer> getExpireInsuranceWarn();
R<Object> batchexpireIgnore(String ids);
R<Object> expireIgnore(TBusinessInsuranceVo vo);
R<List<ErrorMessage>> remarkBatchAdd(InputStream inputStream);
void exportInsurancesWarn(InsuranceSearchVo vo, HttpServletResponse response, List<String> exportFields, String idstr);
R<Object> expireRemark(TBusinessInsuranceVo vo);
}
......@@ -4,14 +4,10 @@ package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate;
import java.util.List;
/**
* @author licancan
* @description 针对表【t_insurance_operate(商险操作表)】的数据库操作Service
* @date 2022-07-25 14:20:16
*/
public interface TInsuranceOperateService extends IService<TInsuranceOperate> {
int saveOperateInfo(List<TInsuranceOperate> list);
}
......@@ -6,8 +6,6 @@ import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceOperat
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceOperateService;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @author licancan
......@@ -16,9 +14,4 @@ import java.util.List;
*/
@Service
public class TInsuranceOperateServiceImpl extends ServiceImpl<TInsuranceOperateMapper, TInsuranceOperate> implements TInsuranceOperateService {
@Override
public int saveOperateInfo(List<TInsuranceOperate> list) {
return baseMapper.saveOperateInfo(list);
}
}
package com.yifu.cloud.plus.v1.yifu.insurances.util;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpIdCardAndDeptVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpStatusVo;
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.DateUtil;
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.dapr.util.ArchivesDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.SalaryDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.SocialDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
......@@ -30,6 +34,7 @@ import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
/**
......@@ -69,6 +74,10 @@ public class DoJointInsuranceTask {
@Autowired
private TUpdateStatusErrorMapper updateStatusErrorMapper;
@Autowired
private ArchivesDaprUtil archivesDaprUtil;
/**
* @Description: 商险明细推送
* @Author: huyc
......@@ -96,6 +105,22 @@ public class DoJointInsuranceTask {
log.info("推送商险明细到EKP结束");
}
/**
* 保存失败信息
*
* @author zhaji
* @param
* @return {@link String}
*/
private void saveInsuranceEkp(EkpInteractiveParam param, Integer pushType){
TInsuranceEkp ekp = new TInsuranceEkp();
BeanCopyUtils.copyProperties(param,ekp);
ekp.setId(null);
ekp.setCreateTime(LocalDateTime.now());
ekp.setPushType(pushType);
tInsuranceEkpService.save(ekp);
}
/**
* 推送EKP
*
......@@ -188,22 +213,6 @@ public class DoJointInsuranceTask {
}
}
/**
* 保存失败信息
*
* @author zhaji
* @param
* @return {@link String}
*/
private void saveInsuranceEkp(EkpInteractiveParam param, Integer pushType){
TInsuranceEkp ekp = new TInsuranceEkp();
BeanCopyUtils.copyProperties(param,ekp);
ekp.setId(null);
ekp.setCreateTime(LocalDateTime.now());
ekp.setPushType(pushType);
tInsuranceEkpService.save(ekp);
}
@Async
public void updateInsuranceSettleStatus(EkpStatusParamVo vo) {
try {
......@@ -470,4 +479,54 @@ public class DoJointInsuranceTask {
log.error("薪资结算状态更新异常", e);
}
}
/**
* @param sourceList
* @Description: // 同步操作档案的 商险状态为:3失效(0无2正常3失效4处理中)
* @Author: hgw
* @Date: 2022/11/23 15:46
* @return: void
**/
@Async
public void updateEmpInfp(List<TInsuranceDetail> sourceList, String status) {
EmpStatusVo empStatusVo = new EmpStatusVo();
EmpIdCardAndDeptVo empIdCardAndDeptVo;
List<EmpIdCardAndDeptVo> voList = new ArrayList<>();
for (TInsuranceDetail d : sourceList) {
empIdCardAndDeptVo = new EmpIdCardAndDeptVo();
empIdCardAndDeptVo.setIdCard(d.getEmpIdcardNo());
empIdCardAndDeptVo.setDeptNo(d.getDeptNo());
empIdCardAndDeptVo.setStatus(status);
voList.add(empIdCardAndDeptVo);
}
empStatusVo.setEmpInfo(voList);
archivesDaprUtil.updateEmployeeInsuranceStatus(empStatusVo);
archivesDaprUtil.updateEmployeeInfoInsuranceStatus(empStatusVo);
}
/**
* @Description: 商险明细推送
* @Author: huyc
* @Date: 2022-11-30
* @return: void
**/
@Async
public void pushEstime(List<TInsuranceDetail> successList) {
//根据结算类型是合并结算,推送预估保费到ekp(上面已经算好,这里直接判断有预估保费的就推送)
for (TInsuranceDetail tInsuranceDetail : successList) {
//如果是合并计算则推送至EKP
if (CommonConstants.ZERO_INT == tInsuranceDetail.getSettleType()) {
//存储成功后发送给EKP
String s = pushEstimate(tInsuranceDetail, CommonConstants.ONE_INT);
if (StringUtils.isNotBlank(s)) {
LambdaUpdateWrapper<TInsuranceSettle> settleWrapper = new LambdaUpdateWrapper<>();
settleWrapper.eq(TInsuranceSettle::getId, tInsuranceDetail.getDefaultSettleId())
.set(TInsuranceSettle::getIsEstimatePush, CommonConstants.ONE_INT)
.set(TInsuranceSettle::getEstimatePushTime, LocalDateTime.now());
//更新结算信息表
tInsuranceSettleService.update(settleWrapper);
}
}
}
}
}
......@@ -4,10 +4,10 @@ spring:
matching-strategy: ant_path_matcher
config:
activate:
on-profile: test
on-profile: dev
redis:
host: 192.168.1.65
port: 22379
host: 127.0.0.1
port: 6379
password: '@yf_2017'
datasource:
insurances:
......@@ -21,7 +21,7 @@ spring:
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: ekp!@#123
jdbc-url: jdbc:mysql://119.96.192.73:3306/ekp?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
jdbc-url: jdbc:mysql://36.7.147.19:20023/ekp?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
hikari:
minimum-idle: 10 # 最小空闲连接数量
idle-timeout: 60000 # 空闲连接存活最大时间,默认600000(10分钟)
......
......@@ -19,22 +19,4 @@
ID,INSURANCE_DETAIL_ID,OPERATE_DESC,REMARK,
CREATE_BY,CREATE_NAME,CREATE_TIME
</sql>
<insert id="saveOperateInfo" parameterType="java.util.List">
insert into t_insurance_operate
(ID,REMARK,DISPLAY_FLAG,CREATE_BY,CREATE_TIME,CREATE_NAME,OPERATE_DESC,INSURANCE_DETAIL_ID)
VALUES
<foreach collection="list" item="item" index="index" separator=",">
(
#{item.id},
#{item.remark},
#{item.displayFlag},
#{item.createBy},
#{item.createTime},
#{item.createName},
#{item.operateDesc},
#{item.insuranceDetailId}
)
</foreach>
</insert>
</mapper>
......@@ -114,4 +114,8 @@ public class OrderConstants {
* 一次性导出不可超过20000条,请分批导出
*/
public static final String EXPORT_TOO_LONG = "一次性导出不可超过20000条,请分批导出";
/**
* 订单作废失败
*/
public static final String ORDER_INVALID_FAILED = "订单状态为待办理才可作废";
}
......@@ -140,4 +140,17 @@ public class OrderController {
return R.ok(tOrderService.getOrderReplyPageList(page,orderNo));
}
/**
* 订单作废
*
* @author licancan
* @param id
* @return {@link R< String>}
*/
@PostMapping("/invalidOrder")
@Operation(summary = "订单作废", description = "订单作废")
public R invalidOrder(@RequestParam String id) {
return tOrderService.invalidOrder(id);
}
}
......@@ -108,4 +108,13 @@ public interface TOrderService extends IService<TOrder> {
* @throws IOException
*/
R receiveOrderReply(OrderReplyAddVO vo) throws IOException;
/**
* 订单作废
*
* @author licancan
* @param id
* @return {@link R}
*/
R invalidOrder(String id);
}
......@@ -582,4 +582,13 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
return R.ok(OrderConstants.OPERATE_SUCCESS);
}
public R invalidOrder(String id) {
TOrder one = baseMapper.selectById(id);
if (Common.isNotNull(one) && CommonConstants.ZERO_INT != one.getOrderStatus()) {
return R.failed(OrderConstants.ORDER_INVALID_FAILED);
}
one.setDeleteFlag(CommonConstants.ONE_INT);
baseMapper.updateById(one);
return R.ok();
}
}
......@@ -73,6 +73,34 @@ public class TSalaryAccount extends BaseEntity {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("项目编码")
private String deptNo;
/**
* 客户ID
*/
@ExcelAttribute(name = "客户ID", isNotEmpty = true, errorInfo = "客户ID不能为空", maxLength = 32)
@NotBlank(message = "客户ID不能为空")
@Length(max = 32, message = "客户ID不能超过32个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("客户ID")
private String unitId;
/**
* 客户名称
*/
@ExcelAttribute(name = "客户名称", isNotEmpty = true, errorInfo = "客户名称不能为空", maxLength = 50)
@NotBlank(message = "客户名称不能为空")
@Length(max = 50, message = "客户名称不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("客户名称")
private String unitName;
/**
* 客户编码
*/
@ExcelAttribute(name = "客户编码", maxLength = 32)
@Length(max = 32, message = "客户编码不能超过32个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("客户编码")
private String unitNo;
/**
* 封面抬头
*/
......@@ -558,6 +586,17 @@ public class TSalaryAccount extends BaseEntity {
@TableField(exist = false)
private String salaryMonthEnd;
/**
* 结算月份-起
*/
@TableField(exist = false)
private String settleMonthStart;
/**
* 结算月份-止
*/
@TableField(exist = false)
private String settleMonthEnd;
@ExcelProperty(value = "导入行号")
private Integer rowIndex;
}
......@@ -205,4 +205,8 @@ public class TSalaryEmployee extends BaseEntity {
@TableField(exist = false)
private Integer lineNums;
// 是否暂停发0立即发、1暂停发
@TableField(exist = false)
private String salaryGiveTime;
}
/*
* 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.salary.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.math.BigDecimal;
/**
* 工资报账主表(工资条)
*
* @author hgw
* @date 2023-2-17 17:41:43
*/
@Data
@Schema(description = "工资报账导出-审核人专用")
@HeadFontStyle(fontHeightInPoints = 11)
public class TSalaryAccountExportVo {
// 是否劳务费 手机号 计税月份 发放时间 结算月份 工资月份 出账单位 结算单位 结算单位编码
// 结算部门 部门编码 人员类型 在职状态 员工姓名 身份证号 工资应发 实发工资合计
// 年终奖 薪资个税 年终奖扣税 代扣个人社保 代扣个人公积金 个人社保 个人公积金
// 免个税个人代扣 企业(职业)年金 单位社保 单位公积金 代扣单位社保 代扣单位公积金
// 子女教育专项扣除 住房贷款利息专项扣除 住房租金专项扣除 继续教育专项扣除 赡养老人专项扣除 婴幼儿照护费 累计个人养老金
// 减除费用 表单上传人
@ExcelProperty("是否劳务费")
private String formType;
@ExcelProperty("手机号码")
private String empPhone;
@ExcelProperty("计税月份")
private String taxMonth;
@ExcelProperty("结算月份")
private String settlementMonth;
@ExcelProperty("工资月份")
private String salaryMonth;
@ExcelProperty("出账单位")
private String invoiceTitle;
@ExcelProperty("结算单位")
private String unitName;
@ExcelProperty("结算单位编码")
private String unitNo;
@ExcelProperty("结算部门")
private String deptName;
@ExcelProperty("部门编码")
private String deptNo;
@ExcelProperty("员工姓名")
private String empName;
@ExcelProperty("身份证号")
private String empIdcard;
@ExcelProperty("工资应发")
private BigDecimal relaySalary;
@ExcelProperty("实发工资合计")
private BigDecimal actualSalary;
@ExcelProperty("年终奖")
private BigDecimal annualBonus;
@ExcelProperty("薪资个税")
private BigDecimal salaryTax;
@ExcelProperty(value = "年终奖扣税")
private BigDecimal annualBonusTax;
@ExcelProperty("个人社保")
private BigDecimal personSocial;
@ExcelProperty("个人公积金")
private BigDecimal personFund;
@ExcelProperty("免个税个人代扣")
private BigDecimal exemptionPersionTax;
@ExcelProperty("企业(职业)年金")
private BigDecimal enterpriseAnnuity;
@ExcelProperty("单位社保")
private BigDecimal unitSocial;
@ExcelProperty("单位公积金")
private BigDecimal unitFund;
// 子女教育专项扣除 住房贷款利息专项扣除 住房租金专项扣除 继续教育专项扣除 赡养老人专项扣除 婴幼儿照护费 累计个人养老金
@ExcelProperty(value = "子女教育专项扣除")
private BigDecimal sumChildEduMoney;
@ExcelProperty(value = "住房贷款利息专项扣除")
private BigDecimal sumHousingLoanMoney;
@ExcelProperty(value = "住房租金专项扣除")
private BigDecimal sumHousingRentMoney;
@ExcelProperty(value = "继续教育专项扣除")
private BigDecimal sumContinuingEducationMoney;
@ExcelProperty(value = "赡养老人专项扣除")
private BigDecimal sumSupportElderlyMoney;
@ExcelProperty(value = "婴幼儿照护费")
private BigDecimal sumBabyMoney;
@ExcelProperty(value = "累计个人养老金")
private BigDecimal sumPrivatePension;
@ExcelProperty("减除费用")
private BigDecimal costReduction;
@ExcelProperty("表单上传人")
private String createName;
}
/*
* 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.salary.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.math.BigDecimal;
/**
* 报账详情合计金额vo
*
* @author hgw
* @date 2023-2-23 15:22:33
*/
@Data
@Schema(description = "报账详情合计金额vo")
@HeadFontStyle(fontHeightInPoints = 11)
public class TSalaryAccountSumVo {
@ExcelProperty("应发合计")
private BigDecimal relaySalary;
@ExcelProperty("实发合计")
private BigDecimal actualSalary;
@ExcelProperty("个税合计")
private BigDecimal salaryTax;
@ExcelProperty("年终奖金额合计")
private BigDecimal annualBonus;
@ExcelProperty("年终奖扣税合计")
private BigDecimal annualBonusTax;
@ExcelProperty("社保合计")
private BigDecimal allSocial;
@ExcelProperty("公积金合计")
private BigDecimal allFund;
@ExcelProperty("单位社保合计")
private BigDecimal unitSocial;
@ExcelProperty("单位公积金合计")
private BigDecimal unitFund;
@ExcelProperty("个人社保合计")
private BigDecimal personSocial;
@ExcelProperty("个人公积金合计")
private BigDecimal personFund;
@ExcelProperty("企业年金")
private BigDecimal allEnterpriseAnnuity;
@ExcelProperty("个人年金合计")
private BigDecimal enterpriseAnnuity;
@ExcelProperty("单位年金合计")
private BigDecimal enterpriseAnnuityUnit;
}
......@@ -104,6 +104,33 @@ public class TSalaryAccountVo implements Serializable {
@ExcelProperty("项目名称")
private String deptName;
/**
* 客户ID
*/
@ExcelAttribute(name = "客户ID", isNotEmpty = true, errorInfo = "客户ID不能为空", maxLength = 32)
@NotBlank(message = "客户ID不能为空")
@Length(max = 32, message = "客户ID不能超过32个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("客户ID")
private String unitId;
/**
* 客户名称
*/
@ExcelAttribute(name = "客户名称", isNotEmpty = true, errorInfo = "客户名称不能为空", maxLength = 50)
@NotBlank(message = "客户名称不能为空")
@Length(max = 50, message = "客户名称不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("客户名称")
private String unitName;
/**
* 客户编码
*/
@ExcelAttribute(name = "客户编码", maxLength = 32)
@Length(max = 32, message = "客户编码不能超过32个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("客户编码")
private String unitNo;
/**
* 身份证号
*/
......
......@@ -38,4 +38,6 @@ public class TSalaryDetailVo implements Serializable {
*/
private List<TSalaryStandardIssueRes> resList = new ArrayList<>();
private TSalaryAccountSumVo salarySum = new TSalaryAccountSumVo(); //工资主表合计金额
}
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* @program: master
* @description: 工资证明数据
* @author: pwang
* @create: 2019-11-06 12:01
**/
@Data
public class WageProofDto implements Serializable {
private static final long serialVersionUID = 1L;
private BigDecimal salary;//应发平均
private Integer realMonthCount;//实发月数
private String startMouth;
private String endMouth;
private String emIdCard;
private String sumType;
private String errorInfo;
}
......@@ -24,6 +24,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainListVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.LocalDateTimeUtils;
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.dapr.config.DaprArchivesProperties;
......@@ -39,8 +40,10 @@ import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccountItem;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountItemService;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService;
import com.yifu.cloud.plus.v1.yifu.salary.util.SalaryCommonUtil;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSearchVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryDetailVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.WageProofDto;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
......@@ -48,6 +51,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -205,6 +209,18 @@ public class TSalaryAccountController {
tSalaryAccountService.listExport(response, searchVo);
}
/**
* 审核人导出
* @author hgw
* @date 2023-2-17 11:17:48
**/
@Operation(description = "审核人导出 hasPermission('account_audit_export')")
@PostMapping("/auditExport")
@PreAuthorize("@pms.hasPermission('account_audit_export')")
public void auditExport(HttpServletResponse response, @RequestBody TSalaryAccountSearchVo searchVo) {
tSalaryAccountService.auditExport(response, searchVo);
}
/**
* @Author fxj
* @Description 获取工资条
......@@ -215,14 +231,14 @@ public class TSalaryAccountController {
@Operation(description = "获取工资条")
@GetMapping("/getEmpAccount")
public R<TSalaryDetailVo> getEmpAccount(String empIdcard, String settleDepartId, String settlementMonth
, String settleDepartNo, String settleDepartName, String empName) {
, String deptNo, String deptName, String empName) {
TSalaryDetailVo salaryDetailVo = new TSalaryDetailVo();
if (Common.isEmpty(empIdcard) && Common.isEmpty(settleDepartId) && Common.isEmpty(settlementMonth)
&& Common.isEmpty(settleDepartNo) && Common.isEmpty(settleDepartName) && Common.isEmpty(empName)) {
&& Common.isEmpty(deptNo) && Common.isEmpty(deptName) && Common.isEmpty(empName)) {
return R.failed("请输入查询条件");
}
if (Common.isNotNull(settlementMonth) && Common.isEmpty(empIdcard) && Common.isEmpty(settleDepartId)
&& Common.isEmpty(settleDepartNo) && Common.isEmpty(settleDepartName) && Common.isEmpty(empName)) {
&& Common.isEmpty(deptNo) && Common.isEmpty(deptName) && Common.isEmpty(empName)) {
return R.failed("结算月需配合其他查询条件一起使用,请输入其他查询条件!");
}
//报账表
......@@ -242,11 +258,11 @@ public class TSalaryAccountController {
if (Common.isNotNull(empName)) {
queryWrapperSa.eq("EMP_NAME", empName);
}
if (Common.isNotNull(settleDepartNo)) {
queryWrapperSa.eq("DEPT_NO", settleDepartNo);
if (Common.isNotNull(deptNo)) {
queryWrapperSa.eq("DEPT_NO", deptNo);
}
if (Common.isNotNull(settleDepartName)) {
queryWrapperSa.like("DEPT_NAME", settleDepartName);
if (Common.isNotNull(deptName)) {
queryWrapperSa.like("DEPT_NAME", deptName);
}
if (Common.isNotNull(settlementMonth) && settlementMonth.length() < 6) {
queryWrapperSa.like("SETTLEMENT_MONTH", settlementMonth);
......@@ -304,4 +320,81 @@ public class TSalaryAccountController {
public Boolean updateSalarySettleStatus(@RequestBody List<EkpSocialViewVo> viewVo) {
return tSalaryAccountService.updateSalarySettleStatus(viewVo);
}
/**
* 服务间调用
* @Author pwang
* @Date 2019-11-06 17:14
* @return
**/
@Inner
@PostMapping("/inner/findAverageSalaryForProve")
public WageProofDto findAverageSalaryForProve(@RequestBody WageProofDto pd) {
return getWageProofDtoR(pd.getStartMouth(), pd.getEndMouth(), pd.getEmIdCard(), pd.getSumType(), null);
}
/**
* 获取证明工资数据接口
* @Author pwang
* @Date 2019-11-06 17:14
* @param startMouth 开始月
* @param endMouth 结束月
* @param emIdCard 员工身份证
* @param settleDepartId 结算主体id
* @param sumType 0实发平均 1应发平均
* @return
**/
@Operation(summary = "获取证明工资数据", description = "获取证明工资数据")
@GetMapping("/getAverageSalaryForProve")
public R<WageProofDto> getAverageSalaryForProve(String startMouth, String endMouth, String emIdCard,String sumType, String settleDepartId) {
if( Common.isEmpty(startMouth) || Common.isEmpty(endMouth) || Common.isEmpty(emIdCard) || Common.isEmpty(sumType) ){
return R.failed("参数不完整");
}
WageProofDto wp = getWageProofDtoR(startMouth, endMouth, emIdCard, sumType, settleDepartId);
if (Common.isEmpty(wp.getErrorInfo())) {
return R.failed(wp.getErrorInfo());
} else {
return R.ok(wp);
}
}
private WageProofDto getWageProofDtoR(String startMouth, String endMouth, String emIdCard, String sumType, String settleDepartId) {
WageProofDto wp = new WageProofDto();
List<String> accountIdForProve = tSalaryAccountService.getAccountIdForProve(startMouth, endMouth, emIdCard, settleDepartId);
String accIdStr;
int realMonthCount = 0;
BigDecimal salary = null;
List<String> accountMonthForProve = null;
if (Common.isNotNull(accountIdForProve)) {
accountMonthForProve = tSalaryAccountService.getAccountMonthForProve(startMouth, endMouth, emIdCard, settleDepartId);
if (Common.isNotNull(accountMonthForProve)) {
realMonthCount = accountMonthForProve.size();
int count = LocalDateTimeUtils.getBeginOfMonth(endMouth.concat("01"), startMouth.concat("01"), "yyyyMMdd") + 1;
if (count != realMonthCount) {
wp.setErrorInfo("信息不一致,实际发工资月份为:" + SalaryCommonUtil.listToStrEasy(accountMonthForProve));
return wp;
}
} else {
wp.setErrorInfo("实发工资月份有误!");
return wp;
}
//普通工资信息
accIdStr = SalaryCommonUtil.listForSqlIn(accountIdForProve);
if ("0".equals(sumType)) {
salary = tSalaryAccountItemService.getAllMoneyByAccountIdAndFiedName(accIdStr, SalaryConstants.ACTUAL_SALARY_SUM_JAVA);//实发合计
} else {
salary = tSalaryAccountItemService.getAllMoneyByAccountIdAndFiedName(accIdStr, SalaryConstants.RELAY_SALARY_JAVA);//应发合计
}
}
if (null == salary) {
wp.setErrorInfo("无工资信息!");
return wp;
}
wp.setRealMonthCount(realMonthCount);
wp.setSalary(salary.divide(new BigDecimal(realMonthCount), SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP));
return wp;
}
}
......@@ -23,10 +23,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParamVo;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.vo.AccountCheckVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SalaryAccountAndItemVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SettlementFormVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSearchVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -111,6 +108,9 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
List<TSalaryAccount> noPageDiy(@Param("searchVo") TSalaryAccountSearchVo searchVo,
@Param("idList") List<String> idList);
List<TSalaryAccountExportVo> auditExport(@Param("searchVo") TSalaryAccountSearchVo searchVo,
@Param("idList") List<String> idList);
List<TSalaryAccount> getAccountListBySalaryId(@Param("searchVo") TSalaryAccountSearchVo searchVo);
/**
......@@ -124,6 +124,9 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
int noPageCountDiy(@Param("searchVo") TSalaryAccountSearchVo searchVo,
@Param("idList") List<String> idList);
int auditExportCount(@Param("searchVo") TSalaryAccountSearchVo searchVo,
@Param("idList") List<String> idList);
/**
* @param salaryId 工资表id
* @Description: 退表回退状态
......@@ -173,4 +176,12 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount>
**/
List<TSalaryAccount> getListByIdList(@Param("idList") List<String> idList);
List<String> getAccountIdForProve(@Param("startMouth") String startMouth, @Param("endMouth") String endMouth
, @Param("emIdCard") String emIdCard, @Param("settleDepartId") String settleDepartId);
List<String> getAccountMonthForProve(@Param("startMouth") String startMouth, @Param("endMouth") String endMouth
, @Param("emIdCard") String emIdCard, @Param("settleDepartId") String settleDepartId);
TSalaryAccountSumVo getAccountSumBySalaryId(@Param("salaryId") String salaryId);
}
......@@ -27,6 +27,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SalaryAccountAndItemVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SettlementFormVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSearchVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSumVo;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
......@@ -49,6 +50,14 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
void listExport(HttpServletResponse response, TSalaryAccountSearchVo searchVo);
/**
* @Description: 审核人导出
* @Author: hgw
* @Date: 2023/2/17 11:57
* @return: void
**/
void auditExport(HttpServletResponse response, TSalaryAccountSearchVo searchVo);
/**
* @param salaryId
* @Description: 根据工资id,返回报账明细(字段较少且有计算,其他地方勿用)
......@@ -185,4 +194,15 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
**/
List<TSalaryAccount> getListByIdList(List<String> idList);
// 收入证明使用的
List<String> getAccountIdForProve(String startMouth, String endMouth, String emIdCard, String settleDepartId);
List<String> getAccountMonthForProve(String startMouth, String endMouth, String emIdCard, String settleDepartId);
/**
* @param salaryId
* @Description: 薪资详情里的金额合计
* @Author: hgw
* @Date: 2023/2/23 15:36
* @return: com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSumVo
**/
TSalaryAccountSumVo getAccountSumBySalaryId(String salaryId);
}
......@@ -1408,6 +1408,8 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
List<TSalaryStandardIssueRes> resList = tSalaryStandardIssueResService.list(
Wrappers.<TSalaryStandardIssueRes>query().lambda().eq(TSalaryStandardIssueRes::getSalaryId, salary.getId()));
salaryDetailVo.setResList(resList);
salaryDetailVo.setSalarySum(tSalaryAccountService.getAccountSumBySalaryId(salaryFormId));
}
salaryDetailVo.setAttaList(attaList);
salaryDetailVo.setAuditLogList(auditLogService.list(Wrappers.<TApprovalRecord>query().lambda().eq(TApprovalRecord::getSalaryId, salary.getId())));
......
......@@ -299,7 +299,11 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
List<String> phoneList = new ArrayList<>();
TCheckBankNo checkBankNo;
for (TSalaryEmployee employee : saveNewEmpList) {
if (Common.isNotNull(employee.getBankNo()) && (Common.isEmpty(employee.getIssueStatus()) || employee.getIssueStatus().equals(CommonConstants.ZERO_INT))) {
if (Common.isNotNull(employee.getBankNo())
&& (Common.isEmpty(employee.getIssueStatus()) || employee.getIssueStatus().equals(CommonConstants.ZERO_INT))
&& (Common.isEmpty(employee.getSalaryGiveTime())
|| CommonConstants.ZERO_STRING.equals(employee.getSalaryGiveTime())
|| (CommonConstants.ONE_STRING.equals(employee.getSalaryGiveTime()) && Common.isNotNull(employee.getBankNo())))) {
checkBankNo = new TCheckBankNo();
checkBankNo.setName(employee.getEmpName());
checkBankNo.setBankNo(employee.getBankNo());
......@@ -330,6 +334,11 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
boolean isFalse = false;
for (TSalaryEmployee employee : saveNewEmpList) {
if (Common.isNotNull(employee.getBankNo())
&& (Common.isEmpty(employee.getIssueStatus()) || employee.getIssueStatus().equals(CommonConstants.ZERO_INT))
&& (Common.isEmpty(employee.getSalaryGiveTime())
|| CommonConstants.ZERO_STRING.equals(employee.getSalaryGiveTime())
|| (CommonConstants.ONE_STRING.equals(employee.getSalaryGiveTime()) && Common.isNotNull(employee.getBankNo())))) {
if (bankMap.get(employee.getBankNo()) != null) {
if (Boolean.FALSE.equals(bankMap.get(employee.getBankNo()))) {
errorList.add(new ErrorMessage((employee.getLineNums() + 2), "第" + (employee.getLineNums() + 2) + "行:该员工新建失败:【姓名与卡号验证:认证不一致】"));
......@@ -339,6 +348,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
errorList.add(new ErrorMessage((employee.getLineNums() + 2), "第" + (employee.getLineNums() + 2) + "行:该员工新建失败:【姓名与卡号验证:" + SalaryConstants.CHECK_NO_RESPONSE + "】"));
isFalse = true;
}
}
if (phoneMap.get(employee.getEmpPhone()) != null) {
if (Boolean.FALSE.equals(phoneMap.get(employee.getEmpPhone()))) {
errorList.add(new ErrorMessage((employee.getLineNums() + 2), "第" + (employee.getLineNums() + 2) + "行:该员工新建失败:【手机号验证:手机号错误】"));
......
......@@ -61,6 +61,7 @@
<result property="updateTime" column="UPDATE_TIME"/>
<result property="unitId" column="UNIT_ID"/>
<result property="unitName" column="UNIT_NAME"/>
<result property="unitNo" column="UNIT_NO"/>
<result property="sendTime" column="SEND_TIME"/>
<result property="sendMonth" column="SEND_MONTH"/>
<result property="invoiceTitle" column="INVOICE_TITLE"/>
......@@ -472,6 +473,9 @@
<if test="searchVo.status != null">
AND a.STATUS = #{searchVo.status}
</if>
<if test="searchVo.createName != null and searchVo.createName.trim() != ''">
AND a.CREATE_NAME = #{searchVo.createName}
</if>
</if>
</sql>
......
......@@ -211,6 +211,15 @@ public class TProvidentFund extends BaseEntity {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("项目" )
private String settleDomain;
/**
* 项目编码
*/
@Length(max = 32, message = "项目编码 不能超过32个字符" )
@ExcelAttribute(name = "项目编码", maxLength = 32)
@Schema(description = "项目编码" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("项目编码" )
private String settleDomainCode;
/**
* 缴纳地-省
*/
......
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