部门视图
This commit is contained in:
parent
a2ef518fc5
commit
3af7a4e582
Binary file not shown.
@ -55,11 +55,14 @@ public class GetTokenApi {
|
||||
|
||||
String sid = null;
|
||||
String userInfo = SendPostUtils.getUserInfo(InterfaceUrl, digitalYiliToken, appkey, appId);
|
||||
System.out.println("InterfaceUrl====="+InterfaceUrl);
|
||||
System.out.println("appkey====="+appkey);
|
||||
System.out.println("appId====="+appId);
|
||||
if(userInfo!=null){
|
||||
|
||||
JSONObject userInfoJson=JSONObject.parseObject(userInfo);
|
||||
String data=userInfoJson.getString("data");
|
||||
|
||||
System.out.println("data======"+data);
|
||||
//调用app返回的加密数据
|
||||
String appData=data;
|
||||
//密钥,数字伊利app提供
|
||||
@ -68,6 +71,7 @@ public class GetTokenApi {
|
||||
try {
|
||||
//对加密数据进行解密,返回明文字符串
|
||||
decryptData = RSAUtils.decryptByPrivateKey(appData,getPrivateKey(privateKey));
|
||||
System.out.println("appData======"+appData);
|
||||
|
||||
}catch (Exception e){
|
||||
throw new RuntimeException("解密失败!");
|
||||
@ -79,6 +83,7 @@ public class GetTokenApi {
|
||||
JSONObject jsonObject = JSONObject.parseObject(decryptData);
|
||||
|
||||
String userCode=jsonObject.getString("userCode");
|
||||
System.out.println("userCode========="+userCode);
|
||||
String sessionId = new SSOUtil().registerClientSessionNoPassword(
|
||||
userCode, LoginConst.DEFAULT_LANG, "localhost",
|
||||
LoginConst.DEVICE_PC);
|
||||
|
||||
@ -1688,6 +1688,12 @@ public class DataViewService
|
||||
fileType.put("termsVal", "工程技术标准");
|
||||
fileTypes.add(fileType);
|
||||
|
||||
|
||||
fileType = new HashMap<>();
|
||||
fileType.put("termsKey", "processschemeFile");
|
||||
fileType.put("termsVal", "方案");
|
||||
fileTypes.add(fileType);
|
||||
|
||||
ro.put("fileTypes", fileTypes);
|
||||
|
||||
return ro.toString();
|
||||
@ -1715,7 +1721,8 @@ public class DataViewService
|
||||
String fileType = params.get("fileType");
|
||||
ArrayList<String> deptIDList = new ArrayList<>();
|
||||
ArrayList<String> deptIDList2 = new ArrayList<>();
|
||||
String sql = "SELECT ID AS FILEID,PLNAME,PLPARENTID,PLMETHODID,PLLEVEL,PLVERSIONID,PLORDERINDEX,EXT3 as POLICYTYPE FROM APP_ACT_COE_PAL_REPOSITORY WHERE ISPUBLISH = 1 AND EXT5 = '1' AND PLMETHODID in ('process.epc','control.policy','process.flowchart','engineering.standard')";
|
||||
String sql = "SELECT ID AS FILEID,PLNAME,PLPARENTID,PLMETHODID,PLLEVEL,PLVERSIONID,PLORDERINDEX,EXT3 as POLICYTYPE FROM APP_ACT_COE_PAL_REPOSITORY WHERE ISPUBLISH = 1 AND EXT5 = '1' AND PLMETHODID in ('process.epc','control.policy','process.flowchart','engineering.standard','process.scheme')";
|
||||
|
||||
ArrayList<RowMap> fileHandleRowMaps = new ArrayList<>();
|
||||
Map<String, Object> reFileMap = new HashMap<>();
|
||||
RowMap reFileRowMap = new RowMap(reFileMap);
|
||||
@ -1792,7 +1799,8 @@ public class DataViewService
|
||||
|
||||
|
||||
try {
|
||||
String sqltt = "SELECT ID AS FILEID,PLNAME,PLPARENTID,PLMETHODID,PLLEVEL,PLVERSIONID,PLORDERINDEX,EXT3 as POLICYTYPE,EXT6 FROM APP_ACT_COE_PAL_REPOSITORY WHERE ISPUBLISH = 1 AND ISSTOP =0 AND EXT5 = '1' AND EXT6 IS NOT NULL AND PLMETHODID in ('process.epc','control.policy','process.flowchart','engineering.standard')";
|
||||
String sqltt = "SELECT ID AS FILEID,PLNAME,PLPARENTID,PLMETHODID,PLLEVEL,PLVERSIONID,PLORDERINDEX,EXT3 as POLICYTYPE,EXT6 FROM APP_ACT_COE_PAL_REPOSITORY WHERE ISPUBLISH = 1 AND ISSTOP =0 AND EXT5 = '1' AND EXT6 IS NOT NULL AND PLMETHODID in ('process.epc','control.policy','process.flowchart','engineering.standard','process.scheme')";
|
||||
|
||||
SDK.getLogAPI().consoleInfo("sql>>>>>>>>>>>>>>" + sqltt);
|
||||
List<RowMap> maps = DBSql.getMaps(sqltt, new Object[0]);
|
||||
SDK.getLogAPI().consoleInfo("maps是多少个>>>>>>>>>>>>" + maps.size());
|
||||
@ -1906,6 +1914,13 @@ public class DataViewService
|
||||
}
|
||||
}
|
||||
|
||||
if (fileType.equals("processschemeFile") &&
|
||||
fileRowMap.getString("PLMETHODID").equals("process.scheme")) {
|
||||
fileHandleRowMaps.add(fileRowMap);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (fileType.equals("totalFile")) {
|
||||
fileHandleRowMaps.add(fileRowMap);
|
||||
@ -1933,6 +1948,8 @@ public class DataViewService
|
||||
Integer formFileNum = Integer.valueOf(0);
|
||||
|
||||
Integer engineeringtandardFileNum=0;
|
||||
Integer processschemeFileNum = Integer.valueOf(0);
|
||||
|
||||
|
||||
String path = "";
|
||||
PALRepositoryModel model = null;
|
||||
@ -2001,8 +2018,14 @@ public class DataViewService
|
||||
}else if(fileRowMap.getString("PLMETHODID").equals("engineering.standard")){
|
||||
fileMap.put("fileType", "engineeringtandardFile");
|
||||
engineeringtandardFileNum += 1;
|
||||
} else if (fileRowMap.getString("PLMETHODID").equals("process.scheme")) {
|
||||
fileMap.put("fileType", "processschemeFile");
|
||||
processschemeFileNum = Integer.valueOf(processschemeFileNum.intValue() + 1);
|
||||
}
|
||||
model = (PALRepositoryModel)PALRepositoryCache.getCache().get(fileRowMap.getString("FILEID"));
|
||||
|
||||
|
||||
|
||||
model = (PALRepositoryModel)PALRepositoryCache.getCache().get(fileRowMap.getString("FILEID"));
|
||||
if (null != model) {
|
||||
taskId = TaskUtil.getLastPublishTaskIdByModelId(model.getId());
|
||||
}
|
||||
@ -2035,10 +2058,12 @@ public class DataViewService
|
||||
Integer guideFile = Integer.valueOf(0);
|
||||
Integer formFile = Integer.valueOf(0);
|
||||
Integer engineeringtandardFile = 0;
|
||||
Integer processschemeFile = Integer.valueOf(0);
|
||||
|
||||
HashMap<String, Object> fileSortMap = new HashMap<>();
|
||||
|
||||
|
||||
List<RowMap> fileRowMapss = DBSql.getMaps("SELECT ID AS FILEID,EXT6 AS PUBDEPT,PLMETHODID,EXT5 AS FILESTATE,EXT3 AS POLICYTYPE FROM APP_ACT_COE_PAL_REPOSITORY WHERE ISPUBLISH = '1' AND EXT5 = '1' AND PLMETHODID in ('process.epc','process.flowchart','control.policy','data.form','engineering.standard')", new Object[0]);
|
||||
List<RowMap> fileRowMapss = DBSql.getMaps("SELECT ID AS FILEID,EXT6 AS PUBDEPT,PLMETHODID,EXT5 AS FILESTATE,EXT3 AS POLICYTYPE FROM APP_ACT_COE_PAL_REPOSITORY WHERE ISPUBLISH = '1' AND EXT5 = '1' AND PLMETHODID in ('process.epc','process.flowchart','control.policy','data.form','engineering.standard','process.scheme')", new Object[0]);
|
||||
|
||||
|
||||
|
||||
@ -2067,6 +2092,11 @@ public class DataViewService
|
||||
fileTotal += 1;
|
||||
engineeringtandardFile += 1;
|
||||
}
|
||||
if (fileRowMap.getString("PLMETHODID").equals("process.scheme")) {
|
||||
fileTotal = Integer.valueOf(fileTotal.intValue() + 1);
|
||||
processschemeFile = Integer.valueOf(processschemeFile.intValue() + 1);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -2075,6 +2105,8 @@ public class DataViewService
|
||||
filesCount.put("policyFileNum", policyFile);
|
||||
filesCount.put("guideFileNum", guideFile);
|
||||
filesCount.put("formFileNum", formFile);
|
||||
filesCount.put("processschemeFileNum", processschemeFile);
|
||||
|
||||
filesCount.put("engineeringtandardFileNum", engineeringtandardFileNum);
|
||||
ro.put("filesCount", filesCount);
|
||||
}
|
||||
@ -2085,6 +2117,8 @@ public class DataViewService
|
||||
filesCount.put("policyFileNum", policyFileNum);
|
||||
filesCount.put("guideFileNum", guideFileNum);
|
||||
filesCount.put("formFileNum", formFileNum);
|
||||
filesCount.put("processschemeFileNum", processschemeFileNum);
|
||||
|
||||
filesCount.put("engineeringtandardFileNum", engineeringtandardFileNum);
|
||||
|
||||
ro.put("filesCount", filesCount);
|
||||
@ -2100,6 +2134,8 @@ public class DataViewService
|
||||
filesCount.put("guideFileNum", guideFileNum);
|
||||
filesCount.put("formFileNum", formFileNum);
|
||||
filesCount.put("engineeringtandardFileNum", engineeringtandardFileNum);
|
||||
filesCount.put("processschemeFileNum", processschemeFileNum);
|
||||
|
||||
ro.ok("暂无文件");
|
||||
ro.put("fileMaps", fileMaps);
|
||||
ro.put("filesCount", filesCount);
|
||||
@ -2385,8 +2421,8 @@ public class DataViewService
|
||||
|
||||
private String createOutputReport(PALRepositoryModel model, String wsId, String userId, String teamId, String uuid) {
|
||||
String taskId = "";
|
||||
if (model.getMethodId().contains("process.")) {
|
||||
taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportPr(wsId, userId, teamId, uuid);
|
||||
if (model.getMethodId().contains("process.") && !"process.scheme".equals(model.getMethodId())) {
|
||||
taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportPr(wsId, userId, teamId, uuid);
|
||||
JSONObject object = JSONObject.parseObject(taskId);
|
||||
if ("ok".equals(object.getString("result"))) {
|
||||
taskId = object.getJSONObject("data").getString("taskId");
|
||||
@ -2397,7 +2433,7 @@ public class DataViewService
|
||||
if ("ok".equals(object.getString("result"))) {
|
||||
taskId = object.getJSONObject("data").getString("taskId");
|
||||
}
|
||||
} else if ("control.policy".equals(model.getMethodId())) {
|
||||
} else if ("control.policy".equals(model.getMethodId()) || "engineering.standard".equals(model.getMethodId()) || "process.scheme".equals(model.getMethodId())) {
|
||||
taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportZd(wsId, userId, teamId, uuid);
|
||||
JSONObject object = JSONObject.parseObject(taskId);
|
||||
if ("ok".equals(object.getString("result"))) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user