| | |
| | | import com.highdatas.mdm.pojo.Result; |
| | | import com.highdatas.mdm.service.*; |
| | | import com.highdatas.mdm.util.Constant; |
| | | import com.highdatas.mdm.util.DbUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | IFlowsService flowsService; |
| | | @Autowired |
| | | IMaintainFieldService maintainFieldService; |
| | | @Autowired |
| | | IMasterAuthorService masterAuthorService; |
| | | |
| | | @RequestMapping(value = "/get/{id}", method = RequestMethod.GET) |
| | | public Result get(@PathVariable String id) { |
| | |
| | | public Result unSubmit(@PathVariable String tableName, @PathVariable Integer pageNo, HttpServletRequest request) throws UnsupportedEncodingException { |
| | | String pageSize = request.getParameter("pageSize"); |
| | | String whereSegment = request.getParameter("whereSegment"); |
| | | |
| | | TUser user = DbUtils.getUser(request); |
| | | if (StringUtils.isEmpty(whereSegment)) { |
| | | whereSegment = Constant.WHERE_DEFAULT; |
| | | }else { |
| | | whereSegment = URLDecoder.decode(whereSegment, "UTF-8"); |
| | | } |
| | | return maintainService.getUnSubmitData(tableName, pageNo, pageSize, whereSegment); |
| | | return maintainService.getUnSubmitData(user, tableName, pageNo, pageSize, whereSegment); |
| | | } |
| | | |
| | | @RequestMapping(value = "{tableName}/unflow/{pageNo}", method = RequestMethod.GET) |
| | | public Result unflow(@PathVariable String tableName, @PathVariable Integer pageNo, HttpServletRequest request) throws UnsupportedEncodingException { |
| | | String pageSize = request.getParameter("pageSize"); |
| | | String whereSegment = request.getParameter("whereSegment"); |
| | | TUser user = DbUtils.getUser(request); |
| | | |
| | | if (StringUtils.isEmpty(whereSegment)) { |
| | | whereSegment = Constant.WHERE_DEFAULT; |
| | |
| | | whereSegment = URLDecoder.decode(whereSegment, "UTF-8"); |
| | | } |
| | | if (StringUtils.isEmpty(pageSize)) { |
| | | return maintainService.getInvalidVerionData(tableName, whereSegment, pageNo, null); |
| | | return maintainService.getInvalidVerionData(user, tableName, whereSegment, pageNo, null); |
| | | } else { |
| | | return maintainService.getInvalidVerionData(tableName, whereSegment, pageNo, Integer.valueOf(pageSize)); |
| | | return maintainService.getInvalidVerionData(user, tableName, whereSegment, pageNo, Integer.valueOf(pageSize)); |
| | | } |
| | | } |
| | | |
| | |
| | | if (StringUtils.isEmpty(flowId)) { |
| | | continue; |
| | | } |
| | | |
| | | boolean author = masterAuthorService.checkMaintainAuthor(userId, maintain.getId()); |
| | | if (!author) { |
| | | continue; |
| | | } |
| | | Flows flows = flowsService.selectById(maintain.getFlowId()); |
| | | if (flows.getStatus().equals(ActivitiStatus.close)) { |
| | | continue; |
| | |
| | | public Result setFlowId(@RequestParam String flowId,@PathVariable Integer pageNo, HttpServletRequest request) { |
| | | String whereSegment = request.getParameter("whereSegment"); |
| | | String pageSize = request.getParameter("pageSize"); |
| | | TUser user = DbUtils.getUser(request); |
| | | if (StringUtils.isEmpty(whereSegment)) { |
| | | whereSegment = Constant.WHERE_DEFAULT; |
| | | } |
| | | if (StringUtils.isEmpty(pageSize)) { |
| | | return maintainService.tempDataByVersionByFlow(flowId, whereSegment, pageNo, null); |
| | | return maintainService.tempDataByVersionByFlow(user, flowId, whereSegment, pageNo, null); |
| | | } |
| | | return maintainService.tempDataByVersionByFlow(flowId, whereSegment, pageNo, Integer.valueOf(pageSize)); |
| | | return maintainService.tempDataByVersionByFlow(user, flowId, whereSegment, pageNo, Integer.valueOf(pageSize)); |
| | | } |
| | | |
| | | |