|
@@ -1,7 +1,6 @@
|
|
|
-package com.huimv.manage.controller;
|
|
|
+package com.huimv.manage.eartag.controller;
|
|
|
|
|
|
-import com.huimv.manage.service.IEarmarkService;
|
|
|
-import com.huimv.manage.util.CodeUtil;
|
|
|
+import com.huimv.manage.eartag.service.IEarmarkService;
|
|
|
import com.huimv.manage.util.Result;
|
|
|
import com.huimv.manage.webservice.task.EarmarkTask;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -9,6 +8,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
import java.io.IOException;
|
|
|
import java.io.UnsupportedEncodingException;
|
|
|
|
|
@@ -31,13 +31,14 @@ public class EarmarkController {
|
|
|
// private String producerId;
|
|
|
// @Autowired
|
|
|
// private Soap soap;
|
|
|
+
|
|
|
@Autowired
|
|
|
private EarmarkTask earmarkTask;
|
|
|
@Autowired
|
|
|
private IEarmarkService earmarkService;
|
|
|
|
|
|
@RequestMapping(value = "/listEarmark",method = RequestMethod.GET)
|
|
|
- public Result listEarmark(@RequestParam(value = "pageSize") int pageSize){
|
|
|
+ public Result listEarmark(@RequestParam(value = "pageSize") int pageSize, HttpServletRequest request){
|
|
|
// public Result listEarmark(@RequestParam(value = "accessToken",required = true) String accessToken,
|
|
|
// @RequestParam(value = "applyId",required = true) int applyId,
|
|
|
// @RequestParam(value = "packageId",required = false) int packageId,
|
|
@@ -48,7 +49,7 @@ public class EarmarkController {
|
|
|
// @RequestParam(value = "printState",required = false) int printState,
|
|
|
// @RequestParam(value = "startDate",required = false) String startDate,
|
|
|
// @RequestParam(value = "endDate",required = false) String endDate,
|
|
|
-// @RequestParam(value = "pageSize",required = true) int pageSize){
|
|
|
+// @RequestParam(value = "pageSize",required = true) int pageSize, HttpServletRequest request){
|
|
|
//
|
|
|
return earmarkService.listEarmark(pageSize);
|
|
|
}
|
|
@@ -64,7 +65,8 @@ public class EarmarkController {
|
|
|
* @Time : 22:58
|
|
|
*/
|
|
|
@RequestMapping(value = "/getEarmark",method = RequestMethod.GET)
|
|
|
- public Result getEarmark(@RequestParam(value = "applyId") int applyId) throws IOException {
|
|
|
+ public Result getEarmark(@RequestParam(value = "applyId") int applyId, HttpServletRequest request) throws IOException {
|
|
|
+ System.out.println("applyId="+applyId);
|
|
|
//
|
|
|
return earmarkService.getEarmark(applyId);
|
|
|
}
|
|
@@ -80,7 +82,7 @@ public class EarmarkController {
|
|
|
* @Time : 22:59
|
|
|
*/
|
|
|
@RequestMapping(value = "/setUpdateDownState",method = RequestMethod.GET)
|
|
|
- public Result setUpdateDownState(@RequestParam(value = "earMarkIDs") String earmarkIDs) throws UnsupportedEncodingException {
|
|
|
+ public Result setUpdateDownState(@RequestParam(value = "earMarkIDs") String earmarkIDs, HttpServletRequest request) throws UnsupportedEncodingException {
|
|
|
//
|
|
|
return earmarkService.setUpdateDownState(earmarkIDs);
|
|
|
}
|
|
@@ -96,7 +98,7 @@ public class EarmarkController {
|
|
|
* @Time : 23:55
|
|
|
*/
|
|
|
@RequestMapping(value = "/setProduceState",method = RequestMethod.GET)
|
|
|
- public Result setProduceState(@RequestParam(value = "ids") String ids,@RequestParam(value = "state") int state){
|
|
|
+ public Result setProduceState(@RequestParam(value = "ids") String ids,@RequestParam(value = "state") int state, HttpServletRequest request){
|
|
|
//
|
|
|
return earmarkService.setProduceState(ids,state);
|
|
|
}
|
|
@@ -112,7 +114,7 @@ public class EarmarkController {
|
|
|
* @Time : 0:02
|
|
|
*/
|
|
|
@RequestMapping(value = "/setWriteState",method = RequestMethod.GET)
|
|
|
- public Result setWriteState(@RequestParam(value = "ids") String ids,@RequestParam(value = "state") int state){
|
|
|
+ public Result setWriteState(@RequestParam(value = "ids") String ids,@RequestParam(value = "state") int state, HttpServletRequest request){
|
|
|
//
|
|
|
return earmarkService.setWriteState(ids,state);
|
|
|
}
|
|
@@ -128,7 +130,7 @@ public class EarmarkController {
|
|
|
* @Time : 0:03
|
|
|
*/
|
|
|
@RequestMapping(value = "/setPrintState",method = RequestMethod.GET)
|
|
|
- public Result setPrintState(@RequestParam(value = "ids") String ids,@RequestParam(value = "state") int state){
|
|
|
+ public Result setPrintState(@RequestParam(value = "ids") String ids,@RequestParam(value = "state") int state, HttpServletRequest request){
|
|
|
//
|
|
|
return earmarkService.setPrintState(ids,state);
|
|
|
}
|