代码提交
This commit is contained in:
parent
1a026467c4
commit
6f8580a98b
|
|
@ -0,0 +1,98 @@
|
|||
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.page.TableDataInfo;
|
||||
import com.bonus.common.enums.OperaType;
|
||||
import com.bonus.web.domain.TransferApplyDto;
|
||||
import com.bonus.web.domain.TransferFileDto;
|
||||
import com.bonus.web.domain.TransferProblemDto;
|
||||
import com.bonus.web.service.TransferApplyService;
|
||||
import com.bonus.web.service.TransferProblemService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author:liang.chao
|
||||
* @Date:2025/9/18 - 16:06
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/transferProblem")
|
||||
@Slf4j
|
||||
public class FileTransferProblemController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private TransferProblemService transferProblemService;
|
||||
|
||||
@ApiOperation(value = "档案移交问题列表")
|
||||
@GetMapping("getTransferProblemList")
|
||||
@SysLog(title = "档案移交问题列表", module = "数据/档案移交->档案移交问题管理", businessType = OperaType.QUERY, details = "档案移交问题列表", logType = 1)
|
||||
@RequiresPermissions("transfer:problem:list")
|
||||
public TableDataInfo getTransferProblemList(TransferProblemDto dto) {
|
||||
try {
|
||||
startPage();
|
||||
List<TransferProblemDto> list = transferProblemService.list(dto);
|
||||
return getDataTable(list);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
return getDataTable(new ArrayList<>());
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "新增档案移交问题")
|
||||
@PostMapping("addTransferProblem")
|
||||
@SysLog(title = "新增档案移交问题", module = "数据/档案移交->档案移交问题管理", businessType = OperaType.INSERT, details = "新增档案移交问题", logType = 1)
|
||||
@RequiresPermissions("transfer:problem:add")
|
||||
public AjaxResult addTransferProblem(@RequestBody TransferProblemDto dto) {
|
||||
try {
|
||||
return transferProblemService.add(dto);
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error("请求出错了");
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改档案移交问题")
|
||||
@PostMapping("editTransferProblem")
|
||||
@SysLog(title = "修改档案移交问题", module = "数据/档案移交->档案移交问题管理", businessType = OperaType.UPDATE, details = "修改档案移交问题", logType = 1)
|
||||
@RequiresPermissions("transfer:problem:edit")
|
||||
public AjaxResult editTransferProblem(@RequestBody TransferProblemDto dto) {
|
||||
try {
|
||||
return transferProblemService.edit(dto);
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error("请求出错了");
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除档案移交问题")
|
||||
@PostMapping("delTransferProblem")
|
||||
@SysLog(title = "删除档案移交问题", module = "数据/档案移交->档案移交问题管理", businessType = OperaType.DELETE, details = "删除档案移交问题", logType = 1)
|
||||
@RequiresPermissions("transfer:problem:del")
|
||||
public AjaxResult delTransferProblem(@RequestBody TransferProblemDto dto) {
|
||||
try {
|
||||
return transferProblemService.del(dto);
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error("请求出错了");
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "档案移交问题详情")
|
||||
@GetMapping("getTransferProblemById")
|
||||
@SysLog(title = "档案移交问题详情", module = "数据/档案移交->档案移交问题管理", businessType = OperaType.QUERY, details = "档案移交问题详情", logType = 1)
|
||||
@RequiresPermissions("transfer:problem:query")
|
||||
public AjaxResult getTransferProblemById(TransferProblemDto dto) {
|
||||
try {
|
||||
return transferProblemService.getTransferProblemById(dto);
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error("请求出错了");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -31,9 +31,9 @@ public class FileTransferRecordController extends BaseController {
|
|||
|
||||
@Autowired
|
||||
private TransferApplyService transferApplyService;
|
||||
@ApiOperation(value = "档案移交申请列表")
|
||||
@ApiOperation(value = "档案移交记录列表")
|
||||
@GetMapping("getTransferRecordList")
|
||||
@SysLog(title = "档案移交申请列表", module = "数据/档案移交->档案移交申请", businessType = OperaType.QUERY, details = "档案移交申请列表", logType = 1)
|
||||
@SysLog(title = "档案移交记录列表", module = "数据/档案移交->档案移交记录", businessType = OperaType.QUERY, details = "档案移交记录列表", logType = 1)
|
||||
@RequiresPermissions("transfer:record:list")
|
||||
public TableDataInfo getTransferRecordList(TransferApplyDto dto) {
|
||||
try {
|
||||
|
|
@ -47,9 +47,9 @@ public class FileTransferRecordController extends BaseController {
|
|||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "档案移交申请详情")
|
||||
@ApiOperation(value = "档案移交记录详情")
|
||||
@GetMapping("getTransferRecordDetail")
|
||||
@SysLog(title = "档案移交申请详情", module = "数据/档案移交->档案移交申请", businessType = OperaType.QUERY, details = "档案移交申请详情", logType = 1)
|
||||
@SysLog(title = "档案移交记录详情", module = "数据/档案移交->档案移交记录", businessType = OperaType.QUERY, details = "档案移交记录详情", logType = 1)
|
||||
@RequiresPermissions("transfer:record:query")
|
||||
public AjaxResult getTransferApply(TransferApplyDto dto) {
|
||||
try {
|
||||
|
|
@ -60,9 +60,9 @@ public class FileTransferRecordController extends BaseController {
|
|||
return AjaxResult.error("请求出错了");
|
||||
}
|
||||
}
|
||||
@ApiOperation(value = "档案移交申请详情")
|
||||
@ApiOperation(value = "档案移交清单详情")
|
||||
@GetMapping("getTransferRecordFiles")
|
||||
@SysLog(title = "档案移交申请详情", module = "数据/档案移交->档案移交申请", businessType = OperaType.QUERY, details = "档案移交申请详情", logType = 1)
|
||||
@SysLog(title = "档案移交清单详情", module = "数据/档案移交->档案移交记录", businessType = OperaType.QUERY, details = "档案移交清单详情", logType = 1)
|
||||
public AjaxResult getTransferRecordFiles(TransferFileDto dto) {
|
||||
try {
|
||||
List<TransferFileDto> recordFiles = transferApplyService.getTransferRecordFiles(dto);
|
||||
|
|
@ -72,5 +72,16 @@ public class FileTransferRecordController extends BaseController {
|
|||
return AjaxResult.error("请求出错了");
|
||||
}
|
||||
}
|
||||
@ApiOperation(value = "修改档案移交清单文件名")
|
||||
@GetMapping("updateTransferRecordFile")
|
||||
@SysLog(title = "修改档案移交清单文件名", module = "数据/档案移交->档案移交记录", businessType = OperaType.QUERY, details = "修改档案移交清单文件名", logType = 1)
|
||||
public AjaxResult updateTransferRecordFile(TransferFileDto dto) {
|
||||
try {
|
||||
return transferApplyService.updateTransferRecordFile(dto);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
return AjaxResult.error("请求出错了");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,4 +72,8 @@ public class TransferFileDto {
|
|||
* 修改时间
|
||||
*/
|
||||
private String updateTime;
|
||||
|
||||
private String parParentName;
|
||||
|
||||
private String parentName;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,85 @@
|
|||
package com.bonus.web.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author:liang.chao
|
||||
* @Date:2025/9/19 - 14:57
|
||||
*/
|
||||
@Data
|
||||
public class TransferProblemDto {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 工程id
|
||||
*/
|
||||
private String proId;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
private String proName;
|
||||
|
||||
/**
|
||||
* 单项工程名称
|
||||
*/
|
||||
private String singleProName;
|
||||
|
||||
/**
|
||||
* 移交时间
|
||||
*/
|
||||
private String transferTime;
|
||||
|
||||
/**
|
||||
* 接收单位id
|
||||
*/
|
||||
private String deptId;
|
||||
|
||||
/**
|
||||
* 接收单位名称
|
||||
*/
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 移交问题
|
||||
*/
|
||||
private String transferIssue;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String createTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private String updateTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private Long createUserId;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
private String createUserName;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private Long updateUserId;
|
||||
|
||||
/**
|
||||
* 修改人姓名
|
||||
*/
|
||||
private String updateUserName;
|
||||
|
||||
/**
|
||||
* 是否删除 0.删除 1.未删除
|
||||
*/
|
||||
private String delFlag;
|
||||
}
|
||||
|
|
@ -46,4 +46,6 @@ public interface TransferApplyMapper {
|
|||
List<TransferFileDto> getTransferRecordFiles(TransferFileDto dto);
|
||||
|
||||
String getProNameById(TransferApplyDto dto);
|
||||
|
||||
Integer updateTransferRecordFile(TransferFileDto dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
package com.bonus.web.mapper;
|
||||
|
||||
import com.bonus.common.core.domain.AjaxResult;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.bonus.web.domain.TransferProblemDto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author:liang.chao
|
||||
* @Date:2025/9/19 - 14:59
|
||||
*/
|
||||
@Mapper
|
||||
public interface TransferProblemMapper {
|
||||
public List<TransferProblemDto> list(TransferProblemDto dto);
|
||||
|
||||
Integer add(TransferProblemDto dto);
|
||||
|
||||
Integer edit(TransferProblemDto dto);
|
||||
|
||||
Integer del(TransferProblemDto dto);
|
||||
|
||||
TransferProblemDto getTransferProblemById(TransferProblemDto dto);
|
||||
}
|
||||
|
|
@ -33,4 +33,6 @@ public interface TransferApplyService {
|
|||
List<DaKyProFilesContentsDto> getTransferApplyFiles(TransferApplyDto dto);
|
||||
|
||||
List<TransferFileDto> getTransferRecordFiles(TransferFileDto dto);
|
||||
|
||||
AjaxResult updateTransferRecordFile(TransferFileDto dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
package com.bonus.web.service;
|
||||
|
||||
import com.bonus.common.core.domain.AjaxResult;
|
||||
import com.bonus.web.domain.TransferProblemDto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author:liang.chao
|
||||
* @Date:2025/9/19 - 14:49
|
||||
*/
|
||||
public interface TransferProblemService {
|
||||
|
||||
List<TransferProblemDto> list(TransferProblemDto dto);
|
||||
|
||||
AjaxResult add(TransferProblemDto dto);
|
||||
|
||||
AjaxResult edit(TransferProblemDto dto);
|
||||
|
||||
AjaxResult del(TransferProblemDto dto);
|
||||
|
||||
AjaxResult getTransferProblemById(TransferProblemDto dto);
|
||||
}
|
||||
|
|
@ -133,4 +133,10 @@ public class TransferApplyServiceImpl implements TransferApplyService {
|
|||
public List<TransferFileDto> getTransferRecordFiles(TransferFileDto dto) {
|
||||
return transferApplyMapper.getTransferRecordFiles(dto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult updateTransferRecordFile(TransferFileDto dto) {
|
||||
Integer i = transferApplyMapper.updateTransferRecordFile(dto);
|
||||
return i > 0 ? AjaxResult.success("修改成功") : AjaxResult.error("修改失败");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,59 @@
|
|||
package com.bonus.web.service.impl;
|
||||
|
||||
import com.bonus.common.core.domain.AjaxResult;
|
||||
import com.bonus.common.utils.SecurityUtils;
|
||||
import com.bonus.web.domain.TransferProblemDto;
|
||||
import com.bonus.web.mapper.TransferProblemMapper;
|
||||
import com.bonus.web.service.TransferProblemService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.bonus.common.utils.SecurityUtils.getUserId;
|
||||
|
||||
/**
|
||||
* @Author:liang.chao
|
||||
* @Date:2025/9/19 - 14:50
|
||||
*/
|
||||
@Service
|
||||
public class TransferProblemServiceImpl implements TransferProblemService {
|
||||
|
||||
@Autowired
|
||||
private TransferProblemMapper transferProblemMapper;
|
||||
|
||||
@Override
|
||||
public List<TransferProblemDto> list(TransferProblemDto dto) {
|
||||
return transferProblemMapper.list(dto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult add(TransferProblemDto dto) {
|
||||
dto.setCreateUserId(getUserId());
|
||||
dto.setUpdateUserId(getUserId());
|
||||
dto.setCreateUserName(SecurityUtils.getUsername());
|
||||
dto.setUpdateUserName(SecurityUtils.getUsername());
|
||||
Integer result = transferProblemMapper.add(dto);
|
||||
return result > 0 ? AjaxResult.success() : AjaxResult.error();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult edit(TransferProblemDto dto) {
|
||||
dto.setUpdateUserId(getUserId());
|
||||
dto.setUpdateUserName(SecurityUtils.getUsername());
|
||||
Integer result = transferProblemMapper.edit(dto);
|
||||
return result > 0 ? AjaxResult.success() : AjaxResult.error();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult del(TransferProblemDto dto) {
|
||||
Integer result = transferProblemMapper.del(dto);
|
||||
return result > 0 ? AjaxResult.success() : AjaxResult.error();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getTransferProblemById(TransferProblemDto dto) {
|
||||
TransferProblemDto transferProblemDto = transferProblemMapper.getTransferProblemById(dto);
|
||||
return AjaxResult.success(transferProblemDto);
|
||||
}
|
||||
}
|
||||
|
|
@ -270,6 +270,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</set>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
<update id="updateTransferRecordFile">
|
||||
UPDATE da_ky_transfer_file
|
||||
SET file_name = #{fileName}
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
<delete id="delTransferFiles">
|
||||
DELETE FROM da_ky_transfer_file
|
||||
WHERE transfer_apply_id = #{id}
|
||||
|
|
@ -444,7 +449,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
AND NOT EXISTS ( SELECT 1 FROM da_ky_transfer_file tf WHERE tf.file_source_id = dkfs.id )
|
||||
</select>
|
||||
<select id="getTransferRecordFiles" resultType="com.bonus.web.domain.TransferFileDto">
|
||||
|
||||
SELECT DISTINCT
|
||||
dktf.id,
|
||||
dktf.file_name AS fileName,
|
||||
CONCAT( dkpfc3.content_name, '/', dkpfc2.content_name ) AS parParentName,
|
||||
dkpfc1.content_name AS parentName
|
||||
FROM
|
||||
da_ky_transfer_file dktf
|
||||
LEFT JOIN da_ky_pro_files_contents dkpfc ON dktf.pro_files_contents_id = dkpfc.id
|
||||
LEFT JOIN da_ky_pro_files_contents dkpfc1 ON dkpfc.parent_id = dkpfc1.id
|
||||
LEFT JOIN da_ky_pro_files_contents dkpfc2 ON dkpfc1.parent_id = dkpfc2.id
|
||||
LEFT JOIN da_ky_pro_files_contents dkpfc3 ON dkpfc2.parent_id = dkpfc3.id
|
||||
WHERE
|
||||
dktf.transfer_apply_id = #{transferApplyId}
|
||||
</select>
|
||||
<select id="getProNameById" resultType="java.lang.String">
|
||||
SELECT
|
||||
|
|
|
|||
|
|
@ -0,0 +1,91 @@
|
|||
<?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.TransferProblemMapper">
|
||||
<insert id="add">
|
||||
INSERT INTO da_ky_transfer_issue
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="proId != null and proId != ''">pro_id,</if>
|
||||
<if test="proName != null and proName != ''">pro_name,</if>
|
||||
<if test="singleProName != null and singleProName != ''">single_pro_name,</if>
|
||||
<if test="transferTime != null">transfer_time,</if>
|
||||
<if test="deptId != null and deptId != ''">dept_id,</if>
|
||||
<if test="deptName != null and deptName != ''">dept_name,</if>
|
||||
<if test="transferIssue != null and transferIssue != ''">transfer_issue,</if>
|
||||
<if test="createUserId != null">create_user_id,</if>
|
||||
<if test="createUserName != null and createUserName != ''">create_user_name,</if>
|
||||
<if test="updateUserId != null">update_user_id,</if>
|
||||
<if test="updateUserName != null and updateUserName != ''">update_user_name,</if>
|
||||
</trim>
|
||||
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||
<if test="proId != null and proId != ''">#{proId},</if>
|
||||
<if test="proName != null and proName != ''">#{proName},</if>
|
||||
<if test="singleProName != null and singleProName != ''">#{singleProName},</if>
|
||||
<if test="transferTime != null">#{transferTime},</if>
|
||||
<if test="deptId != null and deptId != ''">#{deptId},</if>
|
||||
<if test="deptName != null and deptName != ''">#{deptName},</if>
|
||||
<if test="transferIssue != null and transferIssue != ''">#{transferIssue},</if>
|
||||
<if test="createUserId != null">#{createUserId},</if>
|
||||
<if test="createUserName != null and createUserName != ''">#{createUserName},</if>
|
||||
<if test="updateUserId != null">#{updateUserId},</if>
|
||||
<if test="updateUserName != null and updateUserName != ''">#{updateUserName},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="edit">
|
||||
UPDATE da_ky_transfer_issue
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="proId != null and proId != ''">pro_id = #{proId},</if>
|
||||
<if test="proName != null and proName != ''">pro_name = #{proName},</if>
|
||||
<if test="singleProName != null and singleProName != ''">single_pro_name = #{singleProName},</if>
|
||||
<if test="transferTime != null">transfer_time = #{transferTime},</if>
|
||||
<if test="deptId != null and deptId != ''">dept_id = #{deptId},</if>
|
||||
<if test="deptName != null and deptName != ''">dept_name = #{deptName},</if>
|
||||
<if test="transferIssue != null and transferIssue != ''">transfer_issue = #{transferIssue},</if>
|
||||
<if test="updateUserId != null">update_user_id = #{updateUserId},</if>
|
||||
<if test="updateUserName != null and updateUserName != ''">update_user_name = #{updateUserName},</if>
|
||||
</trim>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
<delete id="del">
|
||||
DELETE FROM da_ky_transfer_issue
|
||||
WHERE id = #{id}
|
||||
</delete>
|
||||
<select id="list" resultType="com.bonus.web.domain.TransferProblemDto">
|
||||
SELECT
|
||||
id,
|
||||
pro_id AS proId,
|
||||
pro_name AS proName,
|
||||
single_pro_name AS singleProName,
|
||||
transfer_time AS transferTime,
|
||||
dept_id AS deptId,
|
||||
dept_name AS deptName,
|
||||
transfer_issue AS transferIssue,
|
||||
create_time AS createTime,
|
||||
update_time AS updateTime,
|
||||
create_user_id AS createUserId,
|
||||
create_user_name AS createUserName,
|
||||
update_user_id AS updateUserId,
|
||||
update_user_name AS updateUserName,
|
||||
del_flag AS delFlag
|
||||
FROM
|
||||
da_ky_transfer_issue dkti
|
||||
left join da_ky_project dkp ON dkti.pro_id = dkp.id
|
||||
WHERE
|
||||
del_flag = '1'
|
||||
<if test="proName != null and proName != ''">
|
||||
AND dkti.single_pro_name = #{proName}
|
||||
</if>
|
||||
<if test="proType != null and proType != ''">
|
||||
and dkp.pro_type = #{proType}
|
||||
</if>
|
||||
<if test="voltageLevel != null and voltageLevel != ''">
|
||||
and dkp.voltage_level = #{voltageLevel}
|
||||
</if>
|
||||
ORDER BY
|
||||
dkti.create_time DESC
|
||||
</select>
|
||||
<select id="getTransferProblemById" resultType="com.bonus.web.domain.TransferProblemDto">
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue