Browse Source

Merge branch 'dev_ic_mp' into develop

dev
sunyuchao 4 years ago
parent
commit
c142c90d15
  1. 4
      epmet-auth/src/main/java/com/epmet/controller/LoginController.java
  2. 4
      epmet-auth/src/main/java/com/epmet/controller/WxController.java
  3. 6
      epmet-auth/src/main/java/com/epmet/service/impl/CaptchaServiceImpl.java
  4. 12
      epmet-cloud-generator/src/main/resources/static/js/common.js
  5. 8
      epmet-cloud-generator/src/main/resources/static/libs/router.js
  6. 34
      epmet-cloud-generator/src/main/resources/template/add-or-update.vue.vm
  7. 2
      epmet-cloud-generator/src/main/resources/template/index.vue.vm
  8. 6
      epmet-cloud-generator/src/main/resources/views/index.html
  9. 3
      epmet-commons/epmet-common-clienttoken/src/main/java/com/epmet/common/token/util/UserUtil.java
  10. 2
      epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/interceptor/DataFilterInterceptor.java
  11. 8
      epmet-commons/epmet-commons-security/src/main/java/com/epmet/commons/security/sign/openapi/OpenApiSignUtils.java
  12. 5
      epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/DemoApp.java
  13. 2
      epmet-commons/epmet-commons-tools-wx-mp/src/main/java/com/epmet/wx/mp/handler/LocationHandler.java
  14. 61
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/password/BCrypt.java
  15. 3
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/IpUtils.java
  16. 15
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/Md5Util.java
  17. 13
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ModuleUtils.java
  18. 2
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/Result.java
  19. 2
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/net/OkHttpUtil.java
  20. 12
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/validator/IdCardNoValidatorUtils.java
  21. 5
      epmet-gateway/src/main/java/com/epmet/auth/ExtAppAuthProcessor.java
  22. 4
      epmet-gateway/src/main/java/com/epmet/filter/EpmetGatewayFilter.java
  23. 2
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java
  24. 2
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/QuestionnaireServiceImpl.java
  25. 4
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/PartyMemberLeadServiceImpl.java
  26. 12
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/publicity/PublicityService.java
  27. 3
      epmet-module/epmet-activiti/epmet-activiti-server/src/main/java/com/epmet/editor/main/StencilsetRestResource.java
  28. 4
      epmet-module/epmet-activiti/epmet-activiti-server/src/main/java/com/epmet/editor/model/ModelEditorJsonRestResource.java
  29. 5
      epmet-module/epmet-activiti/epmet-activiti-server/src/main/java/com/epmet/editor/model/ModelSaveRestResource.java
  30. 4
      epmet-module/epmet-activiti/epmet-activiti-server/src/main/java/com/epmet/service/ActHistoryService.java
  31. 3
      epmet-module/epmet-activiti/epmet-activiti-server/src/main/java/com/epmet/service/ActModelService.java
  32. 7
      epmet-module/epmet-activiti/epmet-activiti-server/src/main/java/com/epmet/service/ActProcessService.java
  33. 2
      epmet-module/epmet-activiti/epmet-activiti-server/src/main/java/com/epmet/service/ActTaskService.java
  34. 16
      epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/diagram-viewer/js/ActivitiRest.js
  35. 144
      epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/diagram-viewer/js/Polyline.js
  36. 874
      epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/diagram-viewer/js/ProcessDiagramCanvas.js
  37. 84
      epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/diagram-viewer/js/jquery/jquery.js
  38. 142
      epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/diagram-viewer/js/textlayout.js
  39. 6
      epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/editor-app/editor-utils.js
  40. 14
      epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/editor-app/editor/i18n/translation_de.js
  41. 14
      epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/editor-app/editor/i18n/translation_en_us.js
  42. 6
      epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/editor-app/editor/i18n/translation_signavio_de.js
  43. 2
      epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/editor-app/editor/i18n/translation_signavio_en_us.js
  44. 8538
      epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/editor-app/editor/oryx.debug.js
  45. 1146
      epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/editor-app/libs/bootstrap_3.1.1/js/bootstrap.js
  46. 6
      epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/editor-app/libs/es5-shim-15.3.4.5/es5-sham.js
  47. 2
      epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/editor-app/libs/es5-shim-15.3.4.5/es5-shim.js
  48. 8
      epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/editor-app/libs/es5-shim-15.3.4.5/tests/helpers/h-matchers.js
  49. 4
      epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/editor-app/libs/jquery.autogrow-textarea.js
  50. 4
      epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/editor-app/libs/json3_3.2.6/lib/json3.js
  51. 6
      epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/editor-app/libs/path_parser.js
  52. 74
      epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/editor-app/libs/prototype-1.5.1.js
  53. 27
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/ShowApiUtil.java
  54. 5
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppAuthProcessor.java
  55. 7
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java
  56. 4
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/email/EmailUtils.java
  57. 6
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/InfoServiceImpl.java
  58. 2
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/SysSmsServiceImpl.java
  59. 6
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java
  60. 4
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/redis/PointRedis.java
  61. 6
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointRuleServiceImpl.java
  62. 4
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointVerificationLogServiceImpl.java
  63. 11
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java
  64. 5
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/mpaes/AesDecryptUtil.java
  65. 15
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/mpaes/PKCS7Encoder.java
  66. 23
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/mpaes/WXBizMsgCrypt.java
  67. 2
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/mpaes/WXXmlToMapUtil.java
  68. 2
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ComponentVerifyTicketService.java
  69. 2
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/result/WxResult.java
  70. 2
      epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/config/PermissionInitializer.java
  71. 2
      epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/AccessConfigServiceImpl.java
  72. 5
      epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/AccessServiceImpl.java
  73. 2
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java
  74. 10
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java
  75. 3
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java
  76. 2
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/SubjectArticleListFormDTO.java
  77. 2
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java
  78. 2
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/SpecialSubjectServiceImpl.java
  79. 4
      epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerRelationServiceImpl.java
  80. 4
      epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java
  81. 2
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/QRCodeMultipartFileDTO.java
  82. 20
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java
  83. 8
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java
  84. 13
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupCodeServiceImpl.java
  85. 2
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java
  86. 4
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/TopicShareLinkRecordServiceImpl.java
  87. 4
      epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/service/impl/ScanService.java
  88. 64
      epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/service/impl/ScanServiceImpl.java
  89. 15
      epmet-openapi/epmet-openapi-sdk/src/main/java/com/epmet/openapi/sdk/encrypt/Md5Util.java
  90. 8
      epmet-openapi/epmet-openapi-sdk/src/main/java/com/epmet/openapi/sdk/sign/OpenApiSignUtils.java
  91. 7
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/StatsResiWarnFormDTO.java
  92. 5
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GridMobileListResultDTO.java
  93. 8
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java
  94. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java
  95. 7
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserRoleServiceImpl.java
  96. 10
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java

4
epmet-auth/src/main/java/com/epmet/controller/LoginController.java

@ -177,7 +177,7 @@ public class LoginController {
content = null;
// 将sha1加密后的字符串可与signature对比,标识该请求来源于微信
System.out.println(tmpStr.equals(signature.toUpperCase()));
return tmpStr != null ? tmpStr.equals(signature.toUpperCase()) : false;
return tmpStr != null && tmpStr.equals(signature.toUpperCase());
}
/**
@ -225,7 +225,7 @@ public class LoginController {
if (echostr == null || echostr.isEmpty()) {
return nonce;
}
if (this.checkSignature(signature, timestamp, nonce)) {
if (checkSignature(signature, timestamp, nonce)) {
return echostr;
}
return nonce;

4
epmet-auth/src/main/java/com/epmet/controller/WxController.java

@ -84,7 +84,7 @@ public class WxController {
content = null;
// 将sha1加密后的字符串可与signature对比,标识该请求来源于微信
System.out.println(tmpStr.equals(signature.toUpperCase()));
return tmpStr != null ? tmpStr.equals(signature.toUpperCase()) : false;
return tmpStr != null && tmpStr.equals(signature.toUpperCase());
}
/**
@ -132,7 +132,7 @@ public class WxController {
if (echostr == null || echostr.isEmpty()) {
return nonce;
}
if (this.checkSignature(signature, timestamp, nonce)) {
if (checkSignature(signature, timestamp, nonce)) {
return echostr;
}
return nonce;

6
epmet-auth/src/main/java/com/epmet/service/impl/CaptchaServiceImpl.java

@ -60,10 +60,6 @@ public class CaptchaServiceImpl implements CaptchaService {
String captcha = captchaRedis.get(uuid);
//验证码是否正确
if(code.equalsIgnoreCase(captcha)){
return true;
}
return false;
return code.equalsIgnoreCase(captcha);
}
}

12
epmet-cloud-generator/src/main/resources/static/js/common.js

@ -40,7 +40,7 @@ window.alert = function(msg, callback){
callback("ok");
}
});
}
};
//重写confirm式样框
window.confirm = function(msg, callback){
@ -50,7 +50,7 @@ window.confirm = function(msg, callback){
callback("ok");
}
});
}
};
//选择一条记录
function getSelectedRow() {
@ -60,13 +60,13 @@ function getSelectedRow() {
alert("请选择一条记录");
return ;
}
var selectedIDs = grid.getGridParam("selarrrow");
if(selectedIDs.length > 1){
alert("只能选择一条记录");
return ;
}
return selectedIDs[0];
}
@ -78,6 +78,6 @@ function getSelectedRows() {
alert("请选择一条记录");
return ;
}
return grid.getGridParam("selarrrow");
}
}

8
epmet-cloud-generator/src/main/resources/static/libs/router.js

@ -69,7 +69,7 @@
cb.apply(self, arr);
}
else {
self.index && self.go(self.index);
self.index && self.go(self.index);
}
};
@ -80,7 +80,7 @@
var self = this;
self.reload();
}
};
/**
* 获取callback
@ -89,9 +89,9 @@
function getCb(addr, hashList) {
for(var key in hashList) {
if(key == addr) {
return hashList[key]
return hashList[key]
}
}
return false;
}
})();
})();

34
epmet-cloud-generator/src/main/resources/template/add-or-update.vue.vm

@ -22,9 +22,9 @@ export default {
data () {
return {
visible: false,
dataForm: {
dataForm: {;
#foreach($column in $columns)
${column.attrname}: ''#if($velocityCount != $columns.size()),#end
${column.attrname}: ''#if($velocityCount != $columns.size()),;#end
#end
}
@ -32,12 +32,12 @@ export default {
},
computed: {
dataRule () {
return {
return {;
#foreach($column in $columns)
#if($column.columnName != $pk.columnName)
${column.attrname}: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
]#if($velocityCount != $columns.size()),#end
]#if($velocityCount != $columns.size()),;#end
#end
#end
@ -46,19 +46,19 @@ export default {
},
methods: {
init () {
this.visible = true
this.visible = true;
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.${pk.attrname}) {
if (this.dataForm.${pk.attrname}); {
this.getInfo()
}
})
},
// 获取信息
getInfo () {
#[[this.$http.get(]]#`/${moduleName}/${pathName}/#[[${]]#this.dataForm.${pk.attrname}}`).then(({ data: res }) => {
#[[this.$http.get(]];#`/${moduleName}/${pathName}/#[[${]]#this.dataForm.${pk.attrname}}`;).then(({ data: res }) => {
if (res.code !== 0) {
#[[return this.$message.error(res.msg)]]#
#[[;return this.$message.error(res.msg);]]#
}
this.dataForm = {
...this.dataForm,
@ -69,19 +69,19 @@ export default {
// 表单提交
dataFormSubmitHandle: debounce(function () {
#[[this.$refs['dataForm'].validate((valid) => {]]#
if (!valid) {
if (!valid); {
return false
}
#[[this.$http]]#[!this.dataForm.${pk.attrname} ? 'post' : 'put']('/${moduleName}/${pathName}/', this.dataForm).then(({ data: res }) => {
#[[this.$http]];#[!this.dataForm.$;{pk.attrname} ? 'post' : 'put';]('/${moduleName}/${pathName}/', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
#[[return this.$message.error(res.msg)]]#
#[[;return this.$message.error(res.msg);]]#
}
this.$message({
#[[message: this.$t('prompt.success'),]]#
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$message({;
#[[message;: this.$t('prompt.success'),;]]#
type;: 'success',
duration;: 500,
onClose;: () => {
this.visible = false;
this.$emit('refreshDataList')
}
})

2
epmet-cloud-generator/src/main/resources/template/index.vue.vm

@ -55,7 +55,7 @@ export default {
deleteURL: '/${moduleName}/${pathName}',
deleteIsBatch: true
},
dataForm: {
dataForm: {;
${pk.attrname}: ''
}
}

6
epmet-cloud-generator/src/main/resources/views/index.html

@ -40,7 +40,7 @@
<div style="float:left;color:#fff;padding:15px 10px;">代码的搬运工</div>
<div class="navbar-custom-menu">
<ul class="nav navbar-nav">
<li><a href="javascript:;" @click="donate"><i class="fa fa-jpy"></i> &nbsp;捐赠作者</a></li>
<li><a href="javascript:" @click="donate"><i class="fa fa-jpy"></i> &nbsp;捐赠作者</a></li>
<li><a href="https://www.renren.io" target="_blank"><i class="fa fa-home"></i> &nbsp;人人开源</a></li>
</ul>
</div>
@ -58,7 +58,7 @@
<ul class="sidebar-menu">
<li class="header">导航菜单</li>
<li class="active">
<a href="javascript:;"><i class="fa fa-cog"></i><span>代码生成器</span><i class="fa fa-angle-left pull-right"></i></a>
<a href="javascript:"><i class="fa fa-cog"></i><span>代码生成器</span><i class="fa fa-angle-left pull-right"></i></a>
<ul class="treeview-menu menu-open" style="display: block;">
<li class="active"><a href="#main.html"><i class="fa fa-rocket"></i> 控制台</a></li>
<li><a href="#generator.html"><i class="fa fa-rocket"></i> renren-cloud</a></li>
@ -97,7 +97,7 @@
<!-- Add the sidebar's background. This div must be placed
immediately after the control sidebar -->
<div class="control-sidebar-bg"></div>
</div>

3
epmet-commons/epmet-common-clienttoken/src/main/java/com/epmet/common/token/util/UserUtil.java

@ -30,9 +30,6 @@ public class UserUtil {
*/
public static TokenDto getCurrentUserInfo() {
TokenDto tokenDto = getCurrentUser();
if (tokenDto == null) {
return null;
}
return tokenDto;
}

2
epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/interceptor/DataFilterInterceptor.java

@ -35,7 +35,7 @@ public class DataFilterInterceptor extends AbstractSqlParserHandler implements I
@Override
public Object intercept(Invocation invocation) throws Throwable {
StatementHandler statementHandler = (StatementHandler) PluginUtils.realTarget(invocation.getTarget());
StatementHandler statementHandler = PluginUtils.realTarget(invocation.getTarget());
MetaObject metaObject = SystemMetaObject.forObject(statementHandler);
// SQL解析

8
epmet-commons/epmet-commons-security/src/main/java/com/epmet/commons/security/sign/openapi/OpenApiSignUtils.java

@ -40,19 +40,19 @@ public class OpenApiSignUtils {
*/
public static String mapToSignStr(Map<String, String> map) {
Set<String> keySet = map.keySet();
String[] keyArray = (String[])keySet.toArray(new String[keySet.size()]);
String[] keyArray = keySet.toArray(new String[keySet.size()]);
Arrays.sort(keyArray);
StringBuilder sb = new StringBuilder();
for(int i = 0; i < keyArray.length; ++i) {
String key = keyArray[i];
String val = (String)map.get(key);
String val = map.get(key);
if (val != null && val.trim().length() > 0 && !"sign".equals(key)) {
if (!sb.toString().isEmpty()) {
sb.append("&");
}
sb.append(key).append("=").append((String)map.get(key));
sb.append(key).append("=").append(map.get(key));
}
}
@ -88,7 +88,7 @@ public class OpenApiSignUtils {
private static void generateGetOrgDetailSign() {
long now = System.currentTimeMillis();
String uuid = UUID.randomUUID().toString().replace("-", "");;
String uuid = UUID.randomUUID().toString().replace("-", "");
System.out.println("时间戳:" + now);
System.out.println("随机数:" + uuid);

5
epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/DemoApp.java

@ -6,6 +6,7 @@ import com.epmet.commons.thirdplat.dto.form.jcet.SsoTokenFormDTO;
import com.epmet.commons.thirdplat.encrypt.SignUtils;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.Map;
@ -22,7 +23,7 @@ public class DemoApp {
SsoTicketFormDTO ssoTicket = new SsoTicketFormDTO();
ssoTicket.setSsoTicket("ssoTicket-jGOAW66udmRtUWBKgs3q7k1w7prGxd5I");
int bodyLength = JSON.toJSONString(ssoTicket).getBytes("utf-8").length;
int bodyLength = JSON.toJSONString(ssoTicket).getBytes(StandardCharsets.UTF_8).length;
Map<String, Object> headers = new HashMap();
long timestamp = System.currentTimeMillis();
@ -33,4 +34,4 @@ public class DemoApp {
System.out.println(headers);
}
}
}

2
epmet-commons/epmet-commons-tools-wx-mp/src/main/java/com/epmet/wx/mp/handler/LocationHandler.java

@ -34,7 +34,7 @@ public class LocationHandler extends AbstractHandler {
//上报地理位置事件
this.logger.info("上报地理位置,纬度 : {},经度 : {},精度 : {}",
wxMessage.getLatitude(), wxMessage.getLongitude(), String.valueOf(wxMessage.getPrecision()));
wxMessage.getLatitude(), wxMessage.getLongitude(), wxMessage.getPrecision());
//TODO 可以将用户地理位置信息保存到本地数据库,以便以后使用

61
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/password/BCrypt.java

@ -3,6 +3,7 @@ package com.epmet.commons.tools.security.password;
import java.io.ByteArrayOutputStream;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.security.SecureRandom;
/**
@ -52,11 +53,11 @@ public class BCrypt {
// Blowfish parameters
private static final int BLOWFISH_NUM_ROUNDS = 16;
// Initial contents of key schedule
private static final int P_orig[] = { 0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344,
private static final int[] P_orig = { 0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344,
0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89, 0x452821e6, 0x38d01377,
0xbe5466cf, 0x34e90c6c, 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917,
0x9216d5d9, 0x8979fb1b };
private static final int S_orig[] = { 0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7,
private static final int[] S_orig = { 0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7,
0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99, 0x24a19947, 0xb3916cf7,
0x0801f2e2, 0x858efc16, 0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e,
0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee, 0x7b54a41d, 0xc25a59b5,
@ -228,16 +229,16 @@ public class BCrypt {
0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9, 0x90d4f869, 0xa65cdea0,
0x3f09252d, 0xc208e69f, 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6 };
// bcrypt IV: "OrpheanBeholderScryDoubt"
static private final int bf_crypt_ciphertext[] = { 0x4f727068, 0x65616e42,
static private final int[] bf_crypt_ciphertext = { 0x4f727068, 0x65616e42,
0x65686f6c, 0x64657253, 0x63727944, 0x6f756274 };
// Table for Base64 encoding
static private final char base64_code[] = { '.', '/', 'A', 'B', 'C', 'D', 'E', 'F',
static private final char[] base64_code = { '.', '/', 'A', 'B', 'C', 'D', 'E', 'F',
'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U',
'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y',
'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };
// Table for Base64 decoding
static private final byte index_64[] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
static private final byte[] index_64 = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 54, 55,
56, 57, 58, 59, 60, 61, 62, 63, -1, -1, -1, -1, -1, -1, -1, 2, 3, 4, 5, 6, 7,
@ -247,8 +248,8 @@ public class BCrypt {
static final int MIN_LOG_ROUNDS = 4;
static final int MAX_LOG_ROUNDS = 31;
// Expanded Blowfish key
private int P[];
private int S[];
private int[] P;
private int[] S;
/**
* Encode a byte array using bcrypt's slightly-modified base64 encoding scheme. Note
@ -260,7 +261,7 @@ public class BCrypt {
* @param rs the destination buffer for the base64-encoded string
* @exception IllegalArgumentException if the length is invalid
*/
static void encode_base64(byte d[], int len, StringBuilder rs)
static void encode_base64(byte[] d, int len, StringBuilder rs)
throws IllegalArgumentException {
int off = 0;
int c1, c2;
@ -359,7 +360,7 @@ public class BCrypt {
* @param lr an array containing the two 32-bit half blocks
* @param off the position in the array of the blocks
*/
private final void encipher(int lr[], int off) {
private final void encipher(int[] lr, int off) {
int i, n, l = lr[off], r = lr[off + 1];
l ^= P[0];
@ -388,7 +389,7 @@ public class BCrypt {
* @param offp a "pointer" (as a one-entry array) to the current offset into data
* @return the next word of material from data
*/
private static int streamtoword(byte data[], int offp[]) {
private static int streamtoword(byte[] data, int[] offp) {
int i;
int word = 0;
int off = offp[0];
@ -406,18 +407,18 @@ public class BCrypt {
* Initialise the Blowfish key schedule
*/
private void init_key() {
P = (int[]) P_orig.clone();
S = (int[]) S_orig.clone();
P = P_orig.clone();
S = S_orig.clone();
}
/**
* Key the Blowfish cipher
* @param key an array containing the key
*/
private void key(byte key[]) {
private void key(byte[] key) {
int i;
int koffp[] = { 0 };
int lr[] = { 0, 0 };
int[] koffp = { 0 };
int[] lr = { 0, 0 };
int plen = P.length, slen = S.length;
for (i = 0; i < plen; i++) {
@ -443,10 +444,11 @@ public class BCrypt {
* @param data salt information
* @param key password information
*/
private void ekskey(byte data[], byte key[]) {
private void ekskey(byte[] data, byte[] key) {
int i;
int koffp[] = { 0 }, doffp[] = { 0 };
int lr[] = { 0, 0 };
int[] koffp = { 0 };
int[] doffp = { 0 };
int[] lr = { 0, 0 };
int plen = P.length, slen = S.length;
for (i = 0; i < plen; i++) {
@ -484,10 +486,10 @@ public class BCrypt {
* @param log_rounds the binary logarithm of the number of rounds of hashing to apply
* @return an array containing the binary hashed password
*/
private byte[] crypt_raw(byte password[], byte salt[], int log_rounds) {
int cdata[] = (int[]) bf_crypt_ciphertext.clone();
private byte[] crypt_raw(byte[] password, byte[] salt, int log_rounds) {
int[] cdata = bf_crypt_ciphertext.clone();
int clen = cdata.length;
byte ret[];
byte[] ret;
long rounds = roundsForLogRounds(log_rounds);
@ -524,8 +526,10 @@ public class BCrypt {
public static String hashpw(String password, String salt) throws IllegalArgumentException {
BCrypt B;
String real_salt;
byte passwordb[], saltb[], hashed[];
char minor = (char) 0;
byte[] passwordb;
byte[] saltb;
byte[] hashed;
char minor = (char) 0;
int rounds, off = 0;
StringBuilder rs = new StringBuilder();
@ -564,14 +568,9 @@ public class BCrypt {
rounds = Integer.parseInt(salt.substring(off, off + 2));
real_salt = salt.substring(off + 3, off + 25);
try {
passwordb = (password + (minor >= 'a' ? "\000" : "")).getBytes("UTF-8");
}
catch (UnsupportedEncodingException uee) {
throw new AssertionError("UTF-8 is not supported");
}
passwordb = (password + (minor >= 'a' ? "\000" : "")).getBytes(StandardCharsets.UTF_8);
saltb = decode_base64(real_salt, BCRYPT_SALT_LEN);
saltb = decode_base64(real_salt, BCRYPT_SALT_LEN);
B = new BCrypt();
hashed = B.crypt_raw(passwordb, saltb, rounds);
@ -603,7 +602,7 @@ public class BCrypt {
throw new IllegalArgumentException("Bad number of rounds");
}
StringBuilder rs = new StringBuilder();
byte rnd[] = new byte[BCRYPT_SALT_LEN];
byte[] rnd = new byte[BCRYPT_SALT_LEN];
random.nextBytes(rnd);

3
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/IpUtils.java

@ -66,8 +66,7 @@ public class IpUtils {
if (ip != null) { //"***.***.***.***".length() = 15
if (ip.indexOf(StrConstant.COMMA) > 0) {
ip = ip.split(StrConstant.COMMA)[0];
;
}
}
}
} catch (Exception e) {
logger.error("IpUtils getIpAddr ERROR ", e);

15
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/Md5Util.java

@ -3,6 +3,7 @@ package com.epmet.commons.tools.utils;
import lombok.extern.slf4j.Slf4j;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
@Slf4j
@ -24,7 +25,7 @@ public class Md5Util {
}
}
private static final char hexDigits[] = { // 用来将字节转换成 16 进制表示的字符
private static final char[] hexDigits = { // 用来将字节转换成 16 进制表示的字符
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
private static String getMD5(byte[] source) {
@ -32,9 +33,9 @@ public class Md5Util {
try {
MessageDigest md = MessageDigest.getInstance("MD5");
md.update(source);
byte tmp[] = md.digest(); // MD5 的计算结果是一个 128 位的长整数,
byte[] tmp = md.digest(); // MD5 的计算结果是一个 128 位的长整数,
// 用字节表示就是 16 个字节
char str[] = new char[16 * 2]; // 每个字节用 16 进制表示的话,使用两个字符,
char[] str = new char[16 * 2]; // 每个字节用 16 进制表示的话,使用两个字符,
// 所以表示成 16 进制需要 32 个字符
int k = 0; // 表示转换结果中对应的字符位置
for (int i = 0; i < 16; i++) { // 从第一个字节开始,对 MD5 的每一个字节
@ -52,7 +53,7 @@ public class Md5Util {
return s;
}
private static String byteArrayToHexString(byte b[]) {
private static String byteArrayToHexString(byte[] b) {
StringBuffer resultSb = new StringBuffer();
for (int i = 0; i < b.length; i++)
resultSb.append(byteToHexString(b[i]));
@ -72,7 +73,7 @@ public class Md5Util {
public static String MD5Encode(String origin, String charsetname) {
String resultString = null;
try {
resultString = new String(origin);
resultString = origin;
MessageDigest md = MessageDigest.getInstance("MD5");
if (charsetname == null || "".equals(charsetname))
resultString = byteArrayToHexString(md.digest(resultString
@ -101,7 +102,7 @@ public class Md5Util {
* @return 大写
*/
public static String get12Char(String str) {
String arr[] = ShortText(str);
String[] arr = ShortText(str);
String rst = (arr[0] + arr[1]).toUpperCase();
return rst.substring(0, 4) + rst.substring(4, 8) + rst.substring(8, 12);
}
@ -120,7 +121,7 @@ public class Md5Util {
try {
md = MessageDigest.getInstance("MD5");
hex = byteArrayToHexString(md.digest(SALT.concat(string)
.getBytes("utf-8")));
.getBytes(StandardCharsets.UTF_8)));
} catch (Exception e) {
e.printStackTrace();
}

13
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ModuleUtils.java

@ -9,6 +9,7 @@ import org.springframework.util.Base64Utils;
import org.springframework.util.StringUtils;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.UUID;
@ -63,11 +64,7 @@ public class ModuleUtils {
if (StringUtils.isEmpty(params)) {
return null;
}
try {
return Base64Utils.encodeToUrlSafeString(params.getBytes(CharEncoding.UTF_8));
} catch (UnsupportedEncodingException e) {
throw new RenException("字符串编码方法异常");
}
return Base64Utils.encodeToUrlSafeString(params.getBytes(StandardCharsets.UTF_8));
}
/**
@ -82,11 +79,7 @@ public class ModuleUtils {
if (StringUtils.isEmpty(base64Str)) {
return null;
}
try {
return new String(Base64Utils.decodeFromUrlSafeString(base64Str), CharEncoding.UTF_8);
} catch (UnsupportedEncodingException e) {
throw new RenException("字符串编码方法异常");
}
return new String(Base64Utils.decodeFromUrlSafeString(base64Str), StandardCharsets.UTF_8);
}
/**

2
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/Result.java

@ -48,7 +48,7 @@ public class Result<T> implements Serializable {
}
public boolean success(){
return code == 0 ? true : false;
return code == 0;
}
/**

2
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/net/OkHttpUtil.java

@ -277,7 +277,7 @@ public class OkHttpUtil {
Iterator<String> iterator = bodyParams.keySet().iterator();
String key = "";
while (iterator.hasNext()) {
key = iterator.next().toString();
key = iterator.next();
formEncodingBuilder.add(key, bodyParams.get(key));
logger.info(" 请求参数:{},请求值:{} ", key, bodyParams.get(key));
}

12
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/validator/IdCardNoValidatorUtils.java

@ -161,11 +161,7 @@ public class IdCardNoValidatorUtils {
private static boolean isStrNum(String str) {
Pattern pattern = compile("[0-9]*");
Matcher isNum = pattern.matcher(str);
if (isNum.matches()) {
return true;
} else {
return false;
}
return isNum.matches();
}
/**
@ -177,11 +173,7 @@ public class IdCardNoValidatorUtils {
public static boolean isStrDate(String strDate) {
Pattern pattern = compile("^((\\d{2}(([02468][048])|([13579][26]))[\\-\\/\\s]?((((0?[13578])|(1[02]))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])))))|(\\d{2}(([02468][1235679])|([13579][01345789]))[\\-\\/\\s]?((((0?[13578])|(1[02]))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\\-\\/\\s]?((0?[1-9])|(1[0-9])|(2[0-8]))))))(\\s(((0?[0-9])|([1-2][0-3]))\\:([0-5]?[0-9])((\\s)|(\\:([0-5]?[0-9])))))?$");
Matcher m = pattern.matcher(strDate);
if (m.matches()) {
return true;
} else {
return false;
}
return m.matches();
}

5
epmet-gateway/src/main/java/com/epmet/auth/ExtAppAuthProcessor.java

@ -23,9 +23,6 @@ public abstract class ExtAppAuthProcessor {
*/
protected boolean validTimeStamp(Long timestamp) {
long now = System.currentTimeMillis();
if (Math.abs(now - timestamp) > diffMillins) {
return false;
}
return true;
return Math.abs(now - timestamp) <= diffMillins;
}
}

4
epmet-gateway/src/main/java/com/epmet/filter/EpmetGatewayFilter.java

@ -182,7 +182,7 @@ public class EpmetGatewayFilter implements GatewayFilter {
if (queryParams == null || queryParams.size() == 0) {
return "";
}
StringBuilder sb = new StringBuilder("");
StringBuilder sb = new StringBuilder();
queryParams.entrySet().forEach(entry -> {
String key = entry.getKey();
List<String> values = entry.getValue();
@ -260,4 +260,4 @@ public class EpmetGatewayFilter implements GatewayFilter {
sb.append(System.currentTimeMillis());
return sb.toString();
}
}
}

2
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java

@ -444,7 +444,7 @@ public class EpmetUserServiceImpl implements EpmetUserService {
//展示红点:true;隐藏:false
if(govProjectService.countRedDot(userId)>0){
resultDTO.setRedDot(true);
};
}
return resultDTO;
}

2
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/QuestionnaireServiceImpl.java

@ -114,7 +114,7 @@ public class QuestionnaireServiceImpl implements QuestionnaireService, ResultDat
}
});
CustomerStaffInfoCacheResult staffInfo = customerStaffRedis.getStaffInfo(customerId, staffId);
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, staffId);
PermissionValidateResultDTO r = null;
//if ("agency".equals(staffInfo.getFromOrgType())) {
// // 来自agency

4
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/PartyMemberLeadServiceImpl.java

@ -286,7 +286,7 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService {
o.setOrgId(data.getOrgId());
num++;
result.add(o);
};
}
}else{
List<OrgRankDataResultDTO> gridData =
screenOrgRankDataDao.selectGridDataMonthly(param.getAgencyId(),monthId);
@ -307,7 +307,7 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService {
o.setOrgId(data.getOrgId());
num++;
result.add(o);
};
}
}
return result;
}

12
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/publicity/PublicityService.java

@ -42,33 +42,33 @@ public interface PublicityService {
* @param tokenDto,formDTO
* @author jyy
*/
public List<FactTagViewedAgencyDTO> tagviewed(TokenDto tokenDto, Integer pageSize, String type) ;
List<FactTagViewedAgencyDTO> tagviewed(TokenDto tokenDto, Integer pageSize, String type) ;
/**
* @Description 宣传能力工作端宣传能力-获取发表最多的分类数据
* @param tokenDto,pageSize,type
* @author jyy
*/
public List<FactTagUsedAgencyDTO> tagused(TokenDto tokenDto, Integer pageSize, String type) ;
List<FactTagUsedAgencyDTO> tagused(TokenDto tokenDto, Integer pageSize, String type) ;
/**
* @param tokenDto type
* @Description 获取下级机关发文数
* @author jyy
*/
public List<FactPublishedAgencyDTO> subagencyPublishedarticle(TokenDto tokenDto, String type) ;
List<FactPublishedAgencyDTO> subagencyPublishedarticle(TokenDto tokenDto, String type) ;
/**
* @param tokenDto type
* @Description 获取直属部门发文数
* @author jyy
*/
public List<FactPublishedDepartmentDTO> departmentPublishedarticle(TokenDto tokenDto, String type);
List<FactPublishedDepartmentDTO> departmentPublishedarticle(TokenDto tokenDto, String type);
/**
* @param tokenDto type
* @Description 获取指数网格发文数
* @author jyy
*/
public List<FactPublishedGridDTO> subgridPublishedarticle(TokenDto tokenDto, String type);
List<FactPublishedGridDTO> subgridPublishedarticle(TokenDto tokenDto, String type);
}
}

3
epmet-module/epmet-activiti/epmet-activiti-server/src/main/java/com/epmet/editor/main/StencilsetRestResource.java

@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
/**
* Stencilset
@ -30,7 +31,7 @@ public class StencilsetRestResource {
public @ResponseBody String getStencilset() {
InputStream stencilsetStream = this.getClass().getClassLoader().getResourceAsStream("stencilset.json");
try {
return IOUtils.toString(stencilsetStream, "utf-8");
return IOUtils.toString(stencilsetStream, StandardCharsets.UTF_8);
} catch (Exception e) {
throw new ActivitiException("Error while loading stencil set", e);
}

4
epmet-module/epmet-activiti/epmet-activiti-server/src/main/java/com/epmet/editor/model/ModelEditorJsonRestResource.java

@ -23,6 +23,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.nio.charset.StandardCharsets;
/**
* Model Editor
*
@ -56,7 +58,7 @@ public class ModelEditorJsonRestResource implements ModelDataJsonConstants {
}
modelNode.put(MODEL_ID, model.getId());
ObjectNode editorJsonNode = (ObjectNode) objectMapper.readTree(
new String(repositoryService.getModelEditorSource(model.getId()), "utf-8"));
new String(repositoryService.getModelEditorSource(model.getId()), StandardCharsets.UTF_8));
modelNode.set("model", editorJsonNode);
} catch (Exception e) {

5
epmet-module/epmet-activiti/epmet-activiti-server/src/main/java/com/epmet/editor/model/ModelSaveRestResource.java

@ -28,6 +28,7 @@ import javax.servlet.http.HttpServletRequest;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
/**
* Model Rest
@ -65,9 +66,9 @@ public class ModelSaveRestResource implements ModelDataJsonConstants {
repositoryService.saveModel(model);
repositoryService.addModelEditorSource(model.getId(), jsonXml.getBytes("utf-8"));
repositoryService.addModelEditorSource(model.getId(), jsonXml.getBytes(StandardCharsets.UTF_8));
InputStream svgStream = new ByteArrayInputStream(svgXml.getBytes("utf-8"));
InputStream svgStream = new ByteArrayInputStream(svgXml.getBytes(StandardCharsets.UTF_8));
TranscoderInput input = new TranscoderInput(svgStream);
PNGTranscoder transcoder = new PNGTranscoder();

4
epmet-module/epmet-activiti/epmet-activiti-server/src/main/java/com/epmet/service/ActHistoryService.java

@ -162,9 +162,9 @@ public class ActHistoryService {
query.processDefinitionId((String)params.get("processDefinitionId"));
}
if(StringUtils.isNotEmpty((String)params.get("ended"))){
if("true".equals((String)params.get("ended"))){
if("true".equals(params.get("ended"))){
query.finished();
} else if("false".equals((String)params.get("ended"))){
} else if("false".equals(params.get("ended"))){
query.unfinished();
}
}

3
epmet-module/epmet-activiti/epmet-activiti-server/src/main/java/com/epmet/service/ActModelService.java

@ -37,6 +37,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.List;
import java.util.Map;
@ -101,7 +102,7 @@ public class ActModelService {
ObjectNode stencilset = objectMapper.createObjectNode();
stencilset.put("namespace", "http://b3mn.org/stencilset/bpmn2.0#");
editorNode.set("stencilset", stencilset);
repositoryService.addModelEditorSource(model.getId(), editorNode.toString().getBytes("utf-8"));
repositoryService.addModelEditorSource(model.getId(), editorNode.toString().getBytes(StandardCharsets.UTF_8));
}
public void deploy(String id) {

7
epmet-module/epmet-activiti/epmet-activiti-server/src/main/java/com/epmet/service/ActProcessService.java

@ -38,6 +38,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@ -66,7 +67,7 @@ public class ActProcessService {
public PageData<Map<String, Object>> page(Map<String, Object> params) {
String key = (String)params.get("key");
String processName = (String)params.get("processName");
boolean isLatestVersion = params.get("isLatestVersion")== null? false : (boolean)params.get("isLatestVersion");
boolean isLatestVersion = params.get("isLatestVersion") != null && (boolean) params.get("isLatestVersion");
//分页参数
int curPage = 1;
@ -166,7 +167,7 @@ public class ActProcessService {
InputStream bpmnStream = repositoryService.getResourceAsStream(processDefinition.getDeploymentId(),
processDefinition.getResourceName());
XMLInputFactory xif = XMLInputFactory.newInstance();
InputStreamReader in = new InputStreamReader(bpmnStream, "UTF-8");
InputStreamReader in = new InputStreamReader(bpmnStream, StandardCharsets.UTF_8);
XMLStreamReader xtr = xif.createXMLStreamReader(in);
BpmnModel bpmnModel = new BpmnXMLConverter().convertToBpmnModel(xtr);
@ -187,7 +188,7 @@ public class ActProcessService {
repositoryService.saveModel(modelData);
repositoryService.addModelEditorSource(modelData.getId(), modelNode.toString().getBytes("utf-8"));
repositoryService.addModelEditorSource(modelData.getId(), modelNode.toString().getBytes(StandardCharsets.UTF_8));
return modelData;
}

2
epmet-module/epmet-activiti/epmet-activiti-server/src/main/java/com/epmet/service/ActTaskService.java

@ -84,7 +84,7 @@ public class ActTaskService extends BaseServiceImpl {
taskQuery.taskAssignee(userId);
}
if (StringUtils.isNotEmpty((String)params.get("taskName"))){
taskQuery.taskNameLike("%"+(String)params.get("taskName")+"%");
taskQuery.taskNameLike("%"+ params.get("taskName") +"%");
}
if(StringUtils.isNotEmpty((String)params.get("isRoleGroup"))&&"1".equals(params.get("isRoleGroup"))){
Result<List<Long>> roleResult = userFeignClient.getRoleIdList(SecurityUser.getUserId());

16
epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/diagram-viewer/js/ActivitiRest.js

@ -2,7 +2,7 @@ var ActivitiRest = {
options: {},
getProcessDefinitionByKey: function(processDefinitionKey, callback) {
var url = Lang.sub(this.options.processDefinitionByKeyUrl, {processDefinitionKey: processDefinitionKey});
$.ajax({
url: url,
dataType: 'jsonp',
@ -22,10 +22,10 @@ var ActivitiRest = {
console.error('Get diagram layout['+processDefinitionKey+'] failure: ', textStatus, 'error: ', error, jqXHR);
});
},
getProcessDefinition: function(processDefinitionId, callback) {
var url = Lang.sub(this.options.processDefinitionUrl, {processDefinitionId: processDefinitionId});
$.ajax({
url: url,
dataType: 'jsonp',
@ -35,7 +35,7 @@ var ActivitiRest = {
var processDefinitionDiagramLayout = data;
if (!processDefinitionDiagramLayout) {
console.error("Process definition diagram layout '" + processDefinitionId + "' not found");
return;
} else {
callback.apply({processDefinitionDiagramLayout: processDefinitionDiagramLayout});
}
@ -46,10 +46,10 @@ var ActivitiRest = {
console.log('Get diagram layout['+processDefinitionId+'] failure: ', textStatus, jqXHR);
});
},
getHighLights: function(processInstanceId, callback) {
var url = Lang.sub(this.options.processInstanceHighLightsUrl, {processInstanceId: processInstanceId});
$.ajax({
url: url,
dataType: 'jsonp',
@ -60,7 +60,7 @@ var ActivitiRest = {
var highLights = data;
if (!highLights) {
console.log("highLights not found");
return;
} else {
callback.apply({highLights: highLights});
}
@ -71,4 +71,4 @@ var ActivitiRest = {
console.log('Get HighLights['+processInstanceId+'] failure: ', textStatus, jqXHR);
});
}
};
};

144
epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/diagram-viewer/js/Polyline.js

@ -3,7 +3,7 @@
*
* @author Dmitry Farafonov
*/
var ANCHOR_TYPE= {
main: "main",
middle: "middle",
@ -12,11 +12,11 @@ var ANCHOR_TYPE= {
};
function Anchor(uuid, type, x, y) {
this.uuid = uuid;
this.x = x
this.y = y
this.uuid = uuid;
this.x = x;
this.y = y;
this.type = (type == ANCHOR_TYPE.middle) ? ANCHOR_TYPE.middle : ANCHOR_TYPE.main;
};
}
Anchor.prototype = {
uuid: null,
x: 0,
@ -37,21 +37,21 @@ function Polyline(uuid, points, strokeWidth) {
* {x: 650, y: 370}]; 4
*/
this.points = points;
/*
* path for graph
* [["M", x1, y1], ["L", x2, y2], ["C", ax, ay, bx, by, x3, y3], ["L", x3, y3]]
*/
this.path = [];
this.anchors = [];
if (strokeWidth) this.strokeWidth = strokeWidth;
this.closePath = false;
this.init();
};
}
Polyline.prototype = {
id: null,
@ -64,39 +64,39 @@ Polyline.prototype = {
element: null,
isDefaultConditionAvailable: false,
closePath: false,
init: function(points){
var linesCount = this.getLinesCount();
if (linesCount < 1)
return;
this.normalizeCoordinates();
// create anchors
this.pushAnchor(ANCHOR_TYPE.first, this.getLine(0).x1, this.getLine(0).y1);
for(var i = 1; i < linesCount; i++){
var line1 = this.getLine(i-1),
line2 = this.getLine(i);
//this.pushAnchor(ANCHOR_TYPE.middle, line1.x1 + line1.x2-line1.x1, line1.y1 + line1.y2-line1.y1);
this.pushAnchor(ANCHOR_TYPE.main, line1.x2, line1.y2);
//this.pushAnchor(ANCHOR_TYPE.middle, line2.x1 + line2.x2-line2.x1, line2.y1 + line2.y2-line2.y1);
}
this.pushAnchor(ANCHOR_TYPE.last, this.getLine(linesCount-1).x2, this.getLine(linesCount-1).y2);
this.rebuildPath();
},
normalizeCoordinates: function(){
for(var i=0; i < this.points.length; i++){
this.points[i].x = parseFloat(this.points[i].x);
this.points[i].y = parseFloat(this.points[i].y);
}
},
getLinesCount: function(){
return this.points.length-1;
},
@ -124,9 +124,9 @@ Polyline.prototype = {
var line = this.getLine(i);
return Math.sqrt(Math.pow(this.getLineLengthX(i), 2) + Math.pow(this.getLineLengthY(i), 2));
},
getAnchors: function(){
// âåðíóòü îòñîðòèðîâàííûé ìàññèâ
// ������� ��������������� ������
// ????
return this.anchors;
},
@ -144,7 +144,7 @@ Polyline.prototype = {
return count;
}
},
pushAnchor: function(type, x, y, index){
if (type == ANCHOR_TYPE.first) {
index = 0;
@ -155,7 +155,7 @@ Polyline.prototype = {
} else if (!index) {
index = this.anchors.length;
} else {
// ïåðåáðàòü anchors, ñäâèíóòü ïîçèöèþ äëÿ êàæäîãî, íà÷èíàÿ ñ index
// ��������� anchors, �������� ������� ��� �������, ������� � index
//var anchor = this.getAnchor()
for(var i=0; i < this.getAnchorsCount(); i++){
var anchor = this.anchors[i];
@ -165,22 +165,22 @@ Polyline.prototype = {
}
}
}
var anchor = new Anchor(this.id, ANCHOR_TYPE.main, x, y, index, typeIndex);
this.anchors.push(anchor);
},
getAnchor: function(position){
return this.anchors[position];
},
getAnchorByType: function(type, position){
if (type == ANCHOR_TYPE.first)
return this.anchors[0];
if (type == ANCHOR_TYPE.last)
return this.anchors[this.getAnchorsCount()-1];
for(var i=0; i < this.getAnchorsCount(); i++){
var anchor = this.anchors[i];
if (anchor.type == type) {
@ -190,9 +190,9 @@ Polyline.prototype = {
}
return null;
},
addNewPoint: function(position, x, y){
//
//
for(var i = 0; i < this.getLinesCount(); i++){
var line = this.getLine(i);
if (x > line.x1 && x < line.x2 && y > line.y1 && y < line.y2) {
@ -200,48 +200,48 @@ Polyline.prototype = {
break;
}
}
this.rebuildPath();
},
rebuildPath: function(){
var path = [];
for(var i = 0; i < this.getAnchorsCount(); i++){
var anchor = this.getAnchor(i);
var pathType = ""
var pathType = "";
if (i==0)
pathType = "M";
else
else
pathType = "L";
// TODO: save previous points and calculate new path just if points are updated, and then save currents values as previous
var targetX = anchor.x, targetY = anchor.y;
if (i>0 && i < this.getAnchorsCount()-1) {
// get new x,y
var cx = anchor.x, cy = anchor.y;
// pivot point of prev line
var AO = this.getLineLength(i-1);
if (AO < this.radius) {
AO = this.radius;
}
this.isDefaultConditionAvailable = (this.isDefaultConditionAvailable || (i == 1 && AO > 10));
//console.log("isDefaultConditionAvailable", this.isDefaultConditionAvailable);
var ED = this.getLineLengthY(i-1) * this.radius / AO;
var OD = this.getLineLengthX(i-1) * this.radius / AO;
targetX = anchor.x - OD;
targetY = anchor.y - ED;
if (AO < 2*this.radius && i>1) {
targetX = anchor.x - this.getLineLengthX(i-1)/2;
targetY = anchor.y - this.getLineLengthY(i-1)/2;;
targetY = anchor.y - this.getLineLengthY(i-1)/2;
}
// pivot point of next line
var AO = this.getLineLength(i);
if (AO < this.radius) {
@ -251,25 +251,25 @@ Polyline.prototype = {
var OD = this.getLineLengthX(i) * this.radius / AO;
var nextSrcX = anchor.x + OD;
var nextSrcY = anchor.y + ED;
if (AO < 2*this.radius && i<this.getAnchorsCount()-2) {
nextSrcX = anchor.x + this.getLineLengthX(i)/2;
nextSrcY = anchor.y + this.getLineLengthY(i)/2;;
nextSrcY = anchor.y + this.getLineLengthY(i)/2;
}
var dx0 = (cx - targetX) / 3,
dy0 = (cy - targetY) / 3,
ax = cx - dx0,
ay = cy - dy0,
dx1 = (cx - nextSrcX) / 3,
dy1 = (cy - nextSrcY) / 3,
bx = cx - dx1,
by = cy - dy1,
zx=nextSrcX, zy=nextSrcY;
if (this.showDetails) {
var c = ProcessDiagramCanvas.g.path("M"+targetX+","+targetY+"L"+ax+","+ay).attr({stroke: Color.get(255, 153, 51), "stroke-dasharray": "- "});
var c = ProcessDiagramCanvas.g.path("M"+nextSrcX+","+nextSrcY+"L"+bx+","+by).attr({stroke: Color.get(255, 153, 51), "stroke-dasharray": "- "});
@ -293,22 +293,22 @@ Polyline.prototype = {
targetX += 0.5;
targetY += 0.5;
}
path.push([pathType, targetX, targetY]);
if (i>0 && i < this.getAnchorsCount()-1) {
path.push(["C", ax, ay, bx, by, zx, zy]);
}
}
if (this.closePath) {
console.log("closePath:", this.closePath);
path.push(["Z"]);
}
this.path = path;
},
transform: function(transformation){
this.element.transform(transformation);
},
@ -328,20 +328,20 @@ function Polygone(points, strokeWidth) {
* {x: 650, y: 370}]; 4
*/
this.points = points;
/*
* path for graph
* [["M", x1, y1], ["L", x2, y2], ["C", ax, ay, bx, by, x3, y3], ["L", x3, y3]]
*/
this.path = [];
this.anchors = [];
if (strokeWidth) this.strokeWidth = strokeWidth;
this.closePath = true;
this.init();
};
}
/*
@ -358,30 +358,30 @@ Polygone.prototype.rebuildPath = function(){
//console.log("Polygone rebuildPath");
for(var i = 0; i < this.getAnchorsCount(); i++){
var anchor = this.getAnchor(i);
var pathType = ""
var pathType = "";
if (i==0)
pathType = "M";
else
else
pathType = "L";
var targetX = anchor.x, targetY = anchor.y;
// anti smoothing
if (this.strokeWidth%2 == 1) {
targetX += 0.5;
targetY += 0.5;
}
path.push([pathType, targetX, targetY]);
path.push([pathType, targetX, targetY]);
}
if (this.closePath)
path.push(["Z"]);
this.path = path;
};
/*
Polygone.prototype.transform = function(transformation){
this.element.transform(transformation);
};
*/
*/

874
epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/diagram-viewer/js/ProcessDiagramCanvas.js

File diff suppressed because it is too large

84
epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/diagram-viewer/js/jquery/jquery.js

@ -2479,7 +2479,7 @@ jQuery.extend({
if ( value === null ) {
jQuery.removeAttr( elem, name );
return;
} else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
return ret;
@ -3885,7 +3885,7 @@ var Sizzle = function( selector, context, results, seed ) {
if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
return [];
}
if ( !selector || typeof selector !== "string" ) {
return results;
}
@ -3895,7 +3895,7 @@ var Sizzle = function( selector, context, results, seed ) {
contextXML = Sizzle.isXML( context ),
parts = [],
soFar = selector;
// Reset the position of the chunker regexp (start from head)
do {
chunker.exec( "" );
@ -3903,9 +3903,9 @@ var Sizzle = function( selector, context, results, seed ) {
if ( m ) {
soFar = m[3];
parts.push( m[1] );
if ( m[2] ) {
extra = m[3];
break;
@ -3929,7 +3929,7 @@ var Sizzle = function( selector, context, results, seed ) {
if ( Expr.relative[ selector ] ) {
selector += parts.shift();
}
set = posProcess( selector, set, seed );
}
}
@ -4057,7 +4057,7 @@ Sizzle.find = function( expr, context, isXML ) {
for ( i = 0, len = Expr.order.length; i < len; i++ ) {
type = Expr.order[i];
if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
left = match[1];
match.splice( 1, 1 );
@ -4429,7 +4429,7 @@ var Expr = Sizzle.selectors = {
ATTR: function( match, curLoop, inplace, result, not, isXML ) {
var name = match[1] = match[1].replace( rBackslash, "" );
if ( !isXML && Expr.attrMap[name] ) {
match[1] = Expr.attrMap[name];
}
@ -4463,7 +4463,7 @@ var Expr = Sizzle.selectors = {
} else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
return true;
}
return match;
},
@ -4473,7 +4473,7 @@ var Expr = Sizzle.selectors = {
return match;
}
},
filters: {
enabled: function( elem ) {
return elem.disabled === false && elem.type !== "hidden";
@ -4486,14 +4486,14 @@ var Expr = Sizzle.selectors = {
checked: function( elem ) {
return elem.checked === true;
},
selected: function( elem ) {
// Accessing this property makes selected-by-default
// options in Safari work properly
if ( elem.parentNode ) {
elem.parentNode.selectedIndex;
}
return elem.selected === true;
},
@ -4515,7 +4515,7 @@ var Expr = Sizzle.selectors = {
text: function( elem ) {
var attr = elem.getAttribute( "type" ), type = elem.type;
// IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
// IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
// use getAttribute instead to test this case
return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null );
},
@ -4634,21 +4634,21 @@ var Expr = Sizzle.selectors = {
case "only":
case "first":
while ( (node = node.previousSibling) ) {
if ( node.nodeType === 1 ) {
return false;
if ( node.nodeType === 1 ) {
return false;
}
}
if ( type === "first" ) {
return true;
if ( type === "first" ) {
return true;
}
node = elem;
case "last":
while ( (node = node.nextSibling) ) {
if ( node.nodeType === 1 ) {
return false;
if ( node.nodeType === 1 ) {
return false;
}
}
@ -4661,22 +4661,22 @@ var Expr = Sizzle.selectors = {
if ( first === 1 && last === 0 ) {
return true;
}
doneName = match[0];
parent = elem.parentNode;
if ( parent && (parent[ expando ] !== doneName || !elem.nodeIndex) ) {
count = 0;
for ( node = parent.firstChild; node; node = node.nextSibling ) {
if ( node.nodeType === 1 ) {
node.nodeIndex = ++count;
}
}
}
parent[ expando ] = doneName;
}
diff = elem.nodeIndex - last;
if ( first === 0 ) {
@ -4695,7 +4695,7 @@ var Expr = Sizzle.selectors = {
TAG: function( elem, match ) {
return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match;
},
CLASS: function( elem, match ) {
return (" " + (elem.className || elem.getAttribute("class")) + " ")
.indexOf( match ) > -1;
@ -4765,7 +4765,7 @@ var makeArray = function( array, results ) {
results.push.apply( results, array );
return results;
}
return array;
};
@ -4997,7 +4997,7 @@ if ( document.querySelectorAll ) {
if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
return;
}
Sizzle = function( query, context, extra, seed ) {
context = context || document;
@ -5006,24 +5006,24 @@ if ( document.querySelectorAll ) {
if ( !seed && !Sizzle.isXML(context) ) {
// See if we find a selector to speed up
var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query );
if ( match && (context.nodeType === 1 || context.nodeType === 9) ) {
// Speed-up: Sizzle("TAG")
if ( match[1] ) {
return makeArray( context.getElementsByTagName( query ), extra );
// Speed-up: Sizzle(".CLASS")
} else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) {
return makeArray( context.getElementsByClassName( match[2] ), extra );
}
}
if ( context.nodeType === 9 ) {
// Speed-up: Sizzle("body")
// The body element only exists once, optimize finding it
if ( query === "body" && context.body ) {
return makeArray( [ context.body ], extra );
// Speed-up: Sizzle("#ID")
} else if ( match && match[3] ) {
var elem = context.getElementById( match[3] );
@ -5036,12 +5036,12 @@ if ( document.querySelectorAll ) {
if ( elem.id === match[3] ) {
return makeArray( [ elem ], extra );
}
} else {
return makeArray( [], extra );
}
}
try {
return makeArray( context.querySelectorAll(query), extra );
} catch(qsaError) {}
@ -5079,7 +5079,7 @@ if ( document.querySelectorAll ) {
}
}
}
return oldSizzle(query, context, extra, seed);
};
@ -5106,7 +5106,7 @@ if ( document.querySelectorAll ) {
// This should fail with an exception
// Gecko does not error, returns false instead
matches.call( document.documentElement, "[test!='']:sizzle" );
} catch( pseudoError ) {
pseudoWorks = true;
}
@ -5116,7 +5116,7 @@ if ( document.querySelectorAll ) {
expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
if ( !Sizzle.isXML( node ) ) {
try {
try {
if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {
var ret = matches.call( node, expr );
@ -5153,7 +5153,7 @@ if ( document.querySelectorAll ) {
if ( div.getElementsByClassName("e").length === 1 ) {
return;
}
Expr.order.splice(1, 0, "CLASS");
Expr.find.CLASS = function( match, context, isXML ) {
if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
@ -5204,7 +5204,7 @@ function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
if ( elem ) {
var match = false;
elem = elem[dir];
while ( elem ) {
@ -5257,7 +5257,7 @@ if ( document.documentElement.contains ) {
Sizzle.isXML = function( elem ) {
// documentElement is verified for cases where it doesn't yet exist
// (such as loading iframes in IE - #4833)
// (such as loading iframes in IE - #4833)
var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
return documentElement ? documentElement.nodeName !== "HTML" : false;
@ -5374,11 +5374,11 @@ jQuery.fn.extend({
},
is: function( selector ) {
return !!selector && (
return !!selector && (
typeof selector === "string" ?
// If this is a positional selector, check membership in the returned set
// so $("p:first").is("p:last") won't return true for a doc with two "p".
POS.test( selector ) ?
POS.test( selector ) ?
jQuery( selector, this.context ).index( this[0] ) >= 0 :
jQuery.filter( selector, this ).length > 0 :
this.filter( selector ).length > 0 );
@ -5386,7 +5386,7 @@ jQuery.fn.extend({
closest: function( selectors, context ) {
var ret = [], i, l, cur = this[0];
// Array (deprecated as of jQuery 1.7)
if ( jQuery.isArray( selectors ) ) {
var level = 1;

142
epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/diagram-viewer/js/textlayout.js

@ -2,12 +2,12 @@
var paper = Raphael("holder");
//var curve = paper.ellipse(100, 100, 1, 1).attr({"stroke-width": 0, fill: Color.red});
var text = "Betty Botter bought some butter but, she said, the butter's bitter. If I put it in my batter, it will make my batter bitter. But a bit of better butter will make my batter better. So, she bought a bit of butter, better than her bitter butter, and she put it in her batter, and the batter was not bitter. It was better Betty Botter bought a bit better butter.";
var font = {font: "11px Arial", "font-style":"italic", opacity: 1, "fill": LABEL_COLOR, stroke: LABEL_COLOR, "stroke-width":.3};
var font = {font: "11px Arial", opacity: 1, "fill": LABEL_COLOR};
var boxWidth = 100
var boxWidth = 100;
var AttributedStringIterator = function(text){
//this.text = this.rtrim(this.ltrim(text));
text = text.replace(/(\s)+/, " ");
@ -20,39 +20,39 @@
this.beginIndex = 0;
this.endIndex = this.text.length;
this.currentIndex = this.beginIndex;
//console.group("[AttributedStringIterator]");
var i = 0;
var string = this.text;
var fullPos = 0;
//console.log("string: \"" + string + "\", length: " + string.length);
this.startWordOffsets = [];
this.startWordOffsets.push(fullPos);
// TODO: remove i 1000
while (i<1000) {
var pos = string.search(/[ \t\n\f-\.\,]/);
if (pos == -1)
break;
// whitespace start
fullPos += pos;
string = string.substr(pos);
////console.log("fullPos: " + fullPos + ", pos: " + pos + ", string: ", string);
// remove whitespaces
var pos = string.search(/[^ \t\n\f-\.\,]/);
if (pos == -1)
break;
// whitespace end
fullPos += pos;
string = string.substr(pos);
////console.log("fullPos: " + fullPos);
this.startWordOffsets.push(fullPos);
i++;
}
//console.log("startWordOffsets: ", this.startWordOffsets);
@ -62,9 +62,9 @@
getEndIndex: function(pos){
if (typeof(pos) == "undefined")
return this.endIndex;
var string = this.text.substr(pos, this.endIndex - pos);
var posEndOfLine = string.search(/[\n]/);
if (posEndOfLine == -1)
return this.endIndex;
@ -77,13 +77,13 @@
isWhitespace: function(pos){
var str = this.text[pos];
var whitespaceChars = " \t\n\f";
return (whitespaceChars.indexOf(str) != -1);
},
isNewLine: function(pos){
var str = this.text[pos];
var whitespaceChars = "\n";
return (whitespaceChars.indexOf(str) != -1);
},
preceding: function(pos){
@ -117,7 +117,7 @@
ltrim: function(str){
var patt2=/^\s+/g;
return str.replace(patt2, "");
},
},
rtrim: function(str){
var patt2=/\s+$/g;
return str.replace(patt2, "");
@ -129,13 +129,13 @@
return this.text[pos];
}
};
/*
var TextMeasurer = function(paper, text, fontAttrs){
this.text = text;
this.paper = paper;
this.fontAttrs = fontAttrs;
this.fStart = this.text.getBeginIndex();
};
@ -147,21 +147,21 @@
}
}
*/
var LineBreakMeasurer = function(paper, text, fontAttrs){
this.paper = paper;
this.text = new AttributedStringIterator(text);
this.fontAttrs = fontAttrs;
if (this.text.getEndIndex() - this.text.getBeginIndex() < 1) {
throw {message: "Text must contain at least one character.", code: "IllegalArgumentException"};
}
//this.measurer = new TextMeasurer(paper, this.text, this.fontAttrs);
this.limit = this.text.getEndIndex();
this.pos = this.start = this.text.getBeginIndex();
this.rafaelTextObject = this.paper.text(100, 100, this.text.text).attr(fontAttrs).attr("text-anchor", "start");
this.svgTextObject = this.rafaelTextObject[0];
};
@ -173,11 +173,11 @@
if (offsetLimit <= this.pos) {
throw {message: "offsetLimit must be after current position", code: "IllegalArgumentException"};
}
var charAtMaxAdvance = this.getLineBreakIndex(this.pos, wrappingWidth);
//charAtMaxAdvance --;
//console.log("charAtMaxAdvance:", charAtMaxAdvance, ", [" + this.text.getCharAtPos(charAtMaxAdvance) + "]");
if (charAtMaxAdvance == this.limit) {
nextOffset = this.limit;
//console.log("charAtMaxAdvance == this.limit");
@ -199,7 +199,7 @@
}
*/
nextOffset = this.text.preceding(charAtMaxAdvance);
if (nextOffset <= this.pos) {
nextOffset = Math.max(this.pos+1, charAtMaxAdvance);
}
@ -224,15 +224,15 @@
}
var result = this.text.getLayout(this.pos, layoutLimit);
//console.log("layout: \"" + result + "\"");
// remove end of line
//var posEndOfLine = this.text.getEndIndex(this.pos);
//if (posEndOfLine < result.length)
// result = result.substr(0, posEndOfLine);
this.pos = layoutLimit;
//console.groupEnd();
return result;
} else {
@ -243,9 +243,9 @@
getLineBreakIndex: function(pos, wrappingWidth) {
//console.group("[getLineBreakIndex]");
//console.log("pos:"+pos + ", text: \""+ this.text.text.replace(/\n/g, "_").substr(pos, 1) + "\"");
var bb = this.rafaelTextObject.getBBox();
var charNum = -1;
try {
var svgPoint = this.svgTextObject.getStartPositionOfChar(pos);
@ -253,9 +253,9 @@
svgPoint.x = svgPoint.x + wrappingWidth;
//svgPoint.y = bb.y;
//console.log("svgPoint:", svgPoint);
//var dot = this.paper.ellipse(svgPoint.x, svgPoint.y, 1, 1).attr({"stroke-width": 0, fill: Color.red});
charNum = this.svgTextObject.getCharNumAtPosition(svgPoint);
} catch (e){
console.warn("getStartPositionOfChar error, pos:" + pos);
@ -276,47 +276,47 @@
if (newLineIndex < charNum ) {
console.log("newLineIndex <= charNum, newLineIndex:"+newLineIndex+", charNum:"+charNum, "\"" + this.text.text.substr(newLineIndex+1).replace(/\n/g, "↵") + "\"");
//console.groupEnd();
return newLineIndex;
}
//var charAtMaxAdvance = this.text.text.substring(charNum, charNum + 1);
var charAtMaxAdvance = this.text.getCharAtPos(charNum);
//console.log("!!charAtMaxAdvance: " + charAtMaxAdvance);
//console.groupEnd();
return charNum;
}
},
},
getPosition: function() {
return this.pos;
}
};
// ******
function drawMultilineText(text, x, y, boxWidth, boxHeight, options) {
var TEXT_PADDING = 3;
var width = boxWidth - (2 * TEXT_PADDING);
if (boxHeight)
var height = boxHeight - (2 * TEXT_PADDING);
var layouts = [];
var measurer = new LineBreakMeasurer(paper, text, font);
var lineHeight = measurer.rafaelTextObject.getBBox().height;
console.log("text: ", text.replace(/\n/g, "↵"));
if (height) {
var availableLinesCount = parseInt(height/lineHeight);
console.log("availableLinesCount: " + availableLinesCount);
}
var i = 1;
while (measurer.getPosition() < measurer.text.getEndIndex()) {
var layout = measurer.nextLayout(width);
//console.log("LAYOUT: " + layout + ", getPosition: " + measurer.getPosition());
if (layout != null) {
if (!availableLinesCount || i < availableLinesCount) {
layouts.push(layout);
@ -326,15 +326,15 @@
}
}
i++;
};
}
console.log(layouts);
measurer.rafaelTextObject.attr({"text": layouts.join("\n")});
//measurer.rafaelTextObject.attr({"text-anchor": "end"});
//measurer.rafaelTextObject.attr({"text-anchor": "middle"});
if (options)
measurer.rafaelTextObject.attr({"text-anchor": options["text-anchor"]});
var bb = measurer.rafaelTextObject.getBBox();
//measurer.rafaelTextObject.attr({"x": x + boxWidth/2});
if (options["vertical-align"] == "top")
@ -342,21 +342,21 @@
else
measurer.rafaelTextObject.attr({"y": y + height/2});
//var bb = measurer.rafaelTextObject.getBBox();
if (measurer.rafaelTextObject.attr("text-anchor") == "middle" )
measurer.rafaelTextObject.attr("x", x + boxWidth/2 + TEXT_PADDING/2);
else if (measurer.rafaelTextObject.attr("text-anchor") == "end" )
measurer.rafaelTextObject.attr("x", x + boxWidth + TEXT_PADDING/2);
else
else
measurer.rafaelTextObject.attr("x", x + boxWidth/2 - bb.width/2 + TEXT_PADDING/2);
var boxStyle = {stroke: Color.LightSteelBlue2, "stroke-width": 1.0, "stroke-dasharray": "- "};
/*
var box = paper.rect(x+.0 + boxWidth/2 - bb.width/2+ TEXT_PADDING/2, y + .5 + boxHeight/2 - bb.height/2, width, height).attr(boxStyle);
box.attr("height", bb.height);
*/
//var box = paper.rect(bb.x - .5 + bb.width/2 + TEXT_PADDING, bb.y + bb.height/2, bb.width, bb.height).attr(boxStyle);
var textAreaCX = x + boxWidth/2;
var textAreaCY = y + height/2;
var dotLeftTop = paper.ellipse(x, y, 3, 3).attr({"stroke-width": 0, fill: Color.LightSteelBlue, stroke: "none"});
@ -370,52 +370,52 @@
var boxStyle = {stroke: Color.LightSteelBlue2, "stroke-width": 1.0, "stroke-dasharray": "- "};
var rect = paper.rect(x+.5, y + .5, boxWidth, boxHeight).attr(boxStyle);
}
/*
for (var i=0; i<1; i++) {
var t = text;
//var t = "Высококвалифицирова";
var text = paper.text(300, 100, t).attr(font).attr("text-anchor", "start");
var bbText = text.getBBox();
paper.rect(300+.5, 100 + .5, bbText.width, bbText.height).attr({"stroke-width": 1});
console.log("t: ", t.replace(/\n/g, "↵"));
while (measurer.getPosition() < measurer.text.getEndIndex()) {
var layout = measurer.nextLayout(width);
//console.log("LAYOUT: " + layout + ", getPosition: " + measurer.getPosition());
if (layout != null)
layouts.push(layout);
};
measurer.rafaelTextObject.attr("text", layouts.join("\n"));
var bb = measurer.rafaelTextObject.getBBox();
var rect = paper.rect(bb.x+.5, bb.y + .5, bb.width, bb.height).attr({"stroke-width": 1});
lay.push(layouts);
console.log(layouts);
}
*/
var fitTextToWidth = function(original, width) {
var text = original;
// TODO: move attr on parameters
var attr = {font: "11px Arial", opacity: 0};
// remove length for "..."
var dots = paper.text(0, 0, "...").attr(attr).hide();
var dotsBB = dots.getBBox();
var maxWidth = width - dotsBB.width;
var textElement = paper.text(0, 0, text).attr(attr).hide();
var bb = textElement.getBBox();
// it's a little bit incorrect with "..."
while (bb.width > maxWidth && text.length > 0) {
text = text.substring(0, text.length - 1);
@ -425,17 +425,17 @@
// remove element from paper
textElement.remove();
if (text != original) {
text = text + "...";
}
return text;
}
};
var x=100, y=90, height=20;
var options = {"text-anchor": "middle", "boxHeight": 150, "vertical-align": "top"};
var options = {"boxHeight": 150, "vertical-align": "top"};
drawMultilineText(text, x, y, 150, 100, options);
};
};

6
epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/editor-app/editor-utils.js

@ -1,7 +1,7 @@
/*
* Activiti Modeler component part of the Activiti project
* Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@ -69,7 +69,7 @@ EDITOR.UTIL = {
visitedElementsArray.push(element.id);
var property = element.properties[propertyType]
var property = element.properties[propertyType];
if (property) {
collectedProperties.push(property);
}
@ -132,4 +132,4 @@ EDITOR.UTIL = {
}
}
};
};

14
epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/editor-app/editor/i18n/translation_de.js

@ -1,6 +1,6 @@
/**
* @author nicolas.peters
*
*
* Contains all strings for German language.
* Version 1 - 08/29/08
*/
@ -110,7 +110,7 @@ ORYX.I18N.jPDLSupport.impDesc = "jPDL Datei importieren";
ORYX.I18N.jPDLSupport.impFailedReq = "Anfrage für den Import der jPDL Datei ist fehlgeschlagen.";
ORYX.I18N.jPDLSupport.impFailedJson = "Transformation der jPDL Datei ist fehlgeschlagen.";
ORYX.I18N.jPDLSupport.impFailedJsonAbort = "Import abgebrochen.";
ORYX.I18N.jPDLSupport.loadSseQuestionTitle = "Stencil Set Erweiterung für jBPM muss geladen werden";
ORYX.I18N.jPDLSupport.loadSseQuestionTitle = "Stencil Set Erweiterung für jBPM muss geladen werden";
ORYX.I18N.jPDLSupport.loadSseQuestionBody = "Um jPDL importieren zu können, muss die Stencil Set Erweiterung für jBPM geladen werden. Möchten Sie fortfahren?";
ORYX.I18N.jPDLSupport.expFailedReq = "Anfrage für den Export des Models ist fehlgeschlagen.";
ORYX.I18N.jPDLSupport.expFailedXml = "Export nach jPDL ist fehlgeschlagen. Exporter meldet: ";
@ -230,8 +230,8 @@ ORYX.I18N.Save.dialogLabelType = "Typ";
ORYX.I18N.Save.dialogLabelComment = "Revisionskommentar";
if(!ORYX.I18N.Perspective) ORYX.I18N.Perspective = {};
ORYX.I18N.Perspective.no = "Keine Perspektive"
ORYX.I18N.Perspective.noTip = "Zurücksetzen der aktuellen Perspektive"
ORYX.I18N.Perspective.no = "Keine Perspektive";
ORYX.I18N.Perspective.noTip = "Zurücksetzen der aktuellen Perspektive";
/** New Language Properties: 21.04.2009 */
ORYX.I18N.JSONSupport = {
@ -257,7 +257,7 @@ ORYX.I18N.JSONSupport = {
if(!ORYX.I18N.JSONImport) ORYX.I18N.JSONImport = {};
ORYX.I18N.JSONImport.title = "JSON Import";
ORYX.I18N.JSONImport.wrongSS = "Das Stencil Set der importierten Datei ({0}) entspricht nicht dem geladenen Stencil Set ({1})."
ORYX.I18N.JSONImport.wrongSS = "Das Stencil Set der importierten Datei ({0}) entspricht nicht dem geladenen Stencil Set ({1}).";
/** New Language Properties: 14.05.2009 */
if(!ORYX.I18N.RDFExport) ORYX.I18N.RDFExport = {};
@ -306,7 +306,7 @@ ORYX.I18N.SyntaxChecker.EPC_FUNCTION_AFTER_FUNCTION = "Auf eine Funktion darf k
ORYX.I18N.SyntaxChecker.EPC_EVENT_AFTER_EVENT = "Auf ein Ereignis darf kein Ereignis folgen.";
ORYX.I18N.SyntaxChecker.EPC_PI_AFTER_FUNCTION = "Auf eine Funktion darf keine Prozessschnittstelle folgen.";
ORYX.I18N.SyntaxChecker.EPC_FUNCTION_AFTER_PI = "Auf eine Prozessschnittstelle darf keine Funktion folgen.";
ORYX.I18N.SyntaxChecker.EPC_SOURCE_EQUALS_TARGET = "Eine Kante muss zwei verschiedene Knoten verbinden."
ORYX.I18N.SyntaxChecker.EPC_SOURCE_EQUALS_TARGET = "Eine Kante muss zwei verschiedene Knoten verbinden.";
if(!ORYX.I18N.SyntaxChecker.PetriNet) ORYX.I18N.SyntaxChecker.PetriNet={};
ORYX.I18N.SyntaxChecker.PetriNet_NOT_BIPARTITE = "Der Graph ist nicht bepartit.";
@ -375,7 +375,7 @@ ORYX.I18N.SyntaxChecker.BPMN_MESSAGE_FLOW_NOT_ALLOWED = "Ein Nachrichtenfluss is
/** New Language Properties 27.11.2009 */
ORYX.I18N.SyntaxChecker.BPMN2_EVENT_BASED_WITH_TOO_LESS_INCOMING_SEQUENCE_FLOWS = "Ein Ereignis-basiertes Gateway, dass nicht instanziierend ist, muss mindestens einen eingehenden Kontrollfluss besitzen.";
ORYX.I18N.SyntaxChecker.BPMN2_TOO_FEW_INITIATING_PARTICIPANTS = "Eine Choreographie-Aktivität musst genau einen initiierenden Teilnehmer (weiß) besitzen.";
ORYX.I18N.SyntaxChecker.BPMN2_TOO_MANY_INITIATING_PARTICIPANTS = "Eine Choreographie-Aktivität darf nicht mehr als einen initiierenden Teilnehmer (weiß) besitzen."
ORYX.I18N.SyntaxChecker.BPMN2_TOO_MANY_INITIATING_PARTICIPANTS = "Eine Choreographie-Aktivität darf nicht mehr als einen initiierenden Teilnehmer (weiß) besitzen.";
ORYX.I18N.SyntaxChecker.COMMUNICATION_AT_LEAST_TWO_PARTICIPANTS = "Die Kommunikation oder Sub-Konversation muss mit mindestens zwei Teilnehmern verbunden sein.";
ORYX.I18N.SyntaxChecker.MESSAGEFLOW_START_MUST_BE_PARTICIPANT = "Die Nachrichtenflussquelle muss ein Teilnehmer sein.";

14
epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/editor-app/editor/i18n/translation_en_us.js

@ -1,6 +1,6 @@
/**
* @author nicolas.peters
*
*
* Contains all strings for the default language (en-us).
* Version 1 - 08/29/08
*/
@ -112,7 +112,7 @@ ORYX.I18N.jPDLSupport.impDesc = "Import jPDL File";
ORYX.I18N.jPDLSupport.impFailedReq = "Request for import of jPDL failed.";
ORYX.I18N.jPDLSupport.impFailedJson = "Transformation of jPDL failed.";
ORYX.I18N.jPDLSupport.impFailedJsonAbort = "Import aborted.";
ORYX.I18N.jPDLSupport.loadSseQuestionTitle = "jBPM stencil set extension needs to be loaded";
ORYX.I18N.jPDLSupport.loadSseQuestionTitle = "jBPM stencil set extension needs to be loaded";
ORYX.I18N.jPDLSupport.loadSseQuestionBody = "In order to import jPDL, the stencil set extension has to be loaded. Do you want to proceed?";
ORYX.I18N.jPDLSupport.expFailedReq = "Request for export of model failed.";
ORYX.I18N.jPDLSupport.expFailedXml = "Export to jPDL failed. Exporter reported: ";
@ -270,8 +270,8 @@ ORYX.I18N.Save.dialogLabelType = "Type";
ORYX.I18N.Save.dialogLabelComment = "Revision comment";
if(!ORYX.I18N.Perspective) ORYX.I18N.Perspective = {};
ORYX.I18N.Perspective.no = "No Perspective"
ORYX.I18N.Perspective.noTip = "Unload the current perspective"
ORYX.I18N.Perspective.no = "No Perspective";
ORYX.I18N.Perspective.noTip = "Unload the current perspective";
/** New Language Properties: 21.04.2009 */
ORYX.I18N.JSONSupport = {
@ -297,7 +297,7 @@ ORYX.I18N.JSONSupport = {
if(!ORYX.I18N.JSONImport) ORYX.I18N.JSONImport = {};
ORYX.I18N.JSONImport.title = "JSON Import";
ORYX.I18N.JSONImport.wrongSS = "The stencil set of the imported file ({0}) does not match to the loaded stencil set ({1})."
ORYX.I18N.JSONImport.wrongSS = "The stencil set of the imported file ({0}) does not match to the loaded stencil set ({1}).";
/** New Language Properties: 14.05.2009 */
if(!ORYX.I18N.RDFExport) ORYX.I18N.RDFExport = {};
@ -346,7 +346,7 @@ ORYX.I18N.SyntaxChecker.EPC_FUNCTION_AFTER_FUNCTION = "There must be no functio
ORYX.I18N.SyntaxChecker.EPC_EVENT_AFTER_EVENT = "There must be no event after an event.";
ORYX.I18N.SyntaxChecker.EPC_PI_AFTER_FUNCTION = "There must be no process interface after a function.";
ORYX.I18N.SyntaxChecker.EPC_FUNCTION_AFTER_PI = "There must be no function after a process interface.";
ORYX.I18N.SyntaxChecker.EPC_SOURCE_EQUALS_TARGET = "Edge must connect two distinct nodes."
ORYX.I18N.SyntaxChecker.EPC_SOURCE_EQUALS_TARGET = "Edge must connect two distinct nodes.";
if(!ORYX.I18N.SyntaxChecker.PetriNet) ORYX.I18N.SyntaxChecker.PetriNet={};
ORYX.I18N.SyntaxChecker.PetriNet_NOT_BIPARTITE = "The graph is not bipartite";
@ -415,7 +415,7 @@ ORYX.I18N.SyntaxChecker.BPMN_MESSAGE_FLOW_NOT_ALLOWED = "A Message Flow is not a
/** New Language Properties 27.11.2009 */
ORYX.I18N.SyntaxChecker.BPMN2_EVENT_BASED_WITH_TOO_LESS_INCOMING_SEQUENCE_FLOWS = "An Event-based Gateway that is not instantiating must have a minimum of one incoming Sequence Flow.";
ORYX.I18N.SyntaxChecker.BPMN2_TOO_FEW_INITIATING_PARTICIPANTS = "A Choreography Activity must have one initiating Participant (white).";
ORYX.I18N.SyntaxChecker.BPMN2_TOO_MANY_INITIATING_PARTICIPANTS = "A Choreography Acitivity must not have more than one initiating Participant (white)."
ORYX.I18N.SyntaxChecker.BPMN2_TOO_MANY_INITIATING_PARTICIPANTS = "A Choreography Acitivity must not have more than one initiating Participant (white).";
ORYX.I18N.SyntaxChecker.COMMUNICATION_AT_LEAST_TWO_PARTICIPANTS = "The communication must be connected to at least two participants.";
ORYX.I18N.SyntaxChecker.MESSAGEFLOW_START_MUST_BE_PARTICIPANT = "The message flow's source must be a participant.";

6
epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/editor-app/editor/i18n/translation_signavio_de.js

@ -2,7 +2,7 @@ Ext.PagingToolbar.prototype.firstText = "Erste Seite";
Ext.PagingToolbar.prototype.prevText = "Vorherige Seite";
Ext.PagingToolbar.prototype.nextText = "Nächste Seite";
Ext.PagingToolbar.prototype.lastText = "Letzte Seite";
ORYX.I18N.PropertyWindow.dateFormat = "d.m.y";
@ -32,7 +32,7 @@ ORYX.I18N.Save.saveAsDesc = "Kopie speichern...";
ORYX.I18N.Save.saveAsTitle = "Kopie speichern...";
ORYX.I18N.Save.savedAs = "Kopie gespeichert";
ORYX.I18N.Save.savedDescription = "Das kopierte Diagramm ist unter folgendem Link gespeichert";
ORYX.I18N.Save.notAuthorized = "Sie sind derzeit nicht angemeldet. Bitte melden Sie sich in einem <a href='/p/login' target='_blank'>neuen Fenstern</a> an, damit Sie diese Model speichern können."
ORYX.I18N.Save.notAuthorized = "Sie sind derzeit nicht angemeldet. Bitte melden Sie sich in einem <a href='/p/login' target='_blank'>neuen Fenstern</a> an, damit Sie diese Model speichern können.";
ORYX.I18N.Save.transAborted = "Die Anfrage zum Speichern Ihres Diagramms hat zu lange gedauert. Bitte benutzen Sie eine schnellere Internetverbindung. Wenn Sie eine kabellose Internetverbindung benutzen, dann überprüfen Sie bitte die Signalstärke.";
ORYX.I18N.Save.noRights = "Sie haben nicht die benötigten Rechte, um das Diagramm abzuspeichern. Bitte überprüfen Sie im <a href='/p/explorer' target='_blank'>Signavio Explorer</a>, ob Sie noch die benötigten Rechte im Zielordner besitzen.";
ORYX.I18N.Save.comFailed = "Die Kommunikation mit dem Signavio Server ist fehlgeschlagen. Bitte überprüfen Sie Ihre Internetverbindung. Wenn das Problem weiterhin besteht, wenden Sie sich bitte an den Signavio Support über das Briefumschlagssymbol in der Toolbar.";
@ -103,4 +103,4 @@ Signavio.I18N.btn.moveDown = "Nach unten";
if(!Signavio.I18N.field) {Signavio.I18N.field = {};}
Signavio.I18N.field.Url = "URL";
Signavio.I18N.field.UrlLabel = "Label";
Signavio.I18N.field.UrlLabel = "Label";

2
epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/editor-app/editor/i18n/translation_signavio_en_us.js

@ -18,7 +18,7 @@ ORYX.I18N.Save.saveAsDesc = "Save a copy...";
ORYX.I18N.Save.saveAsTitle = "Save a copy...";
ORYX.I18N.Save.savedAs = "Copy saved";
ORYX.I18N.Save.savedDescription = "The process diagram is stored under";
ORYX.I18N.Save.notAuthorized = "You are currently not logged in. Please <a href='/p/login' target='_blank'>log in</a> in a new window so that you can save the current diagram."
ORYX.I18N.Save.notAuthorized = "You are currently not logged in. Please <a href='/p/login' target='_blank'>log in</a> in a new window so that you can save the current diagram.";
ORYX.I18N.Save.transAborted = "The saving request took too long. You may use a faster internet connection. If you use wireless LAN, please check the strength of your connection.";
ORYX.I18N.Save.noRights = "You do not have the required rights to store that model. Please check in the <a href='/p/explorer' target='_blank'>Signavio Explorer</a>, if you still have the rights to write in the target directory.";
ORYX.I18N.Save.comFailed = "The communication with the Signavio server failed. Please check your internet connection. If the problem resides, please contact the Signavio Support via the envelope symbol in the toolbar.";

8538
epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/editor-app/editor/oryx.debug.js

File diff suppressed because it is too large

1146
epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/editor-app/libs/bootstrap_3.1.1/js/bootstrap.js

File diff suppressed because it is too large

6
epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/editor-app/libs/es5-shim-15.3.4.5/es5-sham.js

@ -66,11 +66,11 @@ function doesGetOwnPropertyDescriptorWork(object) {
//check whether getOwnPropertyDescriptor works if it's given. Otherwise,
//shim partially.
if (Object.defineProperty) {
var getOwnPropertyDescriptorWorksOnObject =
var getOwnPropertyDescriptorWorksOnObject =
doesGetOwnPropertyDescriptorWork({});
var getOwnPropertyDescriptorWorksOnDom = typeof document == "undefined" ||
doesGetOwnPropertyDescriptorWork(document.createElement("div"));
if (!getOwnPropertyDescriptorWorksOnDom ||
if (!getOwnPropertyDescriptorWorksOnDom ||
!getOwnPropertyDescriptorWorksOnObject
) {
var getOwnPropertyDescriptorFallback = Object.getOwnPropertyDescriptor;
@ -263,7 +263,7 @@ if (Object.defineProperty) {
if (!Object.defineProperty || definePropertyFallback) {
var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: ";
var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "
var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: ";
var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
"on this javascript engine";

2
epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/editor-app/libs/es5-shim-15.3.4.5/es5-shim.js

@ -813,7 +813,7 @@ if (!Date.parse || "Date.parse is buggy") {
return date;
}
return NativeDate.apply(this, arguments);
};
}
// 15.9.1.15 Date Time String Format.
var isoDateExpression = new RegExp("^" +

8
epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/editor-app/libs/es5-shim-15.3.4.5/tests/helpers/h-matchers.js

@ -5,7 +5,7 @@ beforeEach(function() {
l, i,
key,
actual = this.actual;
var getKeys = function(o) {
var a = [];
for(key in o) {
@ -14,10 +14,10 @@ beforeEach(function() {
}
}
return a;
}
};
a1 = getKeys(actual);
a2 = getKeys(expected);
l = a1.length;
if(l !== a2.length) {
return false;
@ -27,7 +27,7 @@ beforeEach(function() {
expect(key).toEqual(a2[i]);
expect(actual[key]).toEqual(expected[key]);
}
return true;
}
})

4
epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/editor-app/libs/jquery.autogrow-textarea.js

@ -50,7 +50,7 @@
shadow.css('width', $self.width());
shadow.html(val + (noFlickerPad === 0 ? '...' : '')); // Append '...' to resize pre-emptively.
$self.height(Math.max(shadow.height() + noFlickerPad, minHeight));
}
};
$self.change(update).keyup(update).keydown({event:'keydown'},update);
$(window).resize(update);
@ -58,4 +58,4 @@
update();
});
};
})(jQuery);
})(jQuery);

4
epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/editor-app/libs/json3_3.2.6/lib/json3.js

@ -71,8 +71,8 @@
stringify(0) === "0" &&
// FF 3.1b1, b2, and JSON 2 serialize wrapped primitives as object
// literals.
stringify(new Number()) === "0" &&
stringify(new String()) == '""' &&
stringify(Number()) === "0" &&
stringify(String()) == '""' &&
// FF 3.1b1, 2 throw an error if the value is `null`, `undefined`, or
// does not define a canonical JSON representation (this applies to
// objects with `toJSON` properties as well, *unless* they are nested

6
epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/editor-app/libs/path_parser.js

@ -12,10 +12,10 @@ Svg.VERSION=1.0;
Svg.NAMESPACE="http://www.w3.org/2000/svg";
function Svg(){}
PathParser.PARAMCOUNT={A:7,C:6,H:1,L:2,M:2,Q:4,S:4,T:2,V:1,Z:0};
PathParser.METHODNAME={A:"arcAbs",a:"arcRel",C:"curvetoCubicAbs",c:"curvetoCubicRel",H:"linetoHorizontalAbs",h:"linetoHorizontalRel",L:"linetoAbs",l:"linetoRel",M:"movetoAbs",m:"movetoRel",Q:"curvetoQuadraticAbs",q:"curvetoQuadraticRel",S:"curvetoCubicSmoothAbs",s:"curvetoCubicSmoothRel",T:"curvetoQuadraticSmoothAbs",t:"curvetoQuadraticSmoothRel",V:"linetoVerticalAbs",v:"linetoVerticalRel",Z:"closePath",z:"closePath"}
PathParser.METHODNAME={A:"arcAbs",a:"arcRel",C:"curvetoCubicAbs",c:"curvetoCubicRel",H:"linetoHorizontalAbs",h:"linetoHorizontalRel",L:"linetoAbs",l:"linetoRel",M:"movetoAbs",m:"movetoRel",Q:"curvetoQuadraticAbs",q:"curvetoQuadraticRel",S:"curvetoCubicSmoothAbs",s:"curvetoCubicSmoothRel",T:"curvetoQuadraticSmoothAbs",t:"curvetoQuadraticSmoothRel",V:"linetoVerticalAbs",v:"linetoVerticalRel",Z:"closePath",z:"closePath"};
function PathParser(){this._lexer=new PathLexer();this._handler=null;}
PathParser.prototype.parsePath=function(path){if(path==null||path.namespaceURI!=Svg.NAMESPACE||path.localName!="path")throw new Error("PathParser.parsePath: The first parameter must be an SVG path element");this.parseData(path.getAttributeNS(null,"d"));};
PathParser.prototype.parseData=function(pathData){if(typeof(pathData)!="string")throw new Error("PathParser.parseData: The first parameter must be a string");if(this._handler!=null&&this._handler.beginParse!=null)this._handler.beginParse();var lexer=this._lexer;lexer.setPathData(pathData);var mode="BOP";var token=lexer.getNextToken();while(!token.typeis(PathToken.EOD)){var param_count;var params=new Array();switch(token.type){case PathToken.COMMAND:if(mode=="BOP"&&token.text!="M"&&token.text!="m")throw new Error("PathParser.parseData: a path must begin with a moveto command");mode=token.text;param_count=PathParser.PARAMCOUNT[token.text.toUpperCase()];token=lexer.getNextToken();break;case PathToken.NUMBER:break;default:throw new Error("PathParser.parseData: unrecognized token type: "+token.type);}for(var i=0;i<param_count;i++){switch(token.type){case PathToken.COMMAND:throw new Error("PathParser.parseData: parameter must be a number: "+token.text);case PathToken.NUMBER:params[i]=token.text-0;break;default:throw new Errot("PathParser.parseData: unrecognized token type: "+token.type);}token=lexer.getNextToken();}if(this._handler!=null){var handler=this._handler;var method=PathParser.METHODNAME[mode];if(handler[method]!=null)handler[method].apply(handler,params);}if(mode=="M")mode="L";if(mode=="m")mode="l";}};
PathParser.prototype.parseData=function(pathData){if(typeof(pathData)!="string")throw new Error("PathParser.parseData: The first parameter must be a string");if(this._handler!=null&&this._handler.beginParse!=null)this._handler.beginParse();var lexer=this._lexer;lexer.setPathData(pathData);var mode="BOP";var token=lexer.getNextToken();while(!token.typeis(PathToken.EOD)){var param_count;var params=[];switch(token.type){case PathToken.COMMAND:if(mode=="BOP"&&token.text!="M"&&token.text!="m")throw new Error("PathParser.parseData: a path must begin with a moveto command");mode=token.text;param_count=PathParser.PARAMCOUNT[token.text.toUpperCase()];token=lexer.getNextToken();break;case PathToken.NUMBER:break;default:throw new Error("PathParser.parseData: unrecognized token type: "+token.type);}for(var i=0;i<param_count;i++){switch(token.type){case PathToken.COMMAND:throw new Error("PathParser.parseData: parameter must be a number: "+token.text);case PathToken.NUMBER:params[i]=token.text-0;break;default:throw new Errot("PathParser.parseData: unrecognized token type: "+token.type);}token=lexer.getNextToken();}if(this._handler!=null){var handler=this._handler;var method=PathParser.METHODNAME[mode];if(handler[method]!=null)handler[method].apply(handler,params);}if(mode=="M")mode="L";if(mode=="m")mode="l";}};
PathParser.prototype.setHandler=function(handler){this._handler=handler;};
PathLexer.VERSION=1.0;
function PathLexer(pathData){if(pathData==null)pathData="";this.setPathData(pathData);}
@ -27,4 +27,4 @@ PathToken.NUMBER=2;
PathToken.EOD=3;
function PathToken(type,text){if(arguments.length>0){this.init(type,text);}}
PathToken.prototype.init=function(type,text){this.type=type;this.text=text;};
PathToken.prototype.typeis=function(type){return this.type==type;}
PathToken.prototype.typeis=function(type){return this.type==type;};

74
epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/public/editor-app/libs/prototype-1.5.1.js

@ -29,7 +29,7 @@ var Prototype = {
emptyFunction: function() { },
K: function(x) { return x }
}
};
var Class = {
create: function() {
@ -37,16 +37,16 @@ var Class = {
this.initialize.apply(this, arguments);
}
}
}
};
var Abstract = new Object();
var Abstract = {};
Object.extend = function(destination, source) {
for (var property in source) {
destination[property] = source[property];
}
return destination;
}
};
Object.extend(Object, {
inspect: function(object) {
@ -104,14 +104,14 @@ Function.prototype.bind = function() {
return function() {
return __method.apply(object, args.concat($A(arguments)));
}
}
};
Function.prototype.bindAsEventListener = function(object) {
var __method = this, args = $A(arguments), object = args.shift();
return function(event) {
return __method.apply(object, [event || window.event].concat(args));
}
}
};
Object.extend(Number.prototype, {
toColorPart: function() {
@ -160,7 +160,7 @@ var Try = {
return returnValue;
}
}
};
/*--------------------------------------------------------------------------*/
@ -194,7 +194,7 @@ PeriodicalExecuter.prototype = {
}
}
}
}
};
Object.extend(String, {
interpret: function(value) {
return value == null ? '' : String(value);
@ -408,7 +408,7 @@ String.prototype.gsub.prepareReplacement = function(replacement) {
if (typeof replacement == 'function') return replacement;
var template = new Template(replacement);
return function(match) { return template.evaluate(match) };
}
};
String.prototype.parseQuery = String.prototype.toQueryParams;
@ -434,7 +434,7 @@ Template.prototype = {
return before + String.interpret(object[match[3]]);
});
}
}
};
var $break = {}, $continue = new Error('"throw $continue" is deprecated, use "return" instead');
@ -446,7 +446,7 @@ var Enumerable = {
iterator(value, index++);
});
} catch (e) {
if (e != $break)
if (e != $break)
throw e;
}
return this;
@ -511,7 +511,7 @@ var Enumerable = {
var stringValue = value.toString();
if (stringValue.match(pattern))
results.push((iterator || Prototype.K)(value, index));
})
});
return results;
},
@ -625,7 +625,7 @@ var Enumerable = {
inspect: function() {
return '#<Enumerable:' + this.toArray().inspect() + '>';
}
}
};
Object.extend(Enumerable, {
map: Enumerable.collect,
@ -644,7 +644,7 @@ var $A = Array.from = function(iterable) {
results.push(iterable[i]);
return results;
}
}
};
if (Prototype.Browser.WebKit) {
$A = Array.from = function(iterable) {
@ -811,7 +811,7 @@ Hash.toQueryString.addPair = function(key, value, prefix) {
key = encodeURIComponent(key);
if (value === undefined) this.push(key);
else this.push(key + '=' + (value == null ? '' : encodeURIComponent(value)));
}
};
Object.extend(Hash.prototype, Enumerable);
Object.extend(Hash.prototype, {
@ -876,7 +876,7 @@ Object.extend(Hash.prototype, {
function $H(object) {
if (object instanceof Hash) return object;
return new Hash(object);
};
}
// Safari iterates over shadowed properties
if (function() {
@ -924,7 +924,7 @@ Object.extend(ObjectRange.prototype, {
var $R = function(start, end, exclusive) {
return new ObjectRange(start, end, exclusive);
}
};
var Ajax = {
getTransport: function() {
@ -936,7 +936,7 @@ var Ajax = {
},
activeRequestCount: 0
}
};
Ajax.Responders = {
responders: [],
@ -985,14 +985,14 @@ Ajax.Base.prototype = {
contentType: 'application/x-www-form-urlencoded',
encoding: 'UTF-8',
parameters: ''
}
};
Object.extend(this.options, options || {});
this.options.method = this.options.method.toLowerCase();
if (typeof this.options.parameters == 'string')
this.options.parameters = this.options.parameters.toQueryParams();
}
}
};
Ajax.Request = Class.create();
Ajax.Request.Events =
@ -1167,7 +1167,7 @@ Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), {
this.container = {
success: (container.success || container),
failure: (container.failure || (container.success ? null : container))
}
};
this.transport = Ajax.getTransport();
this.setOptions(options);
@ -1585,7 +1585,7 @@ Element.Methods = {
var elementStyle = element.style;
for (var property in styles)
if (property == 'opacity') element.setOpacity(styles[property])
if (property == 'opacity') element.setOpacity(styles[property]);
else
elementStyle[(property == 'float' || property == 'cssFloat') ?
(elementStyle.styleFloat === undefined ? 'cssFloat' : 'styleFloat') :
@ -1919,7 +1919,7 @@ var Toggle = { display: Element.toggle };
Abstract.Insertion = function(adjacency) {
this.adjacency = adjacency;
}
};
Abstract.Insertion.prototype = {
initialize: function(element, content) {
@ -1951,9 +1951,9 @@ Abstract.Insertion.prototype = {
div.innerHTML = '<table><tbody>' + this.content + '</tbody></table>';
return $A(div.childNodes[0].childNodes[0].childNodes);
}
}
};
var Insertion = new Object();
var Insertion = {};
Insertion.Before = Class.create();
Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), {
@ -2713,7 +2713,7 @@ Form.Methods = {
return new Ajax.Request(form.readAttribute('action'), options);
}
}
};
/*--------------------------------------------------------------------------*/
@ -2727,7 +2727,7 @@ Form.Element = {
$(element).select();
return element;
}
}
};
Form.Element.Methods = {
serialize: function(element) {
@ -2781,7 +2781,7 @@ Form.Element.Methods = {
element.disabled = false;
return element;
}
}
};
/*--------------------------------------------------------------------------*/
@ -2834,11 +2834,11 @@ Form.Element.Serializers = {
// extend element because hasAttribute may not be native
return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text;
}
}
};
/*--------------------------------------------------------------------------*/
Abstract.TimedObserver = function() {}
Abstract.TimedObserver = function() {};
Abstract.TimedObserver.prototype = {
initialize: function(element, frequency, callback) {
this.frequency = frequency;
@ -2862,7 +2862,7 @@ Abstract.TimedObserver.prototype = {
this.lastValue = value;
}
}
}
};
Form.Element.Observer = Class.create();
Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {
@ -2880,7 +2880,7 @@ Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {
/*--------------------------------------------------------------------------*/
Abstract.EventObserver = function() {}
Abstract.EventObserver = function() {};
Abstract.EventObserver.prototype = {
initialize: function(element, callback) {
this.element = $(element);
@ -2918,7 +2918,7 @@ Abstract.EventObserver.prototype = {
}
}
}
}
};
Form.Element.EventObserver = Class.create();
Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {
@ -2934,7 +2934,7 @@ Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {
}
});
if (!window.Event) {
var Event = new Object();
var Event = {};
}
Object.extend(Event, {
@ -3181,7 +3181,7 @@ var Position = {
setHeight: true,
offsetTop: 0,
offsetLeft: 0
}, arguments[2] || {})
}, arguments[2] || {});
// find page position of source
source = $(source);
@ -3248,7 +3248,7 @@ var Position = {
element.style.height = element._originalHeight;
element.style.width = element._originalWidth;
}
}
};
// Safari returns margins on body which is incorrect if the child is absolutely
// positioned. For performance reasons, redefine Position.cumulativeOffset for
@ -3269,4 +3269,4 @@ if (Prototype.Browser.WebKit) {
}
}
Element.addMethods();
Element.addMethods();

27
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/ShowApiUtil.java

@ -11,6 +11,7 @@ import org.slf4j.LoggerFactory;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.URL;
import java.nio.charset.StandardCharsets;
/**
* @Description 万维易源-api工具类
@ -19,13 +20,13 @@ import java.net.URL;
*/
public class ShowApiUtil {
private static Logger logger = LoggerFactory.getLogger(ShowApiUtil.class);
/**
* @return com.epmet.result.showapi.ShowApiResult
* @param day 输入格式yyyyMMdd如果不输入则默认是当天
* @Author yinzuomei
* @Description 2020年我国节假日查询
* @Date 2020/5/11 21:20
* @Date 2020/5/11 21:20
**/
public static DayDetailResultDTO queryHolidayV2020(String day) throws Exception {
String url=String.format(ShowApiConstant.QUERY_HOLIDAY_V2020,ShowApiConstant.SHOWAPI_APPID,ShowApiConstant.SHOWAPI_SIGN,day);
@ -34,7 +35,7 @@ public class ShowApiUtil {
InputStream in = u.openStream();
ByteArrayOutputStream out = new ByteArrayOutputStream();
try {
byte buf[] = new byte[1024];
byte[] buf = new byte[1024];
int read = 0;
while ((read = in .read(buf)) > 0) {
out.write(buf, 0, read);
@ -44,15 +45,15 @@ public class ShowApiUtil {
in .close();
}
}
byte b[] = out.toByteArray();
String resultStr=new String(b, "utf-8");
byte[] b = out.toByteArray();
String resultStr=new String(b, StandardCharsets.UTF_8);
logger.info(String.format("(2)QUERY_HOLIDAY_V2020返参:%s",resultStr));
JSONObject jsonobject = JSONObject.parseObject(resultStr);
ShowApiResult showApiResult= (ShowApiResult)JSONObject.toJavaObject(jsonobject, ShowApiResult.class);
ShowApiResult showApiResult= JSONObject.toJavaObject(jsonobject, ShowApiResult.class);
logger.info(showApiResult.toString());
JSONObject holidayJsonObject = JSONObject.parseObject(showApiResult.getShowapi_res_body());
DayDetailResultDTO dayDetailResultDTO= (DayDetailResultDTO)JSONObject.toJavaObject(holidayJsonObject, DayDetailResultDTO.class);
DayDetailResultDTO dayDetailResultDTO= JSONObject.toJavaObject(holidayJsonObject, DayDetailResultDTO.class);
logger.info(String.format("(3)QUERY_HOLIDAY_V2020返参:%s",dayDetailResultDTO.toString()));
return dayDetailResultDTO;
}
@ -63,7 +64,7 @@ public class ShowApiUtil {
* @param year
* @Author yinzuomei
* @Description 根据年份查询当年的节假日列表
* @Date 2020/5/11 22:58
* @Date 2020/5/11 22:58
**/
public static HolidayResultDTO holidayList(String year) throws Exception {
String url=String.format(ShowApiConstant.HOLIDAY_LIST,ShowApiConstant.SHOWAPI_APPID,ShowApiConstant.SHOWAPI_SIGN,year);
@ -72,7 +73,7 @@ public class ShowApiUtil {
InputStream in = u.openStream();
ByteArrayOutputStream out = new ByteArrayOutputStream();
try {
byte buf[] = new byte[1024];
byte[] buf = new byte[1024];
int read = 0;
while ((read = in .read(buf)) > 0) {
out.write(buf, 0, read);
@ -82,15 +83,15 @@ public class ShowApiUtil {
in .close();
}
}
byte b[] = out.toByteArray();
String resultStr=new String(b, "utf-8");
byte[] b = out.toByteArray();
String resultStr=new String(b, StandardCharsets.UTF_8);
logger.info(String.format("(2)HOLIDAY_LIST返参:%s",resultStr));
JSONObject jsonobject = JSONObject.parseObject(resultStr);
ShowApiResult showApiResult= (ShowApiResult)JSONObject.toJavaObject(jsonobject, ShowApiResult.class);
ShowApiResult showApiResult= JSONObject.toJavaObject(jsonobject, ShowApiResult.class);
logger.info(showApiResult.toString());
JSONObject holidayJsonObject = JSONObject.parseObject(showApiResult.getShowapi_res_body());
HolidayResultDTO holidayResultDTO= (HolidayResultDTO)JSONObject.toJavaObject(holidayJsonObject, HolidayResultDTO.class);
HolidayResultDTO holidayResultDTO= JSONObject.toJavaObject(holidayJsonObject, HolidayResultDTO.class);
logger.info(String.format("(3)HOLIDAY_LIST返参:%s",holidayResultDTO.toString()));
return holidayResultDTO;
}

5
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppAuthProcessor.java

@ -49,10 +49,7 @@ public abstract class ExtAppAuthProcessor {
*/
protected boolean validTimeStamp(Long timestamp) {
long now = System.currentTimeMillis();
if (Math.abs(now - timestamp) > diffMillins) {
return false;
}
return true;
return Math.abs(now - timestamp) <= diffMillins;
}
/**

7
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java

@ -560,7 +560,7 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
//服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit;
res.setServiceShowName(serviceTypeMap.containsKey(res.getServiceType()) ? res.getServiceName().concat("(").concat(serviceTypeMap.get(res.getServiceType())).concat(")") : StrConstant.EPMETY_STR);
res.setServiceShowFlag(StringUtils.isNotBlank(res.getServerId())?true:false);
res.setServiceShowFlag(StringUtils.isNotBlank(res.getServerId()));
}
return res;
}
@ -771,7 +771,7 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
res.setStatusName(statusMap.containsKey(res.getStatus())?statusMap.get(res.getStatus()):StrConstant.EPMETY_STR);
//服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit;
res.setServiceShowName(serviceTypeMap.containsKey(res.getServiceType())?res.getServiceName().concat("(").concat(serviceTypeMap.get(res.getServiceType())).concat(")"):StrConstant.EPMETY_STR);
res.setServiceShowFlag(StringUtils.isNotBlank(res.getServerId())?true:false);
res.setServiceShowFlag(StringUtils.isNotBlank(res.getServerId()));
}
}
return new PageData<>(list, total);
@ -1443,4 +1443,5 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
messageOpenFeignClient.saveUserMessage(userMessage);
}
}
}
}

4
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/email/EmailUtils.java

@ -110,7 +110,7 @@ public class EmailUtils {
sysMailLogService.save(templateId, config.getUsername(), to, cc, template.getSubject(), content, status);
return status == Constant.SUCCESS ? true : false;
return status == Constant.SUCCESS;
}
/**
@ -175,7 +175,7 @@ public class EmailUtils {
sysMailLogService.save(null, config.getUsername(), to, cc, subject, content, status);
return status == Constant.SUCCESS ? true : false;
return status == Constant.SUCCESS;
}
}

6
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/InfoServiceImpl.java

@ -323,7 +323,7 @@ public class InfoServiceImpl extends BaseServiceImpl<InfoDao, InfoEntity> implem
Set<String> members=new LinkedHashSet<String>();
members.addAll(formDTO.getStaffIdList());
members.addAll(orgStaffIds);
if(CollectionUtils.isNotEmpty(members)&&members.contains(formDTO.getUserId())){
if(CollectionUtils.isNotEmpty(members)){
members.remove(formDTO.getUserId());
}
if(CollectionUtils.isEmpty(members)){
@ -485,7 +485,7 @@ public class InfoServiceImpl extends BaseServiceImpl<InfoDao, InfoEntity> implem
Set<String> members = new LinkedHashSet<>(CollectionUtils.size(staffIdList) + orgStaffIds.size());
members.addAll(staffIdList);
members.addAll(orgStaffIds);
if (CollectionUtils.isNotEmpty(members) && members.contains(operatorId)) {
if (CollectionUtils.isNotEmpty(members)) {
members.remove(operatorId);
}
if (CollectionUtils.isEmpty(members)) {
@ -526,4 +526,4 @@ public class InfoServiceImpl extends BaseServiceImpl<InfoDao, InfoEntity> implem
}
return groupEntity;
}
}
}

2
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/SysSmsServiceImpl.java

@ -248,7 +248,7 @@ public class SysSmsServiceImpl extends BaseServiceImpl<SysSmsDao, SysSmsEntity>
groupByCustomer.forEach((customerId,v) -> {
parameterResult.forEach(p -> {
if (customerId.equals(p.getCustomerId())){
p.setBalanceStatus(Integer.valueOf(p.getParameterValue()) >= v.size() ? true : false);
p.setBalanceStatus(Integer.valueOf(p.getParameterValue()) >= v.size());
p.setSubtractParameterValue(String.valueOf(Integer.valueOf(p.getParameterValue()) - v.size()));
}
});

6
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java

@ -387,14 +387,14 @@ public class WxmpMessageServiceImpl implements WxmpMessageService {
if (workTemplate.getTid().equals(msg.getBehaviorType())){
templateId = workTemplate.getTemplateId();
break;
};
}
}
} else if (WxmpMessageConstant.RESI.equals(msg.getClientType())&& resiTemplates.size() > NumConstant.ZERO) {
for (TemplateListV2ResultDTO resiTemplate : resiTemplates) {
if (resiTemplate.getTid().equals(msg.getBehaviorType())){
templateId = resiTemplate.getTemplateId();
break;
};
}
}
}else {
throw new WxSubscribeException("获取模板id失败", "", openId);
@ -532,7 +532,7 @@ public class WxmpMessageServiceImpl implements WxmpMessageService {
} else if (WxmpMessageConstant.GOV_DB.equals(clientType)) {
StaffBasicInfoFormDTO staffBasicInfoFormDTO = new StaffBasicInfoFormDTO();
staffBasicInfoFormDTO.setStaffId(userId);
Result<StaffBasicInfo> staffBasicInfo = epmetUserOpenFeignClient.getStaffBasicInfo(staffBasicInfoFormDTO);;
Result<StaffBasicInfo> staffBasicInfo = epmetUserOpenFeignClient.getStaffBasicInfo(staffBasicInfoFormDTO);
if (staffBasicInfo.getCode() != 0){
throw new Exception(staffBasicInfo.getInternalMsg());
}else {

4
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/redis/PointRedis.java

@ -20,7 +20,7 @@ public class PointRedis {
public void lpush(String userId , PointExchangeResponseResultDTO verificationResult){
redisUtils.leftPush(RedisKeys.getPointVerificationResultKey(userId),verificationResult,redisUtils.MINUTE_TEN_EXPIRE);
redisUtils.leftPush(RedisKeys.getPointVerificationResultKey(userId),verificationResult, RedisUtils.MINUTE_TEN_EXPIRE);
}
public Object lindex(String userId,Long index){
return redisUtils.lindex(RedisKeys.getPointVerificationResultKey(userId),index);
@ -31,7 +31,7 @@ public class PointRedis {
}
public String checkIfQrCodeExpire(String shortId){
String userId = (String)redisUtils.getString(RedisKeys.getShortUserIdKey(shortId));
String userId = redisUtils.getString(RedisKeys.getShortUserIdKey(shortId));
return userId;
}
}

6
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointRuleServiceImpl.java

@ -135,7 +135,7 @@ public class PointRuleServiceImpl extends BaseServiceImpl<PointRuleDao, PointRul
log.error("list ruleId:{} have not pointUnit or pointNum,pointRule:{}", JSON.toJSONString(pointRuleEntity));
return null;
}
resultDTO.setEnabledFlag(NumConstant.ONE_STR.equals(pointRuleEntity.getEnabledFlag()) ? true : false);
resultDTO.setEnabledFlag(NumConstant.ONE_STR.equals(pointRuleEntity.getEnabledFlag()));
resultDTO.setPointValue(pointRuleEntity.getPoint().toString().concat("分").concat(StrConstant.SEPARATOR).concat(pointUnitEnum.getDesc()));
return resultDTO;
}).filter(fun -> fun != null).collect(Collectors.toList());
@ -150,7 +150,7 @@ public class PointRuleServiceImpl extends BaseServiceImpl<PointRuleDao, PointRul
}
PointDetailResultDTO resultDTO = ConvertUtils.sourceToTarget(pointRuleEntity, PointDetailResultDTO.class);
resultDTO.setRuleId(pointRuleEntity.getId());
resultDTO.setEnabledFlag(NumConstant.ONE_STR.equals(pointRuleEntity.getEnabledFlag()) ? true : false);
resultDTO.setEnabledFlag(NumConstant.ONE_STR.equals(pointRuleEntity.getEnabledFlag()));
resultDTO.setPointUnitDesc(PointUnitEnum.getEnum(pointRuleEntity.getPointUnit()).getDesc());
return resultDTO;
}
@ -205,7 +205,7 @@ public class PointRuleServiceImpl extends BaseServiceImpl<PointRuleDao, PointRul
SendMqMsgUtil.build().openFeignClient(epmetMessageOpenFeignClient).sendPointRuleChangedMqMsg(msg);
}
}
/**
* @Description 变更处理
* @Param f

4
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointVerificationLogServiceImpl.java

@ -423,10 +423,10 @@ public class PointVerificationLogServiceImpl extends BaseServiceImpl<PointVerifi
cal.set(Calendar.DAY_OF_MONTH, last);
LocalDateTime localDateTime = LocalDateTime.ofInstant(Instant.ofEpochMilli(cal.getTimeInMillis()), ZoneId.systemDefault());;
LocalDateTime localDateTime = LocalDateTime.ofInstant(Instant.ofEpochMilli(cal.getTimeInMillis()), ZoneId.systemDefault());
LocalDateTime endOfDay = localDateTime.with(LocalTime.MAX);
return Date.from(endOfDay.atZone(ZoneId.systemDefault()).toInstant());
}
}
}

11
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java

@ -50,10 +50,7 @@ public abstract class ApiService<R> {
public boolean isRegistered(String customerId, String platformId) {
ThirdplatformCustomerRegisterDao tpcRegDao = SpringContextUtils.getBean(ThirdplatformCustomerRegisterDao.class);
ThirdplatformCustomerRegisterEntity tpcReg = tpcRegDao.getByCustomerIdAndPlatformId(customerId, platformId);
if (tpcReg == null) {
return false;
}
return true;
return tpcReg != null;
}
/**
@ -196,7 +193,7 @@ public abstract class ApiService<R> {
if (queryParams == null || queryParams.size() == 0) {
return "";
}
StringBuilder sb = new StringBuilder("");
StringBuilder sb = new StringBuilder();
queryParams.entrySet().forEach(entry -> {
String key = entry.getKey();
String value = entry.getValue();
@ -420,7 +417,7 @@ public abstract class ApiService<R> {
*/
public void pushComponentAccessToken(ComponentAccessTokenFormDTO form, String platformId, String platformKey) {}
/**
* @description 推送小程序token
*
@ -431,5 +428,5 @@ public abstract class ApiService<R> {
* @author wxz
* @date 2021.08.31 20:26:51
*/
public void pushAuthorizerAccessToken(AuthorizerAccessTokenFormDTO form, String platformId, String platformKey) {};
public void pushAuthorizerAccessToken(AuthorizerAccessTokenFormDTO form, String platformId, String platformKey) {}
}

5
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/mpaes/AesDecryptUtil.java

@ -9,6 +9,7 @@ import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
/**
@ -16,7 +17,7 @@ import java.util.Arrays;
*/
public class AesDecryptUtil {
private static Charset CHARSET = Charset.forName("utf-8");
private static Charset CHARSET = StandardCharsets.UTF_8;
private Cipher decCipher;
/**
@ -93,4 +94,4 @@ public class AesDecryptUtil {
return xmlContent;
}
}
}

15
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/mpaes/PKCS7Encoder.java

@ -1,6 +1,6 @@
/**
* 对公众平台发送给公众账号的消息加解密示例代码.
*
*
* @copyright Copyright (c) 1998-2014 Tencent Inc.
*/
@ -9,18 +9,19 @@
package com.epmet.mpaes;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
/**
* 提供基于PKCS7算法的加解密接口.
*/
class PKCS7Encoder {
static Charset CHARSET = Charset.forName("utf-8");
static Charset CHARSET = StandardCharsets.UTF_8;
static int BLOCK_SIZE = 32;
/**
* 获得对明文进行补位填充的字节.
*
*
* @param count 需要进行填充补位操作的明文字节个数
* @return 补齐用的字节数组
*/
@ -32,7 +33,7 @@ class PKCS7Encoder {
}
// 获得补位所用的字符
char padChr = chr(amountToPad);
String tmp = new String();
String tmp = "";
for (int index = 0; index < amountToPad; index++) {
tmp += padChr;
}
@ -41,12 +42,12 @@ class PKCS7Encoder {
/**
* 删除解密后明文的补位字符
*
*
* @param decrypted 解密后的明文
* @return 删除补位字符后的明文
*/
static byte[] decode(byte[] decrypted) {
int pad = (int) decrypted[decrypted.length - 1];
int pad = decrypted[decrypted.length - 1];
if (pad < 1 || pad > 32) {
pad = 0;
}
@ -55,7 +56,7 @@ class PKCS7Encoder {
/**
* 将数字转化成ASCII码对应的字符用于对明文进行补码
*
*
* @param a 需要转化的数字
* @return 转化得到的字符
*/

23
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/mpaes/WXBizMsgCrypt.java

@ -1,6 +1,6 @@
/**
* 对公众平台发送给公众账号的消息加解密示例代码.
*
*
* @copyright Copyright (c) 1998-2014 Tencent Inc.
*/
@ -21,6 +21,7 @@ import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.Random;
@ -40,7 +41,7 @@ import java.util.Random;
* </ol>
*/
public class WXBizMsgCrypt {
static Charset CHARSET = Charset.forName("utf-8");
static Charset CHARSET = StandardCharsets.UTF_8;
Base64 base64 = new Base64();
byte[] aesKey;
String token;
@ -51,7 +52,7 @@ public class WXBizMsgCrypt {
* @param token 公众平台上开发者设置的token
* @param encodingAesKey 公众平台上开发者设置的EncodingAESKey
* @param appId 公众平台appid
*
*
* @throws AesException 执行失败请查看该异常的错误码和具体的错误信息
*/
public WXBizMsgCrypt(String token, String encodingAesKey, String appId) throws AesException {
@ -98,7 +99,7 @@ public class WXBizMsgCrypt {
/**
* 对明文进行加密.
*
*
* @param text 需要加密的明文
* @return 加密后base64编码的字符串
* @throws AesException aes加密失败
@ -145,7 +146,7 @@ public class WXBizMsgCrypt {
/**
* 对密文进行解密.
*
*
* @param text 需要解密的密文
* @return 解密得到的明文
* @throws AesException aes解密失败
@ -202,11 +203,11 @@ public class WXBizMsgCrypt {
* <li>生成安全签名</li>
* <li>将消息密文和安全签名打包成xml格式</li>
* </ol>
*
*
* @param replyMsg 公众平台待回复用户的消息xml格式的字符串
* @param timeStamp 时间戳可以自己生成也可以用URL参数的timestamp
* @param nonce 随机串可以自己生成也可以用URL参数的nonce
*
*
* @return 加密后的可以直接回复用户的密文包括msg_signature, timestamp, nonce, encrypt的xml格式的字符串
* @throws AesException 执行失败请查看该异常的错误码和具体的错误信息
*/
@ -234,12 +235,12 @@ public class WXBizMsgCrypt {
* <li>若验证通过则提取xml中的加密消息</li>
* <li>对消息进行解密</li>
* </ol>
*
*
* @param msgSignature 签名串对应URL参数的msg_signature
* @param timeStamp 时间戳对应URL参数的timestamp
* @param nonce 随机串对应URL参数的nonce
* @param postData 密文对应POST请求的数据
*
*
* @return 解密后的原文
* @throws AesException 执行失败请查看该异常的错误码和具体的错误信息
*/
@ -264,7 +265,7 @@ public class WXBizMsgCrypt {
* @param timeStamp 时间戳对应URL参数的timestamp
* @param nonce 随机串对应URL参数的nonce
* @param echoStr 随机串对应URL参数的echostr
*
*
* @return 解密之后的echostr
* @throws AesException 执行失败请查看该异常的错误码和具体的错误信息
*/
@ -280,4 +281,4 @@ public class WXBizMsgCrypt {
return result;
}
}
}

2
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/mpaes/WXXmlToMapUtil.java

@ -51,7 +51,7 @@ public class WXXmlToMapUtil {
Map<String, String> data = new HashMap<>();
DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
InputStream stream = new ByteArrayInputStream(xml.getBytes("UTF-8"));
InputStream stream = new ByteArrayInputStream(xml.getBytes(StandardCharsets.UTF_8));
org.w3c.dom.Document doc = documentBuilder.parse(stream);
doc.getDocumentElement().normalize();
NodeList nodeList = doc.getDocumentElement().getChildNodes();

2
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ComponentVerifyTicketService.java

@ -49,6 +49,6 @@ public interface ComponentVerifyTicketService {
*/
void redirectUri(TokenDto tokenDto, @RequestBody AuthCodeAndTimeFromDTO fromDTO);
public void pushComponentAccessToken2PrivateEpmetPlatforms(ComponentAccessTokenFormDTO input);
void pushComponentAccessToken2PrivateEpmetPlatforms(ComponentAccessTokenFormDTO input);
}

2
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/result/WxResult.java

@ -38,6 +38,6 @@ public class WxResult<T> implements Serializable {
}
public boolean success(){
return errorCode == 0 ? true : false;
return errorCode == 0;
}
}

2
epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/config/PermissionInitializer.java

@ -29,7 +29,7 @@ public class PermissionInitializer {
ArrayList<OperationEntity> operations2Update = new ArrayList<>();
// 1.收集需要添加的
List<RequirePermissionEnum> permEnums = Arrays.asList(RequirePermissionEnum.values());
RequirePermissionEnum[] permEnums = RequirePermissionEnum.values();
for (RequirePermissionEnum perm : permEnums) {
String key = perm.getKey();
if (!existsOpesMap.containsKey(key)) {

2
epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/AccessConfigServiceImpl.java

@ -219,7 +219,7 @@ public class AccessConfigServiceImpl implements AccessConfigService {
if (!rolesResult.success()) {
String msg = "调用user服务,根据key查询角色列表失败";
throw new RenException(EpmetErrorCode.USER_LIST_ROLES_BY_KEY_FAIL.getCode(), msg, msg,
RenException.MessageMode.CODE_INTERNAL_EXTERNAL.CODE_INTERNAL_EXTERNAL);
RenException.MessageMode.CODE_INTERNAL_EXTERNAL);
}
List<GovStaffRoleResultDTO> rolesOfAllCustomer = rolesResult.getData();

5
epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/AccessServiceImpl.java

@ -102,10 +102,7 @@ public class AccessServiceImpl implements AccessService {
operationKeys.addAll(opeAndScopes.stream().map(opeAndScope -> opeAndScope.getOperationKey()).collect(Collectors.toSet()));
});
if (operationKeys.contains(operationKey)) {
return true;
}
return false;
return operationKeys.contains(operationKey);
}
@Override

2
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java

@ -371,5 +371,5 @@ public interface GovIssueOpenFeignClient {
* @Author yinzuomei
**/
@PostMapping(value = "/gov/issue/issueprojectcategorydict/getcategorylist")
public Result<List<IssueProjectCategoryDictDTO>> getCategoryList(@RequestBody IssueProjectCategoryDictListFormDTO formDTO);
Result<List<IssueProjectCategoryDictDTO>> getCategoryList(@RequestBody IssueProjectCategoryDictListFormDTO formDTO);
}

10
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java

@ -104,7 +104,7 @@ public class IssueProjectTagDictRedis {
IssueProjectCategoryDictEntity otherCategory = categoryDictDao.selectSingleByCustomerIdAndCategoryNameAndCategoryType(customerId, ModuleConstants.CATEGORY_NAME_OTHERS, null);
//是否传入的类别Id中只包含"其他"分类,因为自定义分类和默认分类排序规则不一样
//判断入参是否是只有一个分类Id并且是"其他"的Id
boolean ifOtherOnly = null == otherCategory ? false : (!CollectionUtils.isEmpty(category) && category.size() == NumConstant.ONE && category.contains(otherCategory.getId()) ? true : false);
boolean ifOtherOnly = null != otherCategory && (!CollectionUtils.isEmpty(category) && category.size() == NumConstant.ONE && category.contains(otherCategory.getId()));
Map<String,List<IssueCategoryTagResultDTO>> result = new HashMap<>();
//传入的categories不会只包含"其他"这个分类,因为情况下ifOtherOnly为true,直接传入null
@ -117,7 +117,7 @@ public class IssueProjectTagDictRedis {
//如果keys集合为空,说明缓存中没有当前客户的标签排行信息,直接进行补偿
Set<ZSetOperations.TypedTuple<Object>> customizedTuples = redisUtils.zReverseRangeWithScores(GovIssueRedisKeys.getGovernmentTagKey(customerId, ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME), NumConstant.ZERO_L, (long) (NumConstant.ONE_NEG));
Set<ZSetOperations.TypedTuple<Object>> customizedTuples = redisUtils.zReverseRangeWithScores(GovIssueRedisKeys.getGovernmentTagKey(customerId, ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME), NumConstant.ZERO_L, NumConstant.ONE_NEG);
if(!CollectionUtils.isEmpty(customizedTuples)){
Map<Double, List<IssueCategoryTagResultDTO>> customizedHeatMap = new HashMap<>();
customizedTuples.forEach(tuple -> {
@ -181,7 +181,7 @@ public class IssueProjectTagDictRedis {
}
IssueProjectCategoryDictEntity otherCategory = categoryDictDao.selectSingleByCustomerIdAndCategoryNameAndCategoryType(customerId, ModuleConstants.CATEGORY_NAME_OTHERS, null);
boolean ifOtherOnly = null == otherCategory ? false : (!CollectionUtils.isEmpty(category) && category.size() == NumConstant.ONE && category.contains(otherCategory.getId()) ? true : false);
boolean ifOtherOnly = null != otherCategory && (!CollectionUtils.isEmpty(category) && category.size() == NumConstant.ONE && category.contains(otherCategory.getId()));
Set<String> keys;
if (CollectionUtils.isEmpty(category) || ifOtherOnly)
keys = redisUtils.keys(GovIssueRedisKeys.getGovernmentTagKey(customerId, null));
@ -223,7 +223,7 @@ public class IssueProjectTagDictRedis {
result.put(ModuleConstants.DEFAULT_TAG_CATEGORY_NAME, defaultResult);
}
Set<ZSetOperations.TypedTuple<Object>> customizedTuples = redisUtils.zReverseRangeWithScores(GovIssueRedisKeys.getGovernmentTagKey(customerId, null), NumConstant.ZERO_L, (long) (NumConstant.ONE_NEG));
Set<ZSetOperations.TypedTuple<Object>> customizedTuples = redisUtils.zReverseRangeWithScores(GovIssueRedisKeys.getGovernmentTagKey(customerId, null), NumConstant.ZERO_L, NumConstant.ONE_NEG);
if(!CollectionUtils.isEmpty(customizedTuples)){
Map<Double, List<IssueCategoryTagResultDTO>> customizedHeatMap = new HashMap<>();
customizedTuples.forEach(tuple -> {
@ -457,7 +457,7 @@ public class IssueProjectTagDictRedis {
String key = GovIssueRedisKeys.getGovernmentTagKey(customerId, cid);
Set<ZSetOperations.TypedTuple<Object>> tagTuples =
redisUtils.zReverseRangeWithScores(key, NumConstant.ZERO_L, (long) (NumConstant.ONE_NEG));
redisUtils.zReverseRangeWithScores(key, NumConstant.ZERO_L, NumConstant.ONE_NEG);
if(!CollectionUtils.isEmpty(tagTuples)){
Map<Double, Set<IssueCategoryTagResultDTO>> heatMap = new HashMap<>();

3
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java

@ -357,8 +357,7 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
boolean isStaffAudition = null != param.getAudition();
//1.查询该客户下是否开启议题审核
//为了防止当工作人员审核时,议题审核开关被关闭,这时统一视为审核开启,将工作端的审核动作继续进行
boolean ifOpen = isStaffAudition ? true :
!StringUtils.equals(ModuleConstants.AUDIT_SWITCH_CLOSE,configurationParameterService.checkIssueAuditSwitchIfOpen(param.getCustomerId()));
boolean ifOpen = isStaffAudition || !StringUtils.equals(ModuleConstants.AUDIT_SWITCH_CLOSE, configurationParameterService.checkIssueAuditSwitchIfOpen(param.getCustomerId()));
//初始化缺省状态 : 审核中
String defaultStatusUnderAuditing = isStaffAudition ? param.getAudition().getActionType() :

2
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/SubjectArticleListFormDTO.java

@ -17,7 +17,7 @@ public class SubjectArticleListFormDTO implements Serializable {
private static final long serialVersionUID = 7657974985102791998L;
public interface SubjectArticleListForm extends CustomerClientShowGroup{};
public interface SubjectArticleListForm extends CustomerClientShowGroup{}
@NotBlank(message = "网格ID不能为空",groups = SubjectArticleListForm.class)
private String gridId;

2
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java

@ -1048,7 +1048,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
if (textSyncScanResult != null) {
SyncScanResult textSyncScanResultData = textSyncScanResult.getData();
if (textSyncScanResult.success()) {
result.setAllPass(result.isAllPass() ? textSyncScanResultData.isAllPass() : false);
result.setAllPass(result.isAllPass() && textSyncScanResultData.isAllPass());
result.getSuccessDataIds().addAll(textSyncScanResultData.getSuccessDataIds());
result.getFailDataIds().addAll(textSyncScanResultData.getFailDataIds());
}

2
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/SpecialSubjectServiceImpl.java

@ -222,7 +222,7 @@ public class SpecialSubjectServiceImpl extends BaseServiceImpl<SpecialSubjectDao
notList = currentOrgList.stream().map(WorkSpecialSubjectResultDTO::getTagId).distinct().collect(Collectors.toList());
}
if (!NumConstant.ZERO_STR.equals(formDTO.getPids())) {
List<String> pidList = Arrays.asList(formDTO.getPids().split(StrConstant.COLON));
String[] pidList = formDTO.getPids().split(StrConstant.COLON);
for (String pid : pidList) {
if(CollectionUtils.isNotEmpty(resultDTOList)){
List<String> parentAddList=resultDTOList.stream().map(WorkSpecialSubjectResultDTO::getTagId).distinct().collect(Collectors.toList());

4
epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerRelationServiceImpl.java

@ -163,11 +163,11 @@ public class CustomerRelationServiceImpl extends BaseServiceImpl<CustomerRelatio
CustomerDTO data = customerService.get(customerId);
if (null != data) {
data.setSubCustomerIds(baseDao.selectAllSubCustomerIds(customerId));
data.setHaveSubCustomer(CollectionUtils.isNotEmpty(data.getSubCustomerIds()) ? true : false);
data.setHaveSubCustomer(CollectionUtils.isNotEmpty(data.getSubCustomerIds()));
customerRedis.saveCustomerInfo(customerId, data);
return data.getSubCustomerIds();
}
return new ArrayList<>();
}
}
}

4
epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java

@ -165,7 +165,7 @@ public class CustomerServiceImpl extends BaseServiceImpl<CustomerDao, CustomerEn
Map<String, CustomerAgencyDTO> rootAgencies = rootAgencyResult.getData();
validCustomers.stream().forEach(customer -> {
CustomerAgencyDTO rootAgency = rootAgencies.get(customer.getCustomerId());
customer.setHasRootAgency(rootAgency == null ? false : true);
customer.setHasRootAgency(rootAgency != null);
customer.setRootAgencyId(rootAgency == null ? "" : rootAgency.getId());
if (rootAgency != null) {
rootAgencyIds.add(rootAgency.getId());
@ -188,7 +188,7 @@ public class CustomerServiceImpl extends BaseServiceImpl<CustomerDao, CustomerEn
if (customer.getRootAgencyId() != null) {
rootAgencyManagers = rootAgencyManagerMap.get(customer.getRootAgencyId());
}
customer.setHasManager(CollectionUtils.isEmpty(rootAgencyManagers) ? false : true);
customer.setHasManager(!CollectionUtils.isEmpty(rootAgencyManagers));
});
} else {
log.error("查询有效客户列表:查询客户根级组织的管理员失败:{}", managersResult.toString());

2
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/QRCodeMultipartFileDTO.java

@ -41,7 +41,7 @@ public class QRCodeMultipartFileDTO implements MultipartFile {
@Override
public boolean isEmpty() {
return ArrayUtils.isEmpty(bytes)?true:false;
return ArrayUtils.isEmpty(bytes);
}
@Override

20
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java

@ -61,6 +61,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@ -99,10 +100,7 @@ public class ActSignInRecordServiceImpl extends BaseServiceImpl<ActSignInRecordD
*/
@Override
public boolean queryUserSignInRec(String groupActId, String signUserId) {
if (baseDao.selectCountUserRec(groupActId, signUserId) > 0) {
return true;
}
return false;
return baseDao.selectCountUserRec(groupActId, signUserId) > 0;
}
/**
@ -303,14 +301,10 @@ public class ActSignInRecordServiceImpl extends BaseServiceImpl<ActSignInRecordD
byte[] buffer = HttpClientManager.getInstance().getMediaByteArray(ModuleConstant.GET_CODE_URL + accessToken, JSON.toJSONString(data)).getData();
if (buffer != null && buffer.length < 500) {
String wxResult = "";
try {
wxResult = new String(buffer, "UTF-8");
if (-1 != wxResult.indexOf("errcode")) {
log.error("获取二维码接口返回错误:{}", wxResult);
throw new RenException("获取二维码失败");
}
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
wxResult = new String(buffer, StandardCharsets.UTF_8);
if (-1 != wxResult.indexOf("errcode")) {
log.error("获取二维码接口返回错误:{}", wxResult);
throw new RenException("获取二维码失败");
}
}
//上传
@ -332,4 +326,4 @@ public class ActSignInRecordServiceImpl extends BaseServiceImpl<ActSignInRecordD
}
return resultDTO;
}
}
}

8
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java

@ -523,7 +523,7 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl<GroupActInfoDao, Gr
resultDTO.setCanceledReason(GroupActConstant.CANCELED.equals(resultDTO.getStatus()) ? actOperationRecordDao.selectCanceledReason(formDTO.getGroupActId()) : StrConstant.EPMETY_STR);
handleSignInDesc(resultDTO,formDTO.getUserId());
// 有签到后不可以修改活动时间:true可以修改,false不可以,
resultDTO.setStartTimeEditFlag(groupActInfoEntity.getSignedInNum() > NumConstant.ZERO ? false : true);
resultDTO.setStartTimeEditFlag(groupActInfoEntity.getSignedInNum() <= NumConstant.ZERO);
//居民端记录已读标志
if(AppClientConstant.APP_RESI.equals(formDTO.getClient())){
@ -995,13 +995,13 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl<GroupActInfoDao, Gr
for (int i = NumConstant.ONE; i <= NumConstant.TWELVE; i++) {
OrganizationalLifeLineChartDTO dto = new OrganizationalLifeLineChartDTO();
if (i < NumConstant.TEN){
dto.setMonth(year +"-"+NumConstant.ZERO + String.valueOf(i));
dto.setMonth(year +"-"+NumConstant.ZERO + i);
}else {
dto.setMonth(year +"-"+ String.valueOf(i));
dto.setMonth(year +"-"+ i);
}
lineChart.add(dto);
}
return lineChart;
}
}
}

13
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupCodeServiceImpl.java

@ -58,6 +58,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@ -236,14 +237,10 @@ public class ResiGroupCodeServiceImpl extends BaseServiceImpl<ResiGroupCodeDao,
byte[] buffer = HttpClientManager.getInstance().getMediaByteArray(ModuleConstant.GET_CODE_URL + accessToken, JSON.toJSONString(data)).getData();
if (buffer != null && buffer.length < 500) {
String wxResult = "";
try {
wxResult = new String(buffer, "UTF-8");
if (-1 != wxResult.indexOf("errcode")) {
logger.error("获取二维码接口返回错误:{}", wxResult);
throw new RenException("获取二维码失败");
}
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
wxResult = new String(buffer, StandardCharsets.UTF_8);
if (-1 != wxResult.indexOf("errcode")) {
logger.error("获取二维码接口返回错误:{}", wxResult);
throw new RenException("获取二维码失败");
}
}
//上传

2
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java

@ -2304,7 +2304,7 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
if(!CollectionUtils.isEmpty(reply.getData())){
List<IssueApplicationDTO> applications = reply.getData();
return StringUtils.equals(ModuleConstant.TOPIC_SHIFTED_TO_ISSUE_STATUS_UNDER_AUDITING,applications.get(NumConstant.ZERO).getApplyStatus()) ? true : false;
return StringUtils.equals(ModuleConstant.TOPIC_SHIFTED_TO_ISSUE_STATUS_UNDER_AUDITING, applications.get(NumConstant.ZERO).getApplyStatus());
}else {
return false;
}

4
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/TopicShareLinkRecordServiceImpl.java

@ -205,7 +205,7 @@ public class TopicShareLinkRecordServiceImpl extends BaseServiceImpl<TopicShareL
result.setInGroup(false);
// 查询是否存在入组审核记录
Integer awaitAudit = groupMemeberOperationDao.checkAwaitAudit(tokenDto.getUserId(), result.getGroupId());
result.setAwaitAudit(awaitAudit > NumConstant.ZERO ? true : false);
result.setAwaitAudit(awaitAudit > NumConstant.ZERO);
}
return result;
}
@ -264,4 +264,4 @@ public class TopicShareLinkRecordServiceImpl extends BaseServiceImpl<TopicShareL
return relation;
}
}
}

4
epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/service/impl/ScanService.java

@ -26,7 +26,7 @@ public interface ScanService {
* @param textScanParam
* @return ImgAsyncScanResult
*/
public Result<SyncScanResult> sendTextScan(TextScanParam textScanParam);
Result<SyncScanResult> sendTextScan(TextScanParam textScanParam);
/**
@ -34,7 +34,7 @@ public interface ScanService {
* @param imgScanParam
* @return
*/
public Result<SyncScanResult> sendSyncImgScan(ImgScanParam imgScanParam);
Result<SyncScanResult> sendSyncImgScan(ImgScanParam imgScanParam);
/**
* 语音异步检测

64
epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/service/impl/ScanServiceImpl.java

@ -65,14 +65,9 @@ public class ScanServiceImpl implements ScanService {
TextScanRequest textScanRequest = getTextScanRequest();
try {
textScanRequest.setHttpContent(JSON.toJSONString(textScanParam).getBytes(SysConstant.UTF8), SysConstant.UTF8, FormatType.JSON);
} catch (UnsupportedEncodingException e) {
log.error("sendTextScan parse param exception", e);
return new Result<SyncScanResult>().error(SysResponseEnum.SCAN_PARAM_ERROR.getCode(), SysResponseEnum.SCAN_PARAM_ERROR.getMsg());
}
textScanRequest.setHttpContent(JSON.toJSONString(textScanParam).getBytes(StandardCharsets.UTF_8), SysConstant.UTF8, FormatType.JSON);
try {
try {
SyncScanResult textScanResult = executeSyncText(textScanRequest);
return new Result<SyncScanResult>().ok(textScanResult);
} catch (ExecuteHttpException e) {
@ -138,14 +133,9 @@ public class ScanServiceImpl implements ScanService {
private Result<SyncScanResult> doScanImg(ImgScanParam imgScanParam) {
ImageSyncScanRequest imageSyncScanRequest = getImgScanRequest();
try {
imageSyncScanRequest.setHttpContent(JSON.toJSONString(imgScanParam).getBytes(SysConstant.UTF8), SysConstant.UTF8, FormatType.JSON);
} catch (UnsupportedEncodingException e) {
log.error("sendSyncImgScan parse param exception", e);
return new Result<SyncScanResult>().error(SysResponseEnum.SCAN_PARAM_ERROR.getCode(), SysResponseEnum.SCAN_PARAM_ERROR.getMsg());
}
imageSyncScanRequest.setHttpContent(JSON.toJSONString(imgScanParam).getBytes(StandardCharsets.UTF_8), SysConstant.UTF8, FormatType.JSON);
try {
try {
SyncScanResult scanResult = executeSyncImg(imageSyncScanRequest);
return new Result<SyncScanResult>().ok(scanResult);
} catch (ExecuteHttpException e) {
@ -171,7 +161,7 @@ public class ScanServiceImpl implements ScanService {
HttpResponse httpResponse = IAcsClientUtil.getIAcsClient().doAction(textScanRequest);
if (httpResponse.isSuccess()) {
JSONObject scrResponse = JSON.parseObject(new String(httpResponse.getHttpContent(), SysConstant.UTF8));
JSONObject scrResponse = JSON.parseObject(new String(httpResponse.getHttpContent(), StandardCharsets.UTF_8));
if (HttpStatus.SC_OK == scrResponse.getInteger(SysConstant.CODE)) {
//任务 列表
List<ScanTaskResult> scanTaskResults = scrResponse.getJSONArray(SysConstant.DATA).toJavaList(ScanTaskResult.class);
@ -292,13 +282,8 @@ public class ScanServiceImpl implements ScanService {
VoiceAsyncScanRequest voiceAsyncScanRequest=getVoiceAsyncScanRequest();
try {
voiceAsyncScanRequest.setHttpContent(JSON.toJSONString(voiceAsyncScanParam).getBytes(SysConstant.UTF8), SysConstant.UTF8, FormatType.JSON);
} catch (UnsupportedEncodingException e) {
log.error("sendVoiceAsyncScan parse param exception", e);
return new Result<VoiceAsyncScanTaskResult>().error(SysResponseEnum.SCAN_PARAM_ERROR.getCode(), SysResponseEnum.SCAN_PARAM_ERROR.getMsg());
}
log.info("语音异步检测入参:"+JSON.toJSONString(voiceAsyncScanParam,true));
voiceAsyncScanRequest.setHttpContent(JSON.toJSONString(voiceAsyncScanParam).getBytes(StandardCharsets.UTF_8), SysConstant.UTF8, FormatType.JSON);
log.info("语音异步检测入参:"+JSON.toJSONString(voiceAsyncScanParam,true));
List<VoiceAsyncScanTaskDataDTO> taskList;
try {
taskList = executeSyncVoice(voiceAsyncScanRequest);
@ -365,7 +350,7 @@ public class ScanServiceImpl implements ScanService {
if (httpResponse.isSuccess()) {
JSONObject scrResponse = JSON.parseObject(new String(httpResponse.getHttpContent(), "UTF-8"));
JSONObject scrResponse = JSON.parseObject(new String(httpResponse.getHttpContent(), StandardCharsets.UTF_8));
//后面注释掉此日志
log.info("VoiceAsyncScanRequest原生接口返参:" + JSON.toJSONString(scrResponse, true));
@ -412,20 +397,15 @@ public class ScanServiceImpl implements ScanService {
}
VoiceAsyncScanResultsRequest request=getVoiceAsyncScanResultsRequest();
try {
request.setHttpContent(JSON.toJSONString(taskIds).getBytes(SysConstant.UTF8), SysConstant.UTF8, FormatType.JSON);
} catch (UnsupportedEncodingException e) {
log.error("voiceResults parse param exception", e);
return new Result<List<VoiceAsyncScanResult>>().error(SysResponseEnum.SCAN_PARAM_ERROR.getCode(), SysResponseEnum.SCAN_PARAM_ERROR.getMsg());
}
request.setHttpContent(JSON.toJSONString(taskIds).getBytes(StandardCharsets.UTF_8), SysConstant.UTF8, FormatType.JSON);
// log.info("语音异步检测结果查询入参:"+JSON.toJSONString(taskIds,true));
// log.info("语音异步检测结果查询入参:"+JSON.toJSONString(taskIds,true));
try {
HttpResponse httpResponse = IAcsClientUtil.getIAcsClient().doAction(request);
if (httpResponse.isSuccess()) {
JSONObject scrResponse=JSON.parseObject(new String(httpResponse.getHttpContent(), "UTF-8"));
JSONObject scrResponse=JSON.parseObject(new String(httpResponse.getHttpContent(), StandardCharsets.UTF_8));
//后面注释掉此返参
log.info("VoiceAsyncScanResultsRequest原生接口返参:"+JSON.toJSONString(scrResponse, true));
if (HttpStatus.SC_OK == scrResponse.getInteger(SysConstant.CODE)) {
@ -558,14 +538,9 @@ public class ScanServiceImpl implements ScanService {
private Result<VideoAsyncScanTaskResultDTO> doScanVideo(VideoAsyncScanParam videoAsyncScanParam) {
VideoAsyncScanRequest videoAsyncScanRequest = getVideoAsyncScanRequest();
try {
videoAsyncScanRequest.setHttpContent(JSON.toJSONString(videoAsyncScanParam).getBytes(SysConstant.UTF8), SysConstant.UTF8, FormatType.JSON);
} catch (UnsupportedEncodingException e) {
log.error("doScanVideo parse param exception", e);
return new Result<VideoAsyncScanTaskResultDTO>().error(SysResponseEnum.SCAN_PARAM_ERROR.getCode(), SysResponseEnum.SCAN_PARAM_ERROR.getMsg());
}
videoAsyncScanRequest.setHttpContent(JSON.toJSONString(videoAsyncScanParam).getBytes(StandardCharsets.UTF_8), SysConstant.UTF8, FormatType.JSON);
try {
try {
VideoAsyncScanTaskResultDTO scanResult = executeAsyncVideo(videoAsyncScanRequest);
scanResult.setSeed(videoAsyncScanParam.getSeed());
return new Result<VideoAsyncScanTaskResultDTO>().ok(scanResult);
@ -591,7 +566,7 @@ public class ScanServiceImpl implements ScanService {
try {
HttpResponse httpResponse = IAcsClientUtil.getIAcsClient().doAction(videoAsyncScanRequest);
if (httpResponse.isSuccess()) {
JSONObject scrResponse = JSON.parseObject(new String(httpResponse.getHttpContent(), "UTF-8"));
JSONObject scrResponse = JSON.parseObject(new String(httpResponse.getHttpContent(), StandardCharsets.UTF_8));
if (HttpStatus.SC_OK == scrResponse.getInteger(SysConstant.CODE)) {
//获取data列表
JSONArray dataResults = scrResponse.getJSONArray(SysConstant.DATA);
@ -634,16 +609,11 @@ public class ScanServiceImpl implements ScanService {
videoAsyncScanResultsRequest.setMethod(com.aliyuncs.http.MethodType.POST);
videoAsyncScanResultsRequest.setConnectTimeout(3000);
videoAsyncScanResultsRequest.setReadTimeout(6000);
try {
videoAsyncScanResultsRequest.setHttpContent(JSON.toJSONString(taskIds).getBytes("UTF-8"), "UTF-8", FormatType.JSON);
} catch (UnsupportedEncodingException e) {
log.error("videoResults parse param exception", e);
return new Result<VideoResultDTO>().error(SysResponseEnum.SCAN_PARAM_ERROR.getCode(), SysResponseEnum.SCAN_PARAM_ERROR.getMsg());
}
try {
videoAsyncScanResultsRequest.setHttpContent(JSON.toJSONString(taskIds).getBytes(StandardCharsets.UTF_8), "UTF-8", FormatType.JSON);
try {
HttpResponse httpResponse = IAcsClientUtil.getIAcsClient().doAction(videoAsyncScanResultsRequest);
if (httpResponse.isSuccess()) {
JSONObject responseObject = JSON.parseObject(new String(httpResponse.getHttpContent(), "UTF-8"));
JSONObject responseObject = JSON.parseObject(new String(httpResponse.getHttpContent(), StandardCharsets.UTF_8));
log.info("查询视频检测结果返参"+JSON.toJSONString(responseObject));
if (HttpStatus.SC_OK == responseObject.getInteger(SysConstant.CODE)) {
//获取data列表

15
epmet-openapi/epmet-openapi-sdk/src/main/java/com/epmet/openapi/sdk/encrypt/Md5Util.java

@ -1,6 +1,7 @@
package com.epmet.openapi.sdk.encrypt;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
@ -17,16 +18,16 @@ public class Md5Util {
return getMD5(string.getBytes("GBK"));
}
private static final char hexDigits[] = { // 用来将字节转换成 16 进制表示的字符
private static final char[] hexDigits = { // 用来将字节转换成 16 进制表示的字符
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
private static String getMD5(byte[] source) throws Exception {
String s = null;
MessageDigest md = MessageDigest.getInstance("MD5");
md.update(source);
byte tmp[] = md.digest(); // MD5 的计算结果是一个 128 位的长整数,
byte[] tmp = md.digest(); // MD5 的计算结果是一个 128 位的长整数,
// 用字节表示就是 16 个字节
char str[] = new char[16 * 2]; // 每个字节用 16 进制表示的话,使用两个字符,
char[] str = new char[16 * 2]; // 每个字节用 16 进制表示的话,使用两个字符,
// 所以表示成 16 进制需要 32 个字符
int k = 0; // 表示转换结果中对应的字符位置
for (int i = 0; i < 16; i++) { // 从第一个字节开始,对 MD5 的每一个字节
@ -40,7 +41,7 @@ public class Md5Util {
return s;
}
private static String byteArrayToHexString(byte b[]) {
private static String byteArrayToHexString(byte[] b) {
StringBuffer resultSb = new StringBuffer();
for (int i = 0; i < b.length; i++)
resultSb.append(byteToHexString(b[i]));
@ -59,7 +60,7 @@ public class Md5Util {
public static String MD5Encode(String origin, String charsetname) throws Exception {
String resultString = null;
resultString = new String(origin);
resultString = origin;
MessageDigest md = MessageDigest.getInstance("MD5");
if (charsetname == null || "".equals(charsetname))
resultString = byteArrayToHexString(md.digest(resultString
@ -85,7 +86,7 @@ public class Md5Util {
* @return 大写
*/
public static String get12Char(String str) {
String arr[] = ShortText(str);
String[] arr = ShortText(str);
String rst = (arr[0] + arr[1]).toUpperCase();
return rst.substring(0, 4) + rst.substring(4, 8) + rst.substring(8, 12);
}
@ -104,7 +105,7 @@ public class Md5Util {
try {
md = MessageDigest.getInstance("MD5");
hex = byteArrayToHexString(md.digest(SALT.concat(string)
.getBytes("utf-8")));
.getBytes(StandardCharsets.UTF_8)));
} catch (Exception e) {
e.printStackTrace();
}

8
epmet-openapi/epmet-openapi-sdk/src/main/java/com/epmet/openapi/sdk/sign/OpenApiSignUtils.java

@ -40,19 +40,19 @@ public class OpenApiSignUtils {
*/
public static String mapToSignStr(Map<String, String> map) {
Set<String> keySet = map.keySet();
String[] keyArray = (String[])keySet.toArray(new String[keySet.size()]);
String[] keyArray = keySet.toArray(new String[keySet.size()]);
Arrays.sort(keyArray);
StringBuilder sb = new StringBuilder();
for(int i = 0; i < keyArray.length; ++i) {
String key = keyArray[i];
String val = (String)map.get(key);
String val = map.get(key);
if (val != null && val.trim().length() > 0 && !"sign".equals(key)) {
if (!sb.toString().isEmpty()) {
sb.append("&");
}
sb.append(key).append("=").append((String)map.get(key));
sb.append(key).append("=").append(map.get(key));
}
}
@ -88,7 +88,7 @@ public class OpenApiSignUtils {
private static void generateGetOrgDetailSign() throws Exception {
long now = System.currentTimeMillis();
String uuid = UUID.randomUUID().toString().replace("-", "");;
String uuid = UUID.randomUUID().toString().replace("-", "");
System.out.println("时间戳:" + now);
System.out.println("随机数:" + uuid);

7
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/StatsResiWarnFormDTO.java

@ -37,8 +37,9 @@ public class StatsResiWarnFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
public interface ListSelectedBuilding {};
public interface ListSelectedUser {};
public interface ListSelectedBuilding {}
public interface ListSelectedUser {}
/**
@ -62,4 +63,4 @@ public class StatsResiWarnFormDTO implements Serializable {
private List<String> buildingIdList;
}
}

5
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GridMobileListResultDTO.java

@ -36,6 +36,11 @@ public class GridMobileListResultDTO {
*/
private String staffHeadPhoto;
/**
* 工作人员头像
*/
private String mobile;
/**
* 人员角色列表
*/

8
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java

@ -140,7 +140,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
//0.校验必填字段是否为空
Result<List<ColumnTableNameResultDTO>> resultList = operCustomizeOpenFeignClient.getMustColumn(tokenDto.getCustomerId());
if (resultList.success() && null != resultList.getData()) {
StringBuffer str = new StringBuffer("");
StringBuffer str = new StringBuffer();
formDTO.forEach(f -> {
resultList.getData().forEach(l -> {
if (f.getTableName().equals(l.getTableName())) {
@ -897,11 +897,11 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
IcResiUserBriefDTO r = new IcResiUserBriefDTO();
BeanUtil.copyProperties(resiEntity, r);
r.setHouseId(resiEntity.getHomeId());
r.setIcResiUserId(resiEntity.getId());
r.setIcUserName(resiEntity.getName());
// 填充网格、小区名称
String errorMsg = "【居民信息简介】查询网格、小区信息失败";
IcNeighborHoodDTO neighborHood = getResultDataOrThrowsException(govOrgOpenFeignClient.getIcNeighbordhoodById(resiEntity.getVillageId()),
@ -933,7 +933,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
r.getVolunteerCategories().put(vCategories[i], categories.get(vCategories[i]));
}
}
return r;
}

2
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java

@ -129,7 +129,7 @@ public class UserBadgeServiceImpl implements UserBadgeService {
userOperListResultDTOS.forEach(ub -> {
userAuthBadgeList.forEach(u -> {
if (ub.getBadgeId().equals(u.getBadgeId())){
ub.setIsReject(u.getAuditStatus().equals(BadgeConstant.REJECTED) ? true : false);
ub.setIsReject(u.getAuditStatus().equals(BadgeConstant.REJECTED));
ub.setIsCertificated(u.getAuditStatus().equals(BadgeConstant.APPROVED) ? BadgeConstant.YES : BadgeConstant.NO);
ub.setIsLighted(u.getIsOpened().equals(NumConstant.ZERO_STR) ? BadgeConstant.NO : BadgeConstant.YES);
}

7
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserRoleServiceImpl.java

@ -145,11 +145,8 @@ public class UserRoleServiceImpl extends BaseServiceImpl<UserRoleDao, UserRoleEn
@Override
public Boolean selectIsPartyMemberByUserId(String userId) {
Integer num = baseDao.selectIsPartyMemberByUserId(userId);
if (null != num && num > NumConstant.ZERO){
return true;
}
return false;
}
return null != num && num > NumConstant.ZERO;
}
/**
* 获取用户居民权限

10
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java

@ -132,12 +132,12 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem
UserWechatDTO userWechatDTO = new UserWechatDTO();
//前台和后台已有实体字段不对于 需要挨个赋值
userWechatDTO.setUserId(wxUserInfoFormDTO.getUserId());
userWechatDTO.setNickname(wxUserInfoFormDTO.getNickName() == null ? null : wxUserInfoFormDTO.getNickName());
userWechatDTO.setNickname(wxUserInfoFormDTO.getNickName());
userWechatDTO.setSex(Integer.parseInt(wxUserInfoFormDTO.getGender() == null ? "0" : wxUserInfoFormDTO.getGender()));
userWechatDTO.setHeadImgUrl(wxUserInfoFormDTO.getAvatarUrl() == null ? null : wxUserInfoFormDTO.getAvatarUrl());
userWechatDTO.setCountry(wxUserInfoFormDTO.getCountry() == null ? null : wxUserInfoFormDTO.getCountry());
userWechatDTO.setProvince(wxUserInfoFormDTO.getProvince() == null ? null : wxUserInfoFormDTO.getProvince());
userWechatDTO.setCity(wxUserInfoFormDTO.getCity() == null ? null : wxUserInfoFormDTO.getCity());
userWechatDTO.setHeadImgUrl(wxUserInfoFormDTO.getAvatarUrl());
userWechatDTO.setCountry(wxUserInfoFormDTO.getCountry());
userWechatDTO.setProvince(wxUserInfoFormDTO.getProvince());
userWechatDTO.setCity(wxUserInfoFormDTO.getCity());
userWechatDTO.setUpdatedTime(new Date());
userWechatDTO.setUpdatedBy(wxUserInfoFormDTO.getUserId());
userWechatDao.updateByUserId(userWechatDTO);

Loading…
Cancel
Save