|
@@ -1,18 +1,14 @@
|
|
|
package com.iamberry.rst.controllers.approval;
|
|
|
|
|
|
-import com.iamberry.rst.core.page.PageRequest;
|
|
|
-import com.iamberry.rst.core.page.PagedResult;
|
|
|
import com.iamberry.rst.faces.approval.ApplyPickItemService;
|
|
|
import com.iamberry.rst.faces.approval.ApplyPickService;
|
|
|
import com.iamberry.wechat.tools.ResponseJson;
|
|
|
+import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
-import java.util.List;
|
|
|
-
|
|
|
@Controller
|
|
|
@RequestMapping("/admin/applyPick")
|
|
|
public class ApplyPickController {
|
|
@@ -22,58 +18,16 @@ public class ApplyPickController {
|
|
|
@Autowired
|
|
|
private ApplyPickItemService applyPickItemService;
|
|
|
|
|
|
- /* *//**
|
|
|
- *
|
|
|
- * @param applyPick
|
|
|
- * @param pageSize
|
|
|
- * @param pageNO
|
|
|
- * @param totalNum
|
|
|
+ /**
|
|
|
+ * 获取已审批通过的订单
|
|
|
* @return
|
|
|
- * @throws Exception
|
|
|
- *//*
|
|
|
+ */
|
|
|
@ResponseBody
|
|
|
- @RequestMapping(value = "/applyPickList")
|
|
|
- public ResponseJson listApplyPickPage(
|
|
|
- ApplyPick applyPick,
|
|
|
- @RequestParam(value = "pageSize", defaultValue = "10", required = false) Integer pageSize,
|
|
|
- @RequestParam(value = "pageNO", defaultValue = "1", required = false) Integer pageNO,
|
|
|
- @RequestParam(value = "totalNum", defaultValue = "0", required = false) Integer totalNum) throws Exception {
|
|
|
- ResponseJson rj =new ResponseJson(200, "查询成功", 200);
|
|
|
-
|
|
|
- PagedResult<ApplyPick> pagedResult = applyPickService.listApplyPickPage(new PageRequest<ApplyPick>(applyPick, pageNO, pageSize, totalNum == null));
|
|
|
- if (totalNum != 0) {
|
|
|
- pagedResult.setTotal(totalNum);
|
|
|
- }
|
|
|
- List<ApplyPick> applyPickList = pagedResult.getDataList();
|
|
|
- rj.addResponseKeyValue("applyPickList",applyPickList);
|
|
|
- return rj;
|
|
|
- }
|
|
|
+ @RequestMapping("/listApprovalOrder")
|
|
|
+ @RequiresPermissions("pick:listApprovalOrder")
|
|
|
+ public ResponseJson listApprovalOrder() {
|
|
|
|
|
|
-
|
|
|
- @ResponseBody
|
|
|
- @RequestMapping(value = "/addApplyPick")
|
|
|
- public ResponseJson addApplyPick(
|
|
|
- ApplyPick applyPick) throws Exception {
|
|
|
- ResponseJson rj =new ResponseJson(200, "添加成功", 200);
|
|
|
- Integer flag = applyPickService.save(applyPick);
|
|
|
- if (flag < 1) {
|
|
|
- return ResponseJson.getFAILURE();
|
|
|
- }
|
|
|
- return rj;
|
|
|
+ return null;
|
|
|
}
|
|
|
|
|
|
- @ResponseBody
|
|
|
- @RequestMapping(value = "/updateApplyPick")
|
|
|
- public ResponseJson updateApplyPick(
|
|
|
- ApplyPick applyPick) throws Exception {
|
|
|
- ResponseJson rj =new ResponseJson(200, "修改成功", 200);
|
|
|
- Integer flag = applyPickService.update(applyPick);
|
|
|
- if (flag < 1) {
|
|
|
- return ResponseJson.getFAILURE();
|
|
|
- }
|
|
|
- return rj;
|
|
|
- }
|
|
|
-
|
|
|
-*/
|
|
|
-
|
|
|
}
|