Commit af7b098a authored by hongguangwu's avatar hongguangwu

Merge branch 'develop'

# Conflicts:
#	yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/impl/IcbcTransactionFlowQueryServiceImpl.java
parents 56b547b4 5e3d6c0d
......@@ -24,10 +24,12 @@ 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.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import java.util.Date;
......@@ -324,4 +326,20 @@ public class TEmpContractAlert extends BaseEntity {
@Schema(description = "申请编码")
private String applyNo;
/**
* 工时制(数据字典) 1标准工时 2 综合工时 3不定时工时制
*/
@Length(max = 32, message = "工时制不能超过32个字符")
@ExcelAttribute(name = "工时制", maxLength = 32, isDataId = true, dataType = ExcelAttributeConstants.WORKING_HOURS)
@Schema(description = "工时制(数据字典) 1标准工时 2 综合工时 3不定时工时制", name = "workingHours")
private String workingHours;
/**
* 合同岗位
*/
@Length(max = 32, message = "合同岗位不能超过32个字符")
@ExcelAttribute(name = "合同岗位", maxLength = 32, needExport = true)
@Schema(description = "合同岗位", name = "post")
private String post;
}
......@@ -220,6 +220,7 @@ public class TPreEmployeeInfo extends BaseEntity {
@ExcelAttribute(name = "档案-市")
@ExcelProperty("档案-市")
@Schema(description = "档案-市")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Integer fileCity;
/**
* 档案-县
......@@ -227,6 +228,7 @@ public class TPreEmployeeInfo extends BaseEntity {
@ExcelAttribute(name = "档案-县")
@ExcelProperty("档案-县")
@Schema(description = "档案-县")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Integer fileTown;
/**
* 是否大专及以上(0否1是)
......
......@@ -12,7 +12,6 @@ import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.util.Date;
/**
* 风险管控统计
......@@ -33,10 +32,16 @@ public class TRiskMonitor extends BaseEntity {
@Schema(description = "主键")
private String id;
/**
* 项目id
*/
@Schema(description ="项目id")
private String deptId;
/**
* 结算主体名称
*/
@ExcelAttribute(name = "项目名称", isNotEmpty = true, errorInfo = "项目名称不能为空", maxLength = 50)
@ExcelAttribute(name = "项目名称")
@ExcelProperty("项目名称")
@Schema(description = "项目名称")
private String departName;
......@@ -44,7 +49,7 @@ public class TRiskMonitor extends BaseEntity {
/**
* 结算主体编码
*/
@ExcelAttribute(name = "项目编码", isNotEmpty = true, errorInfo = "项目编码不能为空", maxLength = 32)
@ExcelAttribute(name = "项目编码")
@NotBlank(message = "项目编码不能为空")
@ExcelProperty("项目编码")
@Schema(description = "项目编码")
......@@ -53,9 +58,7 @@ public class TRiskMonitor extends BaseEntity {
/**
* 项目状态:0正常 1停止服务 2 已冻结
*/
@ExcelAttribute(name = "项目状态", isNotEmpty = true, errorInfo = "项目状态不能为空", maxLength = 1)
@NotBlank(message = "项目状态:0正常 1停止服务 2 已冻结不能为空")
@Length(max = 1, message = "项目状态:0正常 1停止服务 2 已冻结不能超过1个字符")
@ExcelAttribute(name = "项目状态")
@ExcelProperty("项目状态")
@Schema(description = "项目状态:0正常 1停止服务 2 已冻结")
private String stopFlag;
......@@ -63,8 +66,7 @@ public class TRiskMonitor extends BaseEntity {
/**
* 二级指标归属
*/
@ExcelAttribute(name = "二级指标归属", maxLength = 50)
@Length(max = 50, message = "二级指标归属不能超过50个字符")
@ExcelAttribute(name = "二级指标归属")
@ExcelProperty("二级指标归属")
@Schema(description = "二级指标归属")
private String secondIndicatorBelong;
......@@ -180,7 +182,7 @@ public class TRiskMonitor extends BaseEntity {
@ExcelAttribute(name = "最后一次发薪日期", isDate = true)
@ExcelProperty("最后一次发薪日期")
@Schema(description = "最后一次发薪日期")
private Date lastSalaryTime;
private String lastSalaryTime;
/**
* 所属客户名称
......
......@@ -249,11 +249,32 @@ public class EmployeeExportVO extends BaseEntity {
@ExcelProperty(value = "减档备注")
private String leaveRemark;
/**
* 通信地址省 2024-09-26 fxj 导出添加
*/
@ExcelAttribute(name = "通信地址-省",isArea = true)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("通信地址-省")
private String contactProvince;
/**
* 通信地址市
*/
@ExcelAttribute(name = "通信地址-市",isArea = true,parentField = "contactProvince")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("通信地址-市")
private String contactCity;
/**
* 通信地址县
*/
@ExcelAttribute(name = "通信地址-区/县",isArea = true,parentField = "contactCity")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("通信地址-区/县")
private String contactTown;
/**
* 通信地址
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "通信地址")
@ExcelProperty(value = "通信地址-详细地址")
private String contactAddress;
@HeadFontStyle(fontHeightInPoints = 11)
......
......@@ -440,13 +440,33 @@ public class EmployeeProjectExportVO {
@ExcelProperty(value ="项目档案来源")
@ExcelAttribute(name = "项目档案来源", isDataId = true,dataType = ExcelAttributeConstants.PROJECT_EMP_SOURCE)
private String projectSource;
/**
* 通信地址省 2024-09-26 fxj 导出添加
*/
@ExcelAttribute(name = "通信地址-省",isArea = true)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("通信地址-省")
private String contactProvince;
/**
* 通信地址市
*/
@ExcelAttribute(name = "通信地址-市",isArea = true,parentField = "contactProvince")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("通信地址-市")
private String contactCity;
/**
* 通信地址县
*/
@ExcelAttribute(name = "通信地址-区/县",isArea = true,parentField = "contactCity")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("通信地址-区/县")
private String contactTown;
/**
* 通信地址
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="通信地址")
@ExcelAttribute(name = "通信地址")
@ExcelProperty(value ="通信地址-详细地址")
@ExcelAttribute(name = "通信地址-详细地址")
private String contactAddress;
/**
......
/*
* 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.alibaba.excel.annotation.write.style.ColumnWidth;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* 风险管控比例
*
* @author huyc
* @date 2024-09-27 15:54:40
*/
@Data
@ColumnWidth(30)
public class RiskMonitorPerVo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 总项目数
*/
@Schema(description = "总项目数")
private String deptNum;
/**
* 存在风险项目数
*/
@Schema(description = "存在风险项目数")
private String riskDeptNum;
/**
* 存在风险项目占比
*/
@Schema(description = "存在风险项目占比")
private String riskDeptPer;
/**
* 商险漏买项目数
*/
@Schema(description = "商险漏买项目数")
private String riskInsuraceNum;
/**
* 商险漏买项目占比
*/
@Schema(description = "商险漏买占比")
private String riskInsuracePer;
}
......@@ -54,7 +54,7 @@ public class TPreEmpMainVo extends RowIndex implements Serializable {
@ExcelAttribute(name = "档案所在地市", isArea = true, parentField = "fileProvince", isNotEmpty = true, errorInfo = "档案所在地市不能为空")
@ExcelProperty("档案所在地市")
private String fileCity;
@ExcelAttribute(name = "档案所在地县", isArea = true, parentField = "fileCity", isNotEmpty = true, errorInfo = "档案所在地县不能为空")
@ExcelAttribute(name = "档案所在地县", isArea = true, parentField = "fileCity", isNotEmpty = false, errorInfo = "档案所在地县不能为空")
@ExcelProperty("档案所在地县")
private String fileTown;
@ExcelAttribute(name = "计税月份")
......
......@@ -82,7 +82,13 @@ public class TPreMainExportAllVO {
private String field20;
@ExcelProperty(value = "档案状态")
private String field21;
@ExcelProperty(value = "通信地址")
@ExcelProperty(value = "通信地址-省")
private String field66;
@ExcelProperty(value = "通信地址-市")
private String field67;
@ExcelProperty(value = "通信地址-区/县")
private String field68;
@ExcelProperty(value = "通信地址-详细地址")
private String field22;
@ExcelProperty(value = "客户名称")
private String field23;
......
......@@ -21,7 +21,6 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.List;
/**
* 风险管控统计
......@@ -32,12 +31,6 @@ import java.util.List;
@Data
public class TRiskMonitorSearchVo extends TRiskMonitor {
/**
* 多选导出或删除等操作
*/
@Schema(description = "选中ID,id数组")
private List<String> idList;
/**
* 创建时间区间 [开始时间,结束时间]
*/
......
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
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;
......@@ -20,257 +19,220 @@ import java.util.Date;
* @date 2024-09-25 10:01:06
*/
@Data
public class TRiskMonitorVo extends RowIndex implements Serializable {
@HeadFontStyle(fontHeightInPoints = 11)
@ColumnWidth(15)
public class TRiskMonitorVo implements Serializable {
/**
* 主键
* 结算主体名称
*/
@TableId(type = IdType.ASSIGN_ID)
@NotBlank(message = "主键 不能为空")
@Length(max = 32, message = "主键 不能超过32 个字符")
@ExcelAttribute(name = "主键", isNotEmpty = true, errorInfo = "主键 不能为空", maxLength = 32)
@Schema(description = "主键")
@ExcelProperty("主键")
private String id;
@ExcelAttribute(name = "项目名称", isNotEmpty = true, errorInfo = "项目名称不能为空", maxLength = 50)
@ExcelProperty("项目名称")
@Schema(description = "项目名称")
private String departName;
/**
* 结算主体编码
*/
@NotBlank(message = "结算主体编码 不能为空")
@Length(max = 32, message = "结算主体编码 不能超过32 个字符")
@ExcelAttribute(name = "结算主体编码", isNotEmpty = true, errorInfo = "结算主体编码 不能为空", maxLength = 32)
@Schema(description = "结算主体编码")
@ExcelProperty("结算主体编码")
@ExcelAttribute(name = "项目编码", isNotEmpty = true, errorInfo = "项目编码不能为空", maxLength = 32)
@NotBlank(message = "项目编码不能为空")
@ExcelProperty("项目编码")
@Schema(description = "项目编码")
private String departNo;
/**
* 结算主体名称
*/
@NotBlank(message = "结算主体名称 不能为空")
@Length(max = 50, message = "结算主体名称 不能超过50 个字符")
@ExcelAttribute(name = "结算主体名称", isNotEmpty = true, errorInfo = "结算主体名称 不能为空", maxLength = 50)
@Schema(description = "结算主体名称")
@ExcelProperty("结算主体名称")
private String departName;
/**
* 项目状态:0正常 1停止服务 2 已冻结
*/
@NotBlank(message = "项目状态:0正常 1停止服务 2 已冻结 不能为空")
@Length(max = 1, message = "项目状态:0正常 1停止服务 2 已冻结 不能超过1 个字符")
@ExcelAttribute(name = "项目状态:0正常 1停止服务 2 已冻结", isNotEmpty = true, errorInfo = "项目状态:0正常 1停止服务 2 已冻结 不能为空", maxLength = 1)
@ExcelAttribute(name = "项目状态", isNotEmpty = true, errorInfo = "项目状态不能为空", maxLength = 1)
@NotBlank(message = "项目状态:0正常 1停止服务 2 已冻结不能为空")
@Length(max = 1, message = "项目状态:0正常 1停止服务 2 已冻结不能超过1个字符")
@ExcelProperty("项目状态")
@Schema(description = "项目状态:0正常 1停止服务 2 已冻结")
@ExcelProperty("项目状态:0正常 1停止服务 2 已冻结")
private String stopFlag;
/**
* 业务类型分类
*/
@Length(max = 32, message = "业务类型分类 不能超过32 个字符")
@ExcelAttribute(name = "业务类型分类", maxLength = 32)
@Schema(description = "业务类型分类")
@ExcelProperty("业务类型分类")
private String businessPrimaryType;
/**
* 业务类型二级分类
*/
@Length(max = 32, message = "业务类型二级分类 不能超过32 个字符")
@ExcelAttribute(name = "业务类型二级分类", maxLength = 32)
@Schema(description = "业务类型二级分类")
@ExcelProperty("业务类型二级分类")
private String businessSecondType;
/**
* 业务类型三级分类
*/
@Length(max = 32, message = "业务类型三级分类 不能超过32 个字符")
@ExcelAttribute(name = "业务类型三级分类", maxLength = 32)
@Schema(description = "业务类型三级分类")
@ExcelProperty("业务类型三级分类")
private String businessThirdType;
/**
* 所属客户名称
*/
@Length(max = 50, message = "所属客户名称 不能超过50 个字符")
@ExcelAttribute(name = "所属客户名称", maxLength = 50)
@Schema(description = "所属客户名称")
@ExcelProperty("所属客户名称")
private String customerName;
/**
* 所属客户编码
*/
@Length(max = 50, message = "所属客户编码 不能超过50 个字符")
@ExcelAttribute(name = "所属客户编码", maxLength = 50)
@Schema(description = "所属客户编码")
@ExcelProperty("所属客户编码")
private String customerNo;
/**
* 二级指标归属
*/
@Length(max = 50, message = "二级指标归属 不能超过50 个字符")
@ExcelAttribute(name = "二级指标归属", maxLength = 50)
@Schema(description = "二级指标归属")
@Length(max = 50, message = "二级指标归属不能超过50个字符")
@ExcelProperty("二级指标归属")
@Schema(description = "二级指标归属")
private String secondIndicatorBelong;
/**
* 条线类型
*/
@Length(max = 20, message = "条线类型 不能超过20 个字符")
@ExcelAttribute(name = "条线类型", maxLength = 20)
@Schema(description = "条线类型")
@ExcelProperty("条线类型")
private String lineType;
/**
* BU归属(0:央企BU,1:区域政府BU,2:电信事业部,3:其他)
*/
@Length(max = 20, message = "BU归属(0:央企BU,1:区域政府BU,2:电信事业部,3:其他) 不能超过20 个字符")
@ExcelAttribute(name = "BU归属(0:央企BU,1:区域政府BU,2:电信事业部,3:其他)", maxLength = 20)
@Schema(description = "BU归属(0:央企BU,1:区域政府BU,2:电信事业部,3:其他)")
@ExcelProperty("BU归属(0:央企BU,1:区域政府BU,2:电信事业部,3:其他)")
private String buBelong;
/**
* 是否存在风险 0 是 1否
*/
@Length(max = 1, message = "是否存在风险 0 是 1否 不能超过1 个字符")
@ExcelAttribute(name = "是否存在风险 0 是 1否", maxLength = 1)
@ExcelAttribute(name = "是否存在风险", maxLength = 1)
@Length(max = 1, message = "是否存在风险 0 是 1否不能超过1个字符")
@ExcelProperty("是否存在风险")
@Schema(description = "是否存在风险 0 是 1否")
@ExcelProperty("是否存在风险 0 是 1否")
private String isRisk;
/**
* 可能风险点
*/
@Length(max = 100, message = "可能风险点 不能超过100 个字符")
@ExcelAttribute(name = "可能风险点", maxLength = 100)
@Schema(description = "可能风险点")
@ExcelAttribute(name = "可能风险点")
@ExcelProperty("可能风险点")
@Schema(description = "可能风险点")
private String riskType;
/**
* 在项人数
*/
@ExcelAttribute(name = "在项人数")
@Schema(description = "在项人数")
@ExcelProperty("在项人数")
@Schema(description = "在项人数")
private Integer projectNum;
/**
* 不在项人员有效合同数
*/
@ExcelAttribute(name = "不在项人员有效合同数")
@Schema(description = "不在项人员有效合同数")
@ExcelProperty("不在项人员有效合同数")
@Schema(description = "不在项人员有效合同数")
private Integer unproContractNum;
/**
* 在项人员有效合同数
*/
@ExcelAttribute(name = "在项人员有效合同数")
@Schema(description = "在项人员有效合同数")
@ExcelProperty("在项人员有效合同数")
@Schema(description = "在项人员有效合同数")
private Integer proContractNum;
/**
* 不在项人员有效商险数
*/
@ExcelAttribute(name = "不在项人员有效商险数")
@Schema(description = "不在项人员有效商险数")
@ExcelProperty("不在项人员有效商险数")
@ExcelAttribute(name = "不在项人员商险在保人数")
@ExcelProperty("不在项人员商险在保人数")
@Schema(description = "不在项人员商险在保人数")
private Integer unproInsuranceNum;
/**
* 在项人员有效商险
* 在项人员商险在保人
*/
@ExcelAttribute(name = "在项人员有效商险数")
@Schema(description = "在项人员有效商险数")
@ExcelProperty("在项人员有效商险数")
@ExcelAttribute(name = "在项人员商险在保人数")
@ExcelProperty("在项人员商险在保人数")
@Schema(description = "在项人员商险在保人数")
private Integer proInsuranceNum;
/**
* 不在项人员有效社保
* 不在项人员社保在保人
*/
@ExcelAttribute(name = "不在项人员有效社保数")
@Schema(description = "不在项人员有效社保数")
@ExcelProperty("不在项人员有效社保数")
@ExcelAttribute(name = "不在项人员社保在保人数")
@ExcelProperty("不在项人员社保在保人数")
@Schema(description = "不在项人员社保在保人数")
private Integer unproSocialNum;
/**
* 在项人员有效社保
* 在项人员社保在保人
*/
@ExcelAttribute(name = "在项人员有效社保数")
@Schema(description = "在项人员有效社保数")
@ExcelProperty("在项人员有效社保数")
@ExcelAttribute(name = "在项人员社保在保人数")
@ExcelProperty("在项人员社保在保人数")
@Schema(description = "在项人员社保在保人数")
private Integer proSocialNum;
/**
* 不在项人员有效公积金
* 不在项人员公积金购买人
*/
@ExcelAttribute(name = "不在项人员有效公积金数")
@Schema(description = "不在项人员有效公积金数")
@ExcelProperty("不在项人员有效公积金数")
@ExcelAttribute(name = "不在项人员公积金购买人数")
@ExcelProperty("不在项人员公积金购买人数")
@Schema(description = "不在项人员公积金购买人数")
private Integer unproFundNum;
/**
* 在项人员有效公积金
* 在项人员公积金购买人
*/
@ExcelAttribute(name = "在项人员有效公积金数")
@Schema(description = "在项人员有效公积金数")
@ExcelProperty("在项人员有效公积金数")
@ExcelAttribute(name = "在项人员公积金购买人数")
@ExcelProperty("在项人员公积金购买人数")
@Schema(description = "在项人员公积金购买人数")
private Integer proFundNum;
/**
* 不在项人员有效发薪数
*/
@ExcelAttribute(name = "不在项人员有效发薪数")
@Schema(description = "不在项人员有效发薪数")
@ExcelProperty("不在项人员有效发薪数")
@ExcelAttribute(name = "不在项人员最后一次发薪人数")
@ExcelProperty("不在项人员最后一次发薪人数")
@Schema(description = "不在项人员最后一次发薪人数")
private Integer unproSalaryNum;
/**
* 在项人员有效发薪数
*/
@ExcelAttribute(name = "在项人员有效发薪数")
@Schema(description = "在项人员有效发薪数")
@ExcelProperty("在项人员有效发薪数")
@ExcelAttribute(name = "在项人员最后一次发薪人数")
@ExcelProperty("在项人员最后一次发薪人数")
@Schema(description = "在项人员最后一次发薪人数")
private Integer proSalaryNum;
/**
* 最后发薪日期
*/
@ExcelAttribute(name = "最后发薪日期", isDate = true)
@Schema(description = "最后发薪日期")
@ExcelProperty("最后发薪日期")
private Date lastSalaryTime;
@ExcelAttribute(name = "最后一次发薪日期")
@ExcelProperty("最后一次发薪日期")
@Schema(description = "最后一次发薪日期")
private String lastSalaryTime;
/**
* 所属客户名称
*/
@ExcelAttribute(name = "客户名称", maxLength = 50)
@Length(max = 50, message = "客户名称不能超过50个字符")
@ExcelProperty("客户名称")
@Schema(description = "客户名称")
private String customerName;
/**
* 是否删除(0否/1是)
* 所属客户编码
*/
@NotBlank(message = "是否删除(0否/1是) 不能为空")
@Length(max = 1, message = "是否删除(0否/1是) 不能超过1 个字符")
@ExcelAttribute(name = "是否删除(0否/1是)", isNotEmpty = true, errorInfo = "是否删除(0否/1是) 不能为空", maxLength = 1)
@Schema(description = "是否删除(0否/1是)")
@ExcelProperty("是否删除(0否/1是)")
private String deleteFlag;
@ExcelAttribute(name = "客户编码", maxLength = 50)
@Length(max = 50, message = "客户编码不能超过50个字符")
@ExcelProperty("客户编码")
@Schema(description = "客户编码")
private String customerNo;
/**
* 创建人id
* 业务类型分类
*/
@NotBlank(message = "创建人id 不能为空")
@Length(max = 32, message = "创建人id 不能超过32 个字符")
@ExcelAttribute(name = "创建人id", isNotEmpty = true, errorInfo = "创建人id 不能为空", maxLength = 32)
@Schema(description = "创建人id")
@ExcelProperty("创建人id")
private String createBy;
@ExcelAttribute(name = "业务类型", maxLength = 32)
@Length(max = 32, message = "业务类型不能超过32个字符")
@ExcelProperty("业务类型")
@Schema(description = "业务类型")
private String businessPrimaryType;
/**
* 创建人姓名
* 业务类型二级分类
*/
@Length(max = 32, message = "创建人姓名 不能超过32 个字符")
@ExcelAttribute(name = "创建人姓名", maxLength = 32)
@Schema(description = "创建人姓名")
@ExcelProperty("创建人姓名")
private String createName;
@ExcelAttribute(name = "二级分类", maxLength = 32)
@Length(max = 32, message = "二级分类不能超过32个字符")
@ExcelProperty("二级分类")
@Schema(description = "二级分类")
private String businessSecondType;
/**
* 创建时间
* 业务类型三级分类
*/
@NotBlank(message = "创建时间 不能为空")
@ExcelAttribute(name = "创建时间", isNotEmpty = true, errorInfo = "创建时间 不能为空", isDate = true)
@Schema(description = "创建时间")
@ExcelProperty("创建时间")
private Date createTime;
@ExcelAttribute(name = "三级分类", maxLength = 32)
@Length(max = 32, message = "三级分类不能超过32个字符")
@ExcelProperty("三级分类")
@Schema(description = "三级分类")
private String businessThirdType;
/**
* 更新人id
* 条线类型
*/
@Length(max = 32, message = "更新人id 不能超过32 个字符")
@ExcelAttribute(name = "更新人id", maxLength = 32)
@Schema(description = "更新人id")
@ExcelProperty("更新人id")
private String updateBy;
@ExcelAttribute(name = "条线类型", maxLength = 20)
@Length(max = 20, message = "条线类型不能超过20个字符")
@ExcelProperty("条线类型")
@Schema(description = "条线类型")
private String lineType;
/**
* 更新时间
* BU归属
*/
@ExcelAttribute(name = "更新时间", isDate = true)
@Schema(description = "更新时间")
@ExcelProperty("更新时间")
private Date updateTime;
@ExcelAttribute(name = "BU归属", maxLength = 20)
@Length(max = 20, message = "BU归属不能超过20个字符")
@ExcelProperty("BU归属")
@Schema(description = "BU归属")
private String buBelong;
}
......@@ -14,7 +14,7 @@ public class EmployeeConstants {
public static final String VALIDITY_END_FORMAT = "身份证截止日期只能为日期格式:yyyy-MM-dd或者固定值:长期";
public static final String EMP_NATIONAL = "民族必填";
public static final String ID_PROVINCE = "户籍所在地必填";
public static final String FILE_PROVINCE = "档案所在地(省市)必填";
public static final String FILE_PROVINCE = "档案所在地(省市)必填";
public static final String CONTACT_PROVINCE = "通信地址(省市县)必填";
public static final String EMP_REGIS_TYPE = "户口性质必填";
public static final String IS_COLLEGE = "是否大专及以上必填";
......
......@@ -7,6 +7,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TRiskMonitorService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TRiskMonitorSearchVo;
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.security.annotation.Inner;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
......@@ -38,7 +39,6 @@ public class TRiskMonitorController {
*/
@Operation(summary = "通过id查询", description = "通过id查询:hasPermission('archives_triskmonitor_get')")
@GetMapping("/{id}")
@PreAuthorize("@pms.hasPermission('archives_triskmonitor_get')")
public R<TRiskMonitor> getById(@PathVariable("id") String id) {
return R.ok(tRiskMonitorService.getById(id));
}
......@@ -92,8 +92,30 @@ public class TRiskMonitorController {
**/
@Operation(description = "导出风险管控统计 hasPermission('archives_triskmonitor-export')")
@PostMapping("/export")
@PreAuthorize("@pms.hasPermission('archives_triskmonitor-export')")
public void export(HttpServletResponse response, @RequestBody TRiskMonitorSearchVo searchVo) {
tRiskMonitorService.listExport(response, searchVo);
}
/**
* 风险管控统计 批量生成
* @author huyc
* @date 2024-09-27 14:08:58
**/
@Operation(description = "生成风险管控统计")
@Inner
@PostMapping("/inner/createRiskMonitor")
public void createRiskMonitor(){
tRiskMonitorService.createRiskMonitor();
}
/**
* 查询风险占比
* @author huyc
* @date 2024-06-17 16:08:58
**/
@Operation(description = "查询风险占比")
@PostMapping("/selectCurrentRiskMonitor")
public R selectCurrentRiskMonitor(@RequestBody TRiskMonitorSearchVo tRiskMonitor) {
return tRiskMonitorService.selectCurrentRiskMonitor(tRiskMonitor);
}
}
......@@ -4,7 +4,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TRiskMonitor;
import com.yifu.cloud.plus.v1.yifu.archives.vo.RiskMonitorPerVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TRiskMonitorSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TRiskMonitorVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -37,5 +39,23 @@ public interface TRiskMonitorMapper extends BaseMapper<TRiskMonitor> {
* @param tRiskMonitor 风险管控统计
* @return
*/
List<TRiskMonitor> getRiskMonitorExportList(@Param("tRiskMonitor") TRiskMonitorSearchVo tRiskMonitor);
List<TRiskMonitorVo> getRiskMonitorExportList(@Param("tRiskMonitor") TRiskMonitorSearchVo tRiskMonitor);
/**
* 风险管控统计导出查询
* @return
*/
List<TRiskMonitor> selectRiskMonitorList();
/**
* 查询风险占比
* @return
*/
RiskMonitorPerVo getTRiskMonitorPer(@Param("tRiskMonitor") TRiskMonitorSearchVo tRiskMonitor);
/**
* 删除所有监控数据
* @return
*/
void deleteAllRiskMonitorInfo();
}
......@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TRiskMonitor;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TRiskMonitorSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import javax.servlet.http.HttpServletResponse;
......@@ -46,4 +47,17 @@ public interface TRiskMonitorService extends IService<TRiskMonitor> {
*/
void listExport(HttpServletResponse response, TRiskMonitorSearchVo searchVo);
/**
* 生成管控统计
* @return
*/
void createRiskMonitor();
/**
* 查询风险占比
* @return
*/
R selectCurrentRiskMonitor(TRiskMonitorSearchVo tRiskMonitor);
}
......@@ -123,6 +123,7 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
private long noPageCountDiy(ContractAlertSearchVo searchVo) {
LambdaQueryWrapper<TEmpContractAlert> wrapper = buildQueryWrapper(searchVo);
List<String> idList = Common.getList(searchVo.getIds());
wrapper.isNotNull(TEmpContractAlert::getId);
if (Common.isNotNull(idList)){
wrapper.in(TEmpContractAlert::getId,idList);
}
......@@ -407,6 +408,9 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
alert.setContractStart(contract.getContractStart());
alert.setContractEnd(contract.getContractEnd());
alert.setAuditTime(LocalDateTimeUtils.convertLDTToDate(contract.getAuditTimeLast()));
//2024-09-26 添加岗位和工时制
alert.setPost(contract.getPost());
alert.setWorkingHours(contract.getWorkingHours());
if (Common.isNotNull(contract.getFileProvince())){
alert.setFileProvince(Integer.toString(contract.getFileProvince()));
}
......
......@@ -972,7 +972,8 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
errorMsg.add(EmployeeConstants.FILE_PROVINCE);
errorMsgMap.put(lineNum, new ErrorMessage(EmployeeConstants.FILE_PROVINCE));
}
if (Common.isEmpty(employeeInfo.getFileTown())) {
//2024-09-26 fxj 档案地县选填 MVP1.6.11
if (Common.isEmpty(employeeInfo.getFileCity())) {
errorMsg.add(EmployeeConstants.FILE_PROVINCE);
errorMsgMap.put(lineNum, new ErrorMessage(EmployeeConstants.FILE_PROVINCE));
}
......@@ -1267,6 +1268,9 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
saveEmp.setPost(excel.getPost());
}
}
if (!Common.isNotNull(excel.getFileTown())) {
saveEmp.setFileTown(null);
}
saveList.add(saveEmp);
}
} else {
......@@ -1413,6 +1417,8 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
if (Common.isNotNull(excel.getFileTown())) {
saveEmp.setFileTown(Integer.parseInt(excel.getFileTown()));
}else {
saveEmp.setFileTown(null);
}
if (Common.isNotNull(excel.getIsCollege())) {
if (CommonConstants.IS_TRUE.equals(excel.getIsCollege())) {
......@@ -1961,6 +1967,8 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
if (Common.isNotNull(excel.getFileTown())) {
saveEmp.setFileTown(Integer.parseInt(excel.getFileTown()));
}else {
saveEmp.setFileTown(null);
}
// 邮箱
if (Common.isNotNull(excel.getEmpEmail())) {
......@@ -2008,9 +2016,11 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
// 档案地和通信地址 校验
if (Common.isNotNull(headMap.get("档案所在省"))
|| Common.isNotNull(headMap.get("档案所在市"))
|| Common.isNotNull(headMap.get("档案所在县"))){
if (Common.isEmpty(excel.getFileTown())) {
|| Common.isNotNull(headMap.get("档案所在市"))){
if (Common.isEmpty(excel.getFileProvince())) {
errorMsg.add(EmployeeConstants.FILE_PROVINCE);
}
if (Common.isEmpty(excel.getFileCity())) {
errorMsg.add(EmployeeConstants.FILE_PROVINCE);
}
}
......
......@@ -2044,8 +2044,9 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
try {
employee.setFileTown(Integer.parseInt(excel.getFileTown()));
} catch (Exception e) {
errorMessageList.add(new ErrorMessage<>(excel.getRowIndex(), "未找到县!"));
continue;
//errorMessageList.add(new ErrorMessage<>(excel.getRowIndex(), "未找到县!")); 2024-09-26 mvp1.6.11 预入职档案地区县选填
//continue;
throw new RuntimeException("档案地址-区/县转换异常");
}
}
tPreEmployeeInfoService.updateById(employee);
......@@ -2245,7 +2246,10 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
headList.add(this.getNewArrayList(new String[]{oneTitle, "户口性质"}));
headList.add(this.getNewArrayList(new String[]{oneTitle, "档案所在地"}));
headList.add(this.getNewArrayList(new String[]{oneTitle, "档案状态"}));
headList.add(this.getNewArrayList(new String[]{oneTitle, "通信地址"}));
headList.add(this.getNewArrayList(new String[]{oneTitle, "通信地址-省"}));
headList.add(this.getNewArrayList(new String[]{oneTitle, "通信地址-市"}));
headList.add(this.getNewArrayList(new String[]{oneTitle, "通信地址-区/县"}));
headList.add(this.getNewArrayList(new String[]{oneTitle, "通信地址-详细地址"}));
oneTitle = "在项信息";
headList.add(this.getNewArrayList(new String[]{oneTitle, "客户名称"}));
headList.add(this.getNewArrayList(new String[]{oneTitle, "项目名称"}));
......
......@@ -9,17 +9,23 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TRiskMonitor;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TRiskMonitorMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TRiskMonitorService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.RiskMonitorPerVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TRiskMonitorSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TRiskMonitorVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ClientNameConstants;
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.ExcelUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
......@@ -32,7 +38,11 @@ import java.util.List;
*/
@Log4j2
@Service
@RequiredArgsConstructor
public class TRiskMonitorServiceImpl extends ServiceImpl<TRiskMonitorMapper, TRiskMonitor> implements TRiskMonitorService {
private final MenuUtil menuUtil;
/**
* 风险管控统计简单分页查询
*
......@@ -41,29 +51,41 @@ public class TRiskMonitorServiceImpl extends ServiceImpl<TRiskMonitorMapper, TRi
*/
@Override
public IPage<TRiskMonitor> getTRiskMonitorPage(Page<TRiskMonitor> page, TRiskMonitorSearchVo tRiskMonitor) {
YifuUser user = SecurityUtils.getUser();
long roleId = 1839501715787390978L;
boolean isSsc = this.haveRole(user, roleId);
if (!isSsc) {
menuUtil.setAuthSql(user, tRiskMonitor);
}
return baseMapper.getTRiskMonitorPage(page, tRiskMonitor);
}
/**
* 风险管控统计批量导出
*
* @param searchVo 风险管控统计
* @return
*/
@Override
public void listExport(HttpServletResponse response, TRiskMonitorSearchVo searchVo) {
String fileName = "风险管控统计批量导出" + DateUtil.getThisTime() + ".xlsx";
YifuUser user = SecurityUtils.getUser();
long roleId = 1839501715787390978L;
boolean isSsc = this.haveRole(user, roleId);
if (!isSsc) {
menuUtil.setAuthSql(user, searchVo);
}
String fileName = "运营风险管控" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<TRiskMonitor> list = new ArrayList<>();
List<TRiskMonitorVo> list = new ArrayList<>();
//获取要导出的数量
long count = baseMapper.getTRiskMonitorExportCount(searchVo);
ServletOutputStream out = null;
try {
out = response.getOutputStream();
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, CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, TRiskMonitor.class).build();
ExcelWriter excelWriter = EasyExcel.write(out, TRiskMonitorVo.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
......@@ -71,12 +93,6 @@ public class TRiskMonitorServiceImpl extends ServiceImpl<TRiskMonitorMapper, TRi
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = baseMapper.getRiskMonitorExportList(searchVo);
if (Common.isNotNull(list)) {
ExcelUtil<TRiskMonitor> util = new ExcelUtil<>(TRiskMonitor.class);
for (TRiskMonitor vo : list) {
util.convertEntity(vo, null, null, null);
}
}
if (Common.isNotNull(list)) {
WriteSheet writeSheet = EasyExcel.writerSheet("运营风险管控" + index).build();
excelWriter.write(list, writeSheet);
......@@ -97,14 +113,47 @@ public class TRiskMonitorServiceImpl extends ServiceImpl<TRiskMonitorMapper, TRi
excelWriter.finish();
} catch (Exception e) {
log.error("执行异常", e);
} finally {
try {
if (null != out) {
out.close();
}
} catch (IOException e) {
log.error("执行异常", e);
}
}
/**
* 风险管控统计批量生成
* @return
*/
@Override
public void createRiskMonitor() {
//批量删除之前生成的管控统计
baseMapper.deleteAllRiskMonitorInfo();
//批量生成统计数据
List<TRiskMonitor> list = baseMapper.selectRiskMonitorList();
if (!list.isEmpty()) {
this.saveBatch(list);
}
}
/**
* 查询风险占比
* @return
*/
@Override
public R selectCurrentRiskMonitor(TRiskMonitorSearchVo tRiskMonitor) {
YifuUser user = SecurityUtils.getUser();
long roleId = 1839501715787390978L;
boolean isSsc = this.haveRole(user, roleId);
if (!isSsc) {
menuUtil.setAuthSql(user, tRiskMonitor);
}
RiskMonitorPerVo RiskMonitorPerVo = baseMapper.getTRiskMonitorPer(tRiskMonitor);
return R.ok(RiskMonitorPerVo);
}
public boolean haveRole(YifuUser user, long roleId) {
List<Long> roleList = user.getClientRoleMap().get(ClientNameConstants.CLIENT_MVP);
for (Long role : roleList) {
if (role == roleId) {
return true;
}
}
return false;
}
}
......@@ -55,8 +55,8 @@
<result property="feedbackDetail" column="FEEDBACK_DATAIL"/>
<result property="contractId" column="CONTRACT_ID"/>
<result property="applyNo" column="APPLY_NO"/>
<result property="workingHours" column="WORKING_HOURS"/>
<result property="post" column="POST"/>
</resultMap>
<update id="truncate">
TRUNCATE t_emp_contract_alert
......@@ -78,7 +78,9 @@
a.EMP_NAME,
a.PROJECT_NO,
a.APPLY_NO,
a.EMP_IDCARD
a.EMP_IDCARD,
a.WORKING_HOURS,
a.post
from t_emp_contract_alert a
where a.EMP_IDCARD in
<foreach item="idStr" index="index" collection="idCardList" open="(" separator="," close=")">
......
......@@ -131,6 +131,9 @@
<result property="salaryStatus" column="SALARY_STATUS"/>
<result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="contactProvince" column="CONTACT_PROVINCE"/>
<result property="contactCity" column="CONTACT_CITY"/>
<result property="contactTown" column="CONTACT_TOWN"/>
<result property="contactAddress" column="CONTACT_ADDRESS"/>
<result property="unitName" column="UNIT_NAME"/>
......@@ -1052,6 +1055,9 @@
CASE WHEN a.`STATUS`=0 THEN "草稿"
WHEN a.`STATUS` =1 THEN "已审核"
ELSE a.`STATUS` END as "STATUS", # 0=草稿,1=已审核
a7.AREA_NAME as "CONTACT_PROVINCE",
a8.AREA_NAME as "CONTACT_CITY",
a9.AREA_NAME as "CONTACT_TOWN",
a.CONTACT_ADDRESS,
p.IS_PROJECTS ,
p.DEPT_NAME,
......@@ -1064,6 +1070,9 @@
LEFT JOIN sys_area a4 on a4.id=a.FILE_PROVINCE
LEFT JOIN sys_area a5 on a5.id=a.FILE_CITY
LEFT JOIN sys_area a6 on a6.id=a.FILE_TOWN
LEFT JOIN sys_area a7 on a7.id=a.CONTACT_PROVINCE
LEFT JOIN sys_area a8 on a8.id=a.CONTACT_CITY
LEFT JOIN sys_area a9 on a9.id=a.CONTACT_TOWN
LEFT JOIN view_project p on a.EMP_IDCARD=p.EMP_IDCARD
<where>
a.DELETE_FLAG = '0'
......
......@@ -118,6 +118,9 @@
<result property="contractStatus" column="CONTRACT_STATUS"/>
<result property="empLabel" column="EMP_LABEL"/>
<result property="contractParty" column="CONTRACT_PARTY"/>
<result property="contactProvince" column="CONTACT_PROVINCE"/>
<result property="contactCity" column="CONTACT_CITY"/>
<result property="contactTown" column="CONTACT_TOWN"/>
<result property="contactAddress" column="contact_address"/>
</resultMap>
......@@ -850,7 +853,11 @@
<!--tEmployeeInfo导出查询改造 fxj 2022-11-03-->
<select id="noPageDiy" resultMap="tEmployeeProjectExportMap">
SELECT
<include refid="Base_Export_List"/>,b.contact_address
<include refid="Base_Export_List"/>,
a10.AREA_NAME as "CONTACT_PROVINCE",
a11.AREA_NAME as "CONTACT_CITY",
a12.AREA_NAME as "CONTACT_TOWN",
b.contact_address
FROM t_employee_project a
left join t_employee_info b on a.EMP_ID = b.id
LEFT JOIN (
......@@ -871,6 +878,9 @@
LEFT JOIN sys_area a7 on a7.id=a.SOCIAL_PROVINCE
LEFT JOIN sys_area a8 on a8.id=a.SOCIAL_CITY
LEFT JOIN sys_area a9 on a9.id=a.SOCIAL_TOWN
LEFT JOIN sys_area a10 on a10.id=b.CONTACT_PROVINCE
LEFT JOIN sys_area a11 on a11.id=b.CONTACT_CITY
LEFT JOIN sys_area a12 on a12.id=b.CONTACT_TOWN
<where>
a.DELETE_FLAG = '0'
<include refid="exportTEmployeeProject_where"/>
......
......@@ -299,8 +299,11 @@
,if(e.VALIDITY_END > '2999-12-30','长期',e.VALIDITY_END) field10,e.EMP_BIRTHDAY field11,e.EMP_AGE field12 ,emp_married.label field13,nation.label field14
,politicalStatus.label field15,e.EMP_PHONE field16,e.EMP_EMAIL field17
,concat(ifnull(pi.AREA_NAME,''),ifnull(ci.AREA_NAME,''),ifnull(ti.AREA_NAME,'')) field18 ,registype.label field19
,concat(ifnull(pf.AREA_NAME,''),ifnull(cf.AREA_NAME,''),ifnull(tf.AREA_NAME,'')) field20 ,if(e.status=0,'草稿','已审核') field21
,e.CONTACT_ADDRESS field22,p.UNIT_NAME field23,p.DEPT_NAME field24
,concat(ifnull(pf.AREA_NAME,''),ifnull(cf.AREA_NAME,''),ifnull(tf.AREA_NAME,'')) field20 ,if(e.status=0,'草稿','已审核') field21,
cp.AREA_NAME as "field66",
cc.AREA_NAME as "field67",
ct.AREA_NAME as "field68"
,e.CONTACT_ADDRESS field22,p.UNIT_NAME field23,p.DEPT_NAME field24
,concat(p.BUSINESS_PRIMARY_TYPE,'-',ifnull(p.BUSINESS_SECOND_TYPE,''),'-',ifnull(p.BUSINESS_THIRD_TYPE,'')) field25
,contractType.label field26 ,workingHours.label field27,p.POST field28,p.ENJOIN_DATE field29
,p.TRY_PERIOD field30,p.EMP_LABEL field31
......@@ -329,6 +332,11 @@
left join sys_area pf on pf.id=e.FILE_PROVINCE
left join sys_area cf on cf.id=e.FILE_CITY
left join sys_area tf on tf.id=e.FILE_TOWN
left join sys_area cp on cp.id=e.CONTACT_PROVINCE
left join sys_area cc on cc.id=e.CONTACT_CITY
left join sys_area ct on ct.id=e.CONTACT_TOWN
left join t_pre_employee_project p on a.id=p.PRE_MAIN_ID
left join view_sys_dict_item contractType on contractType.value=p.CONTRACT_TYPE and contractType.type='personnel_type'
left join view_sys_dict_item workingHours on workingHours.value=p.WORKING_HOURS and workingHours.type='working_hours'
......
......@@ -5,6 +5,7 @@
<mapper namespace="com.yifu.cloud.plus.v1.yifu.archives.mapper.TRiskMonitorMapper">
<resultMap id="tRiskMonitorMap" type="com.yifu.cloud.plus.v1.yifu.archives.entity.TRiskMonitor">
<id property="id" column="ID"/>
<result property="deptId" column="DEPT_ID"/>
<result property="departNo" column="DEPART_NO"/>
<result property="departName" column="DEPART_NAME"/>
<result property="stopFlag" column="STOP_FLAG"/>
......@@ -37,8 +38,38 @@
<result property="updateBy" column="UPDATE_BY"/>
<result property="updateTime" column="UPDATE_TIME"/>
</resultMap>
<resultMap id="tRiskMonitorExportMap" type="com.yifu.cloud.plus.v1.yifu.archives.vo.TRiskMonitorVo">
<result property="departNo" column="DEPART_NO"/>
<result property="departName" column="DEPART_NAME"/>
<result property="stopFlag" column="STOP_FLAG"/>
<result property="businessPrimaryType" column="BUSINESS_PRIMARY_TYPE"/>
<result property="businessSecondType" column="BUSINESS_SECOND_TYPE"/>
<result property="businessThirdType" column="BUSINESS_THIRD_TYPE"/>
<result property="customerName" column="CUSTOMER_NAME"/>
<result property="customerNo" column="CUSTOMER_NO"/>
<result property="secondIndicatorBelong" column="SECOND_INDICATOR_BELONG"/>
<result property="lineType" column="LINE_TYPE"/>
<result property="buBelong" column="BU_BELONG"/>
<result property="isRisk" column="IS_RISK"/>
<result property="riskType" column="RISK_TYPE"/>
<result property="projectNum" column="PROJECT_NUM"/>
<result property="unproContractNum" column="UNPRO_CONTRACT_NUM"/>
<result property="proContractNum" column="PRO_CONTRACT_NUM"/>
<result property="unproInsuranceNum" column="UNPRO_INSURANCE_NUM"/>
<result property="proInsuranceNum" column="PRO_INSURANCE_NUM"/>
<result property="unproSocialNum" column="UNPRO_SOCIAL_NUM"/>
<result property="proSocialNum" column="PRO_SOCIAL_NUM"/>
<result property="unproFundNum" column="UNPRO_FUND_NUM"/>
<result property="proFundNum" column="PRO_FUND_NUM"/>
<result property="unproSalaryNum" column="UNPRO_SALARY_NUM"/>
<result property="proSalaryNum" column="PRO_SALARY_NUM"/>
<result property="lastSalaryTime" column="LAST_SALARY_TIME"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.DEPT_ID,
a.DEPART_NO,
a.DEPART_NAME,
a.STOP_FLAG,
......@@ -51,7 +82,7 @@
a.LINE_TYPE,
a.BU_BELONG,
a.IS_RISK,
a.RISK_TYPE,
substring(a.risk_type,1,CHAR_LENGTH(a.risk_type) -2) risk_type,
a.PROJECT_NUM,
a.UNPRO_CONTRACT_NUM,
a.PRO_CONTRACT_NUM,
......@@ -71,14 +102,19 @@
a.UPDATE_BY,
a.UPDATE_TIME
</sql>
<select id="getTRiskMonitorPage" resultMap="tRiskMonitorMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_risk_monitor a
<where>
a.DELETE_FLAG = '0'
<include refid="tRiskMonitor_where"/>
</where>
</select>
<!--tRiskMonitor简单分页查询-->
<sql id="tRiskMonitor_where">
<if test="tRiskMonitor != null">
<if test="idList != null">
AND a.id in
<foreach item="idStr" index="index" collection="idList" open="(" separator="," close=")">
#{idStr}
</foreach>
</if>
<if test="tRiskMonitor.id != null and tRiskMonitor.id.trim() != ''">
AND a.ID = #{tRiskMonitor.id}
</if>
......@@ -121,20 +157,12 @@
<if test="tRiskMonitor.riskType != null and tRiskMonitor.riskType.trim() != ''">
AND a.RISK_TYPE regexp #{tRiskMonitor.riskType}
</if>
<if test="tRiskMonitor.authSql != null and tRiskMonitor.authSql.trim() != ''">
${tRiskMonitor.authSql}
</if>
</if>
</sql>
<!--tRiskMonitor简单分页查询-->
<select id="getTRiskMonitorPage" resultMap="tRiskMonitorMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_risk_monitor a
<where>
a.DELETE_FLAG = '0'
<include refid="tRiskMonitor_where"/>
</where>
</select>
<select id="getTRiskMonitorExportCount" resultType="java.lang.Long">
SELECT
count(1)
......@@ -146,7 +174,7 @@
</select>
<!--tRiskMonitor导出查询-->
<select id="getRiskMonitorExportList" resultMap="tRiskMonitorMap">
<select id="getRiskMonitorExportList" resultMap="tRiskMonitorExportMap">
SELECT
a.DEPART_NAME,
a.DEPART_NO,
......@@ -158,7 +186,7 @@
CASE WHEN a.IS_RISK=0 THEN "是"
WHEN a.IS_RISK =1 THEN "否"
ELSE a.IS_RISK END as IS_RISK,
a.RISK_TYPE,
substring(a.risk_type,1,CHAR_LENGTH(a.risk_type) -2) risk_type,
a.PROJECT_NUM,
a.UNPRO_CONTRACT_NUM,
a.PRO_CONTRACT_NUM,
......@@ -183,5 +211,332 @@
a.DELETE_FLAG = '0'
<include refid="tRiskMonitor_where"/>
</where>
<if test="tRiskMonitor.limitStart != null">
limit #{tRiskMonitor.limitStart},#{tRiskMonitor.limitEnd}
</if>
</select>
<!--tRiskMonitor批量生成-->
<select id="selectRiskMonitorList" resultMap="tRiskMonitorMap">
SELECT
A.id AS DEPT_ID,
a.STOP_FLAG,
a.DEPART_NAME,
a.DEPART_NO,
ifnull( a.SECOND_INDICATOR_BELONG, '' ) SECOND_INDICATOR_BELONG,
a.CUSTOMER_NAME,
a.CUSTOMER_NO,
ifnull( a.BUSINESS_SECOND_TYPE, '' ) BUSINESS_SECOND_TYPE,
ifnull( a.BUSINESS_PRIMARY_TYPE, '' ) BUSINESS_PRIMARY_TYPE,
ifnull( a.BUSINESS_THIRD_TYPE, '' ) BUSINESS_THIRD_TYPE,
ifnull( a.BU_BELONG, '' ) BU_BELONG,
ifnull( a.LINE_TYPE, '' ) LINE_TYPE,
CONCAT(
IF
( ifnull( pro.countPer, 0 ) > ifnull( q.onContractNum, 0 ), '合同漏签 / ', '' ),
IF
( ifnull( ht.countContract, 0 ) - ifnull( q.onContractNum, 0 ) > 0, '合同漏减 / ', '' ),
IF
( ifnull( pro.countPer, 0 ) > ifnull( r.onInsuranceNum, 0 ), '商险漏买 / ', '' ),
IF
( ifnull( sx.countInsurance, 0 ) - ifnull( r.onInsuranceNum, 0 ) > 0, '商险多买 / ', '' ),
IF
( ifnull( pro.countPer, 0 ) > ifnull( w.onSocialNum, 0 ), '社保漏买 / ', '' ),
IF
( ifnull( so.countSocial, 0 ) - ifnull( w.onSocialNum, 0 ) > 0, '社保多买 / ', '' ),
IF
( ifnull( pro.countPer, 0 ) > ifnull( e.onFundNum, 0 ), '公积金漏买 / ', '' ),
IF
( ifnull( fu.countFund, 0 ) - ifnull( e.onFundNum, 0 ) > 0, '公积金多买 / ', '' ),
IF
( ifnull( pro.countPer, 0 ) > ifnull( t.onSalaryNum, 0 ), '工资漏发 / ', '' ),
IF
( ifnull( sa.countSalary, 0 ) - ifnull( t.onSalaryNum, 0 ) > 0, '工资多发 / ', '' )
) RISK_TYPE,
IF
(
length(
CONCAT(
IF
( ifnull( pro.countPer, 0 ) > ifnull( q.onContractNum, 0 ), '合同漏签 / ', '' ),
IF
( ifnull( ht.countContract, 0 ) - ifnull( q.onContractNum, 0 ) > 0, '合同漏减 / ', '' ),
IF
( ifnull( pro.countPer, 0 ) > ifnull( r.onInsuranceNum, 0 ), '商险漏买 / ', '' ),
IF
( ifnull( sx.countInsurance, 0 ) - ifnull( r.onInsuranceNum, 0 ) > 0, '商险多买 / ', '' ),
IF
( ifnull( pro.countPer, 0 ) > ifnull( w.onSocialNum, 0 ), '社保漏买 / ', '' ),
IF
( ifnull( so.countSocial, 0 ) - ifnull( w.onSocialNum, 0 ) > 0, '社保多买 / ', '' ),
IF
( ifnull( pro.countPer, 0 ) > ifnull( e.onFundNum, 0 ), '公积金漏买 / ', '' ),
IF
( ifnull( fu.countFund, 0 ) - ifnull( e.onFundNum, 0 ) > 0, '公积金多买 / ', '' ),
IF
( ifnull( pro.countPer, 0 ) > ifnull( t.onSalaryNum, 0 ), '工资漏发 / ', '' ),
IF
( ifnull( sa.countSalary, 0 ) - ifnull( t.onSalaryNum, 0 ) > 0, '工资多发 / ', '' )
)) > 0,
'0',
'1'
) IS_RISK,
ifnull( q.onContractNum, 0 ) PRO_CONTRACT_NUM,
ifnull( w.onSocialNum, 0 ) PRO_SOCIAL_NUM,
ifnull( e.onFundNum, 0 ) PRO_FUND_NUM,
ifnull( r.onInsuranceNum, 0 ) PRO_INSURANCE_NUM,
ifnull( t.onSalaryNum, 0 ) PRO_SALARY_NUM,
ifnull( ht.countContract, 0 ) - ifnull( q.onContractNum, 0 ) UNPRO_CONTRACT_NUM,
ifnull( so.countSocial, 0 ) - ifnull( w.onSocialNum, 0 ) UNPRO_SOCIAL_NUM,
ifnull( fu.countFund, 0 ) - ifnull( e.onFundNum, 0 ) UNPRO_FUND_NUM,
ifnull( sx.countInsurance, 0 ) - ifnull( r.onInsuranceNum, 0 ) UNPRO_INSURANCE_NUM,
ifnull( sa.countSalary, 0 ) - ifnull( t.onSalaryNum, 0 ) UNPRO_SALARY_NUM,
ifnull( DATE_FORMAT( sa.CREATE_TIME, '%Y-%m-%d %H:%i:%s' ), '' ) LAST_SALARY_TIME,
ifnull( pro.countPer, 0 ) PROJECT_NUM,
'1' create_by,
'超管' create_name,
'1' UPDATE_BY
FROM
t_settle_domain a
LEFT JOIN (
SELECT
a.DEPT_NO,
count( DISTINCT a.EMP_IDCARD ) AS countContract
FROM
t_employee_contract_info a
WHERE
a.IN_USE = '0'
AND a.DELETE_FLAG = 0
AND (CONTRACT_END >= CURDATE() or (ifnull(CONTRACT_END,-1) = -1 and a.CONTRACT_TYPE = '2'))
AND length(
ifnull(a.DEPT_NO, '')) > 0
GROUP BY
a.DEPT_NO
) ht ON a.DEPART_NO = ht.DEPT_NO
LEFT JOIN (
SELECT
a.SETTLE_DOMAIN_CODE,
count( DISTINCT a.EMP_IDCARD ) AS countSocial
FROM
mvp_social.t_social_fund_info a
WHERE
a.SOCIAL_STATUS IN ( '3', '4', '9', '12' )
AND length(
ifnull( a.SETTLE_DOMAIN_CODE, '')) > 0
GROUP BY
a.SETTLE_DOMAIN_CODE
) so ON so.SETTLE_DOMAIN_CODE = a.DEPART_NO
LEFT JOIN (
SELECT
a.SETTLE_DOMAIN_CODE,
count( DISTINCT a.EMP_IDCARD ) AS countFund
FROM
mvp_social.t_social_fund_info a
WHERE
a.fund_STATUS IN ( '3', '8' )
AND length(
ifnull( a.SETTLE_DOMAIN_CODE, '')) > 0
GROUP BY
a.SETTLE_DOMAIN_CODE
) fu ON fu.SETTLE_DOMAIN_CODE = a.DEPART_NO
LEFT JOIN (
SELECT
a.DEPT_NO,
count( DISTINCT a.EMP_IDCARD_NO ) AS countInsurance
FROM
mvp_insurances.t_insurance_detail a
WHERE
a.IS_USE = 0
AND IS_EFFECT = 0
AND a.IS_OVERDUE = 0
AND a.DELETE_FLAG = 0
AND length(
ifnull( a.DEPT_NO, '')) > 0
GROUP BY
a.DEPT_NO
) sx ON a.DEPART_NO = sx.DEPT_NO
LEFT JOIN (
SELECT
count( DISTINCT acc.EMP_IDCARD ) AS countSalary,
lll.CREATE_TIME,
lll.DEPT_NO
FROM
mvp_salary.t_salary_standard lll
LEFT JOIN mvp_salary.t_salary_account acc ON lll.id = acc.SALARY_FORM_ID
AND acc.DELETE_FLAG = 0
WHERE
lll.id IN (
SELECT
b.id
FROM
(
SELECT
a.DEPT_NO,
a.id,
max( a.CREATE_TIME ) CREATE_TIME
FROM
mvp_salary.t_salary_standard a
WHERE
a.DELETE_FLAG = 0
AND length(
ifnull( a.DEPT_NO, '')) > 0
GROUP BY
a.DEPT_NO
) hh
INNER JOIN mvp_salary.t_salary_standard b ON hh.DEPT_NO = b.DEPT_NO
AND hh.CREATE_TIME = b.CREATE_TIME
)
GROUP BY
lll.id
) sa ON a.DEPART_NO = sa.DEPT_NO
LEFT JOIN (
SELECT
a.DEPT_NO,
a.EMP_IDCARD,
count( DISTINCT a.EMP_IDCARD ) countPer
FROM
t_employee_project a
WHERE
a.PROJECT_STATUS = 0
AND a.DELETE_FLAG = '0'
GROUP BY
a.DEPT_NO
) pro ON a.DEPART_NO = pro.DEPT_NO
LEFT JOIN (
SELECT
a.DEPT_NO,
count( DISTINCT a.EMP_IDCARD ) onContractNum
FROM
t_employee_contract_info a
INNER JOIN t_employee_project jj ON a.EMP_IDCARD = jj.EMP_IDCARD
AND a.DEPT_NO = jj.DEPT_NO
AND jj.PROJECT_STATUS = 0
AND jj.DELETE_FLAG = '0'
WHERE
a.IN_USE = '0'
AND (CONTRACT_END >= CURDATE() or (ifnull(CONTRACT_END,-1) = -1 and a.CONTRACT_TYPE = '2'))
AND a.DELETE_FLAG = 0
AND length(
ifnull( a.DEPT_NO, '')) > 0
GROUP BY
a.DEPT_NO
) q ON a.DEPART_NO = q.DEPT_NO
LEFT JOIN (
SELECT
a.SETTLE_DOMAIN_CODE,
count( DISTINCT a.EMP_IDCARD ) onSocialNum
FROM
mvp_social.t_social_fund_info a
INNER JOIN t_employee_project jj ON a.EMP_IDCARD = jj.EMP_IDCARD
AND a.SETTLE_DOMAIN_CODE = jj.DEPT_NO
AND jj.PROJECT_STATUS = 0
AND jj.DELETE_FLAG = '0'
WHERE
a.SOCIAL_STATUS IN ( '3', '4', '9', '12' )
AND length(
ifnull( a.SETTLE_DOMAIN_CODE, '')) > 0
GROUP BY
a.SETTLE_DOMAIN_CODE
) w ON a.DEPART_NO = w.SETTLE_DOMAIN_CODE
LEFT JOIN (
SELECT
a.SETTLE_DOMAIN_CODE,
count( DISTINCT a.EMP_IDCARD ) onFundNum
FROM
mvp_social.t_social_fund_info a
INNER JOIN t_employee_project jj ON a.EMP_IDCARD = jj.EMP_IDCARD
AND a.SETTLE_DOMAIN_CODE = jj.DEPT_NO
AND jj.PROJECT_STATUS = 0
AND jj.DELETE_FLAG = '0'
WHERE
a.fund_STATUS IN ( '3', '8' )
AND length(
ifnull( a.SETTLE_DOMAIN_CODE, '')) > 0
GROUP BY
a.SETTLE_DOMAIN_CODE
) e ON a.DEPART_NO = e.SETTLE_DOMAIN_CODE
LEFT JOIN (
SELECT
a.DEPT_NO,
count( DISTINCT a.EMP_IDCARD_NO ) onInsuranceNum
FROM
mvp_insurances.t_insurance_detail a
INNER JOIN t_employee_project jj ON a.EMP_IDCARD_NO = jj.EMP_IDCARD
AND a.DEPT_NO = jj.DEPT_NO
AND jj.PROJECT_STATUS = 0
AND jj.DELETE_FLAG = '0'
WHERE
a.IS_USE = 0
AND IS_EFFECT = 0
AND a.IS_OVERDUE = 0
AND a.DELETE_FLAG = 0
AND length(
ifnull( a.DEPT_NO, '')) > 0
GROUP BY
a.DEPT_NO
) r ON a.DEPART_NO = r.DEPT_NO
LEFT JOIN (
SELECT
count( DISTINCT acc.EMP_IDCARD ) AS onSalaryNum,
lll.DEPT_NO
FROM
mvp_salary.t_salary_standard lll
LEFT JOIN mvp_salary.t_salary_account acc ON lll.id = acc.SALARY_FORM_ID
AND acc.DELETE_FLAG = 0
INNER JOIN t_employee_project jj ON acc.EMP_IDCARD = jj.EMP_IDCARD
AND lll.DEPT_NO = jj.DEPT_NO
AND jj.PROJECT_STATUS = 0
AND jj.DELETE_FLAG = '0'
WHERE
lll.id IN (
SELECT
b.id
FROM
(
SELECT
a.DEPT_NO,
a.id,
max( a.CREATE_TIME ) CREATE_TIME
FROM
mvp_salary.t_salary_standard a
WHERE
a.DELETE_FLAG = 0
AND length(
ifnull( a.DEPT_NO, '')) > 0
GROUP BY
a.DEPT_NO
) hh
INNER JOIN mvp_salary.t_salary_standard b ON hh.DEPT_NO = b.DEPT_NO
AND hh.CREATE_TIME = b.CREATE_TIME
)
GROUP BY
lll.DEPT_NO,
lll.id
) t ON a.DEPART_NO = t.DEPT_NO
WHERE
a.DELETE_FLAG = '0'
GROUP BY
a.DEPART_NO
</select>
<select id="getTRiskMonitorPer" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.RiskMonitorPerVo">
SELECT
count(1) as deptNum,
sum(if(IS_RISK = '0',1,0)) as riskDeptNum,
concat(round(sum(if(IS_RISK = '0',1,0)) *100/count(1),2),'%') riskDeptPer,
sum(if(PROJECT_NUM > PRO_INSURANCE_NUM,1,0)) as riskInsuraceNum,
concat(round(sum(if(PROJECT_NUM > PRO_INSURANCE_NUM,1,0))*100/count(1),2),'%') riskInsuracePer
FROM
t_risk_monitor a
where
a.DELETE_FLAG = '0' and a.STOP_FLAG = '0'
<if test="tRiskMonitor.authSql != null and tRiskMonitor.authSql.trim() != ''">
${tRiskMonitor.authSql}
</if>
</select>
<!--删除所有监控数据-->
<update id="deleteAllRiskMonitorInfo">
TRUNCATE t_risk_monitor
</update>
</mapper>
......@@ -75,6 +75,14 @@ public class TCheckMobileServiceImpl extends ServiceImpl<TCheckMobileMapper, TCh
.in(TCheckMobile::getMobile, mobileList)
.eq(TCheckMobile::getStatus, CommonConstants.ONE_STRING));
if (Common.isNotNull(checkMobiles)) {
for (TCheckMobile c : checkMobiles) {
if (CommonConstants.ONE_STRING.equals(c.getStatus())
|| CommonConstants.FOUR_STRING.equals(c.getStatus())
|| CommonConstants.FIVE_STRING.equals(c.getStatus())) {
c.setStatus(CommonConstants.ONE_STRING);
c.setMessage(c.getMessage());
}
}
existMap = checkMobiles.stream().collect(Collectors.toMap(TCheckMobile::getMobile, TCheckMobile -> TCheckMobile));
}
mobileList.removeAll(existMap.keySet());
......
......@@ -7,6 +7,7 @@ import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
......@@ -17,6 +18,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author huyc
* @date 2024-05-23 10:24:12
*/
@Log4j2
@RestController
@RequiredArgsConstructor
@RequestMapping("/icbcQuery" )
......@@ -59,6 +61,7 @@ public class IcbcTransactionFlowQueryController {
@Inner
@PostMapping("/inner/newPage")
public R getIcbcTransactionFlowInner() throws IcbcApiException {
log.info("开始交易流水查询");
return icbcTransactionFlowQueryService.getIcbcTransactionFlowNew();
}
......
......@@ -8,6 +8,7 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* 社保明细表
......@@ -39,5 +40,12 @@ public interface EkpSocialInfoMapper extends BaseMapper<EkpSocialInfo> {
* @param
* @return
*/
List<String> getAllserioNo();
List<Map<String,String>> getAllserioNo();
/**
* 获取需要拉流水的银行账户
* @param
* @return
*/
List<Map<String,String>> getAccountList();
}
......@@ -37,7 +37,9 @@ import java.text.ParseException;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
......@@ -58,6 +60,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
@Autowired
private EkpEntryProperties ekpEntryProperties;
@Override
public R getIcbcTransactionFlow() {
// //应用id 应用方私钥 网关公钥 应用方加密串
// String APP_ID = "11000000000000028685";
......@@ -115,136 +118,180 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
}
}
@Override
public R getIcbcTransactionFlowNew() throws IcbcApiException {
log.info("开始推当日新增网银到账明细条数");
String tranDate = DateUtil.getThisDay();
// 测试时改为查10天内的,上线改为查当天内的
// String beginDate = DateUtil.addDay(-10).replace("-","");
String beginDate = tranDate;
String endDate = tranDate;
return getIcbcTransactionFlowCommon(tranDate,beginDate,endDate);
}
@Override
public R getIcbcTransactionFlowYesterdayInner() throws IcbcApiException {
log.info("开始推昨日新增网银到账明细条数");
String tranDate = DateUtil.addDay(-1).replace("-","");
String beginDate = tranDate;
String endDate = tranDate;
return getIcbcTransactionFlowCommon(tranDate,beginDate,endDate);
}
//从9月12号开始执行定时任务
if (DateUtil.getCurrentDateString().compareTo("2024-09-12") < 0 ) {
return R.ok();
}
DefaultIcbcClient client = new DefaultIcbcClient(icbcConfigProperties.getAppId(), IcbcConstants.SIGN_TYPE_CA_SM_ICBC,
icbcConfigProperties.getAppPrivateKey(), IcbcConstants.CHARSET_UTF8, IcbcConstants.FORMAT_JSON, null,
null, null, icbcConfigProperties.getCaSm(), null);
client.setIcbc_ca(icbcConfigProperties.getCaSmIcbc());
MybankEnterpriseTradeQhisdRequestV1.MybankEnterpriseTradeQhisdRequestBizV1 bizContent =
new MybankEnterpriseTradeQhisdRequestV1.MybankEnterpriseTradeQhisdRequestBizV1();
MybankEnterpriseTradeQhisdRequestV1 request = new MybankEnterpriseTradeQhisdRequestV1();
/**
* 新增网银到账明细条数公共处理
*
* @author cyx
* @date 2024-09-26
* @since mvp1.6.11
*/
private R getIcbcTransactionFlowCommon(String tranDate, String beginDate, String endDate) throws IcbcApiException {
// 获取当前时间
LocalTime currentTime = LocalTime.now();
// 使用DateTimeFormatter格式化
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HHmmssSSS");
String formattedTime = currentTime.format(formatter);
bizContent.setTranDate(DateUtil.getThisDay());
bizContent.setTranTime(formattedTime);
bizContent.setTransCode("QHISD");
bizContent.setLanguage("zh_CN");
String fSeqNo = "AHWX" + System.currentTimeMillis();
bizContent.setfSeqno(fSeqNo);
bizContent.setAccountNo("1302015209250019444");
bizContent.setBeginDate(DateUtil.addDay(-10).replace("-",""));
bizContent.setEndDate(DateUtil.getThisDay());
bizContent.setDrcrf("2");
request.setServiceUrl(icbcConfigProperties.getServerUrl());
request.setBizContent(bizContent);
MybankEnterpriseTradeQhisdResponseV1 response = client.execute(request);
if(response.isSuccess()) {
//查询当天的所有入账记录数据
List<String> serioList = baseMapper.getAllserioNo();
List<MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1> list = response.getRd();
String bankName = response.getAccountName();
String bankNo = response.getAccountNo();
//获取成功后根据流水号去重和根据借贷标志02筛选出所有数据
if (!list.isEmpty()) {
List<MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1> insertList =
list.stream().filter(e-> e.getDrcrf().equals("2") && !serioList.contains(e.getOnlySequence())).collect(Collectors.toList());
//封装数据
if (!insertList.isEmpty()) {
log.error("到账明细条数:" + insertList.size());
try {
for (MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1 entry : insertList) {
EKPEntryPushParam pushParam = new EKPEntryPushParam();
initValue(entry, pushParam, bankName, bankNo);
String body = sendToEkp(pushParam);
//重试
if (StringUtils.isBlank(body)) {
sendToEkp(pushParam);
}
}
}catch (Exception e) {
log.error("到账明细数据推送失败",e);
}
DefaultIcbcClient client = new DefaultIcbcClient(icbcConfigProperties.getAppId(), IcbcConstants.SIGN_TYPE_CA_SM_ICBC,
icbcConfigProperties.getAppPrivateKey(), IcbcConstants.CHARSET_UTF8, IcbcConstants.FORMAT_JSON, null,
null, null, icbcConfigProperties.getCaSm(), null);
client.setIcbc_ca(icbcConfigProperties.getCaSmIcbc());
// 查需要获取流水的账号
List<Map<String,String>> accountList = baseMapper.getAccountList();
if (accountList.isEmpty()) {
return R.ok();
}
// 查询当天的所有入账记录数据, 查账号和流水号
List<Map<String,String>> serioList = baseMapper.getAllserioNo();
// 整理各个账户下的流水:账号为key,账户下流水号列表作为value
Map<String,List<String>> serioMapByAccount = new HashMap<>();
if (!serioList.isEmpty()) {
for(Map<String,String> serio: serioList) {
List<String> serioListByAccountOne = serioMapByAccount.get(serio.get("receiveBkNo"));
if(serioListByAccountOne == null || serioListByAccountOne.isEmpty()){
serioListByAccountOne = new ArrayList<>();
}
serioListByAccountOne.add(serio.get("onlySequence"));
serioMapByAccount.put(serio.get("receiveBkNo"),serioListByAccountOne);
}
}
return R.ok();
}
public R getIcbcTransactionFlowYesterdayInner() throws IcbcApiException {
// 账号为key,账户名称作为value
Map<String,String> accountInfoMap = new HashMap<>();
// 账号为key,账号下的流水作为value
Map<String,List<MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1>> accountRecordListMap = new HashMap<>();
//从9月13号开始执行定时任务
if (DateUtil.getCurrentDateString().compareTo("2024-09-13") <0 ) {
return R.ok();
// 定义请求工行需要的传参对象
MybankEnterpriseTradeQhisdRequestV1.MybankEnterpriseTradeQhisdRequestBizV1 bizContent;
MybankEnterpriseTradeQhisdRequestV1 request;
for(Map<String,String> accountInfo: accountList) {
bizContent = new MybankEnterpriseTradeQhisdRequestV1.MybankEnterpriseTradeQhisdRequestBizV1();
request = new MybankEnterpriseTradeQhisdRequestV1();
bizContent.setTranDate(tranDate);
bizContent.setTranTime(formattedTime);
bizContent.setTransCode("QHISD");
bizContent.setLanguage("zh_CN");
String fSeqNo = "AHWX" + System.currentTimeMillis();
bizContent.setfSeqno(fSeqNo);
bizContent.setAccountNo(accountInfo.get("bank_no"));
bizContent.setBeginDate(beginDate);
bizContent.setEndDate(endDate);
bizContent.setDrcrf("2");
request.setServiceUrl(icbcConfigProperties.getServerUrl());
request.setBizContent(bizContent);
MybankEnterpriseTradeQhisdResponseV1 response = client.execute(request);
if(response.isSuccess()) {
// 获取所有账号的流水,每个账号存一个流水
accountRecordListMap.put(accountInfo.get("bank_no"),response.getRd());
if(accountInfo.get("bank_no").equals(response.getAccountNo())){
accountInfoMap.put(accountInfo.get("bank_no"),response.getAccountName());
}
}
}
DefaultIcbcClient client = new DefaultIcbcClient(icbcConfigProperties.getAppId(), IcbcConstants.SIGN_TYPE_CA_SM_ICBC,
icbcConfigProperties.getAppPrivateKey(), IcbcConstants.CHARSET_UTF8, IcbcConstants.FORMAT_JSON, null,
null, null, icbcConfigProperties.getCaSm(), null);
client.setIcbc_ca(icbcConfigProperties.getCaSmIcbc());
MybankEnterpriseTradeQhisdRequestV1.MybankEnterpriseTradeQhisdRequestBizV1 bizContent =
new MybankEnterpriseTradeQhisdRequestV1.MybankEnterpriseTradeQhisdRequestBizV1();
MybankEnterpriseTradeQhisdRequestV1 request = new MybankEnterpriseTradeQhisdRequestV1();
// 获取当前时间
LocalTime currentTime = LocalTime.now();
// 使用DateTimeFormatter格式化
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HHmmssSSS");
String formattedTime = currentTime.format(formatter);
bizContent.setTranDate(DateUtil.addDay(-1).replace("-",""));
bizContent.setTranTime(formattedTime);
bizContent.setTransCode("QHISD");
bizContent.setLanguage("zh_CN");
String fSeqNo = "AHWX" + System.currentTimeMillis();
bizContent.setfSeqno(fSeqNo);
bizContent.setAccountNo("1302010109024596014");
bizContent.setBeginDate(DateUtil.addDay(-1).replace("-",""));
bizContent.setEndDate(DateUtil.addDay(-1).replace("-",""));
bizContent.setDrcrf("2");
request.setServiceUrl(icbcConfigProperties.getServerUrl());
request.setBizContent(bizContent);
MybankEnterpriseTradeQhisdResponseV1 response = client.execute(request);
if(response.isSuccess()) {
//查询当天的所有入账记录数据
List<String> serioList = baseMapper.getAllserioNo();
List<MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1> list = response.getRd();
String bankName = response.getAccountName();
String bankNo = response.getAccountNo();
//获取成功后根据流水号去重和根据借贷标志02筛选出所有数据
if (!list.isEmpty()) {
List<MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1> insertList =
list.stream().filter(e-> e.getDrcrf().equals("2") && !serioList.contains(e.getOnlySequence())).collect(Collectors.toList());
//封装数据
if (!insertList.isEmpty()) {
log.error("昨日新增到账明细条数:" + insertList.size());
// 重新过滤已存入【入账记录】的流水信息
if(accountRecordListMap.keySet().size()>0){
for (String account : accountRecordListMap.keySet()) {
// 获取当前账号下的流水
List<MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1> flowRecordList = accountRecordListMap.get(account);
// 获取成功后根据流水号去重和根据借贷标志02筛选出所有数据
if (!flowRecordList.isEmpty()) {
log.info("获取当前账号下的流水--明细条数:" + flowRecordList.size());
for (MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1 entry : flowRecordList) {
log.info("获取当前账号下的流水--来款单位:" + entry.getRecipName());
log.info("获取当前账号下的流水--交易类型:" + entry.getDrcrf());
log.info("获取当前账号下的流水--来款账户:" + entry.getRecipAccountNo());
log.info("获取当前账号下的流水--交易时间:" + entry.getBusiDate() + " "
+ entry.getBusiTime().replace(".",":"),DateUtil.DATETIME_PATTERN_MINUTE);
log.info("获取当前账号下的流水--流水号:" + entry.getOnlySequence());
}
// 获取当前账户下的入账记录:账号为key,账户下入账记录列表作为value
List<String> serioListByAccount = serioMapByAccount.get(account);
if(serioListByAccount == null || serioListByAccount.isEmpty()){
serioListByAccount = new ArrayList<>();
}
// 过滤出需要新增流水的数据
List<MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1> insertList = new ArrayList<>();
// 入账金额大于0再记录
for (MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1 flowRecord : flowRecordList) {
if("2".equals(flowRecord.getDrcrf())
&& flowRecord.getCreditAmount() > 0
&& !serioListByAccount.contains(flowRecord.getOnlySequence())){
insertList.add(flowRecord);
}
}
// 重新存入账号流水Map里
accountRecordListMap.put(account, insertList);
}
}
// 存入过滤后的流水信息到【入账记录】
for (String account : accountRecordListMap.keySet()) {
List<MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1> saveList = accountRecordListMap.get(account);
// 封装数据
if (saveList != null && !saveList.isEmpty()) {
String bankName = accountInfoMap.get(account);
log.info("需要存的流水到账--银行名称:" + bankName);
log.info("需要存的流水到账--明细条数:" + saveList.size());
try {
for (MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1 entry : insertList) {
for (MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1 entry : saveList) {
EKPEntryPushParam pushParam = new EKPEntryPushParam();
initValue(entry, pushParam, bankName, bankNo);
initValue(entry, pushParam, bankName, account);
String body = sendToEkp(pushParam);
//重试
// 重试一次
if (StringUtils.isBlank(body)) {
sendToEkp(pushParam);
}
}
}catch (Exception e) {
log.error("昨日新增到账明细推送失败",e);
log.error("到账明细数据推送失败",e);
}
}
}
}
return R.ok();
}
//推送数据
public String sendToEkp(EKPEntryPushParam pushParam){
private String sendToEkp(EKPEntryPushParam pushParam){
RestTemplate yourRestTemplate = new RestTemplate();
try{
String formValues = new ObjectMapper().writeValueAsString(pushParam);
......@@ -280,6 +327,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
}
}
@Override
public R querybankinfo() {
String privateKey = "4d931f6ad4331158fcc4dea23f0d71393328146e40b5f63f197b9f6ad3732f44";
......@@ -318,6 +366,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
return R.ok();
}
@Override
public R saveIcbcManagerCard() {
//应用id 应用方私钥 网关公钥 应用方加密串
String APP_ID = "11000000000000015602";
......@@ -430,7 +479,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
}
}
public void initValue(MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1 entry,
private void initValue(MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1 entry,
EKPEntryPushParam pushParam,String bankName,String bankNo) throws ParseException {
pushParam.setFd_recipName(entry.getRecipName());
pushParam.setFd_recipAccountNo(entry.getRecipAccountNo());
......
......@@ -117,13 +117,15 @@
#{sql}
</update>
<!--查询社保明细信息-->
<select id="getAllserioNo" resultType="java.lang.String">
SELECT
fd_3b573843db30ce
from ekp_79c234bf64d412294f23
where fd_3b62f3470beb30 = '1302010109024596014'
and DATE_FORMAT(fd_3aa4531d3b86e0, '%Y-%m-%d') between DATE_SUB(curdate(), INTERVAL 1 day) and DATE_ADD(now(), INTERVAL 1 day)
<!--查询当天的所有入账记录数据, 查账号和流水号-->
<select id="getAllserioNo" resultType="Map">
SELECT fd_3b573843db30ce as onlySequence,fd_3b62f3470beb30 as receiveBkNo from ekp_79c234bf64d412294f23
where DATE_FORMAT(fd_3aa4531d3b86e0, '%Y-%m-%d') between DATE_SUB(curdate(), INTERVAL 1 day) and DATE_ADD(now(), INTERVAL 1 day)
and fd_3b57f8de9df354 = '是'
</select>
<!--查询付款账户信息-->
<select id="getAccountList" resultType="Map">
select fd_3b14a2430ac214 as bank_name,fd_3b14a24376d86a as bank_no from ekp_fe8247b4cbb4b27881dd where fd_3b14a24b9adb52='启用' and fd_3b56747b811872='是';
</select>
</mapper>
......@@ -84,4 +84,13 @@ public class ArchiveTask {
SecurityConstants.FROM_IN);
log.info("-------------每日刷新档案完整监控数据-定时任务开始------------");
}
public void everyDayCreateRiskMonitor() {
log.info("-------------每日刷新运营风险管控数据------------");
HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(), daprArchivesProperties.getAppId(),
"/triskmonitor/inner/createRiskMonitor", "", Object.class,
SecurityConstants.FROM_IN);
log.info("-------------每日刷新运营风险管控数据-定时任务开始------------");
}
}
\ No newline at end of file
......@@ -140,7 +140,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
/**
* 档案-县
*/
@ExcelAttribute(name = "档案-县" ,isArea = true,parentField = "fileCity", isNotEmpty = true, errorInfo = "档案-县不能为空")
@ExcelAttribute(name = "档案-县" ,isArea = true,parentField = "fileCity", isNotEmpty = false, errorInfo = "档案-县不能为空")
@Schema(description = "档案-县" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("档案-县" )
......
......@@ -71,6 +71,9 @@ public class DictItemRedisInit {
}
SysArea temp;
for (SysArea area:allAreas){
if (Common.isNotNull(area.getStatus()) && CommonConstants.ONE_INT==area.getStatus().intValue()){
continue;
}
if (Common.isNotNull(area.getParentId()) && area.getParentId().intValue() > 0){
temp = areaMap.get(area.getParentId().toString());
redisUtil.set(CacheConstants.AREA_VALUE
......
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