|
@ -54,137 +54,124 @@ import java.io.UnsupportedEncodingException; |
|
|
import java.net.URLEncoder; |
|
|
import java.net.URLEncoder; |
|
|
import java.util.List; |
|
|
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 = "旧件返厂申请") |
|
|
@Api(tags = "旧件返厂申请") |
|
|
@RestController |
|
|
@RestController |
|
|
@RequestMapping("v1/asoldpartreturnapply") |
|
|
@RequestMapping("v1/asoldpartreturnapply") |
|
|
public class AsOldpartreturnApplyRest{ |
|
|
public class AsOldpartreturnApplyRest { |
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
private AsOldpartreturnApplyService asOldpartreturnApplyService; |
|
|
private AsOldpartreturnApplyService asOldpartreturnApplyService; |
|
|
@Autowired |
|
|
@Autowired |
|
|
HttpServletResponse response; |
|
|
HttpServletResponse response; |
|
|
|
|
|
|
|
|
@ApiOperation("根据条件分页查询数据的列表") |
|
|
@ApiOperation("根据条件分页查询数据的列表") |
|
|
@PostMapping("/listPage") |
|
|
@PostMapping("/listPage") |
|
|
public ResultBean<PagerVo<AsOldpartreturnApplyVo>> listPage(@RequestBody PagerQuery<AsOldpartreturnApplyQuery> pq){ |
|
|
public ResultBean<PagerVo<AsOldpartreturnApplyVo>> listPage(@RequestBody PagerQuery<AsOldpartreturnApplyQuery> pq) { |
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
PagerVo<AsOldpartreturnApplyVo> pv = asOldpartreturnApplyService.listPageVo(pq); |
|
|
PagerVo<AsOldpartreturnApplyVo> pv = asOldpartreturnApplyService.listPageVo(pq); |
|
|
return rb.success().setData(pv); |
|
|
return rb.success().setData(pv); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ApiOperation("新增或修改") |
|
|
@ApiOperation("新增或修改") |
|
|
@PostMapping("/save") |
|
|
@PostMapping("/save") |
|
|
public ResultBean save(@RequestBody AsOldpartreturnApplyDto dto){ |
|
|
public ResultBean save(@RequestBody AsOldpartreturnApplyDto dto) { |
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
asOldpartreturnApplyService.saveOrUpdateDto(dto); |
|
|
asOldpartreturnApplyService.saveOrUpdateDto(dto); |
|
|
return rb.success(); |
|
|
return rb.success(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ApiOperation("下载待出库旧件明细") |
|
|
@ApiOperation("下载待出库旧件明细") |
|
|
@PostMapping("/downloadTobeOutExcel/{sid}") |
|
|
@PostMapping("/downloadTobeOutExcel/{sid}") |
|
|
public void downloadTobeOutExcel(@PathVariable("sid") String sid){ |
|
|
public void downloadTobeOutExcel(@PathVariable("sid") String sid) { |
|
|
//得到所有要导出的数据
|
|
|
//得到所有要导出的数据
|
|
|
List<AsOldpartreturnDetailExcelVo> exportVoList = asOldpartreturnApplyService.downloadTobeOutExcel(sid); |
|
|
List<AsOldpartreturnDetailExcelVo> exportVoList = asOldpartreturnApplyService.downloadTobeOutExcel(sid); |
|
|
//定义导出的excel名字
|
|
|
//定义导出的excel名字
|
|
|
String excelName = "待出库旧件明细"; |
|
|
String excelName = "待出库旧件明细"; |
|
|
String fileNameURL = ""; |
|
|
String fileNameURL = ""; |
|
|
try { |
|
|
try { |
|
|
fileNameURL = URLEncoder.encode(excelName, "UTF-8"); |
|
|
fileNameURL = URLEncoder.encode(excelName, "UTF-8"); |
|
|
} catch (UnsupportedEncodingException e) { |
|
|
} catch (UnsupportedEncodingException e) { |
|
|
e.printStackTrace(); |
|
|
e.printStackTrace(); |
|
|
} |
|
|
} |
|
|
ExportExcelUtils.export(fileNameURL, exportVoList, AsOldpartreturnDetailExcelVo.class, response); |
|
|
ExportExcelUtils.export(fileNameURL, exportVoList, AsOldpartreturnDetailExcelVo.class, response); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ApiOperation("根据sid批量删除") |
|
|
@ApiOperation("根据sid批量删除") |
|
|
@DeleteMapping("/delBySids") |
|
|
@DeleteMapping("/delBySids") |
|
|
public ResultBean delBySids(@RequestBody String[] sids){ |
|
|
public ResultBean delBySids(@RequestBody String[] sids) { |
|
|
return asOldpartreturnApplyService.delAll(sids); |
|
|
return asOldpartreturnApplyService.delAll(sids); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ApiOperation("根据SID获取一条记录") |
|
|
@ApiOperation("根据SID获取一条记录") |
|
|
@GetMapping("/fetchDetailsBySid/{sid}") |
|
|
@GetMapping("/fetchDetailsBySid/{sid}") |
|
|
public ResultBean<AsOldpartreturnApplyDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid){ |
|
|
public ResultBean<AsOldpartreturnApplyDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid) { |
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
AsOldpartreturnApplyDetailsVo vo = asOldpartreturnApplyService.fetchDetailsVoBySid(sid); |
|
|
AsOldpartreturnApplyDetailsVo vo = asOldpartreturnApplyService.fetchDetailsVoBySid(sid); |
|
|
return rb.success().setData(vo); |
|
|
return rb.success().setData(vo); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ApiOperation("提交审批流程") |
|
|
@ApiOperation("提交审批流程") |
|
|
@PostMapping("/submit") |
|
|
@PostMapping("/submit") |
|
|
public ResultBean submit(@RequestBody @Valid SubmitAsOldpartreturnApplyDto dto) { |
|
|
public ResultBean submit(@RequestBody @Valid SubmitAsOldpartreturnApplyDto dto) { |
|
|
return asOldpartreturnApplyService.submit(dto); |
|
|
return asOldpartreturnApplyService.submit(dto); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ApiOperation(value = "办理(同意)") |
|
|
@ApiOperation(value = "办理(同意)") |
|
|
@PostMapping("/complete") |
|
|
@PostMapping("/complete") |
|
|
public ResultBean complete(@Valid @RequestBody AsOldpartreturnApplyCompleteDto query) { |
|
|
public ResultBean complete(@Valid @RequestBody AsOldpartreturnApplyCompleteDto query) { |
|
|
BusinessVariables bv = new BusinessVariables(); |
|
|
BusinessVariables bv = new BusinessVariables(); |
|
|
BeanUtil.copyProperties(query, bv); |
|
|
BeanUtil.copyProperties(query, bv); |
|
|
bv.setModelId(ProcDefEnum.ASOLDPARTRETURNAPPLY.getProDefId()); |
|
|
bv.setModelId(ProcDefEnum.ASOLDPARTRETURNAPPLY.getProDefId()); |
|
|
return asOldpartreturnApplyService.complete(bv); |
|
|
return asOldpartreturnApplyService.complete(bv); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ApiOperation(value = "获取上一个环节") |
|
|
@ApiOperation(value = "获取上一个环节") |
|
|
@GetMapping(value = "/getPreviousNodesForReject") |
|
|
@GetMapping(value = "/getPreviousNodesForReject") |
|
|
public ResultBean<List<AsOldpartreturnApplyNodeVo>> getPreviousNodesForReject(@Valid @SpringQueryMap AsOldpartreturnApplyNodeQuery query) { |
|
|
public ResultBean<List<AsOldpartreturnApplyNodeVo>> getPreviousNodesForReject(@Valid @SpringQueryMap AsOldpartreturnApplyNodeQuery query) { |
|
|
return asOldpartreturnApplyService.getPreviousNodesForReject(query); |
|
|
return asOldpartreturnApplyService.getPreviousNodesForReject(query); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ApiOperation(value = "获取下一个环节") |
|
|
@ApiOperation(value = "获取下一个环节") |
|
|
@GetMapping(value = "/getNextNodesForSubmit") |
|
|
@GetMapping(value = "/getNextNodesForSubmit") |
|
|
public ResultBean<List<AsOldpartreturnApplyNodeVo>> getNextNodesForSubmit(@Valid @SpringQueryMap AsOldpartreturnApplyNodeQuery query) { |
|
|
public ResultBean<List<AsOldpartreturnApplyNodeVo>> getNextNodesForSubmit(@Valid @SpringQueryMap AsOldpartreturnApplyNodeQuery query) { |
|
|
return asOldpartreturnApplyService.getNextNodesForSubmit(query); |
|
|
return asOldpartreturnApplyService.getNextNodesForSubmit(query); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ApiOperation(value = "驳回任务") |
|
|
@ApiOperation(value = "驳回任务") |
|
|
@PostMapping(value = "/reject") |
|
|
@PostMapping(value = "/reject") |
|
|
public ResultBean reject(@Valid @RequestBody AsOldpartreturnApplyTaskQuery query) { |
|
|
public ResultBean reject(@Valid @RequestBody AsOldpartreturnApplyTaskQuery query) { |
|
|
return asOldpartreturnApplyService.reject(query); |
|
|
return asOldpartreturnApplyService.reject(query); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ApiOperation(value = "撤回流程") |
|
|
@ApiOperation(value = "撤回流程") |
|
|
@PostMapping(value = "/revokeProcess") |
|
|
@PostMapping(value = "/revokeProcess") |
|
|
public ResultBean revokeProcess(@Valid @RequestBody AsOldpartreturnApplyTaskQuery query) { |
|
|
public ResultBean revokeProcess(@Valid @RequestBody AsOldpartreturnApplyTaskQuery query) { |
|
|
return asOldpartreturnApplyService.revokeProcess(query); |
|
|
return asOldpartreturnApplyService.revokeProcess(query); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ApiOperation(value = "终止任务") |
|
|
@ApiOperation(value = "终止任务") |
|
|
@PostMapping(value = "/breakProcess") |
|
|
@PostMapping(value = "/breakProcess") |
|
|
public ResultBean breakProcess(@Valid @RequestBody AsOldpartreturnApplyTaskQuery query) { |
|
|
public ResultBean breakProcess(@Valid @RequestBody AsOldpartreturnApplyTaskQuery query) { |
|
|
return asOldpartreturnApplyService.breakProcess(query); |
|
|
return asOldpartreturnApplyService.breakProcess(query); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ApiOperation(value = "加签") |
|
|
@ApiOperation(value = "加签") |
|
|
@PostMapping(value = "/delegate") |
|
|
@PostMapping(value = "/delegate") |
|
|
public ResultBean delegate(@RequestBody AsOldpartreturnApplyDelegateQuery query) { |
|
|
public ResultBean delegate(@RequestBody AsOldpartreturnApplyDelegateQuery query) { |
|
|
return asOldpartreturnApplyService.delegate(query); |
|
|
return asOldpartreturnApplyService.delegate(query); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@PostMapping("/downloadModPriceExcel") |
|
|
@PostMapping("/downloadModPriceExcel") |
|
|
@ApiOperation(value = "下载模板") |
|
|
@ApiOperation(value = "下载模板") |
|
|
@ResponseBody |
|
|
@ResponseBody |
|
|
public void downloadExcel() { |
|
|
public void downloadExcel() { |
|
|
asOldpartreturnApplyService.downloadExcel(); |
|
|
asOldpartreturnApplyService.downloadExcel(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@PostMapping("/getExcelInfo") |
|
|
@PostMapping("/getExcelInfo") |
|
|
@ResponseBody |
|
|
@ResponseBody |
|
|
@ApiOperation(value = "导入") |
|
|
@ApiOperation(value = "导入") |
|
|
public ResultBean<List<AsOldpartreturnDetailsVo>> getExcelInfo(MultipartFile file, HttpServletRequest request) throws IOException { |
|
|
public ResultBean<List<AsOldpartreturnDetailsVo>> getExcelInfo(MultipartFile file, HttpServletRequest request) throws IOException { |
|
|
return asOldpartreturnApplyService.getExcelInfo(file, request); |
|
|
return asOldpartreturnApplyService.getExcelInfo(file, request); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|