package com.huimv.manage.controller; import com.huimv.manage.service.IPackageService; import com.huimv.manage.util.Result; import com.huimv.manage.webservice.Soap; import com.huimv.manage.webservice.task.PackageTask; 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/package") public class PackageController { @Value("${webservice.url}") private String webServiceUrl; @Value("${webservice.producerId}") private String producerId; @Autowired private Soap soap; @Autowired private PackageTask packageTask; @Autowired private IPackageService packageService; /** * @Method : listPackage * @Description : 展示列表 * @Params : [pageSize] * @Return : com.huimv.manage.util.Result * * @Author : ZhuoNing * @Date : 2021/10/29 * @Time : 15:37 */ @RequestMapping(value = "/listPackage",method = RequestMethod.GET) public Result listPackage(@RequestParam(value = "pageSize")int pageSize){ // public Result listPackage(@RequestParam(value = "accessToken",required = true) String accessToken, // @RequestParam(value = "applyId",required = true) int applyId, // @RequestParam(value = "packageId",required = false) int packageId, // @RequestParam(value = "startDate",required = false) String startDate, // @RequestParam(value = "endDate",required = false) String endDate, // @RequestParam(value = "returnState",required = false) int returnState, // @RequestParam(value = "pageSize",required = true) int pageSize){ // return packageService.listPackage(pageSize); } /** * @Method : getNewPackage * @Description : 根据任务号下载新批次 * @Params : [applyId] * @Return : com.huimv.manage.util.Result * * @Author : ZhuoNing * @Date : 2021/10/29 * @Time : 15:42 */ @RequestMapping(value = "/getNewPackage",method = RequestMethod.GET) public Result getNewPackage(@RequestParam(value = "applyId") int applyId) throws UnsupportedEncodingException { // return packageService.getNewPackage(applyId); } /** * @Method : setReturnDownloadState * @Description : 设置返回批次已下载状态 * @Params : [packageIds, ids] * @Return : com.huimv.manage.util.Result * * @Author : ZhuoNing * @Date : 2021/10/29 * @Time : 18:51 */ @RequestMapping(value = "/setReturnDownloadState",method = RequestMethod.GET) public Result setReturnDownloadState(@RequestParam(value = "packageIds") String packageIds,@RequestParam(value = "ids") String ids) throws UnsupportedEncodingException { // return packageService.setReturnDownloadState(packageIds,ids); } /** * @Method : setProduceState * @Description : 设置生产状态 * @Params : [] * @Return : com.huimv.manage.util.Result * * @Author : ZhuoNing * @Date : 2021/10/29 * @Time : 19:22 */ @RequestMapping(value = "/setProduceState",method = RequestMethod.GET) public Result setProduceState(@RequestParam(value = "ids") String ids,@RequestParam(value = "state") int state){ // return packageService.setProduceState(ids,state); } }