代码提交
This commit is contained in:
parent
58033ce671
commit
8c85ab3081
|
|
@ -12,9 +12,7 @@ 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 org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -60,9 +58,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);
|
||||
|
|
@ -73,9 +71,10 @@ public class FileTransferRecordController extends BaseController {
|
|||
}
|
||||
}
|
||||
@ApiOperation(value = "修改档案移交清单文件名")
|
||||
@GetMapping("updateTransferRecordFile")
|
||||
@PostMapping("updateTransferRecordFile")
|
||||
@SysLog(title = "修改档案移交清单文件名", module = "数据/档案移交->档案移交记录", businessType = OperaType.UPDATE, details = "修改档案移交清单文件名", logType = 1)
|
||||
public AjaxResult updateTransferRecordFile(TransferFileDto dto) {
|
||||
@RequiresPermissions("record:file:update")
|
||||
public AjaxResult updateTransferRecordFile(@RequestBody TransferFileDto dto) {
|
||||
try {
|
||||
return transferApplyService.updateTransferRecordFile(dto);
|
||||
} catch (Exception e) {
|
||||
|
|
@ -84,4 +83,17 @@ public class FileTransferRecordController extends BaseController {
|
|||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "档案移交")
|
||||
@PostMapping("updateTransferRecordFilesStatus")
|
||||
@SysLog(title = "档案移交", module = "数据/档案移交->档案移交记录", businessType = OperaType.UPDATE, details = "档案移交", logType = 1)
|
||||
@RequiresPermissions("record:file:transfer")
|
||||
public AjaxResult updateTransferRecordFilesStatus(TransferFileDto dto) {
|
||||
try {
|
||||
return transferApplyService.updateTransferRecordFilesStatus(dto);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
return AjaxResult.error("请求出错了");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,4 +56,12 @@ public interface TransferApplyMapper {
|
|||
Integer isAllReceive(TransferFileDto dto);
|
||||
|
||||
Integer updateTransferStatus(TransferFileDto dto);
|
||||
|
||||
List<String> getDeptList(TransferApplyDto dto);
|
||||
|
||||
Integer updateTransferRecordFilesStatus(TransferFileDto dto);
|
||||
|
||||
void setTransferTime(TransferFileDto dto);
|
||||
|
||||
String getTransferApplyTransferTime(TransferFileDto dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,4 +39,6 @@ public interface TransferApplyService {
|
|||
List<DaKyProFilesContentsDto> getTransferApplyFilesByApplyId(TransferApplyDto dto);
|
||||
|
||||
AjaxResult transferReceive(TransferFileDto dto);
|
||||
|
||||
AjaxResult updateTransferRecordFilesStatus(TransferFileDto dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import com.bonus.web.controller.tool.TreeBuilder;
|
|||
import com.bonus.web.domain.*;
|
||||
import com.bonus.web.mapper.TransferApplyMapper;
|
||||
import com.bonus.web.service.TransferApplyService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
|
@ -28,6 +29,10 @@ public class TransferApplyServiceImpl implements TransferApplyService {
|
|||
|
||||
@Override
|
||||
public List<TransferApplyDto> list(TransferApplyDto dto) {
|
||||
if (dto.getDeptId() != null){
|
||||
// 查询该部门下所有子部门
|
||||
List<String> deptIds = transferApplyMapper.getDeptList(dto);
|
||||
}
|
||||
return transferApplyMapper.list(dto);
|
||||
}
|
||||
|
||||
|
|
@ -171,4 +176,14 @@ public class TransferApplyServiceImpl implements TransferApplyService {
|
|||
return AjaxResult.error("接口异常");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult updateTransferRecordFilesStatus(TransferFileDto dto) {
|
||||
Integer i = transferApplyMapper.updateTransferRecordFilesStatus(dto);
|
||||
String transferApplyTransferTime = transferApplyMapper.getTransferApplyTransferTime(dto);
|
||||
if (StringUtils.isBlank(transferApplyTransferTime)){
|
||||
transferApplyMapper.setTransferTime(dto);
|
||||
}
|
||||
return i > 0 ? AjaxResult.success("移交成功") : AjaxResult.error("移交失败");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -290,6 +290,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
SET transfer_status = '1'
|
||||
WHERE id = #{transferApplyId}
|
||||
</update>
|
||||
<update id="updateTransferRecordFilesStatus">
|
||||
UPDATE da_ky_transfer_file
|
||||
SET transfer_status = #{transferStatus},
|
||||
transfer_time = now()
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
<update id="setTransferTime">
|
||||
UPDATE da_ky_transfer_apply
|
||||
SET transfer_time = now()
|
||||
WHERE id = #{transferApplyId}
|
||||
</update>
|
||||
<delete id="delTransferFiles">
|
||||
DELETE FROM da_ky_transfer_file
|
||||
WHERE transfer_apply_id = #{id}
|
||||
|
|
@ -565,5 +576,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE
|
||||
transfer_apply_id = #{transferApplyId}
|
||||
</select>
|
||||
<select id="getDeptList" resultType="java.lang.String">
|
||||
|
||||
</select>
|
||||
<select id="getTransferApplyTransferTime" resultType="java.lang.String">
|
||||
SELECT
|
||||
transfer_time AS transferTime
|
||||
FROM
|
||||
da_ky_transfer_apply
|
||||
WHERE
|
||||
id = #{transferApplyId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue