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
99cecf4
... +6 ...
ccc6f07
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
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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | /** |
Learn more Showing 3 files with coverage changes found.
src/main/java/com/rebuild/server/helper/KVStorage.java
src/main/java/com/rebuild/server/helper/AesPreferencesConfigurer.java
src/main/java/com/rebuild/server/business/approval/FlowNodeGroup.java
Files | Coverage |
---|---|
src/main/java/com/rebuild | -0.09% 57.36% |
Project Totals (250 files) | 57.36% |
ccc6f07
4780098
24e7886
ffa3e9c
ee0f0b6
72c523e
1f80f74
99cecf4