档案抽取
This commit is contained in:
parent
c5565a6327
commit
20293d2435
|
|
@ -6,6 +6,7 @@ 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.SelectDto;
|
||||
import com.bonus.web.domain.TransferApplyDto;
|
||||
import com.bonus.web.service.TransferApplyService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
|
@ -43,6 +44,19 @@ public class TransferApplyController extends BaseController {
|
|||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取部门下拉")
|
||||
@GetMapping("getDeptSelect")
|
||||
@SysLog(title = "获取部门下拉", module = "数据/档案移交->档案移交申请", businessType = OperaType.QUERY, details = "获取部门下拉", logType = 1)
|
||||
public AjaxResult getDeptSelect(TransferApplyDto dto) {
|
||||
try {
|
||||
List<SelectDto> list = transferApplyService.getDeptSelect(dto);
|
||||
return AjaxResult.success(list);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
return AjaxResult.error("请求出错了");
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "新增档案移交申请")
|
||||
@PostMapping("saveTransferApply")
|
||||
@SysLog(title = "新增档案移交申请", module = "数据/档案移交->档案移交申请", businessType = OperaType.INSERT, details = "新增档案移交申请", logType = 1)
|
||||
|
|
@ -82,6 +96,7 @@ public class TransferApplyController extends BaseController {
|
|||
return AjaxResult.error("请求出错了");
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除档案移交申请")
|
||||
@PostMapping("delTransferApply")
|
||||
@SysLog(title = "删除档案移交申请", module = "数据/档案移交->档案移交申请", businessType = OperaType.DELETE, details = "删除档案移交申请", logType = 1)
|
||||
|
|
@ -94,4 +109,17 @@ public class TransferApplyController extends BaseController {
|
|||
return AjaxResult.error("请求出错了");
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "档案移交审核")
|
||||
@PostMapping("auditTransferApply")
|
||||
@SysLog(title = "档案移交审核", module = "数据/档案移交->档案移交申请", businessType = OperaType.UPDATE, details = "档案移交审核", logType = 1)
|
||||
@RequiresPermissions("transfer:apply:audit")
|
||||
public AjaxResult auditTransferApply(@RequestBody TransferApplyDto dto) {
|
||||
try {
|
||||
return transferApplyService.audit(dto);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
return AjaxResult.error("请求出错了");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ public class TransferApplyDto {
|
|||
* 审核人
|
||||
*/
|
||||
private String auditUser;
|
||||
private String auditUserName;
|
||||
|
||||
/**
|
||||
* 申请时间
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ public class DaKyProFilesContentsVo {
|
|||
/**
|
||||
* 分类号/案卷排序号
|
||||
*/
|
||||
@NotNull(message = "分类号/案卷排序号不能为空")
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
package com.bonus.web.mapper;
|
||||
|
||||
import com.bonus.common.core.domain.AjaxResult;
|
||||
import com.bonus.web.domain.SelectDto;
|
||||
import com.bonus.web.domain.TransferApplyDto;
|
||||
import com.bonus.web.domain.TransferFileDto;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
|
@ -26,4 +28,10 @@ public interface TransferApplyMapper {
|
|||
Integer delTransferFiles(TransferApplyDto dto);
|
||||
|
||||
Integer del(TransferApplyDto dto);
|
||||
|
||||
Integer audit(TransferApplyDto dto);
|
||||
|
||||
Integer addTransferAuditRecord(TransferApplyDto dto);
|
||||
|
||||
List<SelectDto> getDeptSelect(TransferApplyDto dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.web.service;
|
||||
|
||||
import com.bonus.common.core.domain.AjaxResult;
|
||||
import com.bonus.web.domain.SelectDto;
|
||||
import com.bonus.web.domain.TransferApplyDto;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -19,4 +20,8 @@ public interface TransferApplyService {
|
|||
AjaxResult edit(TransferApplyDto dto);
|
||||
|
||||
AjaxResult del(TransferApplyDto dto);
|
||||
|
||||
AjaxResult audit(TransferApplyDto dto);
|
||||
|
||||
List<SelectDto> getDeptSelect(TransferApplyDto dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.web.service.impl;
|
||||
|
||||
import com.bonus.common.core.domain.AjaxResult;
|
||||
import com.bonus.web.domain.SelectDto;
|
||||
import com.bonus.web.domain.TransferApplyDto;
|
||||
import com.bonus.web.domain.TransferFileDto;
|
||||
import com.bonus.web.mapper.TransferApplyMapper;
|
||||
|
|
@ -83,4 +84,21 @@ public class TransferApplyServiceImpl implements TransferApplyService {
|
|||
return AjaxResult.error("档案删除失败");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult audit(TransferApplyDto dto) {
|
||||
Integer i = transferApplyMapper.audit(dto);
|
||||
if (i > 0) {
|
||||
dto.setAuditUser(getLoginUser().getUserId().toString());
|
||||
dto.setAuditUserName(getLoginUser().getUsername());
|
||||
transferApplyMapper.addTransferAuditRecord(dto);
|
||||
AjaxResult.success("审核成功");
|
||||
}
|
||||
return AjaxResult.error("审核失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SelectDto> getDeptSelect(TransferApplyDto dto) {
|
||||
return transferApplyMapper.getDeptSelect(dto);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -173,6 +173,43 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="addTransferAuditRecord">
|
||||
INSERT INTO da_ky_transfer_audit_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
transfer_apply_id,
|
||||
</if>
|
||||
<if test="auditStatus != null and auditStatus != ''">
|
||||
audit_status,
|
||||
</if>
|
||||
<if test="auditOpinion != null and auditOpinion != ''">
|
||||
audit_option,
|
||||
</if>
|
||||
<if test="auditUser != null">
|
||||
audit_user_id,
|
||||
</if>
|
||||
<if test="auditUserName != null and auditUserName != ''">
|
||||
audit_user_name,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id},
|
||||
</if>
|
||||
<if test="auditStatus != null and auditStatus != ''">
|
||||
#{auditStatus},
|
||||
</if>
|
||||
<if test="auditOpinion != null and auditOpinion != ''">
|
||||
#{auditOpinion},
|
||||
</if>
|
||||
<if test="auditUser != null">
|
||||
#{auditUser},
|
||||
</if>
|
||||
<if test="auditUserName != null and auditUserName != ''">
|
||||
#{auditUserName},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="edit">
|
||||
UPDATE da_ky_transfer_apply
|
||||
<set>
|
||||
|
|
@ -221,6 +258,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</set>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
<update id="audit">
|
||||
UPDATE da_ky_transfer_apply
|
||||
<set>
|
||||
<if test="auditStatus != null and auditStatus != ''">
|
||||
audit_status = #{auditStatus},
|
||||
</if>
|
||||
<if test="auditOpinion != null and auditOpinion != ''">
|
||||
audit_opinion = #{auditOpinion},
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
<delete id="delTransferFiles">
|
||||
DELETE FROM da_ky_transfer_file
|
||||
WHERE transfer_apply_id = #{id}
|
||||
|
|
@ -283,5 +332,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join da_ky_project dkp on dkp.id = dktf.pro_id
|
||||
where dktf.transfer_apply_id = #{id}
|
||||
</select>
|
||||
<select id="getDeptSelect" resultType="com.bonus.web.domain.SelectDto">
|
||||
SELECT
|
||||
dept_id AS id,
|
||||
dept_name AS name
|
||||
FROM
|
||||
da_ky_sys_dept
|
||||
WHERE
|
||||
del_flag = '0'
|
||||
AND LENGTH(ancestors) - LENGTH(REPLACE(ancestors, ',', '')) + 1 = 3
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue