| | |
| | | @RequestParam(required = false) String parentName, |
| | | @RequestParam(required = false) String parentModel, |
| | | @RequestParam(required = false) String customCode, |
| | | @RequestParam(required = false) Integer enabled, |
| | | @RequestParam int pageCurr, |
| | | @RequestParam int pageSize){ |
| | | return service.getAllProduct(subCode,parentCode,parentName,parentModel,customCode,pageCurr,pageSize); |
| | | return service.getAllProduct(subCode,parentCode,parentName,parentModel,customCode,enabled,pageCurr,pageSize); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询出所有的产品无参不分页(产品上传的是用)",notes = "9.2修改后使用") |
| | |
| | | } |
| | | @ApiOperation(value = "产品下载(产品id和版本<当前最新版本>)",notes = "8.17修改后使用") |
| | | @GetMapping("downloadProduct") |
| | | public void downloadProduct(HttpServletRequest req, HttpServletResponse resp, @RequestParam int productId, @RequestParam int version){ |
| | | bomService.downloadProduct(req,resp,productId,version); |
| | | public void downloadProduct(HttpServletRequest req, HttpServletResponse resp, @RequestParam int productId, @RequestParam int version |
| | | , @RequestParam String oprateReason, @RequestParam String oprateInfo){ |
| | | bomService.downloadProduct(req,resp,productId,version,oprateReason,oprateInfo); |
| | | } |
| | | |
| | | @ApiOperation(value = "历史产品信息查看(根据历史产品产品id和版本查询子件及其关联的物料信息)",notes = "8.17修改后使用") |
| | |
| | | return bomHistoryService.getBomHistoryAndMaterial(productId,version); |
| | | } |
| | | |
| | | @ApiOperation(value = "历史产品信息查看(产品中有0120开头的物料其实是产品,查看产品信息)",notes = "2.8修改后使用!!!暂时无用!!!!") |
| | | @GetMapping("getBomHistoryAndMaterial_0120") |
| | | public Response getBomHistoryAndMaterial_0120( @RequestParam String parentCode, @RequestParam String parentName, @RequestParam String parentModel){ |
| | | return bomHistoryService.getBomHistoryAndMaterial_0120(parentCode,parentName,parentModel); |
| | | } |
| | | |
| | | @ApiOperation(value = "根据产品母料型号,定制单号,版本下载原始压缩包文件",notes = "11.17修改后使用") |
| | | @GetMapping("getOriginalZip") |
| | | public Response getOriginalZip(@RequestParam String parentCode, @RequestParam String parentModel,@RequestParam(required = false) String customCode,@RequestParam int version){ |
| | | return bomHistoryService.getOriginalZip(parentCode,parentModel,customCode,version); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "历史产品下载(产品id和版本<下载的版本>)",notes = "8.17修改后使用") |
| | | @GetMapping("downloadProductHistory") |
| | | public void downloadProductHistory(HttpServletRequest req, HttpServletResponse resp, @RequestParam int productId, @RequestParam int version){ |
| | | bomHistoryService.downloadProductHistory(req,resp,productId,version); |
| | | public void downloadProductHistory(HttpServletRequest req, HttpServletResponse resp, @RequestParam int productId, @RequestParam int version |
| | | , @RequestParam String oprateReason, @RequestParam String oprateInfo){ |
| | | bomHistoryService.downloadProductHistory(req,resp,productId,version,oprateReason,oprateInfo); |
| | | } |
| | | |
| | | @ApiOperation(value = "历史版本可用性设定",notes = "8.31修改后使用") |
| | |
| | | return historyService.setpHistoryEnable(parentCode, customCode, version, enabled,reason,versionTime); |
| | | } |
| | | @PostMapping("zipParse") |
| | | @ApiOperation(value = "zip解析",notes = "返回结果中,追加data3为对比结果,为key-value集合,key为diffList,addList,deleteList") |
| | | @ApiOperation(value = "zip解析",notes = "返回结果中,追加data3为对比结果,为key-value集合,key为diffList,addList,deleteList,diffDwgList") |
| | | public Response zipParse(@RequestParam("file") MultipartFile file,@RequestParam(required = false) String baseStr) throws IOException, InvalidFormatException { |
| | | //要做对比的产品,传入了物料(parent_code)和定制表单号(custom_code) |
| | | Product baseProduct = (baseStr==null?null:ActionUtil.getGson().fromJson(baseStr, Product.class)); |
| | | return service.zipParse(file,baseProduct); |
| | | } |
| | | |
| | | /** |
| | | * 这个接口是进行产品新增,产品bom新增的接口. |
| | | * 新增方式有很多,有直接从zip解析新增产品,也可以基于原有产品复制进行定制等.需要注意兼容! |
| | | * @param product 产品新增,bom新增,产品版本更新 |
| | | * @return |
| | | * @throws IOException |
| | | */ |
| | | @PostMapping |
| | | @ApiOperation(value = "新增",notes = "解析时返回的绝对路径,需要回传到字段fileUrl") |
| | | public Response add(@RequestBody Product product) throws IOException { |
| | |
| | | public Response getLockedByProductId( @RequestParam int productId){ |
| | | return service.getLockedByProductId(productId); |
| | | } |
| | | |
| | | /*@GetMapping("manualUpdate") |
| | | @Transactional |
| | | public void manualUpdate(){ |
| | | //material属性转移到bom和bomHistory |
| | | bomHistoryService.updateMaterialField2BomHistory(); |
| | | bomService.updateMaterialField2Bom(); |
| | | }*/ |
| | | |
| | | @ApiOperation(tags = "反馈管理",value = "查询当前使用的所有的产品") |
| | | @GetMapping("getFkProduct") |
| | | public Response getFkProduct(){ |
| | | return service.getFkProduct(); |
| | | } |
| | | |
| | | @ApiOperation(value = "产品对比下拉选中") |
| | | @GetMapping("getCompareProduct") |
| | | public Response getCompareProduct(){ |
| | | return service.getCompareProduct(); |
| | | } |
| | | |
| | | @ApiOperation(value = "验证母料编码是否存在产品中") |
| | | @GetMapping("judgeParentCode") |
| | | public Response judgeParentCode(@RequestParam String parentCode,@RequestParam(required = false) String customCode){ |
| | | return service.judgeParentCode(parentCode,customCode); |
| | | } |
| | | } |