From e756af0f5bfd1addbd5d5c145441fb34aad91a28 Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期三, 25 六月 2025 13:55:58 +0800 Subject: [PATCH] 同步工控网 --- lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/controller/DispatchFileController.java | 87 ++++++++++++++++++++++++++++++++++++++----- 1 files changed, 76 insertions(+), 11 deletions(-) diff --git a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/controller/DispatchFileController.java b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/controller/DispatchFileController.java index 6e7f712..0afad22 100644 --- a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/controller/DispatchFileController.java +++ b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/controller/DispatchFileController.java @@ -10,15 +10,22 @@ import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.modules.dnc.entity.DocInfo; +import org.jeecg.modules.dnc.response.CommonCode; +import org.jeecg.modules.dnc.response.ResponseResult; +import org.jeecg.modules.dnc.service.IDocInfoService; import org.jeecg.modules.dncFlow.entity.DispatchFile; import org.jeecg.modules.dncFlow.service.IDispatchFileService; import org.jeecg.modules.dncFlow.vo.DispatchFileFlowTaskVo; +import org.jeecg.modules.flowable.domain.dto.FlowTaskDto; +import org.jeecg.modules.flowable.service.IHisWorkTaskService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import java.lang.reflect.InvocationTargetException; import java.util.Arrays; /** @@ -35,6 +42,10 @@ @Autowired private IDispatchFileService dispatchFileService; + @Autowired + private IHisWorkTaskService hisWorkTaskService; + @Autowired + private IDocInfoService docInfoService; /** * 鍒嗛〉鍒楄〃鏌ヨ * @@ -44,7 +55,6 @@ * @param req * @return */ - //@AutoLog(value = "nc绋嬪簭涓庣數瀛愬浘鐗堢娲�-鍒嗛〉鍒楄〃鏌ヨ") @ApiOperation(value="nc绋嬪簭涓庣數瀛愬浘鐗堢娲�-鍒嗛〉鍒楄〃鏌ヨ", notes="nc绋嬪簭涓庣數瀛愬浘鐗堢娲�-鍒嗛〉鍒楄〃鏌ヨ") @GetMapping(value = "/list") public Result<IPage<DispatchFile>> queryPageList(DispatchFile dispatchFile, @@ -58,15 +68,29 @@ } /** + * 鏂囦欢鏌ヨ瀹$娴佺▼ + * @param attributionId,attributionType,docId + * @return + */ + @AutoLog(value = "nc绋嬪簭涓庣數瀛愬浘鐗堢娲�-鏂囦欢鏌ヨ瀹$娴佺▼") + @ApiOperation(value="nc绋嬪簭涓庣數瀛愬浘鐗堢娲�-鏂囦欢鏌ヨ瀹$娴佺▼", notes="nc绋嬪簭涓庣數瀛愬浘鐗堢娲�-鏂囦欢鏌ヨ瀹$娴佺▼") + @GetMapping(value = "/queryDispatchDocFile") + public Result<?> queryDispatchDocFile(@RequestParam(name="attributionId") String attributionId, + @RequestParam(name="attributionType") String attributionType, + @RequestParam(name="docId") String docId){ + return dispatchFileService.queryDispatchDocFile(attributionId,attributionType,docId); + } + + /** * 閲嶆柊鍚姩 - * @param id + * @param dispatchFileFlowTaskVo * @return */ @AutoLog(value = "nc绋嬪簭涓庣數瀛愬浘鐗堢娲�-閲嶆柊鍚姩") @ApiOperation(value="nc绋嬪簭涓庣數瀛愬浘鐗堢娲�-閲嶆柊鍚姩", notes="nc绋嬪簭涓庣數瀛愬浘鐗堢娲�-閲嶆柊鍚姩") - @GetMapping(value = "/saveDispatchFile") - public Result<?> saveDispatchFile(String id){ - return dispatchFileService.reStartDispatchFile(id); + @PostMapping(value = "/saveDispatchFile") + public Result<?> saveDispatchFile(@RequestBody DispatchFileFlowTaskVo dispatchFileFlowTaskVo){ + return dispatchFileService.reStartDispatchFile(dispatchFileFlowTaskVo); } @@ -77,9 +101,28 @@ */ @AutoLog(value = "nc绋嬪簭涓庣數瀛愬浘鐗堢娲�-瀹℃壒鎿嶄綔") @ApiOperation(value="nc绋嬪簭涓庣數瀛愬浘鐗堢娲�-瀹℃壒鎿嶄綔", notes="nc绋嬪簭涓庣數瀛愬浘鐗堢娲�-瀹℃壒鎿嶄綔") - @GetMapping(value = "/approval") - public Result<?> approval(DispatchFileFlowTaskVo dispatchFileFlowTaskVo){ + @PostMapping(value = "/approval") + public Result<?> approval(@RequestBody DispatchFileFlowTaskVo dispatchFileFlowTaskVo){ return dispatchFileService.auditDispatchFile(dispatchFileFlowTaskVo); + } + + /** + * 鎵归噺瀹℃壒鎿嶄綔 + * @param dispatchFileFlowTaskVo + * @return + */ + @AutoLog(value = "nc绋嬪簭涓庣數瀛愬浘鐗堢娲�-鎵归噺瀹℃壒鎿嶄綔") + @ApiOperation(value="nc绋嬪簭涓庣數瀛愬浘鐗堢娲�-鎵归噺瀹℃壒鎿嶄綔", notes="nc绋嬪簭涓庣數瀛愬浘鐗堢娲�-鎵归噺瀹℃壒鎿嶄綔") + @PostMapping(value = "/approvalBatch") + public Result<?> approvalBatch(@RequestBody DispatchFileFlowTaskVo dispatchFileFlowTaskVo) throws InvocationTargetException, IllegalAccessException { + return dispatchFileService.auditBatchDispatchFile(dispatchFileFlowTaskVo); + } + + + @ApiOperation(value = "鑾峰彇宸ヤ綔娴佸巻鍙蹭换鍔�", response = FlowTaskDto.class) + @GetMapping(value = "/queryHisTaskList") + public Result<?> queryHisTaskList(@RequestParam(name = "procInstId") String procInstId) { + return Result.OK(hisWorkTaskService.queryHisTaskByProcInstId(procInstId)); } /** @@ -159,10 +202,16 @@ return Result.OK(dispatchFile); } - @GetMapping(value = "/selectVoById") - public Result<?> selectVoById(@RequestParam(name="id") String id){ - return dispatchFileService.queryDispatchFile(id); - } + /** + * 鏌ヨ瀹$鍩烘湰淇℃伅 + * @param id + * @return + */ + @ApiOperation(value = "鏌ヨ瀹$鍩烘湰淇℃伅", notes = "鏌ヨ瀹$鍩烘湰淇℃伅") + @GetMapping(value = "/selectVoById") + public Result<?> selectVoById(@RequestParam(name="id") String id){ + return dispatchFileService.queryDispatchFile(id); + } /** * 瀵煎嚭excel @@ -188,5 +237,21 @@ public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { return super.importExcel(request, response, DispatchFile.class); } + @AutoLog(value = "鏂囨。琛�-瀹氬瀷娴佺▼鍙戣捣") + @ApiOperation(value = "鏂囨。琛�-瀹氬瀷娴佺▼鍙戣捣", notes = "鏂囨。琛�-瀹氬瀷娴佺▼鍙戣捣") + @PostMapping("/submitProccess") + public ResponseResult submitProccess(@RequestBody DispatchFile dispatchFile) { + dispatchFileService.submitProccess(dispatchFile); + return new ResponseResult(CommonCode.SUCCESS); + } + @AutoLog(value = "鏂囨。琛�-淇℃伅鏌ヨ") + @ApiOperation(value = "鏂囨。琛�-淇℃伅鏌ヨ", notes = "鏂囨。琛�-淇℃伅鏌ヨ") + @GetMapping("/queryDocInfoByFlowDataId") + public Result<DocInfo> queryDocInfoByFlowDataId(@RequestParam("dataId") String dataId) { + DispatchFile dispatchFile = dispatchFileService.getById(dataId); + DocInfo docInfo = docInfoService.getById(dispatchFile.getDocId()); + return Result.OK(docInfo); + } + } -- Gitblit v1.9.3