Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sv-springboot
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bsoft
sv-springboot
Commits
16d434cb
Commit
16d434cb
authored
Sep 10, 2020
by
Suvalue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
20200910更新,新增指标查询页面
parent
8192b1a0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
357 additions
and
10 deletions
+357
-10
hs-api/src/main/java/com/hs/api/mapper/DicIndInfoMapper.java
+21
-0
hs-api/src/main/java/com/hs/api/model/DicIndInfo.java
+196
-0
hs-api/src/main/resources/mapper/DicIndInfoMapper.xml
+140
-0
hs-api/src/main/resources/static/ind/data_index.html
+0
-7
hs-api/src/main/resources/static/ind/index.html
+0
-3
No files found.
hs-api/src/main/java/com/hs/api/mapper/DicIndInfoMapper.java
0 → 100644
View file @
16d434cb
package
com
.
hs
.
api
.
mapper
;
import
com.hs.api.model.DicIndInfo
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
public
interface
DicIndInfoMapper
{
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
DicIndInfo
record
);
DicIndInfo
selectByPrimaryKey
(
Long
id
);
List
<
DicIndInfo
>
selectAll
();
int
updateByPrimaryKey
(
DicIndInfo
record
);
List
<
DicIndInfo
>
selectAllByFilter
(
@Param
(
"pageCode"
)
Integer
pageCode
,
@Param
(
"filter"
)
String
filter
);
}
\ No newline at end of file
hs-api/src/main/java/com/hs/api/model/DicIndInfo.java
0 → 100644
View file @
16d434cb
package
com
.
hs
.
api
.
model
;
import
java.util.Date
;
public
class
DicIndInfo
{
private
Integer
id
;
private
Date
createDate
;
private
String
createUserid
;
private
Integer
state
;
private
String
indCode
;
private
String
indName
;
private
String
indField
;
private
String
showField
;
private
String
columnType
;
private
Integer
computeMode
;
private
Integer
execWay
;
private
String
columnWay
;
private
String
paramSt
;
private
String
paramNd
;
private
String
paramRd
;
private
String
describe
;
private
String
checkSql
;
private
String
calculateWay
;
private
String
execSql
;
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
Date
getCreateDate
()
{
return
createDate
;
}
public
void
setCreateDate
(
Date
createDate
)
{
this
.
createDate
=
createDate
;
}
public
String
getCreateUserid
()
{
return
createUserid
;
}
public
void
setCreateUserid
(
String
createUserid
)
{
this
.
createUserid
=
createUserid
;
}
public
Integer
getState
()
{
return
state
;
}
public
void
setState
(
Integer
state
)
{
this
.
state
=
state
;
}
public
String
getIndCode
()
{
return
indCode
;
}
public
void
setIndCode
(
String
indCode
)
{
this
.
indCode
=
indCode
;
}
public
String
getIndName
()
{
return
indName
;
}
public
void
setIndName
(
String
indName
)
{
this
.
indName
=
indName
;
}
public
String
getIndField
()
{
return
indField
;
}
public
void
setIndField
(
String
indField
)
{
this
.
indField
=
indField
;
}
public
String
getShowField
()
{
return
showField
;
}
public
void
setShowField
(
String
showField
)
{
this
.
showField
=
showField
;
}
public
String
getColumnType
()
{
return
columnType
;
}
public
void
setColumnType
(
String
columnType
)
{
this
.
columnType
=
columnType
;
}
public
Integer
getComputeMode
()
{
return
computeMode
;
}
public
void
setComputeMode
(
Integer
computeMode
)
{
this
.
computeMode
=
computeMode
;
}
public
Integer
getExecWay
()
{
return
execWay
;
}
public
void
setExecWay
(
Integer
execWay
)
{
this
.
execWay
=
execWay
;
}
public
String
getColumnWay
()
{
return
columnWay
;
}
public
void
setColumnWay
(
String
columnWay
)
{
this
.
columnWay
=
columnWay
;
}
public
String
getParamSt
()
{
return
paramSt
;
}
public
void
setParamSt
(
String
paramSt
)
{
this
.
paramSt
=
paramSt
;
}
public
String
getParamNd
()
{
return
paramNd
;
}
public
void
setParamNd
(
String
paramNd
)
{
this
.
paramNd
=
paramNd
;
}
public
String
getParamRd
()
{
return
paramRd
;
}
public
void
setParamRd
(
String
paramRd
)
{
this
.
paramRd
=
paramRd
;
}
public
String
getDescribe
()
{
return
describe
;
}
public
void
setDescribe
(
String
describe
)
{
this
.
describe
=
describe
;
}
public
String
getCheckSql
()
{
return
checkSql
;
}
public
void
setCheckSql
(
String
checkSql
)
{
this
.
checkSql
=
checkSql
;
}
public
String
getCalculateWay
()
{
return
calculateWay
;
}
public
void
setCalculateWay
(
String
calculateWay
)
{
this
.
calculateWay
=
calculateWay
;
}
public
String
getExecSql
()
{
return
execSql
;
}
public
void
setExecSql
(
String
execSql
)
{
this
.
execSql
=
execSql
;
}
}
\ No newline at end of file
hs-api/src/main/resources/mapper/DicIndInfoMapper.xml
0 → 100644
View file @
16d434cb
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.hs.api.mapper.DicIndInfoMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.hs.api.model.DicIndInfo"
>
<id
column=
"ID"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"VARCHAR"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"INTEGER"
property=
"state"
/>
<result
column=
"IND_CODE"
jdbcType=
"VARCHAR"
property=
"indCode"
/>
<result
column=
"IND_NAME"
jdbcType=
"VARCHAR"
property=
"indName"
/>
<result
column=
"IND_FIELD"
jdbcType=
"VARCHAR"
property=
"indField"
/>
<result
column=
"SHOW_FIELD"
jdbcType=
"VARCHAR"
property=
"showField"
/>
<result
column=
"COLUMN_TYPE"
jdbcType=
"VARCHAR"
property=
"columnType"
/>
<result
column=
"COMPUTE_MODE"
jdbcType=
"INTEGER"
property=
"computeMode"
/>
<result
column=
"EXEC_WAY"
jdbcType=
"INTEGER"
property=
"execWay"
/>
<result
column=
"COLUMN_WAY"
jdbcType=
"VARCHAR"
property=
"columnWay"
/>
<result
column=
"PARAM_ST"
jdbcType=
"VARCHAR"
property=
"paramSt"
/>
<result
column=
"PARAM_ND"
jdbcType=
"VARCHAR"
property=
"paramNd"
/>
<result
column=
"PARAM_RD"
jdbcType=
"VARCHAR"
property=
"paramRd"
/>
<result
column=
"DESCRIBE"
jdbcType=
"VARCHAR"
property=
"describe"
/>
<result
column=
"CHECK_SQL"
jdbcType=
"VARCHAR"
property=
"checkSql"
/>
<result
column=
"CALCULATE_WAY"
jdbcType=
"VARCHAR"
property=
"calculateWay"
/>
<result
column=
"EXEC_SQL"
jdbcType=
"LONGVARCHAR"
property=
"execSql"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete
from dic_ind_info
where ID = #{id,jdbcType=INTEGER}
</delete>
<insert
id=
"insert"
parameterType=
"com.hs.api.model.DicIndInfo"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into dic_ind_info (CREATE_DATE, CREATE_USERID, `STATE`,
IND_CODE, IND_NAME, IND_FIELD,
SHOW_FIELD, COLUMN_TYPE, COMPUTE_MODE,
EXEC_WAY, COLUMN_WAY, PARAM_ST,
PARAM_ND, PARAM_RD, `DESCRIBE`,
CHECK_SQL, CALCULATE_WAY, EXEC_SQL
)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=VARCHAR}, #{state,jdbcType=INTEGER},
#{indCode,jdbcType=VARCHAR}, #{indName,jdbcType=VARCHAR}, #{indField,jdbcType=VARCHAR},
#{showField,jdbcType=VARCHAR}, #{columnType,jdbcType=VARCHAR}, #{computeMode,jdbcType=INTEGER},
#{execWay,jdbcType=INTEGER}, #{columnWay,jdbcType=VARCHAR}, #{paramSt,jdbcType=VARCHAR},
#{paramNd,jdbcType=VARCHAR}, #{paramRd,jdbcType=VARCHAR}, #{describe,jdbcType=VARCHAR},
#{checkSql,jdbcType=VARCHAR}, #{calculateWay,jdbcType=VARCHAR}, #{execSql,jdbcType=LONGVARCHAR}
)
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.hs.api.model.DicIndInfo"
>
update dic_ind_info
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=VARCHAR},
`STATE` = #{state,jdbcType=INTEGER},
IND_CODE = #{indCode,jdbcType=VARCHAR},
IND_NAME = #{indName,jdbcType=VARCHAR},
IND_FIELD = #{indField,jdbcType=VARCHAR},
SHOW_FIELD = #{showField,jdbcType=VARCHAR},
COLUMN_TYPE = #{columnType,jdbcType=VARCHAR},
COMPUTE_MODE = #{computeMode,jdbcType=INTEGER},
EXEC_WAY = #{execWay,jdbcType=INTEGER},
COLUMN_WAY = #{columnWay,jdbcType=VARCHAR},
PARAM_ST = #{paramSt,jdbcType=VARCHAR},
PARAM_ND = #{paramNd,jdbcType=VARCHAR},
PARAM_RD = #{paramRd,jdbcType=VARCHAR},
`DESCRIBE` = #{describe,jdbcType=VARCHAR},
CHECK_SQL = #{checkSql,jdbcType=VARCHAR},
CALCULATE_WAY = #{calculateWay,jdbcType=VARCHAR},
EXEC_SQL = #{execSql,jdbcType=LONGVARCHAR}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select ID,
CREATE_DATE,
CREATE_USERID,
`STATE`,
IND_CODE,
IND_NAME,
IND_FIELD,
SHOW_FIELD,
COLUMN_TYPE,
COMPUTE_MODE,
EXEC_WAY,
COLUMN_WAY,
PARAM_ST,
PARAM_ND,
PARAM_RD,
`DESCRIBE`,
CHECK_SQL,
CALCULATE_WAY,
EXEC_SQL
from dic_ind_info
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID,
CREATE_DATE,
CREATE_USERID,
`STATE`,
IND_CODE,
IND_NAME,
IND_FIELD,
SHOW_FIELD,
COLUMN_TYPE,
COMPUTE_MODE,
EXEC_WAY,
COLUMN_WAY,
PARAM_ST,
PARAM_ND,
PARAM_RD,
`DESCRIBE`,
CHECK_SQL,
CALCULATE_WAY,
EXEC_SQL
from dic_ind_info
</select>
<select
id=
"selectAllByFilter"
resultMap=
"BaseResultMap"
>
SELECT DISTINCT C.IND_CODE,
C.IND_NAME,
C.IND_FIELD,
C.SHOW_FIELD,
(COALESCE(C.CALCULATE_WAY, C.EXEC_SQL)) CALCULATE_WAY
FROM dic_page_block_rs A
LEFT JOIN dic_block_ind_rs B ON A.ID = B.BLOCK_ID
LEFT JOIN dic_ind_info C ON B.IND_ID = C.IND_CODE
LEFT JOIN dic_page_info D ON A.page_id = D.id
WHERE A.state = 1
AND B.STATE = 1
AND C.STATE = 1
<if
test=
"pageCode!=null"
>
AND D.PAGE_CODE = #{pageCode,jdbcType=INTEGER}
</if>
AND IND_CODE IS NOT NULL
<if
test=
"filter!=null"
>
AND (INSTR(c.IND_NAME, #{filter,jdbcType=VARCHAR}) > 0
or INSTR(c.IND_FIELD, #{filter,jdbcType=VARCHAR}) > 0)
</if>
ORDER BY IND_CODE
</select>
</mapper>
\ No newline at end of file
hs-api/src/main/resources/static/ind/data_index.html
View file @
16d434cb
...
...
@@ -28,13 +28,6 @@
</tr>
</thead>
<tbody
id=
"ind_list"
>
<tr>
<td>
1
</td>
<td>
1
</td>
<td>
1
</td>
<td>
1
</td>
<td>
1
</td>
</tr>
</tbody>
</table>
</div>
...
...
hs-api/src/main/resources/static/ind/index.html
View file @
16d434cb
...
...
@@ -32,8 +32,6 @@
onclick=
"window.location.href='data_index.html?pageCode=4&pageName='+this.value"
>
<input
type=
"button"
class=
"subBtn"
value=
"绩效考核"
onclick=
"window.location.href='data_index.html?pageCode=5&pageName='+this.value"
>
<input
type=
"button"
class=
"subBtn"
value=
"通用报表"
onclick=
"window.location.href='data_index.html?pageCode=11&pageName='+this.value"
>
</div>
</body>
</html>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment