新建文件时校验时间太长问题解决

This commit is contained in:
lihongyu 2023-04-23 06:38:21 +08:00
parent 87e84d6b37
commit cd5f61e630
2 changed files with 2 additions and 25 deletions

View File

@ -1643,7 +1643,8 @@ public class PALRepository extends DaoObject<PALRepositoryModel> {
* @author sunlh
*/
public int getChildrenMaxOrderIndexByPidAndWsId(String palId, String wsId) {
String sql = "SELECT MAX(PLORDERINDEX) AS orderIndex FROM APP_ACT_COE_PAL_REPOSITORY WHERE (PLPARENTID IN " + "(SELECT r1.id FROM APP_ACT_COE_PAL_REPOSITORY r1, APP_ACT_COE_PAL_REPOSITORY r2 WHERE r1.PLVERSIONID = r2.PLVERSIONID AND r2.id='" + palId + "')" + " OR PLPARENTID = '" + palId + "') AND wsid='" + wsId +"'";
String sql = "SELECT MAX(PLORDERINDEX) AS orderIndex FROM APP_ACT_COE_PAL_REPOSITORY WHERE 1=1 AND PLPARENTID = '"+palId+"' AND WSID='"+wsId+"'";
//String sql = "SELECT MAX(PLORDERINDEX) AS orderIndex FROM APP_ACT_COE_PAL_REPOSITORY WHERE (PLPARENTID IN " + "(SELECT r1.id FROM APP_ACT_COE_PAL_REPOSITORY r1, APP_ACT_COE_PAL_REPOSITORY r2 WHERE r1.PLVERSIONID = r2.PLVERSIONID AND r2.id='" + palId + "')" + " OR PLPARENTID = '" + palId + "') AND wsid='" + wsId +"'";
int maxOrderIndex = DBSql.getInt(sql, "orderIndex");
return maxOrderIndex;
}

View File

@ -8318,9 +8318,6 @@ public class CoeProcessLevelWeb extends ActionWeb {
id, false, method, "0", level, null, null, uid, uid, nowTime, null, null, null, null, null, null, null, null, null,securityLevel);
}
long startTime=System.currentTimeMillis();
// 创建
try {
coeProcessLevel.insert(model);
@ -8342,14 +8339,6 @@ public class CoeProcessLevelWeb extends ActionWeb {
e.printStackTrace();
}
long endTime=System.currentTimeMillis();
System.out.println("创建代码==================程序运行时间: "+(endTime-startTime)+"ms");
long startTime1=System.currentTimeMillis();
// 如果有模板复制模板中的内容
if (container != null && !"".equals(container) && !"_blank".equals(container)) {
PALMethodTemplateModel templateModel = PALMethodTemplateCache.getCache().get(container);
@ -8389,15 +8378,6 @@ public class CoeProcessLevelWeb extends ActionWeb {
PALRepositoryPropertyDao propertyDao = new PALRepositoryPropertyDao();
long endTime1=System.currentTimeMillis();
System.out.println("如果有模板,复制模板中的内容==================程序运行时间: "+(endTime1-startTime1)+"ms");
long startTime2=System.currentTimeMillis();
// 一级架构默认值处理
if(repositoryPathData.size()>0){
@ -8422,12 +8402,8 @@ public class CoeProcessLevelWeb extends ActionWeb {
}
}
long endTime2=System.currentTimeMillis();
System.out.println("架构处理代码==================程序运行时间: "+(endTime2-startTime2)+"ms");
//回填修订人
propertyDao.updatePropertyByPropertyId(model.getId(), "Drafted_and_revised_by", _uc.getUserName());
// 小组权限设置
if (!UtilString.isEmpty(teamId)) {
CoeCooperationAPIManager.getInstance().addRepositoryToTeamAndRolePerm(_uc, teamId, model.getVersionId(), true, true);