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;
/**
* 创建时间区间 [开始时间,结束时间]
*/
......
......@@ -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,7 +299,10 @@
,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
,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
......@@ -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'
......
......@@ -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();
}
......@@ -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