Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzdst
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzdst
提交
57c914ae
提交
57c914ae
编写于
9月 01, 2021
作者:
xuhui961310148
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
查看报表功能相关内容
上级
c89394ab
变更
6
展开全部
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
613 行增加
和
1 行删除
+613
-1
package.json
app_web/package.json
+4
-0
dareport-bbzscustom-view.less
...is/dareport-bbzscustom-view/dareport-bbzscustom-view.less
+50
-0
dareport-bbzscustom-view.vue
...sis/dareport-bbzscustom-view/dareport-bbzscustom-view.vue
+392
-1
user-register.ts
app_web/src/user-register.ts
+2
-0
DACoreService.java
...ava/cn/ibizlab/core/extensions/service/DACoreService.java
+48
-0
DAGridCoreResource.java
...va/cn/ibizlab/api/rest/extensions/DAGridCoreResource.java
+117
-0
未找到文件。
app_web/package.json
浏览文件 @
57c914ae
...
@@ -12,6 +12,10 @@
...
@@ -12,6 +12,10 @@
"lint"
:
"vue-cli-service lint"
"lint"
:
"vue-cli-service lint"
},
},
"dependencies"
:
{
"dependencies"
:
{
"@riophae/vue-treeselect"
:
"0.0.38"
,
"ag-grid-community"
:
"^20.2.0"
,
"ag-grid-enterprise"
:
"^20.2.0"
,
"ag-grid-vue"
:
"^20.2.0"
,
"@fullcalendar/core"
:
"^4.4.0"
,
"@fullcalendar/core"
:
"^4.4.0"
,
"@fullcalendar/daygrid"
:
"^4.4.0"
,
"@fullcalendar/daygrid"
:
"^4.4.0"
,
"@fullcalendar/interaction"
:
"^4.4.0"
,
"@fullcalendar/interaction"
:
"^4.4.0"
,
...
...
app_web/src/pages/analysis/dareport-bbzscustom-view/dareport-bbzscustom-view.less
浏览文件 @
57c914ae
@import "../../../../node_modules/ag-grid-community/dist/styles/ag-grid.css";
@import "../../../../node_modules/ag-grid-community/dist/styles/ag-theme-balham.css";
@import "../../../../node_modules/ag-grid-community/dist/styles/ag-theme-dark.css";
@import "../../../../node_modules/ag-grid-community/dist/styles/ag-theme-fresh.css";
@import "../../../../node_modules/ag-grid-community/dist/styles/ag-theme-bootstrap.css";
@import "../../../../node_modules/ag-grid-community/dist/styles/ag-theme-blue.css";
@import "../../../../node_modules/ag-grid-community/dist/styles/ag-theme-balham-dark.css";
@import "../../../../node_modules/ag-grid-community/dist/styles/ag-theme-material.css";
.grid {
height: 100%;
overflow: auto;
.ag-theme-material {
height: calc(100% - 50px);
}
}
.ag-theme-material .ag-cell{
line-height: 40px;
}
.selectAndData {
display: flex;
padding: 10px 0;
> .vue-treeselect {
width: 14%;
> .vue-treeselect__control {
height: 40px;
}
}
> .el-select {
width: 9%;
}
}
label:hover{
white-space:normal;
}
.el-range-separator{
width: 30px !important;
}
.ivu-card-body{
overflow-y: hidden !important;
}
.dareport-bbzscustom-view{
.dareport-bbzscustom-view{
position: relative;
position: relative;
}
}
...
...
app_web/src/pages/analysis/dareport-bbzscustom-view/dareport-bbzscustom-view.vue
浏览文件 @
57c914ae
此差异已折叠。
点击以展开。
app_web/src/user-register.ts
浏览文件 @
57c914ae
...
@@ -8,6 +8,8 @@ import AppFormJsonFieldSet from './components/app-form-json/app-form-json-field
...
@@ -8,6 +8,8 @@ import AppFormJsonFieldSet from './components/app-form-json/app-form-json-field
import
AppFormJsonDim
from
'./components/app-form-json/app-form-json-dim.vue'
import
AppFormJsonDim
from
'./components/app-form-json/app-form-json-dim.vue'
import
AppFormJsonMetric
from
'./components/app-form-json/app-form-json-metric.vue'
import
AppFormJsonMetric
from
'./components/app-form-json/app-form-json-metric.vue'
import
AppTreeselectRefreshview
from
'./components/app-treeselect-refreshview/app-treeselect-refreshview.vue'
import
AppTreeselectRefreshview
from
'./components/app-treeselect-refreshview/app-treeselect-refreshview.vue'
import
{
LicenseManager
}
from
"ag-grid-enterprise"
;
LicenseManager
.
setLicenseKey
(
"Shanghai_iBizSys_Information_Technology_Co_Ltd__MultiApp_1Devs14_January_2020__MTU3ODk2MDAwMDAwMA==f9f9222e95025fd3f9069f3db4bdd40d"
);
import
'jquery/dist/jquery.min.js'
import
'jquery/dist/jquery.min.js'
import
$
from
'jquery'
import
$
from
'jquery'
window
[
"$"
]
=
$
window
[
"$"
]
=
$
...
...
ibzdst-core/src/main/java/cn/ibizlab/core/extensions/service/DACoreService.java
浏览文件 @
57c914ae
...
@@ -892,6 +892,54 @@ public class DACoreService {
...
@@ -892,6 +892,54 @@ public class DACoreService {
return
new
Timestamp
(
c
.
getTime
().
getTime
());
return
new
Timestamp
(
c
.
getTime
().
getTime
());
}
}
/**
* 时间转换
* @param strTimp
* @return
*/
public
static
Timestamp
getTimestamp
(
String
strTimp
)
{
Timestamp
timestamp
=
null
;
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
SimpleDateFormat
simpleDateFormatTwo
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
SimpleDateFormat
simpleDateFormatCST
=
new
SimpleDateFormat
(
"EEE MMM dd HH:mm:ss zzz yyyy"
,
Locale
.
US
);
SimpleDateFormat
simpleDateFormatGMT
=
new
SimpleDateFormat
(
"EEE MMM ddHH:mm:ss 'GMT' yyyy"
,
Locale
.
US
);
SimpleDateFormat
simpleDateFormatUTC
=
new
SimpleDateFormat
(
"yyyy-MM-dd'T'HH:mm:ssZ"
);
try
{
if
(!
StringUtils
.
isEmpty
(
strTimp
)
&&
!(
"null"
.
equals
(
strTimp
)))
{
Date
date
=
null
;
if
(
strTimp
.
indexOf
(
"CST"
)
>=
0
)
{
date
=
simpleDateFormatCST
.
parse
(
strTimp
);
timestamp
=
new
Timestamp
(
date
.
getTime
());
return
timestamp
;
}
if
(
strTimp
.
indexOf
(
"GMT"
)
>=
0
)
{
date
=
simpleDateFormatGMT
.
parse
(
strTimp
);
timestamp
=
new
Timestamp
(
date
.
getTime
());
return
timestamp
;
}
if
(
strTimp
.
indexOf
(
"UT"
)
>=
0
)
{
date
=
simpleDateFormatUTC
.
parse
(
strTimp
);
timestamp
=
new
Timestamp
(
date
.
getTime
());
return
timestamp
;
}
if
(
strTimp
.
length
()
==
19
)
{
date
=
simpleDateFormatTwo
.
parse
(
strTimp
);
timestamp
=
new
Timestamp
(
date
.
getTime
());
return
timestamp
;
}
if
(
StringUtils
.
countOccurrencesOf
(
"now"
,
strTimp
)
!=
0
)
{
//strTimp等于now表示获取当前时间
date
=
new
Date
();
}
else
{
date
=
simpleDateFormat
.
parse
(
strTimp
);
}
timestamp
=
new
Timestamp
(
date
.
getTime
());
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
timestamp
;
}
public
Timestamp
getLastYear
(
Timestamp
time
)
public
Timestamp
getLastYear
(
Timestamp
time
)
{
{
Date
date
=
new
Date
(
time
.
getTime
());
Date
date
=
new
Date
(
time
.
getTime
());
...
...
ibzdst-provider/ibzdst-provider-api/src/main/java/cn/ibizlab/api/rest/extensions/DAGridCoreResource.java
0 → 100644
浏览文件 @
57c914ae
package
cn
.
ibizlab
.
api
.
rest
.
extensions
;
import
cn.ibizlab.core.analysis.domain.DAReport
;
import
cn.ibizlab.core.analysis.service.impl.DAReportServiceImpl
;
import
cn.ibizlab.core.dict.domain.DictOption
;
import
cn.ibizlab.core.dict.service.impl.DictOptionServiceImpl
;
import
cn.ibizlab.core.extensions.service.DACoreService
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
io.swagger.annotations.Api
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cache.annotation.Cacheable
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.*
;
import
java.sql.Timestamp
;
import
java.util.List
;
@Slf4j
@Api
(
tags
=
{
"接口"
})
@RestController
(
"api-dagridcore"
)
@RequestMapping
(
""
)
public
class
DAGridCoreResource
{
@Autowired
private
DACoreService
daCoreService
;
@Autowired
@Lazy
private
DAReportServiceImpl
daReportService
;
@Autowired
@Lazy
private
DictOptionServiceImpl
dictOptionService
;
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibizutil/reportdatas"
)
public
ResponseEntity
<
JSONObject
>
getReportdatas
(
@RequestBody
JSONObject
data
)
{
JSONObject
responseJson
=
new
JSONObject
();
String
id
=
data
.
getString
(
"id"
);
String
strLoadDimval
=
StringUtils
.
isEmpty
(
data
.
getString
(
"domin"
))
?
"%"
:
data
.
getString
(
"domin"
);
Timestamp
strLoadStartTime
=
StringUtils
.
isEmpty
(
data
.
getString
(
"startTime"
))
?
daCoreService
.
getDefaultStartTimestamp
()
:
daCoreService
.
getTimestamp
(
data
.
getString
(
"startTime"
));
Timestamp
strLoadEndTime
=
StringUtils
.
isEmpty
(
data
.
getString
(
"endTime"
))
?
daCoreService
.
getDefaultEndTimestamp
()
:
daCoreService
.
getTimestamp
(
data
.
getString
(
"endTime"
));
//获取表头及表单名称
DAReport
daReport
=
daReportService
.
getById
(
id
);
Object
vmcfg
=
JSON
.
parse
(
daReport
.
getConfig
());
String
reportname
=
daReport
.
getReportName
();
String
strDict
=
"CL_DST_REGION"
;
if
(
daReport
!=
null
&&
!
StringUtils
.
isEmpty
(
daReport
.
getDict
()))
{
strDict
=
daReport
.
getDict
();
}
//获取表格数据
JSONObject
jsonObject
=
daCoreService
.
getERPortData
(
daReport
,
strLoadDimval
,
strDict
,
strLoadStartTime
,
strLoadEndTime
,
"default"
);
responseJson
.
put
(
"vmcfg"
,
vmcfg
);
responseJson
.
put
(
"reportname"
,
reportname
);
responseJson
.
put
(
"resportdata"
,
jsonObject
);
responseJson
.
put
(
"dataDict"
,
daReport
.
getDict
());
return
ResponseEntity
.
ok
().
body
(
responseJson
);
}
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibizutil/getCodelist"
)
@Cacheable
(
value
=
"getCodelist"
,
key
=
"'getCodelist:'+#p0.getString(\"cid\")"
)
public
ResponseEntity
<
JSONArray
>
getCodelist
(
@RequestBody
JSONObject
data
)
{
JSONArray
result
=
new
JSONArray
();
String
cid
=
data
.
getString
(
"cid"
);
if
(
StringUtils
.
isEmpty
(
cid
)){
log
.
error
(
"未指定字典项过滤条件"
);
return
ResponseEntity
.
ok
().
body
(
result
);
}
QueryWrapper
queryWrapper
=
new
QueryWrapper
();
queryWrapper
.
eq
(
"cid"
,
cid
);
queryWrapper
.
orderByAsc
(
"val"
);
List
<
DictOption
>
list
=
dictOptionService
.
list
(
queryWrapper
);
JSONArray
jsonArray
=
new
JSONArray
();
JSONObject
jsonObject
=
null
;
for
(
DictOption
entity:
list
)
{
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"id"
,
entity
.
getValue
());
jsonObject
.
put
(
"value"
,
entity
.
getValue
());
jsonObject
.
put
(
"text"
,
entity
.
getLabel
());
jsonObject
.
put
(
"label"
,
entity
.
getLabel
());
jsonObject
.
put
(
"parentValue"
,
entity
.
getParent
());
jsonObject
.
put
(
"disabled"
,
entity
.
getDisabled
());
jsonArray
.
add
(
jsonObject
);
}
result
=
getTrees
(
jsonArray
,
""
);
return
ResponseEntity
.
ok
().
body
(
result
);
}
/**
* 递归创建树结构数据
* @param jsonArray
* @param parentValue
* @return
*/
public
JSONArray
getTrees
(
JSONArray
jsonArray
,
Object
parentValue
)
{
JSONArray
trees
=
new
JSONArray
();
for
(
int
i
=
0
;
i
<
jsonArray
.
size
();
i
++)
{
JSONObject
jsonObject
=
jsonArray
.
getJSONObject
(
i
);
String
codeItemParentValue
=
jsonObject
.
getString
(
"parentValue"
);
if
(
StringUtils
.
isEmpty
(
codeItemParentValue
))
{
codeItemParentValue
=
""
;
}
if
(
parentValue
.
equals
(
codeItemParentValue
))
{
JSONArray
childCodeItemArray
=
getTrees
(
jsonArray
,
jsonObject
.
getString
(
"value"
));
if
(
childCodeItemArray
.
size
()
>
0
)
{
jsonObject
.
put
(
"children"
,
childCodeItemArray
);
}
trees
.
add
(
jsonObject
);
}
}
return
trees
;
}
}
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录