From eaf9574b6d6cd8edcd5cf7c2a38189bf4c461cf7 Mon Sep 17 00:00:00 2001 From: Administrator <zhubaomin> Date: 星期四, 20 六月 2024 17:45:41 +0800 Subject: [PATCH] 2024-06-20 朱宝民 解决打包错误 --- pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeCtrl.java | 39 ++++++++++++++++++++++++++++++++++++++- 1 files changed, 38 insertions(+), 1 deletions(-) diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeCtrl.java index 7372135..6d73906 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeCtrl.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeCtrl.java @@ -9,7 +9,9 @@ import com.dy.common.webUtil.ResultCodeMsg; import com.dy.pipIrrGlobal.pojoPr.PrIntake; import com.dy.pipIrrGlobal.voPr.VoIntake; +import com.dy.pipIrrGlobal.voPr.VoOnLineIntake; import com.dy.pipIrrGlobal.voSe.VoActiveCard; +import com.dy.pipIrrProject.intake.qo.OnLineIntakesQO; import com.dy.pipIrrProject.result.ProjectResultCode; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -140,7 +142,7 @@ @PostMapping(path = "add", consumes = MediaType.APPLICATION_JSON_VALUE) @Transactional(rollbackFor = Exception.class) @SsoAop() - public BaseResponse<Boolean> add(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid PrIntake po, @Parameter(hidden = true) BindingResult bindingResult) { + public BaseResponse<Boolean> add(@RequestBody @Valid PrIntake po, @Parameter(hidden = true) BindingResult bindingResult) { DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); if (bindingResult != null && bindingResult.hasErrors()) { return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); @@ -148,6 +150,7 @@ Date operateTime = new Date(); po.setOperateDt(operateTime); + po.setDeleted((byte)0); Integer rec = Optional.ofNullable(intakeSv.addIntake(po)).orElse(0); if (rec == 0) { return BaseResponseUtils.buildFail(ProjectResultCode.ADD_INTAKE_FAIL.getMessage()); @@ -275,4 +278,38 @@ String fileName = URLEncoder.encode(rawFileName, "UTF-8").replaceAll("\\+", "%20"); response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx"); } + + /** + * 鑾峰彇鍙栨按鍙e垪琛紙鍦ㄧ嚎鍜屼笉鍦ㄧ嚎锛� + * @param qo + * @return + */ + @GetMapping(path = "all_intakes") + @SsoAop() + public BaseResponse<QueryResultVo<List<VoOnLineIntake>>> getAllIntakes(OnLineIntakesQO qo) { + try { + QueryResultVo<List<VoOnLineIntake>> res = intakeSv.selectOnLineIntakes(qo); + return BaseResponseUtils.buildSuccess(res); + } catch (Exception e) { + log.error("鏌ヨ鍙栨按鍙e紓甯�", e); + return BaseResponseUtils.buildException(e.getMessage()); + } + } + + /** + * 鏍规嵁鎿嶄綔鍛樿幏鍙栧父鐢ㄥ彇姘村彛锛堝湪绾垮拰涓嶅湪绾匡級 + * @param operator + * @return + */ + @GetMapping(path = "used_intakes") + @SsoAop() + public BaseResponse<List<VoOnLineIntake>> getUsedIntakes(Long operator) { + try { + List<VoOnLineIntake> res = intakeSv.getUsedIntakes(operator); + return BaseResponseUtils.buildSuccess(res); + } catch (Exception e) { + log.error("鏌ヨ鍙栨按鍙e紓甯�", e); + return BaseResponseUtils.buildException(e.getMessage()); + } + } } -- Gitblit v1.8.0