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
0073b8a0
Commit
0073b8a0
authored
May 07, 2020
by
Suvalue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预算编制实值调整
parent
b74abfcf
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
223 additions
and
6 deletions
+223
-6
bsoft-admin/src/main/java/com/bsoft/admin/service/DicOrgService.java
+9
-1
bsoft-admin/src/main/resources/application-test.properties
+2
-2
bsoft-api/src/main/java/com/bsoft/api/mapper/SerProjValueSzMapper.java
+23
-0
bsoft-api/src/main/java/com/bsoft/api/model/SerProjValueSz.java
+107
-0
bsoft-api/src/main/java/com/bsoft/api/model/respmodel/SerProjValueResp.java
+2
-0
bsoft-api/src/main/java/com/bsoft/api/service/Impl/SerProjValueServiceImpl.java
+14
-1
bsoft-api/src/main/resources/mapper/SerProjValueSzMapper.xml
+64
-0
bsoft-api/src/test/resources/generatorConfig.xml
+2
-2
No files found.
bsoft-admin/src/main/java/com/bsoft/admin/service/DicOrgService.java
View file @
0073b8a0
...
@@ -9,15 +9,23 @@ import java.util.List;
...
@@ -9,15 +9,23 @@ import java.util.List;
public
interface
DicOrgService
{
public
interface
DicOrgService
{
//顶级机构的父级id
//顶级机构的父级id
final
static
Integer
ORG_TOP_PARENT_ID
=
0
;
final
static
Integer
ORG_TOP_PARENT_ID
=
0
;
List
<
DicOrgList
>
getParentAll
(
OrgReq
.
GetOrgReq
org
);
List
<
DicOrgList
>
getParentAll
(
OrgReq
.
GetOrgReq
org
);
List
<
DicOrg
>
getAll
();
List
<
DicOrg
>
getAll
();
DicOrg
info
(
Long
orgId
);
DicOrg
info
(
Long
orgId
);
boolean
addOrg
(
Long
userId
,
OrgReq
.
AddOrgReq
org
);
boolean
addOrg
(
Long
userId
,
OrgReq
.
AddOrgReq
org
);
boolean
deleteOrg
(
OrgReq
.
DeleteOrgReq
org
);
boolean
deleteOrg
(
OrgReq
.
DeleteOrgReq
org
);
boolean
updateOrg
(
OrgReq
.
UpdateOrgReq
org
);
boolean
updateOrg
(
OrgReq
.
UpdateOrgReq
org
);
DicOrg
getByName
(
String
orgName
);
DicOrg
getByName
(
String
orgName
);
List
<
SysUserOrgRsList
>
getUserOrg
(
Long
userId
);
List
<
SysUserOrgRsList
>
getUserOrg
(
Long
userId
);
boolean
saveUserOrg
(
Long
userId
,
OrgReq
.
SaveUserOrgReq
org
);
boolean
saveUserOrg
(
Long
userId
,
OrgReq
.
SaveUserOrgReq
org
);
}
}
bsoft-admin/src/main/resources/application-test.properties
View file @
0073b8a0
#### \u5F00\u53D1\u73AF\u5883 ###################################################
#### \u5F00\u53D1\u73AF\u5883 ###################################################
spring.datasource.driver-class-name
=
oracle.jdbc.driver.OracleDriver
spring.datasource.driver-class-name
=
oracle.jdbc.driver.OracleDriver
spring.datasource.username
=
CH
spring.datasource.username
=
scml_zp_cs
spring.datasource.password
=
123
456
spring.datasource.password
=
123
spring.datasource.url
=
jdbc:oracle:thin:@192.168.18.171:1521:his
spring.datasource.url
=
jdbc:oracle:thin:@192.168.18.171:1521:his
# Redis\u6570\u636E\u5E93\u7D22\u5F15\uFF08\u9ED8\u8BA40\uFF09
# Redis\u6570\u636E\u5E93\u7D22\u5F15\uFF08\u9ED8\u8BA40\uFF09
...
...
bsoft-api/src/main/java/com/bsoft/api/mapper/SerProjValueSzMapper.java
0 → 100644
View file @
0073b8a0
package
com
.
bsoft
.
api
.
mapper
;
import
com.bsoft.api.model.SerProjValueSz
;
import
org.apache.ibatis.annotations.Param
;
import
java.math.BigDecimal
;
import
java.util.List
;
public
interface
SerProjValueSzMapper
{
int
deleteByPrimaryKey
(
BigDecimal
id
);
int
insert
(
SerProjValueSz
record
);
SerProjValueSz
selectByPrimaryKey
(
BigDecimal
id
);
List
<
SerProjValueSz
>
selectAll
();
int
updateByPrimaryKey
(
SerProjValueSz
record
);
List
<
SerProjValueSz
>
selectByProj
(
@Param
(
"projId"
)
BigDecimal
projId
,
@Param
(
"date"
)
Integer
date
,
@Param
(
"deptCode"
)
String
deptCode
,
@Param
(
"hosCode"
)
String
hosCode
);
}
\ No newline at end of file
bsoft-api/src/main/java/com/bsoft/api/model/SerProjValueSz.java
0 → 100644
View file @
0073b8a0
package
com
.
bsoft
.
api
.
model
;
import
java.math.BigDecimal
;
import
java.util.Date
;
public
class
SerProjValueSz
{
private
BigDecimal
id
;
private
Date
createDate
;
private
BigDecimal
createUserid
;
private
BigDecimal
state
;
private
BigDecimal
projId
;
private
BigDecimal
sz
;
private
BigDecimal
zxpl
;
private
BigDecimal
date
;
private
String
deptCode
;
private
String
hoscode
;
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
getProjId
()
{
return
projId
;
}
public
void
setProjId
(
BigDecimal
projId
)
{
this
.
projId
=
projId
;
}
public
BigDecimal
getSz
()
{
return
sz
;
}
public
void
setSz
(
BigDecimal
sz
)
{
this
.
sz
=
sz
;
}
public
BigDecimal
getZxpl
()
{
return
zxpl
;
}
public
void
setZxpl
(
BigDecimal
zxpl
)
{
this
.
zxpl
=
zxpl
;
}
public
BigDecimal
getDate
()
{
return
date
;
}
public
void
setDate
(
BigDecimal
date
)
{
this
.
date
=
date
;
}
public
String
getDeptCode
()
{
return
deptCode
;
}
public
void
setDeptCode
(
String
deptCode
)
{
this
.
deptCode
=
deptCode
;
}
public
String
getHoscode
()
{
return
hoscode
;
}
public
void
setHoscode
(
String
hoscode
)
{
this
.
hoscode
=
hoscode
;
}
}
\ No newline at end of file
bsoft-api/src/main/java/com/bsoft/api/model/respmodel/SerProjValueResp.java
View file @
0073b8a0
package
com
.
bsoft
.
api
.
model
.
respmodel
;
package
com
.
bsoft
.
api
.
model
.
respmodel
;
import
com.bsoft.api.model.SerProjValue
;
import
com.bsoft.api.model.SerProjValue
;
import
com.bsoft.api.model.SerProjValueSz
;
import
lombok.Data
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
...
@@ -11,5 +12,6 @@ public class SerProjValueResp extends SerProjValue {
...
@@ -11,5 +12,6 @@ public class SerProjValueResp extends SerProjValue {
private
String
projName
;
private
String
projName
;
private
BigDecimal
isBudget
;
private
BigDecimal
isBudget
;
private
BigDecimal
parent
;
private
BigDecimal
parent
;
private
List
<
SerProjValueSz
>
valueSz
;
private
List
<
SerProjValueResp
>
childs
;
private
List
<
SerProjValueResp
>
childs
;
}
}
bsoft-api/src/main/java/com/bsoft/api/service/Impl/SerProjValueServiceImpl.java
View file @
0073b8a0
...
@@ -8,10 +8,12 @@ import com.bsoft.api.mapper.*;
...
@@ -8,10 +8,12 @@ import com.bsoft.api.mapper.*;
import
com.bsoft.api.model.DicOrg
;
import
com.bsoft.api.model.DicOrg
;
import
com.bsoft.api.model.SerPageValueConfig
;
import
com.bsoft.api.model.SerPageValueConfig
;
import
com.bsoft.api.model.SerProjValue
;
import
com.bsoft.api.model.SerProjValue
;
import
com.bsoft.api.model.SerProjValueSz
;
import
com.bsoft.api.model.reqmodel.AddBudgetValue
;
import
com.bsoft.api.model.reqmodel.AddBudgetValue
;
import
com.bsoft.api.model.reqmodel.BudgetValue
;
import
com.bsoft.api.model.reqmodel.BudgetValue
;
import
com.bsoft.api.model.respmodel.*
;
import
com.bsoft.api.model.respmodel.*
;
import
com.bsoft.api.service.SerProjValueService
;
import
com.bsoft.api.service.SerProjValueService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -32,6 +34,8 @@ public class SerProjValueServiceImpl implements SerProjValueService {
...
@@ -32,6 +34,8 @@ public class SerProjValueServiceImpl implements SerProjValueService {
private
SerPageValueConfigMapper
pageValueConfigMapper
;
private
SerPageValueConfigMapper
pageValueConfigMapper
;
@Resource
@Resource
private
DicOrgMapper
dicOrgMapper
;
private
DicOrgMapper
dicOrgMapper
;
@Resource
private
SerProjValueSzMapper
projValueSzMapper
;
//查询项目数值
//查询项目数值
@Override
@Override
...
@@ -46,6 +50,7 @@ public class SerProjValueServiceImpl implements SerProjValueService {
...
@@ -46,6 +50,7 @@ public class SerProjValueServiceImpl implements SerProjValueService {
List
<
ProjectInfo
>
projectInfo
=
null
;
List
<
ProjectInfo
>
projectInfo
=
null
;
List
<
SerProjValueResp
>
values
=
null
;
List
<
SerProjValueResp
>
values
=
null
;
List
<
SerProjValueResp
>
resultValues
=
null
;
List
<
SerProjValueResp
>
resultValues
=
null
;
List
<
SerProjValueSz
>
valueSzs
=
null
;
for
(
Map
<
String
,
Object
>
enumInfo
:
enumList
){
for
(
Map
<
String
,
Object
>
enumInfo
:
enumList
){
projectValue
=
new
ProjectValue
();
projectValue
=
new
ProjectValue
();
projectValue
.
setTypeId
((
Integer
)
enumInfo
.
get
(
"value"
));
projectValue
.
setTypeId
((
Integer
)
enumInfo
.
get
(
"value"
));
...
@@ -55,6 +60,10 @@ public class SerProjValueServiceImpl implements SerProjValueService {
...
@@ -55,6 +60,10 @@ public class SerProjValueServiceImpl implements SerProjValueService {
for
(
ProjectInfo
projInfo
:
projectInfo
){
for
(
ProjectInfo
projInfo
:
projectInfo
){
values
=
serProjValueMapper
.
selectValue
(
projectType
,(
Integer
)
enumInfo
.
get
(
"value"
),
values
=
serProjValueMapper
.
selectValue
(
projectType
,(
Integer
)
enumInfo
.
get
(
"value"
),
projInfo
.
getExponentId
(),
deptCode
,
date
,
BudgetType
.
NOT
.
getValue
(),
orgCode
);
projInfo
.
getExponentId
(),
deptCode
,
date
,
BudgetType
.
NOT
.
getValue
(),
orgCode
);
for
(
SerProjValueResp
value
:
values
){
valueSzs
=
projValueSzMapper
.
selectByProj
(
value
.
getProjId
(),
date
,
deptCode
,
orgCode
);
value
.
setValueSz
(
valueSzs
);
}
resultValues
=
getLevelData
(
values
,
BigDecimal
.
valueOf
(
PROJ_TOP_PARENT_ID
));
resultValues
=
getLevelData
(
values
,
BigDecimal
.
valueOf
(
PROJ_TOP_PARENT_ID
));
if
(
resultValues
!=
null
&&
resultValues
.
size
()
>
0
)
if
(
resultValues
!=
null
&&
resultValues
.
size
()
>
0
)
projInfo
.
setProjectValues
(
resultValues
);
projInfo
.
setProjectValues
(
resultValues
);
...
@@ -112,8 +121,12 @@ public class SerProjValueServiceImpl implements SerProjValueService {
...
@@ -112,8 +121,12 @@ public class SerProjValueServiceImpl implements SerProjValueService {
projType
.
setProjTypeName
(
String
.
valueOf
(
enumInfo
.
get
(
"description"
)));
projType
.
setProjTypeName
(
String
.
valueOf
(
enumInfo
.
get
(
"description"
)));
List
<
SerProjValueResp
>
values
=
serProjValueMapper
.
selectValue
((
Integer
)
enumInfo
.
get
(
"value"
),
null
,
List
<
SerProjValueResp
>
values
=
serProjValueMapper
.
selectValue
((
Integer
)
enumInfo
.
get
(
"value"
),
null
,
null
,
summary
.
getDeptCode
(),
date
,
budgetType
,
orgCode
);
null
,
summary
.
getDeptCode
(),
date
,
budgetType
,
orgCode
);
if
(
values
!=
null
)
if
(
values
!=
null
){
for
(
SerProjValueResp
value
:
values
){
value
.
setValueSz
(
projValueSzMapper
.
selectByProj
(
value
.
getProjId
(),
date
,
summary
.
getDeptCode
(),
orgCode
));
}
projType
.
setProject
(
values
);
projType
.
setProject
(
values
);
}
summary
.
getProjTypeList
().
add
(
projType
);
summary
.
getProjTypeList
().
add
(
projType
);
}
}
}
else
{
}
else
{
...
...
bsoft-api/src/main/resources/mapper/SerProjValueSzMapper.xml
0 → 100644
View file @
0073b8a0
<?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.SerProjValueSzMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SerProjValueSz"
>
<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_ID"
jdbcType=
"DECIMAL"
property=
"projId"
/>
<result
column=
"SZ"
jdbcType=
"DECIMAL"
property=
"sz"
/>
<result
column=
"ZXPL"
jdbcType=
"DECIMAL"
property=
"zxpl"
/>
<result
column=
"DATE"
jdbcType=
"DECIMAL"
property=
"date"
/>
<result
column=
"DEPT_CODE"
jdbcType=
"VARCHAR"
property=
"deptCode"
/>
<result
column=
"HOSCODE"
jdbcType=
"VARCHAR"
property=
"hoscode"
/>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.math.BigDecimal"
>
delete from SER_PROJ_VALUE_SZ
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SerProjValueSz"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.math.BigDecimal"
>
select SEQ_SER_PROJ_VALUE_SZ_ID.nextval from dual
</selectKey>
insert into SER_PROJ_VALUE_SZ (CREATE_DATE, CREATE_USERID, "STATE",
PROJ_ID, SZ, ZXPL, "DATE",
DEPT_CODE, HOSCODE)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{projId,jdbcType=DECIMAL}, #{sz,jdbcType=DECIMAL}, #{zxpl,jdbcType=DECIMAL}, #{date,jdbcType=DECIMAL},
#{deptCode,jdbcType=VARCHAR}, #{hoscode,jdbcType=VARCHAR})
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SerProjValueSz"
>
update SER_PROJ_VALUE_SZ
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
"STATE" = #{state,jdbcType=DECIMAL},
PROJ_ID = #{projId,jdbcType=DECIMAL},
SZ = #{sz,jdbcType=DECIMAL},
ZXPL = #{zxpl,jdbcType=DECIMAL},
"DATE" = #{date,jdbcType=DECIMAL},
DEPT_CODE = #{deptCode,jdbcType=VARCHAR},
HOSCODE = #{hoscode,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_ID, SZ, ZXPL, "DATE", DEPT_CODE,
HOSCODE
from SER_PROJ_VALUE_SZ
where ID = #{id,jdbcType=DECIMAL}
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, "STATE", PROJ_ID, SZ, ZXPL, "DATE", DEPT_CODE,
HOSCODE
from SER_PROJ_VALUE_SZ
</select>
<select
id=
"selectByProj"
resultMap=
"BaseResultMap"
>
select *
from SER_PROJ_VALUE_SZ
where STATE = 1 and PROJ_ID = #{projId,jdbcType=DECIMAL}
and TO_NUMBER(SUBSTR("DATE", 1, 4)) = #{date,jdbcType=DECIMAL}
and DEPT_CODE = #{deptCode,jdbcType=VARCHAR} and HOSCODE = #{hosCode,jdbcType=VARCHAR}
order by "DATE" desc
</select>
</mapper>
\ No newline at end of file
bsoft-api/src/test/resources/generatorConfig.xml
View file @
0073b8a0
...
@@ -42,8 +42,8 @@
...
@@ -42,8 +42,8 @@
<!-- 生成映射接口配置 -->
<!-- 生成映射接口配置 -->
<javaClientGenerator
targetPackage=
"com.bsoft.api.mapper"
targetProject=
"src/main/java"
type=
"XMLMAPPER"
/>
<javaClientGenerator
targetPackage=
"com.bsoft.api.mapper"
targetProject=
"src/main/java"
type=
"XMLMAPPER"
/>
<table
tableName=
"SER_PROJ_VALUE_
HISTORY
"
>
<table
tableName=
"SER_PROJ_VALUE_
SZ
"
>
<generatedKey
column=
"id"
sqlStatement=
"select SEQ_SER_PROJ_VALUE_
HISTORY
_ID.nextval from dual"
identity=
"true"
/>
<generatedKey
column=
"id"
sqlStatement=
"select SEQ_SER_PROJ_VALUE_
SZ
_ID.nextval from dual"
identity=
"true"
/>
</table>
</table>
</context>
</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