代码提交
This commit is contained in:
parent
915372b4e3
commit
60552b6c65
|
|
@ -0,0 +1,87 @@
|
|||
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.service.TransferApplyService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author:liang.chao
|
||||
* @Date:2025/9/18 - 16:06
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/transferReceice")
|
||||
@Slf4j
|
||||
public class FileTransferReceiveController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private TransferApplyService transferApplyService;
|
||||
@ApiOperation(value = "档案移交接收列表")
|
||||
@GetMapping("getTransferReceiceList")
|
||||
@SysLog(title = "档案移交接收列表", module = "数据/档案移交->档案移交接收管理", businessType = OperaType.QUERY, details = "档案移交接收列表", logType = 1)
|
||||
@RequiresPermissions("transfer:Receice:list")
|
||||
public TableDataInfo getTransferReceiceList(TransferApplyDto dto) {
|
||||
try {
|
||||
startPage();
|
||||
dto.setAuditStatus("1");
|
||||
List<TransferApplyDto> list = transferApplyService.list(dto);
|
||||
return getDataTable(list);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
return getDataTable(new ArrayList<>());
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "档案移交接收详情")
|
||||
@GetMapping("getTransferReceiceDetail")
|
||||
@SysLog(title = "档案移交接收详情", module = "数据/档案移交->档案移交接收管理", businessType = OperaType.QUERY, details = "档案移交接收详情", logType = 1)
|
||||
@RequiresPermissions("transfer:Receice:query")
|
||||
public AjaxResult getTransferApply(TransferApplyDto dto) {
|
||||
try {
|
||||
TransferApplyDto transferApply = transferApplyService.getTransferApply(dto);
|
||||
return AjaxResult.success(transferApply);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
return AjaxResult.error("请求出错了");
|
||||
}
|
||||
}
|
||||
@ApiOperation(value = "档案移交接收文件")
|
||||
@GetMapping("getTransferRecordFiles")
|
||||
@SysLog(title = "档案移交接收文件", module = "数据/档案移交->档案移交接收管理", businessType = OperaType.QUERY, details = "档案移交接收文件", logType = 1)
|
||||
public AjaxResult getTransferRecordFiles(TransferFileDto dto) {
|
||||
try {
|
||||
List<TransferFileDto> recordFiles = transferApplyService.getTransferRecordFiles(dto);
|
||||
return AjaxResult.success(recordFiles);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
return AjaxResult.error("请求出错了");
|
||||
}
|
||||
}
|
||||
@ApiOperation(value = "档案移交文件接收")
|
||||
@GetMapping("transferReceive")
|
||||
@SysLog(title = "档案移交文件接收", module = "数据/档案移交->档案移交接收管理", businessType = OperaType.QUERY, details = "档案移交文件接收", logType = 1)
|
||||
public AjaxResult transferReceive(TransferFileDto dto) {
|
||||
try {
|
||||
return transferApplyService.transferReceive(dto);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
return AjaxResult.error("请求出错了");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -36,10 +36,10 @@ public class SystemConfigController extends BaseController {
|
|||
/**
|
||||
* 获取参数配置单个列表
|
||||
*/
|
||||
@GetMapping("/getConfigById")
|
||||
public AjaxResult getConfigById(SystemConfig config) {
|
||||
SystemConfig systemConfig = configService.getConfigById(config);
|
||||
return AjaxResult.success(systemConfig);
|
||||
@GetMapping("/getConfig")
|
||||
public AjaxResult getConfig(SystemConfig config) {
|
||||
List<SystemConfig> list = configService.list(config);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@RequiresPermissions("sys:config:add")
|
||||
@PostMapping("/add")
|
||||
|
|
|
|||
|
|
@ -50,4 +50,8 @@ public interface TransferApplyMapper {
|
|||
Integer updateTransferRecordFile(TransferFileDto dto);
|
||||
|
||||
List<DaKyProFilesContentsDto> getTransferApplyFilesByApplyId(TransferApplyDto dto);
|
||||
|
||||
Integer transferReceive(TransferFileDto dto);
|
||||
|
||||
Integer isAllReceive(TransferFileDto dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,4 +37,6 @@ public interface TransferApplyService {
|
|||
AjaxResult updateTransferRecordFile(TransferFileDto dto);
|
||||
|
||||
List<DaKyProFilesContentsDto> getTransferApplyFilesByApplyId(TransferApplyDto dto);
|
||||
|
||||
AjaxResult transferReceive(TransferFileDto dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -144,4 +144,15 @@ public class TransferApplyServiceImpl implements TransferApplyService {
|
|||
public List<DaKyProFilesContentsDto> getTransferApplyFilesByApplyId(TransferApplyDto dto) {
|
||||
return transferApplyMapper.getTransferApplyFilesByApplyId(dto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult transferReceive(TransferFileDto dto) {
|
||||
// transferApplyMapper.transferReceive(dto);
|
||||
// // 查询该申请下,是否所有文件都已接收
|
||||
// Integer num = transferApplyMapper.isAllReceive(dto);
|
||||
// if (num == 1){
|
||||
// return AjaxResult.success("接收成功");
|
||||
// }
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -279,6 +279,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
SET file_name = #{fileName}
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
<update id="transferReceive">
|
||||
UPDATE da_ky_transfer_file
|
||||
SET receive_status = #{receiveStatus},
|
||||
receive_time = now()
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
<delete id="delTransferFiles">
|
||||
DELETE FROM da_ky_transfer_file
|
||||
WHERE transfer_apply_id = #{id}
|
||||
|
|
@ -519,5 +525,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
fs.transfer_apply_id = #{id}
|
||||
AND dkpfc.LEVEL = 5
|
||||
</select>
|
||||
<select id="isAllReceive" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
CASE
|
||||
WHEN
|
||||
COUNT(*) = SUM( CASE WHEN receive_status = '1' THEN 1 ELSE 0 END ) THEN
|
||||
1 ELSE 0
|
||||
END AS all_received
|
||||
FROM
|
||||
da_ky_transfer_file
|
||||
WHERE
|
||||
transfer_apply_id = #{transferApplyId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -20,5 +20,4 @@ public interface ISystemConfigMapper {
|
|||
|
||||
Integer del(SystemConfig config);
|
||||
|
||||
SystemConfig getConfigById(SystemConfig config);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,5 +21,4 @@ public interface ISystemConfigService {
|
|||
|
||||
AjaxResult del(SystemConfig config);
|
||||
|
||||
SystemConfig getConfigById(SystemConfig config);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,8 +54,4 @@ public class SystemConfigServiceImpl implements ISystemConfigService {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public SystemConfig getConfigById(SystemConfig config) {
|
||||
return systemConfigMapper.getConfigById(config);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,12 +34,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
use_status as useStatus
|
||||
from da_ky_system_config
|
||||
</select>
|
||||
<select id="getConfigById" resultType="com.bonus.system.domain.SystemConfig">
|
||||
select id,
|
||||
config_name as configName,
|
||||
config_code as configCode,
|
||||
use_status as useStatus
|
||||
from da_ky_system_config
|
||||
where id = #{id}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue