Commit 9d1428ab85cd1b2f385f3e7a3b622bd0f859c63d
1 parent
66180407
优化生成器模板:让生成的代码更简洁,流程相关代码默认不生成
优化生成模板:一对多代码生成(ERP模板)生成的子表实体ApiModel注释中value为附表名称 #2365 minio上传文件,文件名包含点的时候拼接文件名有问题 issues/I3CLFL 日志里把具体的文件加上吧 issues/I3BJDQ
Showing
11 changed files
with
55 additions
and
8 deletions
jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/MinioUtil.java
... | ... | @@ -75,7 +75,7 @@ public class MinioUtil { |
75 | 75 | orgName=file.getName(); |
76 | 76 | } |
77 | 77 | orgName = CommonUtils.getFileName(orgName); |
78 | - String objectName = bizPath+"/"+orgName.substring(0, orgName.lastIndexOf(".")) + "_" + System.currentTimeMillis() + orgName.substring(orgName.indexOf(".")); | |
78 | + String objectName = bizPath+"/"+orgName.substring(0, orgName.lastIndexOf(".")) + "_" + System.currentTimeMillis() + orgName.substring(orgName.lastIndexOf(".")); | |
79 | 79 | |
80 | 80 | // 使用putObject上传一个本地文件到存储桶中。 |
81 | 81 | if(objectName.startsWith("/")){ |
... | ... |
jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/oss/OssBootUtil.java
... | ... | @@ -111,7 +111,7 @@ public class OssBootUtil { |
111 | 111 | orgName=file.getName(); |
112 | 112 | } |
113 | 113 | orgName = CommonUtils.getFileName(orgName); |
114 | - String fileName = orgName.substring(0, orgName.lastIndexOf(".")) + "_" + System.currentTimeMillis() + orgName.substring(orgName.indexOf(".")); | |
114 | + String fileName = orgName.substring(0, orgName.lastIndexOf(".")) + "_" + System.currentTimeMillis() + orgName.substring(orgName.lastIndexOf(".")); | |
115 | 115 | if (!fileDir.endsWith("/")) { |
116 | 116 | fileDir = fileDir.concat("/"); |
117 | 117 | } |
... | ... |
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/CommonController.java
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/default/onetomany/java/${bussiPackage}/${entityPackage}/entity/[1-n]Entity.javai
... | ... | @@ -21,7 +21,7 @@ import java.io.UnsupportedEncodingException; |
21 | 21 | * @Date: ${.now?string["yyyy-MM-dd"]} |
22 | 22 | * @Version: V1.0 |
23 | 23 | */ |
24 | -@ApiModel(value="${tableName}对象", description="${tableVo.ftlDescription}") | |
24 | +@ApiModel(value="${subTab.tableName}对象", description="${subTab.ftlDescription}") | |
25 | 25 | @Data |
26 | 26 | @TableName("${subTab.tableName}") |
27 | 27 | public class ${subTab.entityName} implements Serializable { |
... | ... |
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/default/onetomany/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Form.vuei
... | ... | @@ -8,6 +8,7 @@ |
8 | 8 | <#assign form_popup = false> |
9 | 9 | <#assign form_cat_tree = false> |
10 | 10 | <#assign form_cat_back = ""> |
11 | +<#assign bpm_flag=false> | |
11 | 12 | <#assign form_span = 24> |
12 | 13 | <#if tableVo.fieldRowNum==2> |
13 | 14 | <#assign form_span = 12> |
... | ... | @@ -17,6 +18,9 @@ |
17 | 18 | <#assign form_span = 6> |
18 | 19 | </#if> |
19 | 20 | <#list columns as po> |
21 | +<#if po.fieldDbName=='bpm_status'> | |
22 | + <#assign bpm_flag=true> | |
23 | +</#if> | |
20 | 24 | <#if po.isShow =='Y' && po.fieldName != 'id'> |
21 | 25 | <#assign form_field_dictCode=""> |
22 | 26 | <#if po.dictTable?default("")?trim?length gt 1 && po.dictText?default("")?trim?length gt 1 && po.dictField?default("")?trim?length gt 1> |
... | ... | @@ -134,7 +138,9 @@ |
134 | 138 | </#if> |
135 | 139 | </#list> |
136 | 140 | </a-tabs> |
141 | + <#if bpm_flag> | |
137 | 142 | <a-row v-if="showFlowSubmitButton" style="text-align: center;width: 100%;margin-top: 16px;"><a-button @click="handleOk">提 交</a-button></a-row> |
143 | + </#if> | |
138 | 144 | </a-spin> |
139 | 145 | </template> |
140 | 146 | |
... | ... | @@ -379,6 +385,7 @@ |
379 | 385 | } |
380 | 386 | }, |
381 | 387 | props: { |
388 | + <#if bpm_flag> | |
382 | 389 | //流程表单data |
383 | 390 | formData: { |
384 | 391 | type: Object, |
... | ... | @@ -391,6 +398,7 @@ |
391 | 398 | default: false, |
392 | 399 | required: false |
393 | 400 | }, |
401 | + </#if> | |
394 | 402 | //表单禁用 |
395 | 403 | disabled: { |
396 | 404 | type: Boolean, |
... | ... | @@ -400,14 +408,17 @@ |
400 | 408 | }, |
401 | 409 | computed: { |
402 | 410 | formDisabled(){ |
411 | + <#if bpm_flag> | |
403 | 412 | if(this.formBpm===true){ |
404 | 413 | if(this.formData.disabled===false){ |
405 | 414 | return false |
406 | 415 | } |
407 | 416 | return true |
408 | 417 | } |
418 | + </#if> | |
409 | 419 | return this.disabled |
410 | 420 | }, |
421 | + <#if bpm_flag> | |
411 | 422 | showFlowSubmitButton(){ |
412 | 423 | if(this.formBpm===true){ |
413 | 424 | if(this.formData.disabled===false){ |
... | ... | @@ -416,10 +427,13 @@ |
416 | 427 | } |
417 | 428 | return false |
418 | 429 | } |
430 | + </#if> | |
419 | 431 | }, |
420 | 432 | created () { |
433 | + <#if bpm_flag> | |
421 | 434 | //如果是流程中表单,则需要加载流程表单data |
422 | 435 | this.showFlowData(); |
436 | + </#if> | |
423 | 437 | }, |
424 | 438 | methods: { |
425 | 439 | addBefore(){ |
... | ... | @@ -497,6 +511,7 @@ |
497 | 511 | </#list> |
498 | 512 | } |
499 | 513 | }, |
514 | + <#if bpm_flag> | |
500 | 515 | //渲染流程表单数据 |
501 | 516 | showFlowData(){ |
502 | 517 | if(this.formBpm === true){ |
... | ... | @@ -508,6 +523,7 @@ |
508 | 523 | }) |
509 | 524 | } |
510 | 525 | }, |
526 | + </#if> | |
511 | 527 | validateError(msg){ |
512 | 528 | this.$message.error(msg) |
513 | 529 | }, |
... | ... |
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/entity/[1-n]Entity.javai
... | ... | @@ -24,7 +24,7 @@ import java.io.UnsupportedEncodingException; |
24 | 24 | */ |
25 | 25 | @Data |
26 | 26 | @TableName("${subTab.tableName}") |
27 | -@ApiModel(value="${tableName}对象", description="${tableVo.ftlDescription}") | |
27 | +@ApiModel(value="${subTab.tableName}对象", description="${subTab.ftlDescription}") | |
28 | 28 | public class ${subTab.entityName} implements Serializable { |
29 | 29 | private static final long serialVersionUID = 1L; |
30 | 30 | |
... | ... |
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/entity/[1-n]Entity.javai
... | ... | @@ -22,7 +22,7 @@ import java.io.UnsupportedEncodingException; |
22 | 22 | * @Date: ${.now?string["yyyy-MM-dd"]} |
23 | 23 | * @Version: V1.0 |
24 | 24 | */ |
25 | -@ApiModel(value="${tableName}对象", description="${tableVo.ftlDescription}") | |
25 | +@ApiModel(value="${subTab.tableName}对象", description="${subTab.ftlDescription}") | |
26 | 26 | @Data |
27 | 27 | @TableName("${subTab.tableName}") |
28 | 28 | public class ${subTab.entityName} implements Serializable { |
... | ... |
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Form.vuei
... | ... | @@ -8,8 +8,12 @@ |
8 | 8 | <#assign form_popup = false> |
9 | 9 | <#assign form_cat_tree = false> |
10 | 10 | <#assign form_cat_back = ""> |
11 | +<#assign bpm_flag=false> | |
11 | 12 | <#assign form_span = 24> |
12 | 13 | <#list columns as po> |
14 | +<#if po.fieldDbName=='bpm_status'> | |
15 | + <#assign bpm_flag=true> | |
16 | +</#if> | |
13 | 17 | <#if po.isShow =='Y' && po.fieldName != 'id'> |
14 | 18 | <#assign form_field_dictCode=""> |
15 | 19 | <#if po.dictTable?default("")?trim?length gt 1 && po.dictText?default("")?trim?length gt 1 && po.dictField?default("")?trim?length gt 1> |
... | ... | @@ -125,7 +129,9 @@ |
125 | 129 | </#if> |
126 | 130 | </#list> |
127 | 131 | </a-tabs> |
132 | + <#if bpm_flag> | |
128 | 133 | <a-row v-if="showFlowSubmitButton" style="text-align: center;width: 100%;margin-top: 16px;"><a-button @click="handleOk">提 交</a-button></a-row> |
134 | + </#if> | |
129 | 135 | </a-spin> |
130 | 136 | </template> |
131 | 137 | |
... | ... | @@ -362,6 +368,7 @@ |
362 | 368 | } |
363 | 369 | }, |
364 | 370 | props: { |
371 | + <#if bpm_flag> | |
365 | 372 | //流程表单data |
366 | 373 | formData: { |
367 | 374 | type: Object, |
... | ... | @@ -374,6 +381,7 @@ |
374 | 381 | default: false, |
375 | 382 | required: false |
376 | 383 | }, |
384 | + </#if> | |
377 | 385 | //表单禁用 |
378 | 386 | disabled: { |
379 | 387 | type: Boolean, |
... | ... | @@ -383,14 +391,17 @@ |
383 | 391 | }, |
384 | 392 | computed: { |
385 | 393 | formDisabled(){ |
394 | + <#if bpm_flag> | |
386 | 395 | if(this.formBpm===true){ |
387 | 396 | if(this.formData.disabled===false){ |
388 | 397 | return false |
389 | 398 | } |
390 | 399 | return true |
391 | 400 | } |
401 | + </#if> | |
392 | 402 | return this.disabled |
393 | 403 | }, |
404 | + <#if bpm_flag> | |
394 | 405 | showFlowSubmitButton(){ |
395 | 406 | if(this.formBpm===true){ |
396 | 407 | if(this.formData.disabled===false){ |
... | ... | @@ -399,10 +410,13 @@ |
399 | 410 | } |
400 | 411 | return false |
401 | 412 | } |
413 | + </#if> | |
402 | 414 | }, |
403 | 415 | created () { |
416 | + <#if bpm_flag> | |
404 | 417 | //如果是流程中表单,则需要加载流程表单data |
405 | 418 | this.showFlowData(); |
419 | + </#if> | |
406 | 420 | }, |
407 | 421 | methods: { |
408 | 422 | addBefore(){ |
... | ... | @@ -475,6 +489,7 @@ |
475 | 489 | </#list> |
476 | 490 | } |
477 | 491 | }, |
492 | + <#if bpm_flag> | |
478 | 493 | //渲染流程表单数据 |
479 | 494 | showFlowData(){ |
480 | 495 | if(this.formBpm === true){ |
... | ... | @@ -486,6 +501,7 @@ |
486 | 501 | }) |
487 | 502 | } |
488 | 503 | }, |
504 | + </#if> | |
489 | 505 | validateError(msg){ |
490 | 506 | this.$message.error(msg) |
491 | 507 | }, |
... | ... |
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/entity/[1-n]Entity.javai
... | ... | @@ -21,7 +21,7 @@ import java.io.UnsupportedEncodingException; |
21 | 21 | * @Date: ${.now?string["yyyy-MM-dd"]} |
22 | 22 | * @Version: V1.0 |
23 | 23 | */ |
24 | -@ApiModel(value="${tableName}对象", description="${tableVo.ftlDescription}") | |
24 | +@ApiModel(value="${subTab.tableName}对象", description="${subTab.ftlDescription}") | |
25 | 25 | @Data |
26 | 26 | @TableName("${subTab.tableName}") |
27 | 27 | public class ${subTab.entityName} implements Serializable { |
... | ... |
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Form.vuei
... | ... | @@ -8,6 +8,7 @@ |
8 | 8 | <#assign form_popup = false> |
9 | 9 | <#assign form_cat_tree = false> |
10 | 10 | <#assign form_cat_back = ""> |
11 | +<#assign bpm_flag=false> | |
11 | 12 | <#assign form_span = 24> |
12 | 13 | <#if tableVo.fieldRowNum==2> |
13 | 14 | <#assign form_span = 12> |
... | ... | @@ -17,6 +18,9 @@ |
17 | 18 | <#assign form_span = 6> |
18 | 19 | </#if> |
19 | 20 | <#list columns as po> |
21 | +<#if po.fieldDbName=='bpm_status'> | |
22 | + <#assign bpm_flag=true> | |
23 | +</#if> | |
20 | 24 | <#if po.isShow =='Y' && po.fieldName != 'id'> |
21 | 25 | <#assign form_field_dictCode=""> |
22 | 26 | <#if po.dictTable?default("")?trim?length gt 1 && po.dictText?default("")?trim?length gt 1 && po.dictField?default("")?trim?length gt 1> |
... | ... | @@ -134,7 +138,9 @@ |
134 | 138 | </#if> |
135 | 139 | </#list> |
136 | 140 | </a-tabs> |
141 | + <#if bpm_flag> | |
137 | 142 | <a-row v-if="showFlowSubmitButton" style="text-align: center;width: 100%;margin-top: 16px;"><a-button @click="handleOk">提 交</a-button></a-row> |
143 | + </#if> | |
138 | 144 | </a-spin> |
139 | 145 | </template> |
140 | 146 | |
... | ... | @@ -385,6 +391,7 @@ |
385 | 391 | } |
386 | 392 | }, |
387 | 393 | props: { |
394 | + <#if bpm_flag> | |
388 | 395 | //流程表单data |
389 | 396 | formData: { |
390 | 397 | type: Object, |
... | ... | @@ -397,6 +404,7 @@ |
397 | 404 | default: false, |
398 | 405 | required: false |
399 | 406 | }, |
407 | + </#if> | |
400 | 408 | //表单禁用 |
401 | 409 | disabled: { |
402 | 410 | type: Boolean, |
... | ... | @@ -406,14 +414,17 @@ |
406 | 414 | }, |
407 | 415 | computed: { |
408 | 416 | formDisabled(){ |
417 | + <#if bpm_flag> | |
409 | 418 | if(this.formBpm===true){ |
410 | 419 | if(this.formData.disabled===false){ |
411 | 420 | return false |
412 | 421 | } |
413 | 422 | return true |
414 | 423 | } |
424 | + </#if> | |
415 | 425 | return this.disabled |
416 | 426 | }, |
427 | + <#if bpm_flag> | |
417 | 428 | showFlowSubmitButton(){ |
418 | 429 | if(this.formBpm===true){ |
419 | 430 | if(this.formData.disabled===false){ |
... | ... | @@ -422,10 +433,13 @@ |
422 | 433 | } |
423 | 434 | return false |
424 | 435 | } |
436 | + </#if> | |
425 | 437 | }, |
426 | 438 | created () { |
439 | + <#if bpm_flag> | |
427 | 440 | //如果是流程中表单,则需要加载流程表单data |
428 | 441 | this.showFlowData(); |
442 | + </#if> | |
429 | 443 | }, |
430 | 444 | methods: { |
431 | 445 | addBefore(){ |
... | ... | @@ -503,6 +517,7 @@ |
503 | 517 | </#list> |
504 | 518 | } |
505 | 519 | }, |
520 | + <#if bpm_flag> | |
506 | 521 | //渲染流程表单数据 |
507 | 522 | showFlowData(){ |
508 | 523 | if(this.formBpm === true){ |
... | ... | @@ -514,6 +529,7 @@ |
514 | 529 | }) |
515 | 530 | } |
516 | 531 | }, |
532 | + </#if> | |
517 | 533 | validateError(msg){ |
518 | 534 | this.$message.error(msg) |
519 | 535 | }, |
... | ... |
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/tab/onetomany/java/${bussiPackage}/${entityPackage}/entity/[1-n]Entity.javai
... | ... | @@ -21,7 +21,7 @@ import java.io.UnsupportedEncodingException; |
21 | 21 | * @Date: ${.now?string["yyyy-MM-dd"]} |
22 | 22 | * @Version: V1.0 |
23 | 23 | */ |
24 | -@ApiModel(value="${tableName}对象", description="${tableVo.ftlDescription}") | |
24 | +@ApiModel(value="${subTab.tableName}对象", description="${subTab.ftlDescription}") | |
25 | 25 | @Data |
26 | 26 | @TableName("${subTab.tableName}") |
27 | 27 | public class ${subTab.entityName} implements Serializable { |
... | ... |