Commit b61600c4 authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/MVP1.7.12' into MVP1.7.12

parents e7a83838 1e321e22
...@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.entity; ...@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.baomidou.mybatisplus.annotation.*; import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractPreVo;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity; import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TEmployeeInsurancePre; import com.yifu.cloud.plus.v1.yifu.insurances.entity.TEmployeeInsurancePre;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
...@@ -122,6 +123,10 @@ public class EmployeeRegistrationPre extends BaseEntity { ...@@ -122,6 +123,10 @@ public class EmployeeRegistrationPre extends BaseEntity {
@TableField(exist = false) @TableField(exist = false)
private List<TEmployeeInsurancePre> insurancePreList; private List<TEmployeeInsurancePre> insurancePreList;
@Schema(description = "合同待派单信息")
@TableField(exist = false)
private TEmployeeContractPreVo employeeContractPreVo;
@Schema(description = "附件集合") @Schema(description = "附件集合")
@TableField(exist = false) @TableField(exist = false)
private List<TAttaInfo> attaList; private List<TAttaInfo> attaList;
......
...@@ -71,7 +71,7 @@ public class TEmployeeContractPre extends BaseEntity { ...@@ -71,7 +71,7 @@ public class TEmployeeContractPre extends BaseEntity {
@Schema(description = "前端客服登录名") @Schema(description = "前端客服登录名")
private String customerUserLoginname; private String customerUserLoginname;
@Schema(description = "签署方式0线下签1电子签") @Schema(description = "签署方式1线下签0电子签")
private String signType; private String signType;
@Schema(description = "是否撤销签署0是1否") @Schema(description = "是否撤销签署0是1否")
...@@ -123,10 +123,10 @@ public class TEmployeeContractPre extends BaseEntity { ...@@ -123,10 +123,10 @@ public class TEmployeeContractPre extends BaseEntity {
private String contractTerm; private String contractTerm;
@Schema(description = "合同年限-年") @Schema(description = "合同年限-年")
private String contractDuratioYear; private String contractDurationYear;
@Schema(description = "合同年限-月") @Schema(description = "合同年限-月")
private String contractDuratioMonth; private String contractDurationMonth;
@Schema(description = "合同试用期开始时间") @Schema(description = "合同试用期开始时间")
private Date periodStart; private Date periodStart;
......
...@@ -62,15 +62,11 @@ public class TGzOfferInfo extends BaseEntity { ...@@ -62,15 +62,11 @@ public class TGzOfferInfo extends BaseEntity {
@ExcelProperty("流程ID(瓜子推过来的主键)") @ExcelProperty("流程ID(瓜子推过来的主键)")
@Schema(description = "流程ID(瓜子推过来的主键)") @Schema(description = "流程ID(瓜子推过来的主键)")
private String bizId; private String bizId;
/** /**
* 接收时间 * Offer状态
*/ * (3:待发送Offer,4:待接受Offer,5:拒绝Offer,7:接受offer,9:候选人填写信息,10:取消offer,
@ExcelAttribute(name = "接收时间", isDate = true) * 12:候选人信息审核,13:待签署,8:合同审核通过,99:已归档,98:信息待收集,97:候选人审核通过)
@ExcelProperty("接收时间")
@Schema(description = "接收时间")
private Date receiveTime;
/**
* Offer状态(3:待发送Offer,4:待接受Offer,5:拒绝Offer,7:接受offer,9:候选人填写信息,10:取消offer,12:候选人信息审核,13:待签署,8:合同审核通过。99:已归档)
*/ */
@ExcelAttribute(name = "Offer状态(3:待发送Offer,4:待接受Offer,5:拒绝Offer,7:接受offer,9:候选人填写信息,10:取消offer,12:候选人信息审核,13:待签署,8:合同审核通过。99:已归档)", isNotEmpty = true, errorInfo = "Offer状态(3:待发送Offer,4:待接受Offer,5:拒绝Offer,7:接受offer,9:候选人填写信息,10:取消offer,12:候选人信息审核,13:待签署,8:合同审核通过。99:已归档)不能为空", maxLength = 2) @ExcelAttribute(name = "Offer状态(3:待发送Offer,4:待接受Offer,5:拒绝Offer,7:接受offer,9:候选人填写信息,10:取消offer,12:候选人信息审核,13:待签署,8:合同审核通过。99:已归档)", isNotEmpty = true, errorInfo = "Offer状态(3:待发送Offer,4:待接受Offer,5:拒绝Offer,7:接受offer,9:候选人填写信息,10:取消offer,12:候选人信息审核,13:待签署,8:合同审核通过。99:已归档)不能为空", maxLength = 2)
@NotBlank(message = "Offer状态(3:待发送Offer,4:待接受Offer,5:拒绝Offer,7:接受offer,9:候选人填写信息,10:取消offer,12:候选人信息审核,13:待签署,8:合同审核通过。99:已归档)不能为空") @NotBlank(message = "Offer状态(3:待发送Offer,4:待接受Offer,5:拒绝Offer,7:接受offer,9:候选人填写信息,10:取消offer,12:候选人信息审核,13:待签署,8:合同审核通过。99:已归档)不能为空")
......
...@@ -105,7 +105,7 @@ public class TRegisteWarningEmployee extends BaseEntity { ...@@ -105,7 +105,7 @@ public class TRegisteWarningEmployee extends BaseEntity {
@Schema(description = "短信回执内容") @Schema(description = "短信回执内容")
private String message; private String message;
@Schema(description = "类型 1 待建档 2 带完整") @Schema(description = "类型 1 待建档 2 带完整 3Offer收集短信")
private String type; private String type;
} }
...@@ -2,12 +2,10 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo; ...@@ -2,12 +2,10 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; 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 io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date;
/** /**
* 合同待签订任务记录表 * 合同待签订任务记录表
...@@ -16,7 +14,7 @@ import java.util.Date; ...@@ -16,7 +14,7 @@ import java.util.Date;
* @date 2025-06-11 14:15:53 * @date 2025-06-11 14:15:53
*/ */
@Data @Data
public class TEmployeeContractPreExportVo extends RowIndex implements Serializable { public class TEmployeeContractPreExportVo implements Serializable {
@ExcelAttribute(name = "项目名称") @ExcelAttribute(name = "项目名称")
...@@ -52,10 +50,10 @@ public class TEmployeeContractPreExportVo extends RowIndex implements Serializab ...@@ -52,10 +50,10 @@ public class TEmployeeContractPreExportVo extends RowIndex implements Serializab
/** /**
* 入职日期 * 入职日期
*/ */
@ExcelAttribute(name = "入职日期", isDate = true) @ExcelAttribute(name = "入职日期")
@Schema(description = "入职日期") @Schema(description = "入职日期")
@ExcelProperty("入职日期") @ExcelProperty("入职日期")
private Date joinLeaveDate; private String joinLeaveDate;
@ExcelAttribute(name = "合同类型") @ExcelAttribute(name = "合同类型")
@Schema(description = "合同类型") @Schema(description = "合同类型")
...@@ -85,17 +83,17 @@ public class TEmployeeContractPreExportVo extends RowIndex implements Serializab ...@@ -85,17 +83,17 @@ public class TEmployeeContractPreExportVo extends RowIndex implements Serializab
/** /**
* 预计确认时间 * 预计确认时间
*/ */
@ExcelAttribute(name = "预计确认时间", isDate = true) @ExcelAttribute(name = "预计确认时间")
@Schema(description = "预计确认时间") @Schema(description = "预计确认时间")
@ExcelProperty("预计确认时间") @ExcelProperty("预计确认时间")
private Date expectedConfirmTime; private String expectedConfirmTime;
/** /**
* 预计发起时间 * 预计发起时间
*/ */
@ExcelAttribute(name = "预计发起时间", isDate = true) @ExcelAttribute(name = "预计发起时间")
@Schema(description = "预计发起时间") @Schema(description = "预计发起时间")
@ExcelProperty("预计发起时间") @ExcelProperty("预计发起时间")
private Date expectedCollectionTime; private String expectedCollectionTime;
@ExcelAttribute(name = "状态") @ExcelAttribute(name = "状态")
@Schema(description = "状态") @Schema(description = "状态")
......
/*
* 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.archives.vo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* 导入-瓜子offer信息接收表
*
* @author hgw
* @date 2025-6-16 17:37:47
*/
@Data
public class TGzOfferInfoImportVo extends RowIndex implements Serializable {
@ExcelAttribute(name = "人员类别编码", maxLength = 2)
private String empType;
@ExcelAttribute(name = "人员类别名称", maxLength = 32)
private String empTypeDescr;
/**
* 外签类型:A: 洼地外签/ B:属地外签
*/
@ExcelAttribute(name = "外签类型", maxLength = 2)
private String outSginType;
/**
* 合同公司主体:公司信息表
*/
@ExcelAttribute(name = "合同公司主体", maxLength = 20)
private String comраnу;
@ExcelAttribute(name = "姓名", maxLength = 50)
private String name;
@ExcelAttribute(name = "姓名拼音", maxLength = 100)
private String nameAc;
@ExcelAttribute(name = "姓氏拼音", maxLength = 50)
private String lastNameAc;
@ExcelAttribute(name = "名字拼音", maxLength = 50)
private String firstNameAc;
@ExcelAttribute(name = "国籍编码", maxLength = 10)
private String country;
@ExcelAttribute(name = "国籍描述", maxLength = 30)
private String countryDescr;
@ExcelAttribute(name = "证件类型编码", maxLength = 6)
private String nationalIdType;
@ExcelAttribute(name = "证件类型描述", maxLength = 30)
private String nationalIdTypeDescr;
@ExcelAttribute(name = "证件号码", maxLength = 50)
private String nationalId;
@ExcelAttribute(name = "性别", maxLength = 10)
private String sex;
@ExcelAttribute(name = "个人手机号", maxLength = 30)
private String phone;
@ExcelAttribute(name = "个人邮箱", maxLength = 100)
private String email;
@ExcelAttribute(name = "直接上级姓名", maxLength = 200)
private String supervisorName;
@ExcelAttribute(name = "职务描述", maxLength = 50)
private String jobcodeDescr;
@ExcelAttribute(name = "工作地点", maxLength = 12)
private String workLocation;
@ExcelAttribute(name = "工作地点描述", maxLength = 12)
private String workLocationDescr;
/**
* 预计入职日期:yyyy-MM-dd
*/
@ExcelAttribute(name = "预计入职日期", isDate = true)
private Date expEntryDate;
@ExcelAttribute(name = "部门名称", maxLength = 200)
private String deptName;
/**
* 基本工资,两位小数
*/
@ExcelAttribute(name = "基本工资")
private BigDecimal basePay;
/**
* 绩效工资,两位小数
*/
@ExcelAttribute(name = "绩效工资")
private BigDecimal perfomPay;
@ExcelAttribute(name = "年终奖月数")
private Integer yearBonusMonth;
@ExcelAttribute(name = "社保缴纳地编码", maxLength = 12)
private String socialInsuranceLocation;
@ExcelAttribute(name = "社保缴纳地", maxLength = 30)
private String socialInsuranceLocationDescr;
@ExcelAttribute(name = "社保基数")
private BigDecimal socialInsuranceBase;
@ExcelAttribute(name = "公积金基数")
private BigDecimal houseAccFundBaseMax;
/**
* 是否转正后缴纳公积金(Y:是 N:否)
*/
@ExcelAttribute(name = "是否转正后缴纳公积金", maxLength = 1)
private String beRegularEmpPay;
@ExcelAttribute(name = "申请人邮箱", maxLength = 60)
private String applyUserEmail;
}
...@@ -17,8 +17,12 @@ ...@@ -17,8 +17,12 @@
package com.yifu.cloud.plus.v1.yifu.archives.vo; package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TGzOfferInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TGzOfferInfo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.time.LocalDate;
import java.util.List;
/** /**
* 瓜子offer信息接收表 * 瓜子offer信息接收表
* *
...@@ -28,5 +32,25 @@ import lombok.Data; ...@@ -28,5 +32,25 @@ import lombok.Data;
@Data @Data
public class TGzOfferInfoVo extends TGzOfferInfo { public class TGzOfferInfoVo extends TGzOfferInfo {
// @Schema(description = "人员类别展示值")
// private String empTypeLabel;
//
// @Schema(description = "外签类型展示值")
// private String outSginTypeLabel;
/**
* 查询使用:接收时间开始
*/
private LocalDate createTimeStart;
/**
* 查询使用:接收时间结束
*/
private LocalDate createTimeEnd;
/**
* 批量发送短信使用
*/
@Schema(description = "选中ID,id数组")
private List<String> idList;
} }
...@@ -54,7 +54,7 @@ public class LGuaziOfferRecordController { ...@@ -54,7 +54,7 @@ public class LGuaziOfferRecordController {
@Operation(description = "简单分页查询") @Operation(description = "简单分页查询")
@GetMapping("/page") @GetMapping("/page")
public R<IPage<LGuaziOfferRecord>> getLGuaziOfferRecordPage(Page<LGuaziOfferRecord> page, LGuaziOfferRecord lGuaziOfferRecord) { public R<IPage<LGuaziOfferRecord>> getLGuaziOfferRecordPage(Page<LGuaziOfferRecord> page, LGuaziOfferRecord lGuaziOfferRecord) {
return new R<>(lGuaziOfferRecordService.getLGuaziOfferRecordPage(page,lGuaziOfferRecord)); return new R<>(lGuaziOfferRecordService.getLGuaziOfferRecordPage(page,lGuaziOfferRecord));
} }
/** /**
......
...@@ -19,15 +19,21 @@ package com.yifu.cloud.plus.v1.yifu.archives.controller; ...@@ -19,15 +19,21 @@ package com.yifu.cloud.plus.v1.yifu.archives.controller;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TGzOfferInfoVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog; import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TGzOfferInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TGzOfferInfo;
import com.yifu.cloud.plus.v1.yifu.archives.service.TGzOfferInfoService; import com.yifu.cloud.plus.v1.yifu.archives.service.TGzOfferInfoService;
import lombok.SneakyThrows;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
/** /**
...@@ -53,7 +59,7 @@ public class TGzOfferInfoController { ...@@ -53,7 +59,7 @@ public class TGzOfferInfoController {
*/ */
@Operation(description = "简单分页查询") @Operation(description = "简单分页查询")
@GetMapping("/page") @GetMapping("/page")
public R<IPage<TGzOfferInfo>> getTGzOfferInfoPage(Page<TGzOfferInfo> page, TGzOfferInfo tGzOfferInfo) { public R<IPage<TGzOfferInfoVo>> getTGzOfferInfoPage(Page<TGzOfferInfoVo> page, TGzOfferInfoVo tGzOfferInfo) {
return new R<>(tGzOfferInfoService.getTGzOfferInfoPage(page,tGzOfferInfo)); return new R<>(tGzOfferInfoService.getTGzOfferInfoPage(page,tGzOfferInfo));
} }
...@@ -65,11 +71,36 @@ public class TGzOfferInfoController { ...@@ -65,11 +71,36 @@ public class TGzOfferInfoController {
*/ */
@Operation(summary = "通过id查询", description = "通过id查询:hasPermission('archives_tgzofferinfo_get')") @Operation(summary = "通过id查询", description = "通过id查询:hasPermission('archives_tgzofferinfo_get')")
@GetMapping("/{id}" ) @GetMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('archives_tgzofferinfo_get')" ) public R<TGzOfferInfo> getById(@PathVariable("id" ) Integer id) {
public R<TGzOfferInfo> getById(@PathVariable("id" ) String id) { return R.ok(tGzOfferInfoService.getDataById(id));
return R.ok(tGzOfferInfoService.getById(id));
} }
/**
* 修改瓜子offer信息接收表
* @param tGzOfferInfo 瓜子offer信息接收表
* @return R
*/
@Operation(summary = "修改瓜子offer信息接收表")
@SysLog("修改瓜子offer信息接收表" )
@PutMapping
// @PreAuthorize("@pms.hasPermission('archives_tgzofferinfo_edit')" )
public R<String> updateById(@RequestBody TGzOfferInfo tGzOfferInfo) {
return tGzOfferInfoService.updateDataById(tGzOfferInfo);
}
/**
* 瓜子offer手动状态更新
* @param tGzOfferInfo 瓜子offer信息接收表
* @return R
*/
@Operation(summary = "瓜子offer手动状态更新")
@SysLog("瓜子offer手动状态更新" )
@PutMapping("/updateStatus")
// @PreAuthorize("@pms.hasPermission('archives_tgzofferinfo_edit')" )
public R<String> updateStatus(@RequestBody TGzOfferInfo tGzOfferInfo) {
return tGzOfferInfoService.updateStatus(tGzOfferInfo);
}
/** /**
* 新增瓜子offer信息接收表 * 新增瓜子offer信息接收表
* @param tGzOfferInfo 瓜子offer信息接收表 * @param tGzOfferInfo 瓜子offer信息接收表
...@@ -83,17 +114,30 @@ public class TGzOfferInfoController { ...@@ -83,17 +114,30 @@ public class TGzOfferInfoController {
return R.ok(tGzOfferInfoService.save(tGzOfferInfo)); return R.ok(tGzOfferInfoService.save(tGzOfferInfo));
} }
/** /**
* 修改瓜子offer信息接收表 * 批量导入瓜子offer
* @param tGzOfferInfo 瓜子offer信息接收表 * @author hgw
* @return R * @date 2025-06-16 14:29:13
*/ **/
@Operation(summary = "修改瓜子offer信息接收表", description = "修改瓜子offer信息接收表:hasPermission('archives_tgzofferinfo_edit')") @SneakyThrows
@SysLog("修改瓜子offer信息接收表" ) @Operation(description = "批量导入瓜子offer")
@PutMapping @SysLog("批量导入瓜子offer")
@PreAuthorize("@pms.hasPermission('archives_tgzofferinfo_edit')" ) @PostMapping("/importGzOfferList")
public R<Boolean> updateById(@RequestBody TGzOfferInfo tGzOfferInfo) { public R<List<ErrorMessage>> importGzOfferList(@RequestBody MultipartFile file){
return R.ok(tGzOfferInfoService.updateById(tGzOfferInfo)); return tGzOfferInfoService.importDiy(file.getInputStream());
} }
/**
* 新增瓜子offer信息接收表
* @param tGzOfferInfo 瓜子offer信息接收表
* @return R
*/
@Operation(summary = "单个/批量发送Offer提醒", description = "单个/批量发送Offer提醒")
@SysLog("单个/批量发送Offer提醒" )
@PostMapping("/sendOfferAlert")
public R<Boolean> sendOfferAlert(@RequestBody TGzOfferInfoVo tGzOfferInfo) {
return tGzOfferInfoService.sendOfferAlert(tGzOfferInfo);
}
} }
...@@ -21,9 +21,12 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -21,9 +21,12 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TGzOfferInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TGzOfferInfo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TGzOfferInfoVo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* 瓜子offer信息接收表 * 瓜子offer信息接收表
* *
...@@ -35,7 +38,14 @@ public interface TGzOfferInfoMapper extends BaseMapper<TGzOfferInfo> { ...@@ -35,7 +38,14 @@ public interface TGzOfferInfoMapper extends BaseMapper<TGzOfferInfo> {
/** /**
* 瓜子offer信息接收表简单分页查询 * 瓜子offer信息接收表简单分页查询
* @param tGzOfferInfo 瓜子offer信息接收表 * @param tGzOfferInfo 瓜子offer信息接收表
* @return * @return IPage<TGzOfferInfoVo>
*/ */
IPage<TGzOfferInfo> getTGzOfferInfoPage(Page<TGzOfferInfo> page, @Param("tGzOfferInfo") TGzOfferInfo tGzOfferInfo); IPage<TGzOfferInfoVo> getTGzOfferInfoPage(Page<TGzOfferInfoVo> page, @Param("tGzOfferInfo") TGzOfferInfoVo tGzOfferInfo);
/**
* 瓜子offer信息接收表简单分页查询
* @param tGzOfferInfo 瓜子offer信息接收表
* @return IPage<TGzOfferInfoVo>
*/
List<TGzOfferInfoVo> getTGzOfferInfoSendAlertList(@Param("tGzOfferInfo") TGzOfferInfoVo tGzOfferInfo);
} }
...@@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.EmployeeRegistrationPre; import com.yifu.cloud.plus.v1.yifu.archives.entity.EmployeeRegistrationPre;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractPre;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeePreLog; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeePreLog;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeePreLogSearchVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeePreLogSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
...@@ -53,7 +54,8 @@ public interface TEmployeePreLogService extends IService<TEmployeePreLog> { ...@@ -53,7 +54,8 @@ public interface TEmployeePreLogService extends IService<TEmployeePreLog> {
* @return: void * @return: void
**/ **/
void saveModifyAndUpdateInsurance(String empPreId, EmployeeRegistrationPre oldInfo void saveModifyAndUpdateInsurance(String empPreId, EmployeeRegistrationPre oldInfo
, EmployeeRegistrationPre newInfo, YifuUser user, Map<String, TEmployeeInsurancePre> oldMap); , EmployeeRegistrationPre newInfo, YifuUser user, Map<String, TEmployeeInsurancePre> oldMap
, TEmployeeContractPre contractOld);
/** /**
* @Description: 添加日志并修改商险list * @Description: 添加日志并修改商险list
......
...@@ -17,10 +17,16 @@ ...@@ -17,10 +17,16 @@
package com.yifu.cloud.plus.v1.yifu.archives.service; 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.TGzOfferInfo;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TGzOfferInfo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TGzOfferInfoVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import java.io.InputStream;
import java.util.List;
/** /**
* 瓜子offer信息接收表 * 瓜子offer信息接收表
...@@ -34,6 +40,27 @@ public interface TGzOfferInfoService extends IService<TGzOfferInfo> { ...@@ -34,6 +40,27 @@ public interface TGzOfferInfoService extends IService<TGzOfferInfo> {
* @param tGzOfferInfo 瓜子offer信息接收表 * @param tGzOfferInfo 瓜子offer信息接收表
* @return * @return
*/ */
IPage<TGzOfferInfo> getTGzOfferInfoPage(Page<TGzOfferInfo> page, TGzOfferInfo tGzOfferInfo); IPage<TGzOfferInfoVo> getTGzOfferInfoPage(Page<TGzOfferInfoVo> page, TGzOfferInfoVo tGzOfferInfo);
TGzOfferInfo getDataById(Integer id);
/**
* 修改瓜子offer信息
* @param tGzOfferInfo 字典
* @return R<String>
*/
R<String> updateDataById(TGzOfferInfo tGzOfferInfo);
/**
* 瓜子offer手动状态更新
* @param tGzOfferInfo 字典
* @return R<String>
*/
R<String> updateStatus(TGzOfferInfo tGzOfferInfo);
R<List<ErrorMessage>> importDiy(InputStream inputStream);
R sendOfferAlert(TGzOfferInfoVo tGzOfferInfo);
} }
...@@ -12,10 +12,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; ...@@ -12,10 +12,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.check.entity.TCheckMobile; import com.yifu.cloud.plus.v1.check.entity.TCheckMobile;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationUpdateVo; import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationUpdateVo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.*; import com.yifu.cloud.plus.v1.yifu.archives.entity.*;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.EmployeeRegistrationPreMapper; import com.yifu.cloud.plus.v1.yifu.archives.mapper.*;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TCompleteMonitorMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TPreEmpMainMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.*; import com.yifu.cloud.plus.v1.yifu.archives.service.*;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*; import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
...@@ -29,7 +26,10 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.alisms.YiFuSmsUtil; ...@@ -29,7 +26,10 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.alisms.YiFuSmsUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprCheckProperties; import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprCheckProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprInsurancesProperties; import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprInsurancesProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.*; import com.yifu.cloud.plus.v1.yifu.common.dapr.util.CspDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.InsuranceDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils; import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TEmployeeInsurancePre; import com.yifu.cloud.plus.v1.yifu.insurances.entity.TEmployeeInsurancePre;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail; import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
...@@ -97,6 +97,10 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -97,6 +97,10 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
private final TAttaInfoService attaInfoService; private final TAttaInfoService attaInfoService;
private final TEmployeeContractInfoMapper contractInfoMapper;
private final TEmployeeContractPreMapper contractPreMapper;
@Autowired @Autowired
@Lazy @Lazy
private ScheduleService scheduleService; private ScheduleService scheduleService;
...@@ -645,6 +649,35 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -645,6 +649,35 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
} }
} }
//查询老的合同明细
TEmployeeContractPre contractOld = contractPreMapper.selectOne(Wrappers.<TEmployeeContractPre>query().lambda()
.eq(TEmployeeContractPre::getRegisterId,employeeRegistrationPre.getId())
.last(CommonConstants.LAST_ONE_SQL));
//1.9.12合同自动化校验逻辑
if (employeeRegistrationPre.getServerItem().contains("合同") && null != employeeRegistrationPre.getEmployeeContractPreVo()) {
TEmployeeContractPreVo employeeContractPreVo = employeeRegistrationPre.getEmployeeContractPreVo();
//根据身份证号码和项目编号查询合同
boolean flag = contractInfoMapper.selectCount(Wrappers.<TEmployeeContractInfo>query().lambda()
.eq(TEmployeeContractInfo::getEmpIdcard, employeeRegistrationPre.getEmpIdcard())
.eq(TEmployeeContractInfo::getDeptNo, employeeRegistrationPre.getDeptNo())
.and(obj -> obj.eq(TEmployeeContractInfo::getAuditStatus, CommonConstants.ONE_INT)
.or()
.eq(TEmployeeContractInfo::getAuditStatus, CommonConstants.TWO_INT)
.eq(TEmployeeContractInfo::getInUse, CommonConstants.ZERO_STRING)
)
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL)) > 0;
//是否已签署为是需要判断合同是否在用或者流程中
if (CommonConstants.ZERO_STRING.equals(employeeContractPreVo.getContractFlag()) && !flag) {
return R.failed("未找到流程中或者在用的合同!");
}
//是否已签署为否需要判断是否在用或者流程中的合同
if (CommonConstants.ONE_STRING.equals(employeeContractPreVo.getContractFlag()) && flag) {
return R.failed("该项目下存在在途/有效的合同数据,请“是否已签署合同”是否调整为“是”");
}
initContractPreInfo(employeeRegistrationPre,employeeContractPreVo, user, id);
}
//操作记录中字典值的转化 //操作记录中字典值的转化
String natureItemBefore = null; String natureItemBefore = null;
String natureItemAfter = null; String natureItemAfter = null;
...@@ -740,7 +773,7 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -740,7 +773,7 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
} }
// 添加日志并修改商险list // 添加日志并修改商险list
tEmployeePreLogService.saveModifyAndUpdateInsurance(employeeRegistrationPre.getId(), comparePre tEmployeePreLogService.saveModifyAndUpdateInsurance(employeeRegistrationPre.getId(), comparePre
, employeeRegistrationPre, user, oldMap); , employeeRegistrationPre, user, oldMap, contractOld);
} catch (Exception e) { } catch (Exception e) {
log.error("生成入职待确认信息修改操作日志异常", e); log.error("生成入职待确认信息修改操作日志异常", e);
...@@ -771,6 +804,54 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -771,6 +804,54 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
} }
} }
/**
* 初始化合同
*/
private void initContractPreInfo(EmployeeRegistrationPre registration, TEmployeeContractPreVo employeeContractPreVo,
YifuUser user, String id) {
employeeContractPreVo.setProcessStatus(CommonConstants.ZERO_STRING);
employeeContractPreVo.setSituation("正常签订");
// 设置员工注册ID
employeeContractPreVo.setRegisterId(id);
// 设置客户用户名
employeeContractPreVo.setCustomerUsername(registration.getCustomerUsernameNew());
// 设置客户用户登录名
employeeContractPreVo.setCustomerUserLoginname(registration.getCustomerUserLoginname());
// 设置部门名称
employeeContractPreVo.setDeptName(registration.getDeptName());
// 设置部门ID
employeeContractPreVo.setDeptId(registration.getDeptId());
// 设置数据源
employeeContractPreVo.setDataSource(registration.getDataSource());
// 设置职位
employeeContractPreVo.setPosition(registration.getPosition());
// 设置入职或离职日期
employeeContractPreVo.setJoinLeaveDate(registration.getJoinLeaveDate());
// 设置部门编号
employeeContractPreVo.setDeptNo(registration.getDeptNo());
// 设置员工联系电话
employeeContractPreVo.setEmpPhone(registration.getEmpPhone());
// 设置员工姓名
employeeContractPreVo.setEmployeeName(registration.getEmployeeName());
// 设置员工身份证号
employeeContractPreVo.setEmpIdcard(registration.getEmpIdcard());
// 设置创建者ID
employeeContractPreVo.setCreateBy(user.getId());
// 设置创建者
employeeContractPreVo.setCreateName(user.getNickname());
// 设置更新者ID
employeeContractPreVo.setUpdateBy(user.getId());
// 预计提醒时间、预计合同发起时间
try {
employeeContractPreVo.setExpectedCollectionTime(DateUtil.parseDate(DateUtil.dateToString(
employeeContractPreVo.getExpectedCollectionTime(), DateUtil.ISO_EXPANDED_DATE_FORMAT) + " 9:00", DateUtil.DATETIME_PATTERN_MINUTE));
employeeContractPreVo.setExpectedConfirmTime(DateUtil.parseDate(DateUtil.dateToString(
employeeContractPreVo.getExpectedConfirmTime(), DateUtil.ISO_EXPANDED_DATE_FORMAT) + " 8:30", DateUtil.DATETIME_PATTERN_MINUTE));
} catch (Exception e) {
log.error("合同自动化赋值报错", e);
}
}
/** /**
* @param insurancePreVo * @param insurancePreVo
* @Description: 获取5个字段构成的关键字 * @Description: 获取5个字段构成的关键字
......
...@@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; ...@@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.LGuaziOfferRecord; import com.yifu.cloud.plus.v1.yifu.archives.entity.LGuaziOfferRecord;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.LGuaziOfferRecordMapper; import com.yifu.cloud.plus.v1.yifu.archives.mapper.LGuaziOfferRecordMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.LGuaziOfferRecordService; import com.yifu.cloud.plus.v1.yifu.archives.service.LGuaziOfferRecordService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
......
...@@ -25,6 +25,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; ...@@ -25,6 +25,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.EmployeeRegistrationPre; import com.yifu.cloud.plus.v1.yifu.archives.entity.EmployeeRegistrationPre;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractPre;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeePreLog; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeePreLog;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeePreLogDetail; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeePreLogDetail;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeePreLogMapper; import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeePreLogMapper;
...@@ -165,9 +166,33 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -165,9 +166,33 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
IGNORE_FIELD.add("updateBy"); IGNORE_FIELD.add("updateBy");
} }
private static final List<String> CONTRACT_IGNORE_FIELD = new ArrayList<>();
static {
IGNORE_FIELD.add("joinLeaveDate");
IGNORE_FIELD.add("createTime");
IGNORE_FIELD.add("empPhone");
IGNORE_FIELD.add("employeeName");
IGNORE_FIELD.add("empIdcard");
IGNORE_FIELD.add("deptNo");
IGNORE_FIELD.add("deptName");
IGNORE_FIELD.add("deptId");
IGNORE_FIELD.add("customerUsername");
IGNORE_FIELD.add("customerUserLoginname");
IGNORE_FIELD.add("dataSource");
IGNORE_FIELD.add("position");
IGNORE_FIELD.add("createBy");
IGNORE_FIELD.add("createName");
IGNORE_FIELD.add("updateBy");
IGNORE_FIELD.add("isAddress");
IGNORE_FIELD.add("internshipPeriodNum");
IGNORE_FIELD.add("tryPeriodNum");
IGNORE_FIELD.add("id");
}
@Override @Override
public void saveModifyAndUpdateInsurance(String empPreId, EmployeeRegistrationPre oldInfo public void saveModifyAndUpdateInsurance(String empPreId, EmployeeRegistrationPre oldInfo
, EmployeeRegistrationPre newInfo, YifuUser user, Map<String, TEmployeeInsurancePre> oldMap) { , EmployeeRegistrationPre newInfo, YifuUser user, Map<String, TEmployeeInsurancePre> oldMap,
TEmployeeContractPre contractOld) {
try { try {
//1.9.11 huych 附件类型不比较差异 //1.9.11 huych 附件类型不比较差异
oldInfo.setAttaIdList(null); oldInfo.setAttaIdList(null);
...@@ -205,6 +230,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -205,6 +230,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
boolean isModifyInsurance = false; boolean isModifyInsurance = false;
TEmployeeInsurancePre oldInsurance; TEmployeeInsurancePre oldInsurance;
String differenceInsuranceKey; String differenceInsuranceKey;
String differenceContractKey;
TEmployeePreLogDetail detailInsuranceLog; TEmployeePreLogDetail detailInsuranceLog;
for (TEmployeeInsurancePre newInsurance : newList) { for (TEmployeeInsurancePre newInsurance : newList) {
differenceInsuranceKey = null; differenceInsuranceKey = null;
...@@ -260,6 +286,13 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -260,6 +286,13 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
saveOrUpdateList.add(newInsurance); saveOrUpdateList.add(newInsurance);
} }
} }
boolean isModifyContract =false;
if (contractOld != null && newInfo.getEmployeeContractPreVo() != null) {
differenceContractKey = HrEquator.comparisonValueIgnoreField(contractOld, newInfo.getEmployeeContractPreVo(), CONTRACT_IGNORE_FIELD);
if (null != differenceContractKey) {
isModifyContract = true;
}
}
// 如果变更了 // 如果变更了
if (isModifyInsurance) { if (isModifyInsurance) {
if (Common.isNotNull(diffTitle)) { if (Common.isNotNull(diffTitle)) {
...@@ -268,6 +301,13 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -268,6 +301,13 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
diffTitle = "商险信息"; diffTitle = "商险信息";
} }
} }
if (isModifyContract) {
if (Common.isNotNull(diffTitle)) {
diffTitle += "、合同信息";
} else {
diffTitle = "合同信息";
}
}
} }
// 有修改,则加日志 // 有修改,则加日志
if (Common.isNotNull(diffTitle)) { if (Common.isNotNull(diffTitle)) {
......
...@@ -31,4 +31,11 @@ mybatis-plus: ...@@ -31,4 +31,11 @@ mybatis-plus:
map-underscore-to-camel-case: true map-underscore-to-camel-case: true
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
wx:
corpid: wwbcb090af0dfe50e5
corpsecret: 16kqEL_eU-ARwYyqLgEBWHgxm8gXVnkzv_eJMLy9NpU
agentid: 1000010
authUrl: https://test-wx.worfu.com/yifu-auth/method/oauth/wxLogin
domainName: https://test-wx.worfu.com
...@@ -32,6 +32,8 @@ ...@@ -32,6 +32,8 @@
<result property="createTime" column="create_time"/> <result property="createTime" column="create_time"/>
<result property="createBy" column="create_by"/> <result property="createBy" column="create_by"/>
<result property="createName" column="create_name"/> <result property="createName" column="create_name"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.id, a.id,
...@@ -41,14 +43,16 @@ ...@@ -41,14 +43,16 @@
a.del_flag, a.del_flag,
a.create_time, a.create_time,
a.create_by, a.create_by,
a.create_name a.create_name,
a.update_by,
a.update_time
</sql> </sql>
<sql id="lGuaziOfferRecord_where"> <sql id="lGuaziOfferRecord_where">
<if test="lGuaziOfferRecord != null"> <if test="lGuaziOfferRecord != null">
<if test="lGuaziOfferRecord.id != null and lGuaziOfferRecord.id.trim() != ''"> <if test="lGuaziOfferRecord.id != null and lGuaziOfferRecord.id.trim() != ''">
AND a.id = #{lGuaziOfferRecord.id} AND a.id = #{lGuaziOfferRecord.id}
</if> </if>
<if test="lGuaziOfferRecord.offerId != null and lGuaziOfferRecord.offerId.trim() != ''"> <if test="lGuaziOfferRecord.offerId != null ">
AND a.offer_id = #{lGuaziOfferRecord.offerId} AND a.offer_id = #{lGuaziOfferRecord.offerId}
</if> </if>
<if test="lGuaziOfferRecord.content != null and lGuaziOfferRecord.content.trim() != ''"> <if test="lGuaziOfferRecord.content != null and lGuaziOfferRecord.content.trim() != ''">
...@@ -77,8 +81,12 @@ ...@@ -77,8 +81,12 @@
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
FROM l_guazi_offer_record a FROM l_guazi_offer_record a
<where> <where>
1=1 a.del_flag = '0'
<if test="lGuaziOfferRecord.offerId == null">
AND a.offer_id = 0
</if>
<include refid="lGuaziOfferRecord_where"/> <include refid="lGuaziOfferRecord_where"/>
</where> </where>
ORDER by a.create_time desc,a.id desc
</select> </select>
</mapper> </mapper>
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
<result property="contractStart" column="contract_start"/> <result property="contractStart" column="contract_start"/>
<result property="contractEnd" column="contract_end"/> <result property="contractEnd" column="contract_end"/>
<result property="situation" column="situation"/> <result property="situation" column="situation"/>
<result property="contractDuratioYear" column="contract_duration_year"/> <result property="contractDurationYear" column="contract_duration_year"/>
<result property="contractDuratioMonth" column="contract_duration_month"/> <result property="contractDurationMonth" column="contract_duration_month"/>
<result property="contractTerm" column="CONTRACT_TERM"/> <result property="contractTerm" column="CONTRACT_TERM"/>
<result property="periodStart" column="period_start"/> <result property="periodStart" column="period_start"/>
<result property="periodEnd" column="period_end"/> <result property="periodEnd" column="period_end"/>
...@@ -127,7 +127,6 @@ ...@@ -127,7 +127,6 @@
a.SETTLEMENT_CYCLE, a.SETTLEMENT_CYCLE,
a.PAYMENT_TIME, a.PAYMENT_TIME,
a.PAYMENT_TYPE, a.PAYMENT_TYPE,
a.DISPATCH_PERIOD,
a.DISPATCH_PERIOD_START, a.DISPATCH_PERIOD_START,
a.DISPATCH_PERIOD_END, a.DISPATCH_PERIOD_END,
a.WORK_TYPE, a.WORK_TYPE,
...@@ -146,7 +145,7 @@ ...@@ -146,7 +145,7 @@
a.create_name, a.create_name,
a.create_time, a.create_time,
a.update_by,a.contract_term,a.sign_flag,a.error_info,a.contract_id,a.revoke_reason, a.update_by,a.contract_term,a.sign_flag,a.error_info,a.contract_id,a.revoke_reason,
a.working_hours,a.working_reward,DISPATCH_PERIOD_YEAR,DISPATCH_PERIOD_MONTH a.working_hours,a.working_reward,a.DISPATCH_PERIOD_YEAR,a.DISPATCH_PERIOD_MONTH
</sql> </sql>
<sql id="tEmployeeContractPre_where"> <sql id="tEmployeeContractPre_where">
<if test="tEmployeeContractPre != null"> <if test="tEmployeeContractPre != null">
...@@ -160,7 +159,7 @@ ...@@ -160,7 +159,7 @@
</foreach> </foreach>
</if> </if>
<if test="tEmployeeContractPre.deptName != null and tEmployeeContractPre.deptName.trim() != ''"> <if test="tEmployeeContractPre.deptName != null and tEmployeeContractPre.deptName.trim() != ''">
AND a.dept_name like CONCAT('%',#{tEmployeeContractPre.dept_name},'%') AND a.dept_name like CONCAT('%',#{tEmployeeContractPre.deptName},'%')
</if> </if>
<if test="tEmployeeContractPre.deptNo != null and tEmployeeContractPre.deptNo.trim() != ''"> <if test="tEmployeeContractPre.deptNo != null and tEmployeeContractPre.deptNo.trim() != ''">
AND a.dept_no = #{tEmployeeContractPre.deptNo} AND a.dept_no = #{tEmployeeContractPre.deptNo}
...@@ -211,7 +210,7 @@ ...@@ -211,7 +210,7 @@
AND a.sign_type = #{tEmployeeContractPre.signType} AND a.sign_type = #{tEmployeeContractPre.signType}
</if> </if>
<if test="tEmployeeContractPre.fadadaTemplate != null and tEmployeeContractPre.fadadaTemplate.trim() != ''"> <if test="tEmployeeContractPre.fadadaTemplate != null and tEmployeeContractPre.fadadaTemplate.trim() != ''">
AND a.fadada_template like CONCAT('%',#{tEmployeeContractPre.fadada_template},'%') AND a.fadada_template like CONCAT('%',#{tEmployeeContractPre.fadadaTemplate},'%')
</if> </if>
<if test="tEmployeeContractPre.dataSource != null and tEmployeeContractPre.dataSource.trim() != ''"> <if test="tEmployeeContractPre.dataSource != null and tEmployeeContractPre.dataSource.trim() != ''">
AND a.data_source = #{tEmployeeContractPre.dataSource} AND a.data_source = #{tEmployeeContractPre.dataSource}
...@@ -234,11 +233,11 @@ ...@@ -234,11 +233,11 @@
<if test="tEmployeeContractPre.situation != null and tEmployeeContractPre.situation.trim() != ''"> <if test="tEmployeeContractPre.situation != null and tEmployeeContractPre.situation.trim() != ''">
AND a.situation = #{tEmployeeContractPre.situation} AND a.situation = #{tEmployeeContractPre.situation}
</if> </if>
<if test="tEmployeeContractPre.contractDuratioYear != null and tEmployeeContractPre.contractDuratioYear.trim() != ''"> <if test="tEmployeeContractPre.contractDurationYear != null and tEmployeeContractPre.contractDurationYear.trim() != ''">
AND a.contract_duration_year = #{tEmployeeContractPre.contractDuratioYear} AND a.contract_duration_year = #{tEmployeeContractPre.contractDurationYear}
</if> </if>
<if test="tEmployeeContractPre.contractDuratioMonth != null and tEmployeeContractPre.contractDuratioMonth.trim() != ''"> <if test="tEmployeeContractPre.contractDurationMonth != null and tEmployeeContractPre.contractDurationMonth.trim() != ''">
AND a.contract_duration_month = #{tEmployeeContractPre.contractDuratioMonth} AND a.contract_duration_month = #{tEmployeeContractPre.contractDurationMonth}
</if> </if>
<if test="tEmployeeContractPre.periodStart != null"> <if test="tEmployeeContractPre.periodStart != null">
AND a.period_start = #{tEmployeeContractPre.periodStart} AND a.period_start = #{tEmployeeContractPre.periodStart}
...@@ -393,14 +392,8 @@ ...@@ -393,14 +392,8 @@
a.emp_idcard, a.emp_idcard,
a.emp_phone, a.emp_phone,
a.position, a.position,
a.join_leave_date, DATE_FORMAT(a.join_leave_date,'%Y-%m-%d') join_leave_date,
CASE WHEN a.contract_type=0 THEN "标准合同" a.contract_type,
WHEN a.contract_type =1 THEN "劳务协议"
WHEN a.contract_type =2 THEN "实习协议"
WHEN a.contract_type =3 THEN "劳务派遣合同"
WHEN a.contract_type =4 THEN "非全日制"
WHEN a.contract_type =5 THEN "其他合同"
ELSE a.contract_type END as contract_type,
a.signatory, a.signatory,
a.customer_username, a.customer_username,
if(a.sign_type = '0','线下签','电子签') sign_type, if(a.sign_type = '0','线下签','电子签') sign_type,
...@@ -474,7 +467,6 @@ ...@@ -474,7 +467,6 @@
</where> </where>
</select> </select>
<select id="getAllUnconfimData" resultMap="tEmployeeContractPreMap"> <select id="getAllUnconfimData" resultMap="tEmployeeContractPreMap">
SELECT SELECT
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
......
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
<if test="tGzEmpInfo.id != null and tGzEmpInfo.id.trim() != ''"> <if test="tGzEmpInfo.id != null and tGzEmpInfo.id.trim() != ''">
AND a.id = #{tGzEmpInfo.id} AND a.id = #{tGzEmpInfo.id}
</if> </if>
<if test="tGzEmpInfo.offerId != null and tGzEmpInfo.offerId.trim() != ''"> <if test="tGzEmpInfo.offerId != null ">
AND a.offer_id = #{tGzEmpInfo.offerId} AND a.offer_id = #{tGzEmpInfo.offerId}
</if> </if>
<if test="tGzEmpInfo.empPushStatus != null and tGzEmpInfo.empPushStatus.trim() != ''"> <if test="tGzEmpInfo.empPushStatus != null and tGzEmpInfo.empPushStatus.trim() != ''">
...@@ -367,8 +367,9 @@ ...@@ -367,8 +367,9 @@
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
FROM t_gz_emp_info a FROM t_gz_emp_info a
<where> <where>
1=1 a.del_flag = '0'
<include refid="tGzEmpInfo_where"/> <include refid="tGzEmpInfo_where"/>
</where> </where>
ORDER by a.create_time desc,a.id desc
</select> </select>
</mapper> </mapper>
...@@ -23,10 +23,9 @@ ...@@ -23,10 +23,9 @@
<mapper namespace="com.yifu.cloud.plus.v1.yifu.archives.mapper.TGzOfferInfoMapper"> <mapper namespace="com.yifu.cloud.plus.v1.yifu.archives.mapper.TGzOfferInfoMapper">
<resultMap id="tGzOfferInfoMap" type="com.yifu.cloud.plus.v1.yifu.archives.entity.TGzOfferInfo"> <resultMap id="tGzOfferInfoMap" type="com.yifu.cloud.plus.v1.yifu.archives.vo.TGzOfferInfoVo">
<id property="id" column="id"/> <id property="id" column="id"/>
<result property="bizId" column="biz_id"/> <result property="bizId" column="biz_id"/>
<result property="receiveTime" column="receive_time"/>
<result property="offerStatus" column="offer_status"/> <result property="offerStatus" column="offer_status"/>
<result property="offerSendStatus" column="offer_send_status"/> <result property="offerSendStatus" column="offer_send_status"/>
<result property="updateBy" column="update_by"/> <result property="updateBy" column="update_by"/>
...@@ -63,11 +62,15 @@ ...@@ -63,11 +62,15 @@
<result property="beRegularEmpPay" column="be_regular_emp_pay"/> <result property="beRegularEmpPay" column="be_regular_emp_pay"/>
<result property="applyUserEmail" column="apply_user_email"/> <result property="applyUserEmail" column="apply_user_email"/>
<result property="delFlag" column="del_flag"/> <result property="delFlag" column="del_flag"/>
<result property="createTime" column="create_time"/>
<result property="createBy" column="create_by"/>
<result property="createName" column="create_name"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.id, a.id,
a.biz_id, a.biz_id,
a.receive_time,
a.offer_status, a.offer_status,
a.offer_send_status, a.offer_send_status,
a.update_by, a.update_by,
...@@ -103,18 +106,36 @@ ...@@ -103,18 +106,36 @@
a.house_acc_fund_base_max, a.house_acc_fund_base_max,
a.be_regular_emp_pay, a.be_regular_emp_pay,
a.apply_user_email, a.apply_user_email,
a.del_flag a.del_flag,
a.create_time,
a.create_by,
a.create_name,
a.update_by,
a.update_time
</sql> </sql>
<sql id="tGzOfferInfo_where"> <sql id="tGzOfferInfo_where">
<if test="tGzOfferInfo != null"> <if test="tGzOfferInfo != null">
<if test="tGzOfferInfo.id != null and tGzOfferInfo.id.trim() != ''"> <if test="tGzOfferInfo.id != null">
AND a.id = #{tGzOfferInfo.id} AND a.id = #{tGzOfferInfo.id}
</if> </if>
<if test="tGzOfferInfo.idList != null">
AND a.id in
<foreach item="idStr" index="index" collection="tGzOfferInfo.idList" open="(" separator="," close=")">
#{idStr}
</foreach>
</if>
<if test="tGzOfferInfo.bizId != null and tGzOfferInfo.bizId.trim() != ''"> <if test="tGzOfferInfo.bizId != null and tGzOfferInfo.bizId.trim() != ''">
AND a.biz_id = #{tGzOfferInfo.bizId} AND a.biz_id = #{tGzOfferInfo.bizId}
</if> </if>
<if test="tGzOfferInfo.receiveTime != null"> <if test="tGzOfferInfo.createTime != null">
AND a.receive_time = #{tGzOfferInfo.receiveTime} AND a.create_time = #{tGzOfferInfo.receiveTime}
</if>
<!--查询接收时间-->
<if test="tGzOfferInfo.createTimeStart != null ">
AND a.create_time &gt;= concat(#{tGzOfferInfo.createTimeStart},' 00:00:00')
</if>
<if test="tGzOfferInfo.createTimeEnd != null ">
AND a.create_time &lt;= concat(#{tGzOfferInfo.createTimeEnd},' 23:59:59')
</if> </if>
<if test="tGzOfferInfo.offerStatus != null and tGzOfferInfo.offerStatus.trim() != ''"> <if test="tGzOfferInfo.offerStatus != null and tGzOfferInfo.offerStatus.trim() != ''">
AND a.offer_status = #{tGzOfferInfo.offerStatus} AND a.offer_status = #{tGzOfferInfo.offerStatus}
...@@ -141,7 +162,7 @@ ...@@ -141,7 +162,7 @@
AND a.comраnу = #{tGzOfferInfo.comраnу} AND a.comраnу = #{tGzOfferInfo.comраnу}
</if> </if>
<if test="tGzOfferInfo.name != null and tGzOfferInfo.name.trim() != ''"> <if test="tGzOfferInfo.name != null and tGzOfferInfo.name.trim() != ''">
AND a.name = #{tGzOfferInfo.name} AND a.name like concat('%',#{tGzOfferInfo.name},'%')
</if> </if>
<if test="tGzOfferInfo.nameAc != null and tGzOfferInfo.nameAc.trim() != ''"> <if test="tGzOfferInfo.nameAc != null and tGzOfferInfo.nameAc.trim() != ''">
AND a.name_ac = #{tGzOfferInfo.nameAc} AND a.name_ac = #{tGzOfferInfo.nameAc}
...@@ -165,7 +186,7 @@ ...@@ -165,7 +186,7 @@
AND a.national_id_type_descr = #{tGzOfferInfo.nationalIdTypeDescr} AND a.national_id_type_descr = #{tGzOfferInfo.nationalIdTypeDescr}
</if> </if>
<if test="tGzOfferInfo.nationalId != null and tGzOfferInfo.nationalId.trim() != ''"> <if test="tGzOfferInfo.nationalId != null and tGzOfferInfo.nationalId.trim() != ''">
AND a.national_id = #{tGzOfferInfo.nationalId} AND a.national_id like concat('%',#{tGzOfferInfo.nationalId},'%')
</if> </if>
<if test="tGzOfferInfo.sex != null and tGzOfferInfo.sex.trim() != ''"> <if test="tGzOfferInfo.sex != null and tGzOfferInfo.sex.trim() != ''">
AND a.sex = #{tGzOfferInfo.sex} AND a.sex = #{tGzOfferInfo.sex}
...@@ -232,8 +253,21 @@ ...@@ -232,8 +253,21 @@
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
FROM t_gz_offer_info a FROM t_gz_offer_info a
<where> <where>
1=1 a.del_flag = '0'
<include refid="tGzOfferInfo_where"/>
</where>
ORDER by a.create_time desc,a.id desc
</select>
<!--tGzOfferInfo待发送短信数据查询-->
<select id="getTGzOfferInfoSendAlertList" resultMap="tGzOfferInfoMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_gz_offer_info a
<where>
a.del_flag = '0'
<include refid="tGzOfferInfo_where"/> <include refid="tGzOfferInfo_where"/>
</where> </where>
ORDER by a.create_time desc,a.id desc
</select> </select>
</mapper> </mapper>
...@@ -20,4 +20,9 @@ public interface ClientNameConstants { ...@@ -20,4 +20,9 @@ public interface ClientNameConstants {
* csp * csp
*/ */
String CLIENT_CSP = "yifu-csp"; String CLIENT_CSP = "yifu-csp";
/**
* 瓜子平台
*/
String CLIENT_GZ = "gz";
} }
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.entity;
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.*;
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 org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;
/**
* 社保导出花名册记录表
*
* @author hgw
* @date 2025-06-16 14:29:13
*/
@Data
@TableName("t_dispatch_export_log")
@Schema(description = "社保导出花名册记录表")
public class TDispatchExportLog {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("主键")
@Schema(description = "主键")
private String id;
/**
* 派单ID
*/
@ExcelAttribute(name = "派单ID", isNotEmpty = true, errorInfo = "派单ID不能为空", maxLength = 32)
@NotBlank(message = "派单ID不能为空")
@Length(max = 32, message = "派单ID不能超过32个字符")
@ExcelProperty("派单ID")
@Schema(description = "派单ID")
private String dispatchId;
/**
* 用户ID
*/
@ExcelAttribute(name = "用户ID", isNotEmpty = true, errorInfo = "用户ID不能为空", maxLength = 32)
@NotBlank(message = "用户ID不能为空")
@Length(max = 32, message = "用户ID不能超过32个字符")
@ExcelProperty("用户ID")
@Schema(description = "用户ID")
private String userId;
/**
* 用户名
*/
@ExcelAttribute(name = "用户名", isNotEmpty = true, errorInfo = "用户名不能为空", maxLength = 32)
@NotBlank(message = "用户名不能为空")
@Length(max = 32, message = "用户名不能超过32个字符")
@ExcelProperty("用户名")
@Schema(description = "用户名")
private String userName;
/**
* 创建时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
@Schema(description = "创建时间")
@TableField(fill = FieldFill.INSERT)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("创建时间")
@ColumnWidth(18)
private LocalDateTime createTime;
/**
* @Description: 编号_给前端用的
* @Author: hgw
* @Date: 2025/6/16 15:27
* @return:
**/
@TableField(exist = false)
@Schema(description = "编号")
private long number;
}
package com.yifu.cloud.plus.v1.yifu.social.vo; package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat; import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ContentStyle; import com.alibaba.excel.annotation.write.style.ContentStyle;
...@@ -495,4 +496,16 @@ public class SocialHandleExportVo implements Serializable { ...@@ -495,4 +496,16 @@ public class SocialHandleExportVo implements Serializable {
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保停缴日期" ) @ExcelProperty("社保停缴日期" )
private String socialReduceDate; private String socialReduceDate;
// 备注——社保导出花名册,用来显示异常信息的(例如不是办理人却导出)
@ExcelAttribute(name = "备注")
@ContentStyle(dataFormat = 49)
@Schema(description = "备注")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("备注" )
private String errorRemark;
// 记录导出花名册的人使用
@ExcelIgnore
private String dispatchId;
} }
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.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.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchExportLog;
import com.yifu.cloud.plus.v1.yifu.social.service.TDispatchExportLogService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
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 hgw
* @date 2025-06-16 14:29:13
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/tdispatchexportlog")
@Tag(name = "社保导出花名册记录表管理")
public class TDispatchExportLogController {
private final TDispatchExportLogService tDispatchExportLogService;
/**
* 简单分页查询
*
* @param page 分页对象
* @param tDispatchExportLog 社保导出花名册记录表
* @return
*/
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TDispatchExportLog>> getTDispatchExportLogPage(Page<TDispatchExportLog> page, TDispatchExportLog tDispatchExportLog) {
IPage<TDispatchExportLog> pageList = tDispatchExportLogService.getTDispatchExportLogPage(page, tDispatchExportLog);
if (pageList != null) {
List<TDispatchExportLog> logList = pageList.getRecords();
if (!logList.isEmpty() && Common.isNotNull(page.getCurrent()) && Common.isNotNull(page.getSize())) {
for (int i = 0; i < logList.size(); i++) {
logList.get(i).setNumber((page.getCurrent() - 1) * page.getSize() + i + 1);
}
}
}
return new R<>(pageList);
}
}
...@@ -679,12 +679,15 @@ public class TDispatchInfoController { ...@@ -679,12 +679,15 @@ public class TDispatchInfoController {
@RequestBody SocialHandleSearchVo searchVo) { @RequestBody SocialHandleSearchVo searchVo) {
searchVo.setDeleteFlag(CommonConstants.ZERO_STRING); searchVo.setDeleteFlag(CommonConstants.ZERO_STRING);
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
if (user == null || Common.isEmpty(user.getId())) {
return;
}
menuUtil.setAuthSql(user, searchVo); menuUtil.setAuthSql(user, searchVo);
if (Common.isNotNull(searchVo.getAuthSql()) && searchVo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) { if (Common.isNotNull(searchVo.getAuthSql()) && searchVo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
searchVo.setAuthSql(searchVo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "a.SETTLE_DOMAIN")); searchVo.setAuthSql(searchVo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "a.SETTLE_DOMAIN"));
} }
searchVo.setCreateBy(user.getId()); searchVo.setCreateBy(user.getId());
tDispatchInfoService.doexportSocialRecordRoster(response,searchVo,searchVo.getIdStr(),null); tDispatchInfoService.doexportSocialRecordRoster(response,searchVo,searchVo.getIdStr(),null, user);
} }
/** /**
......
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.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.social.entity.TDispatchExportLog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 社保导出花名册记录表
*
* @author hgw
* @date 2025-06-16 14:29:13
*/
@Mapper
public interface TDispatchExportLogMapper extends BaseMapper<TDispatchExportLog> {
/**
* 社保导出花名册记录表简单分页查询
*
* @param tDispatchExportLog 社保导出花名册记录表
* @return
*/
IPage<TDispatchExportLog> getTDispatchExportLogPage(Page<TDispatchExportLog> page
, @Param("tDispatchExportLog") TDispatchExportLog tDispatchExportLog);
}
...@@ -56,4 +56,6 @@ public interface TSocialfundHouseResMapper extends BaseMapper<TSocialfundHouseRe ...@@ -56,4 +56,6 @@ public interface TSocialfundHouseResMapper extends BaseMapper<TSocialfundHouseRe
**/ **/
void deleteByUserIdAndHuName(@Param("tSocialfundHouseRes") TSocialfundHouseRes tSocialfundHouseRes); void deleteByUserIdAndHuName(@Param("tSocialfundHouseRes") TSocialfundHouseRes tSocialfundHouseRes);
List<String> getSocialListByUserId(@Param("userId") String userId);
} }
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.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.social.entity.TDispatchExportLog;
/**
* 社保导出花名册记录表
*
* @author hgw
* @date 2025-06-16 14:29:13
*/
public interface TDispatchExportLogService extends IService<TDispatchExportLog> {
/**
* 社保导出花名册记录表简单分页查询
*
* @param tDispatchExportLog 社保导出花名册记录表
* @return
*/
IPage<TDispatchExportLog> getTDispatchExportLogPage(Page<TDispatchExportLog> page, TDispatchExportLog tDispatchExportLog);
}
...@@ -106,7 +106,7 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> { ...@@ -106,7 +106,7 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
* @return: void * @return: void
**/ **/
void doExportSocialSoldierAll(HttpServletResponse response, SocialHandleSearchVo searchVo, String idStr, String[] exportFields); void doExportSocialSoldierAll(HttpServletResponse response, SocialHandleSearchVo searchVo, String idStr, String[] exportFields);
void doexportSocialRecordRoster(HttpServletResponse response, SocialHandleSearchVo searchVo, String idStr, String[] exportFields); void doexportSocialRecordRoster(HttpServletResponse response, SocialHandleSearchVo searchVo, String idStr, String[] exportFields, YifuUser user);
/** /**
* @Description: 社保士兵办理列表查询 * @Description: 社保士兵办理列表查询
......
...@@ -28,6 +28,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R; ...@@ -28,6 +28,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.InputStream; import java.io.InputStream;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 社保公积金户权限配置表 * 社保公积金户权限配置表
...@@ -66,4 +67,12 @@ public interface TSocialfundHouseResService extends IService<TSocialfundHouseRes ...@@ -66,4 +67,12 @@ public interface TSocialfundHouseResService extends IService<TSocialfundHouseRes
R<List<ErrorMessage>> importDiy(InputStream inputStream); R<List<ErrorMessage>> importDiy(InputStream inputStream);
R<List<ErrorMessage>> importDiyAll(InputStream inputStream, String type); R<List<ErrorMessage>> importDiyAll(InputStream inputStream, String type);
/**
* @Description: 获取登录人的社保办理权限
* @Author: hgw
* @Date: 2025/6/16 11:31
* @return: java.util.Map<java.lang.String, java.lang.Integer>
**/
Map<String, Integer> getMapByHandleUser(String userId);
} }
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.service.impl;
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.social.entity.TDispatchExportLog;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TDispatchExportLogMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TDispatchExportLogService;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
/**
* 社保导出花名册记录表
*
* @author hgw
* @date 2025-06-16 14:29:13
*/
@Log4j2
@Service
public class TDispatchExportLogServiceImpl extends ServiceImpl<TDispatchExportLogMapper, TDispatchExportLog> implements TDispatchExportLogService {
/**
* 社保导出花名册记录表简单分页查询
*
* @param tDispatchExportLog 社保导出花名册记录表
* @return
*/
@Override
public IPage<TDispatchExportLog> getTDispatchExportLogPage(Page<TDispatchExportLog> page, TDispatchExportLog tDispatchExportLog) {
return baseMapper.getTDispatchExportLogPage(page, tDispatchExportLog);
}
}
...@@ -61,10 +61,7 @@ import com.yifu.cloud.plus.v1.yifu.social.constants.DispatchConstants; ...@@ -61,10 +61,7 @@ import com.yifu.cloud.plus.v1.yifu.social.constants.DispatchConstants;
import com.yifu.cloud.plus.v1.yifu.social.constants.PreDispatchConstants; import com.yifu.cloud.plus.v1.yifu.social.constants.PreDispatchConstants;
import com.yifu.cloud.plus.v1.yifu.social.entity.*; import com.yifu.cloud.plus.v1.yifu.social.entity.*;
import com.yifu.cloud.plus.v1.yifu.social.mapper.*; import com.yifu.cloud.plus.v1.yifu.social.mapper.*;
import com.yifu.cloud.plus.v1.yifu.social.service.TDispatchInfoService; import com.yifu.cloud.plus.v1.yifu.social.service.*;
import com.yifu.cloud.plus.v1.yifu.social.service.TDispatchSocialFundInfoService;
import com.yifu.cloud.plus.v1.yifu.social.service.TForecastLibraryService;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialFreindSetService;
import com.yifu.cloud.plus.v1.yifu.social.util.DoSocialTask; import com.yifu.cloud.plus.v1.yifu.social.util.DoSocialTask;
import com.yifu.cloud.plus.v1.yifu.social.util.ExcelMergeImage; import com.yifu.cloud.plus.v1.yifu.social.util.ExcelMergeImage;
import com.yifu.cloud.plus.v1.yifu.social.util.ExcelToImage; import com.yifu.cloud.plus.v1.yifu.social.util.ExcelToImage;
...@@ -82,7 +79,6 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -82,7 +79,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.Cache; import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager; import org.springframework.cache.CacheManager;
import org.springframework.cache.support.SimpleValueWrapper; import org.springframework.cache.support.SimpleValueWrapper;
import org.springframework.security.core.parameters.P;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -154,6 +150,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -154,6 +150,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
@Autowired @Autowired
private TAttaInfoMapper attaInfoMapper; private TAttaInfoMapper attaInfoMapper;
private final TSocialfundHouseResService tSocialfundHouseResService;
private final TDispatchExportLogService tDispatchExportLogService;
/** /**
* 派单信息记录表简单分页查询 * 派单信息记录表简单分页查询
* *
...@@ -5559,7 +5558,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -5559,7 +5558,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
* @return * @return
**/ **/
@Override @Override
public void doexportSocialRecordRoster(HttpServletResponse response, SocialHandleSearchVo searchVo, String idStr, String[] exportFields) { public void doexportSocialRecordRoster(HttpServletResponse response, SocialHandleSearchVo searchVo, String idStr
, String[] exportFields, YifuUser user) {
String fileName = DispatchConstants.SOCIAL_RECORD_ROSTER_EXPORT+ DateUtil.getThisTime() + CommonConstants.XLSX; String fileName = DispatchConstants.SOCIAL_RECORD_ROSTER_EXPORT+ DateUtil.getThisTime() + CommonConstants.XLSX;
//获取要导出的列表 //获取要导出的列表
List<SocialHandleExportVo> list = new ArrayList<>(); List<SocialHandleExportVo> list = new ArrayList<>();
...@@ -5572,21 +5572,52 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -5572,21 +5572,52 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭 // 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, SocialHandleExportVo.class).build(); ExcelWriter excelWriter = EasyExcel.write(out, SocialHandleExportVo.class).build();
int index = 0; int index = 0;
String userId = user.getId();
String userName = user.getNickname();
if (count > CommonConstants.ZERO_INT){ if (count > CommonConstants.ZERO_INT){
// 加上非办理人,导出只有姓名身份证和异常
Map<String, Integer> socialHuMap = tSocialfundHouseResService.getMapByHandleUser(userId);
WriteSheet writeSheet; WriteSheet writeSheet;
ExcelUtil<SocialHandleExportVo> util; ExcelUtil<SocialHandleExportVo> util;
String errorRemark = "暂无权限";
// 导出日志list
List<TDispatchExportLog> logList;
TDispatchExportLog exportLog;
SocialHandleExportVo newErrorVo;
SocialHandleExportVo vo;
for (int i = 0; i <= count; ) { for (int i = 0; i <= count; ) {
logList = new ArrayList<>();
// 获取实际记录 // 获取实际记录
searchVo.setLimitStart(i); searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT); searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = getRecordRosterList(searchVo,idStr); list = getRecordRosterList(searchVo,idStr);
if (Common.isNotNull(list)){ if (Common.isNotNull(list)) {
util = new ExcelUtil<>(SocialHandleExportVo.class); util = new ExcelUtil<>(SocialHandleExportVo.class);
for (SocialHandleExportVo vo:list){ for (int j =0;j< list.size(); j++) {
util.convertEntity(vo,null,null,null); vo = list.get(j);
util.convertEntity(vo, null, null, null);
if (Common.isNotNull(vo.getSocialHouseholdName())) {
if (socialHuMap.get(vo.getSocialHouseholdName()) == null) {
newErrorVo = new SocialHandleExportVo();
newErrorVo.setEmpName(vo.getEmpName());
newErrorVo.setEmpMobile(vo.getEmpMobile());
newErrorVo.setErrorRemark(errorRemark);
// 将list的该vo替换成新vo
list.set(j, newErrorVo);
} else {
exportLog = new TDispatchExportLog();
exportLog.setDispatchId(vo.getDispatchId());
exportLog.setCreateTime(LocalDateTime.now());
exportLog.setUserId(userId);
exportLog.setUserName(userName);
logList.add(exportLog);
}
}
} }
} }
if (Common.isNotNull(list)){ if (Common.isNotNull(list)) {
writeSheet = EasyExcel.writerSheet(DispatchConstants.SOCIAL_RECORD_ROSTER_EXPORT+index).build(); writeSheet = EasyExcel.writerSheet(DispatchConstants.SOCIAL_RECORD_ROSTER_EXPORT+index).build();
excelWriter.write(list,writeSheet); excelWriter.write(list,writeSheet);
index++; index++;
...@@ -5596,6 +5627,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -5596,6 +5627,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
list.clear(); list.clear();
} }
updateSocialRecords(searchVo,idStr); updateSocialRecords(searchVo,idStr);
// 新增导出人记录
if (!logList.isEmpty()) {
tDispatchExportLogService.saveBatch(logList);
}
} }
excelWriter.finish(); excelWriter.finish();
}else { }else {
......
...@@ -550,4 +550,25 @@ public class TSocialfundHouseResServiceImpl extends ServiceImpl<TSocialfundHouse ...@@ -550,4 +550,25 @@ public class TSocialfundHouseResServiceImpl extends ServiceImpl<TSocialfundHouse
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),CommonConstants.SAVE_SUCCESS,CommonConstants.GREEN,excel)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(),CommonConstants.SAVE_SUCCESS,CommonConstants.GREEN,excel));
} }
} }
/**
* @Description: 获取登录人的社保办理权限
* @Author: hgw
* @Date: 2025/6/16 11:31
* @return: java.util.Map<java.lang.String, java.lang.Integer>
**/
@Override
public Map<String, Integer> getMapByHandleUser(String userId) {
Map<String, Integer> map = new HashMap<>();
if (Common.isNotNull(userId)){
List<String> socialList = baseMapper.getSocialListByUserId(userId);
if (Common.isNotNull(socialList)){
for (String social : socialList) {
map.put(social, CommonConstants.ONE_INT);
}
}
}
return map;
}
} }
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ 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)
~
-->
<!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.social.mapper.TDispatchExportLogMapper">
<resultMap id="tDispatchExportLogMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchExportLog">
<id property="id" column="ID"/>
<result property="dispatchId" column="DISPATCH_ID"/>
<result property="userId" column="USER_ID"/>
<result property="userName" column="USER_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.DISPATCH_ID,
a.USER_ID,
a.USER_NAME,
a.CREATE_TIME
</sql>
<sql id="tDispatchExportLog_where">
<if test="tDispatchExportLog != null">
<if test="tDispatchExportLog.id != null and tDispatchExportLog.id.trim() != ''">
AND a.ID = #{tDispatchExportLog.id}
</if>
<if test="tDispatchExportLog.dispatchId != null and tDispatchExportLog.dispatchId.trim() != ''">
AND a.DISPATCH_ID = #{tDispatchExportLog.dispatchId}
</if>
<if test="tDispatchExportLog.userId != null and tDispatchExportLog.userId.trim() != ''">
AND a.USER_ID = #{tDispatchExportLog.userId}
</if>
<if test="tDispatchExportLog.userName != null and tDispatchExportLog.userName.trim() != ''">
AND a.USER_NAME = #{tDispatchExportLog.userName}
</if>
<if test="tDispatchExportLog.createTime != null">
AND a.CREATE_TIME = #{tDispatchExportLog.createTime}
</if>
</if>
</sql>
<!--tDispatchExportLog简单分页查询-->
<select id="getTDispatchExportLogPage" resultMap="tDispatchExportLogMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_dispatch_export_log a
<where>
1=1
<include refid="tDispatchExportLog_where"/>
</where>
order by a.CREATE_TIME desc
</select>
</mapper>
...@@ -1192,6 +1192,7 @@ ...@@ -1192,6 +1192,7 @@
<result property="graduationTime" column="GRADUATION_TIME"/> <result property="graduationTime" column="GRADUATION_TIME"/>
<result property="leaveDate" column="LEAVE_DATE"/> <result property="leaveDate" column="LEAVE_DATE"/>
<result property="socialReduceDate" column="SOCIAL_REDUCE_DATE"/> <result property="socialReduceDate" column="SOCIAL_REDUCE_DATE"/>
<result property="dispatchId" column="DISPATCH_ID"/>
</resultMap> </resultMap>
<resultMap id="fundHandleMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.FundHandleExportVo"> <resultMap id="fundHandleMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.FundHandleExportVo">
...@@ -1284,7 +1285,9 @@ ...@@ -1284,7 +1285,9 @@
a.FIRST_PAY_TIME, a.FIRST_PAY_TIME,
a.GRADUATION_TIME, a.GRADUATION_TIME,
IF(a.LEAVE_DATE is not null,DATE_FORMAT(a.LEAVE_DATE,"%Y-%m-%d"),"") as "LEAVE_DATE", IF(a.LEAVE_DATE is not null,DATE_FORMAT(a.LEAVE_DATE,"%Y-%m-%d"),"") as "LEAVE_DATE",
IF(a.SOCIAL_REDUCE_DATE is not null,DATE_FORMAT(a.SOCIAL_REDUCE_DATE,"%Y-%m-%d"),"") as "SOCIAL_REDUCE_DATE" IF(a.SOCIAL_REDUCE_DATE is not null,DATE_FORMAT(a.SOCIAL_REDUCE_DATE,"%Y-%m-%d"),"") as "SOCIAL_REDUCE_DATE",
a.ID as "DISPATCH_ID"
FROM t_dispatch_info a FROM t_dispatch_info a
left join t_social_info s on a.SOCIAL_ID = s.id left join t_social_info s on a.SOCIAL_ID = s.id
left join t_dispatch_social_fund_info h on a.id = h.REDUCE_SOCIAL_FUND_ID left join t_dispatch_social_fund_info h on a.id = h.REDUCE_SOCIAL_FUND_ID
...@@ -1436,6 +1439,19 @@ ...@@ -1436,6 +1439,19 @@
left join t_dispatch_social_fund_info h on a.id = h.REDUCE_SOCIAL_FUND_ID left join t_dispatch_social_fund_info h on a.id = h.REDUCE_SOCIAL_FUND_ID
set a.EXPORT_SOCIAL_FLAG = 1 set a.EXPORT_SOCIAL_FLAG = 1
<include refid="where_getSocialRecordRoster"/> <include refid="where_getSocialRecordRoster"/>
<if test="tDispatchInfo == null or tDispatchInfo.createBy == null or tDispatchInfo.createBy.trim() == ''">
and 1=2
</if>
<if test="tDispatchInfo != null and tDispatchInfo.createBy != null and tDispatchInfo.createBy.trim() != ''">
AND (s.SOCIAL_HOUSEHOLD_NAME IS NOT NULL
AND s.SOCIAL_HOUSEHOLD_NAME IN (
SELECT SOCIAL_HOUSEHOLD FROM t_socialfund_house_res
WHERE user_id = #{tDispatchInfo.createBy} AND STATUS = '0'
AND AUTH_TYPE = '1' AND HOUSE_NAME_TYPE = '0'
)
)
</if>
</update> </update>
<!--tDispatchInfo 社保花名册数据查询count--> <!--tDispatchInfo 社保花名册数据查询count-->
......
...@@ -126,4 +126,8 @@ ...@@ -126,4 +126,8 @@
</if> </if>
</delete> </delete>
<select id="getSocialListByUserId" resultType="java.lang.String">
SELECT a.SOCIAL_HOUSEHOLD FROM t_socialfund_house_res a WHERE user_id = #{userId} AND STATUS = '0' AND AUTH_TYPE = '1' AND HOUSE_NAME_TYPE = '0'
</select>
</mapper> </mapper>
...@@ -20,12 +20,17 @@ package com.yifu.cloud.plus.v1.yifu.admin.api.entity; ...@@ -20,12 +20,17 @@ package com.yifu.cloud.plus.v1.yifu.admin.api.entity;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity; import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length; import org.hibernate.validator.constraints.Length;
import java.io.Serializable;
/** /**
* 外部字典值数据表 * 外部字典值数据表
...@@ -34,10 +39,10 @@ import org.hibernate.validator.constraints.Length; ...@@ -34,10 +39,10 @@ import org.hibernate.validator.constraints.Length;
* @date 2025-06-11 15:57:30 * @date 2025-06-11 15:57:30
*/ */
@Data @Data
@TableName("sys_out_rel_dict_item")
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@TableName("sys_out_rel_dict_item")
@Schema(description = "外部字典值数据表") @Schema(description = "外部字典值数据表")
public class SysOutRelDictItem extends BaseEntity { public class SysOutRelDictItem extends Model<SysOutRelDictItem> {
/** /**
* 字典值ID * 字典值ID
...@@ -48,25 +53,25 @@ public class SysOutRelDictItem extends BaseEntity { ...@@ -48,25 +53,25 @@ public class SysOutRelDictItem extends BaseEntity {
/** /**
* 外部端所属字典类型 * 外部端所属字典类型
*/ */
@Length(max = 128, message = "外部端所属字典类型不能超过128个字符") @Length(max = 100, message = "外部端所属字典类型不能超过128个字符")
@Schema(description = "外部端所属字典类型") @Schema(description = "外部端所属字典类型")
private String dictType; private String dictType;
/** /**
* 外部端字典值value * 外部端字典值value
*/ */
@Length(max = 20, message = "外部端字典值value不能超过20个字符") @Length(max = 100, message = "外部端字典值value不能超过20个字符")
@Schema(description = "外部端字典值value") @Schema(description = "外部端字典值value")
private String value; private String value;
/** /**
* 对照皖信所属字典类型 * 对照皖信所属字典类型
*/ */
@Schema(description = "对照皖信所属字典类型") @Schema(description = "对照皖信所属字典类型")
private Long sysDictType; private String sysDictType;
/** /**
* 对照皖信字典值 * 对照皖信字典值
*/ */
@Schema(description = "对照皖信字典值") @Schema(description = "对照皖信字典值")
private Long sysDictValue; private String sysDictValue;
/** /**
* 外部端标识(gz:瓜子) * 外部端标识(gz:瓜子)
*/ */
......
...@@ -16,10 +16,14 @@ ...@@ -16,10 +16,14 @@
*/ */
package com.yifu.cloud.plus.v1.yifu.admin.api.vo; package com.yifu.cloud.plus.v1.yifu.admin.api.vo;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDictItem;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysOutEmpFormInfo; import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysOutEmpFormInfo;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.util.List;
import java.util.Map;
/** /**
* 瓜子采集字段配置表(前端用配置进行展示) * 瓜子采集字段配置表(前端用配置进行展示)
* *
...@@ -35,5 +39,19 @@ public class SysOutEmpFormInfoVo extends SysOutEmpFormInfo { ...@@ -35,5 +39,19 @@ public class SysOutEmpFormInfoVo extends SysOutEmpFormInfo {
@Schema(description = "选中ID,多个逗号分割") @Schema(description = "选中ID,多个逗号分割")
private String ids; private String ids;
@Schema(description = "分类名称")
private String categorizeName;
@Schema(description = "字典项列表")
private List<SysDictItem> dictItemList;
@Schema(description = "瓜子和皖信的字典值映射")
private List<Map<String,String>> relDictMapList;
@Schema(description = "瓜子字典项字符串")
private String dictItemStrs;
@Schema(description = "映射皖信的字典项字符串")
private String wxDictItemStrs;
} }
...@@ -365,16 +365,14 @@ public class DictController { ...@@ -365,16 +365,14 @@ public class DictController {
} }
/** /**
* 获取指定端下的字典列表 * 获取指定端下的字典内容列表
* @param clientId 客户端标识 * @param clientId 客户端标识
* @author chenyx * @author chenyx
* @date 2025-06-11 15:57:30 * @date 2025-06-11 15:57:30
* @since 1.7.12 * @since 1.7.12
**/ **/
@GetMapping("/getDictListByClientId") @GetMapping("/getDictMapByClientId")
public R<Map<String,List<SysDictItem>>> getDictMapByClientId(@RequestParam String clientId) { public R<Map<String,List<SysDictItem>>> getDictMapByClientId(@RequestParam String clientId) {
return new R<>(sysDictService.getDictMapByClientId(clientId)); return new R<>(sysDictService.getDictMapByClientId(clientId));
} }
} }
...@@ -62,76 +62,71 @@ public class SysOutEmpFormInfoController { ...@@ -62,76 +62,71 @@ public class SysOutEmpFormInfoController {
} }
/** /**
* 简单分页查询 * 瓜子&HRO映射关系表-分页查询
* @param page 分页对象 * @param page 分页对象
* @param sysOutEmpFormInfo 瓜子采集字段配置表(前端用配置进行展示) * @param sysOutEmpFormInfo 瓜子采集字段配置表(前端用配置进行展示)
* @return * @return R<IPage<SysOutEmpFormInfoVo>>
*/ */
@Operation(description = "简单分页查询") @Operation(description = "瓜子&HRO映射关系表-分页查询")
@GetMapping("/page") @GetMapping("/page")
public R<IPage<SysOutEmpFormInfoVo>> getSysOutEmpFormInfoPage(Page<SysOutEmpFormInfo> page, SysOutEmpFormInfoVo sysOutEmpFormInfo) { public R<IPage<SysOutEmpFormInfoVo>> getSysOutEmpFormInfoPage(Page<SysOutEmpFormInfo> page, SysOutEmpFormInfoVo sysOutEmpFormInfo) {
return new R<>(sysOutEmpFormInfoService.getSysOutEmpFormInfoPage(page,sysOutEmpFormInfo)); return new R<>(sysOutEmpFormInfoService.getSysOutEmpFormInfoPage(page,sysOutEmpFormInfo));
} }
/** /**
* 不分页查询 * 瓜子&HRO映射关系表-导出查询
* @param sysOutEmpFormInfo 瓜子采集字段配置表(前端用配置进行展示) * @param sysOutEmpFormInfo 瓜子采集字段配置表(前端用配置进行展示)
* @return * @return R<List<SysOutEmpFormInfoVo>>
*/ */
@Operation(summary = "不分页查询", description = "不分页查询") @Operation(summary = "瓜子&HRO映射关系表-导出查询")
@PostMapping("/noPage" ) @GetMapping("/list" )
public R<List<SysOutEmpFormInfoVo>> getSysOutEmpFormInfoNoPage(@RequestBody SysOutEmpFormInfoVo sysOutEmpFormInfo) { public R<List<SysOutEmpFormInfoVo>> getSysOutEmpFormInfoNoPage(SysOutEmpFormInfoVo sysOutEmpFormInfo) {
return R.ok(sysOutEmpFormInfoService.noPageDiy(sysOutEmpFormInfo)); return new R<>(sysOutEmpFormInfoService.noPageDiy(sysOutEmpFormInfo));
} }
/**
* 瓜子&HRO映射关系表-下拉列表
* @return R<List<SysOutEmpFormInfo>>
*/
@Operation(summary = "瓜子&HRO映射关系表-下拉列表")
@GetMapping("/select" )
public R<List<SysOutEmpFormInfo>> getSysOutEmpFormSelect() {
return new R<>(sysOutEmpFormInfoService.getSysOutEmpFormSelect());
}
/** /**
* 通过id查询瓜子采集字段配置表(前端用配置进行展示) * 通过id查询瓜子采集字段配置
* @param id id * @param id id
* @return R * @return R
*/ */
@Operation(summary = "通过id查询", description = "通过id查询:hasPermission('admin_sysoutempforminfo_get')") @Operation(summary = "通过id查询瓜子采集字段配置")
@GetMapping("/{id}" ) @GetMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('admin_sysoutempforminfo_get')" ) public R<SysOutEmpFormInfoVo> getDataById(@PathVariable("id" ) String id) {
public R<SysOutEmpFormInfo> getById(@PathVariable("id" ) String id) { return R.ok(sysOutEmpFormInfoService.getDataById(id));
return R.ok(sysOutEmpFormInfoService.getById(id));
} }
/** /**
* 新增瓜子采集字段配置表(前端用配置进行展示) * 通过id查询瓜子和皖信映射关系配置详情
* @param sysOutEmpFormInfo 瓜子采集字段配置表(前端用配置进行展示) * @param id id
* @return R * @return R
*/ */
@Operation(summary = "新增瓜子采集字段配置表(前端用配置进行展示)", description = "新增瓜子采集字段配置表(前端用配置进行展示):hasPermission('admin_sysoutempforminfo_add')") @Operation(summary = "通过id查询瓜子和皖信映射关系配置详情")
@SysLog("新增瓜子采集字段配置表(前端用配置进行展示)" ) @GetMapping("relWx/{id}" )
@PostMapping public R<SysOutEmpFormInfoVo> getRelWxDataById(@PathVariable("id" ) String id) {
@PreAuthorize("@pms.hasPermission('admin_sysoutempforminfo_add')" ) return R.ok(sysOutEmpFormInfoService.getRelWxDataById(id));
public R<Boolean> save(@RequestBody SysOutEmpFormInfo sysOutEmpFormInfo) { }
return R.ok(sysOutEmpFormInfoService.save(sysOutEmpFormInfo));
}
/** /**
* 修改瓜子采集字段配置表(前端用配置进行展示) * 修改瓜子采集字段配置
* @param sysOutEmpFormInfo 瓜子采集字段配置表(前端用配置进行展示) * @param sysOutEmpFormInfo 瓜子采集字段配置信息
* @return R * @return R
*/ */
@Operation(summary = "修改瓜子采集字段配置表(前端用配置进行展示)", description = "修改瓜子采集字段配置表(前端用配置进行展示):hasPermission('admin_sysoutempforminfo_edit')") @Operation(summary = "修改瓜子采集字段配置")
@SysLog("修改瓜子采集字段配置表(前端用配置进行展示)" ) @SysLog("修改瓜子采集字段配置" )
@PutMapping @PutMapping
@PreAuthorize("@pms.hasPermission('admin_sysoutempforminfo_edit')" ) // @PreAuthorize("@pms.hasPermission('admin_sysoutempforminfo_edit')" )
public R<Boolean> updateById(@RequestBody SysOutEmpFormInfo sysOutEmpFormInfo) { public R<String> updateById(@RequestBody SysOutEmpFormInfo sysOutEmpFormInfo) {
return R.ok(sysOutEmpFormInfoService.updateById(sysOutEmpFormInfo)); return sysOutEmpFormInfoService.updateOutEmpFormInfo(sysOutEmpFormInfo);
} }
/**
* 通过id删除瓜子采集字段配置表(前端用配置进行展示)
* @param id id
* @return R
*/
@Operation(summary = "通过id删除瓜子采集字段配置表(前端用配置进行展示)", description = "通过id删除瓜子采集字段配置表(前端用配置进行展示):hasPermission('admin_sysoutempforminfo_del')")
@SysLog("通过id删除瓜子采集字段配置表(前端用配置进行展示)" )
@DeleteMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('admin_sysoutempforminfo_del')" )
public R<Boolean> removeById(@PathVariable String id) {
return R.ok(sysOutEmpFormInfoService.removeById(id));
}
} }
...@@ -25,6 +25,8 @@ import com.yifu.cloud.plus.v1.yifu.admin.api.vo.SysOutEmpFormInfoVo; ...@@ -25,6 +25,8 @@ import com.yifu.cloud.plus.v1.yifu.admin.api.vo.SysOutEmpFormInfoVo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* 瓜子采集字段配置表(前端用配置进行展示) * 瓜子采集字段配置表(前端用配置进行展示)
* *
...@@ -38,5 +40,10 @@ public interface SysOutEmpFormInfoMapper extends BaseMapper<SysOutEmpFormInfo> { ...@@ -38,5 +40,10 @@ public interface SysOutEmpFormInfoMapper extends BaseMapper<SysOutEmpFormInfo> {
* @param sysOutEmpFormInfo 瓜子采集字段配置表(前端用配置进行展示) * @param sysOutEmpFormInfo 瓜子采集字段配置表(前端用配置进行展示)
* @return * @return
*/ */
IPage<SysOutEmpFormInfoVo> getSysOutEmpFormInfoPage(Page<SysOutEmpFormInfo> page, @Param("sysOutEmpFormInfo") SysOutEmpFormInfoVo sysOutEmpFormInfo); IPage<SysOutEmpFormInfoVo> getSysOutEmpFormInfoPage(Page<SysOutEmpFormInfo> page,
@Param("sysOutEmpFormInfo") SysOutEmpFormInfoVo sysOutEmpFormInfo);
List<SysOutEmpFormInfoVo> getSysOutEmpFormInfoList(@Param("sysOutEmpFormInfo") SysOutEmpFormInfoVo sysOutEmpFormInfo);
} }
...@@ -23,6 +23,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -23,6 +23,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysOutEmpFormInfo; import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysOutEmpFormInfo;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.SysOutEmpCategorizeFormInfoVo; import com.yifu.cloud.plus.v1.yifu.admin.api.vo.SysOutEmpCategorizeFormInfoVo;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.SysOutEmpFormInfoVo; import com.yifu.cloud.plus.v1.yifu.admin.api.vo.SysOutEmpFormInfoVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import java.util.List; import java.util.List;
/** /**
...@@ -40,11 +42,41 @@ public interface SysOutEmpFormInfoService extends IService<SysOutEmpFormInfo> { ...@@ -40,11 +42,41 @@ public interface SysOutEmpFormInfoService extends IService<SysOutEmpFormInfo> {
List<SysOutEmpCategorizeFormInfoVo> getConfigList(String isLookToc); List<SysOutEmpCategorizeFormInfoVo> getConfigList(String isLookToc);
/** /**
* 瓜子采集字段配置表(前端用配置进行展示)简单分页查询 * 瓜子&HRO映射关系表-分页查询
* @param sysOutEmpFormInfo 瓜子采集字段配置表(前端用配置进行展示) * @param sysOutEmpFormInfo 查询信息
* @return * @return IPage<SysOutEmpFormInfoVo>
*/ */
IPage<SysOutEmpFormInfoVo> getSysOutEmpFormInfoPage(Page<SysOutEmpFormInfo> page, SysOutEmpFormInfoVo sysOutEmpFormInfo); IPage<SysOutEmpFormInfoVo> getSysOutEmpFormInfoPage(Page<SysOutEmpFormInfo> page, SysOutEmpFormInfoVo sysOutEmpFormInfo);
List<SysOutEmpFormInfoVo> noPageDiy(SysOutEmpFormInfoVo sysOutEmpFormInfo); List<SysOutEmpFormInfoVo> noPageDiy(SysOutEmpFormInfoVo sysOutEmpFormInfo);
/**
* 瓜子&HRO映射关系表-下拉列表
* @return List<SysOutEmpFormInfo>
*/
List<SysOutEmpFormInfo> getSysOutEmpFormSelect();
/**
* 通过id查询瓜子采集字段配置
* @param id 主键
* @return SysOutEmpFormInfoVo
*/
SysOutEmpFormInfoVo getDataById(String id);
/**
* 通过id查询瓜子和皖信映射关系配置详情
* @param id 主键
* @return SysOutEmpFormInfoVo
*/
SysOutEmpFormInfoVo getRelWxDataById(String id);
/**
* 修改瓜子采集字段配置
* @param sysOutEmpFormInfo 字典
* @return R<String>
*/
R<String> updateOutEmpFormInfo(SysOutEmpFormInfo sysOutEmpFormInfo);
} }
...@@ -176,7 +176,6 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> impl ...@@ -176,7 +176,6 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> impl
// 获取指定分类下的配置字段 // 获取指定分类下的配置字段
List<SysDictItem> dictListByCategorize = dictMap.get(dictInfo.getType()); List<SysDictItem> dictListByCategorize = dictMap.get(dictInfo.getType());
if(Common.isEmpty(dictListByCategorize)) { if(Common.isEmpty(dictListByCategorize)) {
// 关联的模块列表
dictListByCategorize = new ArrayList<>(); dictListByCategorize = new ArrayList<>();
} }
dictListByCategorize.add(dictInfo); dictListByCategorize.add(dictInfo);
......
...@@ -40,18 +40,8 @@ public class SysOutRelDictItemServiceImpl extends ServiceImpl<SysOutRelDictItemM ...@@ -40,18 +40,8 @@ public class SysOutRelDictItemServiceImpl extends ServiceImpl<SysOutRelDictItemM
@Override @Override
public List<SysOutRelDictItem> noPageDiy(SysOutRelDictItem searchVo) { public List<SysOutRelDictItem> noPageDiy(SysOutRelDictItem searchVo) {
LambdaQueryWrapper<SysOutRelDictItem> wrapper = buildQueryWrapper(searchVo);
wrapper.orderByDesc(BaseEntity::getCreateTime); return null;
return baseMapper.selectList(wrapper);
}
private LambdaQueryWrapper buildQueryWrapper(SysOutRelDictItem entity){
LambdaQueryWrapper<SysOutRelDictItem> wrapper = Wrappers.lambdaQuery();
if (Common.isNotNull(entity.getCreateName())){
wrapper.eq(SysOutRelDictItem::getCreateName,entity.getCreateName());
}
return wrapper;
} }
} }
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
AND a.field_name = #{sysOutEmpFormInfo.fieldName} AND a.field_name = #{sysOutEmpFormInfo.fieldName}
</if> </if>
<if test="sysOutEmpFormInfo.fieldZhName != null and sysOutEmpFormInfo.fieldZhName.trim() != ''"> <if test="sysOutEmpFormInfo.fieldZhName != null and sysOutEmpFormInfo.fieldZhName.trim() != ''">
AND a.field_zh_name = #{sysOutEmpFormInfo.fieldZhName} AND a.field_zh_name LIKE CONCAT('%',#{sysOutEmpFormInfo.fieldZhName},'%')
</if> </if>
<if test="sysOutEmpFormInfo.sort != null"> <if test="sysOutEmpFormInfo.sort != null">
AND a.sort = #{sysOutEmpFormInfo.sort} AND a.sort = #{sysOutEmpFormInfo.sort}
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
AND a.wanxin_field_name = #{sysOutEmpFormInfo.wanxinFieldName} AND a.wanxin_field_name = #{sysOutEmpFormInfo.wanxinFieldName}
</if> </if>
<if test="sysOutEmpFormInfo.wanxinFieldZhName != null and sysOutEmpFormInfo.wanxinFieldZhName.trim() != ''"> <if test="sysOutEmpFormInfo.wanxinFieldZhName != null and sysOutEmpFormInfo.wanxinFieldZhName.trim() != ''">
AND a.wanxin_field_zh_name = #{sysOutEmpFormInfo.wanxinFieldZhName} AND a.wanxin_field_zh_name LIKE CONCAT('%',#{sysOutEmpFormInfo.wanxinFieldZhName},'%')
</if> </if>
<if test="sysOutEmpFormInfo.wanxinFieldType != null and sysOutEmpFormInfo.wanxinFieldType.trim() != ''"> <if test="sysOutEmpFormInfo.wanxinFieldType != null and sysOutEmpFormInfo.wanxinFieldType.trim() != ''">
AND a.wanxin_field_type = #{sysOutEmpFormInfo.wanxinFieldType} AND a.wanxin_field_type = #{sysOutEmpFormInfo.wanxinFieldType}
...@@ -167,8 +167,20 @@ ...@@ -167,8 +167,20 @@
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
FROM sys_out_emp_form_info a FROM sys_out_emp_form_info a
<where> <where>
1=1 a.del_flag = '0'
<include refid="sysOutEmpFormInfo_where"/> <include refid="sysOutEmpFormInfo_where"/>
</where> </where>
order by a.sort, CAST(a.id AS UNSIGNED)
</select>
<select id="getSysOutEmpFormInfoList" resultType="com.yifu.cloud.plus.v1.yifu.admin.api.vo.SysOutEmpFormInfoVo">
SELECT
<include refid="Base_Column_List"/>
FROM sys_out_emp_form_info a
<where>
a.del_flag = '0'
<include refid="sysOutEmpFormInfo_where"/>
</where>
order by a.sort, CAST(a.id AS UNSIGNED)
</select> </select>
</mapper> </mapper>
...@@ -61,14 +61,4 @@ ...@@ -61,14 +61,4 @@
</if> </if>
</if> </if>
</sql> </sql>
<!--sysOutRelDictItem简单分页查询-->
<select id="getSysOutRelDictItemPage" resultMap="sysOutRelDictItemMap">
SELECT
<include refid="Base_Column_List"/>
FROM sys_out_rel_dict_item a
<where>
1=1
<include refid="sysOutRelDictItem_where"/>
</where>
</select>
</mapper> </mapper>
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