Commit f2d35bd8 authored by hongguangwu's avatar hongguangwu

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

parents 19232c29 57232dab
...@@ -108,8 +108,6 @@ public interface CacheConstants { ...@@ -108,8 +108,6 @@ public interface CacheConstants {
**/ **/
String EVERYDAY_DISPATCH_CODE = "everyday_dispatch_code"; String EVERYDAY_DISPATCH_CODE = "everyday_dispatch_code";
String EVERYDAY_UNBUY_CODE = "everyday_unbuy_code";
/** /**
* 区域数据--标签 * 区域数据--标签
*/ */
......
...@@ -370,6 +370,8 @@ public interface CommonConstants { ...@@ -370,6 +370,8 @@ public interface CommonConstants {
String ID = "ID"; String ID = "ID";
String PARAM_IS_NOT_ERROR = "传参异常,请检查参数"; String PARAM_IS_NOT_ERROR = "传参异常,请检查参数";
int EXCEL_EXPORT_LIMIT = 60000; int EXCEL_EXPORT_LIMIT = 60000;
int EXCEL_EXPORT_LIMIT_NEW = 20000;
// 给量大的表导出使用 // 给量大的表导出使用
int EXCEL_EXPORT_LIMIT_3 = 30000; int EXCEL_EXPORT_LIMIT_3 = 30000;
......
...@@ -103,4 +103,14 @@ public class EkpDaprUtils { ...@@ -103,4 +103,14 @@ public class EkpDaprUtils {
public R<EkpSocialPushInfoVo> jobpushRiskInfoToEkp(List<EkpIncomeParamRisk> incomeParam) { public R<EkpSocialPushInfoVo> jobpushRiskInfoToEkp(List<EkpIncomeParamRisk> incomeParam) {
return HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/ekpriskinfo/inner/jobPushRiskInfoToEkp", JSON.toJSONString(incomeParam), EkpSocialPushInfoVo.class, SecurityConstants.FROM_IN); return HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/ekpriskinfo/inner/jobPushRiskInfoToEkp", JSON.toJSONString(incomeParam), EkpSocialPushInfoVo.class, SecurityConstants.FROM_IN);
} }
/**
* 根据事业部配置条件查找用户账号
* @author chenyuxi
* @date 2025/1/15
* @since 1.7.5
*/
public R<EkpDivisionInfoVo> getDivisionUsernameList(EkpDivisionInfoVo divisionInfoVo) {
return HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/ekpShenhepeizhi/inner/getDivisionUsernameList",divisionInfoVo, EkpDivisionInfoVo.class, SecurityConstants.FROM_IN);
}
} }
...@@ -29,7 +29,6 @@ public class ProcessDaprUtils { ...@@ -29,7 +29,6 @@ public class ProcessDaprUtils {
* @since mvp1.7.5 * @since mvp1.7.5
**/ **/
public R<ProcessVo> getProcessVoByType(String processType) { public R<ProcessVo> getProcessVoByType(String processType) {
log.error("流程类型>>processType>>{}",processType);
R<ProcessVo> processVoR = HttpDaprUtil.invokeMethodPost(daprProcessProperties.getAppUrl(),daprProcessProperties.getAppId(),"/tprocess/inner/getProcessVoByType", processType, ProcessVo.class, SecurityConstants.FROM_IN); R<ProcessVo> processVoR = HttpDaprUtil.invokeMethodPost(daprProcessProperties.getAppUrl(),daprProcessProperties.getAppId(),"/tprocess/inner/getProcessVoByType", processType, ProcessVo.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(processVoR)){ if (Common.isEmpty(processVoR)){
return R.failed("根据流程类型查询ProcessVo失败!"); return R.failed("根据流程类型查询ProcessVo失败!");
......
package com.yifu.cloud.plus.v1.yifu.ekp.vo;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @Author chenyuxi
* @Date 2022-8-31 12:02:06
* @Description 事业部审批配置
* @Version 1.0
*/
@Data
public class EkpDivisionInfoVo implements Serializable {
private String newLine;
private String division;
// 指定事业部配置表负责人标识:0事业部条线负责人;1事业部负责人;2分管副总
private String divisionIdentification;
/**
* 查事业部审批人账号列表
**/
private List<String> divisionUsernameList;
}
package com.yifu.cloud.plus.v1.ekp.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 事业部审批配置
* @author chenyuxi
* @date 2025/1/15
* @since 1.7.5
*/
@Data
@TableName("ekp_shenhepeizhi_table")
@EqualsAndHashCode()
@Schema(description = "事业部审批配置")
public class EkpShenhepeizhi {
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键")
private String fdId;
private String fdShiyebu;
private String fdTiaoxian;
}
package com.yifu.cloud.plus.v1.ekp.controller;
import com.yifu.cloud.plus.v1.ekp.service.EkpSalaryInfoService;
import com.yifu.cloud.plus.v1.ekp.service.EkpShenhepeizhiService;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpDivisionInfoVo;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
/**
* 事业部审批配置
* @author chenyuxi
* @date 2025/1/15
* @since 1.7.5
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/ekpShenhepeizhi" )
@Tag(name = "事业部审批配置")
public class TEkpShenhepeizhiController {
private final EkpShenhepeizhiService shenhepeizhiService;
@Inner
@PostMapping("/inner/getDivisionUsernameList")
public EkpDivisionInfoVo getDivisionUsernameList(@RequestBody EkpDivisionInfoVo divisionInfoVo) {
return shenhepeizhiService.getDivisionUsernameList(divisionInfoVo);
}
}
package com.yifu.cloud.plus.v1.ekp.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.ekp.entity.EkpShenhepeizhi;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 事业部审批配置
* @author chenyuxi
* @date 2025/1/15
* @since 1.7.5
*/
@Mapper
public interface EkpShenhepeizhiMapper extends BaseMapper<EkpShenhepeizhi> {
// 查事业部负责人
List<String> getDivisionLoginNameList(@Param("line") String line, @Param("division") String division);
// 查分管副总
List<String> getFuLoginNameList(@Param("line") String line, @Param("division") String division);
// 查条线人
List<String> getLineLoginNameList(@Param("line") String line, @Param("division") String division);
}
package com.yifu.cloud.plus.v1.ekp.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.ekp.entity.EkpSalaryInfo;
import com.yifu.cloud.plus.v1.ekp.entity.EkpShenhepeizhi;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpDivisionInfoVo;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam;
import org.springframework.transaction.annotation.Transactional;
import java.io.InputStream;
import java.util.List;
/**
* 事业部审批配置
* @author chenyuxi
* @date 2025/1/15
* @since 1.7.5
*/
public interface EkpShenhepeizhiService extends IService<EkpShenhepeizhi> {
EkpDivisionInfoVo getDivisionUsernameList(EkpDivisionInfoVo divisionInfoVo);
}
package com.yifu.cloud.plus.v1.ekp.service.impl;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;
import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import com.alibaba.excel.util.ListUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.ekp.entity.EkpSalaryInfo;
import com.yifu.cloud.plus.v1.ekp.entity.EkpShenhepeizhi;
import com.yifu.cloud.plus.v1.ekp.mapper.EkpSalaryInfoMapper;
import com.yifu.cloud.plus.v1.ekp.mapper.EkpShenhepeizhiMapper;
import com.yifu.cloud.plus.v1.ekp.service.EkpSalaryInfoService;
import com.yifu.cloud.plus.v1.ekp.service.EkpShenhepeizhiService;
import com.yifu.cloud.plus.v1.ekp.vo.ClaimInfotVO;
import com.yifu.cloud.plus.v1.ekp.vo.ClaimRebackInfotVO;
import com.yifu.cloud.plus.v1.ekp.vo.EkpDeptInfoVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpDivisionInfoVo;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.io.InputStream;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.*;
import java.util.stream.Collectors;
/**
//工资明细表
*
//@author huyc
//@date 2024-03-11 11:21:56
*/
@Log4j2
@Service
@RequiredArgsConstructor
public class EkpShenhepeizhiServiceImpl extends ServiceImpl<EkpShenhepeizhiMapper, EkpShenhepeizhi> implements EkpShenhepeizhiService {
@Override
public EkpDivisionInfoVo getDivisionUsernameList(EkpDivisionInfoVo divisionInfoVo) {
EkpDivisionInfoVo divisionInfoVoRes = new EkpDivisionInfoVo();
List<String> divisionUsernameList = new ArrayList<>();
// 指定事业部配置表负责人标识:0事业部条线负责人;1事业部负责人;2分管副总
if(CommonConstants.ZERO_STRING.equals(divisionInfoVo.getDivisionIdentification())){
divisionUsernameList = baseMapper.getLineLoginNameList(divisionInfoVo.getNewLine(), divisionInfoVo.getDivision());
}
if(CommonConstants.ONE_STRING.equals(divisionInfoVo.getDivisionIdentification())){
divisionUsernameList = baseMapper.getDivisionLoginNameList(divisionInfoVo.getNewLine(), divisionInfoVo.getDivision());
}
if(CommonConstants.TWO_STRING.equals(divisionInfoVo.getDivisionIdentification())){
divisionUsernameList = baseMapper.getFuLoginNameList(divisionInfoVo.getNewLine(), divisionInfoVo.getDivision());
}
divisionInfoVoRes.setDivisionUsernameList(divisionUsernameList);
return divisionInfoVoRes;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.ekp.mapper.EkpShenhepeizhiMapper">
<!--查询项目信息-->
<select id="getDivisionLoginNameList" resultType="string">
select du.fd_login_name as loginName from ekp_shenhepeizhi_table a
LEFT JOIN ekporg_1927fe1d4d35e2548a3e d on d.fd_parent_id = a.fd_id
LEFT JOIN sys_org_person du on du.fd_id = d.sys_org_person_id
where a.fd_tiaoxian = #{line} and a.fd_shiyebu = #{division}
</select>
<!--查询项目信息-->
<select id="getFuLoginNameList" resultType="string">
select fu.fd_login_name as loginName from ekp_shenhepeizhi_table a
LEFT JOIN ekporg_1927fe509c6554968429 f on f.fd_parent_id = a.fd_id
LEFT JOIN sys_org_person fu on fu.fd_id = f.sys_org_person_id
where a.fd_tiaoxian = #{line} and a.fd_shiyebu = #{division}
</select>
<!--查询项目信息-->
<select id="getLineLoginNameList" resultType="string">
select lu.fd_login_name as loginName from ekp_shenhepeizhi_table a
LEFT JOIN ekporg_1927fe1d4d389080b7a7 l on l.fd_parent_id = a.fd_id
LEFT JOIN sys_org_person lu on lu.fd_id = l.sys_org_person_id
where a.fd_tiaoxian = #{line} and a.fd_shiyebu = #{division}
</select>
</mapper>
...@@ -51,25 +51,25 @@ public abstract class AbastractAuditProcess<T,E extends T> { ...@@ -51,25 +51,25 @@ public abstract class AbastractAuditProcess<T,E extends T> {
private ProcessDaprUtils processDaprUtils; private ProcessDaprUtils processDaprUtils;
@Autowired @Autowired
private UpmsDaprUtils upmsDaprUtils; protected UpmsDaprUtils upmsDaprUtils;
/** /**
* 审核成功并结束逻辑 * 审核成功并结束逻辑
* @param entity 业务实体 * @param entity 业务实体
* @param approvalRecord 审批记录 * @param auditRecord 审批记录
* @param loginUser 当前登录用户 * @param loginUser 当前登录用户
* @return R<String> * @return R<String>
**/ **/
abstract public R<String> auditSuccess(T entity, TAuditRecord approvalRecord, YifuUser loginUser); abstract public R<String> auditSuccess(T entity, TAuditRecord auditRecord, YifuUser loginUser);
/** /**
* 审核成功并结束逻辑 * 审核成功并结束逻辑
* @param entity 业务实体 * @param entity 业务实体
* @param approvalRecord 审批记录 * @param auditRecord 审批记录
* @param remoteSysUserList 当前登录用户 * @param remoteSysUserList 当前登录用户
* @return R<String> * @return R<String>
**/ **/
abstract public R<String> auditSuccessAndNex(T entity, List<SysUser> remoteSysUserList, TAuditRecord approvalRecord); abstract public R<String> auditSuccessAndNex(T entity, List<SysUser> remoteSysUserList, TAuditRecord auditRecord);
/** /**
* 审核不通过处理逻辑 * 审核不通过处理逻辑
...@@ -116,7 +116,7 @@ public abstract class AbastractAuditProcess<T,E extends T> { ...@@ -116,7 +116,7 @@ public abstract class AbastractAuditProcess<T,E extends T> {
* @return List<SysUser> * @return List<SysUser>
**/ **/
private List<SysUser> getAuditUseListByProcessNode(ProcessVo processVo, TProcessNode currentProcessNode, String departId, String entityId, String auditType, private List<SysUser> getAuditUseListByProcessNode(ProcessVo processVo, TProcessNode currentProcessNode, String departId, String entityId, String auditType,
T entity, TAuditRecord approvalRecord) { T entity, TAuditRecord auditRecord) {
// 定义审批用户 // 定义审批用户
List<TNodePrimission> nodePrimissionList = null; List<TNodePrimission> nodePrimissionList = null;
for (TProcessNode processNode : processVo.getProcessNodeList()) { for (TProcessNode processNode : processVo.getProcessNodeList()) {
...@@ -140,27 +140,23 @@ public abstract class AbastractAuditProcess<T,E extends T> { ...@@ -140,27 +140,23 @@ public abstract class AbastractAuditProcess<T,E extends T> {
} }
// 6指定事业部配置表 // 6指定事业部配置表
if (CommonConstants.SIX_INT == nodePrimission.getType().intValue()) { if (CommonConstants.SIX_INT == nodePrimission.getType().intValue()) {
// todo 根据事业部条线获取审批用户 // 根据事业部条线获取审批用户
sysUserList = this.getDivisionAuditUser(nodePrimission, entity); sysUserList = this.getDivisionAuditUser(nodePrimission, entity);
} }
if (Common.isEmpty(sysUserList)) {
throw new CheckedException("未找到审批用户,请联系管理员");
}
// 事业部条线没有审批人直接审核通过,配置了可以跳过 // 事业部条线没有审批人直接审核通过,配置了可以跳过
if(Common.isEmpty(sysUserList) && CommonConstants.ONE_STRING.equals(nodePrimission.getIsPass())){ // if(Common.isEmpty(sysUserList) && CommonConstants.ONE_STRING.equals(nodePrimission.getIsPass())){
// 标记节点可以跳过 //// // 标记节点可以跳过
isPass = CommonConstants.ONE_INT; //// isPass = CommonConstants.ONE_INT;
// todo 系统自动给当前节点完成审核,将审核通过 //// // 系统自动给当前节点完成审核,将审核通过
//sysAutoAudit(sysUserTprocessNode,entity,processVo); //// sysAutoAudit(processVo,currentProcessNode,departId,auditType,entityId,entity);
} else { //// } else {
if (Common.isEmpty(sysUserList)) { if (Common.isEmpty(sysUserList)) {
throw new CheckedException("未找到审批用户"); throw new CheckedException("未找到审批用户");
} }
// 微信审批通知发送 // 微信审批通知发送
// todo 发送审批消息 sendMessage(sysUserList,entity,CommonConstants.ONE_STRING, auditRecord);
sendMessage(sysUserList,entity,CommonConstants.ONE_STRING,approvalRecord);
for (SysUser sysUser : sysUserList) { for (SysUser sysUser : sysUserList) {
// 新增指派审核流程记录 // 新增指派审核流程记录
TAuditRecord newEntity = new TAuditRecord(); TAuditRecord newEntity = new TAuditRecord();
...@@ -191,7 +187,7 @@ public abstract class AbastractAuditProcess<T,E extends T> { ...@@ -191,7 +187,7 @@ public abstract class AbastractAuditProcess<T,E extends T> {
auditRecordService.save(newEntity); auditRecordService.save(newEntity);
} }
} //}
} }
// 事业部条线没有审批人直接审核通过,配置了可以跳过 // 事业部条线没有审批人直接审核通过,配置了可以跳过
...@@ -274,7 +270,7 @@ public abstract class AbastractAuditProcess<T,E extends T> { ...@@ -274,7 +270,7 @@ public abstract class AbastractAuditProcess<T,E extends T> {
/** /**
* 审核并提交下一个节点:获取下一个审核人 * 审核并提交下一个节点:获取下一个审核人
* @param id 实体id * @param entityId 实体id
* @param approvalResult 审核标识 0审核通过 其他审核不通过 * @param approvalResult 审核标识 0审核通过 其他审核不通过
* @param approvalOpinion 审核意见 * @param approvalOpinion 审核意见
* @param loginUser 当前登录人 * @param loginUser 当前登录人
...@@ -282,12 +278,12 @@ public abstract class AbastractAuditProcess<T,E extends T> { ...@@ -282,12 +278,12 @@ public abstract class AbastractAuditProcess<T,E extends T> {
* @param entity 实体类:用于审核通过逻辑 * @param entity 实体类:用于审核通过逻辑
* @return R<String> * @return R<String>
**/ **/
public R<String> auditUserList(String id, String approvalResult, String approvalOpinion, YifuUser loginUser, public R<String> auditUserList(String entityId, String approvalResult, String approvalOpinion, YifuUser loginUser,
String auditType, T entity, String departId) { String auditType, T entity, String departId) {
String loginUserId = loginUser.getId(); String loginUserId = loginUser.getId();
// 判断当前审核是否为最新待审核记录 // 判断当前审核是否为最新待审核记录
List<TAuditRecord> auditRecordList = auditRecordService.list List<TAuditRecord> auditRecordList = auditRecordService.list
(Wrappers.<TAuditRecord>query().lambda().eq(TAuditRecord::getDomainId, id) (Wrappers.<TAuditRecord>query().lambda().eq(TAuditRecord::getDomainId, entityId)
.eq(TAuditRecord::getAuditType, auditType) .eq(TAuditRecord::getAuditType, auditType)
.eq(TAuditRecord::getDeleteFlag, CommonConstants.NOT_DELETE_FLAG) .eq(TAuditRecord::getDeleteFlag, CommonConstants.NOT_DELETE_FLAG)
.eq(TAuditRecord::getApprovalResult, CommonConstants.TWO_STRING) .eq(TAuditRecord::getApprovalResult, CommonConstants.TWO_STRING)
...@@ -304,7 +300,7 @@ public abstract class AbastractAuditProcess<T,E extends T> { ...@@ -304,7 +300,7 @@ public abstract class AbastractAuditProcess<T,E extends T> {
auditRecordService.updateById(auditRecord); auditRecordService.updateById(auditRecord);
// 移除同一个节点的另外审批人。多个节点一个人审批就够了,其他都移除 // 移除同一个节点的另外审批人。多个节点一个人审批就够了,其他都移除
auditRecordService.remove(Wrappers.<TAuditRecord>query().lambda() auditRecordService.remove(Wrappers.<TAuditRecord>query().lambda()
.eq(TAuditRecord::getDomainId, id) .eq(TAuditRecord::getDomainId, entityId)
.eq(TAuditRecord::getAuditType, auditType) .eq(TAuditRecord::getAuditType, auditType)
.isNull(TAuditRecord::getApprovalTime)); .isNull(TAuditRecord::getApprovalTime));
...@@ -313,7 +309,7 @@ public abstract class AbastractAuditProcess<T,E extends T> { ...@@ -313,7 +309,7 @@ public abstract class AbastractAuditProcess<T,E extends T> {
// 获取流程,并判断是否是最后一个节点 // 获取流程,并判断是否是最后一个节点
// 获取流程的主流程 // 获取流程的主流程
TAuditNodeProcess auditNodeProocess = auditNodeProcessService.getOne(Wrappers.<TAuditNodeProcess>query().lambda() TAuditNodeProcess auditNodeProocess = auditNodeProcessService.getOne(Wrappers.<TAuditNodeProcess>query().lambda()
.eq(TAuditNodeProcess::getDomainId, id) .eq(TAuditNodeProcess::getDomainId, entityId)
.eq(TAuditNodeProcess::getType, auditType) .eq(TAuditNodeProcess::getType, auditType)
.eq(TAuditNodeProcess::getMainType, CommonConstants.ZERO_STRING) .eq(TAuditNodeProcess::getMainType, CommonConstants.ZERO_STRING)
.eq(TAuditNodeProcess::getDeleteFlag, CommonConstants.NOT_DELETE_FLAG) .eq(TAuditNodeProcess::getDeleteFlag, CommonConstants.NOT_DELETE_FLAG)
...@@ -338,12 +334,12 @@ public abstract class AbastractAuditProcess<T,E extends T> { ...@@ -338,12 +334,12 @@ public abstract class AbastractAuditProcess<T,E extends T> {
return auditSuccess(entity, auditRecord, loginUser); return auditSuccess(entity, auditRecord, loginUser);
} else { } else {
TProcessNode currentProcessNode = ProcessAuditUtil.getCurrentProcessNode(processVo, auditRecord.getNodeId()); TProcessNode currentProcessNode = ProcessAuditUtil.getCurrentProcessNode(processVo, auditRecord.getNodeId());
TProcessNode nextProcessNode = getNextNode(processVo, currentProcessNode.getLogoTitle(), id, auditType, entity, loginUser); TProcessNode nextProcessNode = getNextNode(processVo, currentProcessNode.getLogoTitle(), entityId, auditType, entity, loginUser);
if (nextProcessNode == null) { if (nextProcessNode == null) {
throw new CheckedException(NEXT_AUDIT_NODE_NOT_FOUND); throw new CheckedException(NEXT_AUDIT_NODE_NOT_FOUND);
} }
auditNodeProocess = auditNodeProcessService.getOne(Wrappers.<TAuditNodeProcess>query().lambda() auditNodeProocess = auditNodeProcessService.getOne(Wrappers.<TAuditNodeProcess>query().lambda()
.eq(TAuditNodeProcess::getDomainId, id) .eq(TAuditNodeProcess::getDomainId, entityId)
.eq(TAuditNodeProcess::getType, auditType) .eq(TAuditNodeProcess::getType, auditType)
.eq(TAuditNodeProcess::getMainType, CommonConstants.ZERO_STRING) .eq(TAuditNodeProcess::getMainType, CommonConstants.ZERO_STRING)
.eq(TAuditNodeProcess::getDeleteFlag, CommonConstants.NOT_DELETE_FLAG) .eq(TAuditNodeProcess::getDeleteFlag, CommonConstants.NOT_DELETE_FLAG)
...@@ -356,7 +352,7 @@ public abstract class AbastractAuditProcess<T,E extends T> { ...@@ -356,7 +352,7 @@ public abstract class AbastractAuditProcess<T,E extends T> {
return auditSuccess(entity, auditRecord, loginUser); return auditSuccess(entity, auditRecord, loginUser);
} }
// 获取审批用户 // 获取审批用户
List<SysUser> remoteSysUserList = getAuditUseListByProcessNode(processVo,nextProcessNode, departId, id, auditType, entity, auditRecord); List<SysUser> remoteSysUserList = getAuditUseListByProcessNode(processVo,nextProcessNode, departId, entityId, auditType, entity, auditRecord);
if (Common.isEmpty(remoteSysUserList)) { if (Common.isEmpty(remoteSysUserList)) {
throw new CheckedException(NEXT_NODE_USER_NULL); throw new CheckedException(NEXT_NODE_USER_NULL);
} }
...@@ -573,9 +569,9 @@ public abstract class AbastractAuditProcess<T,E extends T> { ...@@ -573,9 +569,9 @@ public abstract class AbastractAuditProcess<T,E extends T> {
} }
/** /**
* 获取crm部门审核人 * 获取部门审核人
* @param nodePrimission * @param nodePrimission 审批角色
* @param departId * @param departId 部门ID
* @return List<SysUser> * @return List<SysUser>
**/ **/
private List<SysUser> getDepartAuditUser(TNodePrimission nodePrimission, String departId) { private List<SysUser> getDepartAuditUser(TNodePrimission nodePrimission, String departId) {
...@@ -605,4 +601,80 @@ public abstract class AbastractAuditProcess<T,E extends T> { ...@@ -605,4 +601,80 @@ public abstract class AbastractAuditProcess<T,E extends T> {
} }
return remoteSysUserList; return remoteSysUserList;
} }
/**
* 系统自动审核
* @param entityId 实体id
* @param auditType 审核类型 0不购买商险审核
* @param entity 实体类:用于审核通过逻辑
* @return R<String>
**/
private void sysAutoAudit(ProcessVo processVo,TProcessNode currentProcessNode,String departId, String auditType,
String entityId,T entity) {
// 新增自动审核通过记录
TAuditRecord newEntity = new TAuditRecord();
newEntity.setDomainId(entityId);
newEntity.setFlowId(currentProcessNode.getProcessId());
newEntity.setNodeId(currentProcessNode.getId());
newEntity.setApprovalMan(CommonConstants.ONE_STRING);
newEntity.setApprovalManName("系统");
newEntity.setApprovalOpinion("审核人为空,默认审核通过");
newEntity.setDeleteFlag(CommonConstants.NOT_DELETE_FLAG);
newEntity.setPreFlag(CommonConstants.ONE_STRING);
newEntity.setApprovalResult(CommonConstants.ZERO_STRING);
newEntity.setNodeName(currentProcessNode.getName());
// 获取提交人信息
TAuditRecord tAuditRecord = auditRecordService.getOne(Wrappers.<TAuditRecord>query().lambda()
.eq(TAuditRecord::getDomainId, entityId)
.eq(TAuditRecord::getAuditType, auditType)
.eq(TAuditRecord::getPreFlag, CommonConstants.ONE_STRING)
.eq(TAuditRecord::getApprovalResult, CommonConstants.THREE_STRING)
.orderByDesc(TAuditRecord::getId).last(CommonConstants.SQL_LIMIT_ONE));
if(Common.isNotNull(tAuditRecord)) {
newEntity.setSubmitMan(tAuditRecord.getSubmitMan());
newEntity.setSubmitManName(tAuditRecord.getSubmitManName());
newEntity.setSubmitCreateTime(tAuditRecord.getSubmitCreateTime());
newEntity.setReason(tAuditRecord.getReason());
newEntity.setEntityName(tAuditRecord.getEntityName());
newEntity.setAuditType(tAuditRecord.getAuditType());
}
newEntity.setCreateTime(LocalDateTime.now());
auditRecordService.save(newEntity);
// 获取流程配置信息
TProcessNode endProcessNode = ProcessAuditUtil.getEndProcessNode(processVo);
if (endProcessNode == null) {
log.error("系统自动审核,未获取到结束节点");
return;
}
TProcessNode preEndProcessNode = ProcessAuditUtil.getPreEndTProcessNode(processVo, endProcessNode);
if (preEndProcessNode == null) {
log.error("系统自动审核,未找到结束节点前一个节点");
return;
}
// 当前是结束节点前的一个节点
if (StringUtils.equals(preEndProcessNode.getId(), newEntity.getNodeId())) {
// 直接最终审核通过
auditSuccess(entity, newEntity, null);
} else {
TProcessNode nextProcessNode = getNextNode(processVo, currentProcessNode.getLogoTitle(), entityId, auditType, entity, null);
if (nextProcessNode == null) {
throw new CheckedException(NEXT_AUDIT_NODE_NOT_FOUND);
}
// 如果返回的是end节点:判断是不是返回的是不是主流程结束节点
if (StringUtils.equals(ProcessConstants.PROCESS_NODE_END, nextProcessNode.getType())
&& StringUtils.equals(currentProcessNode.getProcessId(), nextProcessNode.getProcessId())) {
// 直接最终审核通过
auditSuccess(entity, newEntity, null);
}
// 获取下个审批用户
List<SysUser> remoteSysUserList = getAuditUseListByProcessNode(processVo,nextProcessNode, departId, entityId, auditType, entity, newEntity);
if (Common.isEmpty(remoteSysUserList)) {
throw new CheckedException(NEXT_NODE_USER_NULL);
}
// // 流程中的审核结束,继续下一个节点
// auditSuccessAndNex(entity, remoteSysUserList, newEntity);
}
}
} }
...@@ -117,11 +117,12 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance ...@@ -117,11 +117,12 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭 // 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, TInsuranceUnpurchaseApplyVo.class).build(); ExcelWriter excelWriter = EasyExcel.write(out, TInsuranceUnpurchaseApplyVo.class).build();
int index = 0; int index = 0;
if (count > CommonConstants.ZERO_INT) { if (count > CommonConstants.ZERO_INT) {
for (int i = 0; i <= count; i = i + CommonConstants.EXCEL_EXPORT_LIMIT) { for (int i = 0; i <= count; i = i + CommonConstants.EXCEL_EXPORT_LIMIT_NEW) {
// 获取实际记录 // 获取实际记录
searchVo.setLimitStart(i); searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT); searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT_NEW);
list = baseMapper.getTInsuranceUnpurchaseApplyExportList(searchVo); list = baseMapper.getTInsuranceUnpurchaseApplyExportList(searchVo);
if (Common.isNotNull(list)) { if (Common.isNotNull(list)) {
WriteSheet writeSheet = EasyExcel.writerSheet("含风险项目不购买申请表" + index).build(); WriteSheet writeSheet = EasyExcel.writerSheet("含风险项目不购买申请表" + index).build();
...@@ -200,6 +201,9 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance ...@@ -200,6 +201,9 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
//申请人是否属于子分公司和该项目是否有审批通过记录赋值 //申请人是否属于子分公司和该项目是否有审批通过记录赋值
setValue(tInsuranceUnpurchaseApply,user); setValue(tInsuranceUnpurchaseApply,user);
if (Common.isNotNull(tInsuranceUnpurchaseApply.getId())) { if (Common.isNotNull(tInsuranceUnpurchaseApply.getId())) {
if (Common.isEmpty(tInsuranceUnpurchaseApply.getApplyNo())) {
tInsuranceUnpurchaseApply.setApplyNo(applyNo);
}
tInsuranceUnpurchaseApply.setCreateTimeZc(LocalDateTime.now()); tInsuranceUnpurchaseApply.setCreateTimeZc(LocalDateTime.now());
baseMapper.updateById(tInsuranceUnpurchaseApply); baseMapper.updateById(tInsuranceUnpurchaseApply);
//更新附件 //更新附件
...@@ -521,7 +525,7 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance ...@@ -521,7 +525,7 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
if(Common.isEmpty(entity.getCreateUserDeptId())){ if(Common.isEmpty(entity.getCreateUserDeptId())){
return R.failed("申请人所属部门id不能为空"); return R.failed("申请人所属部门id不能为空");
} }
// 传:流程类型 1不购买商险申请;审核类型 0不购买商险审核 // todo 传:流程类型 1不购买商险申请;审核类型 0不购买商险审核
R<List<SysUser>> auditUserListR = tInsuranceUnpurchaseApplyAuditProcess.getAuditUserList(id, user, entity.getCreateUserDeptId(), R<List<SysUser>> auditUserListR = tInsuranceUnpurchaseApplyAuditProcess.getAuditUserList(id, user, entity.getCreateUserDeptId(),
CommonConstants.ONE_STRING, CommonConstants.ZERO_STRING, CommonConstants.ONE_STRING, CommonConstants.ZERO_STRING,
"", entity.getApplyNo(), entity, TInsuranceUnpurchaseApply.class); "", entity.getApplyNo(), entity, TInsuranceUnpurchaseApply.class);
...@@ -555,5 +559,4 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance ...@@ -555,5 +559,4 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
return tInsuranceUnpurchaseApplyAuditProcess.auditUserList(insuranceUnpurchaseApply.getId(), approvalResult, approvalOpinion, user, CommonConstants.ZERO_STRING, return tInsuranceUnpurchaseApplyAuditProcess.auditUserList(insuranceUnpurchaseApply.getId(), approvalResult, approvalOpinion, user, CommonConstants.ZERO_STRING,
insuranceUnpurchaseApply, insuranceUnpurchaseApply.getCreateUserDeptId()); insuranceUnpurchaseApply, insuranceUnpurchaseApply.getCreateUserDeptId());
} }
} }
package com.yifu.cloud.plus.v1.yifu.salary.service.impl; package com.yifu.cloud.plus.v1.yifu.salary.service.impl;
import com.alibaba.excel.EasyExcel; import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.EasyExcelFactory;
import com.alibaba.excel.ExcelWriter; import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet; import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
...@@ -28,6 +29,7 @@ import org.springframework.stereotype.Service; ...@@ -28,6 +29,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.ServletOutputStream; import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URL; import java.net.URL;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -84,20 +86,24 @@ public class TInsuranceUnpurchasePersonServiceImpl extends ServiceImpl<TInsuranc ...@@ -84,20 +86,24 @@ public class TInsuranceUnpurchasePersonServiceImpl extends ServiceImpl<TInsuranc
ExcelWriter excelWriter = EasyExcel.write(out, TInsuranceUnpurchasePersonVo.class).build(); ExcelWriter excelWriter = EasyExcel.write(out, TInsuranceUnpurchasePersonVo.class).build();
int index = 0; int index = 0;
if (count > CommonConstants.ZERO_INT){ if (count > CommonConstants.ZERO_INT){
for (int i = 0; i <= count; i = i + CommonConstants.EXCEL_EXPORT_LIMIT) { if (count > CommonConstants.EXCEL_EXPORT_LIMIT_NEW) {
// 获取实际记录 exportError(response, "数据超过2万条,请联系管理员后端导出");
searchVo.setLimitStart(i); } else {
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT); for (int i = 0; i <= count; i = i + CommonConstants.EXCEL_EXPORT_LIMIT_NEW) {
list = baseMapper.getTInsuranceUnpurchaseInfoExportList(searchVo); // 获取实际记录
if (Common.isNotNull(list)){ searchVo.setLimitStart(i);
WriteSheet writeSheet = EasyExcel.writerSheet("含风险项目不购买申请明细表"+index).build(); searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT_NEW);
excelWriter.write(list,writeSheet); list = baseMapper.getTInsuranceUnpurchaseInfoExportList(searchVo);
index++; if (Common.isNotNull(list)) {
} WriteSheet writeSheet = EasyExcel.writerSheet("含风险项目不购买申请明细表" + index).build();
if (Common.isNotNull(list)){ excelWriter.write(list, writeSheet);
list.clear(); index++;
} }
} if (Common.isNotNull(list)) {
list.clear();
}
}
}
}else { }else {
WriteSheet writeSheet = EasyExcel.writerSheet("含风险项目不购买申请明细表"+index).build(); WriteSheet writeSheet = EasyExcel.writerSheet("含风险项目不购买申请明细表"+index).build();
excelWriter.write(list,writeSheet); excelWriter.write(list,writeSheet);
...@@ -217,5 +223,38 @@ public class TInsuranceUnpurchasePersonServiceImpl extends ServiceImpl<TInsuranc ...@@ -217,5 +223,38 @@ public class TInsuranceUnpurchasePersonServiceImpl extends ServiceImpl<TInsuranc
} }
} }
private void exportError(HttpServletResponse response, String errorMessage) {
String fileName = "导出异常" + DateUtil.getThisTime() + CommonConstants.XLSX;
//获取要导出的列表
List<ExportErrorVo> list = new ArrayList<>();
list.add(new ExportErrorVo(errorMessage));
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcelFactory.write(out, ExportErrorVo.class).build();
int index = 0;
WriteSheet writeSheet = EasyExcelFactory.writerSheet("异常信息" + index).build();
excelWriter.write(list, writeSheet);
if (Common.isNotNull(list)) {
list.clear();
}
out.flush();
excelWriter.finish();
} catch (Exception e) {
log.error("执行异常", e);
} finally {
try {
if (null != out) {
out.close();
}
} catch (IOException e) {
log.error("执行异常", e);
}
}
}
} }
...@@ -12,6 +12,8 @@ import com.yifu.cloud.plus.v1.yifu.common.core.exception.CheckedException; ...@@ -12,6 +12,8 @@ import com.yifu.cloud.plus.v1.yifu.common.core.exception.CheckedException;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.EkpDaprUtils;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpDivisionInfoVo;
import com.yifu.cloud.plus.v1.yifu.salary.config.WxConfig; import com.yifu.cloud.plus.v1.yifu.salary.config.WxConfig;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TAuditNodeProcess; import com.yifu.cloud.plus.v1.yifu.salary.entity.TAuditNodeProcess;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TAuditRecord; import com.yifu.cloud.plus.v1.yifu.salary.entity.TAuditRecord;
...@@ -56,6 +58,9 @@ public class TInsuranceUnpurchaseApplyAuditProcess extends AbastractAuditProcess ...@@ -56,6 +58,9 @@ public class TInsuranceUnpurchaseApplyAuditProcess extends AbastractAuditProcess
@Autowired @Autowired
private WxConfig wxConfig; private WxConfig wxConfig;
@Autowired
private EkpDaprUtils ekpDaprUtils;
@Override @Override
public R<String> auditSuccess(TInsuranceUnpurchaseApply entity, TAuditRecord auditRecord, YifuUser loginUser) { public R<String> auditSuccess(TInsuranceUnpurchaseApply entity, TAuditRecord auditRecord, YifuUser loginUser) {
// 改实体审核状态为审核通过 // 改实体审核状态为审核通过
...@@ -86,7 +91,7 @@ public class TInsuranceUnpurchaseApplyAuditProcess extends AbastractAuditProcess ...@@ -86,7 +91,7 @@ public class TInsuranceUnpurchaseApplyAuditProcess extends AbastractAuditProcess
} }
@Override @Override
public R<String> auditSuccessAndNex(TInsuranceUnpurchaseApply entity, List<SysUser> remoteSysUserList, TAuditRecord approvalRecord) { public R<String> auditSuccessAndNex(TInsuranceUnpurchaseApply entity, List<SysUser> remoteSysUserList, TAuditRecord auditRecord) {
if (Common.isEmpty(remoteSysUserList)) { if (Common.isEmpty(remoteSysUserList)) {
throw new CheckedException(NEXT_NODE_USER_NULL); throw new CheckedException(NEXT_NODE_USER_NULL);
} }
...@@ -105,6 +110,8 @@ public class TInsuranceUnpurchaseApplyAuditProcess extends AbastractAuditProcess ...@@ -105,6 +110,8 @@ public class TInsuranceUnpurchaseApplyAuditProcess extends AbastractAuditProcess
} }
entity.setAuditUser(auditUserNameStrs); entity.setAuditUser(auditUserNameStrs);
entity.setAuditUserId(auditUserIdStrs); entity.setAuditUserId(auditUserIdStrs);
tInsuranceUnpurchaseApplyService.updateById(entity);
return R.ok("审核通过"); return R.ok("审核通过");
} }
...@@ -170,22 +177,33 @@ public class TInsuranceUnpurchaseApplyAuditProcess extends AbastractAuditProcess ...@@ -170,22 +177,33 @@ public class TInsuranceUnpurchaseApplyAuditProcess extends AbastractAuditProcess
**/ **/
@Override @Override
public List<SysUser> getDivisionAuditUser(TNodePrimission nodePrimission, TInsuranceUnpurchaseApply entity) { public List<SysUser> getDivisionAuditUser(TNodePrimission nodePrimission, TInsuranceUnpurchaseApply entity) {
SysUser remoteSysUser = null; SysUser remoteSysUser;
List<SysUser> remoteSysUserList = new ArrayList<>(); List<SysUser> remoteSysUserList = new ArrayList<>();
if (CommonConstants.SIX_INT == nodePrimission.getType().intValue()) { if (CommonConstants.SIX_INT == nodePrimission.getType().intValue()) {
// 6.指定事业部审批 // 6.指定事业部审批
if (Common.isEmpty(nodePrimission.getDivisionIdentification())) { if (Common.isEmpty(nodePrimission.getDivisionIdentification())) {
throw new CheckedException("未查询当前节点配置的事业部审批人标识"); throw new CheckedException("未查询当前节点配置的事业部审批人标识");
} }
// todo 根据配置条件查找用户 // 根据配置条件查找用户账号
//EkpDivisionInfoVo divisionInfoVo = new EkpDivisionInfoVo(); EkpDivisionInfoVo divisionInfoVo = new EkpDivisionInfoVo();
// if(CommonConstants.ZERO_STRING.equals(nodePrimission.getDivisionIdentification())){ divisionInfoVo.setDivisionIdentification(nodePrimission.getDivisionIdentification());
// divisionInfoVo.setDivision(entity.getDivision());
// } divisionInfoVo.setNewLine(entity.getNewLine());
R<EkpDivisionInfoVo> divisionInfoVoRes = ekpDaprUtils.getDivisionUsernameList(divisionInfoVo);
// remoteSysUserList = RemoteRequestUtil.getUserByDivisionConfig(remoteUserService, advancePaymentEntity.getDivision(), advancePaymentEntity.getDivisionLine(), nodePrimission.getDivisionIdentification()); if(null != divisionInfoVoRes && null != divisionInfoVoRes.getData()) {
List<String> divisionUsernameList = divisionInfoVoRes.getData().getDivisionUsernameList();
if(Common.isNotNull(divisionUsernameList)){
// 根据用户账号查用户信息
for(String username : divisionUsernameList){
R<SysUser> remoteSysUserR = upmsDaprUtils.getSimpleUserByLoginName(username);
if (Common.isNotNull(remoteSysUserR) && Common.isNotNull(remoteSysUserR.getData())){
remoteSysUser = remoteSysUserR.getData();
remoteSysUserList.add(remoteSysUser);
}
}
}
}
} }
return remoteSysUserList; return remoteSysUserList;
} }
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
<result property="insuranceFlag" column="INSURANCE_FLAG"/> <result property="insuranceFlag" column="INSURANCE_FLAG"/>
<result property="auditUser" column="AUDIT_USER"/> <result property="auditUser" column="AUDIT_USER"/>
<result property="auditUserId" column="AUDIT_USER_ID"/> <result property="auditUserId" column="AUDIT_USER_ID"/>
<result property="unbuyNum" column="UNBUY_NUM"/>
</resultMap> </resultMap>
<resultMap id="tInsuranceUnpurchaseApplyExportMap" <resultMap id="tInsuranceUnpurchaseApplyExportMap"
...@@ -50,7 +51,7 @@ ...@@ -50,7 +51,7 @@
a.CREATE_USER_DEPT_NAME, a.REASON_TYPE, a.REASON_INFO, a.APPLY_NO, a.CREATE_USER_DEPT_NAME, a.REASON_TYPE, a.REASON_INFO, a.APPLY_NO,
a.AUDIT_FLAG, a.COMPANY_FLAG, a.CREATE_BY, a.CREATE_NAME, a.CREATE_TIME, a.AUDIT_FLAG, a.COMPANY_FLAG, a.CREATE_BY, a.CREATE_NAME, a.CREATE_TIME,
a.UPDATE_BY, a.UPDATE_TIME, a.DELETE_FLAG, a.STATUS, a.HAS_CONTAIN_RISKS, a.UPDATE_BY, a.UPDATE_TIME, a.DELETE_FLAG, a.STATUS, a.HAS_CONTAIN_RISKS,
a.NEW_LINE, a.DIVISION, a.INSURANCE_FLAG, a.AUDIT_USER, a.AUDIT_USER_ID,a.CREATE_TIME_ZC a.NEW_LINE, a.DIVISION, a.INSURANCE_FLAG, a.AUDIT_USER, a.AUDIT_USER_ID,a.CREATE_TIME_ZC,UNBUY_NUM
</sql> </sql>
<sql id="tInsuranceUnpurchaseApply_where"> <sql id="tInsuranceUnpurchaseApply_where">
<if test="tInsuranceUnpurchaseApply != null"> <if test="tInsuranceUnpurchaseApply != null">
...@@ -102,7 +103,8 @@ ...@@ -102,7 +103,8 @@
1=1 and a.DELETE_FLAG = '0' 1=1 and a.DELETE_FLAG = '0'
<include refid="tInsuranceUnpurchaseApply_where"/> <include refid="tInsuranceUnpurchaseApply_where"/>
</where> </where>
order by a.CREATE_TIME_ZC desc order by
ifnull(a.CREATE_TIME_ZC,'2999-12-31 00:00:00') DESC
</select> </select>
<!-- tInsuranceUnpurchaseApply简单分页查询 --> <!-- tInsuranceUnpurchaseApply简单分页查询 -->
...@@ -138,7 +140,7 @@ ...@@ -138,7 +140,7 @@
a.DELETE_FLAG = '0' a.DELETE_FLAG = '0'
<include refid="tInsuranceUnpurchaseApply_where"/> <include refid="tInsuranceUnpurchaseApply_where"/>
</where> </where>
order by a.CREATE_TIME_ZC desc order by ifnull(a.CREATE_TIME_ZC,'2999-12-31 00:00:00') DESC
<if test="tInsuranceUnpurchaseApply.limitStart != null"> <if test="tInsuranceUnpurchaseApply.limitStart != null">
limit #{tInsuranceUnpurchaseApply.limitStart},#{tInsuranceUnpurchaseApply.limitEnd} limit #{tInsuranceUnpurchaseApply.limitStart},#{tInsuranceUnpurchaseApply.limitEnd}
</if> </if>
...@@ -213,7 +215,7 @@ ...@@ -213,7 +215,7 @@
SELECT ifnull(max(right (e.APPLY_NO, 3)), 0) EMP_CODE SELECT ifnull(max(right (e.APPLY_NO, 3)), 0) EMP_CODE
FROM t_insurance_unpurchase_apply e FROM t_insurance_unpurchase_apply e
where e.DELETE_FLAG = '0' where e.DELETE_FLAG = '0'
and e.CREATE_TIME_ZC > DATE_FORMAT(now(), '%Y-%m-%d') and e.CREATE_TIME_ZC > DATE_FORMAT(now(), '%Y-%m-%d')
</select> </select>
<!-- 获取当日最大的编码 --> <!-- 获取当日最大的编码 -->
......
...@@ -600,7 +600,7 @@ public class UserController { ...@@ -600,7 +600,7 @@ public class UserController {
**/ **/
@Inner @Inner
@PostMapping("/inner/getUser/getUserByRoleIdForCrm") @PostMapping("/inner/getUser/getUserByRoleIdForCrm")
public SysUserListVo getUserByRoleIdForCrm(UserApprovalRoleVO userByApprovalRole) { public SysUserListVo getUserByRoleIdForCrm(@RequestBody UserApprovalRoleVO userByApprovalRole) {
SysUserListVo naVo = new SysUserListVo(); SysUserListVo naVo = new SysUserListVo();
if (Common.isEmpty(userByApprovalRole.getDepartId()) || Common.isEmpty(userByApprovalRole.getRoleId())) { if (Common.isEmpty(userByApprovalRole.getDepartId()) || Common.isEmpty(userByApprovalRole.getRoleId())) {
return naVo; return naVo;
......
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