From 12d9277646a5eeafc20f18c6bb4ea8a855d4e2c1 Mon Sep 17 00:00:00 2001 From: whyclxw <810412026@qq.com> Date: 星期二, 23 七月 2024 15:48:36 +0800 Subject: [PATCH] 不良品推送修改 --- src/main/java/com/whyc/controller/ProductController.java | 79 +++++++++++++++++++++++++++++++++++---- 1 files changed, 70 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/whyc/controller/ProductController.java b/src/main/java/com/whyc/controller/ProductController.java index 9bec15c..ab02189 100644 --- a/src/main/java/com/whyc/controller/ProductController.java +++ b/src/main/java/com/whyc/controller/ProductController.java @@ -42,9 +42,15 @@ @ApiOperation(value = "鏌ヨ鍑烘墍鏈夌殑浜у搧淇℃伅(鍒嗛〉鍔犳ā绯婃煡璇�<浜у搧鐨勭紪鐮侊紝鍨嬪彿锛屽悕瀛楋紝瀹氬埗琛ㄧ紪鍙�>)",notes = "8.17淇敼鍚庝娇鐢�") @GetMapping("getAllProduct") - public Response getAllProduct(@RequestParam(required = false) String parentCode,@RequestParam(required = false) String parentName, @RequestParam(required = false) String parentModel - , @RequestParam(required = false) String customCode, @RequestParam int pageCurr, @RequestParam int pageSize){ - return service.getAllProduct(parentCode,parentName,parentModel,customCode,pageCurr,pageSize); + public Response getAllProduct(@RequestParam(required = false) String subCode, + @RequestParam(required = false) String parentCode, + @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,enabled,pageCurr,pageSize); } @ApiOperation(value = "鏌ヨ鍑烘墍鏈夌殑浜у搧鏃犲弬涓嶅垎椤碉紙浜у搧涓婁紶鐨勬槸鐢級",notes = "9.2淇敼鍚庝娇鐢�") @@ -65,8 +71,9 @@ } @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 = "鍘嗗彶浜у搧淇℃伅鏌ョ湅锛堟牴鎹巻鍙蹭骇鍝佷骇鍝乮d鍜岀増鏈煡璇㈠瓙浠跺強鍏跺叧鑱旂殑鐗╂枡淇℃伅锛�",notes = "8.17淇敼鍚庝娇鐢�") @@ -74,16 +81,31 @@ public Response getBomHistoryAndMaterial( @RequestParam int productId, @RequestParam int version){ 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淇敼鍚庝娇鐢�") @GetMapping("setpHistoryEnable") - public Response setpHistoryEnable( @RequestParam String parentCode, @RequestParam String customCode, @RequestParam int version,@RequestParam int enabled,@RequestParam(required = false) String reason) { - return historyService.setpHistoryEnable(parentCode, customCode, version, enabled,reason); + public Response setpHistoryEnable( @RequestParam String parentCode, @RequestParam String customCode, @RequestParam int version,@RequestParam int enabled,@RequestParam(required = false) String reason,@RequestParam String versionTime) { + return historyService.setpHistoryEnable(parentCode, customCode, version, enabled,reason,versionTime); } @PostMapping("zipParse") @ApiOperation(value = "zip瑙f瀽",notes = "杩斿洖缁撴灉涓�,杩藉姞data3涓哄姣旂粨鏋�,涓簁ey-value闆嗗悎,key涓篸iffList,addList,deleteList") @@ -93,9 +115,48 @@ return service.zipParse(file,baseProduct); } + /** + * 杩欎釜鎺ュ彛鏄繘琛屼骇鍝佹柊澧�,浜у搧bom鏂板鐨勬帴鍙�. + * 鏂板鏂瑰紡鏈夊緢澶�,鏈夌洿鎺ヤ粠zip瑙f瀽鏂板浜у搧,涔熷彲浠ュ熀浜庡師鏈変骇鍝佸鍒惰繘琛屽畾鍒剁瓑.闇�瑕佹敞鎰忓吋瀹�! + * @param product 浜у搧鏂板,bom鏂板,浜у搧鐗堟湰鏇存柊 + * @return + * @throws IOException + */ @PostMapping @ApiOperation(value = "鏂板",notes = "瑙f瀽鏃惰繑鍥炵殑缁濆璺緞,闇�瑕佸洖浼犲埌瀛楁fileUrl") public Response add(@RequestBody Product product) throws IOException { return service.add(product); } + + @ApiOperation(value = "鏍规嵁浜у搧id鏌ヨ琚攣瀹氱殑鐗╂枡dwg鍜屼骇鍝佷笣鍗�",notes = "8.17淇敼鍚庝娇鐢�") + @GetMapping("getLockedByProductId") + public Response getLockedByProductId( @RequestParam int productId){ + return service.getLockedByProductId(productId); + } + + /*@GetMapping("manualUpdate") + @Transactional + public void manualUpdate(){ + //material灞炴�ц浆绉诲埌bom鍜宐omHistory + 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); + } } -- Gitblit v1.9.1