Commit 27c16f1d authored by fangxinjiang's avatar fangxinjiang

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

parents 1fca1a0e b761b485
/*
* 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.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import 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 javax.validation.constraints.NotBlank;
/**
* 完整度监控配置
*
* @author hgw
* @date 2025-02-26 15:18:51
*/
@Data
@TableName("t_complete_monitor_set")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "完整度监控配置")
public class TCompleteMonitorSet extends BaseEntity {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("主键")
@Schema(description = "主键")
private String id;
/**
* 是否监控0否1是
*/
@ExcelAttribute(name = "是否监控0否1是", isNotEmpty = true, errorInfo = "是否监控0否1是不能为空", maxLength = 1)
@NotBlank(message = "是否监控0否1是不能为空")
@Length(max = 1, message = "是否监控0否1是不能超过1个字符")
@ExcelProperty("是否监控0否1是")
@Schema(description = "是否监控0否1是")
private String isMonitor;
/**
* 合同类型(字典值,逗号分割,-1表示默认)
*/
@ExcelAttribute(name = "合同类型(字典值,逗号分割,-1表示默认)", isNotEmpty = true, errorInfo = "合同类型(字典值,逗号分割,-1表示默认)不能为空", maxLength = 200)
@NotBlank(message = "合同类型(字典值,逗号分割,-1表示默认)不能为空")
@Length(max = 200, message = "合同类型(字典值,逗号分割,-1表示默认)不能超过200个字符")
@ExcelProperty("合同类型(字典值,逗号分割,-1表示默认)")
@Schema(description = "合同类型(字典值,逗号分割,-1表示默认)")
private String contractType;
/**
* 合同类型中文名
*/
@ExcelAttribute(name = "合同类型名称", isNotEmpty = true, errorInfo = "合同类型名称不能为空", maxLength = 500)
@NotBlank(message = "合同类型名称不能为空")
@Length(max = 500, message = "合同类型名称不能超过500个字符")
@ExcelProperty("合同类型名称")
@Schema(description = "合同类型名称")
private String contractTypeName;
/**
* 监控基础信息表ID(逗号分割)
*/
@ExcelAttribute(name = "监控基础信息表ID(逗号分割)", maxLength = 400)
@Length(max = 400, message = "监控基础信息表ID(逗号分割)不能超过400个字符")
@ExcelProperty("监控基础信息表ID(逗号分割)")
@Schema(description = "监控基础信息表ID(逗号分割)")
private String baseId;
/**
* 更新人
*/
@ExcelAttribute(name = "更新人", maxLength = 50)
@Length(max = 50, message = "更新人不能超过50个字符")
@ExcelProperty("更新人")
@Schema(description = "更新人")
private String updateName;
}
/*
* 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.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
/**
* 完整度监控配置
*
* @author hgw
* @date 2025-02-26 15:18:51
*/
@Data
@TableName("t_complete_monitor_set_base_info")
@Schema(description = "完整度监控配置")
public class TCompleteMonitorSetBaseInfo {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("主键")
@Schema(description = "主键")
private Integer id;
/**
* 类型(1档案基础信息2默认联动信息3监控信息项)
*/
@ExcelAttribute(name = "类型(1档案基础信息2默认联动信息3监控信息项)", isNotEmpty = true, errorInfo = "类型(1档案基础信息2默认联动信息3监控信息项)不能为空", maxLength = 1)
@NotBlank(message = "类型(1档案基础信息2默认联动信息3监控信息项)不能为空")
@Length(max = 1, message = "类型(1档案基础信息2默认联动信息3监控信息项)不能超过1个字符")
@ExcelProperty("类型(1档案基础信息2默认联动信息3监控信息项)")
@Schema(description = "类型(1档案基础信息2默认联动信息3监控信息项)")
private String baseType;
/**
* 序号
*/
@ExcelAttribute(name = "序号", isNotEmpty = true, errorInfo = "序号不能为空")
@NotBlank(message = "序号不能为空")
@ExcelProperty("序号")
@Schema(description = "序号")
private Integer baseNum;
/**
* 字段名称
*/
@ExcelAttribute(name = "字段名称", isNotEmpty = true, errorInfo = "字段名称不能为空", maxLength = 50)
@NotBlank(message = "字段名称不能为空")
@Length(max = 50, message = "字段名称不能超过50个字符")
@ExcelProperty("字段名称")
@Schema(description = "字段名称")
private String baseName;
/**
* 字段说明
*/
@ExcelAttribute(name = "字段说明", maxLength = 50)
@Length(max = 50, message = "字段说明不能超过50个字符")
@ExcelProperty("字段说明")
@Schema(description = "字段说明")
private String baseRemark;
/**
* 是否监控0否1是
*/
@ExcelAttribute(name = "是否监控0否1是", isNotEmpty = true, errorInfo = "是否监控0否1是不能为空", maxLength = 1)
@NotBlank(message = "是否监控0否1是不能为空")
@Length(max = 1, message = "是否监控0否1是不能超过1个字符")
@ExcelProperty("是否监控0否1是")
@Schema(description = "是否监控0否1是")
private String isMonitor;
/**
* 表字段
*/
@ExcelAttribute(name = "表字段", maxLength = 100)
@Length(max = 100, message = "表字段不能超过100个字符")
@ExcelProperty("表字段")
@Schema(description = "表字段")
private String baseColumn;
/**
* 表名称
*/
@ExcelAttribute(name = "表名称", maxLength = 200)
@Length(max = 200, message = "表名称不能超过200个字符")
@ExcelProperty("表名称")
@Schema(description = "表名称")
private String baseTable;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCompleteMonitorSet;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
/**
* 完整度监控配置
*
* @author hgw
* @date 2025-02-26 15:18:51
*/
@Data
public class TCompleteMonitorSetSearchVo extends TCompleteMonitorSet {
/**
* 多选导出或删除等操作
*/
@Schema(description = "选中ID,多个逗号分割")
private String ids;
/**
* 合同类型多选
*/
private String[] contractTypeArray;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema(description = "创建时间区间")
private LocalDateTime[] createTimes;
/**
* @Author fxj
* 查询数据起
**/
@Schema(description = "查询limit 开始")
private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
@Schema(description = "查询limit 数据条数")
private int limitEnd;
}
...@@ -149,7 +149,7 @@ public class TCompleteMonitorController { ...@@ -149,7 +149,7 @@ public class TCompleteMonitorController {
@Operation(description = "生成档案完整度监控") @Operation(description = "生成档案完整度监控")
@Inner @Inner
@PostMapping("/inner/createComlpeteMonitor") @PostMapping("/inner/createComlpeteMonitor")
public void createComlpeteMonitor() throws IllegalAccessException{ public void createComlpeteMonitor() {
tCompleteMonitorService.createComlpeteMonitor(); tCompleteMonitorService.createComlpeteMonitor();
} }
......
/*
* 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.controller;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCompleteMonitorSetBaseInfo;
import com.yifu.cloud.plus.v1.yifu.archives.service.TCompleteMonitorSetBaseInfoService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 完整度监控配置
*
* @author hgw
* @date 2025-02-26 15:18:51
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/tcompletemonitorsetbaseinfo")
@Tag(name = "完整度监控配置管理")
public class TCompleteMonitorSetBaseInfoController {
private final TCompleteMonitorSetBaseInfoService tCompleteMonitorSetBaseInfoService;
/**
* @param baseType 类型(1档案基础信息2默认联动信息3监控信息项)
* @Description: 获取list数据
* @Author: hgw
* @Date: 2025/2/27 11:49
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.yifu.cloud.plus.v1.yifu.archives.entity.TCompleteMonitorSetBaseInfo>>
**/
@Operation(summary = "获取list数据", description = "不分页查询")
@GetMapping("/getListByBaseType")
public R<List<TCompleteMonitorSetBaseInfo>> getListByBaseType(@RequestParam(required = false) String baseType) {
return R.ok(tCompleteMonitorSetBaseInfoService.getListByBaseType(baseType));
}
}
/*
* 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.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCompleteMonitorSet;
import com.yifu.cloud.plus.v1.yifu.archives.service.TCompleteMonitorSetService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorSetSearchVo;
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.log.annotation.SysLog;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 完整度监控配置
*
* @author hgw
* @date 2025-02-26 15:18:51
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/tcompletemonitorset")
@Tag(name = "完整度监控配置管理")
public class TCompleteMonitorSetController {
private final TCompleteMonitorSetService tCompleteMonitorSetService;
/**
* 简单分页查询
*
* @param page 分页对象
* @param tCompleteMonitorSet 完整度监控配置
* @return
*/
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TCompleteMonitorSet>> getTCompleteMonitorSetPage(Page<TCompleteMonitorSet> page, TCompleteMonitorSetSearchVo tCompleteMonitorSet) {
return new R<>(tCompleteMonitorSetService.getTCompleteMonitorSetPage(page, tCompleteMonitorSet));
}
/**
* 不分页查询
*
* @param tCompleteMonitorSet 完整度监控配置
* @return
*/
@Operation(summary = "不分页查询", description = "不分页查询")
@PostMapping("/noPage")
public R<List<TCompleteMonitorSet>> getTCompleteMonitorSetNoPage(@RequestBody TCompleteMonitorSetSearchVo tCompleteMonitorSet) {
return R.ok(tCompleteMonitorSetService.noPageDiy(tCompleteMonitorSet));
}
/**
* 通过id查询完整度监控配置
*
* @param id id
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询:hasPermission('archives_tcompletemonitorset_get')")
@GetMapping("/{id}")
@PreAuthorize("@pms.hasPermission('archives_tcompletemonitorset_get')")
public R<TCompleteMonitorSet> getById(@PathVariable("id") String id) {
return R.ok(tCompleteMonitorSetService.getById(id));
}
/**
* @Description: 获取可用的员工合同类型
* @Author: hgw
* @Date: 2025/2/27 15:24
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDictItem>>
**/
@Operation(summary = "获取在用的员工合同类型", description = "获取在用的员工合同类型")
@GetMapping("/getContractType")
public R<String> getContractType() {
return R.ok(tCompleteMonitorSetService.getContractType());
}
/**
* 新增完整度监控配置
*
* @param tCompleteMonitorSet 完整度监控配置
* @return R
*/
@Operation(summary = "新增完整度监控配置", description = "新增完整度监控配置:hasPermission('archives_tcompletemonitorset_add')")
@SysLog("新增完整度监控配置")
@PostMapping("/saveInfo")
@PreAuthorize("@pms.hasPermission('archives_tcompletemonitorset_add')")
public R<String> saveInfo(@RequestBody TCompleteMonitorSet tCompleteMonitorSet) {
return tCompleteMonitorSetService.saveOrUpdateInfo(tCompleteMonitorSet);
}
/**
* 修改完整度监控配置
*
* @param tCompleteMonitorSet 完整度监控配置
* @return R
*/
@Operation(summary = "修改完整度监控配置", description = "修改完整度监控配置:hasPermission('archives_tcompletemonitorset_edit')")
@SysLog("修改完整度监控配置")
@PostMapping("/updateInfoById")
@PreAuthorize("@pms.hasPermission('archives_tcompletemonitorset_edit')")
public R<String> updateInfoById(@RequestBody TCompleteMonitorSet tCompleteMonitorSet) {
if (Common.isEmpty(tCompleteMonitorSet.getId())) {
return R.failed("请传Id");
}
return tCompleteMonitorSetService.saveOrUpdateInfo(tCompleteMonitorSet);
}
/**
* 通过id删除完整度监控配置
*
* @param id id
* @return R
*/
@Operation(summary = "通过id删除完整度监控配置", description = "通过id删除完整度监控配置:hasPermission('archives_tcompletemonitorset_del')")
@SysLog("通过id删除完整度监控配置")
@DeleteMapping("/{id}")
@PreAuthorize("@pms.hasPermission('archives_tcompletemonitorset_del')")
public R<Boolean> removeById(@PathVariable String id) {
return R.ok(tCompleteMonitorSetService.removeById(id));
}
}
/*
* 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.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCompleteMonitorSetBaseInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 完整度监控配置
*
* @author hgw
* @date 2025-02-26 15:18:51
*/
@Mapper
public interface TCompleteMonitorSetBaseInfoMapper extends BaseMapper<TCompleteMonitorSetBaseInfo> {
/**
* @Description: 获取ids对应的所有的配置字段
* @Author: hgw
* @Date: 2025/2/26 17:25
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.archives.entity.TCompleteMonitorSetBaseInfo>
**/
List<TCompleteMonitorSetBaseInfo> getBaseInfoByIds(@Param("ids") String ids);
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCompleteMonitorSet;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 完整度监控配置
*
* @author hgw
* @date 2025-02-26 15:18:51
*/
@Mapper
public interface TCompleteMonitorSetMapper extends BaseMapper<TCompleteMonitorSet> {
/**
* 完整度监控配置简单分页查询
*
* @param tCompleteMonitorSet 完整度监控配置
* @return
*/
IPage<TCompleteMonitorSet> getTCompleteMonitorSetPage(Page<TCompleteMonitorSet> page, @Param("tCompleteMonitorSet") TCompleteMonitorSet tCompleteMonitorSet);
// 获取全部配置
List<TCompleteMonitorSet> getAllList();
// 获取已配置的合同类型
String getAllUseContractType(@Param("oldId") String oldId);
}
...@@ -125,4 +125,18 @@ public interface TEmployeeProjectMapper extends BaseMapper<TEmployeeProject> { ...@@ -125,4 +125,18 @@ public interface TEmployeeProjectMapper extends BaseMapper<TEmployeeProject> {
* @return * @return
*/ */
void batchUpdateEmpProjectCompleteStatus(@Param("idList") List<String> idList, @Param("isComplete") String isComplete); void batchUpdateEmpProjectCompleteStatus(@Param("idList") List<String> idList, @Param("isComplete") String isComplete);
// 配置的不限制完整与否,则根据合同类型,更新为完整
void batchUpdateEmpProjectCompleteStatusByType(@Param("contractType") String contractType, @Param("deptNo") String deptNo);
// 代理的默认为完整 2025-2-26 09:34:54 倩倩评审1.7.7时说的
void updateTrueCompleteByAgent();
// 查找需要判断完整与否的项目档案员工合同类型
List<String> getNeedJudgeCompleteType(@Param("deptNo") String deptNo);
// 根据字段与表与列查询是否继续判断完整的项目ID
List<String> getNeedNextJudgeCompleteByColumnAndEmpProjectId(@Param("type") String type, @Param("deptNo") String deptNo
, @Param("columnInfo") String columnInfo, @Param("tableInfo") String tableInfo
, @Param("empProjectIdList") List<String> empProjectIdList);
} }
...@@ -45,7 +45,7 @@ public interface TCompleteMonitorService extends IService<TCompleteMonitor> { ...@@ -45,7 +45,7 @@ public interface TCompleteMonitorService extends IService<TCompleteMonitor> {
* 档案完整度监控生成 * 档案完整度监控生成
* @return * @return
*/ */
void createComlpeteMonitor() throws IllegalAccessException; void createComlpeteMonitor();
/** /**
* 根据项目编码刷新项目完整度状态 * 根据项目编码刷新项目完整度状态
......
/*
* 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.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCompleteMonitorSetBaseInfo;
import java.util.List;
/**
* 完整度监控配置
*
* @author hgw
* @date 2025-02-26 15:18:51
*/
public interface TCompleteMonitorSetBaseInfoService extends IService<TCompleteMonitorSetBaseInfo> {
List<TCompleteMonitorSetBaseInfo> getListByBaseType(String baseType);
}
/*
* 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.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCompleteMonitorSet;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorSetSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import java.util.List;
/**
* 完整度监控配置
*
* @author hgw
* @date 2025-02-26 15:18:51
*/
public interface TCompleteMonitorSetService extends IService<TCompleteMonitorSet> {
/**
* 完整度监控配置简单分页查询
*
* @param tCompleteMonitorSet 完整度监控配置
* @return
*/
IPage<TCompleteMonitorSet> getTCompleteMonitorSetPage(Page<TCompleteMonitorSet> page, TCompleteMonitorSetSearchVo tCompleteMonitorSet);
List<TCompleteMonitorSet> noPageDiy(TCompleteMonitorSetSearchVo searchVo);
/**
* @Description: 获取在用的员工合同类型
* @Author: hgw
* @Date: 2025/2/27 16:19
* @return: java.lang.String
**/
String getContractType();
/**
* @Description: 新增或编辑
* @Author: hgw
* @Date: 2025/2/27 16:19
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R<String> saveOrUpdateInfo(TCompleteMonitorSet tCompleteMonitorSet);
}
...@@ -78,6 +78,10 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap ...@@ -78,6 +78,10 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
private final TArchivesLimitMapper tArchivesLimitMapper; private final TArchivesLimitMapper tArchivesLimitMapper;
// 完整度监控配置
private final TCompleteMonitorSetMapper tCompleteMonitorSetMapper;
private final TCompleteMonitorSetBaseInfoMapper tCompleteMonitorSetBaseInfoMapper;
private final OSSUtil ossUtil; private final OSSUtil ossUtil;
private final AtomicInteger atomicInteger = new AtomicInteger(0); private final AtomicInteger atomicInteger = new AtomicInteger(0);
...@@ -158,11 +162,11 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap ...@@ -158,11 +162,11 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
} }
@Override @Override
public void createComlpeteMonitor() throws IllegalAccessException { public void createComlpeteMonitor() {
//先删除所有的档案监控数据 //先删除所有的档案监控数据
baseMapper.deleteAllMonitorInfo(); baseMapper.deleteAllMonitorInfo();
//批量查询项目档案的是否完整状态 //批量查询项目档案的是否完整状态
List<TCompleteMonitorFlagVo> flagList = baseMapper.checkEmpProjectCompleteFlag(null); /*List<TCompleteMonitorFlagVo> flagList = baseMapper.checkEmpProjectCompleteFlag(null);
if (!flagList.isEmpty()) { if (!flagList.isEmpty()) {
List<String> projectIdList = new ArrayList<>(); List<String> projectIdList = new ArrayList<>();
List<String> projectNotIdList = new ArrayList<>(); List<String> projectNotIdList = new ArrayList<>();
...@@ -184,7 +188,8 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap ...@@ -184,7 +188,8 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
if (!projectIdList.isEmpty()) { if (!projectIdList.isEmpty()) {
projectMapper.batchUpdateEmpProjectCompleteStatus(projectNotIdList, CommonConstants.ONE_STRING); projectMapper.batchUpdateEmpProjectCompleteStatus(projectNotIdList, CommonConstants.ONE_STRING);
} }
} }*/
this.judgeProjectCompleteCore(null);
//查询项目维度的信息 //查询项目维度的信息
List<TCompleteMonitor> list = baseMapper.getAllMonitorEmpList(null); List<TCompleteMonitor> list = baseMapper.getAllMonitorEmpList(null);
...@@ -206,7 +211,7 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap ...@@ -206,7 +211,7 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
public void updateProjectStatusByDeptNo(String deptNo) throws IllegalAccessException{ public void updateProjectStatusByDeptNo(String deptNo) throws IllegalAccessException{
//批量查询项目档案的是否完整状态 //批量查询项目档案的是否完整状态
List<TCompleteMonitorFlagVo> flagList = baseMapper.checkEmpProjectCompleteFlag(deptNo); /*List<TCompleteMonitorFlagVo> flagList = baseMapper.checkEmpProjectCompleteFlag(deptNo);
if (!flagList.isEmpty()) { if (!flagList.isEmpty()) {
List<String> projectIdList = new ArrayList<>(); List<String> projectIdList = new ArrayList<>();
List<String> projectNotIdList = new ArrayList<>(); List<String> projectNotIdList = new ArrayList<>();
...@@ -227,7 +232,8 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap ...@@ -227,7 +232,8 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
if (!projectNotIdList.isEmpty()) { if (!projectNotIdList.isEmpty()) {
projectMapper.batchUpdateEmpProjectCompleteStatus(projectNotIdList, CommonConstants.ONE_STRING); projectMapper.batchUpdateEmpProjectCompleteStatus(projectNotIdList, CommonConstants.ONE_STRING);
} }
} }*/
this.judgeProjectCompleteCore(deptNo);
//删除项目监控表数据 //删除项目监控表数据
baseMapper.deleteMonitorInfoByDeptNo(deptNo); baseMapper.deleteMonitorInfoByDeptNo(deptNo);
...@@ -239,44 +245,98 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap ...@@ -239,44 +245,98 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
/** /**
* @param deptNo 项目编码 * @param deptNo 项目编码
* @param projectIdList 完整的项目 * @Description:
* @param projectNotIdList 不完整的项目
* @Description:
* @Author: hgw * @Author: hgw
* @Date: 2025/2/25 15:30 * @Date: 2025/2/25 15:30
* @return: void * @return: void
**/ **/
/*private void judgeProjectCompleteCore(String deptNo, List<String> projectIdList, List<String> projectNotIdList) { private void judgeProjectCompleteCore(String deptNo) {
// 1 查找所有不完整的项目,代理的直接完整,员工合同类型为空的,直接不完整, // 1:员工类型为代理的 直接完整
List<TCompleteMonitorFlagVo> flagList = baseMapper.checkEmpProjectCompleteFlag(deptNo); projectMapper.updateTrueCompleteByAgent();
// 2 根据完整度配置,取对应类型的分别查询各个表,一旦有字段为空,则不完整 // 查询需要判断的数量有多少
List<String> typeList = projectMapper.getNeedJudgeCompleteType(deptNo);
// 3 更新项目档案是否完整 if (typeList != null && !typeList.isEmpty()) {
// 查找配置
List<TCompleteMonitorSet> setList = tCompleteMonitorSetMapper.getAllList();
Map<String, String> setMap = new HashMap<>();
if (setList != null && !setList.isEmpty()) {
String[] strArr;
String baseId;
for (TCompleteMonitorSet set:setList) {
strArr = set.getContractType().split(",");
baseId = set.getBaseId();
for (String str : strArr) {
setMap.put(str, baseId);
}
}
}
// 默认配置
String baseSet = setMap.get("-1");
List<TCompleteMonitorSetBaseInfo> baseSetList = tCompleteMonitorSetBaseInfoMapper.getBaseInfoByIds(baseSet);
Map<String, List<TCompleteMonitorSetBaseInfo>> baseSetMap = new HashMap<>();
baseSetMap.put(baseSet, baseSetList);
// 表示有了其他配置
if (setMap.size() > 1) {
String useSet;
for (String type : typeList) {
useSet = setMap.get(type);
if (Common.isEmpty(useSet)) {
useSet = baseSet;
}
if ("-1".equals(useSet)) {
// -1表示配置的为空,直接完整
projectMapper.batchUpdateEmpProjectCompleteStatusByType(type, deptNo);
} else {
baseSetList = baseSetMap.get(useSet);
if (baseSetList == null) {
baseSetList = tCompleteMonitorSetBaseInfoMapper.getBaseInfoByIds(useSet);
baseSetMap.put(useSet, baseSetList);
}
doJudgeCore(type, deptNo, baseSetList);
}
}
} else {
// 表示都用默认配置
doJudgeCore(null, deptNo, baseSetList);
}
}
}
List<TCompleteMonitorFlagVo> flagList = baseMapper.checkEmpProjectCompleteFlag(deptNo); /**
if (!flagList.isEmpty()) { * @param type 合同类型
String projectId; * @param deptNo 项目编码
for(TCompleteMonitorFlagVo flagVo : flagList) { * @param baseSetList 配置list
boolean flag = checkObjFieldIsNull(flagVo); * @Description: 核心配置
projectId = flagVo.getEmpProjectId(); * @Author: hgw
if(!flag){ * @Date: 2025/2/26 17:45
projectIdList.add(projectId); * @return: void
} else { **/
projectNotIdList.add(projectId); private void doJudgeCore(String type, String deptNo, List<TCompleteMonitorSetBaseInfo> baseSetList) {
List<String> empProjectId;
if (baseSetList != null && !baseSetList.isEmpty()) {
empProjectId = null;
String tableInfo;
for (TCompleteMonitorSetBaseInfo baseInfo : baseSetList) {
tableInfo = baseInfo.getBaseTable();
if ("t_employee_info".equals(tableInfo) || "t_employee_project".equals(tableInfo)) {
tableInfo = null;
}
// 根据配置,逐个查询是否有空值:
empProjectId = projectMapper.getNeedNextJudgeCompleteByColumnAndEmpProjectId(
type, deptNo, baseInfo.getBaseColumn(), tableInfo, empProjectId);
if (empProjectId == null || empProjectId.isEmpty()) {
break;
} }
} }
//批量更新 // 这些事经过筛选的项目id,表示完整
if (!projectIdList.isEmpty()) { if (empProjectId != null && !empProjectId.isEmpty()) {
projectMapper.batchUpdateEmpProjectCompleteStatus(projectIdList, CommonConstants.ZERO_STRING); projectMapper.batchUpdateEmpProjectCompleteStatus(empProjectId, CommonConstants.ZERO_STRING);
}
if (!projectNotIdList.isEmpty()) {
projectMapper.batchUpdateEmpProjectCompleteStatus(projectNotIdList, CommonConstants.ONE_STRING);
} }
} }
}*/ }
/** /**
* *
......
/*
* 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.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCompleteMonitorSetBaseInfo;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TCompleteMonitorSetBaseInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TCompleteMonitorSetBaseInfoService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 完整度监控配置
*
* @author hgw
* @date 2025-02-26 15:18:51
*/
@Log4j2
@Service
public class TCompleteMonitorSetBaseInfoServiceImpl extends ServiceImpl<TCompleteMonitorSetBaseInfoMapper, TCompleteMonitorSetBaseInfo> implements TCompleteMonitorSetBaseInfoService {
@Override
public List<TCompleteMonitorSetBaseInfo> getListByBaseType(String baseType) {
LambdaQueryWrapper<TCompleteMonitorSetBaseInfo> wrapper = Wrappers.lambdaQuery();
if (Common.isNotNull(baseType)) {
wrapper.in(TCompleteMonitorSetBaseInfo::getBaseType, baseType);
}
wrapper.orderByAsc(TCompleteMonitorSetBaseInfo::getId);
return baseMapper.selectList(wrapper);
}
}
/*
* 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.service.impl;
import cn.hutool.core.util.ArrayUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCompleteMonitorSet;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TCompleteMonitorSetMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TCompleteMonitorSetService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TCompleteMonitorSetSearchVo;
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.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 完整度监控配置
*
* @author hgw
* @date 2025-02-26 15:18:51
*/
@Log4j2
@Service
public class TCompleteMonitorSetServiceImpl extends ServiceImpl<TCompleteMonitorSetMapper, TCompleteMonitorSet> implements TCompleteMonitorSetService {
/**
* 完整度监控配置简单分页查询
*
* @param tCompleteMonitorSet 完整度监控配置
* @return
*/
@Override
public IPage<TCompleteMonitorSet> getTCompleteMonitorSetPage(Page<TCompleteMonitorSet> page, TCompleteMonitorSetSearchVo tCompleteMonitorSet) {
return baseMapper.getTCompleteMonitorSetPage(page, tCompleteMonitorSet);
}
@Override
public List<TCompleteMonitorSet> noPageDiy(TCompleteMonitorSetSearchVo searchVo) {
LambdaQueryWrapper<TCompleteMonitorSet> wrapper = buildQueryWrapper(searchVo);
List<String> idList = Common.getList(searchVo.getIds());
if (Common.isNotNull(idList)) {
wrapper.in(TCompleteMonitorSet::getId, idList);
}
if (searchVo.getLimitStart() >= 0 && searchVo.getLimitEnd() > 0) {
wrapper.last(" limit " + searchVo.getLimitStart() + "," + searchVo.getLimitEnd());
}
wrapper.orderByDesc(BaseEntity::getCreateTime);
return baseMapper.selectList(wrapper);
}
private LambdaQueryWrapper<TCompleteMonitorSet> buildQueryWrapper(TCompleteMonitorSetSearchVo entity) {
LambdaQueryWrapper<TCompleteMonitorSet> wrapper = Wrappers.lambdaQuery();
if (ArrayUtil.isNotEmpty(entity.getCreateTimes())) {
wrapper.ge(TCompleteMonitorSet::getCreateTime, entity.getCreateTimes()[0])
.le(TCompleteMonitorSet::getCreateTime,
entity.getCreateTimes()[1]);
}
if (Common.isNotNull(entity.getCreateName())) {
wrapper.eq(TCompleteMonitorSet::getCreateName, entity.getCreateName());
}
return wrapper;
}
/**
* @Description: 获取在用的员工合同类型
* @Author: hgw
* @Date: 2025/2/27 16:16
* @return: java.lang.String
**/
@Override
public String getContractType() {
return baseMapper.getAllUseContractType(null);
}
/**
* @Description: 新增或编辑
* @Author: hgw
* @Date: 2025/2/27 16:16
* @return: java.lang.String
**/
@Override
public R<String> saveOrUpdateInfo(TCompleteMonitorSet tCompleteMonitorSet) {
if (Common.isEmpty(tCompleteMonitorSet.getContractType()) || Common.isEmpty(tCompleteMonitorSet.getContractTypeName())) {
return R.failed("请传合同类型与合同类型名称");
}
if (Common.isEmpty(tCompleteMonitorSet.getIsMonitor())) {
return R.failed("请传是否监控0否1是");
}
if (Common.isEmpty(tCompleteMonitorSet.getBaseId())) {
return R.failed("请传BaseId,为空传-1");
}
String allUseContractType = baseMapper.getAllUseContractType(tCompleteMonitorSet.getId());
if (Common.isNotNull(allUseContractType)) {
String[] contractTypeArr = tCompleteMonitorSet.getContractType().split(",");
String[] contractTypeNameArr = tCompleteMonitorSet.getContractTypeName().split(",");
if (contractTypeArr.length != contractTypeNameArr.length) {
return R.failed("请检查合同类型与合同类型名称的个数是否一致");
}
String[] allUseContractTypeArr = allUseContractType.split(",");
Map<String, Integer> curMap = new HashMap<>();
for (String str : allUseContractTypeArr) {
curMap.put(str, CommonConstants.ONE_INT);
}
String curContractType = null;
for (String str : contractTypeArr) {
if (curMap.get(str) != null) {
if (Common.isEmpty(curContractType)) {
curContractType = str;
} else {
curContractType += "、" + str;
}
}
}
if (Common.isNotNull(curContractType)) {
return R.failed("员工合同类型“" + curContractType + "”已存在");
}
}
YifuUser user = SecurityUtils.getUser();
if (user == null || Common.isEmpty(user.getNickname())) {
return R.failed("请登录!");
}
tCompleteMonitorSet.setUpdateTime(LocalDateTime.now());
tCompleteMonitorSet.setUpdateName(user.getNickname());
this.saveOrUpdate(tCompleteMonitorSet);
return R.ok(CommonConstants.SAVE_SUCCESS);
}
}
...@@ -1683,7 +1683,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -1683,7 +1683,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
} }
} catch (Exception e) { } catch (Exception e) {
log.error("档案预入职C端保存异常:", e); log.error("档案预入职C端保存异常:", e);
throw new RuntimeException("保存失败,请联系管理员!!预入职主键【" + main.getId() + "】"); throw new RuntimeException("保存失败,请联系管理员!!预入职主键【" + main.getId() + "】身份证=" + main.getEmpIdcard());
} }
} }
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.archives.mapper.TCompleteMonitorSetBaseInfoMapper">
<resultMap id="tCompleteMonitorSetBaseInfoMap" type="com.yifu.cloud.plus.v1.yifu.archives.entity.TCompleteMonitorSetBaseInfo">
<id property="id" column="ID"/>
<result property="baseType" column="BASE_TYPE"/>
<result property="baseNum" column="BASE_NUM"/>
<result property="baseName" column="BASE_NAME"/>
<result property="baseRemark" column="BASE_REMARK"/>
<result property="isMonitor" column="IS_MONITOR"/>
<result property="baseColumn" column="BASE_COLUMN"/>
<result property="baseTable" column="BASE_TABLE"/>
</resultMap>
<!--获取ids对应的所有的配置字段-->
<select id="getBaseInfoByIds" resultMap="tCompleteMonitorSetBaseInfoMap">
SELECT a.BASE_TABLE,GROUP_CONCAT(a.BASE_COLUMN SEPARATOR '*') BASE_COLUMN
FROM t_complete_monitor_set_base_info a
where a.id in (${ids})
GROUP BY a.BASE_TABLE
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.archives.mapper.TCompleteMonitorSetMapper">
<resultMap id="tCompleteMonitorSetMap" type="com.yifu.cloud.plus.v1.yifu.archives.entity.TCompleteMonitorSet">
<id property="id" column="ID"/>
<result property="isMonitor" column="IS_MONITOR"/>
<result property="contractType" column="CONTRACT_TYPE"/>
<result property="contractTypeName" column="CONTRACT_TYPE_NAME"/>
<result property="baseId" column="BASE_ID"/>
<result property="createBy" column="CREATE_BY"/>
<result property="updateBy" column="UPDATE_BY"/>
<result property="updateName" column="UPDATE_NAME"/>
<result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="updateTime" column="UPDATE_TIME"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.IS_MONITOR,
a.CONTRACT_TYPE,
a.CONTRACT_TYPE_NAME,
a.BASE_ID,
a.CREATE_BY,
a.UPDATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_TIME,
a.UPDATE_NAME
</sql>
<sql id="tCompleteMonitorSet_where">
<if test="tCompleteMonitorSet != null">
<if test="tCompleteMonitorSet.id != null and tCompleteMonitorSet.id.trim() != ''">
AND a.ID = #{tCompleteMonitorSet.id}
</if>
<if test="tCompleteMonitorSet.isMonitor != null and tCompleteMonitorSet.isMonitor.trim() != ''">
AND a.IS_MONITOR = #{tCompleteMonitorSet.isMonitor}
</if>
<if test="tCompleteMonitorSet.contractType != null and tCompleteMonitorSet.contractType.trim() != ''">
AND a.CONTRACT_TYPE = #{tCompleteMonitorSet.contractType}
</if>
<if test="tEmployeeProject.contractTypeArray != null and tEmployeeProject.contractTypeArray.length > 0">
AND a.CONTRACT_TYPE in
<foreach item="idStr" index="index" collection="tEmployeeProject.contractTypeArray" open="("
separator="," close=")">
#{idStr}
</foreach>
</if>
<if test="tCompleteMonitorSet.baseId != null and tCompleteMonitorSet.baseId.trim() != ''">
AND a.BASE_ID = #{tCompleteMonitorSet.baseId}
</if>
<if test="tCompleteMonitorSet.createBy != null and tCompleteMonitorSet.createBy.trim() != ''">
AND a.CREATE_BY = #{tCompleteMonitorSet.createBy}
</if>
<if test="tCompleteMonitorSet.updateBy != null and tCompleteMonitorSet.updateBy.trim() != ''">
AND a.UPDATE_BY = #{tCompleteMonitorSet.updateBy}
</if>
<if test="tCompleteMonitorSet.createName != null and tCompleteMonitorSet.createName.trim() != ''">
AND a.CREATE_NAME = #{tCompleteMonitorSet.createName}
</if>
<if test="tCompleteMonitorSet.updateName != null and tCompleteMonitorSet.updateName.trim() != ''">
AND a.UPDATE_NAME = #{tCompleteMonitorSet.updateName}
</if>
<if test="tCompleteMonitorSet.createTime != null">
AND a.CREATE_TIME = #{tCompleteMonitorSet.createTime}
</if>
<if test="tCompleteMonitorSet.updateTime != null">
AND a.UPDATE_TIME = #{tCompleteMonitorSet.updateTime}
</if>
</if>
</sql>
<!--tCompleteMonitorSet简单分页查询-->
<select id="getTCompleteMonitorSetPage" resultMap="tCompleteMonitorSetMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_complete_monitor_set a
<where>
1=1
<include refid="tCompleteMonitorSet_where"/>
</where>
</select>
<!-- 获取所有基础配置 -->
<select id="getAllList" resultMap="tCompleteMonitorSetMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_complete_monitor_set a
</select>
<!-- 获取已配置的合同类型,前端使用 -->
<select id="getAllUseContractType" resultType="java.lang.String">
SELECT
GROUP_CONCAT(CONTRACT_TYPE)
FROM t_complete_monitor_set a
where a.id != '1'
<if test="oldId != null and oldId.trim() != ''">
AND a.ID != #{oldId}
</if>
limit 1
</select>
</mapper>
...@@ -1132,4 +1132,74 @@ ...@@ -1132,4 +1132,74 @@
#{item} #{item}
</foreach> </foreach>
</update> </update>
<!-- 批量刷新项目档案的是否完整状态 -->
<update id="batchUpdateEmpProjectCompleteStatusByType">
update
t_employee_project a LEFT JOIN t_employee_info e on a.emp_id=e.id
set a.IS_COMPLETE = '0'
where a.CONTRACT_TYPE = #{contractType}
and a.IS_COMPLETE = '1' and a.DELETE_FLAG ='0' and a.EMP_NATRUE != '2' and a.PROJECT_STATUS = 0
and e.EMP_PHONE is not null
and a.CONTRACT_TYPE != ''
and e.EMP_SEX is not null
and e.EMP_BIRTHDAY is not null
<if test="deptNo != null and deptNo.trim() != ''">
and a.DEPT_NO = #{deptNo}
</if>
</update>
<!-- 员工类型为代理的,默认完整 -->
<update id="updateTrueCompleteByAgent">
update t_employee_project a set a.IS_COMPLETE = '0' where a.EMP_NATRUE = '2' and a.IS_COMPLETE = '1'
</update>
<!-- 基础信息完整,有可能完整的 -->
<select id="getNeedJudgeCompleteType" resultType="java.lang.String" >
select
a.CONTRACT_TYPE
from t_employee_project a
LEFT JOIN t_employee_info e on a.emp_id=e.id
where a.IS_COMPLETE = '1' and a.DELETE_FLAG ='0' and a.EMP_NATRUE != '2' and a.PROJECT_STATUS = 0
and e.EMP_PHONE is not null
and a.CONTRACT_TYPE != ''
and e.EMP_SEX is not null
and e.EMP_BIRTHDAY is not null
<if test="deptNo != null and deptNo.trim() != ''">
and a.DEPT_NO = #{deptNo}
</if>
group by a.CONTRACT_TYPE
</select>
<!-- 基础信息完整,有可能完整的 -->
<select id="getNeedNextJudgeCompleteByColumnAndEmpProjectId" resultType="java.lang.String" >
select
a.id
from t_employee_project a
LEFT JOIN t_employee_info e on a.emp_id=e.id
<if test="tableInfo != null and tableInfo.trim() != ''">
LEFT JOIN ${tableInfo}
</if>
where a.IS_COMPLETE = '1' and a.DELETE_FLAG ='0' and a.EMP_NATRUE != '2' and a.PROJECT_STATUS = 0
and e.EMP_PHONE is not null
and a.CONTRACT_TYPE != ''
and e.EMP_SEX is not null
and e.EMP_BIRTHDAY is not null
<if test="type != null and type.trim() != ''">
and a.CONTRACT_TYPE = #{type}
</if>
<if test="deptNo != null and deptNo.trim() != ''">
and a.DEPT_NO = #{deptNo}
</if>
<if test="columnInfo != null and columnInfo.trim() != ''">
and (${columnInfo}) = 1
</if>
<if test="empProjectIdList != null and empProjectIdList.size > 0">
AND a.ID in
<foreach item="items" index="index" collection="empProjectIdList" open="(" separator="," close=")">
#{items}
</foreach>
</if>
group by a.id
</select>
</mapper> </mapper>
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
<if test="dept.name != null and dept.name != ''"> <if test="dept.name != null and dept.name != ''">
AND d.name like concat('%', #{dept.name}, '%') AND d.name like concat('%', #{dept.name}, '%')
</if> </if>
order by d.create_time desc,d.sort_order asc order by d.sort_order asc,d.create_time desc
</select> </select>
<select id="cspDeptUserList" resultType="com.yifu.cloud.plus.v1.yifu.admin.api.vo.SysDeptVo"> <select id="cspDeptUserList" resultType="com.yifu.cloud.plus.v1.yifu.admin.api.vo.SysDeptVo">
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
<if test="dept.projectNo != null and dept.projectNo != ''"> <if test="dept.projectNo != null and dept.projectNo != ''">
AND d.project_no = #{dept.projectNo} AND d.project_no = #{dept.projectNo}
</if> </if>
order by d.create_time desc,d.sort_order asc order by d.sort_order asc,d.create_time desc
</select> </select>
<select id="checkDeptNameUnique" resultMap="BaseResultMap"> <select id="checkDeptNameUnique" resultMap="BaseResultMap">
......
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