项目管理
This commit is contained in:
parent
30dba589de
commit
6bf75eeb6a
|
|
@ -0,0 +1,70 @@
|
|||
package com.bonus.web.controller.archive;
|
||||
|
||||
import com.bonus.common.annotation.RequiresPermissions;
|
||||
import com.bonus.common.annotation.SysLog;
|
||||
import com.bonus.common.core.controller.BaseController;
|
||||
import com.bonus.common.core.domain.AjaxResult;
|
||||
import com.bonus.common.core.domain.R;
|
||||
import com.bonus.common.core.page.TableDataInfo;
|
||||
import com.bonus.common.enums.OperaType;
|
||||
import com.bonus.system.domain.SysEncryType;
|
||||
import com.bonus.web.domain.ArchivalCatalogueDto;
|
||||
import com.bonus.web.domain.ProjectDto;
|
||||
import com.bonus.web.service.ProjectService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author:liang.chao
|
||||
* @Date:2025/9/11 - 9:50
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/project")
|
||||
@Slf4j
|
||||
public class ProjectController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private ProjectService service;
|
||||
@ApiOperation(value = "项目管理")
|
||||
@GetMapping("getProjectList")
|
||||
@SysLog(title = "项目管理列表", module = "档案管理->项目管理", businessType = OperaType.QUERY, details = "项目管理列表", logType = 1)
|
||||
@RequiresPermissions("project:manage:list")
|
||||
public TableDataInfo getProjectList(ProjectDto dto) {
|
||||
try {
|
||||
startPage();
|
||||
List<ProjectDto> list = service.list(dto);
|
||||
return getDataTable(list);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
return getDataTable(new ArrayList<>());
|
||||
}
|
||||
}
|
||||
@ApiOperation(value = "档案目录下拉")
|
||||
@GetMapping("getFileCatalogSelect")
|
||||
@SysLog(title = "档案目录下拉", module = "档案管理->档案目录下拉", businessType = OperaType.QUERY, details = "档案目录下拉", logType = 1)
|
||||
@RequiresPermissions("file:catalog:select")
|
||||
public AjaxResult getFileCatalogSelect(ArchivalCatalogueDto dto) {
|
||||
try {
|
||||
List<ArchivalCatalogueDto> list = service.getFileCatalogSelect(dto);
|
||||
return AjaxResult.success(list);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
return AjaxResult.error("请求出错了");
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping("updateContentsName")
|
||||
@SysLog(title = "配置档案类型", module = "档案管理->配置档案类型", businessType = OperaType.UPDATE, details = "配置档案类型", logType = 1)
|
||||
@RequiresPermissions("contents:name:edit")
|
||||
public AjaxResult updateContentsName(@RequestBody ProjectDto projectDto) {
|
||||
return service.updateContentsName(projectDto);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,105 @@
|
|||
package com.bonus.web.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author:liang.chao
|
||||
* @Date:2025/9/11 - 11:05
|
||||
*/
|
||||
@Data
|
||||
public class DaKyProFilesContents {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private String proId;
|
||||
|
||||
/**
|
||||
* 分类名称/档案名称
|
||||
*/
|
||||
private String contentName;
|
||||
|
||||
/**
|
||||
* 父节点id
|
||||
*/
|
||||
private String parentId;
|
||||
|
||||
/**
|
||||
* 层级
|
||||
*/
|
||||
private String level;
|
||||
|
||||
/**
|
||||
* 分类号/案卷排序号
|
||||
*/
|
||||
private Long sort;
|
||||
|
||||
/**
|
||||
* 档案标识代码
|
||||
*/
|
||||
private String markCode;
|
||||
|
||||
/**
|
||||
* 案卷期限
|
||||
*/
|
||||
private String term;
|
||||
|
||||
/**
|
||||
* 归档责任单位
|
||||
*/
|
||||
private String unitName;
|
||||
|
||||
/**
|
||||
* 来源 1.本系统上传 2.智慧现场
|
||||
*/
|
||||
private String dataSource;
|
||||
|
||||
/**
|
||||
* 是否独有 0.否 1.是
|
||||
*/
|
||||
private String isUnique;
|
||||
|
||||
/**
|
||||
* 完整性确认状态 0.未确认 1.已确认 ---确认后不能进行操作
|
||||
*/
|
||||
private String integrityStatus;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String createTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private String updateTime;
|
||||
|
||||
/**
|
||||
* 创建人ID
|
||||
*/
|
||||
private Long createUserId;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
private String createUserName;
|
||||
|
||||
/**
|
||||
* 修改人ID
|
||||
*/
|
||||
private Long updateUserId;
|
||||
|
||||
/**
|
||||
* 修改人姓名
|
||||
*/
|
||||
private String updateUserName;
|
||||
|
||||
/**
|
||||
* 是否删除 0.删除 1.未删除
|
||||
*/
|
||||
private String delFlag;
|
||||
}
|
||||
|
|
@ -0,0 +1,118 @@
|
|||
package com.bonus.web.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author:liang.chao
|
||||
* @Date:2025/9/11 - 10:05
|
||||
*/
|
||||
@Data
|
||||
public class ProjectDto {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
private String proName;
|
||||
|
||||
/**
|
||||
* 项目编码
|
||||
*/
|
||||
private String proCode;
|
||||
|
||||
/**
|
||||
* 单项工程名称
|
||||
*/
|
||||
private String singleProName;
|
||||
|
||||
/**
|
||||
* 单项工程编码
|
||||
*/
|
||||
private String singleProCode;
|
||||
|
||||
/**
|
||||
* 工程类型(字典表配置)
|
||||
*/
|
||||
private String proType;
|
||||
private String proTypeName;
|
||||
|
||||
/**
|
||||
* 电压等级(字典表配置)
|
||||
*/
|
||||
private String voltageLevel;
|
||||
private String voltageLevelName;
|
||||
|
||||
/**
|
||||
* 计划开工日期
|
||||
*/
|
||||
private String planStartDate;
|
||||
|
||||
/**
|
||||
* 计划竣工日期
|
||||
*/
|
||||
private String planEndDate;
|
||||
|
||||
/**
|
||||
* 计划投产日期
|
||||
*/
|
||||
private String planTcDate;
|
||||
|
||||
/**
|
||||
* 工程状态(字典表配置)
|
||||
*/
|
||||
private String proStatus;
|
||||
private String proStatusName;
|
||||
|
||||
/**
|
||||
* 匹配档案目录类型名称
|
||||
*/
|
||||
private String contentsName;
|
||||
|
||||
/**
|
||||
* 当前档案上传数
|
||||
*/
|
||||
private Long fileUplaudNum;
|
||||
|
||||
/**
|
||||
* 档案状态 0.未归档移交 1.已归档移交
|
||||
*/
|
||||
private String fileStatus;
|
||||
|
||||
/**
|
||||
* 创建日期
|
||||
*/
|
||||
private String createTime;
|
||||
|
||||
/**
|
||||
* 修改日期
|
||||
*/
|
||||
private String updateTime;
|
||||
|
||||
/**
|
||||
* 创建人ID
|
||||
*/
|
||||
private Long createUserId;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
private String createUserName;
|
||||
|
||||
/**
|
||||
* 修改人ID
|
||||
*/
|
||||
private Long updateUserId;
|
||||
|
||||
/**
|
||||
* 修改人姓名
|
||||
*/
|
||||
private String updateUserName;
|
||||
|
||||
/**
|
||||
* 是否删除 0.删除 1.未删除
|
||||
*/
|
||||
private String delFlag;
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package com.bonus.web.mapper;
|
||||
|
||||
import com.bonus.web.domain.ArchivalCatalogueDto;
|
||||
import com.bonus.web.domain.DaKyProFilesContents;
|
||||
import com.bonus.web.domain.ProjectDto;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author:liang.chao
|
||||
* @Date:2025/9/9 - 14:47
|
||||
*/
|
||||
@Mapper
|
||||
public interface ProjectMapper {
|
||||
List<ProjectDto> list(ProjectDto dto);
|
||||
|
||||
List<ArchivalCatalogueDto> getFileCatalogSelect(ArchivalCatalogueDto dto);
|
||||
|
||||
Integer updateContentsName(ProjectDto projectDto);
|
||||
|
||||
Integer insertDakyProFilesContents(DaKyProFilesContents dakyProFilesContents);
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.bonus.web.service;
|
||||
|
||||
import com.bonus.common.core.domain.AjaxResult;
|
||||
import com.bonus.web.domain.ArchivalCatalogueDto;
|
||||
import com.bonus.web.domain.ProjectDto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author:liang.chao
|
||||
* @Date:2025/9/11 - 10:04
|
||||
*/
|
||||
public interface ProjectService {
|
||||
|
||||
List<ProjectDto> list(ProjectDto dto);
|
||||
|
||||
List<ArchivalCatalogueDto> getFileCatalogSelect(ArchivalCatalogueDto dto);
|
||||
|
||||
AjaxResult updateContentsName(ProjectDto projectDto);
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
package com.bonus.web.service.impl;
|
||||
|
||||
import com.bonus.common.core.domain.AjaxResult;
|
||||
import com.bonus.web.domain.ArchivalCatalogueDto;
|
||||
import com.bonus.web.domain.DaKyProFilesContents;
|
||||
import com.bonus.web.domain.ProjectDto;
|
||||
import com.bonus.web.mapper.ProjectMapper;
|
||||
import com.bonus.web.service.ProjectService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.bonus.common.utils.SecurityUtils.getLoginUser;
|
||||
|
||||
/**
|
||||
* @Author:liang.chao
|
||||
* @Date:2025/9/11 - 10:05
|
||||
*/
|
||||
@Service
|
||||
public class ProjectServiceImpl implements ProjectService {
|
||||
|
||||
@Autowired
|
||||
private ProjectMapper projectMapper;
|
||||
|
||||
@Override
|
||||
public List<ProjectDto> list(ProjectDto dto) {
|
||||
return projectMapper.list(dto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ArchivalCatalogueDto> getFileCatalogSelect(ArchivalCatalogueDto dto) {
|
||||
return projectMapper.getFileCatalogSelect(dto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult updateContentsName(ProjectDto projectDto) {
|
||||
Integer num = projectMapper.updateContentsName(projectDto);
|
||||
if (num > 0) {
|
||||
// 档案管理中新增一条目录
|
||||
DaKyProFilesContents dakyProFilesContents = new DaKyProFilesContents();
|
||||
dakyProFilesContents.setProId(projectDto.getId());
|
||||
dakyProFilesContents.setContentName(projectDto.getContentsName());
|
||||
dakyProFilesContents.setLevel("1");
|
||||
dakyProFilesContents.setSort(0L);
|
||||
dakyProFilesContents.setCreateUserId(getLoginUser().getUserId());
|
||||
dakyProFilesContents.setCreateUserName(getLoginUser().getUsername());
|
||||
projectMapper.insertDakyProFilesContents(dakyProFilesContents);
|
||||
return AjaxResult.success("配置成功");
|
||||
} else {
|
||||
return AjaxResult.error("配置失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
<?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.bonus.web.mapper.ProjectMapper">
|
||||
<insert id="insertDakyProFilesContents">
|
||||
INSERT INTO da_ky_pro_files_contents
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id,</if>
|
||||
<if test="proId != null and proId != ''">pro_id,</if>
|
||||
<if test="contentName != null and contentName != ''">content_name,</if>
|
||||
<if test="parentId != null and parentId != ''">parent_id,</if>
|
||||
<if test="level != null and level != ''">`level`,</if>
|
||||
<if test="markCode != null and markCode != ''">mark_code,</if>
|
||||
<if test="term != null and term != ''">term,</if>
|
||||
<if test="unitName != null and unitName != ''">unit_name,</if>
|
||||
<if test="dataSource != null and dataSource != ''">data_source,</if>
|
||||
<if test="isUnique != null and isUnique != ''">is_unique,</if>
|
||||
<if test="integrityStatus != null and integrityStatus != ''">integrity_status,</if>
|
||||
<if test="createUserName != null and createUserName != ''">create_user_name,</if>
|
||||
<if test="updateUserName != null and updateUserName != ''">update_user_name,</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
||||
<if test="sort != null">sort,</if>
|
||||
<if test="createUserId != null">create_user_id,</if>
|
||||
<if test="updateUserId != null">update_user_id,</if>
|
||||
</trim>
|
||||
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">#{id},</if>
|
||||
<if test="proId != null and proId != ''">#{proId},</if>
|
||||
<if test="contentName != null and contentName != ''">#{contentName},</if>
|
||||
<if test="parentId != null and parentId != ''">#{parentId},</if>
|
||||
<if test="level != null and level != ''">#{level},</if>
|
||||
<if test="markCode != null and markCode != ''">#{markCode},</if>
|
||||
<if test="term != null and term != ''">#{term},</if>
|
||||
<if test="unitName != null and unitName != ''">#{unitName},</if>
|
||||
<if test="dataSource != null and dataSource != ''">#{dataSource},</if>
|
||||
<if test="isUnique != null and isUnique != ''">#{isUnique},</if>
|
||||
<if test="integrityStatus != null and integrityStatus != ''">#{integrityStatus},</if>
|
||||
<if test="createUserName != null and createUserName != ''">#{createUserName},</if>
|
||||
<if test="updateUserName != null and updateUserName != ''">#{updateUserName},</if>
|
||||
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
||||
<if test="sort != null">#{sort},</if>
|
||||
<if test="createUserId != null">#{createUserId},</if>
|
||||
<if test="updateUserId != null">#{updateUserId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateContentsName">
|
||||
UPDATE da_ky_project
|
||||
SET
|
||||
content_name = #{projectName}
|
||||
WHERE
|
||||
id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="list" resultType="com.bonus.web.domain.ProjectDto">
|
||||
SELECT
|
||||
dkp.*,
|
||||
dksdd.dict_label proTypeName,
|
||||
dksdd2.dict_label voltageLevelName,
|
||||
dksdd3.dict_label proStatusName
|
||||
FROM
|
||||
da_ky_project dkp
|
||||
LEFT JOIN da_ky_sys_dict_data dksdd ON dkp.pro_type = dksdd.dict_code
|
||||
LEFT JOIN da_ky_sys_dict_data dksdd2 ON dkp.voltage_level = dksdd2.dict_code
|
||||
LEFT JOIN da_ky_sys_dict_data dksdd3 ON dkp.pro_status = dksdd3.dict_code
|
||||
WHERE
|
||||
dkp.del_flag = '1'
|
||||
</select>
|
||||
<select id="getFileCatalogSelect" resultType="com.bonus.web.domain.ArchivalCatalogueDto">
|
||||
SELECT
|
||||
id,
|
||||
content_name AS contentName
|
||||
FROM
|
||||
da_ky_files_contents
|
||||
WHERE
|
||||
del_flag = '1' and level = 1
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue