管道基础大数据平台系统开发-【后端】-Server
13693261870
2022-12-25 52288b740a2f767c0b29f84860a07f0bde634860
12.25.2
已修改5个文件
99 ■■■■■ 文件已修改
src/main/java/com/lf/server/controller/show/ApplyController.java 54 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/entity/all/StaticData.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/mapper/show/ApplyMapper.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/service/show/ApplyService.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/show/ApplyMapper.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/controller/show/ApplyController.java
@@ -3,6 +3,7 @@
import com.lf.server.annotation.SysLog;
import com.lf.server.controller.all.BaseController;
import com.lf.server.entity.all.ResponseMsg;
import com.lf.server.entity.all.StaticData;
import com.lf.server.entity.ctrl.DownloadReqEntity;
import com.lf.server.entity.show.ApplyEntity;
import com.lf.server.entity.show.FlowEntity;
@@ -11,6 +12,7 @@
import com.lf.server.helper.StringHelper;
import com.lf.server.service.data.DownloadService;
import com.lf.server.service.show.ApplyService;
import com.lf.server.service.show.FlowService;
import com.lf.server.service.sys.TokenService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
@@ -33,6 +35,9 @@
public class ApplyController extends BaseController {
    @Autowired
    ApplyService applyService;
    @Autowired
    FlowService flowService;
    @Autowired
    TokenService tokenService;
@@ -123,12 +128,12 @@
    @SysLog()
    @ApiOperation(value = "查询流程")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "数据申请ID", dataType = "Integer", paramType = "query", example = "1")
            @ApiImplicitParam(name = "applyid", value = "数据申请ID", dataType = "Integer", paramType = "query", example = "1")
    })
    @GetMapping(value = "/selectFlows")
    public ResponseMsg<Object> selectFlows(Integer id) {
    public ResponseMsg<Object> selectFlows(Integer applyid) {
        try {
            List<FlowEntity> rs = applyService.selectFlows(id);
            List<FlowEntity> rs = applyService.selectFlows(applyid);
            return success(rs);
        } catch (Exception ex) {
@@ -139,12 +144,28 @@
    @SysLog()
    @ApiOperation(value = "废弃申请")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "数据申请ID", dataType = "Integer", paramType = "query", example = "1")
            @ApiImplicitParam(name = "applyid", value = "数据申请ID", dataType = "Integer", paramType = "query", example = "1")
    })
    @GetMapping(value = "/updateForDiscard")
    public ResponseMsg<Object> updateForDiscard(Integer id) {
    public ResponseMsg<Object> updateForDiscard(Integer applyid) {
        try {
            int rows = applyService.updateForDiscard(id);
            int rows = applyService.updateForDiscard(applyid);
            return success(rows);
        } catch (Exception ex) {
            return fail(ex.getMessage(), null);
        }
    }
    @SysLog()
    @ApiOperation(value = "重新提交")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "applyid", value = "数据申请ID", dataType = "Integer", paramType = "query", example = "1")
    })
    @GetMapping(value = "/updateForResubmit")
    public ResponseMsg<Object> updateForResubmit(Integer applyid) {
        try {
            int rows = applyService.updateForResubmit(applyid);
            return success(rows);
        } catch (Exception ex) {
@@ -157,6 +178,7 @@
    @ApiImplicitParams({
            @ApiImplicitParam(name = "flowId", value = "申请流程ID", dataType = "Integer", paramType = "query", example = "1")
    })
    @GetMapping(value = "/updateForSubmit")
    public ResponseMsg<Object> updateForSubmit(Integer flowId) {
        try {
@@ -171,10 +193,28 @@
    @ApiImplicitParams({
            @ApiImplicitParam(name = "flowId", value = "申请流程ID", dataType = "Integer", paramType = "query", example = "1")
    })
    @GetMapping(value = "/updateForReject")
    public ResponseMsg<Object> updateForReject(Integer flowId) {
        try {
            FlowEntity flowEntity = flowService.selectById(flowId);
            if (null == flowEntity) {
                return fail("找不到申请流程");
            }
            if (flowEntity.getStatus() != 0) {
                return fail("该申请流程无需要打回");
            }
            return success(null);
            ApplyEntity applyEntity = applyService.selectById(flowEntity.getApplyid());
            if (null == applyEntity) {
                return fail("找不到数据申请");
            }
            if (!(applyEntity.getStatus() >= 0 && applyEntity.getStatus() <= StaticData.NINE)) {
                return fail("该数据申请无需要打回");
            }
            Integer rows = applyService.updateForReject(applyEntity.getId(), flowEntity.getId());
            return success(rows);
        } catch (Exception ex) {
            return fail(ex.getMessage(), null);
        }
src/main/java/com/lf/server/entity/all/StaticData.java
@@ -20,6 +20,11 @@
    public final static int FOUR = 4;
    /**
     * 数值:9
     */
    public final static int NINE = 9;
    /**
     * 数值:200
     */
    public final static int TWO_HUNDRED = 200;
@@ -92,5 +97,5 @@
    /**
     * GDB排除字段
     */
    public final static List<String> GDB_EXCLUDE_FIELDS= new ArrayList<>(Arrays.asList("geom", "objectid", "shape_leng", "shape_area", "serialVersionUID", "dirName", "depName", "verName", "createName", "updateName"));
    public final static List<String> GDB_EXCLUDE_FIELDS = new ArrayList<>(Arrays.asList("geom", "objectid", "shape_leng", "shape_area", "serialVersionUID", "dirName", "depName", "verName", "createName", "updateName"));
}
src/main/java/com/lf/server/mapper/show/ApplyMapper.java
@@ -135,4 +135,21 @@
     * @return 行数
     */
    public Integer updateForDiscard(Integer id);
    /**
     * 重新提交
     *
     * @param id 数据申请ID
     * @return 行数
     */
    public Integer updateForResubmit(Integer id);
    /**
     * 打回流程
     *
     * @param applyid 申请流程ID
     * @param flowId  申请流程ID
     * @return 行数
     */
    public Integer updateForReject(Integer applyid, Integer flowId);
}
src/main/java/com/lf/server/service/show/ApplyService.java
@@ -100,6 +100,16 @@
        return applyMapper.updateForDiscard(id);
    }
    @Override
    public Integer updateForResubmit(Integer id) {
        return applyMapper.updateForResubmit(id);
    }
    @Override
    public Integer updateForReject(Integer applyid, Integer flowId) {
        return applyMapper.updateForReject(applyid, flowId);
    }
    /**
     * 插入数据申请
     */
src/main/resources/mapper/show/ApplyMapper.xml
@@ -48,7 +48,7 @@
                and a.create_time &lt;= #{end}
            </if>
        </where>
        order by a.id
        order by a.create_time desc
        limit #{limit} offset #{offset}
    </select>
@@ -128,4 +128,13 @@
    <update id="updateForDiscard">
        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>
    <update id="updateForReject">
        update lf.sys_apply set status = -1 where status between 0 and 9 and id = #{applyid};
        update lf.sys_flow set status = -1 where status = 0 and id = #{flowId};
    </update>
</mapper>