123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- package com.huimv.manage.controller;
- import com.huimv.manage.service.IEarmarkService;
- import com.huimv.manage.util.CodeUtil;
- import com.huimv.manage.util.Result;
- import com.huimv.manage.webservice.task.EarmarkTask;
- import lombok.extern.slf4j.Slf4j;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.beans.factory.annotation.Value;
- import org.springframework.web.bind.annotation.*;
- import java.io.UnsupportedEncodingException;
- /**
- * @Project : huimv.shiwan
- * @Package : com.huimv.biosafety.uface.controller
- * @Description : TODO
- * @Version : 1.0
- * @Author : ZhuoNing
- * @Create : 2020-12-25
- **/
- @CrossOrigin
- @RestController
- @Slf4j
- @RequestMapping(value = "/eartag/earmark")
- public class EarmarkController {
- @Value("${webservice.url}")
- private String webServiceUrl;
- // @Value("${webservice.producerId}")
- // 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 = "accessToken",required = true) String accessToken,
- // @RequestParam(value = "applyId",required = true) int applyId,
- // @RequestParam(value = "packageId",required = false) int packageId,
- // @RequestParam(value = "earMarkId",required = false) int earMarkId,
- // @RequestParam(value = "earMarkNumber",required = false) int earMarkNumber,
- // @RequestParam(value = "returnState",required = false) int returnState,
- // @RequestParam(value = "writeState",required = false) int writeState,
- // @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){
- //
- return earmarkService.listEarmark(pageSize);
- }
- /**
- * @Method : getEarmark
- * @Description : 下载新耳标号
- * @Params : [applyId]
- * @Return : com.huimv.manage.util.Result
- *
- * @Author : ZhuoNing
- * @Date : 2021/10/29
- * @Time : 22:58
- */
- @RequestMapping(value = "/getEarmark",method = RequestMethod.GET)
- public Result getEarmark(@RequestParam(value = "applyId") int applyId) throws UnsupportedEncodingException {
- //
- return earmarkService.getEarmark(applyId);
- }
- /**
- * @Method : setUpdateDownState
- * @Description : 设置耳标号以下载状态
- * @Params : [earmarkIDs]
- * @Return : com.huimv.manage.util.Result
- *
- * @Author : ZhuoNing
- * @Date : 2021/10/29
- * @Time : 22:59
- */
- @RequestMapping(value = "/setUpdateDownState",method = RequestMethod.GET)
- public Result setUpdateDownState(@RequestParam(value = "earMarkIDs") String earmarkIDs) throws UnsupportedEncodingException {
- //
- return earmarkService.setUpdateDownState(earmarkIDs);
- }
- /**
- * @Method : setProduceState
- * @Description : 设置生产状态
- * @Params : [earmarkIDs]
- * @Return : com.huimv.manage.util.Result
- *
- * @Author : ZhuoNing
- * @Date : 2021/10/29
- * @Time : 23:55
- */
- @RequestMapping(value = "/setProduceState",method = RequestMethod.GET)
- public Result setProduceState(@RequestParam(value = "ids") String ids,@RequestParam(value = "state") int state){
- //
- return earmarkService.setProduceState(ids,state);
- }
- /**
- * @Method : setWriteState
- * @Description : 设置写入状态
- * @Params : [ids, state]
- * @Return : com.huimv.manage.util.Result
- *
- * @Author : ZhuoNing
- * @Date : 2021/10/30
- * @Time : 0:02
- */
- @RequestMapping(value = "/setWriteState",method = RequestMethod.GET)
- public Result setWriteState(@RequestParam(value = "ids") String ids,@RequestParam(value = "state") int state){
- //
- return earmarkService.setWriteState(ids,state);
- }
- /**
- * @Method : setPrintState
- * @Description : 设置打码状态
- * @Params : [ids, state]
- * @Return : com.huimv.manage.util.Result
- *
- * @Author : ZhuoNing
- * @Date : 2021/10/30
- * @Time : 0:03
- */
- @RequestMapping(value = "/setPrintState",method = RequestMethod.GET)
- public Result setPrintState(@RequestParam(value = "ids") String ids,@RequestParam(value = "state") int state){
- //
- return earmarkService.setPrintState(ids,state);
- }
- }
|