管道基础大数据平台系统开发-【后端】-Server
13693261870
2022-12-25 158ea33a9e2b812ad5a305911c70809fd67db9c2
12.25.3
已修改2个文件
42 ■■■■■ 文件已修改
src/main/java/com/lf/server/controller/show/ApplyController.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/show/ApplyMapper.xml 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/controller/show/ApplyController.java
@@ -149,6 +149,14 @@
    @GetMapping(value = "/updateForDiscard")
    public ResponseMsg<Object> updateForDiscard(Integer applyid) {
        try {
            ApplyEntity applyEntity = applyService.selectById(applyid);
            if (null == applyEntity) {
                return fail("找不到数据申请");
            }
            if (!(applyEntity.getStatus() >= -1 && applyEntity.getStatus() <= StaticData.NINE)) {
                return fail("该数据申请无法废弃");
            }
            int rows = applyService.updateForDiscard(applyid);
            return success(rows);
@@ -165,6 +173,14 @@
    @GetMapping(value = "/updateForResubmit")
    public ResponseMsg<Object> updateForResubmit(Integer applyid) {
        try {
            ApplyEntity applyEntity = applyService.selectById(applyid);
            if (null == applyEntity) {
                return fail("找不到数据申请");
            }
            if (-1 != applyEntity.getStatus()) {
                return fail("该数据申请无需重新提交");
            }
            int rows = applyService.updateForResubmit(applyid);
            return success(rows);
@@ -181,6 +197,23 @@
    @GetMapping(value = "/updateForSubmit")
    public ResponseMsg<Object> updateForSubmit(Integer flowId) {
        try {
            FlowEntity flowEntity = flowService.selectById(flowId);
            if (null == flowEntity) {
                return fail("找不到申请流程");
            }
            if (flowEntity.getStatus() != 0) {
                return fail("该申请流程无需要打回");
            }
            ApplyEntity applyEntity = applyService.selectById(flowEntity.getApplyid());
            if (null == applyEntity) {
                return fail("找不到数据申请");
            }
            if (!(applyEntity.getStatus() >= 0 && applyEntity.getStatus() <= StaticData.NINE)) {
                return fail("该数据申请无需要打回");
            }
            //
            return success(null);
        } catch (Exception ex) {
src/main/resources/mapper/show/ApplyMapper.xml
@@ -126,11 +126,16 @@
    </update>
    <update id="updateForDiscard">
        update lf.sys_apply set status = 10 where status between -1 and 9 and id = #{id}
        update lf.sys_apply set status = -10 where status between -1 and 9 and id = #{id}
    </update>
    <update id="updateForResubmit">
        update lf.sys_apply set status = 0 where status = -1 and id = #{id}
        update lf.sys_apply set status = 0 where status = -1 and id = #{id};
        update lf.sys_flow set status = 0 where status = -1 and applyid = #{id};
    </update>
    <update id="updateForSubmit">
    </update>
    <update id="updateForReject">