Compare 99cecf4 ... +6 ... ccc6f07

Coverage Reach
server/service/base/GeneralEntityService.java server/service/base/ApprovalStepService.java server/service/base/QuickCodeReindexTask.java server/service/base/AttachmentAwareObserver.java server/service/base/RecordMerger.java server/service/base/RevisionHistoryObserver.java server/service/base/BulkBacthUpdate.java server/service/base/BulkContext.java server/service/base/BulkShare.java server/service/base/BulkAssign.java server/service/base/BulkOperator.java server/service/base/SeriesReindexTask.java server/service/base/AttachmentFolderService.java server/service/base/RedisQueueObserver.java server/service/base/BulkDelete.java server/service/base/BulkUnshare.java server/service/bizz/privileges/UserStore.java server/service/bizz/privileges/PrivilegesManager.java server/service/bizz/privileges/PrivilegesGuardInterceptor.java server/service/bizz/privileges/RoleBaseQueryFilter.java server/service/bizz/privileges/User.java server/service/bizz/privileges/Department.java server/service/bizz/privileges/ZeroEntry.java server/service/bizz/privileges/ZeroPrivileges.java server/service/bizz/privileges/ZeroPermission.java server/service/bizz/UserService.java server/service/bizz/RoleService.java server/service/bizz/TeamService.java server/service/bizz/DepartmentService.java server/service/bizz/ChangeOwningDeptTask.java server/service/bizz/CurrentCaller.java server/service/query/AdvFilterParser.java server/service/query/ParserTokens.java server/service/query/QueryFactory.java server/service/configuration/ClassificationService.java server/service/configuration/PickListService.java server/service/configuration/ProjectConfigService.java server/service/configuration/RobotApprovalConfigService.java server/service/configuration/ConfigurationService.java server/service/configuration/ProjectPlanConfigService.java server/service/configuration/AutoFillinConfigService.java server/service/configuration/DataReportConfigService.java server/service/configuration/RobotTriggerConfigService.java server/service/configuration/RebuildApiService.java server/service/configuration/AdvFilterService.java server/service/configuration/ChartConfigService.java server/service/configuration/DashboardConfigService.java server/service/configuration/LayoutConfigService.java server/service/notification/NotificationObserver.java server/service/notification/NotificationService.java server/service/notification/MessageBuilder.java server/service/notification/Message.java server/service/notification/NotificationOnce.java server/service/project/ProjectTaskService.java server/service/project/ProjectCommentService.java server/service/project/ProjectHelper.java server/service/project/BaseTaskService.java server/service/feeds/BaseFeedsService.java server/service/feeds/FeedsCommentService.java server/service/feeds/FeedsService.java server/service/ObservableService.java server/service/CommonsService.java server/service/OperatingObserver.java server/service/SQLExecutor.java server/service/OperatingContext.java server/service/BaseServiceImpl.java server/service/PerHourJob.java server/service/BaseService.java server/service/TransactionManual.java server/business/charts/ChartData.java server/business/charts/TableBuilder.java server/business/charts/builtin/ApprovalList.java server/business/charts/builtin/FeedsSchedule.java server/business/charts/TreeBuilder.java server/business/charts/TableChart.java server/business/charts/ChartsFactory.java server/business/charts/FunnelChart.java server/business/charts/RadarChart.java server/business/charts/ScatterChart.java server/business/charts/LineChart.java server/business/charts/TreemapChart.java server/business/charts/Dimension.java server/business/charts/Axis.java server/business/charts/Numerical.java server/business/charts/PieChart.java server/business/charts/IndexChart.java server/business/charts/FormatCalc.java server/business/charts/FormatStyle.java server/business/charts/ChartsHelper.java server/business/charts/FormatSort.java server/business/charts/BarChart.java server/business/trigger/impl/FieldAggregation.java server/business/trigger/impl/TriggerByTimerJob.java server/business/trigger/impl/AggregationEvaluator.java server/business/trigger/impl/CompatibleValueConversion.java server/business/trigger/impl/AutoAssign.java server/business/trigger/impl/SendNotification.java server/business/trigger/impl/FieldWriteback.java server/business/trigger/impl/AutoShare.java server/business/trigger/impl/AutoApproval.java server/business/trigger/RobotTriggerObserver.java server/business/trigger/ActionType.java server/business/trigger/TriggerWhen.java server/business/trigger/ActionContext.java server/business/trigger/ActionFactory.java server/business/trigger/RobotTriggerManual.java server/business/approval/ApprovalProcessor.java server/business/approval/FlowParser.java server/business/approval/FlowNodeGroup.java server/business/approval/FlowNode.java server/business/approval/FlowBranch.java server/business/approval/ApprovalStatus.java server/business/approval/ApprovalHelper.java server/business/approval/ApprovalState.java server/business/approval/ApprovalFields2Schema.java server/business/approval/FormBuilder.java server/business/dataimport/RecordCheckout.java server/business/dataimport/DataImporter.java server/business/dataimport/DataExporter.java server/business/dataimport/ImportRule.java server/business/dataimport/DataFileParser.java server/business/dataimport/ColumnWidthStrategy.java server/business/rbstore/MetaschemaImporter.java server/business/rbstore/MetaSchemaGenerator.java server/business/rbstore/ClassificationImporter.java server/business/rbstore/ClassificationFileImporter.java server/business/rbstore/RBStore.java server/business/datareport/EasyExcelGenerator.java server/business/datareport/TemplateExtractor.java server/business/datareport/ReportGenerator.java server/business/recyclebin/RecycleRestore.java server/business/recyclebin/RecycleStore.java server/business/recyclebin/RecycleBean.java server/business/recyclebin/RecycleBinCleanerJob.java server/business/recyclebin/RestoreRecordCreator.java server/business/feeds/FeedsScheduleJob.java server/business/feeds/FeedsHelper.java server/business/feeds/FeedsType.java server/business/feeds/FeedsScope.java server/business/series/IncreasingVar.java server/business/series/SeriesGenerator.java server/business/series/SeriesZeroResetJob.java server/business/series/TimeVar.java server/business/series/SeriesGeneratorFactory.java server/business/series/SeriesVar.java server/business/files/FilesHelper.java server/helper/setup/Installer.java server/helper/setup/DatabaseBackup.java server/helper/setup/UpgradeDatabase.java server/helper/setup/UpgradeScriptReader.java server/helper/datalist/QueryParser.java server/helper/datalist/DataListWrapper.java server/helper/datalist/BatchOperatorQuery.java server/helper/datalist/ProtocolFilterParser.java server/helper/datalist/DefaultDataListControl.java server/helper/cache/JedisCacheDriver.java server/helper/cache/RecentlyUsedCache.java server/helper/cache/BaseCacheTemplate.java server/helper/cache/RecordOwningCache.java server/helper/cache/EhcacheDriver.java server/helper/cache/CommonCache.java server/helper/fieldvalue/FieldValueWrapper.java server/helper/fieldvalue/ContentWithFieldVars.java server/helper/fieldvalue/BarCodeGenerator.java server/helper/SMSender.java server/helper/QiniuCloud.java server/helper/language/LanguageBundle.java server/helper/language/Languages.java server/helper/task/HeavyTask.java server/helper/task/TaskExecutors.java server/helper/state/StateManager.java server/helper/state/StateHelper.java server/helper/state/HowtoState.java server/helper/SysConfiguration.java server/helper/AesPreferencesConfigurer.java server/helper/License.java server/helper/KVStorage.java server/helper/ConfigurableItem.java server/helper/VCode.java server/helper/DistributedJobBean.java server/helper/FormDataBuilder.java server/helper/BlackList.java server/helper/SetUser.java server/configuration/portals/FormsBuilder.java server/configuration/portals/NavBuilder.java server/configuration/portals/ShareToManager.java server/configuration/portals/ViewAddonsManager.java server/configuration/portals/PickListManager.java server/configuration/portals/ClassificationManager.java server/configuration/portals/DataListManager.java server/configuration/portals/ChartManager.java server/configuration/portals/BaseLayoutManager.java server/configuration/portals/MultiSelectManager.java server/configuration/portals/NavManager.java server/configuration/portals/FormsManager.java server/configuration/ProjectManager.java server/configuration/RobotTriggerManager.java server/configuration/AutoFillinManager.java server/configuration/RobotApprovalManager.java server/configuration/DataReportManager.java server/configuration/ConfigEntry.java server/configuration/RebuildApiManager.java server/configuration/FlowDefinition.java server/metadata/entity/Field2Schema.java server/metadata/entity/Entity2Schema.java server/metadata/entity/EasyMeta.java server/metadata/entity/DisplayType.java server/metadata/entity/MetaEntityService.java server/metadata/entity/MetaFieldService.java server/metadata/entity/UnsafeEntity.java server/metadata/entity/FieldExtConfigProps.java server/metadata/MetadataHelper.java server/metadata/DynamicMetadataFactory.java server/metadata/DefaultValueHelper.java server/metadata/MetadataSorter.java server/metadata/EntityRecordCreator.java server/metadata/EntityHelper.java server/Application.java server/ServerStatus.java server/ServerListener.java api/general/EntityCreate.java api/general/EntityList.java api/general/EntityGet.java api/general/ApiDataListWrapper.java api/general/EntityUpdate.java api/general/EntityDelete.java api/general/ApiDataListControl.java api/ApiGateway.java api/metadata/ClassificationData.java api/metadata/FieldList.java api/metadata/EntityList.java api/ApiContext.java api/LoginToken.java api/Controll.java api/AuthTokenManager.java api/BaseApi.java api/SystemTime.java utils/AppUtils.java utils/HttpUtils.java utils/MaxBackupIndexDailyRollingFileAppender.java utils/LocationUtils.java utils/AES.java utils/CommonsUtils.java utils/JSONUtils.java utils/ExcelUtils.java utils/RbRecordCodec.java utils/FileFilterByLastModified.java utils/RbDateCodec.java utils/RateLimiters.java utils/MarkdownUtils.java

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.


@@ -94,6 +94,8 @@
Loading
94 94
     * @see #INSTALL_FILE
95 95
     */
96 96
	private Properties fromInstallFile() {
97 +
		if (Application.devMode()) return new Properties();
98 +
97 99
        File file = SysConfiguration.getFileOfData(INSTALL_FILE);
98 100
        if (file.exists()) {
99 101
            try {

@@ -63,7 +63,7 @@
Loading
63 63
	
64 64
	/** Rebuild Version
65 65
	 */
66 -
	public static final String VER = "1.11.0-dev";
66 +
	public static final String VER = "1.11.0";
67 67
	/** Rebuild Build
68 68
	 */
69 69
	public static final int BUILD = 11100;
@@ -175,13 +175,14 @@
Loading
175 175
		List<String> msgsList = new ArrayList<>();
176 176
		CollectionUtils.addAll(msgsList, msgs);
177 177
		msgsList.add("\n  Version : " + VER);
178 -
		msgsList.add("OS      : " + SystemUtils.OS_NAME + " " + SystemUtils.OS_ARCH);
179 -
		msgsList.add("Report an issue :");
178 +
		msgsList.add("OS      : " + SystemUtils.OS_NAME + " (" + SystemUtils.OS_ARCH + ")");
179 +
		msgsList.add("JVM     : " + SystemUtils.JAVA_VM_NAME + " (" + SystemUtils.JAVA_VERSION + ")");
180 +
		msgsList.add("\n  Report an issue :");
180 181
		msgsList.add("https://getrebuild.com/report-issue?title=boot");
181 182
182 -
        return "\n###################################################################\n\n  "
183 +
        return "\n\n###################################################################\n\n  "
183 184
                + StringUtils.join(msgsList, "\n  ") +
184 -
                "\n\n###################################################################";
185 +
                "\n\n###################################################################\n";
185 186
    }
186 187
187 188
	/**

@@ -12,14 +12,13 @@
Loading
12 12
import cn.devezhao.persist4j.Record;
13 13
import cn.devezhao.persist4j.engine.ID;
14 14
import com.rebuild.server.Application;
15 -
import com.rebuild.server.business.approval.ApprovalHelper;
16 -
import com.rebuild.server.business.approval.ApprovalState;
17 -
import com.rebuild.server.business.approval.FlowNode;
15 +
import com.rebuild.server.business.approval.*;
18 16
import com.rebuild.server.business.trigger.RobotTriggerManual;
19 17
import com.rebuild.server.metadata.EntityHelper;
20 18
import com.rebuild.server.metadata.MetadataHelper;
21 19
import com.rebuild.server.metadata.entity.EasyMeta;
22 20
import com.rebuild.server.service.BaseService;
21 +
import com.rebuild.server.service.DataSpecificationNoRollbackException;
23 22
import com.rebuild.server.service.OperatingContext;
24 23
import com.rebuild.server.service.bizz.UserService;
25 24
import com.rebuild.server.service.notification.MessageBuilder;
@@ -99,11 +98,12 @@
Loading
99 98
	 * @param stepRecord
100 99
	 * @param signMode
101 100
	 * @param cc
102 -
	 * @param nextApprovers 驳回时无需
103 -
	 * @param nextNode 驳回时无需
104 -
	 * @param addedData 驳回时无需
101 +
	 * @param nextApprovers [驳回时无需]
102 +
	 * @param nextNode [驳回时无需]
103 +
	 * @param addedData [驳回时无需]
104 +
	 * @param checkUseGroup [驳回时无需]
105 105
	 */
106 -
	public void txApprove(Record stepRecord, String signMode, Set<ID> cc, Set<ID> nextApprovers, String nextNode, Record addedData) {
106 +
	public void txApprove(Record stepRecord, String signMode, Set<ID> cc, Set<ID> nextApprovers, String nextNode, Record addedData, String checkUseGroup) {
107 107
		// 审批时更新主记录
108 108
		if (addedData != null) {
109 109
			ADDED_MODE.set(true);
@@ -112,6 +112,20 @@
Loading
112 112
			} finally {
113 113
				ADDED_MODE.remove();
114 114
			}
115 +
116 +
			// 检查数据修改后的步骤对不对 GitHub#208
117 +
			if (checkUseGroup != null) {
118 +
				Object[] stepObject = Application.createQueryNoFilter(
119 +
						"select recordId,approvalId from RobotApprovalStep where stepId = ?")
120 +
						.setParameter(1, stepRecord.getPrimary())
121 +
						.unique();
122 +
123 +
				ApprovalProcessor approvalProcessor = new ApprovalProcessor((ID) stepObject[0], (ID) stepObject[1]);
124 +
				FlowNodeGroup nextNodes = approvalProcessor.getNextNodes();
125 +
				if (!nextNodes.getGroupId().equals(checkUseGroup)) {
126 +
					throw new DataSpecificationNoRollbackException("由于更改数据导致流程改变,你需要重新审批");
127 +
				}
128 +
			}
115 129
		}
116 130
117 131
		super.update(stepRecord);
@@ -126,7 +140,7 @@
Loading
126 140
		final ID approvalId = (ID) stepObject[1];
127 141
		final String currentNode = (String) stepObject[2];
128 142
		final ID approver = Application.getCurrentUser();
129 -
		
143 +
130 144
		String entityLabel = EasyMeta.getLabel(MetadataHelper.getEntity(recordId.getEntityCode()));
131 145
		ApprovalState state = (ApprovalState) ApprovalState.valueOf(stepRecord.getInt("state"));
132 146
		

@@ -165,4 +165,15 @@
Loading
165 165
		FlowNode node = getApprovalNode();
166 166
		return node == null ? FlowNode.SIGN_OR : node.getSignMode();
167 167
	}
168 +
169 +
	/**
170 +
	 * @return
171 +
	 */
172 +
	public String getGroupId() {
173 +
		StringBuilder sb = new StringBuilder();
174 +
		for (FlowNode node : nodes) {
175 +
			sb.append(node.getNodeId());
176 +
		}
177 +
		return sb.toString();
178 +
	}
168 179
}

@@ -75,8 +75,8 @@
Loading
75 75
     * @return
76 76
     */
77 77
    public static boolean isCommercial() {
78 -
        JSONObject result = siteApi("api/authority/query", true);
79 -
        return result != null && StringUtils.contains(result.getString("authType") , "开源");
78 +
        JSONObject auth = siteApi("api/authority/query", true);
79 +
        return auth != null && !auth.getString("authType").contains("开源");
80 80
    }
81 81
82 82
    /**

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Learn more Showing 3 files with coverage changes found.

Changes in src/main/java/com/rebuild/server/helper/KVStorage.java
-2
+2
Loading file...
Changes in src/main/java/com/rebuild/server/helper/AesPreferencesConfigurer.java
-1
+1
Loading file...
Changes in src/main/java/com/rebuild/server/business/approval/FlowNodeGroup.java
-2
+1
+1
Loading file...
Files Coverage
src/main/java/com/rebuild -0.09% 57.36%
Project Totals (250 files) 57.36%
Loading