Commit b6c29dfc authored by fangxinjiang's avatar fangxinjiang

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

parents 2e6e4526 93638134
......@@ -59,11 +59,11 @@ public class TAttaInfo extends BaseEntity {
/**
* 关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招投标7业务评估8二维码9身份证 10 户口本
* ;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件);0(最高教育经历);2(执业资格证书);24 身份证国徽
* 25 户口本本人页26学信27预入职其他附件
* 25 户口本本人页26学信27预入职其他附件28户配置
*/
@NotBlank(message = "关系类型不能为空")
@Length(max = 2, message = "关系类型不能超过2个字符")
@Schema(description = "关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招投标7业务评估8二维码9身份证 10 户口本;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件);0(最高教育经历);2(执业资格证书);24 身份证国徽 25 户口本本人页26学信)")
@Schema(description = "关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招投标7业务评估8二维码9身份证 10 户口本;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件);0(最高教育经历);2(执业资格证书);24 身份证国徽 25 户口本本人页26学信28户配置)")
private String relationType;
/**
* 实体id和关系类型共同确定附件所属(9、10、21、22、23、24、25存项目档案id,0、2、26存附属表id)
......
package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
......
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCompleteMonitor;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -42,4 +43,10 @@ public class TCompleteMonitorSearchVo extends TCompleteMonitor {
@Schema(description = "查询limit 数据条数")
private int limitEnd;
@Schema(description = "在项人数区间开始")
private Integer inusePersonNumStart;
@Schema(description = "在项人数区间结束")
private Integer inusePersonNumEnd;
}
......@@ -16,6 +16,7 @@
*/
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TRiskMonitor;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -49,4 +50,12 @@ public class TRiskMonitorSearchVo extends TRiskMonitor {
@Schema(description = "查询limit 数据条数")
private int limitEnd;
@Schema(description = "在项人数区间开始")
@TableField(exist = false)
private Integer projectNumStart;
@Schema(description = "在项人数区间结束")
@TableField(exist = false)
private Integer projectNumEnd;
}
......@@ -57,15 +57,15 @@ public class TCompleteMonitorController {
/**
* 简单分页查询
* @param page 分页对象
* @param tCompleteMonitor 档案完整度监控
* @param searchVo 档案完整度监控
* @return
*/
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TCompleteMonitor>> getTCompleteMonitorPage(Page<TCompleteMonitor> page, TCompleteMonitor tCompleteMonitor) {
public R<IPage<TCompleteMonitor>> getTCompleteMonitorPage(Page<TCompleteMonitor> page, TCompleteMonitorSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, tCompleteMonitor);
return new R<>(tCompleteMonitorService.getTCompleteMonitorPage(page,tCompleteMonitor));
menuUtil.setAuthSql(user, searchVo);
return new R<>(tCompleteMonitorService.getTCompleteMonitorPage(page,searchVo));
}
/**
......
......@@ -40,7 +40,7 @@ public interface TCompleteMonitorMapper extends BaseMapper<TCompleteMonitor> {
* @param tCompleteMonitor 档案完整度监控
* @return
*/
IPage<TCompleteMonitor> getTCompleteMonitorPage(Page<TCompleteMonitor> page, @Param("tCompleteMonitor") TCompleteMonitor tCompleteMonitor);
IPage<TCompleteMonitor> getTCompleteMonitorPage(Page<TCompleteMonitor> page, @Param("tCompleteMonitor") TCompleteMonitorSearchVo tCompleteMonitor);
/**
......
......@@ -24,7 +24,7 @@ public interface TCompleteMonitorService extends IService<TCompleteMonitor> {
* @param tCompleteMonitor 档案完整度监控
* @return
*/
IPage<TCompleteMonitor> getTCompleteMonitorPage(Page<TCompleteMonitor> page, TCompleteMonitor tCompleteMonitor);
IPage<TCompleteMonitor> getTCompleteMonitorPage(Page<TCompleteMonitor> page, TCompleteMonitorSearchVo tCompleteMonitor);
/**
* @Description: 详情
......
......@@ -88,7 +88,7 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
* @return
*/
@Override
public IPage<TCompleteMonitor> getTCompleteMonitorPage(Page<TCompleteMonitor> page, TCompleteMonitor tCompleteMonitor){
public IPage<TCompleteMonitor> getTCompleteMonitorPage(Page<TCompleteMonitor> page, TCompleteMonitorSearchVo tCompleteMonitor){
return baseMapper.getTCompleteMonitorPage(page,tCompleteMonitor);
}
......@@ -465,8 +465,8 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
ExcelWriterSheetBuilder writeSheet;
List<TMainExportAllVO> listWork;
Map<String, TMainExportAllVO> mapWork;
List<TMainExportAllVO> listContract;
Map<String, TMainExportAllVO> mapContract;
// List<TMainExportAllVO> listContract;
// Map<String, TMainExportAllVO> mapContract;
List<TMainExportAllVO> listEducation;
Map<String, TMainExportAllVO> mapEducation;
List<TMainExportAllVO> listBad;
......@@ -492,25 +492,25 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
for (TMainExportAllVO vo : list) {
empIdList.add(vo.getMainId());
}
listContract = baseMapper.getTEmpMainAllListByContract(empIdList);
// listContract = baseMapper.getTEmpMainAllListByContract(empIdList);
listEducation = baseMapper.getTEmpMainAllListByEducation(empIdList);
listBad = baseMapper.getTEmpMainAllListByBad(empIdList);
listDisability = baseMapper.getTEmpMainAllListByDisability(empIdList);
listWork = baseMapper.getTEmpMainAllListByWork(empIdList);
listFamily = baseMapper.getTEmpMainAllListByFamily(empIdList);
listProfessional = baseMapper.getTEmpMainAllListByProfessional(empIdList);
mapContract = new HashMap<>();
// mapContract = new HashMap<>();
mapEducation = new HashMap<>();
mapBad = new HashMap<>();
mapDisability = new HashMap<>();
mapWork = new HashMap<>();
mapFamily = new HashMap<>();
mapProfessional = new HashMap<>();
if (listContract != null && !listContract.isEmpty()) {
for (TMainExportAllVO vo : listContract) {
mapContract.putIfAbsent(vo.getMainId(), vo);
}
}
// if (listContract != null && !listContract.isEmpty()) {
// for (TMainExportAllVO vo : listContract) {
// mapContract.putIfAbsent(vo.getMainId(), vo);
// }
// }
if (listEducation != null && !listEducation.isEmpty()) {
for (TMainExportAllVO vo : listEducation) {
mapEducation.putIfAbsent(vo.getMainId(), vo);
......@@ -518,7 +518,7 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
}
if (listBad != null && !listBad.isEmpty()) {
for (TMainExportAllVO vo : listBad) {
mapEducation.putIfAbsent(vo.getMainId(), vo);
mapBad.putIfAbsent(vo.getMainId(), vo);
}
}
if (listDisability != null && !listDisability.isEmpty()) {
......@@ -542,14 +542,14 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
}
}
for (TMainExportAllVO vo : list) {
temp = mapContract.get(vo.getMainId());
if (temp != null) {
vo.setField26(temp.getField26());
vo.setField27(temp.getField27());
vo.setField28(temp.getField28());
vo.setField29(temp.getField29());
vo.setField30(temp.getField30());
}
// temp = mapContract.get(vo.getMainId());
// if (temp != null) {
// vo.setField26(temp.getField26());
// vo.setField27(temp.getField27());
// vo.setField28(temp.getField28());
// vo.setField29(temp.getField29());
// vo.setField30(temp.getField30());
// }
temp = mapEducation.get(vo.getMainId());
if (temp != null) {
vo.setField36(temp.getField36());
......
......@@ -85,6 +85,12 @@
<if test="tCompleteMonitor.afterIsComplete != null and tCompleteMonitor.afterIsComplete.trim() != ''">
AND a.AFTER_IS_COMPLETE = #{tCompleteMonitor.afterIsComplete}
</if>
<if test="tCompleteMonitor.inusePersonNumStart != null">
AND a.INUSE_PERSON_NUM <![CDATA[ >= ]]> #{tCompleteMonitor.inusePersonNumStart}
</if>
<if test="tCompleteMonitor.inusePersonNumEnd != null">
AND a.INUSE_PERSON_NUM <![CDATA[ <= ]]> #{tCompleteMonitor.inusePersonNumEnd}
</if>
<if test="tCompleteMonitor.authSql != null and tCompleteMonitor.authSql.trim() != ''">
${tCompleteMonitor.authSql}
</if>
......@@ -348,6 +354,7 @@
,e.FILE_PROVINCE field20,e.FILE_CITY field71,e.FILE_TOWN field72,if(e.status=0,'草稿','已审核') field21
,e.CONTACT_ADDRESS field22,p.UNIT_NAME field23,p.DEPT_NAME field24,p.DEPT_NO field64
,concat(p.BUSINESS_PRIMARY_TYPE,'-',ifnull(p.BUSINESS_SECOND_TYPE,''),'-',ifnull(p.BUSINESS_THIRD_TYPE,'')) field25
,p.CONTRACT_TYPE field26,p.WORKING_HOURS field27,p.POST field28,p.ENJOIN_DATE field29,p.TRY_PERIOD field30
,p.EMP_LABEL field31
,ec.EMP_NAME field32,ec.RELATION_TYPE field33,ec.ADDRESS field34,ec.TEL field35
,if(e.IS_COLLEGE=0,'否','是') field39
......
......@@ -157,6 +157,12 @@
<if test="tRiskMonitor.riskType != null and tRiskMonitor.riskType.trim() != ''">
AND a.RISK_TYPE regexp #{tRiskMonitor.riskType}
</if>
<if test="tRiskMonitor.projectNumStart != null">
AND a.PROJECT_NUM <![CDATA[ >= ]]> #{tRiskMonitor.projectNumStart}
</if>
<if test="tRiskMonitor.projectNumEnd != null">
AND a.PROJECT_NUM <![CDATA[ <= ]]> #{tRiskMonitor.projectNumEnd}
</if>
<if test="tRiskMonitor.authSql != null and tRiskMonitor.authSql.trim() != ''">
${tRiskMonitor.authSql}
</if>
......
......@@ -68,6 +68,21 @@ public class UpmsDaprUtils {
return allUserVoR;
}
/**
* @Author fxj
* @Description 获取所有用户数据
* @Date 17:57 2022/8/16
* @Param
* @return
**/
public R<AllUserNaVo> getAllUserIds() {
R<AllUserNaVo> allUserVoR = HttpDaprUtil.invokeMethodPost(daprUpmsProperties.getAppUrl(),daprUpmsProperties.getAppId(),"/user/inner/getAllUserIdDTO","", AllUserNaVo.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(allUserVoR)){
return R.failed("获取所有用户数据失败!");
}
return allUserVoR;
}
/**
* @Author fxj
* @Description 获取指定用户名对应用户IDs
......
/*
* 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.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
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;
/**
* 系统限制配置表
*
* @author hgw
* @date 2024-09-24 17:39:57
*/
@Data
@TableName("sys_config_limit")
@Schema(description = "系统限制配置表")
public class SysConfigLimit {
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("id")
@Schema(description = "id")
private String id;
/**
* 限制键
*/
@ExcelAttribute(name = "限制键", isNotEmpty = true, errorInfo = "限制键不能为空", maxLength = 32)
@NotBlank(message = "限制键不能为空")
@Length(max = 32, message = "限制键不能超过32个字符")
@ExcelProperty("限制键")
@Schema(description = "限制键")
private String configKey;
/**
* 限制值
*/
@ExcelAttribute(name = "限制值", isNotEmpty = true, errorInfo = "限制值不能为空")
@NotBlank(message = "限制值不能为空")
@ExcelProperty("限制值")
@Schema(description = "限制值")
private Integer configValue;
/**
* 备注
*/
@ExcelAttribute(name = "备注", maxLength = 255)
@Length(max = 255, message = "备注不能超过255个字符")
@ExcelProperty("备注")
@Schema(description = "备注")
private String remark;
}
......@@ -203,6 +203,60 @@ public class SysHouseHoldInfo extends BaseEntity {
@ExcelProperty("公积金承办银行")
private String fundBank;
/**
* 手机号
*/
@ExcelAttribute(name = "手机号", maxLength = 50)
@Schema(description ="手机号")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("手机号")
private String phone;
/**
* 社保-登录账户
*/
@ExcelAttribute(name = "社保-登录账户" )
@Schema(description ="社保-登录账户")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保-登录账户")
private String socialAccount;
/**
* 社保-登录密码
*/
@ExcelAttribute(name = "社保-登录密码" )
@Schema(description ="社保-登录密码")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保-登录密码")
private String socialPassword;
/**
* 医保-登录账户
*/
@ExcelAttribute(name = "医保-登录账户" )
@Schema(description ="医保-登录账户")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保-登录账户")
private String mediclAccount;
/**
* 医保-登录密码
*/
@ExcelAttribute(name = "医保-登录密码" )
@Schema(description ="医保-登录密码")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保-登录密码")
private String mediclPassword;
/**
* 是否配置公章
*/
@ExcelAttribute(name = "是否配置公章" )
@Schema(description ="是否配置公章")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("是否配置公章")
private String isSign;
/**
* 自动化配置状态 0 启用 1 禁用
*/
......@@ -221,4 +275,16 @@ public class SysHouseHoldInfo extends BaseEntity {
@TableField(exist = false)
private String handleUserDeptName;
/**
* 附件Id
*/
@TableField(exist = false)
private String attaId;
/**
* 印章附件
*/
@TableField(exist = false)
private TAttaInfo atta;
}
package com.yifu.cloud.plus.v1.yifu.social.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
/**
* @Author fxj
* @Description 附件信息表
* @Date 11:07 2022/6/22
**/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_atta_info")
@Tag(name = "附件信息表")
public class TAttaInfo extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键")
private String id;
/**
* 资源名称
*/
@NotBlank(message = "资源名称不能为空")
@Length(max = 50, message = "资源名称不能超过50个字符")
@Schema(description = "资源名称")
private String attaName;
/**
* 资源地址
*/
@NotBlank(message = "资源地址不能为空")
@Length(max = 100, message = "资源地址不能超过100个字符")
@Schema(description = "资源地址")
private String attaSrc;
/**
* 资源大小
*/
@Schema(description = "资源大小")
private Long attaSize;
/**
* 资源类型
*/
@Length(max = 10, message = "资源类型不能超过10个字符")
@Schema(description = "资源类型")
private String attaType;
/**
* 关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招投标7业务评估8二维码9身份证 10 户口本
* ;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件);0(最高教育经历);2(执业资格证书);24 身份证国徽
* 25 户口本本人页26学信27预入职其他附件28户配置
*/
@NotBlank(message = "关系类型不能为空")
@Length(max = 2, message = "关系类型不能超过2个字符")
@Schema(description = "关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招投标7业务评估8二维码9身份证 10 户口本;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件);0(最高教育经历);2(执业资格证书);24 身份证国徽 25 户口本本人页26学信28户配置)")
private String relationType;
/**
* 实体id和关系类型共同确定附件所属(9、10、21、22、23、24、25存项目档案id,0、2、26存附属表id)
*/
@NotBlank(message = "实体id和关系类型共同确定附件所属不能为空")
@Length(max = 32, message = "实体id和关系类型共同确定附件所属不能超过32个字符")
@Schema(description = "实体id和关系类型共同确定附件所属")
private String domainId;
/**
* 地址URL
*/
@Length(max = 100, message = "地址URL不能超过100个字符")
@Schema(description = "地址URL")
@TableField(exist = false)
private String attaUrl;
/**
* 附件变更类型:0 新增 1 更新 2 删除 3 不变 档案编辑附件时需要告知后端是增加还是减少
*/
@TableField(exist = false)
private String handleType;
/**
* 其他分租名称
*/
@TableField(exist = false)
private String groupName;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import java.io.Serializable;
/**
* 社保户批量新增
*
* @author huych
* @date 2024-12-5 11:38:05
*/
@Data
public class TSocialHouseholdInsertVo extends RowIndex implements Serializable {
/**
* 账户性质
*/
@ExcelAttribute(name = "账户性质")
@Schema(description = "账户性质")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "账户性质")
private String type;
/**
* 员工姓名
*/
@Length(max = 50, message = "户名不能超过50个字符")
@ExcelAttribute(name = "户名", maxLength = 50,isNotEmpty = true)
@Schema(description = "户名")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "户名")
private String name;
/**
* 缴纳地所在省
*/
@Length(max = 50, message = "缴纳地所在省不能超过32个字符")
@ExcelAttribute(name = "缴纳地所在省", maxLength = 50,isNotEmpty = true, isDataId = true, isArea = true, parentField = "")
@Schema(description = "缴纳地所在省")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "缴纳地所在省")
private Integer province;
/**
* 缴纳地所在市
*/
@Length(max = 50, message = "缴纳地所在市不能超过50个字符")
@ExcelAttribute(name = "缴纳地所在市", maxLength = 50,isNotEmpty = true, isDataId = true, isArea = true, parentField = "province")
@Schema(description = "缴纳地所在市")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "缴纳地所在市")
private Integer city;
/**
* 缴纳地所在县
*/
@Length(max = 50, message = "缴纳地所在县不能超过50个字符")
@ExcelAttribute(name = "缴纳地所在县", maxLength = 50, isDataId = true, isArea = true, parentField = "city")
@Schema(description = "缴纳地所在县")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "缴纳地所在县")
private Integer town;
/**
* 所属机构
*/
@ExcelAttribute(name = "所属机构", maxLength = 50,isNotEmpty = true)
@Schema(description ="所属机构")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("所属机构")
private String organName;
/**
* 审核人
*/
@ExcelAttribute(name = "审核人", maxLength = 50,isNotEmpty = true )
@Schema(description ="审核人")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("审核人")
private String auditUserName;
/**
* 办理人
*/
@ExcelAttribute(name = "办理人", maxLength = 50,isNotEmpty = true )
@Schema(description ="办理人")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("办理人")
private String handleUserName;
/**
* 手机号
*/
@ExcelAttribute(name = "手机号", maxLength = 50,isNotEmpty = true )
@Schema(description ="手机号")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("手机号")
private String phone;
/**
* 类型 0 独立户 1 自由户
*/
@ExcelAttribute(name = "户类型", maxLength = 3,isNotEmpty = true)
@Schema(description ="户类型")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("户类型")
private String houseType;
/**
* 单位编号
*/
@ExcelAttribute(name = "单位编号" )
@Schema(description ="单位编号")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位编号")
private String customerNo;
/**
* 单位统一信用代码
*/
@ExcelAttribute(name = "单位统一信用代码" )
@Schema(description ="单位统一信用代码")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位统一信用代码")
private String unitCreditCode;
/**
* 自动化配置状态 0 是 1 否
*/
@ExcelAttribute(name = "是否自动办理" )
@Schema(description ="是否自动办理")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("是否自动办理")
private String autoStatus;
/**
* 社保-登录账户
*/
@ExcelAttribute(name = "社保-登录账户" )
@Schema(description ="社保-登录账户")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保-登录账户")
private String socialAccount;
/**
* 社保-登录密码
*/
@ExcelAttribute(name = "社保-登录密码" )
@Schema(description ="社保-登录密码")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保-登录密码")
private String socialPassword;
/**
* 医保-登录账户
*/
@ExcelAttribute(name = "医保-登录账户" )
@Schema(description ="医保-登录账户")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保-登录账户")
private String mediclAccount;
/**
* 医保-登录密码
*/
@ExcelAttribute(name = "医保-登录密码" )
@Schema(description ="医保-登录密码")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保-登录密码")
private String mediclPassword;
/**
* 是否配置公章
*/
@ExcelAttribute(name = "是否配置公章" )
@Schema(description ="是否配置公章")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("是否配置公章")
private String isSign;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import java.io.Serializable;
/**
* 社保户批量新增
*
* @author huych
* @date 2024-12-5 11:38:05
*/
@Data
public class TSocialHouseholdUpdateVo extends RowIndex implements Serializable {
/**
* 员工姓名
*/
@Length(max = 50, message = "户名不能超过50个字符")
@ExcelAttribute(name = "户名", maxLength = 50,isNotEmpty = true)
@Schema(description = "户名")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "户名")
private String name;
/**
* 缴纳地所在省
*/
@Length(max = 32, message = "不能超过32个字符")
@ExcelAttribute(name = "缴纳地所在省", maxLength = 32, isDataId = true, isArea = true, parentField = "")
@Schema(description = "缴纳地所在省")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "缴纳地所在省")
private Integer province;
/**
* 缴纳地所在市
*/
@Length(max = 32, message = "不能超过32个字符")
@ExcelAttribute(name = "缴纳地所在市", maxLength = 32, isDataId = true, isArea = true, parentField = "province")
@Schema(description = "缴纳地所在市")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "缴纳地所在市")
private Integer city;
/**
* 缴纳地所在县
*/
@Length(max = 32, message = "不能超过32个字符")
@ExcelAttribute(name = "缴纳地所在县", maxLength = 32, isDataId = true, isArea = true, parentField = "city")
@Schema(description = "缴纳地所在县")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "缴纳地所在县")
private Integer town;
/**
* 所属机构
*/
@ExcelAttribute(name = "所属机构", maxLength = 50)
@Schema(description ="所属机构")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("所属机构")
private String organName;
/**
* 审核人
*/
@ExcelAttribute(name = "审核人", maxLength = 50)
@Schema(description ="审核人")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("审核人")
private String auditUserName;
/**
* 办理人
*/
@ExcelAttribute(name = "办理人", maxLength = 50)
@Schema(description ="办理人")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("办理人")
private String handleUserName;
/**
* 手机号
*/
@ExcelAttribute(name = "手机号", maxLength = 50)
@Schema(description ="手机号")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("手机号")
private String phone;
/**
* 类型 0 独立户 1 自由户
*/
@ExcelAttribute(name = "户类型", maxLength = 3)
@Schema(description ="户类型")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("户类型")
private String houseType;
/**
* 单位编号
*/
@ExcelAttribute(name = "单位编号" )
@Schema(description ="单位编号")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位编号")
private String customerNo;
/**
* 单位统一信用代码
*/
@ExcelAttribute(name = "单位统一信用代码" )
@Schema(description ="单位统一信用代码")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位统一信用代码")
private String unitCreditCode;
/**
* 社保-登录账户
*/
@ExcelAttribute(name = "社保-登录账户" )
@Schema(description ="社保-登录账户")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保-登录账户")
private String socialAccount;
/**
* 社保-登录密码
*/
@ExcelAttribute(name = "社保-登录密码" )
@Schema(description ="社保-登录密码")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保-登录密码")
private String socialPassword;
/**
* 医保-登录账户
*/
@ExcelAttribute(name = "医保-登录账户" )
@Schema(description ="医保-登录账户")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保-登录账户")
private String mediclAccount;
/**
* 医保-登录密码
*/
@ExcelAttribute(name = "医保-登录密码" )
@Schema(description ="医保-登录密码")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保-登录密码")
private String mediclPassword;
/**
* 自动化配置状态 0 是 1 否
*/
@ExcelAttribute(name = "是否自动办理", maxLength = 1,isNotEmpty = true)
@Schema(description ="是否自动办理")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("是否自动办理")
private String autoStatus;
}
package com.yifu.cloud.plus.v1.yifu.social.controller;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil;
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.salary.vo.SalaryAttaVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TAttaInfo;
import com.yifu.cloud.plus.v1.yifu.social.service.FileUploadService;
import com.yifu.cloud.plus.v1.yifu.social.service.TAttaInfoService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
/**
* @author fang
* 文件上传接口
*/
@RestController
@RequestMapping("/fileUpload")
@Tag(name = "文件上传接口")
@Slf4j
public class FileUploadController {
@Autowired
private OSSUtil ossUtil;
@Autowired
private TAttaInfoService tAttaInfoService;
@Autowired
private FileUploadService fileUploadService;
/**
* @Author fxj
* @Description
* @Date 13:49 2022/6/17
* @Param
* @return
**/
@Operation(description = "OSS文件上传接口" +
"@ApiImplicitParam(name = \"file\", value = \"Form文件上传\", required = true, dataType = \"__file\", paramType = \"form\"),\n" +
"\t\t\t@ApiImplicitParam(name = \"filePath\", value = \"文件上传路径\", required = false, dataType = \"String\", paramType = \"form\"),\n" +
"\t\t\t@ApiImplicitParam(name = \"type\", value = \"关系类型(0员工附件-学历 1 员工附件-伤残 2.员工附件-职业 3.员工附件-不良记录 4.员工附件-合同;5收入证明)\", required = true, dataType = \"int\", paramType = \"form\"),\n" +
"\t\t\t@ApiImplicitParam(name = \"domain\", value = \"实体id(传入就插入对应关系,用于编辑)\", required = false, paramType = \"form\")\n" +
"\t")
/*@ApiImplicitParams({
@ApiImplicitParam(name = "file", value = "Form文件上传", required = true, dataType = "__file", paramType = "form"),
@ApiImplicitParam(name = "filePath", value = "文件上传路径", required = false, dataType = "String", paramType = "form"),
@ApiImplicitParam(name = "type", value = "关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招标信息7业务评估8电子档案)", required = true, dataType = "int", paramType = "form"),
@ApiImplicitParam(name = "domain", value = "实体id(传入就插入对应关系,用于编辑)", required = false, paramType = "form")
})*/
@PostMapping(value = "/ossUploadFile")
public R<T> uploadImg(@RequestBody MultipartFile file, String filePath, Integer type, String domain) throws IOException {
return fileUploadService.uploadAsso(file,filePath,type,domain,CommonConstants.ZERO_STRING);
}
/**
* @Author hgw
* @Description 改编自ossUploadFile接口,改变了回传信息——专为预入职微信端使用——忽略了token,其余人慎用
* @Date 13:49 2022/6/17
* @Param relationTypeSub 预入职其他附件的子类型
* @return
**/
@Operation(description = "OSS文件上传接口" +
"@ApiImplicitParam(name = \"file\", value = \"Form文件上传\", required = true, dataType = \"__file\", paramType = \"form\"),\n" +
"\t\t\t@ApiImplicitParam(name = \"filePath\", value = \"文件上传路径\", required = false, dataType = \"String\", paramType = \"form\"),\n" +
"\t\t\t@ApiImplicitParam(name = \"type\", value = \"关系类型(0员工附件-学历 1 员工附件-伤残 2.员工附件-职业 3.员工附件-不良记录 4.员工附件-合同;5收入证明)\", required = true, dataType = \"int\", paramType = \"form\"),\n" +
"\t\t\t@ApiImplicitParam(name = \"domain\", value = \"实体id(传入就插入对应关系,用于编辑)\", required = false, paramType = \"form\")\n" +
"\t")
@PostMapping(value = "/uploadFileReturnAtta")
public R<T> uploadFileReturnAtta(@RequestBody MultipartFile file, String filePath, Integer type, String domainId) throws IOException {
return fileUploadService.uploadAsso(file,filePath,type,domainId,CommonConstants.ONE_STRING);
}
/**
* @Author fxj
* @Description
* @Date 13:51 2022/6/17
* @Param
* @return
**/
@Operation(description = "附件删除")
@SysLog("附件删除")
@DeleteMapping("/ossFileDelete/{id}")
public R<Boolean> ossFileDelete(@PathVariable String id) {
try {
TAttaInfo attaInfo = tAttaInfoService.getById(id);
if (null == attaInfo) {
return R.failed("无对应附件信息");
}
if (tAttaInfoService.removeById(id)) {
ossUtil.deleteObject(null, attaInfo.getAttaSrc());
return R.ok(null,"删除成功!");
}
} catch (Exception e) {
log.error("附件删除异常:" + e.getMessage());
return R.failed("附件删除异常!");
}
return R.ok(null,"删除失败!");
}
/**
* 获取附件下载地址
*
* @param id
* @return
* @Author fxj
* @Date 2019-08-16
* @param id domainId
**/
@Operation(description = "附件预览下载地址 type:关系类型(0员工附件-学历 1 员工附件-伤残 2.员工附件-职业")
@GetMapping("/ossFileUrl/{id}")
public R<List<TAttaInfo>> ossFileUrl(@PathVariable String id) {
List<TAttaInfo> attas = tAttaInfoService.list(Wrappers.<TAttaInfo>query().lambda().eq(TAttaInfo::getDomainId,id));
if (Common.isEmpty(attas)) {
return new R<>(attas);
}
for (TAttaInfo atta:attas){
URL url = ossUtil.getObjectUrl(null, atta.getAttaSrc());
atta.setAttaUrl(url.toString().replace("http","https"));
}
return new R<>(attas);
}
/**
* 获取附件
* @author hgw
* @return R
*/
@Operation(summary = "获取薪资原表附件--EKP调用接口", description = "获取薪资原表附件--EKP调用接口")
@SysLog("获取薪资原表附件--EKP调用接口")
@GetMapping("/getAttaListBySalaryId")
public R<List<SalaryAttaVo>> getAttaListBySalaryId(@RequestParam String salaryId) {
List<SalaryAttaVo> voList = new ArrayList<>();
List<TAttaInfo> attaList = tAttaInfoService.list(Wrappers.<TAttaInfo>query().lambda()
.eq(TAttaInfo::getRelationType,11)
.eq(TAttaInfo::getDomainId,salaryId));
if (attaList != null && !attaList.isEmpty()) {
SalaryAttaVo vo;
URL url;
for (TAttaInfo a : attaList){
url = ossUtil.getObjectUrl(null, a.getAttaSrc());
vo = new SalaryAttaVo();
vo.setAttaName(a.getAttaName());
vo.setAttaUrl(url.toString().replace("http","https"));
voList.add(vo);
}
}
return R.ok(voList);
}
}
......@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo;
......@@ -30,9 +31,12 @@ import com.yifu.cloud.plus.v1.yifu.social.service.SysHouseHoldInfoService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
......@@ -93,7 +97,7 @@ public class SysHouseHoldInfoController {
@Operation(summary = "通过id查询", description = "通过id查询:hasPermission('demo_syshouseholdinfo_get')")
@GetMapping("/{id}" )
public R<SysHouseHoldInfo> getById(@PathVariable("id" ) String id) {
return R.ok(sysHouseHoldInfoService.getById(id));
return sysHouseHoldInfoService.getByIdAtta(id);
}
/**
......@@ -210,4 +214,47 @@ public class SysHouseHoldInfoController {
return R.ok(1);
}
/**
* 批量新增社保户配置数据
*
* @author huyc
* @date 2024-12-5 10:18:05
**/
@SneakyThrows
@Operation(description = "批量新增社保户配置数据 hasPermission('syshouseholdinfo_batch_add')")
@SysLog("批量新增社保户配置数据")
@PostMapping("/importListAdd")
@PreAuthorize("@pms.hasPermission('syshouseholdinfo_batch_add')")
public R<List<ErrorMessage>> importListAdd(@RequestBody MultipartFile file){
return sysHouseHoldInfoService.importListAdd(file.getInputStream());
}
/**
* 批量更新社保户配置数据
*
* @author huyc
* @date 2024-12-5 10:18:05
**/
@SneakyThrows
@Operation(description = "批量更新社保户配置数据 hasPermission('syshouseholdinfo_batch_update')")
@SysLog("批量更新社保户配置数据")
@PostMapping("/importListUpdate")
@PreAuthorize("@pms.hasPermission('syshouseholdinfo_batch_add')")
public R<List<ErrorMessage>> importListUpdate(@RequestBody MultipartFile file){
return sysHouseHoldInfoService.importListUpdate(file.getInputStream());
}
/**
* 导出社保户配置数据
*
* @author huyc
* @date 2024-12-5 11:32:08
**/
@Operation(description = "导出社保户配置数据")
@PostMapping("/export")
@PreAuthorize("@pms.hasPermission('syshouseholdinfo_export')")
public void export(HttpServletResponse response, @RequestBody SysHouseHoldInfo sysHouseHoldInfo) {
sysHouseHoldInfoService.listExport(response,sysHouseHoldInfo);
}
}
package com.yifu.cloud.plus.v1.yifu.social.mapper;/*
* 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)
*/
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.archives.entity.SysConfigLimit;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 系统限制配置表
*
* @author hgw
* @date 2024-09-24 17:39:57
*/
@Mapper
public interface SysConfigLimitMapper extends BaseMapper<SysConfigLimit> {
/**
* 系统限制配置表简单分页查询
*
* @param configKey 键
* @return
*/
Integer getSysConfigLimitByKey(@Param("configKey") String configKey);
}
......@@ -21,9 +21,12 @@ 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.SysHouseHoldInfo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialHouseholdInsertVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 社保户公积金户数据
*
......@@ -45,4 +48,18 @@ public interface SysHouseHoldInfoMapper extends BaseMapper<SysHouseHoldInfo> {
* @return
*/
IPage<SysHouseHoldInfo> getAllSingleSocailPage(Page<SysHouseHoldInfo> page);
/**
* 查询导出的数量
* @param sysHouseHoldInfo
* @return
*/
long selectExportCount(@Param("sysHouseHoldInfo") SysHouseHoldInfo sysHouseHoldInfo);
/**
* 查询导出的集合
* @param sysHouseHoldInfo
* @return
*/
List<TSocialHouseholdInsertVo> selectExportList(@Param("sysHouseHoldInfo") SysHouseHoldInfo sysHouseHoldInfo);
}
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.TAttaInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.time.LocalDateTime;
import java.util.Collection;
import java.util.List;
/**
* 附件信息表
*
* @author pwang
* @date 2021-02-19 16:16:07
*/
@Mapper
public interface TAttaInfoMapper extends BaseMapper<TAttaInfo> {
/**
* 附件信息表简单分页查询
*
* @param tAttaInfo 附件信息表
* @return
*/
IPage<TAttaInfo> getTAttaInfoPage(Page<TAttaInfo> page, @Param("tAttaInfo") TAttaInfo tAttaInfo);
/**
* @param tAttaInfo
* @Description: 获取list
* @Author: hgw
* @Date: 2021/5/28 16:02
* @return: java.util.List<com.yifu.cloud.v1.crm.api.entity.TAttaInfo>
**/
List<TAttaInfo> getTAttaInfoList(@Param("tAttaInfo") TAttaInfo tAttaInfo);
List<TAttaInfo> getTAttaInfoListByDoMainId(@Param("domainId") String domainId);
List<TAttaInfo> getKeenAtta(@Param("dayStart")LocalDateTime dayStart, @Param("values")Collection<String> values);
int updateDomainId(@Param("domainId")String domainId, @Param("ids")List<String> ids);
List<TAttaInfo> getAttaByApplyId(@Param("applyId")String applyId);
void deleteByDomainId(@Param("domainId") String domainId);
void deleteByDomainIdAndType(@Param("domainId") String domainId, @Param("relationType") String relationType);
// 删除学历与职业资格之外的附件
void deleteByDomainIdAndOther(@Param("domainId") String domainId);
}
package com.yifu.cloud.plus.v1.yifu.social.service;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.FileVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TAttaInfo;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
/**
* 文件上传
*
* @author pwang
* @date 2022-07-27 16:16:07
*/
public interface FileUploadService {
R<FileVo> uploadImg(MultipartFile file, String filePath, Integer type, String domain) throws IOException;
R<TAttaInfo> uploadFileReturnAtta(MultipartFile file, String filePath, Integer type, String domainId) throws IOException;
R<T> uploadAsso(MultipartFile file, String filePath, Integer type, String domain, String uploadType);
}
......@@ -21,9 +21,14 @@ 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.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
/**
* 社保户公积金户数据
*
......@@ -45,7 +50,20 @@ public interface SysHouseHoldInfoService extends IService<SysHouseHoldInfo> {
*/
R<Boolean> saveInfo (SysHouseHoldInfo sysHouseHoldInfo);
/**
* 户新增
* @param id
* @return R
*/
R<SysHouseHoldInfo> getByIdAtta (String id);
R<Boolean> updateByIdAsso(SysHouseHoldInfo sysHouseHoldInfo);
IPage<SysHouseHoldInfo> getAllSingleSocailPage(Page<SysHouseHoldInfo> page);
R<List<ErrorMessage>> importListAdd(InputStream inputStream);
R<List<ErrorMessage>> importListUpdate(InputStream inputStream);
void listExport(HttpServletResponse response, SysHouseHoldInfo sysHouseHoldInfo);
}
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.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.social.entity.TAttaInfo;
import java.time.LocalDateTime;
import java.util.Collection;
import java.util.List;
/**
* 附件信息表
*
* @author pwang
* @date 2021-02-19 16:16:07
*/
public interface TAttaInfoService extends IService<TAttaInfo> {
/**
* @Author fxj
* @Description
* @Date 13:48 2022/6/17
* @Param
* @return
**/
IPage<TAttaInfo> getTAttaInfoPage(Page<TAttaInfo> page, TAttaInfo tAttaInfo);
/**
* @Author fxj
* @Description
* @Date 13:48 2022/6/17
* @Param
* @return
**/
List<TAttaInfo> getTAttaInfoList(TAttaInfo tAttaInfo);
/**
* @param domainId 关联id
* @Description: 根据domainId获取附件
* @Author: hgw
* @Date: 2024/6/17 18:23
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.archives.entity.TAttaInfo>
**/
List<TAttaInfo> getTAttaInfoListByDoMainId(String domainId);
TAttaInfo add(TAttaInfo attaInfo);
void update(List<TAttaInfo> attaList, String domainId, String relationType);
/**
* @Author fxj
* @Description
* @Date 13:48 2022/6/17
* @Param
* @return
**/
Boolean batchOssFileDelete(List<TAttaInfo> delAttaList);
List<TAttaInfo> getKeenAtta(LocalDateTime dayStart, Collection<String> values);
Boolean updateDomainId(String domainId, List<String> ids);
/**
* @param applyId
* @Description: 收入证明使用
* @Author: hgw
* @Date: 2023/2/22 10:50
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.yifu.cloud.plus.v1.yifu.archives.entity.TAttaInfo>>
**/
R<List<TAttaInfo>> getAttaByApplyId(String applyId);
/**
* @param domainId 关联id
* @Description: 删除附件
* @Author: hgw
* @Date: 2024/6/20 14:50
* @return: void
**/
void deleteByDomainId(String domainId);
void deleteByDomainIdAndOther(String domainId);
void deleteByDomainIdAndType(String domainId, int relationType);
}
package com.yifu.cloud.plus.v1.yifu.social.service.impl;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ResultConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.FileVo;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.social.entity.TAttaInfo;
import com.yifu.cloud.plus.v1.yifu.social.mapper.SysConfigLimitMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.FileUploadService;
import com.yifu.cloud.plus.v1.yifu.social.service.TAttaInfoService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.time.LocalDateTime;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
@Service
@RequiredArgsConstructor
@Slf4j
public class FileUploadServiceImpl implements FileUploadService {
private final OSSUtil ossUtil;
private final TAttaInfoService tAttaInfoService;
private AtomicInteger atomicInteger = new AtomicInteger(0);
//初始化附件上传队列上限值
private int maxLimit = 1;
private final SysConfigLimitMapper configLimitMapper;
@Override
public R<TAttaInfo> uploadFileReturnAtta(MultipartFile file, String filePath, Integer type, String domainId) throws IOException {
if (null == file) {
return R.failed("文件删除异常,请重新上传!");
}
String fileName = file.getOriginalFilename();
if (fileName == null || Common.isEmpty(fileName)) {
return R.failed("文件名不能为空!!");
}
if (fileName.length() > 100) {
return R.failed("文件名不能超过100个字符!");
}
//filePath不传默认存储空间的根目录
//jpg,jpeg,png,bmp
String key = "";
if (Common.isNotNull(filePath)) {
key = filePath + "/" + System.currentTimeMillis() + fileName;
} else {
key = System.currentTimeMillis() + fileName;
}
if (!Common.checkFile(key)) {
return R.failed("非法上传类型:" + fileName);
}
boolean flag = ossUtil.uploadFileByStream(file.getInputStream(), key, null);
TAttaInfo attaInfo;
URL url;
if (flag) {
log.info("文件:" + fileName + "上传到存储空间" + ossUtil.getBucketName() + "成功!");
attaInfo = initUnitAttaForInsert(fileName, key, file.getSize());
attaInfo.setRelationType(String.valueOf(type));
try {
attaInfo.setDomainId(domainId);
Set<String> dbAuthsSet = new HashSet<>();
Collection<? extends GrantedAuthority> authorities = AuthorityUtils
.createAuthorityList(dbAuthsSet.toArray(new String[0]));
YifuUser user = new YifuUser("2", 1L, "", "预入职扫码",
"预入职扫码", "0", SecurityConstants.BCRYPT + "123456",
"12345678911", true, true, true,
true,
"1", authorities, "1",
null, null,
null);
attaInfo.setCreateBy(user.getId());
attaInfo.setCreateName(user.getNickname());
attaInfo = tAttaInfoService.add(attaInfo);
} catch (Exception e) {
log.error("OSS文件上传异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("上传异常:" + e.getMessage());
}
url = ossUtil.getObjectUrl(null, attaInfo.getAttaSrc());
attaInfo.setAttaUrl(String.valueOf(url));
return R.ok(attaInfo);
} else {
return R.failed("fail:上传异常");
}
}
@Override
public R<FileVo> uploadImg(MultipartFile file, String filePath, Integer type, String domain) throws IOException {
if (null == file) {
return R.failed("文件删除异常,请重新上传!");
}
String fileName = file.getOriginalFilename();
if (Common.isEmpty(fileName)) {
return R.failed("文件名不能为空!");
}
if (fileName.length() > 100) {
return R.failed("文件名不能超过100个字符!");
}
//filePath不传默认存储空间的根目录
//jpg,jpeg,png,bmp
String key = "";
if (Common.isNotNull(filePath)) {
key = filePath + "/" + System.currentTimeMillis() + fileName;
} else {
key = System.currentTimeMillis() + fileName;
}
if (!Common.checkFile(key)) {
return R.failed("非法上传类型!");
}
boolean flag = ossUtil.uploadFileByStream(file.getInputStream(), key, null);
FileVo fileVo;
TAttaInfo attaInfo;
URL url;
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
attaInfo = initUnitAttaForInsert(fileName, key, file.getSize());
attaInfo.setRelationType(String.valueOf(type));
try {
attaInfo.setDomainId(domain);
attaInfo = tAttaInfoService.add(attaInfo);
} catch (Exception e) {
log.error("OSS文件上传接口异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("fail:" + e.getMessage());
}
//有实体id则插入关系,用于编辑
if (Common.isNotNull(domain)) {
url = ossUtil.getObjectUrl(null, attaInfo.getAttaSrc());
fileVo = new FileVo(attaInfo.getId(), attaInfo.getAttaName(), url.toString());
return R.ok(fileVo, "success");
}
url = ossUtil.getObjectUrl(null, attaInfo.getAttaSrc());
fileVo = new FileVo(attaInfo.getId(), attaInfo.getAttaName(), url.toString());
return R.ok(fileVo, "success");
} else {
return R.failed("fail:上传失败");
}
}
private R<FileVo> uploadImg2(InputStream fileIn, String filePath, Integer type, String domain, String fileName) throws IOException {
if (null == fileIn) {
return R.failed("文件上传异常,请重新上传!");
}
if (Common.isEmpty(fileName)) {
return R.failed("文件名不能为空!");
}
//filePath不传默认存储空间的根目录
//jpg,jpeg,png,bmp
String key = System.currentTimeMillis() + fileName;
boolean flag = ossUtil.uploadFileByStream(fileIn, key, null);
FileVo fileVo;
TAttaInfo attaInfo;
URL url;
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
attaInfo = initUnitAttaForInsert(fileName, key, 0);
attaInfo.setRelationType(String.valueOf(type));
try {
attaInfo.setDomainId(domain);
attaInfo = tAttaInfoService.add(attaInfo);
} catch (Exception e) {
log.error("OSS文件上传接口异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("fail:" + e.getMessage());
}
//有实体id则插入关系,用于编辑
if (Common.isNotNull(domain)) {
url = ossUtil.getObjectUrl(null, attaInfo.getAttaSrc());
fileVo = new FileVo(attaInfo.getId(), attaInfo.getAttaName(), url.toString());
return R.ok(fileVo, "success");
}
url = ossUtil.getObjectUrl(null, attaInfo.getAttaSrc());
fileVo = new FileVo(attaInfo.getId(), attaInfo.getAttaName(), url.toString());
return R.ok(fileVo, "success");
} else {
return R.failed("fail:上传失败");
}
}
/**
* 对象初始化
*
* @param fileName
* @param key
* @param fileSize
* @return
*/
private TAttaInfo initUnitAttaForInsert(String fileName, String key, long fileSize) {
TAttaInfo unitAtta = new TAttaInfo();
char slash = '/';
char point = '.';
if (fileName.lastIndexOf(slash) >= 0) {
unitAtta.setAttaName(fileName.substring(fileName.lastIndexOf(slash)));
} else {
unitAtta.setAttaName(fileName);
}
unitAtta.setAttaSize(fileSize);
unitAtta.setAttaSrc(key);
if (key.lastIndexOf(point) >= 0) {
unitAtta.setAttaType(key.substring(key.lastIndexOf(point)));
}
unitAtta.setCreateTime(LocalDateTime.now());
return unitAtta;
}
/**
* @return
* @Author fxj
* @Description 整合接口
* @Date 15:24 2024/9/24
* @Param
**/
@Override
public R uploadAsso(MultipartFile file, String filePath, Integer type, String domain, String uploadType) {
return getR(file, filePath, type, domain, uploadType);
}
public R getR(MultipartFile file, String filePath, Integer type, String domain, String uploadType) {
maxLimit = configLimitMapper.getSysConfigLimitByKey("UPLOAD_MAX_LIMIT");
if (atomicInteger.incrementAndGet() <= maxLimit) {
try {
if (CommonConstants.ZERO_STRING.equals(uploadType)) {
return uploadImg(file, filePath, type, domain);
} else if (CommonConstants.ONE_STRING.equals(uploadType)) {
return uploadFileReturnAtta(file, filePath, type, domain);
}
} catch (Exception e) {
log.error("附件上传异常:", e);
} finally {
atomicInteger.decrementAndGet();
}
} else {
atomicInteger.decrementAndGet();
log.error("超出阈值:" + ResultConstants.FILE_UPLOADING_DATA);
return R.failed(ResultConstants.FILE_UPLOADING_DATA);
}
return null;
}
}
\ No newline at end of file
......@@ -16,25 +16,52 @@
*/
package com.yifu.cloud.plus.v1.yifu.social.service.impl;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;
import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import com.alibaba.excel.util.ListUtils;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.check.entity.TCheckMobile;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AllUserNaVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprCheckProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.util.BeanCopyUtils;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysBaseSetInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TAttaInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialfundHouseRes;
import com.yifu.cloud.plus.v1.yifu.social.mapper.SysBaseSetInfoMapper;
import com.yifu.cloud.plus.v1.yifu.social.mapper.SysHouseHoldInfoMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.SysHouseHoldInfoService;
import com.yifu.cloud.plus.v1.yifu.social.service.TAttaInfoService;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialfundHouseResService;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialHouseholdInsertVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialHouseholdUpdateVo;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.net.URL;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 社保户公积金户数据
*
......@@ -50,6 +77,16 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
@Autowired
private TSocialfundHouseResService tSocialfundHouseResService;
private final TAttaInfoService attaInfoService;
private final DaprCheckProperties daprCheckProperties;
@Autowired
private UpmsDaprUtils upmsDaprUtils;
@Autowired
private OSSUtil ossUtil;
/**
* 社保户公积金户数据简单分页查询
* @param sysHouseHoldInfo 社保户公积金户数据
......@@ -90,13 +127,39 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
return R.failed("审核人或办理人必填!");
}
baseMapper.insert(sysHouseHoldInfo);
//维护附件信息
if (Common.isNotNull(sysHouseHoldInfo.getAttaId())) {
TAttaInfo attaInfo = attaInfoService.getById(Wrappers.<TAttaInfo>query().lambda().
eq(TAttaInfo::getId, sysHouseHoldInfo.getAttaId()));
attaInfo.setDomainId(sysHouseHoldInfo.getId());
attaInfoService.updateById(attaInfo);
}
// 同步审核权限、办理权限
this.saveAuditUserOrHandleUser(sysHouseHoldInfo, CommonConstants.ZERO_STRING);
this.saveAuditUserOrHandleUser(sysHouseHoldInfo, CommonConstants.ONE_STRING);
return R.ok();
}
/**
* 查询
* @param id
* @return
*/
@Override
public R<SysHouseHoldInfo> getByIdAtta(String id) {
SysHouseHoldInfo sysHouseHoldInfo = baseMapper.selectById(id);
TAttaInfo attaInfo = attaInfoService.getOne(Wrappers.<TAttaInfo>query().lambda().eq(TAttaInfo::getDomainId, id)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(attaInfo)) {
URL url = ossUtil.getObjectUrl(null, attaInfo.getAttaSrc());
if (Common.isNotNull(url)) {
attaInfo.setAttaUrl(url.toString());
}
sysHouseHoldInfo.setAtta(attaInfo);
}
return R.ok(sysHouseHoldInfo);
}
/**
* @param authType 0 审核人 1办理人
* @Description: 添加审核人、办理人
......@@ -180,4 +243,403 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
}
}
@Override
public R<List<ErrorMessage>> importListAdd(InputStream inputStream) {
List<ErrorMessage> errorMessageList = new ArrayList<>();
ExcelUtil<TSocialHouseholdInsertVo> util1 = new ExcelUtil<>(TSocialHouseholdInsertVo.class);
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
try {
EasyExcel.read(inputStream, TSocialHouseholdInsertVo.class, new ReadListener<TSocialHouseholdInsertVo>() {
/**
* 单次缓存的数据量
*/
public static final int BATCH_COUNT = CommonConstants.BATCH_COUNT;
/**
*临时存储
*/
private List<TSocialHouseholdInsertVo> cachedDataList = ListUtils.newArrayListWithExpectedSize(BATCH_COUNT);
@Override
public void invoke(TSocialHouseholdInsertVo data, AnalysisContext context) {
ReadRowHolder readRowHolder = context.readRowHolder();
Integer rowIndex = readRowHolder.getRowIndex();
data.setRowIndex(rowIndex+1);
ErrorMessage errorMessage = util1.checkEntity(data, data.getRowIndex());
if (Common.isNotNull(errorMessage)){
errorMessageList.add(errorMessage);
}else {
cachedDataList.add(data);
}
if (cachedDataList.size() >= BATCH_COUNT) {
saveData();
// 存储完成清理 list
cachedDataList = ListUtils.newArrayListWithExpectedSize(BATCH_COUNT);
}
}
@Override
public void doAfterAllAnalysed(AnalysisContext context) {
saveData();
}
/**
* 加上存储数据库
*/
private void saveData() {
importSocialHouseInsert(cachedDataList,errorMessageList);
}
}).sheet().doRead();
}catch (Exception e){
log.error(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR,e);
return R.failed(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR);
}
return R.ok(errorMessageList);
}
@Override
public R<List<ErrorMessage>> importListUpdate(InputStream inputStream) {
List<ErrorMessage> errorMessageList = new ArrayList<>();
ExcelUtil<TSocialHouseholdUpdateVo> util1 = new ExcelUtil<>(TSocialHouseholdUpdateVo.class);
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
try {
EasyExcel.read(inputStream, TSocialHouseholdUpdateVo.class, new ReadListener<TSocialHouseholdUpdateVo>() {
/**
* 单次缓存的数据量
*/
public static final int BATCH_COUNT = CommonConstants.BATCH_COUNT;
/**
*临时存储
*/
private List<TSocialHouseholdUpdateVo> cachedDataList = ListUtils.newArrayListWithExpectedSize(BATCH_COUNT);
@Override
public void invoke(TSocialHouseholdUpdateVo data, AnalysisContext context) {
ReadRowHolder readRowHolder = context.readRowHolder();
Integer rowIndex = readRowHolder.getRowIndex();
data.setRowIndex(rowIndex+1);
ErrorMessage errorMessage = util1.checkEntity(data, data.getRowIndex());
if (Common.isNotNull(errorMessage)){
errorMessageList.add(errorMessage);
}else {
cachedDataList.add(data);
}
if (cachedDataList.size() >= BATCH_COUNT) {
saveData();
// 存储完成清理 list
cachedDataList = ListUtils.newArrayListWithExpectedSize(BATCH_COUNT);
}
}
@Override
public void doAfterAllAnalysed(AnalysisContext context) {
saveData();
}
/**
* 加上存储数据库
*/
private void saveData() {
importSocialHouseUpdate(cachedDataList,errorMessageList);
}
}).sheet().doRead();
}catch (Exception e){
log.error(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR,e);
return R.failed(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR);
}
return R.ok(errorMessageList);
}
/**
* 导出社保户配置数据
* @return
*/
@Override
public void listExport(HttpServletResponse response, SysHouseHoldInfo sysHouseHoldInfo){
String fileName = "户配置信息批量导出" + DateUtil.getThisTime() + CommonConstants.XLSX;
//获取要导出的列表
List<TSocialHouseholdInsertVo> list = new ArrayList<>();
long count = baseMapper.selectExportCount(sysHouseHoldInfo);
try (ServletOutputStream out = response.getOutputStream();) {
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, TSocialHouseholdInsertVo.class).build();
if (count > CommonConstants.ZERO_INT){
WriteSheet writeSheet;
list = baseMapper.selectExportList(sysHouseHoldInfo);
if (Common.isNotNull(list)) {
writeSheet = EasyExcel.writerSheet("户配置信息批量导出").build();
excelWriter.write(list, writeSheet);
}
}else {
WriteSheet writeSheet = EasyExcel.writerSheet("户配置信息批量导出").build();
excelWriter.write(list,writeSheet);
}
excelWriter.finish();
}catch (Exception e){
log.error("执行异常" ,e);
}
}
private void importSocialHouseInsert(List<TSocialHouseholdInsertVo> excelVOList, List<ErrorMessage> errorMessageList) {
if (!Common.isNotNull(excelVOList)){
return;
}
//获取所有的人员信息
HashMap<String, SysUser> userMap = new HashMap<>();
R<AllUserNaVo> userListR = upmsDaprUtils.getAllUserIds();
if (Common.isNotNull(userListR)) {
AllUserNaVo userList = userListR.getData();
if (null != userList && !userList.getUserNames().isEmpty()) {
userMap = userList.getAllUser();
}
} else {
errorMessageList.add(new ErrorMessage(1, "获取人员信息数据失败"));
}
Map<String,String> exitNameMap = new HashMap<>();
String errorMsg;
SysHouseHoldInfo info;
SysUser auditUser;
SysUser handlerUser;
// 个性化校验逻辑
// 执行数据插入操作组装
for (int i = 0; i < excelVOList.size(); i++) {
TSocialHouseholdInsertVo excel = excelVOList.get(i);
//所属机构去空
excel.setOrganName(excel.getOrganName().trim());
SysHouseHoldInfo household = new SysHouseHoldInfo();
BeanCopyUtils.copyProperties(excel,household);
//判断模板中是否有户重复的数据
if (null == exitNameMap.get(excel.getName())) {
exitNameMap.put(excel.getName(),"1");
} else {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "模板中已存在相同户名的数据",excel));
continue;
}
//判断户类型是否准确
if (!excel.getHouseType().equals("自有户") && !excel.getHouseType().equals("独立户")) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "户类型只能是【自有户】或者【独立户】",excel));
continue;
}
//判断是否自动办理是否准确
if (!excel.getAutoStatus().equals("是") && !excel.getAutoStatus().equals("否")) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "是否自动办理只能为【是】或者【否】",excel));
continue;
}
//是否自动办理,选择是时,社保和医保信息必须填写其中一个,否则导入不成功
//选择否时,不做限制要求,可填可不填,导入时正常导入填写的字段
if (excel.getAutoStatus().equals("是") && Common.isEmpty(excel.getSocialAccount())
&& Common.isEmpty(excel.getMediclAccount())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "是否自动办理,选择是时,社保和医保信息必须填写其中一个",excel));
continue;
}
//判断社保、医保账户和密码的对应关系
if (((Common.isEmpty(excel.getSocialAccount())) != (Common.isEmpty(excel.getSocialPassword()))) ||
((Common.isEmpty(excel.getMediclAccount())) != (Common.isEmpty(excel.getMediclPassword())))) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "社保账户,社保密码和医保账户,医保密码的账号和密码必须都填写或者都不填写",excel));
continue;
}
info = this.getOne(Wrappers.<SysHouseHoldInfo>query().lambda()
.eq(SysHouseHoldInfo::getType,CommonConstants.ZERO_STRING)
.eq(SysHouseHoldInfo::getName,excel.getName())
.last(CommonConstants.LAST_ONE_SQL));
if (null != info){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "对应账户性质、户名的配置已存在!",excel));
continue;
}
auditUser = userMap.get(excel.getAuditUserName());
handlerUser = userMap.get(excel.getHandleUserName());
if (Common.isEmpty(auditUser) || Common.isEmpty(handlerUser)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "未找到对应的审核人或办理人的人员信息",excel));
continue;
}
//校验手机号准确性
errorMsg = checkMobile(excel.getPhone());
if (!errorMsg.contains("成功")) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), errorMsg,excel));
continue;
}
//封装和插入数据
household.setAutoStatus(excel.getAutoStatus().equals("是") ? "0" : "1");
household.setType("0");
household.setHouseType(excel.getHouseType().equals("自有户") ? "0" : "1");
household.setAuditUser(null == auditUser.getUserId() ? "" : auditUser.getUserId());
household.setAuditUserDeptName(null == auditUser.getDeptName() ? "" : auditUser.getDeptName());
household.setHandleUser(null == handlerUser.getUserId() ? "" :handlerUser.getUserId());
household.setHandleUserDeptName(null == handlerUser.getDeptName() ? "" : handlerUser.getDeptName());
household.setProvince(String.valueOf(excel.getProvince()));
household.setCity(String.valueOf(excel.getCity()));
if (Common.isNotNull(excel.getTown())) {
household.setTown(String.valueOf(excel.getTown()));
}
baseMapper.insert(household);
// 同步审核权限、办理权限
this.saveAuditUserOrHandleUser(household, CommonConstants.ZERO_STRING);
this.saveAuditUserOrHandleUser(household, CommonConstants.ONE_STRING);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),CommonConstants.SAVE_SUCCESS,excel));
}
}
private void importSocialHouseUpdate(List<TSocialHouseholdUpdateVo> excelVOList, List<ErrorMessage> errorMessageList) {
if (!Common.isNotNull(excelVOList)){
return;
}
//获取所有的人员信息
HashMap<String, SysUser> userMap = new HashMap<>();
R<AllUserNaVo> userListR = upmsDaprUtils.getAllUserIds();
if (Common.isNotNull(userListR)) {
AllUserNaVo userList = userListR.getData();
if (null != userList && !userList.getUserNames().isEmpty()) {
userMap = userList.getAllUser();
}
} else {
errorMessageList.add(new ErrorMessage(1, "获取人员信息数据失败"));
}
Map<String,String> exitNameMap = new HashMap<>();
String errorMsg;
SysHouseHoldInfo info;
// 个性化校验逻辑
// 执行数据插入操作 组装
for (int i = 0; i < excelVOList.size(); i++) {
TSocialHouseholdUpdateVo excel = excelVOList.get(i);
info = this.getOne(Wrappers.<SysHouseHoldInfo>query().lambda()
.eq(SysHouseHoldInfo::getType,CommonConstants.ZERO_STRING)
.eq(SysHouseHoldInfo::getName,excel.getName())
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isEmpty(info)){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "未找到对应账户性质、户名的配置!",excel));
continue;
}
//判断模板中是否有户重复的数据
if (null == exitNameMap.get(excel.getName())) {
exitNameMap.put(excel.getName(),"1");
} else {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "模板中已存在相同户名的数据",excel));
continue;
}
//判断户类型是否准确
if (Common.isNotNull(excel.getHouseType()) && !excel.getHouseType().equals("自有户")
&& !excel.getHouseType().equals("独立户")) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "户类型只能是【自有户】或者【独立户】",excel));
continue;
}
//判断是否自动办理是否准确
if (!excel.getAutoStatus().equals("是") && !excel.getAutoStatus().equals("否")) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "是否自动办理只能为【是】或者【否】",excel));
continue;
}
if (Common.isNotNull(excel.getAuditUserName()) && Common.isEmpty(userMap.get(excel.getAuditUserName()))) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "未找到对应审核人的人员信息", excel));
continue;
}
if (Common.isNotNull(excel.getHandleUserName()) && Common.isEmpty(userMap.get(excel.getHandleUserName()))) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "未找到对应办理人的人员信息", excel));
continue;
}
//校验手机号准确性
if (Common.isNotNull(excel.getPhone())) {
errorMsg = checkMobile(excel.getPhone());
if (!errorMsg.contains("成功")) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), errorMsg, excel));
continue;
}
}
//更新数据
updateHouseInfo(excel,info,userMap);
// 新老数据审核人办理人不同,先删除,再添加
if (Common.isNotNull(excel.getAuditUserName()) && !excel.getAuditUserName().equals(info.getAuditUserName())) {
tSocialfundHouseResService.deleteAuditUser(info);
}
if (Common.isNotNull(excel.getHandleUserName()) && !excel.getHandleUserName().equals(info.getHandleUserName())) {
tSocialfundHouseResService.deleteHandleUser(info);
}
// 同步审核权限、办理权限
this.saveAuditUserOrHandleUser(info, CommonConstants.ZERO_STRING);
this.saveAuditUserOrHandleUser(info, CommonConstants.ONE_STRING);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),CommonConstants.UPDATE_SUCCESS));
}
}
/**
* 校验手机号准确性
* @param mobileNo 社保户公积金户数据
* @return
*/
private String checkMobile(String mobileNo) {
// 调用校验服务-校验手机号
TCheckMobile checkMobile = new TCheckMobile();
checkMobile.setMobile(mobileNo);
R<TCheckMobile> a = HttpDaprUtil.invokeMethodPost(daprCheckProperties.getAppUrl(), daprCheckProperties.getAppId()
, "/tcheckmobile/inner/checkOneMobile", checkMobile, TCheckMobile.class, SecurityConstants.FROM_IN);
if (a != null && a.getData() != null) {
checkMobile = a.getData();
if (checkMobile != null && Common.isNotNull(checkMobile.getStatus())
&& !CommonConstants.ONE_STRING.equals(checkMobile.getStatus())) {
return checkMobile.getMessage();
}
}
return "校验服务错误,请联系管理员!";
}
private void updateHouseInfo (TSocialHouseholdUpdateVo excel,SysHouseHoldInfo info,
Map<String,SysUser> userMap) {
if (Common.isNotNull(excel.getHouseType())) {
info.setHouseType(excel.getHouseType().equals("自有户") ? "0" : "1");
}
if (Common.isNotNull(excel.getAutoStatus())) {
info.setAutoStatus(excel.getAutoStatus().equals("是") ? "0" : "1");
}
if (Common.isNotNull(excel.getOrganName())) {
info.setOrganName(excel.getOrganName().trim());
}
if (Common.isNotNull(excel.getPhone())) {
info.setPhone(excel.getPhone());
}
if (Common.isNotNull(excel.getCustomerNo())) {
info.setCustomerNo(excel.getCustomerNo());
}
if (Common.isNotNull(excel.getUnitCreditCode())) {
info.setUnitCreditCode(excel.getUnitCreditCode());
}
if (Common.isNotNull(excel.getSocialAccount())) {
info.setSocialAccount(excel.getSocialAccount());
}
if (Common.isNotNull(excel.getSocialPassword())) {
info.setSocialPassword(excel.getSocialPassword());
}
if (Common.isNotNull(excel.getMediclAccount())) {
info.setMediclAccount(excel.getMediclAccount());
}
if (Common.isNotNull(excel.getMediclPassword())) {
info.setMediclPassword(excel.getMediclPassword());
}
if (Common.isNotNull(excel.getAuditUserName())) {
SysUser auditUser = userMap.get(excel.getAuditUserName());
info.setAuditUser(auditUser.getUserId());
info.setAuditUserName(excel.getAuditUserName());
info.setAuditUserDeptName(auditUser.getDeptName());
}
if (Common.isNotNull(excel.getHandleUserName())) {
SysUser handlerUser = userMap.get(excel.getHandleUserName());
info.setHandleUser(handlerUser.getUserId());
info.setHandleUserName(excel.getAuditUserName());
info.setHandleUserDeptName(handlerUser.getDeptName());
}
if (Common.isNotNull(excel.getProvince()) && Common.isNotNull(excel.getCity())) {
info.setProvince(String.valueOf(excel.getProvince()));
info.setCity(String.valueOf(excel.getCity()));
if (Common.isNotNull(excel.getTown())) {
info.setTown(String.valueOf(excel.getTown()));
} else {
info.setTown("");
}
}
baseMapper.updateById(info);
}
}
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.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.social.entity.TAttaInfo;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TAttaInfoMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TAttaInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.net.URL;
import java.time.LocalDateTime;
import java.util.Collection;
import java.util.List;
/**
* 附件信息表
*
* @author pwang
* @date 2021-02-19 16:16:07
*/
@Service
public class TAttaInfoServiceImpl extends ServiceImpl<TAttaInfoMapper, TAttaInfo> implements TAttaInfoService {
@Autowired
private OSSUtil ossUtil;
/**
* 附件信息表简单分页查询
*
* @param tAttaInfo 附件信息表
* @return
*/
@Override
public IPage<TAttaInfo> getTAttaInfoPage(Page<TAttaInfo> page, TAttaInfo tAttaInfo) {
return baseMapper.getTAttaInfoPage(page, tAttaInfo);
}
/**
* @Author fxj
* @Description
* @Date 13:48 2022/6/17
* @Param
* @return
**/
@Override
public List<TAttaInfo> getTAttaInfoList(TAttaInfo tAttaInfo) {
return baseMapper.getTAttaInfoList(tAttaInfo);
}
@Override
public List<TAttaInfo> getTAttaInfoListByDoMainId(String domainId) {
return baseMapper.getTAttaInfoListByDoMainId(domainId);
}
@Override
public TAttaInfo add(TAttaInfo attaInfo) {
this.save(attaInfo);
return attaInfo;
}
/**
* @Author fxj
* @Description
* @Date 13:48 2022/6/17
* @Param
* @return
**/
@Override
public void update(List<TAttaInfo> attaInfoList, String domainId, String relationType) {
if (attaInfoList != null) {
for (TAttaInfo attaInfo : attaInfoList) {
attaInfo.setDomainId(domainId);
attaInfo.setRelationType(relationType);
this.updateById(attaInfo);
}
}
}
/**
* @Author fxj
* @Description
* @Date 13:48 2022/6/17
* @Param
* @return
**/
@Override
public Boolean batchOssFileDelete(List<TAttaInfo> delAttaList) {
try {
for (TAttaInfo delAtta : delAttaList) {
if (this.removeById(delAtta.getId())) {
ossUtil.deleteObject(null, delAtta.getAttaSrc());
}
}
return true;
} catch (Exception e) {
log.error("附件删除异常:" + e.getMessage());
return false;
}
}
@Override
public List<TAttaInfo> getKeenAtta(LocalDateTime dayStart, Collection<String> values) {
return baseMapper.getKeenAtta(dayStart,values);
}
@Override
public Boolean updateDomainId(String domainId, List<String> ids){
if (Common.isEmpty(domainId) || !Common.isNotEmpty(ids)){
return false;
}
return baseMapper.updateDomainId(domainId,ids) > 0;
}
@Override
public R<List<TAttaInfo>> getAttaByApplyId(String applyId) {
List<TAttaInfo> list = baseMapper.getAttaByApplyId(applyId);
if (Common.isNotNull(list)) {
URL url;
for (TAttaInfo atta:list) {
url = ossUtil.getObjectUrl(null, atta.getAttaSrc());
atta.setAttaUrl(url.toString());
}
return R.ok(list);
}else{
return R.failed("没有附件");
}
}
@Override
public void deleteByDomainId(String domainId) {
baseMapper.deleteByDomainId(domainId);
}
@Override
public void deleteByDomainIdAndOther(String domainId) {
baseMapper.deleteByDomainIdAndOther(domainId);
}
@Override
public void deleteByDomainIdAndType(String domainId, int relationType) {
// 学历
if (relationType == 0) {
baseMapper.deleteByDomainIdAndType(domainId, "0");
baseMapper.deleteByDomainIdAndType(domainId, "26");
} else if (relationType == 1) {
// 执业资格证书
baseMapper.deleteByDomainIdAndType(domainId, "2");
} else if (relationType == 2) {
// 其他附件
baseMapper.deleteByDomainIdAndType(domainId, "27");
}
}
}
<?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.SysConfigLimitMapper">
<resultMap id="sysConfigLimitMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.SysConfigLimit">
<id property="id" column="ID"/>
<result property="configKey" column="CONFIG_KEY"/>
<result property="configValue" column="CONFIG_VALUE"/>
<result property="remark" column="REMARK"/>
</resultMap>
<!-- 根据key获取value -->
<select id="getSysConfigLimitByKey" resultType="java.lang.Integer">
SELECT a.CONFIG_VALUE
FROM sys_config_limit a
where a.CONFIG_KEY = #{configKey} limit 1
</select>
</mapper>
......@@ -47,8 +47,14 @@
<result property="houseType" column="HOUSE_TYPE"/>
<result property="customerNo" column="CUSTOMER_NO"/>
<result property="unitCreditCode" column="UNIT_CREDIT_CODE"/>
<result property="fundBank" column="FUND_BANK"/>
<result property="autoStatus" column="AUTO_STATUS"/>
<result property="fundBank" column="FUND_BANK"/>
<result property="autoStatus" column="AUTO_STATUS"/>
<result property="phone" column="PHONE"/>
<result property="socialAccount" column="SOCIAL_ACCOUNT"/>
<result property="mediclAccount" column="MEDICL_ACCOUNT"/>
<result property="socialPassword" column="SOCIAL_PASSWORD"/>
<result property="mediclPassword" column="MEDICL_PASSWORD"/>
<result property="isSign" column="IS_SIGN"/>
</resultMap>
<resultMap id="sysHouseHoldSingleInfoMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo">
......@@ -83,7 +89,13 @@
a.UNIT_CREDIT_CODE,
a.FUND_BANK,
a.HANDLE_USER_NAME,
a.AUTO_STATUS
a.AUTO_STATUS,
a.PHONE,
a.SOCIAL_ACCOUNT,
a.MEDICL_ACCOUNT,
a.SOCIAL_PASSWORD,
a.MEDICL_PASSWORD,
a.IS_SIGN
</sql>
<sql id="sysHouseHoldInfo_where">
<if test="sysHouseHoldInfo != null">
......@@ -164,4 +176,46 @@
where HOUSE_TYPE = '0'
order by a.CREATE_TIME desc
</select>
<select id="selectExportCount" resultType="java.lang.Long">
SELECT
count(1)
FROM sys_house_hold_info a
<where>
1=1
<include refid="sysHouseHoldInfo_where"/>
</where>
order by a.CREATE_TIME desc
</select>
<select id="selectExportList" resultType="com.yifu.cloud.plus.v1.yifu.social.vo.TSocialHouseholdInsertVo">
SELECT
if(a.TYPE = '0','社保户','公积金户') type,
a.NAME,
a1.AREA_NAME PROVINCE,
a2.AREA_NAME CITY,
ifnull(a3.AREA_NAME,'') TOWN,
a.ORGAN_NAME organName,
a.AUDIT_USER_NAME auditUserName,
a.HANDLE_USER_NAME handleUserName,
a.PHONE,
if(a.HOUSE_TYPE = '0','独立户','自有户') houseType,
a.CUSTOMER_NO customerNo,
a.UNIT_CREDIT_CODE unitCreditCode,
a.SOCIAL_ACCOUNT socialAccount,
a.SOCIAL_PASSWORD socialPassword,
a.MEDICL_ACCOUNT mediclAccount,
a.MEDICL_PASSWORD mediclPassword,
if(a.IS_SIGN = '0','是','否') isSign,
if(a.AUTO_STATUS = '0','启用','禁用') autoStatus
FROM sys_house_hold_info a
LEFT JOIN sys_area a1 on a1.id=a.PROVINCE
LEFT JOIN sys_area a2 on a2.id=a.CITY
LEFT JOIN sys_area a3 on a3.id=a.TOWN
<where>
1 = 1
<include refid="sysHouseHoldInfo_where"/>
</where>
order by a.CREATE_TIME desc
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.social.mapper.TAttaInfoMapper">
<resultMap id="tAttaInfoMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.TAttaInfo">
<id property="id" column="id"/>
<result property="attaName" column="atta_name"/>
<result property="attaSrc" column="atta_src"/>
<result property="attaSize" column="atta_size"/>
<result property="attaType" column="atta_type"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="relationType" column="relation_type"/>
<result property="domainId" column="domain_id"/>
</resultMap>
<sql id="Base_Column_List">
a.id,
a.atta_name,
a.atta_src,
a.atta_size,
a.atta_type,
a.create_by,
a.create_time,
a.relation_type,
a.domain_id
</sql>
<sql id="tAttaInfo_where">
<if test="tAttaInfo != null">
<if test="tAttaInfo.id != null and tAttaInfo.id.trim() != ''">
AND a.id = #{tAttaInfo.id}
</if>
<if test="tAttaInfo.attaName != null and tAttaInfo.attaName.trim() != ''">
AND a.atta_name = #{tAttaInfo.attaName}
</if>
<if test="tAttaInfo.attaSrc != null and tAttaInfo.attaSrc.trim() != ''">
AND a.atta_src = #{tAttaInfo.attaSrc}
</if>
<if test="tAttaInfo.attaSize != null">
AND a.atta_size = #{tAttaInfo.attaSize}
</if>
<if test="tAttaInfo.attaType != null and tAttaInfo.attaType.trim() != ''">
AND a.atta_type = #{tAttaInfo.attaType}
</if>
<if test="tAttaInfo.createBy != null and tAttaInfo.createBy.trim() != ''">
AND a.create_by = #{tAttaInfo.createBy}
</if>
<if test="tAttaInfo.createTime != null">
AND a.create_time = #{tAttaInfo.createTime}
</if>
<if test="tAttaInfo.relationType != null and tAttaInfo.relationType.trim() != ''">
AND a.relation_type = #{tAttaInfo.relationType}
</if>
<if test="tAttaInfo.domainId != null and tAttaInfo.domainId.trim() != ''">
AND a.domain_id = #{tAttaInfo.domainId}
</if>
</if>
</sql>
<!--tAttaInfo简单分页查询-->
<select id="getTAttaInfoPage" resultMap="tAttaInfoMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_atta_info a
<where>
1=1
<include refid="tAttaInfo_where"/>
</where>
</select>
<!--tAttaInfo 获取list-->
<select id="getTAttaInfoList" resultMap="tAttaInfoMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_atta_info a
<where>
1=1
<include refid="tAttaInfo_where"/>
</where>
</select>
<!--根据domainId 获取list-->
<select id="getTAttaInfoListByDoMainId" resultMap="tAttaInfoMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_atta_info a
where a.domain_id = #{domainId}
</select>
<select id="getKeenAtta" resultMap="tAttaInfoMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_atta_info a
<where>
1=1
<if test="values != null and values.size() > 0">
and a.domain_id in
<foreach collection="values" item="param" index="index" open="(" close=")" separator=",">
#{param}
</foreach>
</if>
and a.create_time >= #{dayStart}
and a.relation_type in ("3","4")
</where>
</select>
<update id="updateDomainId">
update t_atta_info
<trim prefix="set" suffixOverrides=",">
domain_id=#{domainId}
</trim>
WHERE
<if test="ids != null and ids.size() > 0">
id in
<foreach collection="ids" item="param" index="index" open="(" close=")" separator=",">
#{param}
</foreach>
</if>
</update>
<select id="getAttaByApplyId" resultMap="tAttaInfoMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_atta_info a
where EXISTS (select 1 from m_salary_prova_atta b where b.SALARY_PROVA_ID = #{applyId} and a.id = b.ATTA_ID);
</select>
<delete id="deleteByDomainId">
delete from t_atta_info where domain_id=#{domainId}
</delete>
<delete id="deleteByDomainIdAndType">
delete from t_atta_info where domain_id=#{domainId} and relation_type = #{relationType}
</delete>
<delete id="deleteByDomainIdAndOther">
delete from t_atta_info where domain_id=#{domainId} and relation_type not in ('0','2','26','27')
</delete>
</mapper>
package com.yifu.cloud.plus.v1.yifu.admin.api.vo;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser;
import lombok.Data;
import java.io.Serializable;
......@@ -26,4 +27,6 @@ public class AllUserNaVo implements Serializable {
* @Date 17:05 2022/9/19
**/
private List<String> userIds;
private HashMap<String, SysUser> allUser;
}
......@@ -342,6 +342,30 @@ public class UserController {
return naVo;
}
/**
* @return
* @Author huyc
* @Description 获取所有用户id
* @Date 10:20 2024/12/6
* @Param
**/
@Inner
@PostMapping(value = {"/inner/getAllUserIdDTO"})
public AllUserNaVo getAllUserIdDTO() {
AllUserNaVo naVo = new AllUserNaVo();
List<SysUser> sysUsers = userService.list(Wrappers.<SysUser>query().lambda()
.eq(SysUser::getDelFlag, CommonConstants.ZERO_STRING)
.eq(SysUser::getType, CommonConstants.ZERO_STRING));
if (Common.isNotEmpty(sysUsers)) {
HashMap<String, SysUser> nameMap = new HashMap<>();
for (SysUser u : sysUsers) {
nameMap.put(u.getNickname(), u);
}
naVo.setAllUser(nameMap);
}
return naVo;
}
/**
* @return
* @Author fxj
......
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