backend/archive-backStage/archive-core/src/main/java/com/changhong/archive/tools/LoginTool.java
@@ -86,6 +86,14 @@ + "&tenantId=" + Tid; } public String getChfcloudTenantFindSubCompanySystem(String companyId,String appKey) { String id = getId(); String sign = MD5.GetMD5Code("appKey=" + appKey+"&companyId=" + companyId+ "&id=" + id + "&key=" + chfcloudKey); return chfcloudUrl + "csc-ie-user/rest/json/api/tenant/findSubCompanySystem?companyId=" + companyId + "&sign=" + sign + "&appKey=" + appKey+ "&id=" + id ; } // 获取用户所属的组织机构 public String getFindUserOrgs() { String id = getId(); backend/archive-backStage/archive-entity/src/main/java/com/changhong/archive/login/User.java
@@ -37,6 +37,12 @@ //租户下的组织机构 private List<Company> companyList; public String getCurrentCompanyDept() { return currentCompanyDept; } private String currentCompanyDept; private String token; //菜单列表 private List<Menu> menuList; @@ -307,6 +313,9 @@ companyId = company.getId(); companyName = company.getName(); companyOrgCode = company.getOrgCode(); //currentCompanyDept = company.getOrgCode(); } public void switchByName(String tenantName,String companyName){ @@ -335,6 +344,17 @@ this.companyId = company.getId(); companyName = company.getName(); companyOrgCode = company.getOrgCode(); //currentCompanyDept = this.departments.get(0).getName(); //this.departments.forEach(); //this.departments.removeIf(UserDepartment->UserDepartment.getId().equals(companyId)) ; for (UserDepartment dept : departments){ if (dept.getCode().startsWith(companyOrgCode)){ this.currentCompanyDept= dept.getCode(); break; } } } backend/archive-backStage/archive-mapper/src/main/java/com/changhong/archive/mapper/filearchives/BussiArrangementMapper.java
@@ -82,11 +82,16 @@ @Param("logicDelete") Integer logicDelete ); List<String> getDeleteVolumeList( List<String> getDeleteVolumeList1( @Param("volumesListTableName") String volumesListTableName, @Param("volumeDetailCode") String volumeDetailCode ); List<String> getDeleteVolumeList( @Param("volumesListTableName") String volumesListTableName, @Param("volumeDetailCode") String volumeDetailCode, @Param("logicDelete") Integer logicDelete ); Integer upArchiveStatus( @Param("tableName") String tableName, backend/archive-backStage/archive-mapper/src/main/resources/sqlMapper/filearchives/BussiArrangementMapper.xml
@@ -255,11 +255,16 @@ select * from archive_arrangement where ARRANGEMENT_ID=#{arrangementId} </select> <select id="getDeleteVolumeList" resultType="java.lang.String"> <select id="getDeleteVolumeList1" resultType="java.lang.String"> SELECT ARCHIVE_CODE FROM ${volumesListTableName} WHERE LOGIC_DELETE=1 and VOLUME_DETAIL_CODE = #{volumeDetailCode} </select> <select id="getDeleteVolumeList" resultType="java.lang.String"> SELECT ARCHIVE_CODE FROM ${volumesListTableName} WHERE LOGIC_DELETE=#{logicDelete} and VOLUME_DETAIL_CODE = #{volumeDetailCode} </select> <delete id="deleteVolumesList" > delete from ${volumesListTableName} where ARCHIVE_CODE IN <foreach collection="codes" item="code" open="(" separator="," close=")" > backend/archive-backStage/archive-service/src/main/java/com/changhong/archive/service/filearchives/impl/BussiArrangementServiceImpl.java
@@ -224,8 +224,8 @@ // 不删除 Arrangement 表数据 //bussiArrangementMapper.deleteArrangement(bussiArrangement.getArrangementId()); } updateFileData(bussiArrangement.getAddFileList(), bussiArrangement.getDeleteFileList(), CreateTableUtil.createTableName(sysTempletSet.getSetEnglishName(), sysTempletSet.getTenantId())); //updateFileData(bussiArrangement.getAddFileList(), bussiArrangement.getDeleteFileList(), // CreateTableUtil.createTableName(sysTempletSet.getSetEnglishName(), sysTempletSet.getTenantId())); // 将调整详情上传到文件服务器 try { @@ -236,8 +236,6 @@ }catch (IOException ioe){ }catch ( MyException mye){ } // return map; // here add 调整内容 lskai end return iReturn; } @@ -320,11 +318,11 @@ @Override public void updateArrangementV2(WorkflowManager workflow, User user) { bussiArrangementMapper.upArrangementLogStatus( BaseConst.WF_STEP_SUCC.equals(workflow.getStepFlg()) ? ArrangementStatus.SUCCESS.getCode() BaseConst.WF_STEP_SUCC.equals(workflow.getStepFlg()) ? ArrangementStatus.OVER.getCode() : ArrangementStatus.FAIL.getCode(), workflow.getBusinessId()); bussiArrangementMapper.upArrangementStatus( BaseConst.WF_STEP_SUCC.equals(workflow.getStepFlg()) ? ArrangementStatus.SUCCESS.getCode() BaseConst.WF_STEP_SUCC.equals(workflow.getStepFlg()) ? ArrangementStatus.OVER.getCode() : ArrangementStatus.FAIL.getCode(), workflow.getBusinessId()); @@ -340,17 +338,24 @@ String path = this.getArrangementLogDetails(busiArrangement.getArrangementId(),user); Map<String,Object> mapStr = getJSON(path); Object m_deleteFile = mapStr.get("deleteFile"); Map<String,Object> map_deleteFile = new HashMap<>(); if (m_deleteFile!=null ){ map_deleteFile = (Map)m_deleteFile; } // Object m_deleteFile = mapStr.get("deleteFile"); // Map<String, List<ElectronicFile>> map_deleteFile = new HashMap<>(); // if (m_deleteFile!=null ){ // map_deleteFile = (Map<String, List<ElectronicFile>>)m_deleteFile; // } // busiArrangement.setDeleteFileList(map_deleteFile); Object m_addFiles = mapStr.get("addFile"); Map<String,Object> map_addFiles = new HashMap<>(); if (m_addFiles!=null ){ map_addFiles = (Map)m_addFiles; } Map<String, List<ElectronicFile>> map_deleteFile = (Map<String, List<ElectronicFile>>)mapStr.get("deleteFile"); //Map<String, List<ElectronicFile>> addFile = new HashMap<String, List<ElectronicFile>>();; // Object m_addFiles = mapStr.get("addFile"); // Map<String, List<ElectronicFile>> map_addFiles = new HashMap<>(); // if (m_addFiles!=null ){ // map_addFiles = (Map<String, List<ElectronicFile>>)m_addFiles; // } // busiArrangement.setAddFileList(map_addFiles); Map<String, List<ElectronicFile>> map_addFiles = (Map<String, List<ElectronicFile>>)mapStr.get("addFile"); Object m_reason= mapStr.get("reason"); Map<String,Object> map_reason = new HashMap<>(); @@ -388,21 +393,16 @@ Object m_volumeBaseData =mapStr.get("volumeBaseDataChange"); Map<String,String> map_volumeBaseData = new HashMap<>(); if (m_volumeBaseData!=null ){ map_volumeBaseData = (Map)m_volumeBaseData; map_volumeBaseData = (Map<String,String>)m_volumeBaseData; } busiArrangement.setDetailData(map_volumeBaseData); redisCache.delete("lock_" + volumeDetailCode); redisCache.deleteBegin("lock_" + volumeDetailCode); if (!BaseConst.WF_STEP_SUCC.equals(workflow.getStepFlg())) { // 驳回处理 // 状态恢复 redisCache.delete("lock_" + volumeDetailCode); redisCache.deleteBegin("lock_" + volumeDetailCode); if (map_addFiles.size()>0){ // 将加入的文件删除 } // 档案册信息应该没动吧 -- 不处理 // 档案件删除的标志恢复 -- @@ -411,13 +411,28 @@ sysTempletSet.getTenantId()); List<String> deleteCodes = bussiArrangementMapper.getDeleteVolumeList( CreateTableUtil.createVolumeListTableName(sysTempletSet.getSetEnglishName(), sysTempletSet.getTenantId()),volumeDetailCode); sysTempletSet.getTenantId()),volumeDetailCode,1); if (deleteCodes != null && deleteCodes.size()>0) { int i = bussiArrangementMapper.addDeleteFlagVolumesList( CreateTableUtil.createVolumeListTableName(sysTempletSet.getSetEnglishName(), sysTempletSet.getTenantId()), deleteCodes, volumeDetailCode, 0); } List<String> addCodes = bussiArrangementMapper.getDeleteVolumeList( CreateTableUtil.createVolumeListTableName(sysTempletSet.getSetEnglishName(), sysTempletSet.getTenantId()),volumeDetailCode,2); if (addCodes != null && addCodes.size()>0) { int i = bussiArrangementMapper.deleteVolumesList( CreateTableUtil.createVolumeListTableName(sysTempletSet.getSetEnglishName(), sysTempletSet.getTenantId()), addCodes, volumeDetailCode); bussiArrangementMapper.upArchiveStatus(tableName, addCodes, ArchiveAcitviy.ArchiveAcitviyNotBind.getCode()); } // int i = bussiArrangementMapper.deleteVolumesList( // CreateTableUtil.createVolumeListTableName(sysTempletSet.getSetEnglishName(), // sysTempletSet.getTenantId()), @@ -440,7 +455,7 @@ VolumeFlowStatus.DEFAULT.getCode()); // 删除 Arrangement 表数据 bussiArrangementMapper.deleteArrangement(busiArrangement.getArrangementId()); //bussiArrangementMapper.deleteArrangement(busiArrangement.getArrangementId()); }else{ //同意调整 @@ -452,7 +467,7 @@ sysTempletSet.getTenantId()); List<String> deleteCodes = bussiArrangementMapper.getDeleteVolumeList( CreateTableUtil.createVolumeListTableName(sysTempletSet.getSetEnglishName(), sysTempletSet.getTenantId()),volumeDetailCode); sysTempletSet.getTenantId()),volumeDetailCode,1); if (deleteCodes != null && deleteCodes.size()>0) { int i = bussiArrangementMapper.deleteVolumesList( @@ -463,13 +478,24 @@ ArchiveAcitviy.ArchiveAcitviyNotBind.getCode()); } // 档案件追加 -- 已经追加了不处理.. // 档案件附件 List<String> addCodes = bussiArrangementMapper.getDeleteVolumeList( CreateTableUtil.createVolumeListTableName(sysTempletSet.getSetEnglishName(), sysTempletSet.getTenantId()),volumeDetailCode,2); if (addCodes != null && addCodes.size()>0) { int i = bussiArrangementMapper.addDeleteFlagVolumesList( CreateTableUtil.createVolumeListTableName(sysTempletSet.getSetEnglishName(), sysTempletSet.getTenantId()), addCodes, volumeDetailCode,0); bussiArrangementMapper.upArchiveStatus(tableName, addCodes, ArchiveAcitviy.ArchiveAcitviyNotBind.getCode()); } // 档案件附件 volumeArchiveMapper.updateVolumeStatusOne(volumeDetailCode, VolumeStatus.InTheLibrary.getCode(), VolumeFlowStatus.DEFAULT.getCode()); // 删除 Arrangement 表数据 bussiArrangementMapper.deleteArrangement(busiArrangement.getArrangementId()); //bussiArrangementMapper.deleteArrangement(busiArrangement.getArrangementId()); } } @@ -767,7 +793,10 @@ bussiArrangement.getTenantId(), metadataService.keyIsName)) .keySet(), bussiArrangement.getVolumeDetailCode()); int j = bussiArrangementMapper.addDeleteFlagVolumesList( CreateTableUtil.createVolumeListTableName(sysTempletSet.getSetEnglishName(), sysTempletSet.getTenantId()), bussiArrangement.getAddCodes(), bussiArrangement.getVolumeDetailCode(),1); bussiArrangementMapper.upArchiveStatus(tableName, bussiArrangement.getAddCodes(), ArchiveAcitviy.ArchiveAcitviyFile.getCode()); // end @@ -791,10 +820,11 @@ .keySet(), bussiArrangement.getVolumeDetailCode()); // 上面追加的档案件删除标志是2 ,方便以后 审批处理 int j = bussiArrangementMapper.addDeleteFlagVolumesList( CreateTableUtil.createVolumeListTableName(sysTempletSet.getSetEnglishName(), sysTempletSet.getTenantId()), bussiArrangement.getAddCodes(), bussiArrangement.getVolumeDetailCode(),1); bussiArrangement.getAddCodes(), bussiArrangement.getVolumeDetailCode(),2); bussiArrangementMapper.upArchiveStatus(tableName, bussiArrangement.getAddCodes(), ArchiveAcitviy.ArchiveAcitviyFile.getCode()); backend/archive-backStage/archive-service/src/main/java/com/changhong/archive/service/workflowService/impl/WorkflowServiceImpl.java
@@ -53,7 +53,9 @@ || WorkflowApi.TENANT_INITIALIZATION.getApi().equals(api)) ? getWorkflowParamInit(map, user) : getWorkflowParam(map, user)); String json = HttpUtil.httpPostJson(url, "{}"); if (!api.equals(WorkflowApi.GET_BACK.getApi()) || !api.equals(WorkflowApi.INST_BACK.getApi())) { if (api.equals(WorkflowApi.GET_BACK.getApi()) || api.equals(WorkflowApi.INST_BACK.getApi())) { return json; } else { WorkflowReturnData workflowReturnData = JSON.parseObject(json, WorkflowReturnData.class); if ("00000".equals(workflowReturnData.getResCode())) { consumer.accept(workflowReturnData.getData()); @@ -61,8 +63,6 @@ throw new BusinessException(DemoConst.E4019, DemoConst.E4019Msg); } return JSONObject.toJSONString(workflowReturnData); } else { return json; } } @@ -80,8 +80,8 @@ public void startExample(String businessId, Integer type, Map<String, Object> dataMap, User user, Consumer<WorkflowManager> consumer) { Map<String, Object> params = new HashMap<>(); params.put("orgCode", user.getCompanyOrgCode()); System.err.println("orgCode:" + user.getCompanyOrgCode()); params.put("orgCode", user.getCurrentCompanyDept()); System.err.println("orgCode:" + user.getCurrentCompanyDept()); if (user.getUserId()!=null) { params.put("userId", user.getUserId()); backend/archive-backStage/archive-web/src/main/java/com/changhong/archive/controller/workflowManager/WorkflowManagerController.java
@@ -126,15 +126,13 @@ @RequestMapping(value = "/inst/create") public String instCreate(@RequestBody Map<String, Object> map) { Map<String, Object> params = new HashMap<>(); params.put("orgCode", getLogonUser().getCompanyOrgCode()); params.put("orgCode", getLogonUser().getCurrentCompanyDept()); if (getLogonUser().getUserId()!=null) { params.put("userId", getLogonUser().getUserId()); } map.put("params", params); System.err.println("orgCode:" + getLogonUser().getCompanyOrgCode()); System.err.println("orgCode:" + getLogonUser().getCurrentCompanyDept()); return workflowService.toRequest(WorkflowApi.FINISH.getApi(), map, getLogonUser()); } @@ -154,13 +152,13 @@ dataMap.put("processInstId", workflowManager.getProcessInstId()); dataMap.put("data", workflowManager.getApprovalOpinion()); Map<String, Object> params = new HashMap<>(); params.put("orgCode", getLogonUser().getCompanyOrgCode()); params.put("orgCode", getLogonUser().getCurrentCompanyDept()); if (getLogonUser().getUserId()!=null) { params.put("userId", getLogonUser().getUserId()); } System.err.println("orgCode:" + getLogonUser().getCompanyOrgCode()); System.err.println("orgCode:" + getLogonUser().getCurrentCompanyDept()); dataMap.put("params", params); try { @@ -308,7 +306,7 @@ }).get(); WFInfo wFInfo = ObjectUtil.convertBean(user, WFInfo.class); wFInfo.setProcessDefId(processDefId); wFInfo.setAppId("2"); wFInfo.setAppId(CommonUtil.getProperties("serviceId")); return wFInfo; } catch (Exception e) { Logger.getLogger("ERR:", e.toString()); backend/jodconverter-web/jodconverter-web/src/main/java/cn/keking/config/RedissonConfig.java
@@ -28,7 +28,7 @@ private int retryInterval=1500; private int reconnectionTimeout=3000; private int failedAttempts=3; private String password = null; private String password; private int subscriptionsPerConnection=5; private String clientName=null; private int subscriptionConnectionMinimumIdleSize = 1; backend/jodconverter-web/jodconverter-web/src/main/resources/application-dev.properties
@@ -1,5 +1,6 @@ #redis连接 spring.redisson.address = 10.4.68.136:7000 spring.redisson.address = 192.168.1.166:7000 spring.redisson.password=lskai ##资源映射路径 file.dir = C:\\Test\\ file.fastdataPath=http://archiveda.chfcloud.com:8083/ backend/jodconverter-web/jodconverter-web/src/main/resources/application-uat.properties
@@ -1,5 +1,6 @@ #=============================================#spring Redisson����#===================================# spring.redisson.address = localhost:7000 spring.redisson.address = 10.4.32.37:7000 spring.redisson.password=epc ##��Դӳ��·��(��Ϊjar��ʽ���е�ԭ��) file.dir = /opt/filepreview/ file.fastdataPath=http://202.98.157.47:8083/ frontdesk/src/app/routes/templet/usertempletcollection/filecover.component.html
@@ -91,6 +91,9 @@ <option value="002">记账凭证</option> <option value="003">资产负债表</option> <option value="004">现金流量表</option> <option value="005">特殊:云尚行订单专用</option> </select> </div> </div>