| | |
| | | @ApiImplicitParam(name = "applyid", value = "数据申请ID", dataType = "Integer", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/updateForDiscard") |
| | | public ResponseMsg<Object> updateForDiscard(Integer applyid) { |
| | | public ResponseMsg<Object> updateForDiscard(Integer applyid, HttpServletRequest req) { |
| | | try { |
| | | ApplyEntity applyEntity = applyService.selectById(applyid); |
| | | if (null == applyEntity) { |
| | |
| | | return fail("该数据申请无法废弃"); |
| | | } |
| | | |
| | | int rows = applyService.updateForDiscard(applyid); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | int rows = applyService.updateForDiscard(ue.getId(), applyid); |
| | | |
| | | return success(rows); |
| | | } catch (Exception ex) { |
| | |
| | | @ApiImplicitParam(name = "applyid", value = "数据申请ID", dataType = "Integer", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/updateForResubmit") |
| | | public ResponseMsg<Object> updateForResubmit(Integer applyid) { |
| | | public ResponseMsg<Object> updateForResubmit(Integer applyid, HttpServletRequest req) { |
| | | try { |
| | | ApplyEntity applyEntity = applyService.selectById(applyid); |
| | | if (null == applyEntity) { |
| | |
| | | return fail("该数据申请无需重新提交"); |
| | | } |
| | | |
| | | int rows = applyService.updateForResubmit(applyid); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | int rows = applyService.updateForResubmit(ue.getId(), applyid); |
| | | |
| | | return success(rows); |
| | | } catch (Exception ex) { |
| | |
| | | return fail("该数据申请无需打回"); |
| | | } |
| | | |
| | | int rows = applyService.updateForSubmit(applyEntity.getId(), flowEntity.getId()); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | int rows = applyService.updateForSubmit(ue.getId(), applyEntity.getId(), flowEntity.getId()); |
| | | |
| | | applyEntity = applyService.selectById(applyEntity.getId()); |
| | | if (StaticData.TEN == applyEntity.getStatus()) { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | applyService.zipDbData(ue, applyEntity); |
| | | } |
| | | |
| | |
| | | @ApiImplicitParam(name = "flowId", value = "申请流程ID", dataType = "Integer", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/updateForReject") |
| | | public ResponseMsg<Object> updateForReject(Integer flowId) { |
| | | public ResponseMsg<Object> updateForReject(Integer flowId, HttpServletRequest req) { |
| | | try { |
| | | FlowEntity flowEntity = flowService.selectById(flowId); |
| | | if (null == flowEntity) { |
| | |
| | | return fail("该数据申请无需打回"); |
| | | } |
| | | |
| | | Integer rows = applyService.updateForReject(applyEntity.getId(), flowEntity.getId()); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | Integer rows = applyService.updateForReject(ue.getId(), applyEntity.getId(), flowEntity.getId()); |
| | | |
| | | return success(rows); |
| | | } catch (Exception ex) { |
| | |
| | | /** |
| | | * 废弃申请 |
| | | * |
| | | * @param id 数据申请ID |
| | | * @param userid 用户ID |
| | | * @param id 数据申请ID |
| | | * @return 行数 |
| | | */ |
| | | public Integer updateForDiscard(Integer id); |
| | | public Integer updateForDiscard(Integer userid, Integer id); |
| | | |
| | | /** |
| | | * 重新提交 |
| | | * |
| | | * @param id 数据申请ID |
| | | * @param userid 用户ID |
| | | * @param id 数据申请ID |
| | | * @return 行数 |
| | | */ |
| | | public Integer updateForResubmit(Integer id); |
| | | public Integer updateForResubmit(Integer userid, Integer id); |
| | | |
| | | /** |
| | | * 提交流程 |
| | | * |
| | | * @param userid 用户ID |
| | | * @param applyid 申请流程ID |
| | | * @param flowId 申请流程ID |
| | | * @return 行数 |
| | | */ |
| | | public Integer updateForSubmit(Integer applyid, Integer flowId); |
| | | public Integer updateForSubmit(Integer userid, Integer applyid, Integer flowId); |
| | | |
| | | /** |
| | | * 打回流程 |
| | | * |
| | | * @param userid 用户ID |
| | | * @param applyid 申请流程ID |
| | | * @param flowId 申请流程ID |
| | | * @return 行数 |
| | | */ |
| | | public Integer updateForReject(Integer applyid, Integer flowId); |
| | | public Integer updateForReject(Integer userid, Integer applyid, Integer flowId); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Integer updateForDiscard(Integer id) { |
| | | return applyMapper.updateForDiscard(id); |
| | | public Integer updateForDiscard(Integer userid, Integer id) { |
| | | return applyMapper.updateForDiscard(userid, id); |
| | | } |
| | | |
| | | @Override |
| | | public Integer updateForResubmit(Integer id) { |
| | | return applyMapper.updateForResubmit(id); |
| | | public Integer updateForResubmit(Integer userid, Integer id) { |
| | | return applyMapper.updateForResubmit(userid, id); |
| | | } |
| | | |
| | | @Override |
| | | public Integer updateForSubmit(Integer applyid, Integer flowId) { |
| | | return applyMapper.updateForSubmit(applyid, flowId); |
| | | public Integer updateForSubmit(Integer userid, Integer applyid, Integer flowId) { |
| | | return applyMapper.updateForSubmit(userid, applyid, flowId); |
| | | } |
| | | |
| | | @Override |
| | | public Integer updateForReject(Integer applyid, Integer flowId) { |
| | | return applyMapper.updateForReject(applyid, flowId); |
| | | public Integer updateForReject(Integer userid, Integer applyid, Integer flowId) { |
| | | return applyMapper.updateForReject(userid, applyid, flowId); |
| | | } |
| | | |
| | | /** |
| | |
| | | </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, update_user = #{userid}, update_time = now() where status between -1 and 9 and id = #{id} |
| | | </update> |
| | | |
| | | <update id="updateForResubmit"> |
| | | update lf.sys_flow set status = 0 where status = -1 and applyid = #{id}; |
| | | update lf.sys_apply a set status = (select count(*) from lf.sys_flow b where b.status = 1 and b.applyid = a.id) where status = -1 and id = #{id}; |
| | | update lf.sys_flow set status = 0, update_user = #{userid}, update_time = now() where status = -1 and applyid = #{id}; |
| | | update lf.sys_apply a set status = (select count(*) from lf.sys_flow b where b.status = 1 and b.applyid = a.id), update_user = #{userid}, update_time = now() where status = -1 and id = #{id}; |
| | | </update> |
| | | |
| | | <update id="updateForSubmit"> |
| | | update lf.sys_flow set status = 1 where id = #{flowId}; |
| | | update lf.sys_apply a set status = (select count(*) from lf.sys_flow b where b.status = 1 and b.applyid = a.id) where id = #{applyid}; |
| | | update lf.sys_flow set status = 1, update_user = #{userid}, update_time = now() where id = #{flowId}; |
| | | update lf.sys_apply a set status = (select count(*) from lf.sys_flow b where b.status = 1 and b.applyid = a.id), update_user = #{userid}, update_time = now() where id = #{applyid}; |
| | | update lf.sys_apply set status = 10 where status = count and id = #{applyid}; |
| | | </update> |
| | | |
| | | <update id="updateForReject"> |
| | | update lf.sys_flow set status = -1 where status = 0 and id = #{flowId}; |
| | | update lf.sys_apply set status = -1 where status between 0 and 9 and id = #{applyid}; |
| | | update lf.sys_flow set status = -1, update_user = #{userid}, update_time = now() where status = 0 and id = #{flowId}; |
| | | update lf.sys_apply set status = -1, update_user = #{userid}, update_time = now() where status between 0 and 9 and id = #{applyid}; |
| | | </update> |
| | | </mapper> |