|
|
@ -54,23 +54,10 @@ import java.io.UnsupportedEncodingException; |
|
|
|
import java.net.URLEncoder; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
/** |
|
|
|
* Project: anrui-as(旧件返厂) <br/> |
|
|
|
* File: AsOldpartreturnApplyFeignFallback.java <br/> |
|
|
|
* Class: com.yxt.anrui.as.biz.asoldpartreturnapply.AsOldpartreturnApplyRest <br/> |
|
|
|
* Description: 旧件返厂申请. <br/> |
|
|
|
* Copyright: Copyright (c) 2011 <br/> |
|
|
|
* Company: https://gitee.com/liuzp315 <br/>
|
|
|
|
* Makedate: 2024-04-17 10:29:50 <br/> |
|
|
|
* |
|
|
|
* @author liupopo |
|
|
|
* @version 1.0 |
|
|
|
* @since 1.0 |
|
|
|
*/ |
|
|
|
@Api(tags = "旧件返厂申请") |
|
|
|
@RestController |
|
|
|
@RequestMapping("v1/asoldpartreturnapply") |
|
|
|
public class AsOldpartreturnApplyRest{ |
|
|
|
public class AsOldpartreturnApplyRest { |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private AsOldpartreturnApplyService asOldpartreturnApplyService; |
|
|
@ -79,7 +66,7 @@ public class AsOldpartreturnApplyRest{ |
|
|
|
|
|
|
|
@ApiOperation("根据条件分页查询数据的列表") |
|
|
|
@PostMapping("/listPage") |
|
|
|
public ResultBean<PagerVo<AsOldpartreturnApplyVo>> listPage(@RequestBody PagerQuery<AsOldpartreturnApplyQuery> pq){ |
|
|
|
public ResultBean<PagerVo<AsOldpartreturnApplyVo>> listPage(@RequestBody PagerQuery<AsOldpartreturnApplyQuery> pq) { |
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
PagerVo<AsOldpartreturnApplyVo> pv = asOldpartreturnApplyService.listPageVo(pq); |
|
|
|
return rb.success().setData(pv); |
|
|
@ -87,7 +74,7 @@ public class AsOldpartreturnApplyRest{ |
|
|
|
|
|
|
|
@ApiOperation("新增或修改") |
|
|
|
@PostMapping("/save") |
|
|
|
public ResultBean save(@RequestBody AsOldpartreturnApplyDto dto){ |
|
|
|
public ResultBean save(@RequestBody AsOldpartreturnApplyDto dto) { |
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
asOldpartreturnApplyService.saveOrUpdateDto(dto); |
|
|
|
return rb.success(); |
|
|
@ -95,7 +82,7 @@ public class AsOldpartreturnApplyRest{ |
|
|
|
|
|
|
|
@ApiOperation("下载待出库旧件明细") |
|
|
|
@PostMapping("/downloadTobeOutExcel/{sid}") |
|
|
|
public void downloadTobeOutExcel(@PathVariable("sid") String sid){ |
|
|
|
public void downloadTobeOutExcel(@PathVariable("sid") String sid) { |
|
|
|
//得到所有要导出的数据
|
|
|
|
List<AsOldpartreturnDetailExcelVo> exportVoList = asOldpartreturnApplyService.downloadTobeOutExcel(sid); |
|
|
|
//定义导出的excel名字
|
|
|
@ -111,13 +98,13 @@ public class AsOldpartreturnApplyRest{ |
|
|
|
|
|
|
|
@ApiOperation("根据sid批量删除") |
|
|
|
@DeleteMapping("/delBySids") |
|
|
|
public ResultBean delBySids(@RequestBody String[] sids){ |
|
|
|
public ResultBean delBySids(@RequestBody String[] sids) { |
|
|
|
return asOldpartreturnApplyService.delAll(sids); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("根据SID获取一条记录") |
|
|
|
@GetMapping("/fetchDetailsBySid/{sid}") |
|
|
|
public ResultBean<AsOldpartreturnApplyDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid){ |
|
|
|
public ResultBean<AsOldpartreturnApplyDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid) { |
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
AsOldpartreturnApplyDetailsVo vo = asOldpartreturnApplyService.fetchDetailsVoBySid(sid); |
|
|
|
return rb.success().setData(vo); |
|
|
|