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
67a13aaf
Commit
67a13aaf
authored
May 07, 2020
by
Suvalue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预算页实值调整
parent
0073b8a0
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
12 deletions
+21
-12
bsoft-api/src/main/java/com/bsoft/api/mapper/SerProjValueSzMapper.java
+3
-2
bsoft-api/src/main/java/com/bsoft/api/model/respmodel/SerProjValueResp.java
+0
-1
bsoft-api/src/main/java/com/bsoft/api/service/Impl/SerProjValueServiceImpl.java
+14
-5
bsoft-api/src/main/resources/mapper/SerProjMapper.xml
+1
-1
bsoft-api/src/main/resources/mapper/SerProjValueMapper.xml
+2
-2
bsoft-api/src/main/resources/mapper/SerProjValueSzMapper.xml
+1
-1
No files found.
bsoft-api/src/main/java/com/bsoft/api/mapper/SerProjValueSzMapper.java
View file @
67a13aaf
...
@@ -17,6 +17,6 @@ public interface SerProjValueSzMapper {
...
@@ -17,6 +17,6 @@ public interface SerProjValueSzMapper {
int
updateByPrimaryKey
(
SerProjValueSz
record
);
int
updateByPrimaryKey
(
SerProjValueSz
record
);
List
<
SerProjValueSz
>
selectByProj
(
@Param
(
"projId"
)
BigDecimal
projId
,
@Param
(
"date"
)
Integer
date
,
SerProjValueSz
selectByProj
(
@Param
(
"projId"
)
BigDecimal
projId
,
@Param
(
"date"
)
Integer
date
,
@Param
(
"deptCode"
)
String
deptCode
,
@Param
(
"hosCode"
)
String
hosCode
);
@Param
(
"deptCode"
)
String
deptCode
,
@Param
(
"hosCode"
)
String
hosCode
);
}
}
\ No newline at end of file
bsoft-api/src/main/java/com/bsoft/api/model/respmodel/SerProjValueResp.java
View file @
67a13aaf
...
@@ -12,6 +12,5 @@ public class SerProjValueResp extends SerProjValue {
...
@@ -12,6 +12,5 @@ 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 @
67a13aaf
...
@@ -13,7 +13,6 @@ import com.bsoft.api.model.reqmodel.AddBudgetValue;
...
@@ -13,7 +13,6 @@ 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
;
...
@@ -50,7 +49,7 @@ public class SerProjValueServiceImpl implements SerProjValueService {
...
@@ -50,7 +49,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
;
SerProjValueSz
valueSz
=
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"
));
...
@@ -61,8 +60,12 @@ public class SerProjValueServiceImpl implements SerProjValueService {
...
@@ -61,8 +60,12 @@ public class SerProjValueServiceImpl implements SerProjValueService {
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
){
for
(
SerProjValueResp
value
:
values
){
valueSzs
=
projValueSzMapper
.
selectByProj
(
value
.
getProjId
(),
date
,
deptCode
,
orgCode
);
valueSz
=
projValueSzMapper
.
selectByProj
(
value
.
getProjId
(),
date
,
deptCode
,
orgCode
);
value
.
setValueSz
(
valueSzs
);
if
(
valueSz
!=
null
){
value
.
setSz
(
valueSz
.
getSz
());
value
.
setZxpl
(
valueSz
.
getZxpl
());
valueSz
=
null
;
}
}
}
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
)
...
@@ -115,6 +118,7 @@ public class SerProjValueServiceImpl implements SerProjValueService {
...
@@ -115,6 +118,7 @@ public class SerProjValueServiceImpl implements SerProjValueService {
List
<
Map
<
String
,
Object
>>
enumList
=
ProjectType
.
all
();
List
<
Map
<
String
,
Object
>>
enumList
=
ProjectType
.
all
();
SummaryProjType
projType
=
null
;
SummaryProjType
projType
=
null
;
List
<
ProjectInfo
>
projectInfo
=
null
;
List
<
ProjectInfo
>
projectInfo
=
null
;
SerProjValueSz
valueSz
=
null
;
if
(
enumList
!=
null
&&
enumList
.
size
()
>
0
){
if
(
enumList
!=
null
&&
enumList
.
size
()
>
0
){
for
(
Map
<
String
,
Object
>
enumInfo
:
enumList
){
for
(
Map
<
String
,
Object
>
enumInfo
:
enumList
){
projType
=
new
SummaryProjType
();
projType
=
new
SummaryProjType
();
...
@@ -123,7 +127,12 @@ public class SerProjValueServiceImpl implements SerProjValueService {
...
@@ -123,7 +127,12 @@ public class SerProjValueServiceImpl implements SerProjValueService {
null
,
summary
.
getDeptCode
(),
date
,
budgetType
,
orgCode
);
null
,
summary
.
getDeptCode
(),
date
,
budgetType
,
orgCode
);
if
(
values
!=
null
){
if
(
values
!=
null
){
for
(
SerProjValueResp
value
:
values
){
for
(
SerProjValueResp
value
:
values
){
value
.
setValueSz
(
projValueSzMapper
.
selectByProj
(
value
.
getProjId
(),
date
,
summary
.
getDeptCode
(),
orgCode
));
valueSz
=
projValueSzMapper
.
selectByProj
(
value
.
getProjId
(),
date
,
summary
.
getDeptCode
(),
orgCode
);
if
(
valueSz
!=
null
){
value
.
setSz
(
valueSz
.
getSz
());
value
.
setZxpl
(
valueSz
.
getZxpl
());
valueSz
=
null
;
}
}
}
projType
.
setProject
(
values
);
projType
.
setProject
(
values
);
}
}
...
...
bsoft-api/src/main/resources/mapper/SerProjMapper.xml
View file @
67a13aaf
...
@@ -80,7 +80,7 @@
...
@@ -80,7 +80,7 @@
join SER_PROJ p on p.ID =v.PROJ_ID and p.STATE = 1
join SER_PROJ p on p.ID =v.PROJ_ID and p.STATE = 1
where 1=1
where 1=1
<if
test=
"date!=null"
>
<if
test=
"date!=null"
>
and v."DATE"=
#{date}
and v."DATE"=
TO_NUMBER(SUBSTR(#{date,jdbcType=DECIMAL},1,4))
</if>
</if>
<if
test=
"budgetType!=null"
>
<if
test=
"budgetType!=null"
>
and BitAnd(IS_BUDGET,#{budgetType})>0
and BitAnd(IS_BUDGET,#{budgetType})>0
...
...
bsoft-api/src/main/resources/mapper/SerProjValueMapper.xml
View file @
67a13aaf
...
@@ -107,7 +107,7 @@
...
@@ -107,7 +107,7 @@
AND v.DEPT_CODE = #{dept,jdbcType=VARCHAR}
AND v.DEPT_CODE = #{dept,jdbcType=VARCHAR}
</if>
</if>
<if
test=
"date!=null"
>
<if
test=
"date!=null"
>
AND v."DATE" =
#{date,jdbcType=DECIMAL}
AND v."DATE" =
TO_NUMBER(SUBSTR(#{date,jdbcType=DECIMAL},1,4))
</if>
</if>
<if
test=
"hosCode!=null"
>
<if
test=
"hosCode!=null"
>
AND v.HOSCODE = #{hosCode,jdbcType=VARCHAR}
AND v.HOSCODE = #{hosCode,jdbcType=VARCHAR}
...
@@ -119,7 +119,7 @@
...
@@ -119,7 +119,7 @@
AND v.DEPT_CODE = #{dept,jdbcType=VARCHAR}
AND v.DEPT_CODE = #{dept,jdbcType=VARCHAR}
</if>
</if>
<if
test=
"date!=null"
>
<if
test=
"date!=null"
>
AND v."DATE" =
#{date,jdbcType=DECIMAL}
AND v."DATE" =
TO_NUMBER(SUBSTR(#{date,jdbcType=DECIMAL},1,4))
</if>
</if>
<if
test=
"hosCode!=null"
>
<if
test=
"hosCode!=null"
>
AND v.HOSCODE = #{hosCode,jdbcType=VARCHAR}
AND v.HOSCODE = #{hosCode,jdbcType=VARCHAR}
...
...
bsoft-api/src/main/resources/mapper/SerProjValueSzMapper.xml
View file @
67a13aaf
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
select *
select *
from SER_PROJ_VALUE_SZ
from SER_PROJ_VALUE_SZ
where STATE = 1 and PROJ_ID = #{projId,jdbcType=DECIMAL}
where STATE = 1 and PROJ_ID = #{projId,jdbcType=DECIMAL}
and
TO_NUMBER(SUBSTR("DATE", 1, 4))
= #{date,jdbcType=DECIMAL}
and
"DATE"
= #{date,jdbcType=DECIMAL}
and DEPT_CODE = #{deptCode,jdbcType=VARCHAR} and HOSCODE = #{hosCode,jdbcType=VARCHAR}
and DEPT_CODE = #{deptCode,jdbcType=VARCHAR} and HOSCODE = #{hosCode,jdbcType=VARCHAR}
order by "DATE" desc
order by "DATE" desc
</select>
</select>
...
...
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