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
61bb4a96
Commit
61bb4a96
authored
Apr 13, 2020
by
Suvalue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新预算编制
parent
91eec78a
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
451 additions
and
15 deletions
+451
-15
bsoft-api/src/main/java/com/bsoft/api/controller/SerProjValueController.java
+9
-0
bsoft-api/src/main/java/com/bsoft/api/mapper/SerPageValueConfigMapper.java
+25
-0
bsoft-api/src/main/java/com/bsoft/api/model/SerPageValueConfig.java
+77
-0
bsoft-api/src/main/java/com/bsoft/api/model/reqmodel/QuerySummary2.java
+16
-0
bsoft-api/src/main/java/com/bsoft/api/service/Impl/SerProjValueServiceImpl.java
+22
-4
bsoft-api/src/main/java/com/bsoft/api/service/SerProjValueService.java
+4
-0
bsoft-api/src/main/resources/mapper/SerPageFieldMapper.xml
+48
-0
bsoft-api/src/main/resources/mapper/SerPageProjFieldRsMapper.xml
+54
-0
bsoft-api/src/main/resources/mapper/SerPageProjMapper.xml
+48
-0
bsoft-api/src/main/resources/mapper/SerPageProjValueMapper.xml
+90
-0
bsoft-api/src/main/resources/mapper/SerPageValueConfigMapper.xml
+56
-0
bsoft-api/src/test/resources/generatorConfig.xml
+2
-11
No files found.
bsoft-api/src/main/java/com/bsoft/api/controller/SerProjValueController.java
View file @
61bb4a96
...
...
@@ -5,6 +5,7 @@ import com.bsoft.api.common.annotations.Token;
import
com.bsoft.api.model.reqmodel.AddBudgetValue
;
import
com.bsoft.api.model.reqmodel.QueryBudgetValue
;
import
com.bsoft.api.model.reqmodel.QuerySummary
;
import
com.bsoft.api.model.reqmodel.QuerySummary2
;
import
com.bsoft.api.service.SerProjValueService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -56,4 +57,12 @@ public class SerProjValueController {
return
Result
.
success
(
result
);
}
@PostMapping
(
"budget/summarynew2"
)
// @Token
@ApiOperation
(
"查询预算编制汇总数据"
)
public
Object
getSummaryNew2
(
@RequestBody
QuerySummary2
req
)
throws
Throwable
{
Object
result
=
projValueService
.
getDataNew
(
req
.
getPage
(),
req
.
getDim
());
return
Result
.
success
(
result
);
}
}
bsoft-api/src/main/java/com/bsoft/api/mapper/SerPageValueConfigMapper.java
0 → 100644
View file @
61bb4a96
package
com
.
bsoft
.
api
.
mapper
;
import
com.bsoft.api.model.SerPageValueConfig
;
import
org.apache.ibatis.annotations.Param
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.Map
;
public
interface
SerPageValueConfigMapper
{
int
deleteByPrimaryKey
(
BigDecimal
id
);
int
insert
(
SerPageValueConfig
record
);
SerPageValueConfig
selectByPrimaryKey
(
BigDecimal
id
);
List
<
SerPageValueConfig
>
selectAll
();
int
updateByPrimaryKey
(
SerPageValueConfig
record
);
SerPageValueConfig
selectByPage
(
@Param
(
"page"
)
Integer
page
);
List
<
Map
<
String
,
Object
>>
selectSqlStr
(
Map
<
String
,
String
>
map
);
}
\ No newline at end of file
bsoft-api/src/main/java/com/bsoft/api/model/SerPageValueConfig.java
0 → 100644
View file @
61bb4a96
package
com
.
bsoft
.
api
.
model
;
import
java.math.BigDecimal
;
import
java.util.Date
;
public
class
SerPageValueConfig
{
private
BigDecimal
id
;
private
Date
createDate
;
private
BigDecimal
createUserid
;
private
BigDecimal
state
;
private
BigDecimal
page
;
private
String
pageName
;
private
String
sqlstr
;
public
BigDecimal
getId
()
{
return
id
;
}
public
void
setId
(
BigDecimal
id
)
{
this
.
id
=
id
;
}
public
Date
getCreateDate
()
{
return
createDate
;
}
public
void
setCreateDate
(
Date
createDate
)
{
this
.
createDate
=
createDate
;
}
public
BigDecimal
getCreateUserid
()
{
return
createUserid
;
}
public
void
setCreateUserid
(
BigDecimal
createUserid
)
{
this
.
createUserid
=
createUserid
;
}
public
BigDecimal
getState
()
{
return
state
;
}
public
void
setState
(
BigDecimal
state
)
{
this
.
state
=
state
;
}
public
BigDecimal
getPage
()
{
return
page
;
}
public
void
setPage
(
BigDecimal
page
)
{
this
.
page
=
page
;
}
public
String
getPageName
()
{
return
pageName
;
}
public
void
setPageName
(
String
pageName
)
{
this
.
pageName
=
pageName
;
}
public
String
getSqlstr
()
{
return
sqlstr
;
}
public
void
setSqlstr
(
String
sqlstr
)
{
this
.
sqlstr
=
sqlstr
;
}
}
\ No newline at end of file
bsoft-api/src/main/java/com/bsoft/api/model/reqmodel/QuerySummary2.java
0 → 100644
View file @
61bb4a96
package
com
.
bsoft
.
api
.
model
.
reqmodel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.validation.constraints.NotNull
;
import
java.util.Map
;
@Data
public
class
QuerySummary2
{
@ApiModelProperty
(
value
=
"page"
,
required
=
true
)
@NotNull
(
message
=
"page 参数必传"
)
private
Integer
page
;
@ApiModelProperty
(
"查询值"
)
private
Map
<
String
,
String
>
dim
;
}
bsoft-api/src/main/java/com/bsoft/api/service/Impl/SerProjValueServiceImpl.java
View file @
61bb4a96
...
...
@@ -4,8 +4,10 @@ import com.bsoft.api.common.enums.ProjectType;
import
com.bsoft.api.common.enums.StateType
;
import
com.bsoft.api.common.enums.TypeState
;
import
com.bsoft.api.mapper.SerPageProjValueMapper
;
import
com.bsoft.api.mapper.SerPageValueConfigMapper
;
import
com.bsoft.api.mapper.SerProjMapper
;
import
com.bsoft.api.mapper.SerProjValueMapper
;
import
com.bsoft.api.model.SerPageValueConfig
;
import
com.bsoft.api.model.SerProjValue
;
import
com.bsoft.api.model.reqmodel.AddBudgetValue
;
import
com.bsoft.api.model.reqmodel.BudgetValue
;
...
...
@@ -16,10 +18,7 @@ import org.springframework.transaction.annotation.Transactional;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
@Service
public
class
SerProjValueServiceImpl
implements
SerProjValueService
{
...
...
@@ -29,6 +28,8 @@ public class SerProjValueServiceImpl implements SerProjValueService {
private
SerProjValueMapper
serProjValueMapper
;
@Resource
private
SerPageProjValueMapper
pageProjValueMapper
;
@Resource
private
SerPageValueConfigMapper
pageValueConfigMapper
;
//查询项目数值
@Override
...
...
@@ -117,4 +118,21 @@ public class SerProjValueServiceImpl implements SerProjValueService {
return
result
;
}
@Override
public
Object
getDataNew
(
Integer
page
,
Map
<
String
,
String
>
dim
)
{
SerPageValueConfig
pageValueConfig
=
pageValueConfigMapper
.
selectByPage
(
page
);
if
(
pageValueConfig
!=
null
){
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>()
{
{
put
(
"sqlStr"
,
pageValueConfig
.
getSqlstr
());
putAll
(
dim
);
}
};
List
<
Map
<
String
,
Object
>>
dataList
=
pageValueConfigMapper
.
selectSqlStr
(
map
);
return
dataList
;
}
return
null
;
}
}
bsoft-api/src/main/java/com/bsoft/api/service/SerProjValueService.java
View file @
61bb4a96
...
...
@@ -2,6 +2,8 @@ package com.bsoft.api.service;
import
com.bsoft.api.model.reqmodel.AddBudgetValue
;
import
java.util.Map
;
public
interface
SerProjValueService
{
Object
getValue
(
Integer
projectType
,
Integer
date
,
String
deptCode
)
throws
Throwable
;
...
...
@@ -10,4 +12,6 @@ public interface SerProjValueService {
Object
getSummary
(
Integer
date
);
Object
getData
(
Integer
date
,
Integer
page
);
Object
getDataNew
(
Integer
page
,
Map
<
String
,
String
>
dim
);
}
bsoft-api/src/main/resources/mapper/SerPageFieldMapper.xml
0 → 100644
View file @
61bb4a96
<?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.bsoft.api.mapper.SerPageFieldMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SerPageField"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"FIELD_CODE"
jdbcType=
"VARCHAR"
property=
"fieldCode"
/>
<result
column=
"FIELD_NAME"
jdbcType=
"VARCHAR"
property=
"fieldName"
/>
<result
column=
"REMARK"
jdbcType=
"VARCHAR"
property=
"remark"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.math.BigDecimal"
>
delete from SER_PAGE_FIELD
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SerPageField"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.math.BigDecimal"
>
select SEQ_SER_PAGE_FIELD_ID.nextval from dual
</selectKey>
insert into SER_PAGE_FIELD (CREATE_DATE, CREATE_USERID, "STATE",
FIELD_CODE, FIELD_NAME, REMARK
)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{fieldCode,jdbcType=VARCHAR}, #{fieldName,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}
)
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SerPageField"
>
update SER_PAGE_FIELD
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
"STATE" = #{state,jdbcType=DECIMAL},
FIELD_CODE = #{fieldCode,jdbcType=VARCHAR},
FIELD_NAME = #{fieldName,jdbcType=VARCHAR},
REMARK = #{remark,jdbcType=VARCHAR}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.math.BigDecimal"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, "STATE", FIELD_CODE, FIELD_NAME, REMARK
from SER_PAGE_FIELD
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, "STATE", FIELD_CODE, FIELD_NAME, REMARK
from SER_PAGE_FIELD
</select>
</mapper>
\ No newline at end of file
bsoft-api/src/main/resources/mapper/SerPageProjFieldRsMapper.xml
0 → 100644
View file @
61bb4a96
<?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.bsoft.api.mapper.SerPageProjFieldRsMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SerPageProjFieldRs"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"PROJ_TYPE"
jdbcType=
"DECIMAL"
property=
"projType"
/>
<result
column=
"PROJ_ID"
jdbcType=
"DECIMAL"
property=
"projId"
/>
<result
column=
"FIELD_ID"
jdbcType=
"DECIMAL"
property=
"fieldId"
/>
<result
column=
"REMARK"
jdbcType=
"VARCHAR"
property=
"remark"
/>
<result
column=
"SORT"
jdbcType=
"DECIMAL"
property=
"sort"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.math.BigDecimal"
>
delete from SER_PAGE_PROJ_FIELD_RS
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SerPageProjFieldRs"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.math.BigDecimal"
>
select SEQ_SER_PAGE_PROJ_FIELD_RS_ID.nextval from dual
</selectKey>
insert into SER_PAGE_PROJ_FIELD_RS (CREATE_DATE, CREATE_USERID, "STATE",
PROJ_TYPE, PROJ_ID, FIELD_ID,
REMARK, SORT)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{projType,jdbcType=DECIMAL}, #{projId,jdbcType=DECIMAL}, #{fieldId,jdbcType=DECIMAL},
#{remark,jdbcType=VARCHAR}, #{sort,jdbcType=DECIMAL})
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SerPageProjFieldRs"
>
update SER_PAGE_PROJ_FIELD_RS
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
"STATE" = #{state,jdbcType=DECIMAL},
PROJ_TYPE = #{projType,jdbcType=DECIMAL},
PROJ_ID = #{projId,jdbcType=DECIMAL},
FIELD_ID = #{fieldId,jdbcType=DECIMAL},
REMARK = #{remark,jdbcType=VARCHAR},
SORT = #{sort,jdbcType=DECIMAL}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.math.BigDecimal"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, "STATE", PROJ_TYPE, PROJ_ID, FIELD_ID, REMARK,
SORT
from SER_PAGE_PROJ_FIELD_RS
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, "STATE", PROJ_TYPE, PROJ_ID, FIELD_ID, REMARK,
SORT
from SER_PAGE_PROJ_FIELD_RS
</select>
</mapper>
\ No newline at end of file
bsoft-api/src/main/resources/mapper/SerPageProjMapper.xml
0 → 100644
View file @
61bb4a96
<?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.bsoft.api.mapper.SerPageProjMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SerPageProj"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"PROJ_NAME"
jdbcType=
"VARCHAR"
property=
"projName"
/>
<result
column=
"PROJ_CODE"
jdbcType=
"VARCHAR"
property=
"projCode"
/>
<result
column=
"PROJ_TYPE"
jdbcType=
"VARCHAR"
property=
"projType"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.math.BigDecimal"
>
delete from SER_PAGE_PROJ
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SerPageProj"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.math.BigDecimal"
>
select SEQ_SER_PAGE_PROJ_ID.nextval from dual
</selectKey>
insert into SER_PAGE_PROJ (CREATE_DATE, CREATE_USERID, "STATE",
PROJ_NAME, PROJ_CODE, PROJ_TYPE
)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{projName,jdbcType=VARCHAR}, #{projCode,jdbcType=VARCHAR}, #{projType,jdbcType=VARCHAR}
)
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SerPageProj"
>
update SER_PAGE_PROJ
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
"STATE" = #{state,jdbcType=DECIMAL},
PROJ_NAME = #{projName,jdbcType=VARCHAR},
PROJ_CODE = #{projCode,jdbcType=VARCHAR},
PROJ_TYPE = #{projType,jdbcType=VARCHAR}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.math.BigDecimal"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, "STATE", PROJ_NAME, PROJ_CODE, PROJ_TYPE
from SER_PAGE_PROJ
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, "STATE", PROJ_NAME, PROJ_CODE, PROJ_TYPE
from SER_PAGE_PROJ
</select>
</mapper>
\ No newline at end of file
bsoft-api/src/main/resources/mapper/SerPageProjValueMapper.xml
0 → 100644
View file @
61bb4a96
<?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.bsoft.api.mapper.SerPageProjValueMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SerPageProjValue"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"DEPT_CODE"
jdbcType=
"VARCHAR"
property=
"deptCode"
/>
<result
column=
"DATE_FILTER"
jdbcType=
"DECIMAL"
property=
"dateFilter"
/>
<result
column=
"DATA_CATEGORY"
jdbcType=
"VARCHAR"
property=
"dataCategory"
/>
<result
column=
"PROJ_TYPE"
jdbcType=
"DECIMAL"
property=
"projType"
/>
<result
column=
"PROJ_ID"
jdbcType=
"DECIMAL"
property=
"projId"
/>
<result
column=
"FIELD_ID"
jdbcType=
"DECIMAL"
property=
"fieldId"
/>
<result
column=
"FIELD_VALUE"
jdbcType=
"VARCHAR"
property=
"fieldValue"
/>
<result
column=
"FIELD_UNIT"
jdbcType=
"VARCHAR"
property=
"fieldUnit"
/>
</resultMap>
<resultMap
id=
"SummaryNew"
type=
"com.bsoft.api.model.respmodel.SummaryNew"
>
<result
column=
"DEPT_CODE"
jdbcType=
"VARCHAR"
property=
"deptCode"
/>
</resultMap>
<resultMap
id=
"SummaryValue"
type=
"com.bsoft.api.model.respmodel.SummaryValue"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"PROJ_NAME"
jdbcType=
"VARCHAR"
property=
"projName"
/>
<result
column=
"FIELD_NAME"
jdbcType=
"VARCHAR"
property=
"fieldName"
/>
<result
column=
"FIELD_ID"
jdbcType=
"DECIMAL"
property=
"fieldId"
/>
<result
column=
"FIELD_VALUE"
jdbcType=
"VARCHAR"
property=
"fieldValue"
/>
<result
column=
"FIELD_UNIT"
jdbcType=
"VARCHAR"
property=
"fieldUnit"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.math.BigDecimal"
>
delete from SER_PAGE_PROJ_VALUE
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SerPageProjValue"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.math.BigDecimal"
>
select SEQ_SER_PAGE_PROJ_VALUE_ID.nextval from dual
</selectKey>
insert into SER_PAGE_PROJ_VALUE (CREATE_DATE, CREATE_USERID, "STATE",
DEPT_CODE, DATE_FILTER, DATA_CATEGORY,
PROJ_TYPE, PROJ_ID, FIELD_ID,
FIELD_VALUE, FIELD_UNIT)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{deptCode,jdbcType=VARCHAR}, #{dateFilter,jdbcType=DECIMAL}, #{dataCategory,jdbcType=VARCHAR},
#{projType,jdbcType=DECIMAL}, #{projId,jdbcType=DECIMAL}, #{fieldId,jdbcType=DECIMAL},
#{fieldValue,jdbcType=VARCHAR}, #{fieldUnit,jdbcType=VARCHAR})
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SerPageProjValue"
>
update SER_PAGE_PROJ_VALUE
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
"STATE" = #{state,jdbcType=DECIMAL},
DEPT_CODE = #{deptCode,jdbcType=VARCHAR},
DATE_FILTER = #{dateFilter,jdbcType=DECIMAL},
DATA_CATEGORY = #{dataCategory,jdbcType=VARCHAR},
PROJ_TYPE = #{projType,jdbcType=DECIMAL},
PROJ_ID = #{projId,jdbcType=DECIMAL},
FIELD_ID = #{fieldId,jdbcType=DECIMAL},
FIELD_VALUE = #{fieldValue,jdbcType=VARCHAR},
FIELD_UNIT = #{fieldUnit,jdbcType=VARCHAR}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.math.BigDecimal"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, "STATE", DEPT_CODE, DATE_FILTER, DATA_CATEGORY,
PROJ_TYPE, PROJ_ID, FIELD_ID, FIELD_VALUE, FIELD_UNIT
from SER_PAGE_PROJ_VALUE
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, "STATE", DEPT_CODE, DATE_FILTER, DATA_CATEGORY,
PROJ_TYPE, PROJ_ID, FIELD_ID, FIELD_VALUE, FIELD_UNIT
from SER_PAGE_PROJ_VALUE
</select>
<select
id=
"selectDept"
resultMap=
"SummaryNew"
>
select DEPT_CODE
from SER_PAGE_PROJ_VALUE
where STATE = 1 and PROJ_TYPE = #{page,jdbcType = DECIMAL}
and DATE_FILTER = #{date,jdbcType = DECIMAL}
GROUP BY DEPT_CODE
</select>
<select
id=
"selectValue"
resultMap=
"SummaryValue"
>
select v.ID,p.PROJ_NAME,f.FIELD_NAME,v.FIELD_ID,v.FIELD_VALUE,v.FIELD_UNIT
from SER_PAGE_PROJ_VALUE v
join SER_PAGE_PROJ p on p.ID = v.PROJ_ID and p.STATE = 1
join SER_PAGE_FIELD f on f.ID = v.FIELD_ID and f.STATE = 1
join SER_PAGE_PROJ_FIELD_RS rs on rs.PROJ_TYPE = v.PROJ_TYPE and rs.PROJ_ID = v.PROJ_ID and rs.FIELD_ID = v.FIELD_ID
where v.STATE = 1 and v.PROJ_TYPE = #{page,jdbcType = DECIMAL}
and v.DATE_FILTER=#{date,jdbcType = DECIMAL} and v.DEPT_CODE = #{deptCode,jdbcType=VARCHAR}
order by rs.SORT
</select>
</mapper>
\ No newline at end of file
bsoft-api/src/main/resources/mapper/SerPageValueConfigMapper.xml
0 → 100644
View file @
61bb4a96
<?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.bsoft.api.mapper.SerPageValueConfigMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SerPageValueConfig"
>
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"PAGE"
jdbcType=
"DECIMAL"
property=
"page"
/>
<result
column=
"PAGE_NAME"
jdbcType=
"VARCHAR"
property=
"pageName"
/>
<result
column=
"SQLSTR"
jdbcType=
"VARCHAR"
property=
"sqlstr"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.math.BigDecimal"
>
delete from SER_PAGE_VALUE_CONFIG
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SerPageValueConfig"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.math.BigDecimal"
>
select SEQ_SER_PAGE_VALUE_CONFIG_ID.nextval from dual
</selectKey>
insert into SER_PAGE_VALUE_CONFIG (CREATE_DATE, CREATE_USERID, "STATE",
PAGE, PAGE_NAME, SQLSTR
)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{page,jdbcType=DECIMAL}, #{pageName,jdbcType=VARCHAR}, #{sqlstr,jdbcType=VARCHAR}
)
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SerPageValueConfig"
>
update SER_PAGE_VALUE_CONFIG
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
"STATE" = #{state,jdbcType=DECIMAL},
PAGE = #{page,jdbcType=DECIMAL},
PAGE_NAME = #{pageName,jdbcType=VARCHAR},
SQLSTR = #{sqlstr,jdbcType=VARCHAR}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.math.BigDecimal"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, "STATE", PAGE, PAGE_NAME, SQLSTR
from SER_PAGE_VALUE_CONFIG
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, "STATE", PAGE, PAGE_NAME, SQLSTR
from SER_PAGE_VALUE_CONFIG
</select>
<select
id=
"selectByPage"
resultMap=
"BaseResultMap"
>
select *
from SER_PAGE_VALUE_CONFIG
where STATE = 1 and PAGE = #{page,jdbcType=DECIMAL}
</select>
<select
id=
"selectSqlStr"
resultType=
"java.util.Map"
>
${sqlStr}
</select>
</mapper>
\ No newline at end of file
bsoft-api/src/test/resources/generatorConfig.xml
View file @
61bb4a96
...
...
@@ -42,17 +42,8 @@
<!-- 生成映射接口配置 -->
<javaClientGenerator
targetPackage=
"com.bsoft.api.mapper"
targetProject=
"src/main/java"
type=
"XMLMAPPER"
/>
<table
tableName=
"SER_PAGE_FIELD"
>
<generatedKey
column=
"id"
sqlStatement=
"select SEQ_SER_PAGE_FIELD_ID.nextval from dual"
identity=
"true"
/>
</table>
<table
tableName=
"SER_PAGE_PROJ"
>
<generatedKey
column=
"id"
sqlStatement=
"select SEQ_SER_PAGE_PROJ_ID.nextval from dual"
identity=
"true"
/>
</table>
<table
tableName=
"SER_PAGE_PROJ_FIELD_RS"
>
<generatedKey
column=
"id"
sqlStatement=
"select SEQ_SER_PAGE_PROJ_FIELD_RS_ID.nextval from dual"
identity=
"true"
/>
</table>
<table
tableName=
"SER_PAGE_PROJ_VALUE"
>
<generatedKey
column=
"id"
sqlStatement=
"select SEQ_SER_PAGE_PROJ_VALUE_ID.nextval from dual"
identity=
"true"
/>
<table
tableName=
"SER_PAGE_VALUE_CONFIG"
>
<generatedKey
column=
"id"
sqlStatement=
"select SEQ_SER_PAGE_VALUE_CONFIG_ID.nextval from dual"
identity=
"true"
/>
</table>
</context>
...
...
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