houshuai
2025-06-13 59e896ed4ea42f82057474227ea7ec78cb5a8be9
航宇dnc定型流程功能开发
已修改4个文件
51 ■■■■■ 文件已修改
lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/controller/DispatchFileController.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/service/IDispatchFileService.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/service/impl/DispatchFileServiceImpl.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-system/lxzn-system-start/src/main/resources/application-dev.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/controller/DispatchFileController.java
@@ -10,6 +10,10 @@
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;
@@ -40,6 +44,8 @@
    @Autowired
    private IHisWorkTaskService hisWorkTaskService;
    @Autowired
    private IDocInfoService docInfoService;
    /**
     * 分页列表查询
     *
@@ -231,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);
     }
}
lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/service/IDispatchFileService.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.dnc.entity.DocInfo;
import org.jeecg.modules.dncFlow.entity.DispatchFile;
import org.jeecg.modules.dncFlow.vo.DispatchFileFlowTaskVo;
@@ -53,5 +54,8 @@
     * @param id
     */
    Result<?> queryDispatchFile(String id);
    /**
     * 定型流程
     */
    Result<?> submitProccess(DispatchFile dispatchFile);
}
lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/service/impl/DispatchFileServiceImpl.java
@@ -374,6 +374,27 @@
        List<DocInfo> docInfoList = docInfoService.findList(docInfoQueryRequest);
        return Result.OK(docInfoList);
    }
    /**
     * 发起定型流程
     */
    @Override
    public Result<?> submitProccess(DispatchFile dispatchFile) {
        checkParam(dispatchFile);
        super.save(dispatchFile);
        //获取文件信息
        DocInfo docInfo = docInfoService.getById(dispatchFile.getDocId());
        flowCommonService.initActBusiness(docInfo.getDocName()+"."+docInfo.getDocSuffix()+"文件进行定型",
                dispatchFile.getId(), "IDispatchFileService", "process_rf27duhy", null);
        Map<String, Object> variables = new HashMap<>();
        variables.put("dataId", dispatchFile.getId());
        variables.put("organization", "导入文档默认启动流程");
        variables.put("comment", "导入文档默认启动流程");
        variables.put("proofreading",true);
        Result result= flowDefinitionService.startProcessInstanceByKey("process_rf27duhy", variables);
        if (!result.isSuccess())
            super.removeById(dispatchFile.getId());
        return result;
    }
    private Map<String, Object> setProcessVariables(DispatchFile dispatchFile, String userId, DispatchFileFlowTaskVo dispatchFileFlowTaskVo) {
        Map<String, Object> values = new HashMap<>();
lxzn-module-system/lxzn-system-start/src/main/resources/application-dev.yml
@@ -126,7 +126,7 @@
        connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
      datasource:
        master:
          url: jdbc:sqlserver://192.168.1.118:1433;databasename=LXZN_TEST_HANGYU;nullCatalogMeansCurrent=true
          url: jdbc:sqlserver://192.168.1.118:1433;databasename=LXZN_TEST_HANGYU_GK;nullCatalogMeansCurrent=true
          username: sa
          password: 123
          driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver