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; content = null;
// 将sha1加密后的字符串可与signature对比,标识该请求来源于微信 // 将sha1加密后的字符串可与signature对比,标识该请求来源于微信
System.out.println(tmpStr.equals(signature.toUpperCase())); 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()) { if (echostr == null || echostr.isEmpty()) {
return nonce; return nonce;
} }
if (this.checkSignature(signature, timestamp, nonce)) { if (checkSignature(signature, timestamp, nonce)) {
return echostr; return echostr;
} }
return nonce; return nonce;

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

@ -84,7 +84,7 @@ public class WxController {
content = null; content = null;
// 将sha1加密后的字符串可与signature对比,标识该请求来源于微信 // 将sha1加密后的字符串可与signature对比,标识该请求来源于微信
System.out.println(tmpStr.equals(signature.toUpperCase())); 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()) { if (echostr == null || echostr.isEmpty()) {
return nonce; return nonce;
} }
if (this.checkSignature(signature, timestamp, nonce)) { if (checkSignature(signature, timestamp, nonce)) {
return echostr; return echostr;
} }
return nonce; 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); String captcha = captchaRedis.get(uuid);
//验证码是否正确 //验证码是否正确
if(code.equalsIgnoreCase(captcha)){ return code.equalsIgnoreCase(captcha);
return true;
}
return false;
} }
} }

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

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

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

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

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

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

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

@ -55,7 +55,7 @@ export default {
deleteURL: '/${moduleName}/${pathName}', deleteURL: '/${moduleName}/${pathName}',
deleteIsBatch: true deleteIsBatch: true
}, },
dataForm: { dataForm: {;
${pk.attrname}: '' ${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 style="float:left;color:#fff;padding:15px 10px;">代码的搬运工</div>
<div class="navbar-custom-menu"> <div class="navbar-custom-menu">
<ul class="nav navbar-nav"> <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> <li><a href="https://www.renren.io" target="_blank"><i class="fa fa-home"></i> &nbsp;人人开源</a></li>
</ul> </ul>
</div> </div>
@ -58,7 +58,7 @@
<ul class="sidebar-menu"> <ul class="sidebar-menu">
<li class="header">导航菜单</li> <li class="header">导航菜单</li>
<li class="active"> <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;"> <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 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> <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 <!-- Add the sidebar's background. This div must be placed
immediately after the control sidebar --> immediately after the control sidebar -->
<div class="control-sidebar-bg"></div> <div class="control-sidebar-bg"></div>
</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() { public static TokenDto getCurrentUserInfo() {
TokenDto tokenDto = getCurrentUser(); TokenDto tokenDto = getCurrentUser();
if (tokenDto == null) {
return null;
}
return tokenDto; 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 @Override
public Object intercept(Invocation invocation) throws Throwable { 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); MetaObject metaObject = SystemMetaObject.forObject(statementHandler);
// SQL解析 // 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) { public static String mapToSignStr(Map<String, String> map) {
Set<String> keySet = map.keySet(); 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); Arrays.sort(keyArray);
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
for(int i = 0; i < keyArray.length; ++i) { for(int i = 0; i < keyArray.length; ++i) {
String key = keyArray[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 (val != null && val.trim().length() > 0 && !"sign".equals(key)) {
if (!sb.toString().isEmpty()) { if (!sb.toString().isEmpty()) {
sb.append("&"); 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() { private static void generateGetOrgDetailSign() {
long now = System.currentTimeMillis(); long now = System.currentTimeMillis();
String uuid = UUID.randomUUID().toString().replace("-", "");; String uuid = UUID.randomUUID().toString().replace("-", "");
System.out.println("时间戳:" + now); System.out.println("时间戳:" + now);
System.out.println("随机数:" + uuid); 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 com.epmet.commons.thirdplat.encrypt.SignUtils;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
@ -22,7 +23,7 @@ public class DemoApp {
SsoTicketFormDTO ssoTicket = new SsoTicketFormDTO(); SsoTicketFormDTO ssoTicket = new SsoTicketFormDTO();
ssoTicket.setSsoTicket("ssoTicket-jGOAW66udmRtUWBKgs3q7k1w7prGxd5I"); 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(); Map<String, Object> headers = new HashMap();
long timestamp = System.currentTimeMillis(); long timestamp = System.currentTimeMillis();
@ -33,4 +34,4 @@ public class DemoApp {
System.out.println(headers); 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("上报地理位置,纬度 : {},经度 : {},精度 : {}", this.logger.info("上报地理位置,纬度 : {},经度 : {},精度 : {}",
wxMessage.getLatitude(), wxMessage.getLongitude(), String.valueOf(wxMessage.getPrecision())); wxMessage.getLatitude(), wxMessage.getLongitude(), wxMessage.getPrecision());
//TODO 可以将用户地理位置信息保存到本地数据库,以便以后使用 //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.ByteArrayOutputStream;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.security.SecureRandom; import java.security.SecureRandom;
/** /**
@ -52,11 +53,11 @@ public class BCrypt {
// Blowfish parameters // Blowfish parameters
private static final int BLOWFISH_NUM_ROUNDS = 16; private static final int BLOWFISH_NUM_ROUNDS = 16;
// Initial contents of key schedule // 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, 0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89, 0x452821e6, 0x38d01377,
0xbe5466cf, 0x34e90c6c, 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917, 0xbe5466cf, 0x34e90c6c, 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917,
0x9216d5d9, 0x8979fb1b }; 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, 0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99, 0x24a19947, 0xb3916cf7,
0x0801f2e2, 0x858efc16, 0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e, 0x0801f2e2, 0x858efc16, 0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e,
0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee, 0x7b54a41d, 0xc25a59b5, 0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee, 0x7b54a41d, 0xc25a59b5,
@ -228,16 +229,16 @@ public class BCrypt {
0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9, 0x90d4f869, 0xa65cdea0, 0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9, 0x90d4f869, 0xa65cdea0,
0x3f09252d, 0xc208e69f, 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6 }; 0x3f09252d, 0xc208e69f, 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6 };
// bcrypt IV: "OrpheanBeholderScryDoubt" // 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 }; 0x65686f6c, 0x64657253, 0x63727944, 0x6f756274 };
// Table for Base64 encoding // 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', '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', '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', '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' }; 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };
// Table for Base64 decoding // 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, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 54, 55, -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, 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 MIN_LOG_ROUNDS = 4;
static final int MAX_LOG_ROUNDS = 31; static final int MAX_LOG_ROUNDS = 31;
// Expanded Blowfish key // Expanded Blowfish key
private int P[]; private int[] P;
private int S[]; private int[] S;
/** /**
* Encode a byte array using bcrypt's slightly-modified base64 encoding scheme. Note * 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 * @param rs the destination buffer for the base64-encoded string
* @exception IllegalArgumentException if the length is invalid * @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 { throws IllegalArgumentException {
int off = 0; int off = 0;
int c1, c2; int c1, c2;
@ -359,7 +360,7 @@ public class BCrypt {
* @param lr an array containing the two 32-bit half blocks * @param lr an array containing the two 32-bit half blocks
* @param off the position in the array of the 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]; int i, n, l = lr[off], r = lr[off + 1];
l ^= P[0]; 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 * @param offp a "pointer" (as a one-entry array) to the current offset into data
* @return the next word of material from 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 i;
int word = 0; int word = 0;
int off = offp[0]; int off = offp[0];
@ -406,18 +407,18 @@ public class BCrypt {
* Initialise the Blowfish key schedule * Initialise the Blowfish key schedule
*/ */
private void init_key() { private void init_key() {
P = (int[]) P_orig.clone(); P = P_orig.clone();
S = (int[]) S_orig.clone(); S = S_orig.clone();
} }
/** /**
* Key the Blowfish cipher * Key the Blowfish cipher
* @param key an array containing the key * @param key an array containing the key
*/ */
private void key(byte key[]) { private void key(byte[] key) {
int i; int i;
int koffp[] = { 0 }; int[] koffp = { 0 };
int lr[] = { 0, 0 }; int[] lr = { 0, 0 };
int plen = P.length, slen = S.length; int plen = P.length, slen = S.length;
for (i = 0; i < plen; i++) { for (i = 0; i < plen; i++) {
@ -443,10 +444,11 @@ public class BCrypt {
* @param data salt information * @param data salt information
* @param key password information * @param key password information
*/ */
private void ekskey(byte data[], byte key[]) { private void ekskey(byte[] data, byte[] key) {
int i; int i;
int koffp[] = { 0 }, doffp[] = { 0 }; int[] koffp = { 0 };
int lr[] = { 0, 0 }; int[] doffp = { 0 };
int[] lr = { 0, 0 };
int plen = P.length, slen = S.length; int plen = P.length, slen = S.length;
for (i = 0; i < plen; i++) { 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 * @param log_rounds the binary logarithm of the number of rounds of hashing to apply
* @return an array containing the binary hashed password * @return an array containing the binary hashed password
*/ */
private byte[] crypt_raw(byte password[], byte salt[], int log_rounds) { private byte[] crypt_raw(byte[] password, byte[] salt, int log_rounds) {
int cdata[] = (int[]) bf_crypt_ciphertext.clone(); int[] cdata = bf_crypt_ciphertext.clone();
int clen = cdata.length; int clen = cdata.length;
byte ret[]; byte[] ret;
long rounds = roundsForLogRounds(log_rounds); long rounds = roundsForLogRounds(log_rounds);
@ -524,8 +526,10 @@ public class BCrypt {
public static String hashpw(String password, String salt) throws IllegalArgumentException { public static String hashpw(String password, String salt) throws IllegalArgumentException {
BCrypt B; BCrypt B;
String real_salt; String real_salt;
byte passwordb[], saltb[], hashed[]; byte[] passwordb;
char minor = (char) 0; byte[] saltb;
byte[] hashed;
char minor = (char) 0;
int rounds, off = 0; int rounds, off = 0;
StringBuilder rs = new StringBuilder(); StringBuilder rs = new StringBuilder();
@ -564,14 +568,9 @@ public class BCrypt {
rounds = Integer.parseInt(salt.substring(off, off + 2)); rounds = Integer.parseInt(salt.substring(off, off + 2));
real_salt = salt.substring(off + 3, off + 25); real_salt = salt.substring(off + 3, off + 25);
try { passwordb = (password + (minor >= 'a' ? "\000" : "")).getBytes(StandardCharsets.UTF_8);
passwordb = (password + (minor >= 'a' ? "\000" : "")).getBytes("UTF-8");
}
catch (UnsupportedEncodingException uee) {
throw new AssertionError("UTF-8 is not supported");
}
saltb = decode_base64(real_salt, BCRYPT_SALT_LEN); saltb = decode_base64(real_salt, BCRYPT_SALT_LEN);
B = new BCrypt(); B = new BCrypt();
hashed = B.crypt_raw(passwordb, saltb, rounds); hashed = B.crypt_raw(passwordb, saltb, rounds);
@ -603,7 +602,7 @@ public class BCrypt {
throw new IllegalArgumentException("Bad number of rounds"); throw new IllegalArgumentException("Bad number of rounds");
} }
StringBuilder rs = new StringBuilder(); StringBuilder rs = new StringBuilder();
byte rnd[] = new byte[BCRYPT_SALT_LEN]; byte[] rnd = new byte[BCRYPT_SALT_LEN];
random.nextBytes(rnd); 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 != null) { //"***.***.***.***".length() = 15
if (ip.indexOf(StrConstant.COMMA) > 0) { if (ip.indexOf(StrConstant.COMMA) > 0) {
ip = ip.split(StrConstant.COMMA)[0]; ip = ip.split(StrConstant.COMMA)[0];
; }
}
} }
} catch (Exception e) { } catch (Exception e) {
logger.error("IpUtils getIpAddr ERROR ", 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 lombok.extern.slf4j.Slf4j;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest; import java.security.MessageDigest;
@Slf4j @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'}; '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
private static String getMD5(byte[] source) { private static String getMD5(byte[] source) {
@ -32,9 +33,9 @@ public class Md5Util {
try { try {
MessageDigest md = MessageDigest.getInstance("MD5"); MessageDigest md = MessageDigest.getInstance("MD5");
md.update(source); md.update(source);
byte tmp[] = md.digest(); // MD5 的计算结果是一个 128 位的长整数, byte[] tmp = md.digest(); // MD5 的计算结果是一个 128 位的长整数,
// 用字节表示就是 16 个字节 // 用字节表示就是 16 个字节
char str[] = new char[16 * 2]; // 每个字节用 16 进制表示的话,使用两个字符, char[] str = new char[16 * 2]; // 每个字节用 16 进制表示的话,使用两个字符,
// 所以表示成 16 进制需要 32 个字符 // 所以表示成 16 进制需要 32 个字符
int k = 0; // 表示转换结果中对应的字符位置 int k = 0; // 表示转换结果中对应的字符位置
for (int i = 0; i < 16; i++) { // 从第一个字节开始,对 MD5 的每一个字节 for (int i = 0; i < 16; i++) { // 从第一个字节开始,对 MD5 的每一个字节
@ -52,7 +53,7 @@ public class Md5Util {
return s; return s;
} }
private static String byteArrayToHexString(byte b[]) { private static String byteArrayToHexString(byte[] b) {
StringBuffer resultSb = new StringBuffer(); StringBuffer resultSb = new StringBuffer();
for (int i = 0; i < b.length; i++) for (int i = 0; i < b.length; i++)
resultSb.append(byteToHexString(b[i])); resultSb.append(byteToHexString(b[i]));
@ -72,7 +73,7 @@ public class Md5Util {
public static String MD5Encode(String origin, String charsetname) { public static String MD5Encode(String origin, String charsetname) {
String resultString = null; String resultString = null;
try { try {
resultString = new String(origin); resultString = origin;
MessageDigest md = MessageDigest.getInstance("MD5"); MessageDigest md = MessageDigest.getInstance("MD5");
if (charsetname == null || "".equals(charsetname)) if (charsetname == null || "".equals(charsetname))
resultString = byteArrayToHexString(md.digest(resultString resultString = byteArrayToHexString(md.digest(resultString
@ -101,7 +102,7 @@ public class Md5Util {
* @return 大写 * @return 大写
*/ */
public static String get12Char(String str) { public static String get12Char(String str) {
String arr[] = ShortText(str); String[] arr = ShortText(str);
String rst = (arr[0] + arr[1]).toUpperCase(); String rst = (arr[0] + arr[1]).toUpperCase();
return rst.substring(0, 4) + rst.substring(4, 8) + rst.substring(8, 12); return rst.substring(0, 4) + rst.substring(4, 8) + rst.substring(8, 12);
} }
@ -120,7 +121,7 @@ public class Md5Util {
try { try {
md = MessageDigest.getInstance("MD5"); md = MessageDigest.getInstance("MD5");
hex = byteArrayToHexString(md.digest(SALT.concat(string) hex = byteArrayToHexString(md.digest(SALT.concat(string)
.getBytes("utf-8"))); .getBytes(StandardCharsets.UTF_8)));
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); 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 org.springframework.util.StringUtils;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.UUID; import java.util.UUID;
@ -63,11 +64,7 @@ public class ModuleUtils {
if (StringUtils.isEmpty(params)) { if (StringUtils.isEmpty(params)) {
return null; return null;
} }
try { return Base64Utils.encodeToUrlSafeString(params.getBytes(StandardCharsets.UTF_8));
return Base64Utils.encodeToUrlSafeString(params.getBytes(CharEncoding.UTF_8));
} catch (UnsupportedEncodingException e) {
throw new RenException("字符串编码方法异常");
}
} }
/** /**
@ -82,11 +79,7 @@ public class ModuleUtils {
if (StringUtils.isEmpty(base64Str)) { if (StringUtils.isEmpty(base64Str)) {
return null; return null;
} }
try { return new String(Base64Utils.decodeFromUrlSafeString(base64Str), StandardCharsets.UTF_8);
return new String(Base64Utils.decodeFromUrlSafeString(base64Str), CharEncoding.UTF_8);
} catch (UnsupportedEncodingException e) {
throw new RenException("字符串编码方法异常");
}
} }
/** /**

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(){ 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(); Iterator<String> iterator = bodyParams.keySet().iterator();
String key = ""; String key = "";
while (iterator.hasNext()) { while (iterator.hasNext()) {
key = iterator.next().toString(); key = iterator.next();
formEncodingBuilder.add(key, bodyParams.get(key)); formEncodingBuilder.add(key, bodyParams.get(key));
logger.info(" 请求参数:{},请求值:{} ", 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) { private static boolean isStrNum(String str) {
Pattern pattern = compile("[0-9]*"); Pattern pattern = compile("[0-9]*");
Matcher isNum = pattern.matcher(str); Matcher isNum = pattern.matcher(str);
if (isNum.matches()) { return isNum.matches();
return true;
} else {
return false;
}
} }
/** /**
@ -177,11 +173,7 @@ public class IdCardNoValidatorUtils {
public static boolean isStrDate(String strDate) { 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])))))?$"); 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); Matcher m = pattern.matcher(strDate);
if (m.matches()) { return m.matches();
return true;
} else {
return false;
}
} }

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

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

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) { if (queryParams == null || queryParams.size() == 0) {
return ""; return "";
} }
StringBuilder sb = new StringBuilder(""); StringBuilder sb = new StringBuilder();
queryParams.entrySet().forEach(entry -> { queryParams.entrySet().forEach(entry -> {
String key = entry.getKey(); String key = entry.getKey();
List<String> values = entry.getValue(); List<String> values = entry.getValue();
@ -260,4 +260,4 @@ public class EpmetGatewayFilter implements GatewayFilter {
sb.append(System.currentTimeMillis()); sb.append(System.currentTimeMillis());
return sb.toString(); 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 //展示红点:true;隐藏:false
if(govProjectService.countRedDot(userId)>0){ if(govProjectService.countRedDot(userId)>0){
resultDTO.setRedDot(true); resultDTO.setRedDot(true);
}; }
return resultDTO; 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; PermissionValidateResultDTO r = null;
//if ("agency".equals(staffInfo.getFromOrgType())) { //if ("agency".equals(staffInfo.getFromOrgType())) {
// // 来自agency // // 来自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()); o.setOrgId(data.getOrgId());
num++; num++;
result.add(o); result.add(o);
}; }
}else{ }else{
List<OrgRankDataResultDTO> gridData = List<OrgRankDataResultDTO> gridData =
screenOrgRankDataDao.selectGridDataMonthly(param.getAgencyId(),monthId); screenOrgRankDataDao.selectGridDataMonthly(param.getAgencyId(),monthId);
@ -307,7 +307,7 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService {
o.setOrgId(data.getOrgId()); o.setOrgId(data.getOrgId());
num++; num++;
result.add(o); result.add(o);
}; }
} }
return result; 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 * @param tokenDto,formDTO
* @author jyy * @author jyy
*/ */
public List<FactTagViewedAgencyDTO> tagviewed(TokenDto tokenDto, Integer pageSize, String type) ; List<FactTagViewedAgencyDTO> tagviewed(TokenDto tokenDto, Integer pageSize, String type) ;
/** /**
* @Description 宣传能力工作端宣传能力-获取发表最多的分类数据 * @Description 宣传能力工作端宣传能力-获取发表最多的分类数据
* @param tokenDto,pageSize,type * @param tokenDto,pageSize,type
* @author jyy * @author jyy
*/ */
public List<FactTagUsedAgencyDTO> tagused(TokenDto tokenDto, Integer pageSize, String type) ; List<FactTagUsedAgencyDTO> tagused(TokenDto tokenDto, Integer pageSize, String type) ;
/** /**
* @param tokenDto type * @param tokenDto type
* @Description 获取下级机关发文数 * @Description 获取下级机关发文数
* @author jyy * @author jyy
*/ */
public List<FactPublishedAgencyDTO> subagencyPublishedarticle(TokenDto tokenDto, String type) ; List<FactPublishedAgencyDTO> subagencyPublishedarticle(TokenDto tokenDto, String type) ;
/** /**
* @param tokenDto type * @param tokenDto type
* @Description 获取直属部门发文数 * @Description 获取直属部门发文数
* @author jyy * @author jyy
*/ */
public List<FactPublishedDepartmentDTO> departmentPublishedarticle(TokenDto tokenDto, String type); List<FactPublishedDepartmentDTO> departmentPublishedarticle(TokenDto tokenDto, String type);
/** /**
* @param tokenDto type * @param tokenDto type
* @Description 获取指数网格发文数 * @Description 获取指数网格发文数
* @author jyy * @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 org.springframework.web.bind.annotation.RestController;
import java.io.InputStream; import java.io.InputStream;
import java.nio.charset.StandardCharsets;
/** /**
* Stencilset * Stencilset
@ -30,7 +31,7 @@ public class StencilsetRestResource {
public @ResponseBody String getStencilset() { public @ResponseBody String getStencilset() {
InputStream stencilsetStream = this.getClass().getClassLoader().getResourceAsStream("stencilset.json"); InputStream stencilsetStream = this.getClass().getClassLoader().getResourceAsStream("stencilset.json");
try { try {
return IOUtils.toString(stencilsetStream, "utf-8"); return IOUtils.toString(stencilsetStream, StandardCharsets.UTF_8);
} catch (Exception e) { } catch (Exception e) {
throw new ActivitiException("Error while loading stencil set", 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.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.nio.charset.StandardCharsets;
/** /**
* Model Editor * Model Editor
* *
@ -56,7 +58,7 @@ public class ModelEditorJsonRestResource implements ModelDataJsonConstants {
} }
modelNode.put(MODEL_ID, model.getId()); modelNode.put(MODEL_ID, model.getId());
ObjectNode editorJsonNode = (ObjectNode) objectMapper.readTree( 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); modelNode.set("model", editorJsonNode);
} catch (Exception e) { } 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.ByteArrayInputStream;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.InputStream; import java.io.InputStream;
import java.nio.charset.StandardCharsets;
/** /**
* Model Rest * Model Rest
@ -65,9 +66,9 @@ public class ModelSaveRestResource implements ModelDataJsonConstants {
repositoryService.saveModel(model); 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); TranscoderInput input = new TranscoderInput(svgStream);
PNGTranscoder transcoder = new PNGTranscoder(); 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")); query.processDefinitionId((String)params.get("processDefinitionId"));
} }
if(StringUtils.isNotEmpty((String)params.get("ended"))){ if(StringUtils.isNotEmpty((String)params.get("ended"))){
if("true".equals((String)params.get("ended"))){ if("true".equals(params.get("ended"))){
query.finished(); query.finished();
} else if("false".equals((String)params.get("ended"))){ } else if("false".equals(params.get("ended"))){
query.unfinished(); 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.InputStream;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -101,7 +102,7 @@ public class ActModelService {
ObjectNode stencilset = objectMapper.createObjectNode(); ObjectNode stencilset = objectMapper.createObjectNode();
stencilset.put("namespace", "http://b3mn.org/stencilset/bpmn2.0#"); stencilset.put("namespace", "http://b3mn.org/stencilset/bpmn2.0#");
editorNode.set("stencilset", stencilset); 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) { 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.InputStream;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@ -66,7 +67,7 @@ public class ActProcessService {
public PageData<Map<String, Object>> page(Map<String, Object> params) { public PageData<Map<String, Object>> page(Map<String, Object> params) {
String key = (String)params.get("key"); String key = (String)params.get("key");
String processName = (String)params.get("processName"); 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; int curPage = 1;
@ -166,7 +167,7 @@ public class ActProcessService {
InputStream bpmnStream = repositoryService.getResourceAsStream(processDefinition.getDeploymentId(), InputStream bpmnStream = repositoryService.getResourceAsStream(processDefinition.getDeploymentId(),
processDefinition.getResourceName()); processDefinition.getResourceName());
XMLInputFactory xif = XMLInputFactory.newInstance(); XMLInputFactory xif = XMLInputFactory.newInstance();
InputStreamReader in = new InputStreamReader(bpmnStream, "UTF-8"); InputStreamReader in = new InputStreamReader(bpmnStream, StandardCharsets.UTF_8);
XMLStreamReader xtr = xif.createXMLStreamReader(in); XMLStreamReader xtr = xif.createXMLStreamReader(in);
BpmnModel bpmnModel = new BpmnXMLConverter().convertToBpmnModel(xtr); BpmnModel bpmnModel = new BpmnXMLConverter().convertToBpmnModel(xtr);
@ -187,7 +188,7 @@ public class ActProcessService {
repositoryService.saveModel(modelData); repositoryService.saveModel(modelData);
repositoryService.addModelEditorSource(modelData.getId(), modelNode.toString().getBytes("utf-8")); repositoryService.addModelEditorSource(modelData.getId(), modelNode.toString().getBytes(StandardCharsets.UTF_8));
return modelData; 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); taskQuery.taskAssignee(userId);
} }
if (StringUtils.isNotEmpty((String)params.get("taskName"))){ 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"))){ if(StringUtils.isNotEmpty((String)params.get("isRoleGroup"))&&"1".equals(params.get("isRoleGroup"))){
Result<List<Long>> roleResult = userFeignClient.getRoleIdList(SecurityUser.getUserId()); 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: {}, options: {},
getProcessDefinitionByKey: function(processDefinitionKey, callback) { getProcessDefinitionByKey: function(processDefinitionKey, callback) {
var url = Lang.sub(this.options.processDefinitionByKeyUrl, {processDefinitionKey: processDefinitionKey}); var url = Lang.sub(this.options.processDefinitionByKeyUrl, {processDefinitionKey: processDefinitionKey});
$.ajax({ $.ajax({
url: url, url: url,
dataType: 'jsonp', dataType: 'jsonp',
@ -22,10 +22,10 @@ var ActivitiRest = {
console.error('Get diagram layout['+processDefinitionKey+'] failure: ', textStatus, 'error: ', error, jqXHR); console.error('Get diagram layout['+processDefinitionKey+'] failure: ', textStatus, 'error: ', error, jqXHR);
}); });
}, },
getProcessDefinition: function(processDefinitionId, callback) { getProcessDefinition: function(processDefinitionId, callback) {
var url = Lang.sub(this.options.processDefinitionUrl, {processDefinitionId: processDefinitionId}); var url = Lang.sub(this.options.processDefinitionUrl, {processDefinitionId: processDefinitionId});
$.ajax({ $.ajax({
url: url, url: url,
dataType: 'jsonp', dataType: 'jsonp',
@ -35,7 +35,7 @@ var ActivitiRest = {
var processDefinitionDiagramLayout = data; var processDefinitionDiagramLayout = data;
if (!processDefinitionDiagramLayout) { if (!processDefinitionDiagramLayout) {
console.error("Process definition diagram layout '" + processDefinitionId + "' not found"); console.error("Process definition diagram layout '" + processDefinitionId + "' not found");
return;
} else { } else {
callback.apply({processDefinitionDiagramLayout: processDefinitionDiagramLayout}); callback.apply({processDefinitionDiagramLayout: processDefinitionDiagramLayout});
} }
@ -46,10 +46,10 @@ var ActivitiRest = {
console.log('Get diagram layout['+processDefinitionId+'] failure: ', textStatus, jqXHR); console.log('Get diagram layout['+processDefinitionId+'] failure: ', textStatus, jqXHR);
}); });
}, },
getHighLights: function(processInstanceId, callback) { getHighLights: function(processInstanceId, callback) {
var url = Lang.sub(this.options.processInstanceHighLightsUrl, {processInstanceId: processInstanceId}); var url = Lang.sub(this.options.processInstanceHighLightsUrl, {processInstanceId: processInstanceId});
$.ajax({ $.ajax({
url: url, url: url,
dataType: 'jsonp', dataType: 'jsonp',
@ -60,7 +60,7 @@ var ActivitiRest = {
var highLights = data; var highLights = data;
if (!highLights) { if (!highLights) {
console.log("highLights not found"); console.log("highLights not found");
return;
} else { } else {
callback.apply({highLights: highLights}); callback.apply({highLights: highLights});
} }
@ -71,4 +71,4 @@ var ActivitiRest = {
console.log('Get HighLights['+processInstanceId+'] failure: ', textStatus, jqXHR); 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 * @author Dmitry Farafonov
*/ */
var ANCHOR_TYPE= { var ANCHOR_TYPE= {
main: "main", main: "main",
middle: "middle", middle: "middle",
@ -12,11 +12,11 @@ var ANCHOR_TYPE= {
}; };
function Anchor(uuid, type, x, y) { function Anchor(uuid, type, x, y) {
this.uuid = uuid; this.uuid = uuid;
this.x = x this.x = x;
this.y = y this.y = y;
this.type = (type == ANCHOR_TYPE.middle) ? ANCHOR_TYPE.middle : ANCHOR_TYPE.main; this.type = (type == ANCHOR_TYPE.middle) ? ANCHOR_TYPE.middle : ANCHOR_TYPE.main;
}; }
Anchor.prototype = { Anchor.prototype = {
uuid: null, uuid: null,
x: 0, x: 0,
@ -37,21 +37,21 @@ function Polyline(uuid, points, strokeWidth) {
* {x: 650, y: 370}]; 4 * {x: 650, y: 370}]; 4
*/ */
this.points = points; this.points = points;
/* /*
* path for graph * path for graph
* [["M", x1, y1], ["L", x2, y2], ["C", ax, ay, bx, by, x3, y3], ["L", x3, y3]] * [["M", x1, y1], ["L", x2, y2], ["C", ax, ay, bx, by, x3, y3], ["L", x3, y3]]
*/ */
this.path = []; this.path = [];
this.anchors = []; this.anchors = [];
if (strokeWidth) this.strokeWidth = strokeWidth; if (strokeWidth) this.strokeWidth = strokeWidth;
this.closePath = false; this.closePath = false;
this.init(); this.init();
}; }
Polyline.prototype = { Polyline.prototype = {
id: null, id: null,
@ -64,39 +64,39 @@ Polyline.prototype = {
element: null, element: null,
isDefaultConditionAvailable: false, isDefaultConditionAvailable: false,
closePath: false, closePath: false,
init: function(points){ init: function(points){
var linesCount = this.getLinesCount(); var linesCount = this.getLinesCount();
if (linesCount < 1) if (linesCount < 1)
return; return;
this.normalizeCoordinates(); this.normalizeCoordinates();
// create anchors // create anchors
this.pushAnchor(ANCHOR_TYPE.first, this.getLine(0).x1, this.getLine(0).y1); this.pushAnchor(ANCHOR_TYPE.first, this.getLine(0).x1, this.getLine(0).y1);
for(var i = 1; i < linesCount; i++){ for(var i = 1; i < linesCount; i++){
var line1 = this.getLine(i-1), var line1 = this.getLine(i-1),
line2 = this.getLine(i); 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.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.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.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.pushAnchor(ANCHOR_TYPE.last, this.getLine(linesCount-1).x2, this.getLine(linesCount-1).y2);
this.rebuildPath(); this.rebuildPath();
}, },
normalizeCoordinates: function(){ normalizeCoordinates: function(){
for(var i=0; i < this.points.length; i++){ for(var i=0; i < this.points.length; i++){
this.points[i].x = parseFloat(this.points[i].x); this.points[i].x = parseFloat(this.points[i].x);
this.points[i].y = parseFloat(this.points[i].y); this.points[i].y = parseFloat(this.points[i].y);
} }
}, },
getLinesCount: function(){ getLinesCount: function(){
return this.points.length-1; return this.points.length-1;
}, },
@ -124,9 +124,9 @@ Polyline.prototype = {
var line = this.getLine(i); var line = this.getLine(i);
return Math.sqrt(Math.pow(this.getLineLengthX(i), 2) + Math.pow(this.getLineLengthY(i), 2)); return Math.sqrt(Math.pow(this.getLineLengthX(i), 2) + Math.pow(this.getLineLengthY(i), 2));
}, },
getAnchors: function(){ getAnchors: function(){
// âåðíóòü îòñîðòèðîâàííûé ìàññèâ // ������� ��������������� ������
// ???? // ????
return this.anchors; return this.anchors;
}, },
@ -144,7 +144,7 @@ Polyline.prototype = {
return count; return count;
} }
}, },
pushAnchor: function(type, x, y, index){ pushAnchor: function(type, x, y, index){
if (type == ANCHOR_TYPE.first) { if (type == ANCHOR_TYPE.first) {
index = 0; index = 0;
@ -155,7 +155,7 @@ Polyline.prototype = {
} else if (!index) { } else if (!index) {
index = this.anchors.length; index = this.anchors.length;
} else { } else {
// ïåðåáðàòü anchors, ñäâèíóòü ïîçèöèþ äëÿ êàæäîãî, íà÷èíàÿ ñ index // ��������� anchors, �������� ������� ��� �������, ������� � index
//var anchor = this.getAnchor() //var anchor = this.getAnchor()
for(var i=0; i < this.getAnchorsCount(); i++){ for(var i=0; i < this.getAnchorsCount(); i++){
var anchor = this.anchors[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); var anchor = new Anchor(this.id, ANCHOR_TYPE.main, x, y, index, typeIndex);
this.anchors.push(anchor); this.anchors.push(anchor);
}, },
getAnchor: function(position){ getAnchor: function(position){
return this.anchors[position]; return this.anchors[position];
}, },
getAnchorByType: function(type, position){ getAnchorByType: function(type, position){
if (type == ANCHOR_TYPE.first) if (type == ANCHOR_TYPE.first)
return this.anchors[0]; return this.anchors[0];
if (type == ANCHOR_TYPE.last) if (type == ANCHOR_TYPE.last)
return this.anchors[this.getAnchorsCount()-1]; return this.anchors[this.getAnchorsCount()-1];
for(var i=0; i < this.getAnchorsCount(); i++){ for(var i=0; i < this.getAnchorsCount(); i++){
var anchor = this.anchors[i]; var anchor = this.anchors[i];
if (anchor.type == type) { if (anchor.type == type) {
@ -190,9 +190,9 @@ Polyline.prototype = {
} }
return null; return null;
}, },
addNewPoint: function(position, x, y){ addNewPoint: function(position, x, y){
// //
for(var i = 0; i < this.getLinesCount(); i++){ for(var i = 0; i < this.getLinesCount(); i++){
var line = this.getLine(i); var line = this.getLine(i);
if (x > line.x1 && x < line.x2 && y > line.y1 && y < line.y2) { if (x > line.x1 && x < line.x2 && y > line.y1 && y < line.y2) {
@ -200,48 +200,48 @@ Polyline.prototype = {
break; break;
} }
} }
this.rebuildPath(); this.rebuildPath();
}, },
rebuildPath: function(){ rebuildPath: function(){
var path = []; var path = [];
for(var i = 0; i < this.getAnchorsCount(); i++){ for(var i = 0; i < this.getAnchorsCount(); i++){
var anchor = this.getAnchor(i); var anchor = this.getAnchor(i);
var pathType = "" var pathType = "";
if (i==0) if (i==0)
pathType = "M"; pathType = "M";
else else
pathType = "L"; pathType = "L";
// TODO: save previous points and calculate new path just if points are updated, and then save currents values as previous // 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; var targetX = anchor.x, targetY = anchor.y;
if (i>0 && i < this.getAnchorsCount()-1) { if (i>0 && i < this.getAnchorsCount()-1) {
// get new x,y // get new x,y
var cx = anchor.x, cy = anchor.y; var cx = anchor.x, cy = anchor.y;
// pivot point of prev line // pivot point of prev line
var AO = this.getLineLength(i-1); var AO = this.getLineLength(i-1);
if (AO < this.radius) { if (AO < this.radius) {
AO = this.radius; AO = this.radius;
} }
this.isDefaultConditionAvailable = (this.isDefaultConditionAvailable || (i == 1 && AO > 10)); this.isDefaultConditionAvailable = (this.isDefaultConditionAvailable || (i == 1 && AO > 10));
//console.log("isDefaultConditionAvailable", this.isDefaultConditionAvailable); //console.log("isDefaultConditionAvailable", this.isDefaultConditionAvailable);
var ED = this.getLineLengthY(i-1) * this.radius / AO; var ED = this.getLineLengthY(i-1) * this.radius / AO;
var OD = this.getLineLengthX(i-1) * this.radius / AO; var OD = this.getLineLengthX(i-1) * this.radius / AO;
targetX = anchor.x - OD; targetX = anchor.x - OD;
targetY = anchor.y - ED; targetY = anchor.y - ED;
if (AO < 2*this.radius && i>1) { if (AO < 2*this.radius && i>1) {
targetX = anchor.x - this.getLineLengthX(i-1)/2; 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 // pivot point of next line
var AO = this.getLineLength(i); var AO = this.getLineLength(i);
if (AO < this.radius) { if (AO < this.radius) {
@ -251,25 +251,25 @@ Polyline.prototype = {
var OD = this.getLineLengthX(i) * this.radius / AO; var OD = this.getLineLengthX(i) * this.radius / AO;
var nextSrcX = anchor.x + OD; var nextSrcX = anchor.x + OD;
var nextSrcY = anchor.y + ED; var nextSrcY = anchor.y + ED;
if (AO < 2*this.radius && i<this.getAnchorsCount()-2) { if (AO < 2*this.radius && i<this.getAnchorsCount()-2) {
nextSrcX = anchor.x + this.getLineLengthX(i)/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, var dx0 = (cx - targetX) / 3,
dy0 = (cy - targetY) / 3, dy0 = (cy - targetY) / 3,
ax = cx - dx0, ax = cx - dx0,
ay = cy - dy0, ay = cy - dy0,
dx1 = (cx - nextSrcX) / 3, dx1 = (cx - nextSrcX) / 3,
dy1 = (cy - nextSrcY) / 3, dy1 = (cy - nextSrcY) / 3,
bx = cx - dx1, bx = cx - dx1,
by = cy - dy1, by = cy - dy1,
zx=nextSrcX, zy=nextSrcY; zx=nextSrcX, zy=nextSrcY;
if (this.showDetails) { 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"+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": "- "}); 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; targetX += 0.5;
targetY += 0.5; targetY += 0.5;
} }
path.push([pathType, targetX, targetY]); path.push([pathType, targetX, targetY]);
if (i>0 && i < this.getAnchorsCount()-1) { if (i>0 && i < this.getAnchorsCount()-1) {
path.push(["C", ax, ay, bx, by, zx, zy]); path.push(["C", ax, ay, bx, by, zx, zy]);
} }
} }
if (this.closePath) { if (this.closePath) {
console.log("closePath:", this.closePath); console.log("closePath:", this.closePath);
path.push(["Z"]); path.push(["Z"]);
} }
this.path = path; this.path = path;
}, },
transform: function(transformation){ transform: function(transformation){
this.element.transform(transformation); this.element.transform(transformation);
}, },
@ -328,20 +328,20 @@ function Polygone(points, strokeWidth) {
* {x: 650, y: 370}]; 4 * {x: 650, y: 370}]; 4
*/ */
this.points = points; this.points = points;
/* /*
* path for graph * path for graph
* [["M", x1, y1], ["L", x2, y2], ["C", ax, ay, bx, by, x3, y3], ["L", x3, y3]] * [["M", x1, y1], ["L", x2, y2], ["C", ax, ay, bx, by, x3, y3], ["L", x3, y3]]
*/ */
this.path = []; this.path = [];
this.anchors = []; this.anchors = [];
if (strokeWidth) this.strokeWidth = strokeWidth; if (strokeWidth) this.strokeWidth = strokeWidth;
this.closePath = true; this.closePath = true;
this.init(); this.init();
}; }
/* /*
@ -358,30 +358,30 @@ Polygone.prototype.rebuildPath = function(){
//console.log("Polygone rebuildPath"); //console.log("Polygone rebuildPath");
for(var i = 0; i < this.getAnchorsCount(); i++){ for(var i = 0; i < this.getAnchorsCount(); i++){
var anchor = this.getAnchor(i); var anchor = this.getAnchor(i);
var pathType = "" var pathType = "";
if (i==0) if (i==0)
pathType = "M"; pathType = "M";
else else
pathType = "L"; pathType = "L";
var targetX = anchor.x, targetY = anchor.y; var targetX = anchor.x, targetY = anchor.y;
// anti smoothing // anti smoothing
if (this.strokeWidth%2 == 1) { if (this.strokeWidth%2 == 1) {
targetX += 0.5; targetX += 0.5;
targetY += 0.5; targetY += 0.5;
} }
path.push([pathType, targetX, targetY]); path.push([pathType, targetX, targetY]);
} }
if (this.closePath) if (this.closePath)
path.push(["Z"]); path.push(["Z"]);
this.path = path; this.path = path;
}; };
/* /*
Polygone.prototype.transform = function(transformation){ Polygone.prototype.transform = function(transformation){
this.element.transform(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 ) { if ( value === null ) {
jQuery.removeAttr( elem, name ); jQuery.removeAttr( elem, name );
return;
} else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) { } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
return ret; return ret;
@ -3885,7 +3885,7 @@ var Sizzle = function( selector, context, results, seed ) {
if ( context.nodeType !== 1 && context.nodeType !== 9 ) { if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
return []; return [];
} }
if ( !selector || typeof selector !== "string" ) { if ( !selector || typeof selector !== "string" ) {
return results; return results;
} }
@ -3895,7 +3895,7 @@ var Sizzle = function( selector, context, results, seed ) {
contextXML = Sizzle.isXML( context ), contextXML = Sizzle.isXML( context ),
parts = [], parts = [],
soFar = selector; soFar = selector;
// Reset the position of the chunker regexp (start from head) // Reset the position of the chunker regexp (start from head)
do { do {
chunker.exec( "" ); chunker.exec( "" );
@ -3903,9 +3903,9 @@ var Sizzle = function( selector, context, results, seed ) {
if ( m ) { if ( m ) {
soFar = m[3]; soFar = m[3];
parts.push( m[1] ); parts.push( m[1] );
if ( m[2] ) { if ( m[2] ) {
extra = m[3]; extra = m[3];
break; break;
@ -3929,7 +3929,7 @@ var Sizzle = function( selector, context, results, seed ) {
if ( Expr.relative[ selector ] ) { if ( Expr.relative[ selector ] ) {
selector += parts.shift(); selector += parts.shift();
} }
set = posProcess( selector, set, seed ); 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++ ) { for ( i = 0, len = Expr.order.length; i < len; i++ ) {
type = Expr.order[i]; type = Expr.order[i];
if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
left = match[1]; left = match[1];
match.splice( 1, 1 ); match.splice( 1, 1 );
@ -4429,7 +4429,7 @@ var Expr = Sizzle.selectors = {
ATTR: function( match, curLoop, inplace, result, not, isXML ) { ATTR: function( match, curLoop, inplace, result, not, isXML ) {
var name = match[1] = match[1].replace( rBackslash, "" ); var name = match[1] = match[1].replace( rBackslash, "" );
if ( !isXML && Expr.attrMap[name] ) { if ( !isXML && Expr.attrMap[name] ) {
match[1] = 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] ) ) { } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
return true; return true;
} }
return match; return match;
}, },
@ -4473,7 +4473,7 @@ var Expr = Sizzle.selectors = {
return match; return match;
} }
}, },
filters: { filters: {
enabled: function( elem ) { enabled: function( elem ) {
return elem.disabled === false && elem.type !== "hidden"; return elem.disabled === false && elem.type !== "hidden";
@ -4486,14 +4486,14 @@ var Expr = Sizzle.selectors = {
checked: function( elem ) { checked: function( elem ) {
return elem.checked === true; return elem.checked === true;
}, },
selected: function( elem ) { selected: function( elem ) {
// Accessing this property makes selected-by-default // Accessing this property makes selected-by-default
// options in Safari work properly // options in Safari work properly
if ( elem.parentNode ) { if ( elem.parentNode ) {
elem.parentNode.selectedIndex; elem.parentNode.selectedIndex;
} }
return elem.selected === true; return elem.selected === true;
}, },
@ -4515,7 +4515,7 @@ var Expr = Sizzle.selectors = {
text: function( elem ) { text: function( elem ) {
var attr = elem.getAttribute( "type" ), type = elem.type; 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 // use getAttribute instead to test this case
return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null ); return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null );
}, },
@ -4634,21 +4634,21 @@ var Expr = Sizzle.selectors = {
case "only": case "only":
case "first": case "first":
while ( (node = node.previousSibling) ) { while ( (node = node.previousSibling) ) {
if ( node.nodeType === 1 ) { if ( node.nodeType === 1 ) {
return false; return false;
} }
} }
if ( type === "first" ) { if ( type === "first" ) {
return true; return true;
} }
node = elem; node = elem;
case "last": case "last":
while ( (node = node.nextSibling) ) { while ( (node = node.nextSibling) ) {
if ( node.nodeType === 1 ) { if ( node.nodeType === 1 ) {
return false; return false;
} }
} }
@ -4661,22 +4661,22 @@ var Expr = Sizzle.selectors = {
if ( first === 1 && last === 0 ) { if ( first === 1 && last === 0 ) {
return true; return true;
} }
doneName = match[0]; doneName = match[0];
parent = elem.parentNode; parent = elem.parentNode;
if ( parent && (parent[ expando ] !== doneName || !elem.nodeIndex) ) { if ( parent && (parent[ expando ] !== doneName || !elem.nodeIndex) ) {
count = 0; count = 0;
for ( node = parent.firstChild; node; node = node.nextSibling ) { for ( node = parent.firstChild; node; node = node.nextSibling ) {
if ( node.nodeType === 1 ) { if ( node.nodeType === 1 ) {
node.nodeIndex = ++count; node.nodeIndex = ++count;
} }
} }
parent[ expando ] = doneName; parent[ expando ] = doneName;
} }
diff = elem.nodeIndex - last; diff = elem.nodeIndex - last;
if ( first === 0 ) { if ( first === 0 ) {
@ -4695,7 +4695,7 @@ var Expr = Sizzle.selectors = {
TAG: function( elem, match ) { TAG: function( elem, match ) {
return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match; return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match;
}, },
CLASS: function( elem, match ) { CLASS: function( elem, match ) {
return (" " + (elem.className || elem.getAttribute("class")) + " ") return (" " + (elem.className || elem.getAttribute("class")) + " ")
.indexOf( match ) > -1; .indexOf( match ) > -1;
@ -4765,7 +4765,7 @@ var makeArray = function( array, results ) {
results.push.apply( results, array ); results.push.apply( results, array );
return results; return results;
} }
return array; return array;
}; };
@ -4997,7 +4997,7 @@ if ( document.querySelectorAll ) {
if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
return; return;
} }
Sizzle = function( query, context, extra, seed ) { Sizzle = function( query, context, extra, seed ) {
context = context || document; context = context || document;
@ -5006,24 +5006,24 @@ if ( document.querySelectorAll ) {
if ( !seed && !Sizzle.isXML(context) ) { if ( !seed && !Sizzle.isXML(context) ) {
// See if we find a selector to speed up // See if we find a selector to speed up
var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query ); var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query );
if ( match && (context.nodeType === 1 || context.nodeType === 9) ) { if ( match && (context.nodeType === 1 || context.nodeType === 9) ) {
// Speed-up: Sizzle("TAG") // Speed-up: Sizzle("TAG")
if ( match[1] ) { if ( match[1] ) {
return makeArray( context.getElementsByTagName( query ), extra ); return makeArray( context.getElementsByTagName( query ), extra );
// Speed-up: Sizzle(".CLASS") // Speed-up: Sizzle(".CLASS")
} else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) { } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) {
return makeArray( context.getElementsByClassName( match[2] ), extra ); return makeArray( context.getElementsByClassName( match[2] ), extra );
} }
} }
if ( context.nodeType === 9 ) { if ( context.nodeType === 9 ) {
// Speed-up: Sizzle("body") // Speed-up: Sizzle("body")
// The body element only exists once, optimize finding it // The body element only exists once, optimize finding it
if ( query === "body" && context.body ) { if ( query === "body" && context.body ) {
return makeArray( [ context.body ], extra ); return makeArray( [ context.body ], extra );
// Speed-up: Sizzle("#ID") // Speed-up: Sizzle("#ID")
} else if ( match && match[3] ) { } else if ( match && match[3] ) {
var elem = context.getElementById( match[3] ); var elem = context.getElementById( match[3] );
@ -5036,12 +5036,12 @@ if ( document.querySelectorAll ) {
if ( elem.id === match[3] ) { if ( elem.id === match[3] ) {
return makeArray( [ elem ], extra ); return makeArray( [ elem ], extra );
} }
} else { } else {
return makeArray( [], extra ); return makeArray( [], extra );
} }
} }
try { try {
return makeArray( context.querySelectorAll(query), extra ); return makeArray( context.querySelectorAll(query), extra );
} catch(qsaError) {} } catch(qsaError) {}
@ -5079,7 +5079,7 @@ if ( document.querySelectorAll ) {
} }
} }
} }
return oldSizzle(query, context, extra, seed); return oldSizzle(query, context, extra, seed);
}; };
@ -5106,7 +5106,7 @@ if ( document.querySelectorAll ) {
// This should fail with an exception // This should fail with an exception
// Gecko does not error, returns false instead // Gecko does not error, returns false instead
matches.call( document.documentElement, "[test!='']:sizzle" ); matches.call( document.documentElement, "[test!='']:sizzle" );
} catch( pseudoError ) { } catch( pseudoError ) {
pseudoWorks = true; pseudoWorks = true;
} }
@ -5116,7 +5116,7 @@ if ( document.querySelectorAll ) {
expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
if ( !Sizzle.isXML( node ) ) { if ( !Sizzle.isXML( node ) ) {
try { try {
if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) { if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {
var ret = matches.call( node, expr ); var ret = matches.call( node, expr );
@ -5153,7 +5153,7 @@ if ( document.querySelectorAll ) {
if ( div.getElementsByClassName("e").length === 1 ) { if ( div.getElementsByClassName("e").length === 1 ) {
return; return;
} }
Expr.order.splice(1, 0, "CLASS"); Expr.order.splice(1, 0, "CLASS");
Expr.find.CLASS = function( match, context, isXML ) { Expr.find.CLASS = function( match, context, isXML ) {
if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
@ -5204,7 +5204,7 @@ function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
if ( elem ) { if ( elem ) {
var match = false; var match = false;
elem = elem[dir]; elem = elem[dir];
while ( elem ) { while ( elem ) {
@ -5257,7 +5257,7 @@ if ( document.documentElement.contains ) {
Sizzle.isXML = function( elem ) { Sizzle.isXML = function( elem ) {
// documentElement is verified for cases where it doesn't yet exist // 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; var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
return documentElement ? documentElement.nodeName !== "HTML" : false; return documentElement ? documentElement.nodeName !== "HTML" : false;
@ -5374,11 +5374,11 @@ jQuery.fn.extend({
}, },
is: function( selector ) { is: function( selector ) {
return !!selector && ( return !!selector && (
typeof selector === "string" ? typeof selector === "string" ?
// If this is a positional selector, check membership in the returned set // 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". // 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( selector, this.context ).index( this[0] ) >= 0 :
jQuery.filter( selector, this ).length > 0 : jQuery.filter( selector, this ).length > 0 :
this.filter( selector ).length > 0 ); this.filter( selector ).length > 0 );
@ -5386,7 +5386,7 @@ jQuery.fn.extend({
closest: function( selectors, context ) { closest: function( selectors, context ) {
var ret = [], i, l, cur = this[0]; var ret = [], i, l, cur = this[0];
// Array (deprecated as of jQuery 1.7) // Array (deprecated as of jQuery 1.7)
if ( jQuery.isArray( selectors ) ) { if ( jQuery.isArray( selectors ) ) {
var level = 1; 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 paper = Raphael("holder");
//var curve = paper.ellipse(100, 100, 1, 1).attr({"stroke-width": 0, fill: Color.red}); //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 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", "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 font = {font: "11px Arial", opacity: 1, "fill": LABEL_COLOR};
var boxWidth = 100 var boxWidth = 100;
var AttributedStringIterator = function(text){ var AttributedStringIterator = function(text){
//this.text = this.rtrim(this.ltrim(text)); //this.text = this.rtrim(this.ltrim(text));
text = text.replace(/(\s)+/, " "); text = text.replace(/(\s)+/, " ");
@ -20,39 +20,39 @@
this.beginIndex = 0; this.beginIndex = 0;
this.endIndex = this.text.length; this.endIndex = this.text.length;
this.currentIndex = this.beginIndex; this.currentIndex = this.beginIndex;
//console.group("[AttributedStringIterator]"); //console.group("[AttributedStringIterator]");
var i = 0; var i = 0;
var string = this.text; var string = this.text;
var fullPos = 0; var fullPos = 0;
//console.log("string: \"" + string + "\", length: " + string.length); //console.log("string: \"" + string + "\", length: " + string.length);
this.startWordOffsets = []; this.startWordOffsets = [];
this.startWordOffsets.push(fullPos); this.startWordOffsets.push(fullPos);
// TODO: remove i 1000 // TODO: remove i 1000
while (i<1000) { while (i<1000) {
var pos = string.search(/[ \t\n\f-\.\,]/); var pos = string.search(/[ \t\n\f-\.\,]/);
if (pos == -1) if (pos == -1)
break; break;
// whitespace start // whitespace start
fullPos += pos; fullPos += pos;
string = string.substr(pos); string = string.substr(pos);
////console.log("fullPos: " + fullPos + ", pos: " + pos + ", string: ", string); ////console.log("fullPos: " + fullPos + ", pos: " + pos + ", string: ", string);
// remove whitespaces // remove whitespaces
var pos = string.search(/[^ \t\n\f-\.\,]/); var pos = string.search(/[^ \t\n\f-\.\,]/);
if (pos == -1) if (pos == -1)
break; break;
// whitespace end // whitespace end
fullPos += pos; fullPos += pos;
string = string.substr(pos); string = string.substr(pos);
////console.log("fullPos: " + fullPos); ////console.log("fullPos: " + fullPos);
this.startWordOffsets.push(fullPos); this.startWordOffsets.push(fullPos);
i++; i++;
} }
//console.log("startWordOffsets: ", this.startWordOffsets); //console.log("startWordOffsets: ", this.startWordOffsets);
@ -62,9 +62,9 @@
getEndIndex: function(pos){ getEndIndex: function(pos){
if (typeof(pos) == "undefined") if (typeof(pos) == "undefined")
return this.endIndex; return this.endIndex;
var string = this.text.substr(pos, this.endIndex - pos); var string = this.text.substr(pos, this.endIndex - pos);
var posEndOfLine = string.search(/[\n]/); var posEndOfLine = string.search(/[\n]/);
if (posEndOfLine == -1) if (posEndOfLine == -1)
return this.endIndex; return this.endIndex;
@ -77,13 +77,13 @@
isWhitespace: function(pos){ isWhitespace: function(pos){
var str = this.text[pos]; var str = this.text[pos];
var whitespaceChars = " \t\n\f"; var whitespaceChars = " \t\n\f";
return (whitespaceChars.indexOf(str) != -1); return (whitespaceChars.indexOf(str) != -1);
}, },
isNewLine: function(pos){ isNewLine: function(pos){
var str = this.text[pos]; var str = this.text[pos];
var whitespaceChars = "\n"; var whitespaceChars = "\n";
return (whitespaceChars.indexOf(str) != -1); return (whitespaceChars.indexOf(str) != -1);
}, },
preceding: function(pos){ preceding: function(pos){
@ -117,7 +117,7 @@
ltrim: function(str){ ltrim: function(str){
var patt2=/^\s+/g; var patt2=/^\s+/g;
return str.replace(patt2, ""); return str.replace(patt2, "");
}, },
rtrim: function(str){ rtrim: function(str){
var patt2=/\s+$/g; var patt2=/\s+$/g;
return str.replace(patt2, ""); return str.replace(patt2, "");
@ -129,13 +129,13 @@
return this.text[pos]; return this.text[pos];
} }
}; };
/* /*
var TextMeasurer = function(paper, text, fontAttrs){ var TextMeasurer = function(paper, text, fontAttrs){
this.text = text; this.text = text;
this.paper = paper; this.paper = paper;
this.fontAttrs = fontAttrs; this.fontAttrs = fontAttrs;
this.fStart = this.text.getBeginIndex(); this.fStart = this.text.getBeginIndex();
}; };
@ -147,21 +147,21 @@
} }
} }
*/ */
var LineBreakMeasurer = function(paper, text, fontAttrs){ var LineBreakMeasurer = function(paper, text, fontAttrs){
this.paper = paper; this.paper = paper;
this.text = new AttributedStringIterator(text); this.text = new AttributedStringIterator(text);
this.fontAttrs = fontAttrs; this.fontAttrs = fontAttrs;
if (this.text.getEndIndex() - this.text.getBeginIndex() < 1) { if (this.text.getEndIndex() - this.text.getBeginIndex() < 1) {
throw {message: "Text must contain at least one character.", code: "IllegalArgumentException"}; throw {message: "Text must contain at least one character.", code: "IllegalArgumentException"};
} }
//this.measurer = new TextMeasurer(paper, this.text, this.fontAttrs); //this.measurer = new TextMeasurer(paper, this.text, this.fontAttrs);
this.limit = this.text.getEndIndex(); this.limit = this.text.getEndIndex();
this.pos = this.start = this.text.getBeginIndex(); this.pos = this.start = this.text.getBeginIndex();
this.rafaelTextObject = this.paper.text(100, 100, this.text.text).attr(fontAttrs).attr("text-anchor", "start"); this.rafaelTextObject = this.paper.text(100, 100, this.text.text).attr(fontAttrs).attr("text-anchor", "start");
this.svgTextObject = this.rafaelTextObject[0]; this.svgTextObject = this.rafaelTextObject[0];
}; };
@ -173,11 +173,11 @@
if (offsetLimit <= this.pos) { if (offsetLimit <= this.pos) {
throw {message: "offsetLimit must be after current position", code: "IllegalArgumentException"}; throw {message: "offsetLimit must be after current position", code: "IllegalArgumentException"};
} }
var charAtMaxAdvance = this.getLineBreakIndex(this.pos, wrappingWidth); var charAtMaxAdvance = this.getLineBreakIndex(this.pos, wrappingWidth);
//charAtMaxAdvance --; //charAtMaxAdvance --;
//console.log("charAtMaxAdvance:", charAtMaxAdvance, ", [" + this.text.getCharAtPos(charAtMaxAdvance) + "]"); //console.log("charAtMaxAdvance:", charAtMaxAdvance, ", [" + this.text.getCharAtPos(charAtMaxAdvance) + "]");
if (charAtMaxAdvance == this.limit) { if (charAtMaxAdvance == this.limit) {
nextOffset = this.limit; nextOffset = this.limit;
//console.log("charAtMaxAdvance == this.limit"); //console.log("charAtMaxAdvance == this.limit");
@ -199,7 +199,7 @@
} }
*/ */
nextOffset = this.text.preceding(charAtMaxAdvance); nextOffset = this.text.preceding(charAtMaxAdvance);
if (nextOffset <= this.pos) { if (nextOffset <= this.pos) {
nextOffset = Math.max(this.pos+1, charAtMaxAdvance); nextOffset = Math.max(this.pos+1, charAtMaxAdvance);
} }
@ -224,15 +224,15 @@
} }
var result = this.text.getLayout(this.pos, layoutLimit); var result = this.text.getLayout(this.pos, layoutLimit);
//console.log("layout: \"" + result + "\""); //console.log("layout: \"" + result + "\"");
// remove end of line // remove end of line
//var posEndOfLine = this.text.getEndIndex(this.pos); //var posEndOfLine = this.text.getEndIndex(this.pos);
//if (posEndOfLine < result.length) //if (posEndOfLine < result.length)
// result = result.substr(0, posEndOfLine); // result = result.substr(0, posEndOfLine);
this.pos = layoutLimit; this.pos = layoutLimit;
//console.groupEnd(); //console.groupEnd();
return result; return result;
} else { } else {
@ -243,9 +243,9 @@
getLineBreakIndex: function(pos, wrappingWidth) { getLineBreakIndex: function(pos, wrappingWidth) {
//console.group("[getLineBreakIndex]"); //console.group("[getLineBreakIndex]");
//console.log("pos:"+pos + ", text: \""+ this.text.text.replace(/\n/g, "_").substr(pos, 1) + "\""); //console.log("pos:"+pos + ", text: \""+ this.text.text.replace(/\n/g, "_").substr(pos, 1) + "\"");
var bb = this.rafaelTextObject.getBBox(); var bb = this.rafaelTextObject.getBBox();
var charNum = -1; var charNum = -1;
try { try {
var svgPoint = this.svgTextObject.getStartPositionOfChar(pos); var svgPoint = this.svgTextObject.getStartPositionOfChar(pos);
@ -253,9 +253,9 @@
svgPoint.x = svgPoint.x + wrappingWidth; svgPoint.x = svgPoint.x + wrappingWidth;
//svgPoint.y = bb.y; //svgPoint.y = bb.y;
//console.log("svgPoint:", svgPoint); //console.log("svgPoint:", svgPoint);
//var dot = this.paper.ellipse(svgPoint.x, svgPoint.y, 1, 1).attr({"stroke-width": 0, fill: Color.red}); //var dot = this.paper.ellipse(svgPoint.x, svgPoint.y, 1, 1).attr({"stroke-width": 0, fill: Color.red});
charNum = this.svgTextObject.getCharNumAtPosition(svgPoint); charNum = this.svgTextObject.getCharNumAtPosition(svgPoint);
} catch (e){ } catch (e){
console.warn("getStartPositionOfChar error, pos:" + pos); console.warn("getStartPositionOfChar error, pos:" + pos);
@ -276,47 +276,47 @@
if (newLineIndex < charNum ) { if (newLineIndex < charNum ) {
console.log("newLineIndex <= charNum, newLineIndex:"+newLineIndex+", charNum:"+charNum, "\"" + this.text.text.substr(newLineIndex+1).replace(/\n/g, "↵") + "\""); console.log("newLineIndex <= charNum, newLineIndex:"+newLineIndex+", charNum:"+charNum, "\"" + this.text.text.substr(newLineIndex+1).replace(/\n/g, "↵") + "\"");
//console.groupEnd(); //console.groupEnd();
return newLineIndex; return newLineIndex;
} }
//var charAtMaxAdvance = this.text.text.substring(charNum, charNum + 1); //var charAtMaxAdvance = this.text.text.substring(charNum, charNum + 1);
var charAtMaxAdvance = this.text.getCharAtPos(charNum); var charAtMaxAdvance = this.text.getCharAtPos(charNum);
//console.log("!!charAtMaxAdvance: " + charAtMaxAdvance); //console.log("!!charAtMaxAdvance: " + charAtMaxAdvance);
//console.groupEnd(); //console.groupEnd();
return charNum; return charNum;
} }
}, },
getPosition: function() { getPosition: function() {
return this.pos; return this.pos;
} }
}; };
// ****** // ******
function drawMultilineText(text, x, y, boxWidth, boxHeight, options) { function drawMultilineText(text, x, y, boxWidth, boxHeight, options) {
var TEXT_PADDING = 3; var TEXT_PADDING = 3;
var width = boxWidth - (2 * TEXT_PADDING); var width = boxWidth - (2 * TEXT_PADDING);
if (boxHeight) if (boxHeight)
var height = boxHeight - (2 * TEXT_PADDING); var height = boxHeight - (2 * TEXT_PADDING);
var layouts = []; var layouts = [];
var measurer = new LineBreakMeasurer(paper, text, font); var measurer = new LineBreakMeasurer(paper, text, font);
var lineHeight = measurer.rafaelTextObject.getBBox().height; var lineHeight = measurer.rafaelTextObject.getBBox().height;
console.log("text: ", text.replace(/\n/g, "↵")); console.log("text: ", text.replace(/\n/g, "↵"));
if (height) { if (height) {
var availableLinesCount = parseInt(height/lineHeight); var availableLinesCount = parseInt(height/lineHeight);
console.log("availableLinesCount: " + availableLinesCount); console.log("availableLinesCount: " + availableLinesCount);
} }
var i = 1; var i = 1;
while (measurer.getPosition() < measurer.text.getEndIndex()) { while (measurer.getPosition() < measurer.text.getEndIndex()) {
var layout = measurer.nextLayout(width); var layout = measurer.nextLayout(width);
//console.log("LAYOUT: " + layout + ", getPosition: " + measurer.getPosition()); //console.log("LAYOUT: " + layout + ", getPosition: " + measurer.getPosition());
if (layout != null) { if (layout != null) {
if (!availableLinesCount || i < availableLinesCount) { if (!availableLinesCount || i < availableLinesCount) {
layouts.push(layout); layouts.push(layout);
@ -326,15 +326,15 @@
} }
} }
i++; i++;
}; }
console.log(layouts); console.log(layouts);
measurer.rafaelTextObject.attr({"text": layouts.join("\n")}); measurer.rafaelTextObject.attr({"text": layouts.join("\n")});
//measurer.rafaelTextObject.attr({"text-anchor": "end"}); //measurer.rafaelTextObject.attr({"text-anchor": "end"});
//measurer.rafaelTextObject.attr({"text-anchor": "middle"}); //measurer.rafaelTextObject.attr({"text-anchor": "middle"});
if (options) if (options)
measurer.rafaelTextObject.attr({"text-anchor": options["text-anchor"]}); measurer.rafaelTextObject.attr({"text-anchor": options["text-anchor"]});
var bb = measurer.rafaelTextObject.getBBox(); var bb = measurer.rafaelTextObject.getBBox();
//measurer.rafaelTextObject.attr({"x": x + boxWidth/2}); //measurer.rafaelTextObject.attr({"x": x + boxWidth/2});
if (options["vertical-align"] == "top") if (options["vertical-align"] == "top")
@ -342,21 +342,21 @@
else else
measurer.rafaelTextObject.attr({"y": y + height/2}); measurer.rafaelTextObject.attr({"y": y + height/2});
//var bb = measurer.rafaelTextObject.getBBox(); //var bb = measurer.rafaelTextObject.getBBox();
if (measurer.rafaelTextObject.attr("text-anchor") == "middle" ) if (measurer.rafaelTextObject.attr("text-anchor") == "middle" )
measurer.rafaelTextObject.attr("x", x + boxWidth/2 + TEXT_PADDING/2); measurer.rafaelTextObject.attr("x", x + boxWidth/2 + TEXT_PADDING/2);
else if (measurer.rafaelTextObject.attr("text-anchor") == "end" ) else if (measurer.rafaelTextObject.attr("text-anchor") == "end" )
measurer.rafaelTextObject.attr("x", x + boxWidth + TEXT_PADDING/2); measurer.rafaelTextObject.attr("x", x + boxWidth + TEXT_PADDING/2);
else else
measurer.rafaelTextObject.attr("x", x + boxWidth/2 - bb.width/2 + TEXT_PADDING/2); 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 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); 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); 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 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 textAreaCX = x + boxWidth/2;
var textAreaCY = y + height/2; var textAreaCY = y + height/2;
var dotLeftTop = paper.ellipse(x, y, 3, 3).attr({"stroke-width": 0, fill: Color.LightSteelBlue, stroke: "none"}); 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 boxStyle = {stroke: Color.LightSteelBlue2, "stroke-width": 1.0, "stroke-dasharray": "- "};
var rect = paper.rect(x+.5, y + .5, boxWidth, boxHeight).attr(boxStyle); var rect = paper.rect(x+.5, y + .5, boxWidth, boxHeight).attr(boxStyle);
} }
/* /*
for (var i=0; i<1; i++) { for (var i=0; i<1; i++) {
var t = text; var t = text;
//var t = "Высококвалифицирова"; //var t = "Высококвалифицирова";
var text = paper.text(300, 100, t).attr(font).attr("text-anchor", "start"); var text = paper.text(300, 100, t).attr(font).attr("text-anchor", "start");
var bbText = text.getBBox(); var bbText = text.getBBox();
paper.rect(300+.5, 100 + .5, bbText.width, bbText.height).attr({"stroke-width": 1}); paper.rect(300+.5, 100 + .5, bbText.width, bbText.height).attr({"stroke-width": 1});
console.log("t: ", t.replace(/\n/g, "↵")); console.log("t: ", t.replace(/\n/g, "↵"));
while (measurer.getPosition() < measurer.text.getEndIndex()) { while (measurer.getPosition() < measurer.text.getEndIndex()) {
var layout = measurer.nextLayout(width); var layout = measurer.nextLayout(width);
//console.log("LAYOUT: " + layout + ", getPosition: " + measurer.getPosition()); //console.log("LAYOUT: " + layout + ", getPosition: " + measurer.getPosition());
if (layout != null) if (layout != null)
layouts.push(layout); layouts.push(layout);
}; };
measurer.rafaelTextObject.attr("text", layouts.join("\n")); measurer.rafaelTextObject.attr("text", layouts.join("\n"));
var bb = measurer.rafaelTextObject.getBBox(); var bb = measurer.rafaelTextObject.getBBox();
var rect = paper.rect(bb.x+.5, bb.y + .5, bb.width, bb.height).attr({"stroke-width": 1}); var rect = paper.rect(bb.x+.5, bb.y + .5, bb.width, bb.height).attr({"stroke-width": 1});
lay.push(layouts); lay.push(layouts);
console.log(layouts); console.log(layouts);
} }
*/ */
var fitTextToWidth = function(original, width) { var fitTextToWidth = function(original, width) {
var text = original; var text = original;
// TODO: move attr on parameters // TODO: move attr on parameters
var attr = {font: "11px Arial", opacity: 0}; var attr = {font: "11px Arial", opacity: 0};
// remove length for "..." // remove length for "..."
var dots = paper.text(0, 0, "...").attr(attr).hide(); var dots = paper.text(0, 0, "...").attr(attr).hide();
var dotsBB = dots.getBBox(); var dotsBB = dots.getBBox();
var maxWidth = width - dotsBB.width; var maxWidth = width - dotsBB.width;
var textElement = paper.text(0, 0, text).attr(attr).hide(); var textElement = paper.text(0, 0, text).attr(attr).hide();
var bb = textElement.getBBox(); var bb = textElement.getBBox();
// it's a little bit incorrect with "..." // it's a little bit incorrect with "..."
while (bb.width > maxWidth && text.length > 0) { while (bb.width > maxWidth && text.length > 0) {
text = text.substring(0, text.length - 1); text = text.substring(0, text.length - 1);
@ -425,17 +425,17 @@
// remove element from paper // remove element from paper
textElement.remove(); textElement.remove();
if (text != original) { if (text != original) {
text = text + "..."; text = text + "...";
} }
return text; return text;
} };
var x=100, y=90, height=20; var x=100, y=90, height=20;
var options = {"text-anchor": "middle", "boxHeight": 150, "vertical-align": "top"}; var options = {"text-anchor": "middle", "boxHeight": 150, "vertical-align": "top"};
var options = {"boxHeight": 150, "vertical-align": "top"}; var options = {"boxHeight": 150, "vertical-align": "top"};
drawMultilineText(text, x, y, 150, 100, options); 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 * Activiti Modeler component part of the Activiti project
* Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either * License as published by the Free Software Foundation; either
@ -69,7 +69,7 @@ EDITOR.UTIL = {
visitedElementsArray.push(element.id); visitedElementsArray.push(element.id);
var property = element.properties[propertyType] var property = element.properties[propertyType];
if (property) { if (property) {
collectedProperties.push(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 * @author nicolas.peters
* *
* Contains all strings for German language. * Contains all strings for German language.
* Version 1 - 08/29/08 * 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.impFailedReq = "Anfrage für den Import der jPDL Datei ist fehlgeschlagen.";
ORYX.I18N.jPDLSupport.impFailedJson = "Transformation der jPDL Datei ist fehlgeschlagen."; ORYX.I18N.jPDLSupport.impFailedJson = "Transformation der jPDL Datei ist fehlgeschlagen.";
ORYX.I18N.jPDLSupport.impFailedJsonAbort = "Import abgebrochen."; 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.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.expFailedReq = "Anfrage für den Export des Models ist fehlgeschlagen.";
ORYX.I18N.jPDLSupport.expFailedXml = "Export nach jPDL ist fehlgeschlagen. Exporter meldet: "; 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"; ORYX.I18N.Save.dialogLabelComment = "Revisionskommentar";
if(!ORYX.I18N.Perspective) ORYX.I18N.Perspective = {}; if(!ORYX.I18N.Perspective) ORYX.I18N.Perspective = {};
ORYX.I18N.Perspective.no = "Keine Perspektive" ORYX.I18N.Perspective.no = "Keine Perspektive";
ORYX.I18N.Perspective.noTip = "Zurücksetzen der aktuellen Perspektive" ORYX.I18N.Perspective.noTip = "Zurücksetzen der aktuellen Perspektive";
/** New Language Properties: 21.04.2009 */ /** New Language Properties: 21.04.2009 */
ORYX.I18N.JSONSupport = { ORYX.I18N.JSONSupport = {
@ -257,7 +257,7 @@ ORYX.I18N.JSONSupport = {
if(!ORYX.I18N.JSONImport) ORYX.I18N.JSONImport = {}; if(!ORYX.I18N.JSONImport) ORYX.I18N.JSONImport = {};
ORYX.I18N.JSONImport.title = "JSON Import"; 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 */ /** New Language Properties: 14.05.2009 */
if(!ORYX.I18N.RDFExport) ORYX.I18N.RDFExport = {}; 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_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_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_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={}; if(!ORYX.I18N.SyntaxChecker.PetriNet) ORYX.I18N.SyntaxChecker.PetriNet={};
ORYX.I18N.SyntaxChecker.PetriNet_NOT_BIPARTITE = "Der Graph ist nicht bepartit."; 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 */ /** 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_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_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.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."; 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 * @author nicolas.peters
* *
* Contains all strings for the default language (en-us). * Contains all strings for the default language (en-us).
* Version 1 - 08/29/08 * 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.impFailedReq = "Request for import of jPDL failed.";
ORYX.I18N.jPDLSupport.impFailedJson = "Transformation of jPDL failed."; ORYX.I18N.jPDLSupport.impFailedJson = "Transformation of jPDL failed.";
ORYX.I18N.jPDLSupport.impFailedJsonAbort = "Import aborted."; 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.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.expFailedReq = "Request for export of model failed.";
ORYX.I18N.jPDLSupport.expFailedXml = "Export to jPDL failed. Exporter reported: "; 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"; ORYX.I18N.Save.dialogLabelComment = "Revision comment";
if(!ORYX.I18N.Perspective) ORYX.I18N.Perspective = {}; if(!ORYX.I18N.Perspective) ORYX.I18N.Perspective = {};
ORYX.I18N.Perspective.no = "No Perspective" ORYX.I18N.Perspective.no = "No Perspective";
ORYX.I18N.Perspective.noTip = "Unload the current perspective" ORYX.I18N.Perspective.noTip = "Unload the current perspective";
/** New Language Properties: 21.04.2009 */ /** New Language Properties: 21.04.2009 */
ORYX.I18N.JSONSupport = { ORYX.I18N.JSONSupport = {
@ -297,7 +297,7 @@ ORYX.I18N.JSONSupport = {
if(!ORYX.I18N.JSONImport) ORYX.I18N.JSONImport = {}; if(!ORYX.I18N.JSONImport) ORYX.I18N.JSONImport = {};
ORYX.I18N.JSONImport.title = "JSON Import"; 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 */ /** New Language Properties: 14.05.2009 */
if(!ORYX.I18N.RDFExport) ORYX.I18N.RDFExport = {}; 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_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_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_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={}; if(!ORYX.I18N.SyntaxChecker.PetriNet) ORYX.I18N.SyntaxChecker.PetriNet={};
ORYX.I18N.SyntaxChecker.PetriNet_NOT_BIPARTITE = "The graph is not bipartite"; 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 */ /** 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_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_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.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."; 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.prevText = "Vorherige Seite";
Ext.PagingToolbar.prototype.nextText = "Nächste Seite"; Ext.PagingToolbar.prototype.nextText = "Nächste Seite";
Ext.PagingToolbar.prototype.lastText = "Letzte Seite"; Ext.PagingToolbar.prototype.lastText = "Letzte Seite";
ORYX.I18N.PropertyWindow.dateFormat = "d.m.y"; 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.saveAsTitle = "Kopie speichern...";
ORYX.I18N.Save.savedAs = "Kopie gespeichert"; ORYX.I18N.Save.savedAs = "Kopie gespeichert";
ORYX.I18N.Save.savedDescription = "Das kopierte Diagramm ist unter folgendem Link 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.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.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."; 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 = {};} if(!Signavio.I18N.field) {Signavio.I18N.field = {};}
Signavio.I18N.field.Url = "URL"; 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.saveAsTitle = "Save a copy...";
ORYX.I18N.Save.savedAs = "Copy saved"; ORYX.I18N.Save.savedAs = "Copy saved";
ORYX.I18N.Save.savedDescription = "The process diagram is stored under"; 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.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.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."; 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, //check whether getOwnPropertyDescriptor works if it's given. Otherwise,
//shim partially. //shim partially.
if (Object.defineProperty) { if (Object.defineProperty) {
var getOwnPropertyDescriptorWorksOnObject = var getOwnPropertyDescriptorWorksOnObject =
doesGetOwnPropertyDescriptorWork({}); doesGetOwnPropertyDescriptorWork({});
var getOwnPropertyDescriptorWorksOnDom = typeof document == "undefined" || var getOwnPropertyDescriptorWorksOnDom = typeof document == "undefined" ||
doesGetOwnPropertyDescriptorWork(document.createElement("div")); doesGetOwnPropertyDescriptorWork(document.createElement("div"));
if (!getOwnPropertyDescriptorWorksOnDom || if (!getOwnPropertyDescriptorWorksOnDom ||
!getOwnPropertyDescriptorWorksOnObject !getOwnPropertyDescriptorWorksOnObject
) { ) {
var getOwnPropertyDescriptorFallback = Object.getOwnPropertyDescriptor; var getOwnPropertyDescriptorFallback = Object.getOwnPropertyDescriptor;
@ -263,7 +263,7 @@ if (Object.defineProperty) {
if (!Object.defineProperty || definePropertyFallback) { if (!Object.defineProperty || definePropertyFallback) {
var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: "; 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 " + var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
"on this javascript engine"; "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 date;
} }
return NativeDate.apply(this, arguments); return NativeDate.apply(this, arguments);
}; }
// 15.9.1.15 Date Time String Format. // 15.9.1.15 Date Time String Format.
var isoDateExpression = new RegExp("^" + 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, l, i,
key, key,
actual = this.actual; actual = this.actual;
var getKeys = function(o) { var getKeys = function(o) {
var a = []; var a = [];
for(key in o) { for(key in o) {
@ -14,10 +14,10 @@ beforeEach(function() {
} }
} }
return a; return a;
} };
a1 = getKeys(actual); a1 = getKeys(actual);
a2 = getKeys(expected); a2 = getKeys(expected);
l = a1.length; l = a1.length;
if(l !== a2.length) { if(l !== a2.length) {
return false; return false;
@ -27,7 +27,7 @@ beforeEach(function() {
expect(key).toEqual(a2[i]); expect(key).toEqual(a2[i]);
expect(actual[key]).toEqual(expected[key]); expect(actual[key]).toEqual(expected[key]);
} }
return true; 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.css('width', $self.width());
shadow.html(val + (noFlickerPad === 0 ? '...' : '')); // Append '...' to resize pre-emptively. shadow.html(val + (noFlickerPad === 0 ? '...' : '')); // Append '...' to resize pre-emptively.
$self.height(Math.max(shadow.height() + noFlickerPad, minHeight)); $self.height(Math.max(shadow.height() + noFlickerPad, minHeight));
} };
$self.change(update).keyup(update).keydown({event:'keydown'},update); $self.change(update).keyup(update).keydown({event:'keydown'},update);
$(window).resize(update); $(window).resize(update);
@ -58,4 +58,4 @@
update(); 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" && stringify(0) === "0" &&
// FF 3.1b1, b2, and JSON 2 serialize wrapped primitives as object // FF 3.1b1, b2, and JSON 2 serialize wrapped primitives as object
// literals. // literals.
stringify(new Number()) === "0" && stringify(Number()) === "0" &&
stringify(new String()) == '""' && stringify(String()) == '""' &&
// FF 3.1b1, 2 throw an error if the value is `null`, `undefined`, or // FF 3.1b1, 2 throw an error if the value is `null`, `undefined`, or
// does not define a canonical JSON representation (this applies to // does not define a canonical JSON representation (this applies to
// objects with `toJSON` properties as well, *unless* they are nested // 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"; Svg.NAMESPACE="http://www.w3.org/2000/svg";
function 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.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;} 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.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;}; PathParser.prototype.setHandler=function(handler){this._handler=handler;};
PathLexer.VERSION=1.0; PathLexer.VERSION=1.0;
function PathLexer(pathData){if(pathData==null)pathData="";this.setPathData(pathData);} function PathLexer(pathData){if(pathData==null)pathData="";this.setPathData(pathData);}
@ -27,4 +27,4 @@ PathToken.NUMBER=2;
PathToken.EOD=3; PathToken.EOD=3;
function PathToken(type,text){if(arguments.length>0){this.init(type,text);}} 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.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() { }, emptyFunction: function() { },
K: function(x) { return x } K: function(x) { return x }
} };
var Class = { var Class = {
create: function() { create: function() {
@ -37,16 +37,16 @@ var Class = {
this.initialize.apply(this, arguments); this.initialize.apply(this, arguments);
} }
} }
} };
var Abstract = new Object(); var Abstract = {};
Object.extend = function(destination, source) { Object.extend = function(destination, source) {
for (var property in source) { for (var property in source) {
destination[property] = source[property]; destination[property] = source[property];
} }
return destination; return destination;
} };
Object.extend(Object, { Object.extend(Object, {
inspect: function(object) { inspect: function(object) {
@ -104,14 +104,14 @@ Function.prototype.bind = function() {
return function() { return function() {
return __method.apply(object, args.concat($A(arguments))); return __method.apply(object, args.concat($A(arguments)));
} }
} };
Function.prototype.bindAsEventListener = function(object) { Function.prototype.bindAsEventListener = function(object) {
var __method = this, args = $A(arguments), object = args.shift(); var __method = this, args = $A(arguments), object = args.shift();
return function(event) { return function(event) {
return __method.apply(object, [event || window.event].concat(args)); return __method.apply(object, [event || window.event].concat(args));
} }
} };
Object.extend(Number.prototype, { Object.extend(Number.prototype, {
toColorPart: function() { toColorPart: function() {
@ -160,7 +160,7 @@ var Try = {
return returnValue; return returnValue;
} }
} };
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
@ -194,7 +194,7 @@ PeriodicalExecuter.prototype = {
} }
} }
} }
} };
Object.extend(String, { Object.extend(String, {
interpret: function(value) { interpret: function(value) {
return value == null ? '' : String(value); return value == null ? '' : String(value);
@ -408,7 +408,7 @@ String.prototype.gsub.prepareReplacement = function(replacement) {
if (typeof replacement == 'function') return replacement; if (typeof replacement == 'function') return replacement;
var template = new Template(replacement); var template = new Template(replacement);
return function(match) { return template.evaluate(match) }; return function(match) { return template.evaluate(match) };
} };
String.prototype.parseQuery = String.prototype.toQueryParams; String.prototype.parseQuery = String.prototype.toQueryParams;
@ -434,7 +434,7 @@ Template.prototype = {
return before + String.interpret(object[match[3]]); return before + String.interpret(object[match[3]]);
}); });
} }
} };
var $break = {}, $continue = new Error('"throw $continue" is deprecated, use "return" instead'); var $break = {}, $continue = new Error('"throw $continue" is deprecated, use "return" instead');
@ -446,7 +446,7 @@ var Enumerable = {
iterator(value, index++); iterator(value, index++);
}); });
} catch (e) { } catch (e) {
if (e != $break) if (e != $break)
throw e; throw e;
} }
return this; return this;
@ -511,7 +511,7 @@ var Enumerable = {
var stringValue = value.toString(); var stringValue = value.toString();
if (stringValue.match(pattern)) if (stringValue.match(pattern))
results.push((iterator || Prototype.K)(value, index)); results.push((iterator || Prototype.K)(value, index));
}) });
return results; return results;
}, },
@ -625,7 +625,7 @@ var Enumerable = {
inspect: function() { inspect: function() {
return '#<Enumerable:' + this.toArray().inspect() + '>'; return '#<Enumerable:' + this.toArray().inspect() + '>';
} }
} };
Object.extend(Enumerable, { Object.extend(Enumerable, {
map: Enumerable.collect, map: Enumerable.collect,
@ -644,7 +644,7 @@ var $A = Array.from = function(iterable) {
results.push(iterable[i]); results.push(iterable[i]);
return results; return results;
} }
} };
if (Prototype.Browser.WebKit) { if (Prototype.Browser.WebKit) {
$A = Array.from = function(iterable) { $A = Array.from = function(iterable) {
@ -811,7 +811,7 @@ Hash.toQueryString.addPair = function(key, value, prefix) {
key = encodeURIComponent(key); key = encodeURIComponent(key);
if (value === undefined) this.push(key); if (value === undefined) this.push(key);
else this.push(key + '=' + (value == null ? '' : encodeURIComponent(value))); else this.push(key + '=' + (value == null ? '' : encodeURIComponent(value)));
} };
Object.extend(Hash.prototype, Enumerable); Object.extend(Hash.prototype, Enumerable);
Object.extend(Hash.prototype, { Object.extend(Hash.prototype, {
@ -876,7 +876,7 @@ Object.extend(Hash.prototype, {
function $H(object) { function $H(object) {
if (object instanceof Hash) return object; if (object instanceof Hash) return object;
return new Hash(object); return new Hash(object);
}; }
// Safari iterates over shadowed properties // Safari iterates over shadowed properties
if (function() { if (function() {
@ -924,7 +924,7 @@ Object.extend(ObjectRange.prototype, {
var $R = function(start, end, exclusive) { var $R = function(start, end, exclusive) {
return new ObjectRange(start, end, exclusive); return new ObjectRange(start, end, exclusive);
} };
var Ajax = { var Ajax = {
getTransport: function() { getTransport: function() {
@ -936,7 +936,7 @@ var Ajax = {
}, },
activeRequestCount: 0 activeRequestCount: 0
} };
Ajax.Responders = { Ajax.Responders = {
responders: [], responders: [],
@ -985,14 +985,14 @@ Ajax.Base.prototype = {
contentType: 'application/x-www-form-urlencoded', contentType: 'application/x-www-form-urlencoded',
encoding: 'UTF-8', encoding: 'UTF-8',
parameters: '' parameters: ''
} };
Object.extend(this.options, options || {}); Object.extend(this.options, options || {});
this.options.method = this.options.method.toLowerCase(); this.options.method = this.options.method.toLowerCase();
if (typeof this.options.parameters == 'string') if (typeof this.options.parameters == 'string')
this.options.parameters = this.options.parameters.toQueryParams(); this.options.parameters = this.options.parameters.toQueryParams();
} }
} };
Ajax.Request = Class.create(); Ajax.Request = Class.create();
Ajax.Request.Events = Ajax.Request.Events =
@ -1167,7 +1167,7 @@ Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), {
this.container = { this.container = {
success: (container.success || container), success: (container.success || container),
failure: (container.failure || (container.success ? null : container)) failure: (container.failure || (container.success ? null : container))
} };
this.transport = Ajax.getTransport(); this.transport = Ajax.getTransport();
this.setOptions(options); this.setOptions(options);
@ -1585,7 +1585,7 @@ Element.Methods = {
var elementStyle = element.style; var elementStyle = element.style;
for (var property in styles) for (var property in styles)
if (property == 'opacity') element.setOpacity(styles[property]) if (property == 'opacity') element.setOpacity(styles[property]);
else else
elementStyle[(property == 'float' || property == 'cssFloat') ? elementStyle[(property == 'float' || property == 'cssFloat') ?
(elementStyle.styleFloat === undefined ? 'cssFloat' : 'styleFloat') : (elementStyle.styleFloat === undefined ? 'cssFloat' : 'styleFloat') :
@ -1919,7 +1919,7 @@ var Toggle = { display: Element.toggle };
Abstract.Insertion = function(adjacency) { Abstract.Insertion = function(adjacency) {
this.adjacency = adjacency; this.adjacency = adjacency;
} };
Abstract.Insertion.prototype = { Abstract.Insertion.prototype = {
initialize: function(element, content) { initialize: function(element, content) {
@ -1951,9 +1951,9 @@ Abstract.Insertion.prototype = {
div.innerHTML = '<table><tbody>' + this.content + '</tbody></table>'; div.innerHTML = '<table><tbody>' + this.content + '</tbody></table>';
return $A(div.childNodes[0].childNodes[0].childNodes); return $A(div.childNodes[0].childNodes[0].childNodes);
} }
} };
var Insertion = new Object(); var Insertion = {};
Insertion.Before = Class.create(); Insertion.Before = Class.create();
Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), { Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), {
@ -2713,7 +2713,7 @@ Form.Methods = {
return new Ajax.Request(form.readAttribute('action'), options); return new Ajax.Request(form.readAttribute('action'), options);
} }
} };
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
@ -2727,7 +2727,7 @@ Form.Element = {
$(element).select(); $(element).select();
return element; return element;
} }
} };
Form.Element.Methods = { Form.Element.Methods = {
serialize: function(element) { serialize: function(element) {
@ -2781,7 +2781,7 @@ Form.Element.Methods = {
element.disabled = false; element.disabled = false;
return element; return element;
} }
} };
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
@ -2834,11 +2834,11 @@ Form.Element.Serializers = {
// extend element because hasAttribute may not be native // extend element because hasAttribute may not be native
return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text; return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text;
} }
} };
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
Abstract.TimedObserver = function() {} Abstract.TimedObserver = function() {};
Abstract.TimedObserver.prototype = { Abstract.TimedObserver.prototype = {
initialize: function(element, frequency, callback) { initialize: function(element, frequency, callback) {
this.frequency = frequency; this.frequency = frequency;
@ -2862,7 +2862,7 @@ Abstract.TimedObserver.prototype = {
this.lastValue = value; this.lastValue = value;
} }
} }
} };
Form.Element.Observer = Class.create(); Form.Element.Observer = Class.create();
Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { 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 = { Abstract.EventObserver.prototype = {
initialize: function(element, callback) { initialize: function(element, callback) {
this.element = $(element); this.element = $(element);
@ -2918,7 +2918,7 @@ Abstract.EventObserver.prototype = {
} }
} }
} }
} };
Form.Element.EventObserver = Class.create(); Form.Element.EventObserver = Class.create();
Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {
@ -2934,7 +2934,7 @@ Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {
} }
}); });
if (!window.Event) { if (!window.Event) {
var Event = new Object(); var Event = {};
} }
Object.extend(Event, { Object.extend(Event, {
@ -3181,7 +3181,7 @@ var Position = {
setHeight: true, setHeight: true,
offsetTop: 0, offsetTop: 0,
offsetLeft: 0 offsetLeft: 0
}, arguments[2] || {}) }, arguments[2] || {});
// find page position of source // find page position of source
source = $(source); source = $(source);
@ -3248,7 +3248,7 @@ var Position = {
element.style.height = element._originalHeight; element.style.height = element._originalHeight;
element.style.width = element._originalWidth; element.style.width = element._originalWidth;
} }
} };
// Safari returns margins on body which is incorrect if the child is absolutely // Safari returns margins on body which is incorrect if the child is absolutely
// positioned. For performance reasons, redefine Position.cumulativeOffset for // 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.ByteArrayOutputStream;
import java.io.InputStream; import java.io.InputStream;
import java.net.URL; import java.net.URL;
import java.nio.charset.StandardCharsets;
/** /**
* @Description 万维易源-api工具类 * @Description 万维易源-api工具类
@ -19,13 +20,13 @@ import java.net.URL;
*/ */
public class ShowApiUtil { public class ShowApiUtil {
private static Logger logger = LoggerFactory.getLogger(ShowApiUtil.class); private static Logger logger = LoggerFactory.getLogger(ShowApiUtil.class);
/** /**
* @return com.epmet.result.showapi.ShowApiResult * @return com.epmet.result.showapi.ShowApiResult
* @param day 输入格式yyyyMMdd如果不输入则默认是当天 * @param day 输入格式yyyyMMdd如果不输入则默认是当天
* @Author yinzuomei * @Author yinzuomei
* @Description 2020年我国节假日查询 * @Description 2020年我国节假日查询
* @Date 2020/5/11 21:20 * @Date 2020/5/11 21:20
**/ **/
public static DayDetailResultDTO queryHolidayV2020(String day) throws Exception { public static DayDetailResultDTO queryHolidayV2020(String day) throws Exception {
String url=String.format(ShowApiConstant.QUERY_HOLIDAY_V2020,ShowApiConstant.SHOWAPI_APPID,ShowApiConstant.SHOWAPI_SIGN,day); 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(); InputStream in = u.openStream();
ByteArrayOutputStream out = new ByteArrayOutputStream(); ByteArrayOutputStream out = new ByteArrayOutputStream();
try { try {
byte buf[] = new byte[1024]; byte[] buf = new byte[1024];
int read = 0; int read = 0;
while ((read = in .read(buf)) > 0) { while ((read = in .read(buf)) > 0) {
out.write(buf, 0, read); out.write(buf, 0, read);
@ -44,15 +45,15 @@ public class ShowApiUtil {
in .close(); in .close();
} }
} }
byte b[] = out.toByteArray(); byte[] b = out.toByteArray();
String resultStr=new String(b, "utf-8"); String resultStr=new String(b, StandardCharsets.UTF_8);
logger.info(String.format("(2)QUERY_HOLIDAY_V2020返参:%s",resultStr)); logger.info(String.format("(2)QUERY_HOLIDAY_V2020返参:%s",resultStr));
JSONObject jsonobject = JSONObject.parseObject(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()); logger.info(showApiResult.toString());
JSONObject holidayJsonObject = JSONObject.parseObject(showApiResult.getShowapi_res_body()); 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())); logger.info(String.format("(3)QUERY_HOLIDAY_V2020返参:%s",dayDetailResultDTO.toString()));
return dayDetailResultDTO; return dayDetailResultDTO;
} }
@ -63,7 +64,7 @@ public class ShowApiUtil {
* @param year * @param year
* @Author yinzuomei * @Author yinzuomei
* @Description 根据年份查询当年的节假日列表 * @Description 根据年份查询当年的节假日列表
* @Date 2020/5/11 22:58 * @Date 2020/5/11 22:58
**/ **/
public static HolidayResultDTO holidayList(String year) throws Exception { public static HolidayResultDTO holidayList(String year) throws Exception {
String url=String.format(ShowApiConstant.HOLIDAY_LIST,ShowApiConstant.SHOWAPI_APPID,ShowApiConstant.SHOWAPI_SIGN,year); 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(); InputStream in = u.openStream();
ByteArrayOutputStream out = new ByteArrayOutputStream(); ByteArrayOutputStream out = new ByteArrayOutputStream();
try { try {
byte buf[] = new byte[1024]; byte[] buf = new byte[1024];
int read = 0; int read = 0;
while ((read = in .read(buf)) > 0) { while ((read = in .read(buf)) > 0) {
out.write(buf, 0, read); out.write(buf, 0, read);
@ -82,15 +83,15 @@ public class ShowApiUtil {
in .close(); in .close();
} }
} }
byte b[] = out.toByteArray(); byte[] b = out.toByteArray();
String resultStr=new String(b, "utf-8"); String resultStr=new String(b, StandardCharsets.UTF_8);
logger.info(String.format("(2)HOLIDAY_LIST返参:%s",resultStr)); logger.info(String.format("(2)HOLIDAY_LIST返参:%s",resultStr));
JSONObject jsonobject = JSONObject.parseObject(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()); logger.info(showApiResult.toString());
JSONObject holidayJsonObject = JSONObject.parseObject(showApiResult.getShowapi_res_body()); 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())); logger.info(String.format("(3)HOLIDAY_LIST返参:%s",holidayResultDTO.toString()));
return holidayResultDTO; 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) { protected boolean validTimeStamp(Long timestamp) {
long now = System.currentTimeMillis(); long now = System.currentTimeMillis();
if (Math.abs(now - timestamp) > diffMillins) { return Math.abs(now - timestamp) <= diffMillins;
return false;
}
return true;
} }
/** /**

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; //服务方类型:志愿者: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.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; 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); res.setStatusName(statusMap.containsKey(res.getStatus())?statusMap.get(res.getStatus()):StrConstant.EPMETY_STR);
//服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit; //服务方类型:志愿者: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.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); return new PageData<>(list, total);
@ -1443,4 +1443,5 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
messageOpenFeignClient.saveUserMessage(userMessage); 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); 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); 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>(); Set<String> members=new LinkedHashSet<String>();
members.addAll(formDTO.getStaffIdList()); members.addAll(formDTO.getStaffIdList());
members.addAll(orgStaffIds); members.addAll(orgStaffIds);
if(CollectionUtils.isNotEmpty(members)&&members.contains(formDTO.getUserId())){ if(CollectionUtils.isNotEmpty(members)){
members.remove(formDTO.getUserId()); members.remove(formDTO.getUserId());
} }
if(CollectionUtils.isEmpty(members)){ 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()); Set<String> members = new LinkedHashSet<>(CollectionUtils.size(staffIdList) + orgStaffIds.size());
members.addAll(staffIdList); members.addAll(staffIdList);
members.addAll(orgStaffIds); members.addAll(orgStaffIds);
if (CollectionUtils.isNotEmpty(members) && members.contains(operatorId)) { if (CollectionUtils.isNotEmpty(members)) {
members.remove(operatorId); members.remove(operatorId);
} }
if (CollectionUtils.isEmpty(members)) { if (CollectionUtils.isEmpty(members)) {
@ -526,4 +526,4 @@ public class InfoServiceImpl extends BaseServiceImpl<InfoDao, InfoEntity> implem
} }
return groupEntity; 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) -> { groupByCustomer.forEach((customerId,v) -> {
parameterResult.forEach(p -> { parameterResult.forEach(p -> {
if (customerId.equals(p.getCustomerId())){ 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())); 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())){ if (workTemplate.getTid().equals(msg.getBehaviorType())){
templateId = workTemplate.getTemplateId(); templateId = workTemplate.getTemplateId();
break; break;
}; }
} }
} else if (WxmpMessageConstant.RESI.equals(msg.getClientType())&& resiTemplates.size() > NumConstant.ZERO) { } else if (WxmpMessageConstant.RESI.equals(msg.getClientType())&& resiTemplates.size() > NumConstant.ZERO) {
for (TemplateListV2ResultDTO resiTemplate : resiTemplates) { for (TemplateListV2ResultDTO resiTemplate : resiTemplates) {
if (resiTemplate.getTid().equals(msg.getBehaviorType())){ if (resiTemplate.getTid().equals(msg.getBehaviorType())){
templateId = resiTemplate.getTemplateId(); templateId = resiTemplate.getTemplateId();
break; break;
}; }
} }
}else { }else {
throw new WxSubscribeException("获取模板id失败", "", openId); throw new WxSubscribeException("获取模板id失败", "", openId);
@ -532,7 +532,7 @@ public class WxmpMessageServiceImpl implements WxmpMessageService {
} else if (WxmpMessageConstant.GOV_DB.equals(clientType)) { } else if (WxmpMessageConstant.GOV_DB.equals(clientType)) {
StaffBasicInfoFormDTO staffBasicInfoFormDTO = new StaffBasicInfoFormDTO(); StaffBasicInfoFormDTO staffBasicInfoFormDTO = new StaffBasicInfoFormDTO();
staffBasicInfoFormDTO.setStaffId(userId); staffBasicInfoFormDTO.setStaffId(userId);
Result<StaffBasicInfo> staffBasicInfo = epmetUserOpenFeignClient.getStaffBasicInfo(staffBasicInfoFormDTO);; Result<StaffBasicInfo> staffBasicInfo = epmetUserOpenFeignClient.getStaffBasicInfo(staffBasicInfoFormDTO);
if (staffBasicInfo.getCode() != 0){ if (staffBasicInfo.getCode() != 0){
throw new Exception(staffBasicInfo.getInternalMsg()); throw new Exception(staffBasicInfo.getInternalMsg());
}else { }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){ 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){ public Object lindex(String userId,Long index){
return redisUtils.lindex(RedisKeys.getPointVerificationResultKey(userId),index); return redisUtils.lindex(RedisKeys.getPointVerificationResultKey(userId),index);
@ -31,7 +31,7 @@ public class PointRedis {
} }
public String checkIfQrCodeExpire(String shortId){ public String checkIfQrCodeExpire(String shortId){
String userId = (String)redisUtils.getString(RedisKeys.getShortUserIdKey(shortId)); String userId = redisUtils.getString(RedisKeys.getShortUserIdKey(shortId));
return userId; 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)); log.error("list ruleId:{} have not pointUnit or pointNum,pointRule:{}", JSON.toJSONString(pointRuleEntity));
return null; 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())); resultDTO.setPointValue(pointRuleEntity.getPoint().toString().concat("分").concat(StrConstant.SEPARATOR).concat(pointUnitEnum.getDesc()));
return resultDTO; return resultDTO;
}).filter(fun -> fun != null).collect(Collectors.toList()); }).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); PointDetailResultDTO resultDTO = ConvertUtils.sourceToTarget(pointRuleEntity, PointDetailResultDTO.class);
resultDTO.setRuleId(pointRuleEntity.getId()); 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()); resultDTO.setPointUnitDesc(PointUnitEnum.getEnum(pointRuleEntity.getPointUnit()).getDesc());
return resultDTO; return resultDTO;
} }
@ -205,7 +205,7 @@ public class PointRuleServiceImpl extends BaseServiceImpl<PointRuleDao, PointRul
SendMqMsgUtil.build().openFeignClient(epmetMessageOpenFeignClient).sendPointRuleChangedMqMsg(msg); SendMqMsgUtil.build().openFeignClient(epmetMessageOpenFeignClient).sendPointRuleChangedMqMsg(msg);
} }
} }
/** /**
* @Description 变更处理 * @Description 变更处理
* @Param f * @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); 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); LocalDateTime endOfDay = localDateTime.with(LocalTime.MAX);
return Date.from(endOfDay.atZone(ZoneId.systemDefault()).toInstant()); 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) { public boolean isRegistered(String customerId, String platformId) {
ThirdplatformCustomerRegisterDao tpcRegDao = SpringContextUtils.getBean(ThirdplatformCustomerRegisterDao.class); ThirdplatformCustomerRegisterDao tpcRegDao = SpringContextUtils.getBean(ThirdplatformCustomerRegisterDao.class);
ThirdplatformCustomerRegisterEntity tpcReg = tpcRegDao.getByCustomerIdAndPlatformId(customerId, platformId); ThirdplatformCustomerRegisterEntity tpcReg = tpcRegDao.getByCustomerIdAndPlatformId(customerId, platformId);
if (tpcReg == null) { return tpcReg != null;
return false;
}
return true;
} }
/** /**
@ -196,7 +193,7 @@ public abstract class ApiService<R> {
if (queryParams == null || queryParams.size() == 0) { if (queryParams == null || queryParams.size() == 0) {
return ""; return "";
} }
StringBuilder sb = new StringBuilder(""); StringBuilder sb = new StringBuilder();
queryParams.entrySet().forEach(entry -> { queryParams.entrySet().forEach(entry -> {
String key = entry.getKey(); String key = entry.getKey();
String value = entry.getValue(); String value = entry.getValue();
@ -420,7 +417,7 @@ public abstract class ApiService<R> {
*/ */
public void pushComponentAccessToken(ComponentAccessTokenFormDTO form, String platformId, String platformKey) {} public void pushComponentAccessToken(ComponentAccessTokenFormDTO form, String platformId, String platformKey) {}
/** /**
* @description 推送小程序token * @description 推送小程序token
* *
@ -431,5 +428,5 @@ public abstract class ApiService<R> {
* @author wxz * @author wxz
* @date 2021.08.31 20:26:51 * @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.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec; import javax.crypto.spec.SecretKeySpec;
import java.nio.charset.Charset; import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.Arrays; import java.util.Arrays;
/** /**
@ -16,7 +17,7 @@ import java.util.Arrays;
*/ */
public class AesDecryptUtil { public class AesDecryptUtil {
private static Charset CHARSET = Charset.forName("utf-8"); private static Charset CHARSET = StandardCharsets.UTF_8;
private Cipher decCipher; private Cipher decCipher;
/** /**
@ -93,4 +94,4 @@ public class AesDecryptUtil {
return xmlContent; 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. * @copyright Copyright (c) 1998-2014 Tencent Inc.
*/ */
@ -9,18 +9,19 @@
package com.epmet.mpaes; package com.epmet.mpaes;
import java.nio.charset.Charset; import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.Arrays; import java.util.Arrays;
/** /**
* 提供基于PKCS7算法的加解密接口. * 提供基于PKCS7算法的加解密接口.
*/ */
class PKCS7Encoder { class PKCS7Encoder {
static Charset CHARSET = Charset.forName("utf-8"); static Charset CHARSET = StandardCharsets.UTF_8;
static int BLOCK_SIZE = 32; static int BLOCK_SIZE = 32;
/** /**
* 获得对明文进行补位填充的字节. * 获得对明文进行补位填充的字节.
* *
* @param count 需要进行填充补位操作的明文字节个数 * @param count 需要进行填充补位操作的明文字节个数
* @return 补齐用的字节数组 * @return 补齐用的字节数组
*/ */
@ -32,7 +33,7 @@ class PKCS7Encoder {
} }
// 获得补位所用的字符 // 获得补位所用的字符
char padChr = chr(amountToPad); char padChr = chr(amountToPad);
String tmp = new String(); String tmp = "";
for (int index = 0; index < amountToPad; index++) { for (int index = 0; index < amountToPad; index++) {
tmp += padChr; tmp += padChr;
} }
@ -41,12 +42,12 @@ class PKCS7Encoder {
/** /**
* 删除解密后明文的补位字符 * 删除解密后明文的补位字符
* *
* @param decrypted 解密后的明文 * @param decrypted 解密后的明文
* @return 删除补位字符后的明文 * @return 删除补位字符后的明文
*/ */
static byte[] decode(byte[] decrypted) { static byte[] decode(byte[] decrypted) {
int pad = (int) decrypted[decrypted.length - 1]; int pad = decrypted[decrypted.length - 1];
if (pad < 1 || pad > 32) { if (pad < 1 || pad > 32) {
pad = 0; pad = 0;
} }
@ -55,7 +56,7 @@ class PKCS7Encoder {
/** /**
* 将数字转化成ASCII码对应的字符用于对明文进行补码 * 将数字转化成ASCII码对应的字符用于对明文进行补码
* *
* @param a 需要转化的数字 * @param a 需要转化的数字
* @return 转化得到的字符 * @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. * @copyright Copyright (c) 1998-2014 Tencent Inc.
*/ */
@ -21,6 +21,7 @@ import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec; import javax.crypto.spec.SecretKeySpec;
import java.nio.charset.Charset; import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.Arrays; import java.util.Arrays;
import java.util.Random; import java.util.Random;
@ -40,7 +41,7 @@ import java.util.Random;
* </ol> * </ol>
*/ */
public class WXBizMsgCrypt { public class WXBizMsgCrypt {
static Charset CHARSET = Charset.forName("utf-8"); static Charset CHARSET = StandardCharsets.UTF_8;
Base64 base64 = new Base64(); Base64 base64 = new Base64();
byte[] aesKey; byte[] aesKey;
String token; String token;
@ -51,7 +52,7 @@ public class WXBizMsgCrypt {
* @param token 公众平台上开发者设置的token * @param token 公众平台上开发者设置的token
* @param encodingAesKey 公众平台上开发者设置的EncodingAESKey * @param encodingAesKey 公众平台上开发者设置的EncodingAESKey
* @param appId 公众平台appid * @param appId 公众平台appid
* *
* @throws AesException 执行失败请查看该异常的错误码和具体的错误信息 * @throws AesException 执行失败请查看该异常的错误码和具体的错误信息
*/ */
public WXBizMsgCrypt(String token, String encodingAesKey, String appId) throws AesException { public WXBizMsgCrypt(String token, String encodingAesKey, String appId) throws AesException {
@ -98,7 +99,7 @@ public class WXBizMsgCrypt {
/** /**
* 对明文进行加密. * 对明文进行加密.
* *
* @param text 需要加密的明文 * @param text 需要加密的明文
* @return 加密后base64编码的字符串 * @return 加密后base64编码的字符串
* @throws AesException aes加密失败 * @throws AesException aes加密失败
@ -145,7 +146,7 @@ public class WXBizMsgCrypt {
/** /**
* 对密文进行解密. * 对密文进行解密.
* *
* @param text 需要解密的密文 * @param text 需要解密的密文
* @return 解密得到的明文 * @return 解密得到的明文
* @throws AesException aes解密失败 * @throws AesException aes解密失败
@ -202,11 +203,11 @@ public class WXBizMsgCrypt {
* <li>生成安全签名</li> * <li>生成安全签名</li>
* <li>将消息密文和安全签名打包成xml格式</li> * <li>将消息密文和安全签名打包成xml格式</li>
* </ol> * </ol>
* *
* @param replyMsg 公众平台待回复用户的消息xml格式的字符串 * @param replyMsg 公众平台待回复用户的消息xml格式的字符串
* @param timeStamp 时间戳可以自己生成也可以用URL参数的timestamp * @param timeStamp 时间戳可以自己生成也可以用URL参数的timestamp
* @param nonce 随机串可以自己生成也可以用URL参数的nonce * @param nonce 随机串可以自己生成也可以用URL参数的nonce
* *
* @return 加密后的可以直接回复用户的密文包括msg_signature, timestamp, nonce, encrypt的xml格式的字符串 * @return 加密后的可以直接回复用户的密文包括msg_signature, timestamp, nonce, encrypt的xml格式的字符串
* @throws AesException 执行失败请查看该异常的错误码和具体的错误信息 * @throws AesException 执行失败请查看该异常的错误码和具体的错误信息
*/ */
@ -234,12 +235,12 @@ public class WXBizMsgCrypt {
* <li>若验证通过则提取xml中的加密消息</li> * <li>若验证通过则提取xml中的加密消息</li>
* <li>对消息进行解密</li> * <li>对消息进行解密</li>
* </ol> * </ol>
* *
* @param msgSignature 签名串对应URL参数的msg_signature * @param msgSignature 签名串对应URL参数的msg_signature
* @param timeStamp 时间戳对应URL参数的timestamp * @param timeStamp 时间戳对应URL参数的timestamp
* @param nonce 随机串对应URL参数的nonce * @param nonce 随机串对应URL参数的nonce
* @param postData 密文对应POST请求的数据 * @param postData 密文对应POST请求的数据
* *
* @return 解密后的原文 * @return 解密后的原文
* @throws AesException 执行失败请查看该异常的错误码和具体的错误信息 * @throws AesException 执行失败请查看该异常的错误码和具体的错误信息
*/ */
@ -264,7 +265,7 @@ public class WXBizMsgCrypt {
* @param timeStamp 时间戳对应URL参数的timestamp * @param timeStamp 时间戳对应URL参数的timestamp
* @param nonce 随机串对应URL参数的nonce * @param nonce 随机串对应URL参数的nonce
* @param echoStr 随机串对应URL参数的echostr * @param echoStr 随机串对应URL参数的echostr
* *
* @return 解密之后的echostr * @return 解密之后的echostr
* @throws AesException 执行失败请查看该异常的错误码和具体的错误信息 * @throws AesException 执行失败请查看该异常的错误码和具体的错误信息
*/ */
@ -280,4 +281,4 @@ public class WXBizMsgCrypt {
return result; 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<>(); Map<String, String> data = new HashMap<>();
DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance(); DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder(); 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); org.w3c.dom.Document doc = documentBuilder.parse(stream);
doc.getDocumentElement().normalize(); doc.getDocumentElement().normalize();
NodeList nodeList = doc.getDocumentElement().getChildNodes(); 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); 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(){ 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<>(); ArrayList<OperationEntity> operations2Update = new ArrayList<>();
// 1.收集需要添加的 // 1.收集需要添加的
List<RequirePermissionEnum> permEnums = Arrays.asList(RequirePermissionEnum.values()); RequirePermissionEnum[] permEnums = RequirePermissionEnum.values();
for (RequirePermissionEnum perm : permEnums) { for (RequirePermissionEnum perm : permEnums) {
String key = perm.getKey(); String key = perm.getKey();
if (!existsOpesMap.containsKey(key)) { 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()) { if (!rolesResult.success()) {
String msg = "调用user服务,根据key查询角色列表失败"; String msg = "调用user服务,根据key查询角色列表失败";
throw new RenException(EpmetErrorCode.USER_LIST_ROLES_BY_KEY_FAIL.getCode(), msg, msg, 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(); 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())); operationKeys.addAll(opeAndScopes.stream().map(opeAndScope -> opeAndScope.getOperationKey()).collect(Collectors.toSet()));
}); });
if (operationKeys.contains(operationKey)) { return operationKeys.contains(operationKey);
return true;
}
return false;
} }
@Override @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 * @Author yinzuomei
**/ **/
@PostMapping(value = "/gov/issue/issueprojectcategorydict/getcategorylist") @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); IssueProjectCategoryDictEntity otherCategory = categoryDictDao.selectSingleByCustomerIdAndCategoryNameAndCategoryType(customerId, ModuleConstants.CATEGORY_NAME_OTHERS, null);
//是否传入的类别Id中只包含"其他"分类,因为自定义分类和默认分类排序规则不一样 //是否传入的类别Id中只包含"其他"分类,因为自定义分类和默认分类排序规则不一样
//判断入参是否是只有一个分类Id并且是"其他"的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<>(); Map<String,List<IssueCategoryTagResultDTO>> result = new HashMap<>();
//传入的categories不会只包含"其他"这个分类,因为情况下ifOtherOnly为true,直接传入null //传入的categories不会只包含"其他"这个分类,因为情况下ifOtherOnly为true,直接传入null
@ -117,7 +117,7 @@ public class IssueProjectTagDictRedis {
//如果keys集合为空,说明缓存中没有当前客户的标签排行信息,直接进行补偿 //如果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)){ if(!CollectionUtils.isEmpty(customizedTuples)){
Map<Double, List<IssueCategoryTagResultDTO>> customizedHeatMap = new HashMap<>(); Map<Double, List<IssueCategoryTagResultDTO>> customizedHeatMap = new HashMap<>();
customizedTuples.forEach(tuple -> { customizedTuples.forEach(tuple -> {
@ -181,7 +181,7 @@ public class IssueProjectTagDictRedis {
} }
IssueProjectCategoryDictEntity otherCategory = categoryDictDao.selectSingleByCustomerIdAndCategoryNameAndCategoryType(customerId, ModuleConstants.CATEGORY_NAME_OTHERS, null); 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; Set<String> keys;
if (CollectionUtils.isEmpty(category) || ifOtherOnly) if (CollectionUtils.isEmpty(category) || ifOtherOnly)
keys = redisUtils.keys(GovIssueRedisKeys.getGovernmentTagKey(customerId, null)); keys = redisUtils.keys(GovIssueRedisKeys.getGovernmentTagKey(customerId, null));
@ -223,7 +223,7 @@ public class IssueProjectTagDictRedis {
result.put(ModuleConstants.DEFAULT_TAG_CATEGORY_NAME, defaultResult); 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)){ if(!CollectionUtils.isEmpty(customizedTuples)){
Map<Double, List<IssueCategoryTagResultDTO>> customizedHeatMap = new HashMap<>(); Map<Double, List<IssueCategoryTagResultDTO>> customizedHeatMap = new HashMap<>();
customizedTuples.forEach(tuple -> { customizedTuples.forEach(tuple -> {
@ -457,7 +457,7 @@ public class IssueProjectTagDictRedis {
String key = GovIssueRedisKeys.getGovernmentTagKey(customerId, cid); String key = GovIssueRedisKeys.getGovernmentTagKey(customerId, cid);
Set<ZSetOperations.TypedTuple<Object>> tagTuples = 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)){ if(!CollectionUtils.isEmpty(tagTuples)){
Map<Double, Set<IssueCategoryTagResultDTO>> heatMap = new HashMap<>(); 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(); boolean isStaffAudition = null != param.getAudition();
//1.查询该客户下是否开启议题审核 //1.查询该客户下是否开启议题审核
//为了防止当工作人员审核时,议题审核开关被关闭,这时统一视为审核开启,将工作端的审核动作继续进行 //为了防止当工作人员审核时,议题审核开关被关闭,这时统一视为审核开启,将工作端的审核动作继续进行
boolean ifOpen = isStaffAudition ? true : boolean ifOpen = isStaffAudition || !StringUtils.equals(ModuleConstants.AUDIT_SWITCH_CLOSE, configurationParameterService.checkIssueAuditSwitchIfOpen(param.getCustomerId()));
!StringUtils.equals(ModuleConstants.AUDIT_SWITCH_CLOSE,configurationParameterService.checkIssueAuditSwitchIfOpen(param.getCustomerId()));
//初始化缺省状态 : 审核中 //初始化缺省状态 : 审核中
String defaultStatusUnderAuditing = isStaffAudition ? param.getAudition().getActionType() : 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; private static final long serialVersionUID = 7657974985102791998L;
public interface SubjectArticleListForm extends CustomerClientShowGroup{}; public interface SubjectArticleListForm extends CustomerClientShowGroup{}
@NotBlank(message = "网格ID不能为空",groups = SubjectArticleListForm.class) @NotBlank(message = "网格ID不能为空",groups = SubjectArticleListForm.class)
private String gridId; 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) { if (textSyncScanResult != null) {
SyncScanResult textSyncScanResultData = textSyncScanResult.getData(); SyncScanResult textSyncScanResultData = textSyncScanResult.getData();
if (textSyncScanResult.success()) { if (textSyncScanResult.success()) {
result.setAllPass(result.isAllPass() ? textSyncScanResultData.isAllPass() : false); result.setAllPass(result.isAllPass() && textSyncScanResultData.isAllPass());
result.getSuccessDataIds().addAll(textSyncScanResultData.getSuccessDataIds()); result.getSuccessDataIds().addAll(textSyncScanResultData.getSuccessDataIds());
result.getFailDataIds().addAll(textSyncScanResultData.getFailDataIds()); 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()); notList = currentOrgList.stream().map(WorkSpecialSubjectResultDTO::getTagId).distinct().collect(Collectors.toList());
} }
if (!NumConstant.ZERO_STR.equals(formDTO.getPids())) { 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) { for (String pid : pidList) {
if(CollectionUtils.isNotEmpty(resultDTOList)){ if(CollectionUtils.isNotEmpty(resultDTOList)){
List<String> parentAddList=resultDTOList.stream().map(WorkSpecialSubjectResultDTO::getTagId).distinct().collect(Collectors.toList()); 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); CustomerDTO data = customerService.get(customerId);
if (null != data) { if (null != data) {
data.setSubCustomerIds(baseDao.selectAllSubCustomerIds(customerId)); data.setSubCustomerIds(baseDao.selectAllSubCustomerIds(customerId));
data.setHaveSubCustomer(CollectionUtils.isNotEmpty(data.getSubCustomerIds()) ? true : false); data.setHaveSubCustomer(CollectionUtils.isNotEmpty(data.getSubCustomerIds()));
customerRedis.saveCustomerInfo(customerId, data); customerRedis.saveCustomerInfo(customerId, data);
return data.getSubCustomerIds(); return data.getSubCustomerIds();
} }
return new ArrayList<>(); 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(); Map<String, CustomerAgencyDTO> rootAgencies = rootAgencyResult.getData();
validCustomers.stream().forEach(customer -> { validCustomers.stream().forEach(customer -> {
CustomerAgencyDTO rootAgency = rootAgencies.get(customer.getCustomerId()); CustomerAgencyDTO rootAgency = rootAgencies.get(customer.getCustomerId());
customer.setHasRootAgency(rootAgency == null ? false : true); customer.setHasRootAgency(rootAgency != null);
customer.setRootAgencyId(rootAgency == null ? "" : rootAgency.getId()); customer.setRootAgencyId(rootAgency == null ? "" : rootAgency.getId());
if (rootAgency != null) { if (rootAgency != null) {
rootAgencyIds.add(rootAgency.getId()); rootAgencyIds.add(rootAgency.getId());
@ -188,7 +188,7 @@ public class CustomerServiceImpl extends BaseServiceImpl<CustomerDao, CustomerEn
if (customer.getRootAgencyId() != null) { if (customer.getRootAgencyId() != null) {
rootAgencyManagers = rootAgencyManagerMap.get(customer.getRootAgencyId()); rootAgencyManagers = rootAgencyManagerMap.get(customer.getRootAgencyId());
} }
customer.setHasManager(CollectionUtils.isEmpty(rootAgencyManagers) ? false : true); customer.setHasManager(!CollectionUtils.isEmpty(rootAgencyManagers));
}); });
} else { } else {
log.error("查询有效客户列表:查询客户根级组织的管理员失败:{}", managersResult.toString()); 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 @Override
public boolean isEmpty() { public boolean isEmpty() {
return ArrayUtils.isEmpty(bytes)?true:false; return ArrayUtils.isEmpty(bytes);
} }
@Override @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 org.springframework.util.CollectionUtils;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@ -99,10 +100,7 @@ public class ActSignInRecordServiceImpl extends BaseServiceImpl<ActSignInRecordD
*/ */
@Override @Override
public boolean queryUserSignInRec(String groupActId, String signUserId) { public boolean queryUserSignInRec(String groupActId, String signUserId) {
if (baseDao.selectCountUserRec(groupActId, signUserId) > 0) { return baseDao.selectCountUserRec(groupActId, signUserId) > 0;
return true;
}
return false;
} }
/** /**
@ -303,14 +301,10 @@ public class ActSignInRecordServiceImpl extends BaseServiceImpl<ActSignInRecordD
byte[] buffer = HttpClientManager.getInstance().getMediaByteArray(ModuleConstant.GET_CODE_URL + accessToken, JSON.toJSONString(data)).getData(); byte[] buffer = HttpClientManager.getInstance().getMediaByteArray(ModuleConstant.GET_CODE_URL + accessToken, JSON.toJSONString(data)).getData();
if (buffer != null && buffer.length < 500) { if (buffer != null && buffer.length < 500) {
String wxResult = ""; String wxResult = "";
try { wxResult = new String(buffer, StandardCharsets.UTF_8);
wxResult = new String(buffer, "UTF-8"); if (-1 != wxResult.indexOf("errcode")) {
if (-1 != wxResult.indexOf("errcode")) { log.error("获取二维码接口返回错误:{}", wxResult);
log.error("获取二维码接口返回错误:{}", wxResult); throw new RenException("获取二维码失败");
throw new RenException("获取二维码失败");
}
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} }
} }
//上传 //上传
@ -332,4 +326,4 @@ public class ActSignInRecordServiceImpl extends BaseServiceImpl<ActSignInRecordD
} }
return resultDTO; 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); resultDTO.setCanceledReason(GroupActConstant.CANCELED.equals(resultDTO.getStatus()) ? actOperationRecordDao.selectCanceledReason(formDTO.getGroupActId()) : StrConstant.EPMETY_STR);
handleSignInDesc(resultDTO,formDTO.getUserId()); handleSignInDesc(resultDTO,formDTO.getUserId());
// 有签到后不可以修改活动时间:true可以修改,false不可以, // 有签到后不可以修改活动时间:true可以修改,false不可以,
resultDTO.setStartTimeEditFlag(groupActInfoEntity.getSignedInNum() > NumConstant.ZERO ? false : true); resultDTO.setStartTimeEditFlag(groupActInfoEntity.getSignedInNum() <= NumConstant.ZERO);
//居民端记录已读标志 //居民端记录已读标志
if(AppClientConstant.APP_RESI.equals(formDTO.getClient())){ 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++) { for (int i = NumConstant.ONE; i <= NumConstant.TWELVE; i++) {
OrganizationalLifeLineChartDTO dto = new OrganizationalLifeLineChartDTO(); OrganizationalLifeLineChartDTO dto = new OrganizationalLifeLineChartDTO();
if (i < NumConstant.TEN){ if (i < NumConstant.TEN){
dto.setMonth(year +"-"+NumConstant.ZERO + String.valueOf(i)); dto.setMonth(year +"-"+NumConstant.ZERO + i);
}else { }else {
dto.setMonth(year +"-"+ String.valueOf(i)); dto.setMonth(year +"-"+ i);
} }
lineChart.add(dto); lineChart.add(dto);
} }
return lineChart; 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 org.springframework.transaction.annotation.Transactional;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Map; 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(); byte[] buffer = HttpClientManager.getInstance().getMediaByteArray(ModuleConstant.GET_CODE_URL + accessToken, JSON.toJSONString(data)).getData();
if (buffer != null && buffer.length < 500) { if (buffer != null && buffer.length < 500) {
String wxResult = ""; String wxResult = "";
try { wxResult = new String(buffer, StandardCharsets.UTF_8);
wxResult = new String(buffer, "UTF-8"); if (-1 != wxResult.indexOf("errcode")) {
if (-1 != wxResult.indexOf("errcode")) { logger.error("获取二维码接口返回错误:{}", wxResult);
logger.error("获取二维码接口返回错误:{}", wxResult); throw new RenException("获取二维码失败");
throw new RenException("获取二维码失败");
}
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} }
} }
//上传 //上传

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())){ if(!CollectionUtils.isEmpty(reply.getData())){
List<IssueApplicationDTO> applications = 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 { }else {
return false; 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); result.setInGroup(false);
// 查询是否存在入组审核记录 // 查询是否存在入组审核记录
Integer awaitAudit = groupMemeberOperationDao.checkAwaitAudit(tokenDto.getUserId(), result.getGroupId()); Integer awaitAudit = groupMemeberOperationDao.checkAwaitAudit(tokenDto.getUserId(), result.getGroupId());
result.setAwaitAudit(awaitAudit > NumConstant.ZERO ? true : false); result.setAwaitAudit(awaitAudit > NumConstant.ZERO);
} }
return result; return result;
} }
@ -264,4 +264,4 @@ public class TopicShareLinkRecordServiceImpl extends BaseServiceImpl<TopicShareL
return relation; 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 * @param textScanParam
* @return ImgAsyncScanResult * @return ImgAsyncScanResult
*/ */
public Result<SyncScanResult> sendTextScan(TextScanParam textScanParam); Result<SyncScanResult> sendTextScan(TextScanParam textScanParam);
/** /**
@ -34,7 +34,7 @@ public interface ScanService {
* @param imgScanParam * @param imgScanParam
* @return * @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(); TextScanRequest textScanRequest = getTextScanRequest();
try { textScanRequest.setHttpContent(JSON.toJSONString(textScanParam).getBytes(StandardCharsets.UTF_8), SysConstant.UTF8, FormatType.JSON);
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());
}
try { try {
SyncScanResult textScanResult = executeSyncText(textScanRequest); SyncScanResult textScanResult = executeSyncText(textScanRequest);
return new Result<SyncScanResult>().ok(textScanResult); return new Result<SyncScanResult>().ok(textScanResult);
} catch (ExecuteHttpException e) { } catch (ExecuteHttpException e) {
@ -138,14 +133,9 @@ public class ScanServiceImpl implements ScanService {
private Result<SyncScanResult> doScanImg(ImgScanParam imgScanParam) { private Result<SyncScanResult> doScanImg(ImgScanParam imgScanParam) {
ImageSyncScanRequest imageSyncScanRequest = getImgScanRequest(); ImageSyncScanRequest imageSyncScanRequest = getImgScanRequest();
try { imageSyncScanRequest.setHttpContent(JSON.toJSONString(imgScanParam).getBytes(StandardCharsets.UTF_8), SysConstant.UTF8, FormatType.JSON);
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());
}
try { try {
SyncScanResult scanResult = executeSyncImg(imageSyncScanRequest); SyncScanResult scanResult = executeSyncImg(imageSyncScanRequest);
return new Result<SyncScanResult>().ok(scanResult); return new Result<SyncScanResult>().ok(scanResult);
} catch (ExecuteHttpException e) { } catch (ExecuteHttpException e) {
@ -171,7 +161,7 @@ public class ScanServiceImpl implements ScanService {
HttpResponse httpResponse = IAcsClientUtil.getIAcsClient().doAction(textScanRequest); HttpResponse httpResponse = IAcsClientUtil.getIAcsClient().doAction(textScanRequest);
if (httpResponse.isSuccess()) { 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)) { if (HttpStatus.SC_OK == scrResponse.getInteger(SysConstant.CODE)) {
//任务 列表 //任务 列表
List<ScanTaskResult> scanTaskResults = scrResponse.getJSONArray(SysConstant.DATA).toJavaList(ScanTaskResult.class); List<ScanTaskResult> scanTaskResults = scrResponse.getJSONArray(SysConstant.DATA).toJavaList(ScanTaskResult.class);
@ -292,13 +282,8 @@ public class ScanServiceImpl implements ScanService {
VoiceAsyncScanRequest voiceAsyncScanRequest=getVoiceAsyncScanRequest(); VoiceAsyncScanRequest voiceAsyncScanRequest=getVoiceAsyncScanRequest();
try { voiceAsyncScanRequest.setHttpContent(JSON.toJSONString(voiceAsyncScanParam).getBytes(StandardCharsets.UTF_8), SysConstant.UTF8, FormatType.JSON);
voiceAsyncScanRequest.setHttpContent(JSON.toJSONString(voiceAsyncScanParam).getBytes(SysConstant.UTF8), SysConstant.UTF8, FormatType.JSON); log.info("语音异步检测入参:"+JSON.toJSONString(voiceAsyncScanParam,true));
} 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));
List<VoiceAsyncScanTaskDataDTO> taskList; List<VoiceAsyncScanTaskDataDTO> taskList;
try { try {
taskList = executeSyncVoice(voiceAsyncScanRequest); taskList = executeSyncVoice(voiceAsyncScanRequest);
@ -365,7 +350,7 @@ public class ScanServiceImpl implements ScanService {
if (httpResponse.isSuccess()) { 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)); log.info("VoiceAsyncScanRequest原生接口返参:" + JSON.toJSONString(scrResponse, true));
@ -412,20 +397,15 @@ public class ScanServiceImpl implements ScanService {
} }
VoiceAsyncScanResultsRequest request=getVoiceAsyncScanResultsRequest(); VoiceAsyncScanResultsRequest request=getVoiceAsyncScanResultsRequest();
try { request.setHttpContent(JSON.toJSONString(taskIds).getBytes(StandardCharsets.UTF_8), SysConstant.UTF8, FormatType.JSON);
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());
}
// log.info("语音异步检测结果查询入参:"+JSON.toJSONString(taskIds,true)); // log.info("语音异步检测结果查询入参:"+JSON.toJSONString(taskIds,true));
try { try {
HttpResponse httpResponse = IAcsClientUtil.getIAcsClient().doAction(request); HttpResponse httpResponse = IAcsClientUtil.getIAcsClient().doAction(request);
if (httpResponse.isSuccess()) { 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)); log.info("VoiceAsyncScanResultsRequest原生接口返参:"+JSON.toJSONString(scrResponse, true));
if (HttpStatus.SC_OK == scrResponse.getInteger(SysConstant.CODE)) { if (HttpStatus.SC_OK == scrResponse.getInteger(SysConstant.CODE)) {
@ -558,14 +538,9 @@ public class ScanServiceImpl implements ScanService {
private Result<VideoAsyncScanTaskResultDTO> doScanVideo(VideoAsyncScanParam videoAsyncScanParam) { private Result<VideoAsyncScanTaskResultDTO> doScanVideo(VideoAsyncScanParam videoAsyncScanParam) {
VideoAsyncScanRequest videoAsyncScanRequest = getVideoAsyncScanRequest(); VideoAsyncScanRequest videoAsyncScanRequest = getVideoAsyncScanRequest();
try { videoAsyncScanRequest.setHttpContent(JSON.toJSONString(videoAsyncScanParam).getBytes(StandardCharsets.UTF_8), SysConstant.UTF8, FormatType.JSON);
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());
}
try { try {
VideoAsyncScanTaskResultDTO scanResult = executeAsyncVideo(videoAsyncScanRequest); VideoAsyncScanTaskResultDTO scanResult = executeAsyncVideo(videoAsyncScanRequest);
scanResult.setSeed(videoAsyncScanParam.getSeed()); scanResult.setSeed(videoAsyncScanParam.getSeed());
return new Result<VideoAsyncScanTaskResultDTO>().ok(scanResult); return new Result<VideoAsyncScanTaskResultDTO>().ok(scanResult);
@ -591,7 +566,7 @@ public class ScanServiceImpl implements ScanService {
try { try {
HttpResponse httpResponse = IAcsClientUtil.getIAcsClient().doAction(videoAsyncScanRequest); HttpResponse httpResponse = IAcsClientUtil.getIAcsClient().doAction(videoAsyncScanRequest);
if (httpResponse.isSuccess()) { 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)) { if (HttpStatus.SC_OK == scrResponse.getInteger(SysConstant.CODE)) {
//获取data列表 //获取data列表
JSONArray dataResults = scrResponse.getJSONArray(SysConstant.DATA); JSONArray dataResults = scrResponse.getJSONArray(SysConstant.DATA);
@ -634,16 +609,11 @@ public class ScanServiceImpl implements ScanService {
videoAsyncScanResultsRequest.setMethod(com.aliyuncs.http.MethodType.POST); videoAsyncScanResultsRequest.setMethod(com.aliyuncs.http.MethodType.POST);
videoAsyncScanResultsRequest.setConnectTimeout(3000); videoAsyncScanResultsRequest.setConnectTimeout(3000);
videoAsyncScanResultsRequest.setReadTimeout(6000); videoAsyncScanResultsRequest.setReadTimeout(6000);
try { videoAsyncScanResultsRequest.setHttpContent(JSON.toJSONString(taskIds).getBytes(StandardCharsets.UTF_8), "UTF-8", FormatType.JSON);
videoAsyncScanResultsRequest.setHttpContent(JSON.toJSONString(taskIds).getBytes("UTF-8"), "UTF-8", FormatType.JSON); try {
} 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 {
HttpResponse httpResponse = IAcsClientUtil.getIAcsClient().doAction(videoAsyncScanResultsRequest); HttpResponse httpResponse = IAcsClientUtil.getIAcsClient().doAction(videoAsyncScanResultsRequest);
if (httpResponse.isSuccess()) { 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)); log.info("查询视频检测结果返参"+JSON.toJSONString(responseObject));
if (HttpStatus.SC_OK == responseObject.getInteger(SysConstant.CODE)) { if (HttpStatus.SC_OK == responseObject.getInteger(SysConstant.CODE)) {
//获取data列表 //获取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; package com.epmet.openapi.sdk.encrypt;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest; import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException; import java.security.NoSuchAlgorithmException;
@ -17,16 +18,16 @@ public class Md5Util {
return getMD5(string.getBytes("GBK")); 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'}; '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
private static String getMD5(byte[] source) throws Exception { private static String getMD5(byte[] source) throws Exception {
String s = null; String s = null;
MessageDigest md = MessageDigest.getInstance("MD5"); MessageDigest md = MessageDigest.getInstance("MD5");
md.update(source); md.update(source);
byte tmp[] = md.digest(); // MD5 的计算结果是一个 128 位的长整数, byte[] tmp = md.digest(); // MD5 的计算结果是一个 128 位的长整数,
// 用字节表示就是 16 个字节 // 用字节表示就是 16 个字节
char str[] = new char[16 * 2]; // 每个字节用 16 进制表示的话,使用两个字符, char[] str = new char[16 * 2]; // 每个字节用 16 进制表示的话,使用两个字符,
// 所以表示成 16 进制需要 32 个字符 // 所以表示成 16 进制需要 32 个字符
int k = 0; // 表示转换结果中对应的字符位置 int k = 0; // 表示转换结果中对应的字符位置
for (int i = 0; i < 16; i++) { // 从第一个字节开始,对 MD5 的每一个字节 for (int i = 0; i < 16; i++) { // 从第一个字节开始,对 MD5 的每一个字节
@ -40,7 +41,7 @@ public class Md5Util {
return s; return s;
} }
private static String byteArrayToHexString(byte b[]) { private static String byteArrayToHexString(byte[] b) {
StringBuffer resultSb = new StringBuffer(); StringBuffer resultSb = new StringBuffer();
for (int i = 0; i < b.length; i++) for (int i = 0; i < b.length; i++)
resultSb.append(byteToHexString(b[i])); resultSb.append(byteToHexString(b[i]));
@ -59,7 +60,7 @@ public class Md5Util {
public static String MD5Encode(String origin, String charsetname) throws Exception { public static String MD5Encode(String origin, String charsetname) throws Exception {
String resultString = null; String resultString = null;
resultString = new String(origin); resultString = origin;
MessageDigest md = MessageDigest.getInstance("MD5"); MessageDigest md = MessageDigest.getInstance("MD5");
if (charsetname == null || "".equals(charsetname)) if (charsetname == null || "".equals(charsetname))
resultString = byteArrayToHexString(md.digest(resultString resultString = byteArrayToHexString(md.digest(resultString
@ -85,7 +86,7 @@ public class Md5Util {
* @return 大写 * @return 大写
*/ */
public static String get12Char(String str) { public static String get12Char(String str) {
String arr[] = ShortText(str); String[] arr = ShortText(str);
String rst = (arr[0] + arr[1]).toUpperCase(); String rst = (arr[0] + arr[1]).toUpperCase();
return rst.substring(0, 4) + rst.substring(4, 8) + rst.substring(8, 12); return rst.substring(0, 4) + rst.substring(4, 8) + rst.substring(8, 12);
} }
@ -104,7 +105,7 @@ public class Md5Util {
try { try {
md = MessageDigest.getInstance("MD5"); md = MessageDigest.getInstance("MD5");
hex = byteArrayToHexString(md.digest(SALT.concat(string) hex = byteArrayToHexString(md.digest(SALT.concat(string)
.getBytes("utf-8"))); .getBytes(StandardCharsets.UTF_8)));
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); 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) { public static String mapToSignStr(Map<String, String> map) {
Set<String> keySet = map.keySet(); 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); Arrays.sort(keyArray);
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
for(int i = 0; i < keyArray.length; ++i) { for(int i = 0; i < keyArray.length; ++i) {
String key = keyArray[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 (val != null && val.trim().length() > 0 && !"sign".equals(key)) {
if (!sb.toString().isEmpty()) { if (!sb.toString().isEmpty()) {
sb.append("&"); 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 { private static void generateGetOrgDetailSign() throws Exception {
long now = System.currentTimeMillis(); long now = System.currentTimeMillis();
String uuid = UUID.randomUUID().toString().replace("-", "");; String uuid = UUID.randomUUID().toString().replace("-", "");
System.out.println("时间戳:" + now); System.out.println("时间戳:" + now);
System.out.println("随机数:" + uuid); 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; private static final long serialVersionUID = 1L;
public interface ListSelectedBuilding {}; public interface ListSelectedBuilding {}
public interface ListSelectedUser {};
public interface ListSelectedUser {}
/** /**
@ -62,4 +63,4 @@ public class StatsResiWarnFormDTO implements Serializable {
private List<String> buildingIdList; 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 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.校验必填字段是否为空 //0.校验必填字段是否为空
Result<List<ColumnTableNameResultDTO>> resultList = operCustomizeOpenFeignClient.getMustColumn(tokenDto.getCustomerId()); Result<List<ColumnTableNameResultDTO>> resultList = operCustomizeOpenFeignClient.getMustColumn(tokenDto.getCustomerId());
if (resultList.success() && null != resultList.getData()) { if (resultList.success() && null != resultList.getData()) {
StringBuffer str = new StringBuffer(""); StringBuffer str = new StringBuffer();
formDTO.forEach(f -> { formDTO.forEach(f -> {
resultList.getData().forEach(l -> { resultList.getData().forEach(l -> {
if (f.getTableName().equals(l.getTableName())) { if (f.getTableName().equals(l.getTableName())) {
@ -897,11 +897,11 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
IcResiUserBriefDTO r = new IcResiUserBriefDTO(); IcResiUserBriefDTO r = new IcResiUserBriefDTO();
BeanUtil.copyProperties(resiEntity, r); BeanUtil.copyProperties(resiEntity, r);
r.setHouseId(resiEntity.getHomeId()); r.setHouseId(resiEntity.getHomeId());
r.setIcResiUserId(resiEntity.getId()); r.setIcResiUserId(resiEntity.getId());
r.setIcUserName(resiEntity.getName()); r.setIcUserName(resiEntity.getName());
// 填充网格、小区名称 // 填充网格、小区名称
String errorMsg = "【居民信息简介】查询网格、小区信息失败"; String errorMsg = "【居民信息简介】查询网格、小区信息失败";
IcNeighborHoodDTO neighborHood = getResultDataOrThrowsException(govOrgOpenFeignClient.getIcNeighbordhoodById(resiEntity.getVillageId()), 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])); r.getVolunteerCategories().put(vCategories[i], categories.get(vCategories[i]));
} }
} }
return r; 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 -> { userOperListResultDTOS.forEach(ub -> {
userAuthBadgeList.forEach(u -> { userAuthBadgeList.forEach(u -> {
if (ub.getBadgeId().equals(u.getBadgeId())){ 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.setIsCertificated(u.getAuditStatus().equals(BadgeConstant.APPROVED) ? BadgeConstant.YES : BadgeConstant.NO);
ub.setIsLighted(u.getIsOpened().equals(NumConstant.ZERO_STR) ? BadgeConstant.NO : BadgeConstant.YES); 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 @Override
public Boolean selectIsPartyMemberByUserId(String userId) { public Boolean selectIsPartyMemberByUserId(String userId) {
Integer num = baseDao.selectIsPartyMemberByUserId(userId); Integer num = baseDao.selectIsPartyMemberByUserId(userId);
if (null != num && num > NumConstant.ZERO){ return null != num && num > NumConstant.ZERO;
return true; }
}
return false;
}
/** /**
* 获取用户居民权限 * 获取用户居民权限

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 userWechatDTO = new UserWechatDTO();
//前台和后台已有实体字段不对于 需要挨个赋值 //前台和后台已有实体字段不对于 需要挨个赋值
userWechatDTO.setUserId(wxUserInfoFormDTO.getUserId()); 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.setSex(Integer.parseInt(wxUserInfoFormDTO.getGender() == null ? "0" : wxUserInfoFormDTO.getGender()));
userWechatDTO.setHeadImgUrl(wxUserInfoFormDTO.getAvatarUrl() == null ? null : wxUserInfoFormDTO.getAvatarUrl()); userWechatDTO.setHeadImgUrl(wxUserInfoFormDTO.getAvatarUrl());
userWechatDTO.setCountry(wxUserInfoFormDTO.getCountry() == null ? null : wxUserInfoFormDTO.getCountry()); userWechatDTO.setCountry(wxUserInfoFormDTO.getCountry());
userWechatDTO.setProvince(wxUserInfoFormDTO.getProvince() == null ? null : wxUserInfoFormDTO.getProvince()); userWechatDTO.setProvince(wxUserInfoFormDTO.getProvince());
userWechatDTO.setCity(wxUserInfoFormDTO.getCity() == null ? null : wxUserInfoFormDTO.getCity()); userWechatDTO.setCity(wxUserInfoFormDTO.getCity());
userWechatDTO.setUpdatedTime(new Date()); userWechatDTO.setUpdatedTime(new Date());
userWechatDTO.setUpdatedBy(wxUserInfoFormDTO.getUserId()); userWechatDTO.setUpdatedBy(wxUserInfoFormDTO.getUserId());
userWechatDao.updateByUserId(userWechatDTO); userWechatDao.updateByUserId(userWechatDTO);

Loading…
Cancel
Save