Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
b0a51ab3
Commit
b0a51ab3
authored
Apr 21, 2023
by
zhangyingbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ugp修改
parent
ef98f307
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
16 deletions
+46
-16
PercentOfPassDto.java
...eejoin/amos/boot/module/ugp/api/dto/PercentOfPassDto.java
+1
-1
InstallationQualityMapper.xml
...i/src/main/resources/mapper/InstallationQualityMapper.xml
+6
-2
VerifyMapper.xml
...module-ugp-api/src/main/resources/mapper/VerifyMapper.xml
+1
-1
InstallationQualityImpl.java
.../module/ugp/biz/service/impl/InstallationQualityImpl.java
+20
-12
ProblemInitiationServiceImpl.java
...le/ugp/biz/service/impl/ProblemInitiationServiceImpl.java
+18
-0
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/PercentOfPassDto.java
View file @
b0a51ab3
...
@@ -40,7 +40,7 @@ public class PercentOfPassDto extends BaseDto {
...
@@ -40,7 +40,7 @@ public class PercentOfPassDto extends BaseDto {
@ApiModelProperty
(
value
=
"查看"
)
@ApiModelProperty
(
value
=
"查看"
)
private
String
look
;
private
String
look
;
private
String
length
;
}
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/InstallationQualityMapper.xml
View file @
b0a51ab3
...
@@ -16,6 +16,8 @@
...
@@ -16,6 +16,8 @@
<result
property=
"constructionUnit"
column=
"construction_unit"
jdbcType=
"VARCHAR"
/>
<result
property=
"constructionUnit"
column=
"construction_unit"
jdbcType=
"VARCHAR"
/>
<result
property=
"chargePerson"
column=
"charge_person"
jdbcType=
"VARCHAR"
/>
<result
property=
"chargePerson"
column=
"charge_person"
jdbcType=
"VARCHAR"
/>
<result
property=
"submitDate"
column=
"submit_date"
jdbcType=
"OTHER"
/>
<result
property=
"submitDate"
column=
"submit_date"
jdbcType=
"OTHER"
/>
<result
property=
"length"
column=
"length"
jdbcType=
"VARCHAR"
/>
<result
property=
"supervisionUnit"
column=
"supervision_unit"
jdbcType=
"VARCHAR"
/>
</association>
</association>
</resultMap>
</resultMap>
...
@@ -35,12 +37,14 @@
...
@@ -35,12 +37,14 @@
pt.charge_person,
pt.charge_person,
pt.start_date,
pt.start_date,
pt.submit_date,
pt.submit_date,
qy.rec_date
qy.rec_date,
pt.length,
pt.supervision_unit
FROM
FROM
tz_ugp_project pt
tz_ugp_project pt
LEFT JOIN tz_ugp_quality_info qy ON qy.project_id = pt.sequence_nbr
LEFT JOIN tz_ugp_quality_info qy ON qy.project_id = pt.sequence_nbr
WHERE
WHERE
pt.status = '流程结束!'
(pt.status = '流程结束!' or pt.status = '竣工资料上传确认' or pt.status = '上传竣工资料' or pt.status = '竣工资料审核并填写审核意见' or pt.status = '竣工流程结束!')
<if
test=
"dto !=null"
>
<if
test=
"dto !=null"
>
<if
test=
"dto.name !='' and dto.name != null"
>
<if
test=
"dto.name !='' and dto.name != null"
>
and
and
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/VerifyMapper.xml
View file @
b0a51ab3
...
@@ -217,7 +217,7 @@
...
@@ -217,7 +217,7 @@
</select>
</select>
<select
id=
"getOnes"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.entity.Verify"
databaseId=
"
my
sql"
>
<select
id=
"getOnes"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.entity.Verify"
databaseId=
"
postgre
sql"
>
select
select
sequence_nbr,
sequence_nbr,
project_id,
project_id,
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/InstallationQualityImpl.java
View file @
b0a51ab3
...
@@ -21,6 +21,7 @@ import com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify;
...
@@ -21,6 +21,7 @@ import com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify;
import
jdk.nashorn.internal.runtime.logging.Logger
;
import
jdk.nashorn.internal.runtime.logging.Logger
;
import
lombok.extern.log4j.Log4j
;
import
lombok.extern.log4j.Log4j
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
net.jpountz.lz4.LZ4FrameOutputStream
;
import
org.springframework.beans.factory.annotation.Autowired
;
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
;
...
@@ -93,24 +94,14 @@ public class InstallationQualityImpl extends BaseService<PercentOfPassDto, Quali
...
@@ -93,24 +94,14 @@ public class InstallationQualityImpl extends BaseService<PercentOfPassDto, Quali
for
(
QualityInfo
qualityInfo
:
qfList
)
{
for
(
QualityInfo
qualityInfo
:
qfList
)
{
PercentOfPassDto
percentOfPassDto
=
new
PercentOfPassDto
(
);
PercentOfPassDto
percentOfPassDto
=
new
PercentOfPassDto
(
);
percentOfPassDto
.
setLength
(
qualityInfo
.
getProject
().
getLength
());
percentOfPassDto
.
setName
(
qualityInfo
.
getProject
(
).
getName
(
));
percentOfPassDto
.
setName
(
qualityInfo
.
getProject
(
).
getName
(
));
percentOfPassDto
.
setAddress
(
qualityInfo
.
getProject
(
).
getAddress
(
));
percentOfPassDto
.
setAddress
(
qualityInfo
.
getProject
(
).
getAddress
(
));
percentOfPassDto
.
setProgressStatus
(
qualityInfo
.
getProject
(
).
getProgressStatus
(
));
percentOfPassDto
.
setProgressStatus
(
qualityInfo
.
getProject
(
).
getProgressStatus
(
));
percentOfPassDto
.
setProjectId
(
qualityInfo
.
getProjectId
(
));
percentOfPassDto
.
setProjectId
(
qualityInfo
.
getProjectId
(
));
percentOfPassDto
.
setChargePerson
(
qualityInfo
.
getProject
(
).
getChargePerson
(
));
percentOfPassDto
.
setChargePerson
(
qualityInfo
.
getProject
(
).
getChargePerson
(
));
percentOfPassDto
.
setLook
(
LOOK
);
percentOfPassDto
.
setLook
(
LOOK
);
//获取监理单位的id
percentOfPassDto
.
setCurrentUnit
(
qualityInfo
.
getProject
().
getSupervisionUnit
());
Long
supervisoryUnitId
=
qualityInfo
.
getSupervisoryUnitId
(
);
//调用接口
try
{
OrgUsrFormDto
orgUsrFormDto
=
orgUsrService
.
selectCompanyById
(
supervisoryUnitId
);
String
currentUnit
=
orgUsrFormDto
.
getCurrentUnit
(
);
percentOfPassDto
.
setCurrentUnit
(
currentUnit
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
(
);
}
percentOfPassDto
.
setStartDate
(
qualityInfo
.
getProject
(
).
getStartDate
(
));
percentOfPassDto
.
setStartDate
(
qualityInfo
.
getProject
(
).
getStartDate
(
));
percentOfPassDto
.
setConstructionUnit
(
qualityInfo
.
getProject
(
).
getConstructionUnit
(
));
percentOfPassDto
.
setConstructionUnit
(
qualityInfo
.
getProject
(
).
getConstructionUnit
(
));
percentOfPassDto
.
setSubmitDate
(
qualityInfo
.
getProject
(
).
getSubmitDate
(
));
percentOfPassDto
.
setSubmitDate
(
qualityInfo
.
getProject
(
).
getSubmitDate
(
));
...
@@ -141,12 +132,29 @@ public class InstallationQualityImpl extends BaseService<PercentOfPassDto, Quali
...
@@ -141,12 +132,29 @@ public class InstallationQualityImpl extends BaseService<PercentOfPassDto, Quali
int
qualifiedData
=
collect
.
size
();
int
qualifiedData
=
collect
.
size
();
//合格率
//合格率
BigDecimal
sums
=
new
BigDecimal
(
sum
);
BigDecimal
sums
=
new
BigDecimal
(
sum
);
BigDecimal
length
=
new
BigDecimal
(
pr
.
getLength
());
length
=
length
.
divide
(
new
BigDecimal
(
10
),
2
,
BigDecimal
.
ROUND_HALF_UP
);
BigDecimal
qualifiedDatas
=
new
BigDecimal
(
qualifiedData
);
BigDecimal
qualifiedDatas
=
new
BigDecimal
(
qualifiedData
);
Double
pass
=
qualifiedDatas
.
divide
(
sums
,
2
,
BigDecimal
.
ROUND_HALF_UP
).
multiply
(
new
BigDecimal
(
100
)).
doubleValue
(
);
Double
pass
=
qualifiedDatas
.
divide
(
sums
,
2
,
BigDecimal
.
ROUND_HALF_UP
).
multiply
(
new
BigDecimal
(
100
)).
doubleValue
(
);
Double
progress
=
sums
.
divide
(
length
,
2
,
BigDecimal
.
ROUND_HALF_UP
).
multiply
(
new
BigDecimal
(
100
)).
doubleValue
(
);
//转换成百分比,生成合格率
//转换成百分比,生成合格率
String
fpy
=
pass
.
toString
(
)
+
"%"
;
String
fpy
=
pass
.
toString
(
)
+
"%"
;
if
(
progress
>
100
){
progress
=
100
D
;
}
String
progressStatus
=
progress
.
toString
(
)
+
"%"
;
//将合格率赋值给数据集合
//将合格率赋值给数据集合
pr
.
setPercentOfPass
(
fpy
);
pr
.
setPercentOfPass
(
fpy
);
pr
.
setProgressStatus
(
progressStatus
);
if
(
ValidationUtil
.
isEmpty
(
pr
.
getPercentOfPass
())){
pr
.
setPercentOfPass
(
"0.0%"
);
}
if
(
ValidationUtil
.
isEmpty
(
pr
.
getProgressStatus
())){
pr
.
setProgressStatus
(
"0.0%"
);
}
}
}
//将数据添加到新集合里面
//将数据添加到新集合里面
newsData
.
add
(
pr
);
newsData
.
add
(
pr
);
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/ProblemInitiationServiceImpl.java
View file @
b0a51ab3
...
@@ -27,6 +27,7 @@ import org.springframework.util.ObjectUtils;
...
@@ -27,6 +27,7 @@ import org.springframework.util.ObjectUtils;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.atomic.AtomicInteger
;
/**
/**
* @author Dell
* @author Dell
...
@@ -79,6 +80,8 @@ public class ProblemInitiationServiceImpl {
...
@@ -79,6 +80,8 @@ public class ProblemInitiationServiceImpl {
@Value
(
"${params.work.flow.manualProcessingKey}"
)
@Value
(
"${params.work.flow.manualProcessingKey}"
)
private
String
manualProcessingKey
;
private
String
manualProcessingKey
;
// 静态变量存储最大值
private
static
final
AtomicInteger
atomicNum
=
new
AtomicInteger
(
1
);
public
String
start
(
QualityProblem
qualityProblem
)
{
public
String
start
(
QualityProblem
qualityProblem
)
{
String
instanceId
=
null
;
String
instanceId
=
null
;
...
@@ -474,6 +477,21 @@ public class ProblemInitiationServiceImpl {
...
@@ -474,6 +477,21 @@ public class ProblemInitiationServiceImpl {
qualityProblem
.
setComeFrom
(
type
);
qualityProblem
.
setComeFrom
(
type
);
qualityProblem
.
setInstanceId
(
instanceId
);
qualityProblem
.
setInstanceId
(
instanceId
);
qualityProblem
.
setStatus
(!
ObjectUtils
.
isEmpty
(
dataObject
)
&&
!
ObjectUtils
.
isEmpty
(
dataObject
.
get
(
"name"
))
?
String
.
valueOf
(
dataObject
.
get
(
"name"
))
:
""
);
qualityProblem
.
setStatus
(!
ObjectUtils
.
isEmpty
(
dataObject
)
&&
!
ObjectUtils
.
isEmpty
(
dataObject
.
get
(
"name"
))
?
String
.
valueOf
(
dataObject
.
get
(
"name"
))
:
""
);
Calendar
calendar
=
Calendar
.
getInstance
();
// 获取当前年
int
year
=
calendar
.
get
(
Calendar
.
YEAR
);
// 获取当前月
int
month
=
calendar
.
get
(
Calendar
.
MONTH
)
+
1
;
// 获取当前日
int
day
=
calendar
.
get
(
Calendar
.
DATE
);
StringBuffer
stringBuffer
=
new
StringBuffer
(
);
stringBuffer
.
append
(
year
).
append
(
month
).
append
(
day
);
String
date
=
stringBuffer
.
toString
(
);
//获取当前的值并自增
int
newNum
=
atomicNum
.
incrementAndGet
(
);
String
code
=
String
.
format
(
date
+
"-RGWT-"
+
"%05d"
,
newNum
);
qualityProblem
.
setCode
(
code
);
// 保存或更新问题信息
// 保存或更新问题信息
qualityProblemService
.
saveOrUpdate
(
qualityProblem
);
qualityProblemService
.
saveOrUpdate
(
qualityProblem
);
// 保存执行日志信息
// 保存执行日志信息
...
...
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