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
904e0183
Commit
904e0183
authored
Dec 05, 2022
by
zhengjuzi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://39.98.45.134:8090/moa/amos-boot-biz
into developer
parents
362d1e93
9406b9f7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
85 changed files
with
2154 additions
and
206 deletions
+2154
-206
TzsJgMapper.java
.../yeejoin/amos/boot/module/tzs/api/mapper/TzsJgMapper.java
+3
-1
CylinderUnitMapper.java
...os/boot/module/tzs/flc/api/mapper/CylinderUnitMapper.java
+7
-0
InspectionService.java
...os/boot/module/tzs/flc/api/service/InspectionService.java
+1
-1
CylinderInfoMapper.xml
...-tzs-api/src/main/resources/mapper/CylinderInfoMapper.xml
+3
-1
CylinderUnitMapper.xml
...-tzs-api/src/main/resources/mapper/CylinderUnitMapper.xml
+3
-0
TzsJgMapper.xml
...-module-tzs-api/src/main/resources/mapper/TzsJgMapper.xml
+15
-12
WarningMsgAction.java
...oin/amos/boot/module/tzs/biz/action/WarningMsgAction.java
+17
-2
InspectionController.java
.../boot/module/tzs/biz/controller/InspectionController.java
+2
-2
MsgLogController.java
...amos/boot/module/tzs/biz/controller/MsgLogController.java
+3
-0
InspectionServiceImpl.java
...ot/module/tzs/biz/service/impl/InspectionServiceImpl.java
+17
-4
MsgLogServiceImpl.java
...s/boot/module/tzs/biz/service/impl/MsgLogServiceImpl.java
+2
-0
TzsJgServiceImpl.java
...os/boot/module/tzs/biz/service/impl/TzsJgServiceImpl.java
+32
-10
CylinderInfoController.java
...module/tzs/flc/biz/controller/CylinderInfoController.java
+41
-0
CylinderUnitController.java
...module/tzs/flc/biz/controller/CylinderUnitController.java
+7
-2
CylinderUnitServiceImpl.java
...ule/tzs/flc/biz/service/impl/CylinderUnitServiceImpl.java
+81
-0
ScheduleService.java
...boot/module/tzs/flc/biz/service/impl/ScheduleService.java
+48
-3
CompanyExamineEnum.java
...oin/amos/boot/module/ugp/api/Enum/CompanyExamineEnum.java
+14
-0
ProblemProcessEnum.java
...oin/amos/boot/module/ugp/api/Enum/ProblemProcessEnum.java
+18
-12
ProjectInitiationEnum.java
.../amos/boot/module/ugp/api/Enum/ProjectInitiationEnum.java
+24
-15
TaskTypeEnum.java
...m/yeejoin/amos/boot/module/ugp/api/Enum/TaskTypeEnum.java
+17
-0
XJConstant.java
...eejoin/amos/boot/module/ugp/api/constants/XJConstant.java
+2
-2
CodeWeldDto.java
...com/yeejoin/amos/boot/module/ugp/api/dto/CodeWeldDto.java
+16
-0
ColModel.java
...va/com/yeejoin/amos/boot/module/ugp/api/dto/ColModel.java
+19
-0
DataGridMock.java
...om/yeejoin/amos/boot/module/ugp/api/dto/DataGridMock.java
+21
-0
MaterialCount.java
...m/yeejoin/amos/boot/module/ugp/api/dto/MaterialCount.java
+14
-0
MsgNoticeDto.java
...om/yeejoin/amos/boot/module/ugp/api/dto/MsgNoticeDto.java
+36
-0
OpenDto.java
...ava/com/yeejoin/amos/boot/module/ugp/api/dto/OpenDto.java
+1
-1
PercentOfPassDto.java
...eejoin/amos/boot/module/ugp/api/dto/PercentOfPassDto.java
+2
-2
ProjectDto.java
.../com/yeejoin/amos/boot/module/ugp/api/dto/ProjectDto.java
+2
-0
QualityProblemDto.java
...ejoin/amos/boot/module/ugp/api/dto/QualityProblemDto.java
+2
-0
TableDto.java
...va/com/yeejoin/amos/boot/module/ugp/api/dto/TableDto.java
+16
-0
TaskDto.java
...ava/com/yeejoin/amos/boot/module/ugp/api/dto/TaskDto.java
+10
-32
UnitLicenceDto.java
.../yeejoin/amos/boot/module/ugp/api/dto/UnitLicenceDto.java
+96
-0
WeldDto.java
...ava/com/yeejoin/amos/boot/module/ugp/api/dto/WeldDto.java
+11
-0
WeldVerifyDto.java
...m/yeejoin/amos/boot/module/ugp/api/dto/WeldVerifyDto.java
+41
-0
InstallNoticeMsg.java
...oin/amos/boot/module/ugp/api/entity/InstallNoticeMsg.java
+6
-0
RectifyMsg.java
...m/yeejoin/amos/boot/module/ugp/api/entity/RectifyMsg.java
+6
-0
UnitLicence.java
.../yeejoin/amos/boot/module/ugp/api/entity/UnitLicence.java
+97
-0
EquipmentMapper.java
...join/amos/boot/module/ugp/api/mapper/EquipmentMapper.java
+1
-3
MaterialMapper.java
...ejoin/amos/boot/module/ugp/api/mapper/MaterialMapper.java
+9
-0
QualityProblemMapper.java
...amos/boot/module/ugp/api/mapper/QualityProblemMapper.java
+2
-1
UnitLicenceMapper.java
...in/amos/boot/module/ugp/api/mapper/UnitLicenceMapper.java
+14
-0
VerifyMapper.java
...yeejoin/amos/boot/module/ugp/api/mapper/VerifyMapper.java
+4
-0
WeldMapper.java
...m/yeejoin/amos/boot/module/ugp/api/mapper/WeldMapper.java
+4
-0
WelderMapper.java
...yeejoin/amos/boot/module/ugp/api/mapper/WelderMapper.java
+4
-1
CylinderSchedulerJob.java
...amos/boot/module/ugp/api/quartz/CylinderSchedulerJob.java
+43
-0
IUnitLicenceService.java
...amos/boot/module/ugp/api/service/IUnitLicenceService.java
+14
-0
IUnitPersonService.java
.../amos/boot/module/ugp/api/service/IUnitPersonService.java
+7
-0
EquipmentMapper.xml
...ule-ugp-api/src/main/resources/mapper/EquipmentMapper.xml
+10
-1
MaterialMapper.xml
...dule-ugp-api/src/main/resources/mapper/MaterialMapper.xml
+25
-0
QualityProblemMapper.xml
...gp-api/src/main/resources/mapper/QualityProblemMapper.xml
+13
-6
VerifyMapper.xml
...module-ugp-api/src/main/resources/mapper/VerifyMapper.xml
+35
-0
WeldMapper.xml
...t-module-ugp-api/src/main/resources/mapper/WeldMapper.xml
+1
-1
WelderMapper.xml
...module-ugp-api/src/main/resources/mapper/WelderMapper.xml
+8
-1
CompanyController.java
...mos/boot/module/ugp/biz/controller/CompanyController.java
+32
-4
InstallNoticeController.java
...ot/module/ugp/biz/controller/InstallNoticeController.java
+26
-4
InstallationQualityController.java
...ule/ugp/biz/controller/InstallationQualityController.java
+1
-1
MaterialController.java
...os/boot/module/ugp/biz/controller/MaterialController.java
+14
-2
ProjectController.java
...mos/boot/module/ugp/biz/controller/ProjectController.java
+13
-2
ProjectResourceController.java
.../module/ugp/biz/controller/ProjectResourceController.java
+3
-3
QualityProblemController.java
...t/module/ugp/biz/controller/QualityProblemController.java
+1
-1
RectifyMsgController.java
.../boot/module/ugp/biz/controller/RectifyMsgController.java
+15
-0
TaskController.java
...n/amos/boot/module/ugp/biz/controller/TaskController.java
+60
-1
UnitLicenceController.java
...boot/module/ugp/biz/controller/UnitLicenceController.java
+134
-0
UnitPersonController.java
.../boot/module/ugp/biz/controller/UnitPersonController.java
+34
-0
VerifyController.java
...amos/boot/module/ugp/biz/controller/VerifyController.java
+169
-5
WeldController.java
...n/amos/boot/module/ugp/biz/controller/WeldController.java
+45
-0
WelderController.java
...amos/boot/module/ugp/biz/controller/WelderController.java
+12
-7
CompanyServiceImpl.java
.../boot/module/ugp/biz/service/impl/CompanyServiceImpl.java
+68
-2
EquipmentServiceImpl.java
...oot/module/ugp/biz/service/impl/EquipmentServiceImpl.java
+44
-1
InstallNoticeServiceImpl.java
...module/ugp/biz/service/impl/InstallNoticeServiceImpl.java
+21
-3
InstallationQualityImpl.java
.../module/ugp/biz/service/impl/InstallationQualityImpl.java
+13
-1
MaterialServiceImpl.java
...boot/module/ugp/biz/service/impl/MaterialServiceImpl.java
+59
-10
ProblemInitiationServiceImpl.java
...le/ugp/biz/service/impl/ProblemInitiationServiceImpl.java
+2
-0
ProjectResourceServiceImpl.java
...dule/ugp/biz/service/impl/ProjectResourceServiceImpl.java
+0
-1
ProjectServiceImpl.java
.../boot/module/ugp/biz/service/impl/ProjectServiceImpl.java
+33
-28
QualityProblemServiceImpl.java
...odule/ugp/biz/service/impl/QualityProblemServiceImpl.java
+17
-4
RectifyMsgServiceImpl.java
...ot/module/ugp/biz/service/impl/RectifyMsgServiceImpl.java
+69
-5
TaskServiceImpl.java
...mos/boot/module/ugp/biz/service/impl/TaskServiceImpl.java
+0
-0
UnitLicenceServiceImpl.java
...t/module/ugp/biz/service/impl/UnitLicenceServiceImpl.java
+45
-0
UnitPersonServiceImpl.java
...ot/module/ugp/biz/service/impl/UnitPersonServiceImpl.java
+94
-0
VerifyServiceImpl.java
...s/boot/module/ugp/biz/service/impl/VerifyServiceImpl.java
+0
-0
WeldServiceImpl.java
...mos/boot/module/ugp/biz/service/impl/WeldServiceImpl.java
+148
-3
WelderServiceImpl.java
...s/boot/module/ugp/biz/service/impl/WelderServiceImpl.java
+29
-2
pom.xml
amos-boot-system-ugp/pom.xml
+6
-0
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/mapper/TzsJgMapper.java
View file @
904e0183
...
@@ -5,9 +5,11 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -5,9 +5,11 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.yeejoin.amos.boot.biz.common.annotations.DataAuth
;
import
com.yeejoin.amos.boot.biz.common.annotations.DataAuth
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.TzsJgBasicInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.TzsJgBasicInfoDto
;
import
java.util.Set
;
public
interface
TzsJgMapper
{
public
interface
TzsJgMapper
{
@DataAuth
(
interfacePath
=
"equipment"
)
@DataAuth
(
interfacePath
=
"equipment"
)
IPage
<
TzsJgBasicInfoDto
>
page
(
Page
<
TzsJgBasicInfoDto
>
page
,
TzsJgBasicInfoDto
tzsJgBasicInfoDto
);
IPage
<
TzsJgBasicInfoDto
>
page
(
Page
<
TzsJgBasicInfoDto
>
page
,
TzsJgBasicInfoDto
tzsJgBasicInfoDto
,
Set
<
String
>
categoryCodes
);
}
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/api/mapper/CylinderUnitMapper.java
View file @
904e0183
...
@@ -34,4 +34,11 @@ public interface CylinderUnitMapper extends BaseMapper<CylinderUnit> {
...
@@ -34,4 +34,11 @@ public interface CylinderUnitMapper extends BaseMapper<CylinderUnit> {
Integer
getWarnNum
(
String
code
);
Integer
getWarnNum
(
String
code
);
Integer
getWarnNumByAppId
(
String
appId
);
Integer
getWarnNumByAppId
(
String
appId
);
/**
* 根据creditCode查询该企业是否存在许可超期
* @param creditCode 统一社会信用代码
* @return
*/
Integer
getLicenseOutOfDate
(
String
creditCode
);
}
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/api/service/InspectionService.java
View file @
904e0183
...
@@ -28,7 +28,7 @@ public interface InspectionService {
...
@@ -28,7 +28,7 @@ public interface InspectionService {
*/
*/
Map
<
String
,
Object
>
bizRecordCountByField
(
BizRecordCount
bizRecordCount
);
Map
<
String
,
Object
>
bizRecordCountByField
(
BizRecordCount
bizRecordCount
);
JSONObject
getSafetySupervisionCode
(
String
bizTable
);
JSONObject
getSafetySupervisionCode
(
String
bizTable
,
String
taskId
);
JSONObject
getSafetySupervisionCodeMap
(
String
bizTable
,
String
mapKey
,
String
mapValue
);
JSONObject
getSafetySupervisionCodeMap
(
String
bizTable
,
String
mapKey
,
String
mapValue
);
...
...
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/resources/mapper/CylinderInfoMapper.xml
View file @
904e0183
...
@@ -11,7 +11,9 @@
...
@@ -11,7 +11,9 @@
tz_cylinder_unit U
tz_cylinder_unit U
LEFT JOIN tz_cylinder_info AS t ON u.credit_code = t.credit_code
LEFT JOIN tz_cylinder_info AS t ON u.credit_code = t.credit_code
LEFT JOIN tz_cylinder_inspection AS i ON i.sequence_code = t.sequence_code and t.app_id = u.app_id
LEFT JOIN tz_cylinder_inspection AS i ON i.sequence_code = t.sequence_code and t.app_id = u.app_id
LEFT JOIN tz_base_unit_licence AS l ON l.unit_code = u.credit_code
LEFT JOIN (SELECT * FROM `tz_base_unit_licence`
GROUP BY unit_code
ORDER BY expiry_date DESC) AS l ON l.unit_code = u.credit_code
WHERE
WHERE
t.sequence_nbr IN ( SELECT max( tt.sequence_nbr ) FROM tz_cylinder_info tt GROUP BY tt.sequence_code )
t.sequence_nbr IN ( SELECT max( tt.sequence_nbr ) FROM tz_cylinder_info tt GROUP BY tt.sequence_code )
AND u.sequence_nbr = #{sequenceNbr}
AND u.sequence_nbr = #{sequenceNbr}
...
...
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/resources/mapper/CylinderUnitMapper.xml
View file @
904e0183
...
@@ -24,4 +24,7 @@
...
@@ -24,4 +24,7 @@
select count(1) from view_cylider_outofdate v where v.app_id =#{appId}
select count(1) from view_cylider_outofdate v where v.app_id =#{appId}
</select>
</select>
<select
id=
"getLicenseOutOfDate"
resultType=
"java.lang.Integer"
>
select count(1) from view_unit_outofdate v where v.credit_code = #{creditCode}
</select>
</mapper>
</mapper>
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/resources/mapper/TzsJgMapper.xml
View file @
904e0183
...
@@ -14,13 +14,14 @@
...
@@ -14,13 +14,14 @@
use1.estate_unit_name,
use1.estate_unit_name,
registration.equ_code,
registration.equ_code,
registration.equ_category,
registration.equ_category,
registration.equ_define,
ec.`name` AS equ_define,
registration.equ_define AS equ_define_code,
other.code96333,
other.code96333,
registration.use_org_code,
registration.use_org_code,
produce.factory_num,
produce.factory_num,
CONCAT(use1.province,'/',use1.city,'/',use1.county)AS area,
CONCAT(use1.province,'/',use1.city,'/',use1.county)AS area,
use1.address
use1.address
FROM tz_jg_use_info use1
FROM tz_jg_use_info use1
LEFT JOIN
LEFT JOIN
tz_jg_supervise_info supervise ON use1.sequence_code =
tz_jg_supervise_info supervise ON use1.sequence_code =
supervise.sequence_code
supervise.sequence_code
...
@@ -37,7 +38,19 @@
...
@@ -37,7 +38,19 @@
LEFT JOIN
LEFT JOIN
tz_jg_produce_info produce ON produce.sequence_code =
tz_jg_produce_info produce ON produce.sequence_code =
supervise.sequence_code
supervise.sequence_code
LEFT JOIN tz_equipment_category ec ON ec.`code` = registration.equ_define
<where>
<where>
<if
test=
"categoryCodes != null and categoryCodes.size>0"
>
and ( registration.equ_define in
<foreach
collection=
"categoryCodes"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
or registration.equ_category in
<foreach
collection=
"categoryCodes"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
)
</if>
<if
<if
test=
"tzsJgBasicInfoDto.orgBranchCode!=null and tzsJgBasicInfoDto.orgBranchCode!='' "
>
test=
"tzsJgBasicInfoDto.orgBranchCode!=null and tzsJgBasicInfoDto.orgBranchCode!='' "
>
AND supervise.org_branch_code LIKE
AND supervise.org_branch_code LIKE
...
@@ -69,16 +82,6 @@
...
@@ -69,16 +82,6 @@
CONCAT('%',#{tzsJgBasicInfoDto.equCode},'%')
CONCAT('%',#{tzsJgBasicInfoDto.equCode},'%')
</if>
</if>
<if
<if
test=
"tzsJgBasicInfoDto.equCategory!=null and tzsJgBasicInfoDto.equCategory!='' "
>
AND registration.equ_category LIKE
CONCAT('%',#{tzsJgBasicInfoDto.equCategory},'%')
</if>
<if
test=
"tzsJgBasicInfoDto.equDefine!=null and tzsJgBasicInfoDto.equDefine!='' "
>
AND registration.equ_define LIKE
CONCAT('%',#{tzsJgBasicInfoDto.equDefine},'%')
</if>
<if
test=
"tzsJgBasicInfoDto.code96333!=null and tzsJgBasicInfoDto.code96333!='' "
>
test=
"tzsJgBasicInfoDto.code96333!=null and tzsJgBasicInfoDto.code96333!='' "
>
AND other.code96333 LIKE
AND other.code96333 LIKE
CONCAT('%',#{tzsJgBasicInfoDto.code96333},'%')
CONCAT('%',#{tzsJgBasicInfoDto.code96333},'%')
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/action/WarningMsgAction.java
View file @
904e0183
...
@@ -4,12 +4,15 @@ import java.io.UnsupportedEncodingException;
...
@@ -4,12 +4,15 @@ import java.io.UnsupportedEncodingException;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Method
;
import
java.lang.reflect.Method
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.regex.Matcher
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
import
java.util.regex.Pattern
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.WarningMsgDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.WarningMsgDto
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.WarningEnum
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.WarningEnum
;
import
liquibase.pro.packaged.L
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -31,6 +34,7 @@ import com.yeejoin.amos.boot.module.tzs.biz.service.impl.WechatServiceImpl;
...
@@ -31,6 +34,7 @@ import com.yeejoin.amos.boot.module.tzs.biz.service.impl.WechatServiceImpl;
import
com.yeejoin.amos.boot.module.tzs.flc.biz.service.impl.CylinderInfoServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.flc.biz.service.impl.CylinderInfoServiceImpl
;
import
com.yeejoin.amos.component.rule.RuleActionBean
;
import
com.yeejoin.amos.component.rule.RuleActionBean
;
import
com.yeejoin.amos.component.rule.RuleMethod
;
import
com.yeejoin.amos.component.rule.RuleMethod
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
@Component
@Component
@RuleActionBean
(
beanLabel
=
"预警消息"
)
@RuleActionBean
(
beanLabel
=
"预警消息"
)
...
@@ -57,12 +61,23 @@ public class WarningMsgAction{
...
@@ -57,12 +61,23 @@ public class WarningMsgAction{
public
void
sendWebMessageTip
(
Object
bizobj
,
String
level
,
String
orgUserName
,
String
phone
,
String
text
)
public
void
sendWebMessageTip
(
Object
bizobj
,
String
level
,
String
orgUserName
,
String
phone
,
String
text
)
{
{
WarningMsgDto
warningMsgDto
=
(
WarningMsgDto
)
bizobj
;
WarningMsgDto
warningMsgDto
=
(
WarningMsgDto
)
bizobj
;
List
<
MsgLog
>
msgLogList
=
msgLogServiceImpl
.
list
(
new
LambdaQueryWrapper
<
MsgLog
>().
eq
(
MsgLog:
:
getRelationCode
,
warningMsgDto
.
getCode
()).
eq
(
MsgLog
::
getMsgTypeName
,
WarningEnum
.
getEumByLevel
(
level
).
getName
()).
eq
(
MsgLog:
:
getIsDelete
,
false
));
if
(!
ValidationUtil
.
isEmpty
(
msgLogList
)){
logger
.
info
(
"气瓶唯一标识码为 "
+
warningMsgDto
.
getCode
()+
" 的气瓶已有数据!"
);
return
;
}
//更新气瓶等级
//更新气瓶等级
// logger.info("更新气瓶等级:"+level);
// logger.info("更新气瓶等级:"+level);
// logger.info("预警区间:"+warningMsgDto.getNum());
// logger.info("预警区间:"+warningMsgDto.getNum());
// cylinderInfoServiceImpl.updateEarlyWarningLevel(warningMsgDto.getCylSeq(), level);
// cylinderInfoServiceImpl.updateEarlyWarningLevel(warningMsgDto.getCylSeq(), level);
//增加消息日志数据
//增加消息日志数据
MsgLog
msgLog
=
new
MsgLog
();
MsgLog
msgLog
=
msgLogServiceImpl
.
getOne
(
new
LambdaQueryWrapper
<
MsgLog
>().
eq
(
MsgLog:
:
getRelationCode
,
warningMsgDto
.
getCode
()).
eq
(
MsgLog:
:
getIsDelete
,
false
));
if
(
ValidationUtil
.
isEmpty
(
msgLog
)){
msgLog
=
new
MsgLog
();
}
msgLog
.
setRelationCode
(
warningMsgDto
.
getCode
());
msgLog
.
setRelationCode
(
warningMsgDto
.
getCode
());
msgLog
.
setMsgType
(
WarningEnum
.
getEumByLevel
(
level
).
getCode
());
msgLog
.
setMsgType
(
WarningEnum
.
getEumByLevel
(
level
).
getCode
());
msgLog
.
setMsgTypeName
(
WarningEnum
.
getEumByLevel
(
level
).
getName
());
msgLog
.
setMsgTypeName
(
WarningEnum
.
getEumByLevel
(
level
).
getName
());
...
@@ -74,7 +89,7 @@ public class WarningMsgAction{
...
@@ -74,7 +89,7 @@ public class WarningMsgAction{
msgLog
.
setTerminalType
(
"WEB"
);
msgLog
.
setTerminalType
(
"WEB"
);
msgLog
.
setSendTime
(
new
Date
());
msgLog
.
setSendTime
(
new
Date
());
msgLog
.
setRecDate
(
new
Date
());
msgLog
.
setRecDate
(
new
Date
());
msgLogServiceImpl
.
save
(
msgLog
);
msgLogServiceImpl
.
save
OrUpdate
(
msgLog
);
logger
.
info
(
"增加消息日志数据:"
+
msgLog
.
toString
());
logger
.
info
(
"增加消息日志数据:"
+
msgLog
.
toString
());
//发送web消息
//发送web消息
try
{
try
{
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/InspectionController.java
View file @
904e0183
...
@@ -91,8 +91,8 @@ public class InspectionController {
...
@@ -91,8 +91,8 @@ public class InspectionController {
@GetMapping
(
"/getSafetySupervisionCode"
)
@GetMapping
(
"/getSafetySupervisionCode"
)
@ApiOperation
(
value
=
"生成安全监察指令书编号"
)
@ApiOperation
(
value
=
"生成安全监察指令书编号"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
public
ResponseModel
<
JSONObject
>
getSafetySupervisionCode
(
@RequestParam
String
bizTable
)
{
public
ResponseModel
<
JSONObject
>
getSafetySupervisionCode
(
@RequestParam
String
bizTable
,
@RequestParam
String
taskId
)
{
return
ResponseHelper
.
buildResponse
(
inspectionService
.
getSafetySupervisionCode
(
bizTable
));
return
ResponseHelper
.
buildResponse
(
inspectionService
.
getSafetySupervisionCode
(
bizTable
,
taskId
));
}
}
/**
/**
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/MsgLogController.java
View file @
904e0183
...
@@ -15,8 +15,11 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
...
@@ -15,8 +15,11 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.Comparator
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
/**
/**
* 消息流水表
* 消息流水表
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/InspectionServiceImpl.java
View file @
904e0183
...
@@ -139,9 +139,22 @@ public class InspectionServiceImpl implements InspectionService {
...
@@ -139,9 +139,22 @@ public class InspectionServiceImpl implements InspectionService {
item
.
put
(
"value"
,
queryResult
.
get
(
"count"
));
item
.
put
(
"value"
,
queryResult
.
get
(
"count"
));
return
item
;
return
item
;
}
}
/**cpp修改处*/
@Override
@Override
public
JSONObject
getSafetySupervisionCode
(
String
bizTable
)
{
public
JSONObject
getSafetySupervisionCode
(
String
bizTable
,
String
taskId
)
{
JSONObject
jsonObject
=
new
JSONObject
();
if
(!
ValidationUtil
.
isEmpty
(
taskId
))
{
try
{
String
sql
=
"select INSTRUCT_CODE from "
+
bizTable
+
" where INSTANCE_ID=?"
;
String
code
=
bizJdbcTemplate
.
queryForObject
(
sql
,
String
.
class
,
taskId
);
if
(!
ValidationUtil
.
isEmpty
(
code
)){
jsonObject
.
put
(
"code"
,
code
);
return
jsonObject
;
}
}
catch
(
Exception
e
)
{
System
.
out
.
println
(
"获取监察指令书编号失败"
);
}
}
String
safetySupervisionCode
=
"(%s)市监特令中[%s]第 %s 号"
;
String
safetySupervisionCode
=
"(%s)市监特令中[%s]第 %s 号"
;
AgencyUserModel
agencyUserModel
=
Privilege
.
agencyUserClient
.
getme
().
getResult
();
AgencyUserModel
agencyUserModel
=
Privilege
.
agencyUserClient
.
getme
().
getResult
();
Object
reginSeq
=
JsonValueUtils
.
getValueByKey
(
JSONObject
.
parse
(
JSON
.
toJSONString
(
agencyUserModel
)),
"companys"
,
"companys.0.regionSeq"
);
Object
reginSeq
=
JsonValueUtils
.
getValueByKey
(
JSONObject
.
parse
(
JSON
.
toJSONString
(
agencyUserModel
)),
"companys"
,
"companys.0.regionSeq"
);
...
@@ -161,7 +174,7 @@ public class InspectionServiceImpl implements InspectionService {
...
@@ -161,7 +174,7 @@ public class InspectionServiceImpl implements InspectionService {
Long
count
=
bizJdbcTemplate
.
queryForObject
(
countSql
,
Long
.
class
);
Long
count
=
bizJdbcTemplate
.
queryForObject
(
countSql
,
Long
.
class
);
int
year
=
DateUtils
.
getYear
(
DateUtils
.
getDateNow
());
int
year
=
DateUtils
.
getYear
(
DateUtils
.
getDateNow
());
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"code"
,
String
.
format
(
safetySupervisionCode
,
region
,
year
,
count
+
1
));
jsonObject
.
put
(
"code"
,
String
.
format
(
safetySupervisionCode
,
region
,
year
,
count
+
1
));
return
jsonObject
;
return
jsonObject
;
}
}
...
@@ -199,7 +212,7 @@ public class InspectionServiceImpl implements InspectionService {
...
@@ -199,7 +212,7 @@ public class InspectionServiceImpl implements InspectionService {
}
}
jsonObject
.
clear
();
jsonObject
.
clear
();
jsonObject
.
put
(
"reconsiderOrgName"
,
parentCompanyName
+
"/"
+
regionName
+
"人民政府"
);
jsonObject
.
put
(
"reconsiderOrgName"
,
parentCompanyName
+
"/"
+
regionName
+
"人民政府"
);
jsonObject
.
put
(
"lawsuitOrgName"
,
regionName
+
"人
员
法院"
);
jsonObject
.
put
(
"lawsuitOrgName"
,
regionName
+
"人
民
法院"
);
return
jsonObject
;
return
jsonObject
;
}
}
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/MsgLogServiceImpl.java
View file @
904e0183
...
@@ -21,6 +21,7 @@ import org.springframework.util.StringUtils;
...
@@ -21,6 +21,7 @@ import org.springframework.util.StringUtils;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.ArrayList
;
import
java.util.LinkedList
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.List
;
...
@@ -105,6 +106,7 @@ public class MsgLogServiceImpl extends BaseService<MsgLogDto, MsgLog, MsgLogMapp
...
@@ -105,6 +106,7 @@ public class MsgLogServiceImpl extends BaseService<MsgLogDto, MsgLog, MsgLogMapp
wrapper
.
le
(
StringUtils
.
hasText
(
sendTimeEnd
),
MsgLog:
:
getSendTime
,
sendTimeEnd
);
wrapper
.
le
(
StringUtils
.
hasText
(
sendTimeEnd
),
MsgLog:
:
getSendTime
,
sendTimeEnd
);
wrapper
.
eq
(
StringUtils
.
hasText
(
msgType
),
MsgLog:
:
getMsgType
,
msgType
);
wrapper
.
eq
(
StringUtils
.
hasText
(
msgType
),
MsgLog:
:
getMsgType
,
msgType
);
wrapper
.
eq
(
MsgLog:
:
getIsDelete
,
0
);
wrapper
.
eq
(
MsgLog:
:
getIsDelete
,
0
);
wrapper
.
orderByDesc
(
MsgLog:
:
getSendTime
);
wrapper
.
like
(
StringUtils
.
hasText
(
body
),
MsgLog:
:
getBody
,
body
);
wrapper
.
like
(
StringUtils
.
hasText
(
body
),
MsgLog:
:
getBody
,
body
);
page
(
msgLogPage
,
wrapper
);
page
(
msgLogPage
,
wrapper
);
LinkedList
<
MsgLogDto
>
msgLogDtos
=
new
LinkedList
<>();
LinkedList
<
MsgLogDto
>
msgLogDtos
=
new
LinkedList
<>();
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/TzsJgServiceImpl.java
View file @
904e0183
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.List
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -56,6 +55,7 @@ import com.yeejoin.amos.boot.module.tzs.api.service.ITzsJgUseInfoService;
...
@@ -56,6 +55,7 @@ import com.yeejoin.amos.boot.module.tzs.api.service.ITzsJgUseInfoService;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
@Service
@Service
public
class
TzsJgServiceImpl
implements
ITzsJgService
{
public
class
TzsJgServiceImpl
implements
ITzsJgService
{
...
@@ -109,6 +109,7 @@ public class TzsJgServiceImpl implements ITzsJgService {
...
@@ -109,6 +109,7 @@ public class TzsJgServiceImpl implements ITzsJgService {
@Override
@Override
public
IPage
<
TzsJgBasicInfoDto
>
page
(
PageParam
pageParam
,
TzsJgBasicInfoDto
tzsJgBasicInfoDto
)
{
public
IPage
<
TzsJgBasicInfoDto
>
page
(
PageParam
pageParam
,
TzsJgBasicInfoDto
tzsJgBasicInfoDto
)
{
Set
<
String
>
categoryCodes
=
new
HashSet
<>();
if
(
tzsJgBasicInfoDto
.
getSuperviseKey
()
!=
null
)
{
if
(
tzsJgBasicInfoDto
.
getSuperviseKey
()
!=
null
)
{
FeignClientResult
<
CompanyModel
>
result
=
Privilege
.
companyClient
FeignClientResult
<
CompanyModel
>
result
=
Privilege
.
companyClient
.
seleteOne
(
Long
.
valueOf
(
tzsJgBasicInfoDto
.
getSuperviseKey
()));
.
seleteOne
(
Long
.
valueOf
(
tzsJgBasicInfoDto
.
getSuperviseKey
()));
...
@@ -116,17 +117,38 @@ public class TzsJgServiceImpl implements ITzsJgService {
...
@@ -116,17 +117,38 @@ public class TzsJgServiceImpl implements ITzsJgService {
tzsJgBasicInfoDto
.
setOrgBranchCode
(
result
.
getResult
().
getOrgCode
());
tzsJgBasicInfoDto
.
setOrgBranchCode
(
result
.
getResult
().
getOrgCode
());
}
}
}
}
if
(
tzsJgBasicInfoDto
.
getEquCategory
()
!=
null
)
{
if
(
tzsJgBasicInfoDto
.
getEquDefine
()
!=
null
)
{
EquipmentCategory
equipmentCategory
=
equipmentCategoryServiceImpl
// EquipmentCategory equipmentCategory = equipmentCategoryServiceImpl
.
getOne
(
new
LambdaQueryWrapper
<
EquipmentCategory
>().
eq
(
EquipmentCategory:
:
getId
,
// .getOne(new LambdaQueryWrapper<EquipmentCategory>().eq(EquipmentCategory::getId,
tzsJgBasicInfoDto
.
getEquCategory
()));
// tzsJgBasicInfoDto.getEquCategory()));
if
(
equipmentCategory
!=
null
)
{
// if (equipmentCategory != null) {
tzsJgBasicInfoDto
.
setEquCategory
(
equipmentCategory
.
getCode
().
toString
().
replaceAll
(
"0+$"
,
""
));
// tzsJgBasicInfoDto.setEquCategory(equipmentCategory.getCode().toString().replaceAll("0+$", ""));
}
getCategoryCodes
(
tzsJgBasicInfoDto
.
getEquDefine
(),
categoryCodes
);
// }
}
}
Page
<
TzsJgBasicInfoDto
>
page
=
new
Page
<>(
pageParam
.
getCurrent
(),
pageParam
.
getSize
());
Page
<
TzsJgBasicInfoDto
>
page
=
new
Page
<>(
pageParam
.
getCurrent
(),
pageParam
.
getSize
());
return
tzsJgMapper
.
page
(
page
,
tzsJgBasicInfoDto
);
tzsJgMapper
.
page
(
page
,
tzsJgBasicInfoDto
,
categoryCodes
);
for
(
TzsJgBasicInfoDto
basicInfoDto:
page
.
getRecords
()){
if
(
ValidationUtil
.
isEmpty
(
basicInfoDto
.
getEquDefine
())){
LambdaQueryWrapper
<
EquipmentCategory
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
EquipmentCategory
::
getCode
,
basicInfoDto
.
getEquCategory
());
basicInfoDto
.
setEquDefine
(
equipmentCategoryServiceImpl
.
getOne
(
wrapper
).
getName
());
}
}
return
page
;
}
public
Set
<
String
>
getCategoryCodes
(
String
id
,
Set
<
String
>
categoryCodes
){
categoryCodes
.
add
(
equipmentCategoryServiceImpl
.
getById
(
id
).
getCode
());
LambdaQueryWrapper
<
EquipmentCategory
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
EquipmentCategory
::
getParentId
,
id
);
List
<
EquipmentCategory
>
equipmentCategoryList
=
equipmentCategoryServiceImpl
.
list
(
wrapper
);
Iterator
<
EquipmentCategory
>
iterator
=
equipmentCategoryList
.
iterator
();
while
(
iterator
.
hasNext
())
{
getCategoryCodes
(
String
.
valueOf
(
iterator
.
next
().
getId
()),
categoryCodes
);
}
return
null
;
}
}
@Override
@Override
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/controller/CylinderInfoController.java
View file @
904e0183
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
flc
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
flc
.
biz
.
controller
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.Collection
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -8,6 +9,11 @@ import java.util.Map;
...
@@ -8,6 +9,11 @@ import java.util.Map;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.TzBaseEnterpriseInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.BaseUnitLicence
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.TzBaseEnterpriseInfo
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.BaseUnitLicenceServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.TzBaseEnterpriseInfoServiceImpl
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -86,6 +92,11 @@ public class CylinderInfoController extends BaseController {
...
@@ -86,6 +92,11 @@ public class CylinderInfoController extends BaseController {
private
Map
<
Integer
,
String
>
regionMap
;
private
Map
<
Integer
,
String
>
regionMap
;
private
Map
<
String
,
String
>
licenceDateMap
;
@Autowired
BaseUnitLicenceServiceImpl
baseUnitLicenceService
;
@Autowired
@Autowired
private
SourceFileServiceImpl
sourceFileService
;
private
SourceFileServiceImpl
sourceFileService
;
...
@@ -95,6 +106,9 @@ public class CylinderInfoController extends BaseController {
...
@@ -95,6 +106,9 @@ public class CylinderInfoController extends BaseController {
@Autowired
@Autowired
CylinderTagsServiceImpl
cylinderTagsServiceImpl
;
CylinderTagsServiceImpl
cylinderTagsServiceImpl
;
@Autowired
TzBaseEnterpriseInfoServiceImpl
baseEnterpriseInfoService
;
/**
/**
* 新增气瓶基本信息
* 新增气瓶基本信息
*
*
...
@@ -672,6 +686,19 @@ public class CylinderInfoController extends BaseController {
...
@@ -672,6 +686,19 @@ public class CylinderInfoController extends BaseController {
}
}
/**
/**
* 获取气瓶充装单位许可信息详情
*
* @param sequenceNbr
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getCylinderUnitLic/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取气瓶充装单位详情"
,
notes
=
"获取气瓶充装单位详情"
)
public
ResponseModel
<
TzBaseEnterpriseInfoDto
>
getCylinderUnitLic
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
cylinderUnitServiceImpl
.
getCylinderUnitLic
(
sequenceNbr
));
}
/**
* 获取气瓶充装单位详情
* 获取气瓶充装单位详情
*
*
* @param sequenceNbr
* @param sequenceNbr
...
@@ -790,6 +817,19 @@ public class CylinderInfoController extends BaseController {
...
@@ -790,6 +817,19 @@ public class CylinderInfoController extends BaseController {
});
});
}
}
if
(
ValidationUtil
.
isEmpty
(
this
.
licenceDateMap
)){
licenceDateMap
=
new
HashMap
<>();
LambdaQueryWrapper
<
BaseUnitLicence
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
select
(
BaseUnitLicence:
:
getUnitCode
,
BaseUnitLicence:
:
getExpiryDate
)
.
groupBy
(
BaseUnitLicence:
:
getUnitCode
)
.
orderByDesc
(
BaseUnitLicence:
:
getExpiryDate
);
List
<
BaseUnitLicence
>
baseUnitLicenceList
=
baseUnitLicenceService
.
list
(
wrapper
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
for
(
BaseUnitLicence
baseUnitLicence:
baseUnitLicenceList
){
licenceDateMap
.
put
(
baseUnitLicence
.
getUnitCode
(),
sdf
.
format
(
baseUnitLicence
.
getExpiryDate
()));
}
}
return
page
.
convert
(
item
->
{
return
page
.
convert
(
item
->
{
try
{
try
{
CylinderUnitDto
target
=
new
CylinderUnitDto
();
CylinderUnitDto
target
=
new
CylinderUnitDto
();
...
@@ -802,6 +842,7 @@ public class CylinderInfoController extends BaseController {
...
@@ -802,6 +842,7 @@ public class CylinderInfoController extends BaseController {
regionCode
+=
this
.
regionMap
.
get
(
Integer
.
parseInt
(
regionCodes
[
i
]));
regionCode
+=
this
.
regionMap
.
get
(
Integer
.
parseInt
(
regionCodes
[
i
]));
}
}
target
.
setRegionCode
(
regionCode
);
target
.
setRegionCode
(
regionCode
);
target
.
setFillingPermitDate
(
licenceDateMap
.
get
(
target
.
getCreditCode
()));
// if (1 == item.getUnitType()) {
// if (1 == item.getUnitType()) {
// target.setUnitTypeStr("液化石油气瓶充装单位");
// target.setUnitTypeStr("液化石油气瓶充装单位");
// } else if (2 == item.getUnitType()) {
// } else if (2 == item.getUnitType()) {
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/controller/CylinderUnitController.java
View file @
904e0183
...
@@ -43,6 +43,8 @@ public class CylinderUnitController extends BaseController {
...
@@ -43,6 +43,8 @@ public class CylinderUnitController extends BaseController {
@Autowired
@Autowired
ICylinderInfoService
iCylinderInfoService
;
ICylinderInfoService
iCylinderInfoService
;
/**
/**
* 通过regionCode查询气瓶企业
* 通过regionCode查询气瓶企业
*
*
...
@@ -59,11 +61,14 @@ public class CylinderUnitController extends BaseController {
...
@@ -59,11 +61,14 @@ public class CylinderUnitController extends BaseController {
unitList
.
stream
().
forEach
(
t
->
{
unitList
.
stream
().
forEach
(
t
->
{
CylinderUnitDto
temp
=
new
CylinderUnitDto
();
CylinderUnitDto
temp
=
new
CylinderUnitDto
();
BeanUtils
.
copyProperties
(
t
,
temp
);
BeanUtils
.
copyProperties
(
t
,
temp
);
temp
.
setOutOfDate
(
false
);
int
num
=
cylinderUnitServiceImpl
.
getWarnNumByAppId
(
t
.
getAppId
());
int
num
=
cylinderUnitServiceImpl
.
getWarnNumByAppId
(
t
.
getAppId
());
if
(
num
>
0
)
{
if
(
num
>
0
)
{
temp
.
setOutOfDate
(
true
);
temp
.
setOutOfDate
(
true
);
}
else
{
}
temp
.
setOutOfDate
(
false
);
num
=
cylinderUnitServiceImpl
.
getLicenseOutOfDate
(
temp
.
getCreditCode
());
if
(
num
>
0
){
temp
.
setOutOfDate
(
true
);
}
}
result
.
add
(
temp
);
result
.
add
(
temp
);
});
});
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/service/impl/CylinderUnitServiceImpl.java
View file @
904e0183
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
flc
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
flc
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.BaseUnitLicenceDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.TzBaseEnterpriseInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.BaseUnitLicence
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.TzBaseEnterpriseInfo
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.BaseUnitLicenceServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.TzBaseEnterpriseInfoServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.dto.RegUnitIcDto
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.entity.CylinderUnit
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.entity.CylinderUnit
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.entity.RegUnitIc
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.mapper.CylinderUnitMapper
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.mapper.CylinderUnitMapper
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.service.ICylinderUnitService
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.service.ICylinderUnitService
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.dto.CylinderUnitDto
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.dto.CylinderUnitDto
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -17,6 +33,16 @@ import java.util.List;
...
@@ -17,6 +33,16 @@ import java.util.List;
*/
*/
@Service
@Service
public
class
CylinderUnitServiceImpl
extends
BaseService
<
CylinderUnitDto
,
CylinderUnit
,
CylinderUnitMapper
>
implements
ICylinderUnitService
{
public
class
CylinderUnitServiceImpl
extends
BaseService
<
CylinderUnitDto
,
CylinderUnit
,
CylinderUnitMapper
>
implements
ICylinderUnitService
{
@Autowired
TzBaseEnterpriseInfoServiceImpl
baseEnterpriseInfoService
;
@Autowired
RegUnitIcServiceImpl
regUnitIcService
;
@Autowired
BaseUnitLicenceServiceImpl
baseUnitLicenceService
;
/**
/**
* 分页查询
* 分页查询
*/
*/
...
@@ -66,4 +92,58 @@ public class CylinderUnitServiceImpl extends BaseService<CylinderUnitDto, Cylind
...
@@ -66,4 +92,58 @@ public class CylinderUnitServiceImpl extends BaseService<CylinderUnitDto, Cylind
{
{
return
baseMapper
.
getWarnNumByAppId
(
appId
);
return
baseMapper
.
getWarnNumByAppId
(
appId
);
}
}
/**
* 获取气瓶充装单位许可信息详情
*
* @param sequenceNbr
* @return
*/
public
TzBaseEnterpriseInfoDto
getCylinderUnitLic
(
Long
sequenceNbr
){
CylinderUnit
cylinderUnit
=
this
.
getById
(
sequenceNbr
);
if
(
ValidationUtil
.
isEmpty
(
cylinderUnit
)){
return
null
;
}
String
creditCode
=
cylinderUnit
.
getCreditCode
();
//根据creditCode获取TzBaseEnterpriseInfo表信息
LambdaQueryWrapper
<
TzBaseEnterpriseInfo
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
TzBaseEnterpriseInfo:
:
getUseCode
,
cylinderUnit
.
getCreditCode
())
.
eq
(
TzBaseEnterpriseInfo:
:
getIsDelete
,
false
);
TzBaseEnterpriseInfo
baseEnterpriseInfo
=
baseEnterpriseInfoService
.
getOne
(
wrapper
);
TzBaseEnterpriseInfoDto
tzBaseEnterpriseInfoDto
=
new
TzBaseEnterpriseInfoDto
();
if
(
ValidationUtil
.
isEmpty
(
baseEnterpriseInfo
)){
return
null
;
}
BeanUtils
.
copyProperties
(
baseEnterpriseInfo
,
tzBaseEnterpriseInfoDto
);
// 许可信息
List
<
BaseUnitLicence
>
unitLicences
=
baseUnitLicenceService
.
list
(
new
LambdaQueryWrapper
<
BaseUnitLicence
>()
.
eq
(
BaseUnitLicence:
:
getUnitCode
,
creditCode
));
List
<
BaseUnitLicenceDto
>
unitLicenceDtos
=
new
ArrayList
<
BaseUnitLicenceDto
>();
for
(
BaseUnitLicence
baseUnitLicence
:
unitLicences
)
{
BaseUnitLicenceDto
baseUnitLicenceDto
=
new
BaseUnitLicenceDto
();
BeanUtils
.
copyProperties
(
baseUnitLicence
,
baseUnitLicenceDto
);
unitLicenceDtos
.
add
(
baseUnitLicenceDto
);
}
tzBaseEnterpriseInfoDto
.
setUnitLicences
(
unitLicenceDtos
);
// 工商信息
RegUnitIc
regUnitIc
=
regUnitIcService
.
getOne
(
new
LambdaQueryWrapper
<
RegUnitIc
>().
eq
(
RegUnitIc:
:
getUnitCode
,
creditCode
));
RegUnitIcDto
regUnitIcDto
=
new
RegUnitIcDto
();
if
(
regUnitIc
!=
null
)
{
BeanUtils
.
copyProperties
(
regUnitIc
,
regUnitIcDto
);
}
tzBaseEnterpriseInfoDto
.
setRegUnitIcDto
(
regUnitIcDto
);
return
tzBaseEnterpriseInfoDto
;
}
/**
* 根据creditCode查询该企业是否存在许可超期
* @param creditCode 统一社会信用代码
* @return
*/
public
Integer
getLicenseOutOfDate
(
String
creditCode
){
return
baseMapper
.
getLicenseOutOfDate
(
creditCode
);
}
}
}
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/service/impl/ScheduleService.java
View file @
904e0183
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
flc
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
flc
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
@@ -8,11 +9,13 @@ import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
...
@@ -8,11 +9,13 @@ import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import
com.yeejoin.amos.boot.module.tzs.api.dto.LicScheduleDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.LicScheduleDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.WarningMsgDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.WarningMsgDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.EquScheduleDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.EquScheduleDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.MsgLog
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.TzBaseUnitLicence
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.TzBaseUnitLicence
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.TzsJgRegistrationInfo
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.TzsJgRegistrationInfo
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.EarlyWarningLevelEnum
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.EarlyWarningLevelEnum
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.WarningTypeEnum
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.WarningTypeEnum
;
import
com.yeejoin.amos.boot.module.tzs.api.mapper.ScheduleMapper
;
import
com.yeejoin.amos.boot.module.tzs.api.mapper.ScheduleMapper
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.MsgLogServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.TzBaseUnitLicenceServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.TzBaseUnitLicenceServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.TzsAuthServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.TzsAuthServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.TzsJgRegistrationInfoServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.TzsJgRegistrationInfoServiceImpl
;
...
@@ -20,8 +23,11 @@ import com.yeejoin.amos.boot.module.tzs.flc.api.dto.CylinderInfoDto;
...
@@ -20,8 +23,11 @@ import com.yeejoin.amos.boot.module.tzs.flc.api.dto.CylinderInfoDto;
import
com.yeejoin.amos.boot.module.tzs.flc.api.entity.CylinderInfo
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.entity.CylinderInfo
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.mapper.CylinderInfoMapper
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.mapper.CylinderInfoMapper
;
import
com.yeejoin.amos.component.rule.RuleTrigger
;
import
com.yeejoin.amos.component.rule.RuleTrigger
;
import
com.yeejoin.amos.feign.rule.Rule
;
import
com.yeejoin.amos.feign.rule.model.FactBaseModel
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -29,7 +35,10 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
...
@@ -29,7 +35,10 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
/**
/**
* @author Zhang Yingbin
* @author Zhang Yingbin
...
@@ -42,6 +51,9 @@ public class ScheduleService {
...
@@ -42,6 +51,9 @@ public class ScheduleService {
private
ScheduleMapper
scheduleMapper
;
private
ScheduleMapper
scheduleMapper
;
@Autowired
@Autowired
MsgLogServiceImpl
msgLogServiceImpl
;
@Autowired
TzsAuthServiceImpl
tzsAuthService
;
TzsAuthServiceImpl
tzsAuthService
;
@Autowired
@Autowired
...
@@ -135,6 +147,25 @@ public class ScheduleService {
...
@@ -135,6 +147,25 @@ public class ScheduleService {
if
(
log
.
isDebugEnabled
())
{
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"超期预警时间调用规则完成"
);
log
.
debug
(
"超期预警时间调用规则完成"
);
}
}
//检查msgLog中的消息,若下次检验日期已延续 则更新消息状态
List
<
MsgLog
>
msgLogList
=
msgLogServiceImpl
.
list
(
new
LambdaQueryWrapper
<
MsgLog
>().
eq
(
MsgLog:
:
getIsDelete
,
false
));
Date
now
=
new
Date
();
for
(
MsgLog
msgLog:
msgLogList
){
msgLog
.
getRelationCode
();
try
{
CylinderInfoDto
cylinderInfoDto
=
this
.
getCylDetail
(
msgLog
.
getRelationCode
());
int
interval
=
DateUtils
.
dateBetweenIncludeToday
(
now
,
cylinderInfoDto
.
getNextInspectionDate
())
-
1
;
if
(
interval
>
30
){
msgLog
.
setIsDelete
(
true
);
msgLog
.
setMsgTypeName
(
"已延期"
);
msgLogServiceImpl
.
updateById
(
msgLog
);
}
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
}
}
}
/**
/**
...
@@ -187,13 +218,27 @@ public class ScheduleService {
...
@@ -187,13 +218,27 @@ public class ScheduleService {
log
.
info
(
"调用气瓶规则对象!+:{}"
,
JSON
.
toJSONString
(
warningMsgDto
));
log
.
info
(
"调用气瓶规则对象!+:{}"
,
JSON
.
toJSONString
(
warningMsgDto
));
}
}
String
[]
test
=
new
String
[]{};
String
[]
test
=
new
String
[]{};
ruleTrigger
.
publish
(
warningMsgDto
,
cylPackageId
,
new
String
[
0
]);
this
.
rulePublish
(
warningMsgDto
,
cylPackageId
);
System
.
out
.
println
(
"----------------------------------tzs服务调用了规则--------------------------------------"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"调用气瓶规则失败!:{},{}"
,
JSON
.
toJSONString
(
cylinderInfoDto
),
e
);
log
.
error
(
"调用气瓶规则失败!:{},{}"
,
JSON
.
toJSONString
(
cylinderInfoDto
),
e
);
}
}
}
}
/**
/**
* 调用规则公用方法
*/
public
void
rulePublish
(
WarningMsgDto
warningMsgDto
,
String
packageId
){
FactBaseModel
factBaseModel
=
new
FactBaseModel
();
factBaseModel
.
setPackageId
(
packageId
);
factBaseModel
.
setProcessIds
(
new
String
[
0
]);
HashMap
<
String
,
byte
[]>
map
=
new
HashMap
();
map
.
put
(
"com.yeejoin.amos.boot.module.tzs.api.dto.WarningMsgDto"
,
JSONObject
.
toJSONString
(
warningMsgDto
).
getBytes
());
factBaseModel
.
setFactMap
(
map
);
Rule
.
ruleClient
.
fireRule
(
factBaseModel
);
}
/**
* 气瓶规则调用
* 气瓶规则调用
* @param sequenceCode
* @param sequenceCode
* @return
* @return
...
@@ -246,7 +291,7 @@ public class ScheduleService {
...
@@ -246,7 +291,7 @@ public class ScheduleService {
if
(
log
.
isInfoEnabled
())
{
if
(
log
.
isInfoEnabled
())
{
log
.
info
(
"调用设备规则对象!+:{}"
,
JSON
.
toJSONString
(
warningMsgDto
));
log
.
info
(
"调用设备规则对象!+:{}"
,
JSON
.
toJSONString
(
warningMsgDto
));
}
}
ruleTrigger
.
publish
(
warningMsgDto
,
equPackageId
,
null
);
this
.
rulePublish
(
warningMsgDto
,
equPackageId
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"调用设备规则失败!:{},{}"
,
JSON
.
toJSONString
(
equScheduleDto
),
e
);
log
.
error
(
"调用设备规则失败!:{},{}"
,
JSON
.
toJSONString
(
equScheduleDto
),
e
);
}
}
...
@@ -301,7 +346,7 @@ public class ScheduleService {
...
@@ -301,7 +346,7 @@ public class ScheduleService {
if
(
log
.
isInfoEnabled
())
{
if
(
log
.
isInfoEnabled
())
{
log
.
info
(
"调用许可规则对象!+:{}"
,
JSON
.
toJSONString
(
warningMsgDto
));
log
.
info
(
"调用许可规则对象!+:{}"
,
JSON
.
toJSONString
(
warningMsgDto
));
}
}
ruleTrigger
.
publish
(
warningMsgDto
,
licPackageId
,
null
);
this
.
rulePublish
(
warningMsgDto
,
licPackageId
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"调用许可规则失败!:{},{}"
,
JSON
.
toJSONString
(
licScheduleDto
),
e
);
log
.
error
(
"调用许可规则失败!:{},{}"
,
JSON
.
toJSONString
(
licScheduleDto
),
e
);
}
}
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/Enum/CompanyExamineEnum.java
0 → 100644
View file @
904e0183
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
Enum
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
@Getter
@AllArgsConstructor
public
enum
CompanyExamineEnum
{
企业审核
(
"企业审核"
,
"未审核"
,
"已审核"
);
String
name
;
String
no
;
String
yes
;
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/Enum/ProblemProcessEnum.java
View file @
904e0183
...
@@ -9,32 +9,38 @@ import java.util.Map;
...
@@ -9,32 +9,38 @@ import java.util.Map;
@Getter
@Getter
@AllArgsConstructor
@AllArgsConstructor
public
enum
ProblemProcessEnum
{
public
enum
ProblemProcessEnum
{
流程开始
(
"流程开始"
,
"1"
,
"LCKS"
,
""
),
流程开始
(
"流程开始"
,
"1"
,
"LCKS"
,
""
,
""
,
""
),
确定问题
(
"确定问题"
,
"2"
,
"QDWT"
,
"问题待处理"
),
确定问题
(
"确定问题"
,
"2"
,
"QDWT"
,
"问题待处理"
,
"确定质量问题"
,
"待确定"
),
重大问题发送短信
(
"重大问题发送短信"
,
"3"
,
"ZDWTFSDX"
,
""
),
重大问题发送短信
(
"重大问题发送短信"
,
"3"
,
"ZDWTFSDX"
,
""
,
""
,
""
),
编制处理方案
(
"编制处理方案"
,
"4"
,
"BZCLFA"
,
"问题处理方案待编制"
),
编制处理方案
(
"编制处理方案"
,
"4"
,
"BZCLFA"
,
"问题处理方案待编制"
,
"编制处理方案"
,
"待编制"
),
审查处理方案
(
"审查处理方案"
,
"5"
,
"SCCLFA"
,
"问题处理方案待审查"
),
审查处理方案
(
"审查处理方案"
,
"5"
,
"SCCLFA"
,
"问题处理方案待审查"
,
"审查处理方案"
,
"待审查"
),
提交整改书
(
"提交整改书"
,
"6"
,
"TJZGGC"
,
"问题
处理方案
待提交"
),
提交整改书
(
"提交整改书"
,
"6"
,
"TJZGGC"
,
"问题
整改书待提交"
,
"提交整改书"
,
"
待提交"
),
审查整改过程
(
"审查整改过程"
,
"7"
,
"SCZGGC"
,
"问题
处理方案待审核
"
),
审查整改过程
(
"审查整改过程"
,
"7"
,
"SCZGGC"
,
"问题
整改书待审查"
,
"审查整改过程"
,
"待审查
"
),
超期整改发送短信
(
"超期整改发送短信"
,
"8"
,
"CQZGFSDX"
,
"问题待处理"
),
超期整改发送短信
(
"超期整改发送短信"
,
"8"
,
"CQZGFSDX"
,
"问题待处理"
,
""
,
""
),
问题分类
(
"问题分类"
,
"9"
,
"WTFL"
,
"问题待
处理
"
),
问题分类
(
"问题分类"
,
"9"
,
"WTFL"
,
"问题待
分类"
,
"问题分类"
,
"待分类
"
),
转人工
(
"转人工"
,
"10"
,
"ZRG"
,
"问题已转人工"
),
转人工
(
"转人工"
,
"10"
,
"ZRG"
,
"问题已转人工"
,
"转人工"
,
"等待人工处理"
),
结束
(
"
结束"
,
"11"
,
"JS"
,
"问题已处理
"
),
结束
(
"
流程结束!"
,
"11"
,
"JS"
,
"问题已处理"
,
""
,
"
"
),
重大问题整改完成发送短信
(
"重大问题整改完成发送短信"
,
"12"
,
"ZDWTZGWCFSDX"
,
"问题已处理"
);
重大问题整改完成发送短信
(
"重大问题整改完成发送短信"
,
"12"
,
"ZDWTZGWCFSDX"
,
"问题已处理"
,
""
,
""
);
private
String
Name
;
private
String
Name
;
private
String
key
;
private
String
key
;
private
String
Code
;
private
String
Code
;
private
String
progress
;
private
String
progress
;
private
String
taskName
;
private
String
taskStatus
;
public
static
Map
<
String
,
String
>
map
=
new
HashMap
<>();
public
static
Map
<
String
,
String
>
map
=
new
HashMap
<>();
public
static
Map
<
String
,
String
>
statusMap
=
new
HashMap
<>();
public
static
Map
<
String
,
String
>
statusMap
=
new
HashMap
<>();
public
static
Map
<
String
,
String
>
getTaskStatusMap
=
new
HashMap
<
String
,
String
>();
public
static
Map
<
String
,
String
>
getTaskNameMap
=
new
HashMap
<
String
,
String
>();
static
{
static
{
for
(
ProblemProcessEnum
proBlemProcessEnum
:
ProblemProcessEnum
.
values
())
{
for
(
ProblemProcessEnum
proBlemProcessEnum
:
ProblemProcessEnum
.
values
())
{
map
.
put
(
proBlemProcessEnum
.
getCode
(),
proBlemProcessEnum
.
getName
());
map
.
put
(
proBlemProcessEnum
.
getCode
(),
proBlemProcessEnum
.
getName
());
statusMap
.
put
(
proBlemProcessEnum
.
getName
(),
proBlemProcessEnum
.
getProgress
());
statusMap
.
put
(
proBlemProcessEnum
.
getName
(),
proBlemProcessEnum
.
getProgress
());
getTaskStatusMap
.
put
(
proBlemProcessEnum
.
getName
(),
proBlemProcessEnum
.
getTaskStatus
());
getTaskNameMap
.
put
(
proBlemProcessEnum
.
getName
(),
proBlemProcessEnum
.
getTaskName
());
}
}
}
}
}
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/Enum/ProjectInitiationEnum.java
View file @
904e0183
...
@@ -9,35 +9,44 @@ import java.util.Map;
...
@@ -9,35 +9,44 @@ import java.util.Map;
@Getter
@Getter
@AllArgsConstructor
@AllArgsConstructor
public
enum
ProjectInitiationEnum
{
public
enum
ProjectInitiationEnum
{
项目立项
(
"1"
,
"项目立项"
,
"XMLX"
),
项目立项
(
"1"
,
"项目立项"
,
"XMLX"
,
""
,
""
,
""
),
平台审核
(
"2"
,
"平台审核"
,
"PTSH"
),
平台审核
(
"2"
,
"平台审核"
,
"PTSH"
,
"项目待平台审核"
,
"审核项目"
,
"待审核"
),
告知申请
(
"3"
,
"告知申请"
,
"GZSQ"
),
告知申请
(
"3"
,
"告知申请"
,
"GZSQ"
,
"告知待申请"
,
"告知申请"
,
"待申请"
),
接受告知
(
"4"
,
"接受告知"
,
"JSGZ"
),
接受告知
(
"4"
,
"接受告知"
,
"JSGZ"
,
"告知待接收"
,
"告知接收"
,
"待接收"
),
审查项目
(
"5"
,
"审查项目"
,
"SCXM"
),
审查项目
(
"5"
,
"审查项目"
,
"SCXM"
,
"告知待审查"
,
"项目告知审查"
,
"待审查"
),
提交资料
(
"6"
,
"提交资料"
,
"TJZL"
),
提交资料
(
"6"
,
"提交资料"
,
"TJZL"
,
"项目资料待提交"
,
"项目资料提交"
,
"待提交"
),
审批人审批
(
"7"
,
"审批人审批"
,
"SPRSP"
),
审批人审批
(
"7"
,
"审批人审批"
,
"SPRSP"
,
"项目资料待审批"
,
"项目资料审批"
,
"待审批"
),
审核人审核
(
"8"
,
"审核人审核"
,
"SHRSH"
),
审核人审核
(
"8"
,
"审核人审核"
,
"SHRSH"
,
"项目资料待审核"
,
"项目资料审核"
,
"待审核"
),
监检科室分配
(
"9"
,
"监检科室分配"
,
"JJKSFP"
),
监检科室分配
(
"9"
,
"监检科室分配"
,
"JJKSFP"
,
"监检科室待分配"
,
"监检科室分配"
,
"待分配"
),
监检员分配
(
"10"
,
"监检员分配"
,
"JJYFP"
),
监检员分配
(
"10"
,
"监检员分配"
,
"JJYFP"
,
"监检员待分配"
,
"监检员分配"
,
"待分配"
),
监检员审核
(
"11"
,
"监检员审核"
,
"JJYSH"
),
监检员审核
(
"11"
,
"监检员审核"
,
"JJYSH"
,
"监检员待审核"
,
"监检员审核"
,
"待审核"
),
项目关闭
(
"12"
,
"项目关闭"
,
"XMGB"
),
项目关闭
(
"12"
,
"项目关闭"
,
"XMGB"
,
""
,
""
,
""
),
接受审查意见
(
"13"
,
"接受审查意见"
,
"JSSCYJ"
),
接受审查意见
(
"13"
,
"接受审查意见"
,
"JSSCYJ"
,
"审查意见待接受"
,
"接受审查意见"
,
"待接受"
),
流程结束
(
"14"
,
"流程结束!"
,
"LCJS"
);
流程结束
(
"14"
,
"流程结束!"
,
"LCJS"
,
""
,
""
,
""
);
private
String
status
;
private
String
status
;
private
String
name
;
private
String
name
;
private
String
code
;
private
String
code
;
private
String
taskDetailStatus
;
private
String
taskName
;
private
String
taskStatus
;
public
static
Map
<
String
,
String
>
getNameByStatusMap
=
new
HashMap
<
String
,
String
>();
public
static
Map
<
String
,
String
>
getNameByStatusMap
=
new
HashMap
<
String
,
String
>();
public
static
Map
<
String
,
String
>
getStatusByNameMap
=
new
HashMap
<
String
,
String
>();
public
static
Map
<
String
,
String
>
getStatusByNameMap
=
new
HashMap
<
String
,
String
>();
public
static
Map
<
String
,
String
>
getCodeByNameMap
=
new
HashMap
<
String
,
String
>();
public
static
Map
<
String
,
String
>
getCodeByNameMap
=
new
HashMap
<
String
,
String
>();
public
static
Map
<
String
,
String
>
getTaskStatusMap
=
new
HashMap
<
String
,
String
>();
public
static
Map
<
String
,
String
>
getTaskNameMap
=
new
HashMap
<
String
,
String
>();
public
static
Map
<
String
,
String
>
getTaskDetailStatusMap
=
new
HashMap
<
String
,
String
>();
static
{
static
{
for
(
ProjectInitiationEnum
projectInitiationEnum:
ProjectInitiationEnum
.
values
()){
for
(
ProjectInitiationEnum
projectInitiationEnum:
ProjectInitiationEnum
.
values
()){
getNameByStatusMap
.
put
(
projectInitiationEnum
.
status
,
projectInitiationEnum
.
name
);
getNameByStatusMap
.
put
(
projectInitiationEnum
.
status
,
projectInitiationEnum
.
name
);
getStatusByNameMap
.
put
(
projectInitiationEnum
.
name
,
projectInitiationEnum
.
status
);
getStatusByNameMap
.
put
(
projectInitiationEnum
.
name
,
projectInitiationEnum
.
status
);
getCodeByNameMap
.
put
(
projectInitiationEnum
.
name
,
projectInitiationEnum
.
code
);
getCodeByNameMap
.
put
(
projectInitiationEnum
.
name
,
projectInitiationEnum
.
code
);
getTaskStatusMap
.
put
(
projectInitiationEnum
.
name
,
projectInitiationEnum
.
taskStatus
);
getTaskNameMap
.
put
(
projectInitiationEnum
.
name
,
projectInitiationEnum
.
taskName
);
getTaskDetailStatusMap
.
put
(
projectInitiationEnum
.
name
,
projectInitiationEnum
.
taskDetailStatus
);
}
}
}
}
}
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/Enum/TaskTypeEnum.java
0 → 100644
View file @
904e0183
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
Enum
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
@Getter
@AllArgsConstructor
public
enum
TaskTypeEnum
{
填报
(
"form"
,
"填报"
),
流程
(
"flow"
,
"流程"
),
企业审核
(
"examine"
,
"企业审核"
),
待办
(
"false"
,
"待办"
),
已办
(
"true"
,
"已办"
);
String
key
;
String
name
;
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/constants/XJConstant.java
View file @
904e0183
...
@@ -22,8 +22,8 @@ public class XJConstant {
...
@@ -22,8 +22,8 @@ public class XJConstant {
public
static
final
String
DEPT_WF_MAP_DIC_CODE
=
"DEPT_WF_MAP"
;
public
static
final
String
DEPT_WF_MAP_DIC_CODE
=
"DEPT_WF_MAP"
;
//附件默认值
//附件默认值
public
static
final
String
INSTALL_SUB_FORM
=
"[{\"Symbol_key\":\"B83A18D2-FF89-47D2-BEA2-BAA097E09783\",\"subFormInstall\":\"材质证明文件\",\"info\":\"\",\"type\":\"
\"},{\"Symbol_key\":\"DB0306C1-3520-4BB4-93CE-44DA95AAD408\",\"subFormInstall\":\"焊接工艺评定报告\",\"info\":\"\",\"type\":\"
\"}]"
;
public
static
final
String
INSTALL_SUB_FORM
=
"[{\"Symbol_key\":\"B83A18D2-FF89-47D2-BEA2-BAA097E09783\",\"subFormInstall\":\"材质证明文件\",\"info\":\"\",\"type\":\"
安装单位\"},{\"Symbol_key\":\"DB0306C1-3520-4BB4-93CE-44DA95AAD408\",\"subFormInstall\":\"焊接工艺评定报告\",\"info\":\"\",\"type\":\"安装单位
\"}]"
;
public
static
final
String
DESIGN_SUB_FORM
=
"[{\"Symbol_key\":\"314C727B-A6A7-40F1-9CFC-C354748657F7\",\"subFormAttachment\":\"设计文件\",\"info\":\"\",\"type\":\"
\"},{\"Symbol_key\":\"5F3B660B-25A2-420C-919E-60F74CE1F36A\",\"subFormAttachment\":\"施工组织设计文件\",\"info\":\"\",\"type\":\"
\"}]"
;
public
static
final
String
DESIGN_SUB_FORM
=
"[{\"Symbol_key\":\"314C727B-A6A7-40F1-9CFC-C354748657F7\",\"subFormAttachment\":\"设计文件\",\"info\":\"\",\"type\":\"
设计单位\"},{\"Symbol_key\":\"5F3B660B-25A2-420C-919E-60F74CE1F36A\",\"subFormAttachment\":\"施工组织设计文件\",\"info\":\"\",\"type\":\"设计单位
\"}]"
;
//人员org数值
//人员org数值
public
static
final
int
ORG_CODE
=
18
;
public
static
final
int
ORG_CODE
=
18
;
public
static
final
int
ORG_CODE_USER
=
12
;
public
static
final
int
ORG_CODE_USER
=
12
;
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/CodeWeldDto.java
0 → 100644
View file @
904e0183
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
dto
;
import
lombok.Data
;
import
java.util.Date
;
/**
* @Author cpp
* @Description
* @Date 2022/12/1
*/
@Data
public
class
CodeWeldDto
{
private
String
code
;
private
Date
date
;
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/ColModel.java
0 → 100644
View file @
904e0183
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
dto
;
import
lombok.Data
;
/**
* @Author cpp
* @Description
* @Date 2022/11/29
*/
@Data
public
class
ColModel
{
private
String
fid
;
private
String
dataIndex
;
private
String
name
;
private
String
title
;
private
String
type
;
private
String
key
;
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/DataGridMock.java
0 → 100644
View file @
904e0183
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
dto
;
import
lombok.Data
;
import
java.util.List
;
/**
* @Author cpp
* @Description
* @Date 2022/11/29
*/
@Data
public
class
DataGridMock
{
private
Integer
current
;
private
Integer
total
;
private
Boolean
pagination
;
private
Integer
totalPage
;
private
List
dataList
;
private
Integer
pageSize
;
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/MaterialCount.java
0 → 100644
View file @
904e0183
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
dto
;
import
lombok.Data
;
/**
* @Author cpp
* @Description
* @Date 2022/11/30
*/
@Data
public
class
MaterialCount
{
private
String
manufactureAddr
;
private
Long
sum
;
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/MsgNoticeDto.java
0 → 100644
View file @
904e0183
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
@Data
//@EqualsAndHashCode(callSuper = true)
@ApiModel
(
value
=
"MsgNoticeDto"
,
description
=
"消息提醒"
)
public
class
MsgNoticeDto
{
/**
* 消息类型
*/
private
String
type
;
/**
* 消息内容
*/
private
String
content
;
/**
* 消息创建时间
*/
private
Date
createDate
;
/**
* 消息sequenceNbr
*/
private
Long
sequenceNbr
;
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/OpenDto.java
View file @
904e0183
...
@@ -15,6 +15,6 @@ public class OpenDto {
...
@@ -15,6 +15,6 @@ public class OpenDto {
private
String
accord
;
//符合性
private
String
accord
;
//符合性
private
String
valid
;
//有效性
private
String
valid
;
//有效性
private
String
result
;
//结果
private
String
result
;
//结果
private
String
detailId
;
//跳转id 或者管材编码
private
String
sequenceNbr
;
//跳转id
}
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/PercentOfPassDto.java
View file @
904e0183
...
@@ -37,8 +37,8 @@ public class PercentOfPassDto extends BaseDto {
...
@@ -37,8 +37,8 @@ public class PercentOfPassDto extends BaseDto {
private
Date
startDate
;
private
Date
startDate
;
@ApiModelProperty
(
value
=
"项目提交日期"
)
@ApiModelProperty
(
value
=
"项目提交日期"
)
private
Date
submitDate
;
private
Date
submitDate
;
@ApiModelProperty
(
value
=
"
刷新
"
)
@ApiModelProperty
(
value
=
"
查看
"
)
private
String
refresh
;
private
String
look
;
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/ProjectDto.java
View file @
904e0183
...
@@ -110,4 +110,6 @@ public class ProjectDto extends BaseDto {
...
@@ -110,4 +110,6 @@ public class ProjectDto extends BaseDto {
private
String
insDep
;
private
String
insDep
;
private
String
insPerson
;
private
String
insPerson
;
private
String
startDateString
;
private
String
startDateString
;
private
String
companyType
;
}
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/QualityProblemDto.java
View file @
904e0183
...
@@ -78,6 +78,8 @@ public class QualityProblemDto extends BaseDto {
...
@@ -78,6 +78,8 @@ public class QualityProblemDto extends BaseDto {
@ApiModelProperty
(
value
=
"是否限期内整改(1是/0否)"
)
@ApiModelProperty
(
value
=
"是否限期内整改(1是/0否)"
)
private
Boolean
rectifyWithinTime
;
private
Boolean
rectifyWithinTime
;
//问题分类更新截止时间
private
Date
dateTime
;
/**
/**
* 项目名称
* 项目名称
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/TableDto.java
0 → 100644
View file @
904e0183
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
dto
;
import
lombok.Data
;
import
java.util.List
;
/**
* @Author cpp
* @Description
* @Date 2022/11/29
*/
@Data
public
class
TableDto
{
private
DataGridMock
dataGridMock
;
private
List
<
ColModel
>
colModel
;
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/TaskDto.java
View file @
904e0183
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
dto
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
dto
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -12,40 +13,17 @@ import java.util.Date;
...
@@ -12,40 +13,17 @@ import java.util.Date;
* @date 2022-10-19
* @date 2022-10-19
*/
*/
@Data
@Data
public
class
TaskDto
implements
Serializable
{
public
class
TaskDto
extends
BaseDto
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"任务名称"
)
String
content
;
/**
Date
sendTime
;
* 任务名称
boolean
status
;
*/
String
statusLabel
;
private
String
name
;
String
taskType
;
@ApiModelProperty
(
value
=
"焊工id"
)
String
taskTypeLabel
;
/**
String
title
;
* 焊工id
String
agencyCode
=
"ugp"
;
*/
private
String
welderId
;
@ApiModelProperty
(
value
=
"任务状态(0:未开始 1:进行中 2:已结束)"
)
/**
* 任务状态(0:未开始 1:进行中 2:已结束)
*/
private
String
status
;
@ApiModelProperty
(
value
=
"更新日期"
)
/**
* 任务开始时间
*/
private
Date
startTime
;
@ApiModelProperty
(
value
=
"任务结束时间"
)
/**
* 任务结束时间
*/
private
Date
overTime
;
@ApiModelProperty
(
value
=
"项目id"
)
/**
* 项目id
*/
private
Long
projectId
;
}
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/UnitLicenceDto.java
0 → 100644
View file @
904e0183
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
java.util.Date
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
/**
* 单位许可信息表
*
* @author duanwei
* @date 2022-11-30
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"TzUgpUnitLicence对象"
,
description
=
"单位许可信息表"
)
public
class
UnitLicenceDto
extends
BaseDto
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"单位编码"
)
private
String
unitCode
;
@ApiModelProperty
(
value
=
"单位名称"
)
private
String
unitName
;
@ApiModelProperty
(
value
=
"许可地址"
)
private
String
licAddress
;
@ApiModelProperty
(
value
=
"证书类型"
)
private
String
certType
;
@ApiModelProperty
(
value
=
"证书类型code"
)
private
String
certTypeCode
;
@ApiModelProperty
(
value
=
"证书编号"
)
private
String
certNo
;
@ApiModelProperty
(
value
=
"有效期至"
)
private
Date
expiryDate
;
@ApiModelProperty
(
value
=
"发证日期"
)
private
Date
issueDate
;
@ApiModelProperty
(
value
=
"发证机关"
)
private
String
approvedOrgan
;
@ApiModelProperty
(
value
=
"发证机关code"
)
private
String
approvedOrganCode
;
@ApiModelProperty
(
value
=
"变更日期"
)
private
Date
changeDate
;
@ApiModelProperty
(
value
=
"许可方式/许可状态"
)
private
String
applyType
;
@ApiModelProperty
(
value
=
"许可方式/许可状态code"
)
private
String
applyTypeCode
;
@ApiModelProperty
(
value
=
"许可评审方式"
)
private
String
appraisalType
;
@ApiModelProperty
(
value
=
"许可评审方式code"
)
private
String
appraisalTypeCode
;
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
@ApiModelProperty
(
value
=
"许可项目/检验类型/设备品种编码"
)
private
String
itemCode
;
@ApiModelProperty
(
value
=
"许可项目/检验类型/设备品种"
)
private
String
itemCodeName
;
@ApiModelProperty
(
value
=
"许可子项目/检验项目/充装介质类别code"
)
private
String
subItemCode
;
@ApiModelProperty
(
value
=
"许可子项目/检验项目/充装介质类别"
)
private
String
subItemName
;
@ApiModelProperty
(
value
=
"许可参数/充装介质名称"
)
private
String
parameter
;
@ApiModelProperty
(
value
=
"参数code"
)
private
String
parameterCode
;
@ApiModelProperty
(
value
=
"固定检验地址"
)
private
String
itemAddress
;
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/WeldDto.java
View file @
904e0183
...
@@ -50,6 +50,17 @@ public class WeldDto extends BaseDto {
...
@@ -50,6 +50,17 @@ public class WeldDto extends BaseDto {
private
Date
codingDate
;
private
Date
codingDate
;
@ApiModelProperty
(
value
=
"监察单位"
)
private
String
superviseDept
;
@ApiModelProperty
(
value
=
"检验检测单位"
)
private
String
insDep
;
@ApiModelProperty
(
value
=
"检验检测单位负责人"
)
private
String
insPerson
;
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/WeldVerifyDto.java
0 → 100644
View file @
904e0183
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
@Data
//@EqualsAndHashCode(callSuper = true)
@ApiModel
(
value
=
"WeldVerifyDto"
,
description
=
"焊口智能监验信息"
)
public
class
WeldVerifyDto
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"设备名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"设备编号"
)
private
String
code
;
@ApiModelProperty
(
value
=
"安装区域"
)
private
String
installRegion
;
@ApiModelProperty
(
value
=
"工艺校验"
)
private
String
craftStatus
=
"未校验"
;
@ApiModelProperty
(
value
=
"耐压校验"
)
private
String
voltageStatus
=
"未校验"
;
@ApiModelProperty
(
value
=
"敷设校验"
)
private
String
layStatus
=
"未校验"
;
@ApiModelProperty
(
value
=
"定位校验"
)
private
String
locationStatus
=
"未校验"
;
@ApiModelProperty
(
value
=
"探伤校验"
)
private
String
flawStatus
=
"未校验"
;
@ApiModelProperty
(
value
=
"管沟校验"
)
private
String
pipeDitchStatus
=
"未校验"
;
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/entity/InstallNoticeMsg.java
View file @
904e0183
...
@@ -52,4 +52,10 @@ public class InstallNoticeMsg extends BaseEntity {
...
@@ -52,4 +52,10 @@ public class InstallNoticeMsg extends BaseEntity {
@TableField
(
"send_time"
)
@TableField
(
"send_time"
)
private
Date
sendTime
;
private
Date
sendTime
;
/**
* 短信状态:已读、未读
*/
@TableField
(
"is_read"
)
private
Boolean
isRead
;
}
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/entity/RectifyMsg.java
View file @
904e0183
...
@@ -52,4 +52,10 @@ public class RectifyMsg extends BaseEntity {
...
@@ -52,4 +52,10 @@ public class RectifyMsg extends BaseEntity {
@TableField
(
"send_time"
)
@TableField
(
"send_time"
)
private
Date
sendTime
;
private
Date
sendTime
;
/**
* 短信状态:已读、未读
*/
@TableField
(
"is_read"
)
private
Boolean
isRead
;
}
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/entity/UnitLicence.java
0 → 100644
View file @
904e0183
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.util.Date
;
/**
* 单位许可信息表
*
* @author duanwei
* @date 2022-11-30
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"tz_ugp_unit_licence"
)
@ApiModel
(
value
=
"TzUgpUnitLicence对象"
,
description
=
"单位许可信息表"
)
public
class
UnitLicence
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"单位编码"
)
private
String
unitCode
;
@ApiModelProperty
(
value
=
"单位名称"
)
private
String
unitName
;
@ApiModelProperty
(
value
=
"许可地址"
)
private
String
licAddress
;
@ApiModelProperty
(
value
=
"证书类型"
)
private
String
certType
;
@ApiModelProperty
(
value
=
"证书类型code"
)
private
String
certTypeCode
;
@ApiModelProperty
(
value
=
"证书编号"
)
private
String
certNo
;
@ApiModelProperty
(
value
=
"有效期至"
)
private
Date
expiryDate
;
@ApiModelProperty
(
value
=
"发证日期"
)
private
Date
issueDate
;
@ApiModelProperty
(
value
=
"发证机关"
)
private
String
approvedOrgan
;
@ApiModelProperty
(
value
=
"发证机关code"
)
private
String
approvedOrganCode
;
@ApiModelProperty
(
value
=
"变更日期"
)
private
Date
changeDate
;
@ApiModelProperty
(
value
=
"许可方式/许可状态"
)
private
String
applyType
;
@ApiModelProperty
(
value
=
"许可方式/许可状态code"
)
private
String
applyTypeCode
;
@ApiModelProperty
(
value
=
"许可评审方式"
)
private
String
appraisalType
;
@ApiModelProperty
(
value
=
"许可评审方式code"
)
private
String
appraisalTypeCode
;
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
@ApiModelProperty
(
value
=
"许可项目/检验类型/设备品种编码"
)
private
String
itemCode
;
@ApiModelProperty
(
value
=
"许可项目/检验类型/设备品种"
)
private
String
itemCodeName
;
@ApiModelProperty
(
value
=
"许可子项目/检验项目/充装介质类别code"
)
private
String
subItemCode
;
@ApiModelProperty
(
value
=
"许可子项目/检验项目/充装介质类别"
)
private
String
subItemName
;
@ApiModelProperty
(
value
=
"许可参数/充装介质名称"
)
private
String
parameter
;
@ApiModelProperty
(
value
=
"参数code"
)
private
String
parameterCode
;
@ApiModelProperty
(
value
=
"固定检验地址"
)
private
String
itemAddress
;
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/EquipmentMapper.java
View file @
904e0183
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
mapper
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
mapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.CompanyDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.EquipmentDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.EquipmentDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Company
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Equipment
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Equipment
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
...
@@ -23,5 +21,5 @@ import java.util.Set;
...
@@ -23,5 +21,5 @@ import java.util.Set;
public
interface
EquipmentMapper
extends
BaseMapper
<
Equipment
>
{
public
interface
EquipmentMapper
extends
BaseMapper
<
Equipment
>
{
IPage
<
EquipmentDto
>
queryEquipmentPage
(
IPage
<
EquipmentDto
>
page
,
Equipment
equipment
,
Set
<
String
>
companyIds
);
IPage
<
EquipmentDto
>
queryEquipmentPage
(
IPage
<
EquipmentDto
>
page
,
Equipment
equipment
,
Set
<
String
>
companyIds
);
List
<
Map
<
String
,
Long
>>
informationStatistics
(
@Param
(
"company
SequenceNbr"
)
Long
companySequenceNbr
);
List
<
Map
<
String
,
Long
>>
informationStatistics
(
@Param
(
"company
Ids"
)
Set
<
String
>
companyIds
);
}
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/MaterialMapper.java
View file @
904e0183
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
mapper
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.MaterialCount
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Material
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Material
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -12,10 +16,15 @@ import java.util.Map;
...
@@ -12,10 +16,15 @@ import java.util.Map;
* @author system_generator
* @author system_generator
* @date 2022-09-22
* @date 2022-09-22
*/
*/
@Mapper
public
interface
MaterialMapper
extends
BaseMapper
<
Material
>
{
public
interface
MaterialMapper
extends
BaseMapper
<
Material
>
{
List
<
String
>
pipeManufacturerStatisticsToaXisData
();
List
<
String
>
pipeManufacturerStatisticsToaXisData
();
List
<
String
>
pipeManufacturerStatisticsToaSeriesData
();
List
<
String
>
pipeManufacturerStatisticsToaSeriesData
();
List
<
MaterialCount
>
getMaterialCount
();
//
List
<
MaterialCount
>
getConditionCount
(
@Param
(
"listIdList"
)
List
<
Long
>
listIdList
);
}
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/QualityProblemMapper.java
View file @
904e0183
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.yeejoin.amos.boot.module.ugp.api.dto.QualityProblemDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.QualityProblemDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.QualityProblem
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.QualityProblem
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
import
java.util.List
;
...
@@ -23,5 +24,5 @@ public interface QualityProblemMapper extends BaseMapper<QualityProblem> {
...
@@ -23,5 +24,5 @@ public interface QualityProblemMapper extends BaseMapper<QualityProblem> {
QualityProblemDto
getInfoBySequenceNbr
(
String
sequenceNbr
);
QualityProblemDto
getInfoBySequenceNbr
(
String
sequenceNbr
);
List
<
Map
<
String
,
String
>>
qualityProblemStatistics
();
List
<
Map
<
String
,
String
>>
qualityProblemStatistics
(
@Param
(
"projectIds"
)
Set
<
String
>
projectIds
);
}
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/UnitLicenceMapper.java
0 → 100644
View file @
904e0183
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.UnitLicence
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* 单位许可信息表 Mapper 接口
*
* @author duanwei
* @date 2022-11-30
*/
public
interface
UnitLicenceMapper
extends
BaseMapper
<
UnitLicence
>
{
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/VerifyMapper.java
View file @
904e0183
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
mapper
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
mapper
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.CodeWeldDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.SmartListDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.SmartListDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Verify
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Verify
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
...
@@ -31,6 +33,8 @@ public interface VerifyMapper extends BaseMapper<Verify> {
...
@@ -31,6 +33,8 @@ public interface VerifyMapper extends BaseMapper<Verify> {
//
//
List
<
Verify
>
selectByWelder
(
Long
projectId
,
Long
welderId
,
String
code
,
String
stage
,
Long
random
);
List
<
Verify
>
selectByWelder
(
Long
projectId
,
Long
welderId
,
String
code
,
String
stage
,
Long
random
);
Verify
selectByCode
(
String
code
,
Long
projectId
,
String
stage
,
Long
random
);
Verify
selectByCode
(
String
code
,
Long
projectId
,
String
stage
,
Long
random
);
List
<
CodeWeldDto
>
getCode
();
List
<
Verify
>
getVerity
(
String
code
);
}
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/WeldMapper.java
View file @
904e0183
...
@@ -5,6 +5,7 @@ import com.yeejoin.amos.boot.module.ugp.api.dto.WeldDto;
...
@@ -5,6 +5,7 @@ import com.yeejoin.amos.boot.module.ugp.api.dto.WeldDto;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Weld
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Weld
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
org.apache.ibatis.annotations.Select
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
@@ -27,4 +28,7 @@ public interface WeldMapper extends BaseMapper<Weld> {
...
@@ -27,4 +28,7 @@ public interface WeldMapper extends BaseMapper<Weld> {
IPage
<
WeldDto
>
queryForWeldPage
(
IPage
<
WeldDto
>
page
,
Set
<
String
>
codes
,
@RequestBody
(
required
=
false
)
WeldDto
weldDto
)
;
IPage
<
WeldDto
>
queryForWeldPage
(
IPage
<
WeldDto
>
page
,
Set
<
String
>
codes
,
@RequestBody
(
required
=
false
)
WeldDto
weldDto
)
;
@Select
(
"select * from tz_ugp_weld where `code` =#{code}"
)
WeldDto
getSqe
(
@Param
(
"code"
)
String
code
);
}
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/WelderMapper.java
View file @
904e0183
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
mapper
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.context.annotation.Bean
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Set
;
public
interface
WelderMapper
extends
BaseMapper
{
public
interface
WelderMapper
extends
BaseMapper
{
List
<
Map
>
welderStatistics
(
String
bizOrg
Code
);
List
<
Map
>
welderStatistics
(
@Param
(
"personCode"
)
Set
<
String
>
person
Code
);
}
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/quartz/CylinderSchedulerJob.java
0 → 100644
View file @
904e0183
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
quartz
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.io.File
;
@Component
@EnableScheduling
public
class
CylinderSchedulerJob
{
/**
* 每天3点-删除图片
*/
@Scheduled
(
cron
=
"${cylinder-early-warning-cron:0 0 3 * * ?}"
)
public
void
clean
()
{
dayReport
(
new
File
(
new
File
(
"/home/yeejoin/ugp/minio-data/upload/common/ugp/qrcode"
).
getAbsolutePath
()));
}
public
static
void
dayReport
(
File
file
)
{
// file.isAbsolute();
if
(!
ValidationUtil
.
isEmpty
(
file
.
listFiles
()))
{
for
(
File
f
:
file
.
listFiles
())
{
//实现递归
if
(
f
.
isDirectory
())
{
dayReport
(
f
);
}
//清理文件
f
.
delete
();
System
.
out
.
println
(
f
.
getName
()
+
"已清理!!!"
);
}
}
}
// public static void main(String[] args) {
//
// dayReport(new File(new File("/home/yeejoin/ugp/minio-data/upload/common/ugp/qrcode").getAbsolutePath()));
// }
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/service/IUnitLicenceService.java
0 → 100644
View file @
904e0183
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
service
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.UnitLicence
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* 单位许可信息表 服务类
*
* @author duanwei
* @date 2022-11-30
*/
public
interface
IUnitLicenceService
extends
IService
<
UnitLicence
>
{
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/service/IUnitPersonService.java
0 → 100644
View file @
904e0183
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
service
;
/**
* 管辖单位和管辖区域
*/
public
interface
IUnitPersonService
{
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/EquipmentMapper.xml
View file @
904e0183
...
@@ -26,7 +26,16 @@
...
@@ -26,7 +26,16 @@
</select>
</select>
<select
id=
"informationStatistics"
parameterType=
"Long"
resultType=
"java.util.HashMap"
>
<select
id=
"informationStatistics"
parameterType=
"Long"
resultType=
"java.util.HashMap"
>
SELECT type as name ,count(1) AS value FROM tz_ugp_equipment where company_id = #{companySequenceNbr} GROUP BY type
SELECT type as name ,count(1) AS value FROM tz_ugp_equipment
<where>
<if
test=
"companyIds !=null and companyIds.size>0"
>
and company_id in
<foreach
collection=
"companyIds"
index=
"index"
item=
"item"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</if>
</where>
GROUP BY type
</select>
</select>
</mapper>
</mapper>
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/MaterialMapper.xml
View file @
904e0183
...
@@ -10,4 +10,29 @@
...
@@ -10,4 +10,29 @@
SELECT COUNT(1) as seriesData FROM tz_ugp_material GROUP BY manufacture_addr
SELECT COUNT(1) as seriesData FROM tz_ugp_material GROUP BY manufacture_addr
</select>
</select>
<select
id=
"getMaterialCount"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.MaterialCount"
>
select
manufacture_addr AS manufactureAddr,
count(manufacture_addr) AS `sum`
from
tz_ugp_material
GROUP BY
manufacture_addr
</select>
<select
id=
"getConditionCount"
parameterType=
"java.util.List"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.MaterialCount"
>
select
manufacture_addr AS manufactureAddr,
count(manufacture_addr) AS `sum`
from tz_ugp_material
where
company_id in
<foreach
collection=
"listIdList"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
GROUP BY
manufacture_addr
</select>
</mapper>
</mapper>
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/QualityProblemMapper.xml
View file @
904e0183
...
@@ -68,14 +68,21 @@
...
@@ -68,14 +68,21 @@
WHERE qi.sequence_nbr = #{sequenceNbr}
WHERE qi.sequence_nbr = #{sequenceNbr}
</select>
</select>
<select
id=
"qualityProblemStatistics"
resultType=
"java.util.
Hash
Map"
>
<select
id=
"qualityProblemStatistics"
resultType=
"java.util.Map"
>
SELECT
SELECT
generate_stage AS name
,
qi.generate_stage AS `name`
,
count(1) AS
value
count(1) AS
`value`
FROM
FROM
tz_ugp_quality_problem
tz_ugp_quality_problem AS qi
GROUP BY
<where>
generate_stage
<if
test=
"projectIds != null and projectIds.size > 0"
>
and qi.project_id in
<foreach
collection=
"projectIds"
index=
"index"
item=
"item"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</if>
</where>
GROUP BY qi.generate_stage
</select>
</select>
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/VerifyMapper.xml
View file @
904e0183
...
@@ -111,4 +111,39 @@
...
@@ -111,4 +111,39 @@
target_info -> "$.random" =#{random}
target_info -> "$.random" =#{random}
</if>
</if>
</select>
</select>
<select
id=
"getCode"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.CodeWeldDto"
>
select
`code`,
MAX(verify_time) AS `date`
from
tz_ugp_verify
where
`status`='0'
AND
stage ='CRAFT' or stage ='VOLTAGE' or stage ='LAY' or stage ='LOTCATION' or stage ='BACKFILL'
GROUP BY `code`
</select>
<select
id=
"getVerity"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.entity.Verify"
>
select
sequence_nbr,
project_id,
`code`,
stage,
target_info,
`status`,
type,
submit_time,
verify_time,
verify_unit_id,
charger_person_id,
inspector_id
from tz_ugp_verify where stage='CRAFT'
AND
`code`=#{code}
</select>
</mapper>
</mapper>
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/WeldMapper.xml
View file @
904e0183
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
</if>
</if>
</if>
</if>
<if
test=
"codes !=null"
>
<if
test=
"codes !=null
and codes.size >0
"
>
AND tz_ugp_weld.project_id IN
AND tz_ugp_weld.project_id IN
<foreach
collection=
"codes"
item =
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
<foreach
collection=
"codes"
item =
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
#{item}
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/WelderMapper.xml
View file @
904e0183
...
@@ -8,7 +8,14 @@
...
@@ -8,7 +8,14 @@
FROM
FROM
cb_org_usr AS ou
cb_org_usr AS ou
LEFT JOIN cb_dynamic_form_instance AS fi ON ou.sequence_nbr = fi.instance_id and fi.field_code = "licensedProject"
LEFT JOIN cb_dynamic_form_instance AS fi ON ou.sequence_nbr = fi.instance_id and fi.field_code = "licensedProject"
WHERE ou.org_expand_attr1 = "WELDER" AND ou.biz_org_type="PERSON" AND ou.biz_org_code LIKE CONCAT("%",#{bizOrgCode},"%")
WHERE ou.org_expand_attr1 = "WELDER" AND ou.biz_org_type="PERSON"
<if
test=
"personCode!=null and personCode.size>0"
>
AND (
<foreach
collection=
"personCode"
index=
"index"
item=
"item"
close=
""
open=
""
separator=
"or"
>
ou.biz_org_code LIKE CONCAT("%",#{item},"%")
</foreach>
)
</if>
GROUP BY fi.field_value
GROUP BY fi.field_value
</select>
</select>
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/CompanyController.java
View file @
904e0183
...
@@ -13,7 +13,9 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
...
@@ -13,7 +13,9 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgUsrDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgUsrDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.CompanyExamineEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.CompanyTypeEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.CompanyTypeEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.OrgEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.constants.XJConstant
;
import
com.yeejoin.amos.boot.module.ugp.api.constants.XJConstant
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Company
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Company
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.CompanyMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.CompanyMapper
;
...
@@ -43,6 +45,8 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
...
@@ -43,6 +45,8 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.swing.text.StyledEditorKit
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.CompanyDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.CompanyDto
;
...
@@ -107,6 +111,7 @@ public class CompanyController extends BaseController {
...
@@ -107,6 +111,7 @@ public class CompanyController extends BaseController {
String
url
=
object
.
getString
(
"url"
);
String
url
=
object
.
getString
(
"url"
);
adminLincensePic
.
add
(
url
);
adminLincensePic
.
add
(
url
);
}
}
model
.
setApproved
(
CompanyExamineEnum
.
企业审核
.
getNo
());
model
.
setAdminLincensePic
(
JSON
.
toJSONString
(
adminLincensePic
));
model
.
setAdminLincensePic
(
JSON
.
toJSONString
(
adminLincensePic
));
return
ResponseHelper
.
buildResponse
(
companyServiceImpl
.
createWithModel
(
model
));
return
ResponseHelper
.
buildResponse
(
companyServiceImpl
.
createWithModel
(
model
));
}
}
...
@@ -160,11 +165,15 @@ public class CompanyController extends BaseController {
...
@@ -160,11 +165,15 @@ public class CompanyController extends BaseController {
* @param current 每页大小
* @param current 每页大小
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@
Pos
tMapping
(
value
=
"/page"
)
@
Ge
tMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"企业信息表分页查询"
,
notes
=
"企业信息表分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"企业信息表分页查询"
,
notes
=
"企业信息表分页查询"
)
public
ResponseModel
<
IPage
<
CompanyDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
public
ResponseModel
<
IPage
<
CompanyDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestBody
Company
company
)
{
(
value
=
"size"
)
int
size
,
Company
company
)
{
List
<
CompanyDto
>
companyDtos
=
companyServiceImpl
.
queryCompanyPage
(
current
,
size
,
company
).
getRecords
();
for
(
CompanyDto
companyDto
:
companyDtos
)
{
companyDto
.
setType
(
OrgEnum
.
map
.
get
(
companyDto
.
getType
()));
}
return
ResponseHelper
.
buildResponse
(
companyServiceImpl
.
queryCompanyPage
(
current
,
size
,
company
));
return
ResponseHelper
.
buildResponse
(
companyServiceImpl
.
queryCompanyPage
(
current
,
size
,
company
));
}
}
...
@@ -453,6 +462,24 @@ public class CompanyController extends BaseController {
...
@@ -453,6 +462,24 @@ public class CompanyController extends BaseController {
}
}
return
ResponseHelper
.
buildResponse
(
flag
);
return
ResponseHelper
.
buildResponse
(
flag
);
}
}
/**
* 通过企业单位名称判断是否存在
*
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/hasExistCompanyName/{name}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"判断企业名称是否存在"
,
notes
=
"判断企业名称是否存在"
)
public
ResponseModel
<
Boolean
>
hasExistCompanyName
(
@PathVariable
(
value
=
"name"
)
String
name
){
Boolean
exist
=
false
;
LambdaQueryWrapper
<
Company
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
Company:
:
getName
,
name
);
Company
companyName
=
companyServiceImpl
.
getOne
(
wrapper
);
if
(!
ValidationUtil
.
isEmpty
(
companyName
)){
exist
=
true
;
}
return
ResponseHelper
.
buildResponse
(
exist
);
}
/**
/**
* 发送手机号验证码
* 发送手机号验证码
...
@@ -479,7 +506,8 @@ public class CompanyController extends BaseController {
...
@@ -479,7 +506,8 @@ public class CompanyController extends BaseController {
throw
new
BadRequest
(
"发送短信失败:"
+
e
.
getMessage
());
throw
new
BadRequest
(
"发送短信失败:"
+
e
.
getMessage
());
}
}
// code 保存到缓存中
// code 保存到缓存中
redisUtils
.
set
(
XJConstant
.
UGP_USER_TEL
+
adminTel
,
code
);
// redisUtils.set(XJConstant.UGP_USER_TEL + adminTel, code);
redisUtils
.
set
(
XJConstant
.
UGP_USER_TEL
+
adminTel
,
code
,
600
);
return
ResponseHelper
.
buildResponse
(
flag
);
return
ResponseHelper
.
buildResponse
(
flag
);
}
}
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/InstallNoticeController.java
View file @
904e0183
...
@@ -13,9 +13,7 @@ import com.yeejoin.amos.boot.module.ugp.api.entity.InstallNotice;
...
@@ -13,9 +13,7 @@ import com.yeejoin.amos.boot.module.ugp.api.entity.InstallNotice;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Project
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Project
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.InstallNoticeMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.InstallNoticeMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectMapper
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.OrgServiceImpl
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.*
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.ProjectInitiationServiceImpl
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.ProjectServiceImpl
;
import
org.apache.poi.ss.formula.functions.T
;
import
org.apache.poi.ss.formula.functions.T
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -25,7 +23,6 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
...
@@ -25,7 +23,6 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import
java.util.*
;
import
java.util.*
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.InstallNoticeServiceImpl
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
@@ -60,6 +57,9 @@ public class InstallNoticeController extends BaseController {
...
@@ -60,6 +57,9 @@ public class InstallNoticeController extends BaseController {
@Autowired
@Autowired
OrgServiceImpl
orgServiceImpl
;
OrgServiceImpl
orgServiceImpl
;
@Autowired
UnitLicenceServiceImpl
unitLicenceService
;
/**
/**
* 新增安装告知表
* 新增安装告知表
...
@@ -323,4 +323,26 @@ public class InstallNoticeController extends BaseController {
...
@@ -323,4 +323,26 @@ public class InstallNoticeController extends BaseController {
projectInitiationServiceImpl
.
execute
(
project
.
getInstanceId
(),
installNotice
,
option
);
projectInitiationServiceImpl
.
execute
(
project
.
getInstanceId
(),
installNotice
,
option
);
return
ResponseHelper
.
buildResponse
(
installNoticeServiceImpl
.
updateById
(
installNotice
));
return
ResponseHelper
.
buildResponse
(
installNoticeServiceImpl
.
updateById
(
installNotice
));
}
}
/**
* 新增告知时页面回显接口
* @param projectId
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/getInstallNoticeByProjectId"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"新增告知时页面回显接口"
,
notes
=
"新增告知时页面回显接口"
)
public
ResponseModel
<
JSONObject
>
getInstallNoticeByProjectId
(
Long
projectId
){
if
(
ValidationUtil
.
isEmpty
(
projectId
)){
return
null
;
}
JSONObject
jsonObject
=
new
JSONObject
();
ProjectDto
projectDto
=
projectServiceImpl
.
getDetail
(
projectId
);
Map
map
=
new
org
.
apache
.
commons
.
beanutils
.
BeanMap
(
projectDto
);
jsonObject
.
putAll
(
map
);
//项目指定的安装单位的许可信息
Long
companyId
=
projectDto
.
getInstallationUnitId
();
jsonObject
=
unitLicenceService
.
getLicenceByCompanyId
(
jsonObject
,
companyId
);
return
ResponseHelper
.
buildResponse
(
jsonObject
);
}
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/InstallationQualityController.java
View file @
904e0183
...
@@ -41,7 +41,7 @@ private InstallationQualityImpl services;
...
@@ -41,7 +41,7 @@ private InstallationQualityImpl services;
private
WeldServiceImpl
weld
;
private
WeldServiceImpl
weld
;
//查看质量监检信息
//查看质量监检信息
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/find"
)
@GetMapping
(
value
=
"/find"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"质量问题闭环管理-安装质量监检信息-质量监检信息"
,
notes
=
"质量问题闭环管理-安装质量监检信息-质量监检信息"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"质量问题闭环管理-安装质量监检信息-质量监检信息"
,
notes
=
"质量问题闭环管理-安装质量监检信息-质量监检信息"
)
public
ResponseModel
<
Page
<
PercentOfPassDto
>>
find
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
public
ResponseModel
<
Page
<
PercentOfPassDto
>>
find
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/MaterialController.java
View file @
904e0183
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONArray;
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONArray;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil
;
import
com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.MaterialCount
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.ProjectResource
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.ProjectResource
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.AttachmentMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.AttachmentMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectResourceMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectResourceMapper
;
...
@@ -240,8 +241,19 @@ public class MaterialController extends BaseController {
...
@@ -240,8 +241,19 @@ public class MaterialController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/pipeManufacturer"
)
@GetMapping
(
value
=
"/pipeManufacturer"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"管材厂家统计"
,
notes
=
"管材厂家统计"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"管材厂家统计"
,
notes
=
"管材厂家统计"
)
public
ResponseModel
<
Map
<
String
,
List
<
String
>>>
pipeManufacturerStatistics
()
{
public
ResponseModel
<
JSONObject
>
pipeManufacturerStatistics
()
{
return
ResponseHelper
.
buildResponse
(
materialServiceImpl
.
pipeManufacturerStatistics
());
List
<
MaterialCount
>
materialCounts
=
materialServiceImpl
.
pipeManufacturerStatistics
(
);
JSONObject
object
=
new
JSONObject
(
);
JSONArray
axisData
=
new
JSONArray
(
);
JSONArray
seriesData
=
new
JSONArray
(
);
materialCounts
.
forEach
((
m
)->{
axisData
.
add
(
m
.
getManufactureAddr
());
seriesData
.
add
(
m
.
getSum
());
}
);
object
.
put
(
"axisData"
,
axisData
);
object
.
put
(
"seriesData"
,
seriesData
);
return
ResponseHelper
.
buildResponse
(
object
);
}
}
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/ProjectController.java
View file @
904e0183
...
@@ -106,9 +106,14 @@ public class ProjectController extends BaseController {
...
@@ -106,9 +106,14 @@ public class ProjectController extends BaseController {
String
date
=
new
SimpleDateFormat
(
"yyyy"
).
format
(
new
Date
());
String
date
=
new
SimpleDateFormat
(
"yyyy"
).
format
(
new
Date
());
String
code
=
"XM"
+
date
+
"-"
;
String
code
=
"XM"
+
date
+
"-"
;
String
format
=
""
;
String
format
=
""
;
String
projectCode
=
""
;
LambdaQueryWrapper
<
Project
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
Project
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
orderByDesc
(
Project:
:
getCode
);
wrapper
.
orderByDesc
(
Project:
:
getCode
);
String
projectCode
=
projectServiceImpl
.
list
(
wrapper
).
iterator
().
next
().
getCode
();
List
<
Project
>
list
=
projectServiceImpl
.
list
(
wrapper
);
if
(!
ValidationUtil
.
isEmpty
(
list
)){
projectCode
=
list
.
iterator
().
next
().
getCode
();
if
(!
ValidationUtil
.
isEmpty
(
projectCode
)){
if
(!
ValidationUtil
.
isEmpty
(
projectCode
)){
...
@@ -120,7 +125,9 @@ public class ProjectController extends BaseController {
...
@@ -120,7 +125,9 @@ public class ProjectController extends BaseController {
atomicNum
.
set
(
INIT_CODE_NUM
);
atomicNum
.
set
(
INIT_CODE_NUM
);
}
}
format
=
String
.
format
(
"%04d"
,
atomicNum
.
incrementAndGet
());
format
=
String
.
format
(
"%04d"
,
atomicNum
.
incrementAndGet
());
}
}
else
{
format
=
String
.
format
(
"%04d"
,
atomicNum
.
incrementAndGet
());
}
}
return
code
+
format
;
return
code
+
format
;
}
}
...
@@ -386,5 +393,9 @@ public class ProjectController extends BaseController {
...
@@ -386,5 +393,9 @@ public class ProjectController extends BaseController {
public
ResponseModel
<
Map
>
getConstructionInfo
(){
public
ResponseModel
<
Map
>
getConstructionInfo
(){
return
ResponseHelper
.
buildResponse
(
orgServiceImpl
.
getConstructionInfo
());
return
ResponseHelper
.
buildResponse
(
orgServiceImpl
.
getConstructionInfo
());
}
}
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/ProjectResourceController.java
View file @
904e0183
...
@@ -211,9 +211,10 @@ public class ProjectResourceController extends BaseController {
...
@@ -211,9 +211,10 @@ public class ProjectResourceController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"绑定项目所用到的设备管材"
,
notes
=
"绑定项目所用到的设备管材"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"绑定项目所用到的设备管材"
,
notes
=
"绑定项目所用到的设备管材"
)
@PostMapping
(
value
=
"/saveId"
)
@PostMapping
(
value
=
"/saveId"
)
public
ResponseModel
<
ResponseModel
>
saveId
(
@RequestBody
JSONObject
jsonObject
)
throws
Exception
{
public
ResponseModel
saveId
(
@RequestBody
JSONObject
jsonObject
)
throws
Exception
{
ResponseModel
responseModel
=
projectResourceServiceImpl
.
saveIds
(
jsonObject
);
return
ResponseHelper
.
buildResponse
(
projectResourceServiceImpl
.
saveIds
(
jsonObject
))
;
return
responseModel
;
}
}
...
@@ -276,7 +277,6 @@ public class ProjectResourceController extends BaseController {
...
@@ -276,7 +277,6 @@ public class ProjectResourceController extends BaseController {
return
ResponseHelper
.
buildResponse
(
materialServiceImpl
.
groupBySeq
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
materialServiceImpl
.
groupBySeq
(
sequenceNbr
));
}
}
/**
/**
* 根据type获取当前登录所在单位下的项目中的所有资源列表
* 根据type获取当前登录所在单位下的项目中的所有资源列表
* type:welder(焊工)、equipment(设备)、material(管材)
* type:welder(焊工)、equipment(设备)、material(管材)
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/QualityProblemController.java
View file @
904e0183
...
@@ -161,7 +161,7 @@ public class QualityProblemController extends BaseController {
...
@@ -161,7 +161,7 @@ public class QualityProblemController extends BaseController {
}
}
}
}
QualityProblem
qualityProblem
=
new
QualityProblem
();
QualityProblem
Dto
qualityProblem
=
new
QualityProblemDto
();
BeanUtils
.
copyProperties
(
qualityProblemDto
,
qualityProblem
);
BeanUtils
.
copyProperties
(
qualityProblemDto
,
qualityProblem
);
return
ResponseHelper
.
buildResponse
(
qualityProblemServiceImpl
.
updateItem
(
qualityProblem
,
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
qualityProblemServiceImpl
.
updateItem
(
qualityProblem
,
sequenceNbr
));
}
}
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/RectifyMsgController.java
View file @
904e0183
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.MsgNoticeDto
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.RectifyMsgServiceImpl
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.RectifyMsgServiceImpl
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
...
@@ -117,4 +120,16 @@ public class RectifyMsgController extends BaseController {
...
@@ -117,4 +120,16 @@ public class RectifyMsgController extends BaseController {
public
ResponseModel
<
List
<
RectifyMsgDto
>>
selectForList
()
{
public
ResponseModel
<
List
<
RectifyMsgDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
rectifyMsgServiceImpl
.
queryForRectifyMsgList
());
return
ResponseHelper
.
buildResponse
(
rectifyMsgServiceImpl
.
queryForRectifyMsgList
());
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"消息提醒"
,
notes
=
"消息提醒"
)
@GetMapping
(
value
=
"/msgNotice"
)
public
ResponseModel
<
Page
<
MsgNoticeDto
>>
msgNotice
(
@RequestParam
(
value
=
"isRead"
,
required
=
false
)
Boolean
isRead
,
Long
current
,
Long
size
)
{
Page
page
=
new
Page
(
current
,
size
);
List
<
MsgNoticeDto
>
msgNoticeDtoList
=
new
ArrayList
<>();
msgNoticeDtoList
.
addAll
(
rectifyMsgServiceImpl
.
msgNotice
(
isRead
));
page
.
setRecords
(
msgNoticeDtoList
);
page
.
setTotal
(
msgNoticeDtoList
.
size
());
return
ResponseHelper
.
buildResponse
(
page
);
}
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/TaskController.java
View file @
904e0183
...
@@ -4,17 +4,26 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
...
@@ -4,17 +4,26 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.TaskTypeEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.TaskDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Task
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Task
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.TaskServiceImpl
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.TaskServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
jdk.nashorn.internal.runtime.regexp.joni.EncodingHelper
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.Arrays
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -36,6 +45,7 @@ public class TaskController {
...
@@ -36,6 +45,7 @@ public class TaskController {
* 新增监检任务表
* 新增监检任务表
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增监检任务表"
,
notes
=
"新增监检任务表"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增监检任务表"
,
notes
=
"新增监检任务表"
)
public
boolean
saveTzUgpTask
(
HttpServletRequest
request
,
@RequestBody
Task
task
){
public
boolean
saveTzUgpTask
(
HttpServletRequest
request
,
@RequestBody
Task
task
){
...
@@ -47,6 +57,7 @@ public class TaskController {
...
@@ -47,6 +57,7 @@ public class TaskController {
* @param id
* @param id
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
DELETE
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
DELETE
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据id删除"
,
notes
=
"根据id删除"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据id删除"
,
notes
=
"根据id删除"
)
public
boolean
deleteById
(
HttpServletRequest
request
,
@PathVariable
Long
id
){
public
boolean
deleteById
(
HttpServletRequest
request
,
@PathVariable
Long
id
){
...
@@ -60,6 +71,7 @@ public class TaskController {
...
@@ -60,6 +71,7 @@ public class TaskController {
* 修改监检任务表
* 修改监检任务表
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/updateById"
,
method
=
RequestMethod
.
PUT
)
@RequestMapping
(
value
=
"/updateById"
,
method
=
RequestMethod
.
PUT
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"修改监检任务表"
,
notes
=
"修改监检任务表"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"修改监检任务表"
,
notes
=
"修改监检任务表"
)
public
boolean
updateByIdTzUgpTask
(
HttpServletRequest
request
,
@RequestBody
Task
task
){
public
boolean
updateByIdTzUgpTask
(
HttpServletRequest
request
,
@RequestBody
Task
task
){
...
@@ -73,6 +85,7 @@ public class TaskController {
...
@@ -73,6 +85,7 @@ public class TaskController {
* @param id
* @param id
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询"
,
notes
=
"根据id查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询"
,
notes
=
"根据id查询"
)
public
Task
selectById
(
HttpServletRequest
request
,
@PathVariable
Long
id
){
public
Task
selectById
(
HttpServletRequest
request
,
@PathVariable
Long
id
){
...
@@ -85,6 +98,7 @@ public class TaskController {
...
@@ -85,6 +98,7 @@ public class TaskController {
* 列表分页查询
* 列表分页查询
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表分页查询"
,
notes
=
"列表分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表分页查询"
,
notes
=
"列表分页查询"
)
public
IPage
<
Task
>
listPage
(
String
pageNum
,
String
pageSize
,
public
IPage
<
Task
>
listPage
(
String
pageNum
,
String
pageSize
,
...
@@ -126,6 +140,51 @@ public class TaskController {
...
@@ -126,6 +140,51 @@ public class TaskController {
page
=
iTzUgpTaskService
.
page
(
pageBean
,
tzUgpTaskQueryWrapper
);
page
=
iTzUgpTaskService
.
page
(
pageBean
,
tzUgpTaskQueryWrapper
);
return
page
;
return
page
;
}
}
/**
* 获取当前登录人的所有任务列表
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/getTaskList"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取当前登录人的所有任务列表"
,
notes
=
"获取当前登录人的所有任务列表"
)
public
ResponseModel
<
Page
<
TaskDto
>>
getTaskList
(
@RequestParam
(
value
=
"status"
,
required
=
false
)
String
type
,
Long
current
,
Long
size
){
Page
page
=
new
Page
(
current
,
size
);
List
<
TaskDto
>
taskDtoList
=
new
ArrayList
<>();
boolean
status
=
false
;
if
(
ValidationUtil
.
isEmpty
(
type
)){
type
=
TaskTypeEnum
.
待办
.
getKey
();
status
=
true
;
}
if
(
TaskTypeEnum
.
待办
.
getKey
().
equals
(
type
)){
taskDtoList
.
addAll
(
iTzUgpTaskService
.
unDoneTask
());
if
(
status
){
type
=
TaskTypeEnum
.
已办
.
getKey
();
}
}
if
(
TaskTypeEnum
.
已办
.
getKey
().
equals
(
type
)){
taskDtoList
.
addAll
(
iTzUgpTaskService
.
doneTask
());
}
taskDtoList
=
taskDtoList
.
stream
().
sorted
(
Comparator
.
comparing
(
TaskDto:
:
getSendTime
).
reversed
()).
collect
(
Collectors
.
toList
());
page
.
setRecords
(
taskDtoList
);
page
.
setTotal
(
taskDtoList
.
size
());
return
ResponseHelper
.
buildResponse
(
page
);
}
/**
* 获取当前登录人的所有任务统计
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/getTaskCount"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取当前登录人的所有任务统计"
,
notes
=
"获取当前登录人的所有任务统计"
)
public
ResponseModel
<
Map
>
getCount
(){
Map
<
String
,
String
>
map
=
new
HashMap
();
map
.
put
(
"myTask"
,
String
.
valueOf
(
iTzUgpTaskService
.
unDoneTask
().
size
()));
map
.
put
(
"todyCompletedTask"
,
String
.
valueOf
(
iTzUgpTaskService
.
doneTask
().
size
()));
return
ResponseHelper
.
buildResponse
(
map
);
}
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/UnitLicenceController.java
0 → 100644
View file @
904e0183
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
controller
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.UnitLicence
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IUnitLicenceService
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.servlet.http.HttpServletRequest
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.util.Arrays
;
/**
* 单位许可信息表
*
* @author duanwei
* @date 2022-11-30
*/
@RestController
@Api
(
tags
=
"单位许可信息表Api"
)
@RequestMapping
(
value
=
"/tz-ugp-unit-licence"
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
class
UnitLicenceController
{
@Autowired
IUnitLicenceService
iUnitLicenceService
;
/**
* 新增单位许可信息表
* @return
*/
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增单位许可信息表"
,
notes
=
"新增单位许可信息表"
)
public
boolean
saveTzUgpUnitLicence
(
HttpServletRequest
request
,
@RequestBody
UnitLicence
unitLicence
){
return
iUnitLicenceService
.
save
(
unitLicence
);
}
/**
* 根据id删除
* @param id
* @return
*/
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
DELETE
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据id删除"
,
notes
=
"根据id删除"
)
public
boolean
deleteById
(
HttpServletRequest
request
,
@PathVariable
Long
id
){
return
iUnitLicenceService
.
removeById
(
id
);
}
/**
* 修改单位许可信息表
* @return
*/
@RequestMapping
(
value
=
"/updateById"
,
method
=
RequestMethod
.
PUT
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"修改单位许可信息表"
,
notes
=
"修改单位许可信息表"
)
public
boolean
updateByIdTzUgpUnitLicence
(
HttpServletRequest
request
,
@RequestBody
UnitLicence
unitLicence
){
return
iUnitLicenceService
.
updateById
(
unitLicence
);
}
/**
* 根据id查询
* @param id
* @return
*/
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询"
,
notes
=
"根据id查询"
)
public
UnitLicence
selectById
(
HttpServletRequest
request
,
@PathVariable
Long
id
){
return
iUnitLicenceService
.
getById
(
id
);
}
/**
* 列表分页查询
* @return
*/
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表分页查询"
,
notes
=
"列表分页查询"
)
public
IPage
<
UnitLicence
>
listPage
(
String
pageNum
,
String
pageSize
,
UnitLicence
unitLicence
){
Page
<
UnitLicence
>
pageBean
;
QueryWrapper
<
UnitLicence
>
tzUgpUnitLicenceQueryWrapper
=
new
QueryWrapper
<>();
Class
<?
extends
UnitLicence
>
aClass
=
unitLicence
.
getClass
();
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
forEach
(
field
->
{
try
{
field
.
setAccessible
(
true
);
Object
o
=
field
.
get
(
unitLicence
);
if
(
o
!=
null
)
{
Class
<?>
type
=
field
.
getType
();
String
name
=
NameUtils
.
camel2Underline
(
field
.
getName
());
if
(
type
.
equals
(
Integer
.
class
))
{
Integer
fileValue
=
(
Integer
)
field
.
get
(
unitLicence
);
tzUgpUnitLicenceQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
type
.
equals
(
Long
.
class
))
{
Long
fileValue
=
(
Long
)
field
.
get
(
unitLicence
);
tzUgpUnitLicenceQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
type
.
equals
(
String
.
class
))
{
String
fileValue
=
(
String
)
field
.
get
(
unitLicence
);
tzUgpUnitLicenceQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
{
String
fileValue
=
(
String
)
field
.
get
(
unitLicence
);
tzUgpUnitLicenceQueryWrapper
.
eq
(
name
,
fileValue
);
}
}
}
catch
(
Exception
e
)
{
}
});
IPage
<
UnitLicence
>
page
;
if
(
StringUtils
.
isBlank
(
pageNum
)
||
StringUtils
.
isBlank
(
pageSize
))
{
pageBean
=
new
Page
<>(
0
,
Long
.
MAX_VALUE
);
}
else
{
pageBean
=
new
Page
<>(
Integer
.
parseInt
(
pageNum
),
Integer
.
parseInt
(
pageSize
));
}
page
=
iUnitLicenceService
.
page
(
pageBean
,
tzUgpUnitLicenceQueryWrapper
);
return
page
;
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/UnitPersonController.java
0 → 100644
View file @
904e0183
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
controller
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.UnitPersonServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
@RestController
@Api
(
tags
=
"企业信息表"
)
@RequestMapping
(
value
=
"/UnitPerson"
)
public
class
UnitPersonController
extends
BaseController
{
@Autowired
UnitPersonServiceImpl
unitPersonServiceimpl
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/unitInformation"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取管辖单位"
,
notes
=
"获取管辖单位"
)
public
ResponseModel
<
String
>
selectUnit
(){
return
ResponseHelper
.
buildResponse
(
unitPersonServiceimpl
.
selectUnit
());
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/VerifyController.java
View file @
904e0183
...
@@ -2,6 +2,8 @@ package com.yeejoin.amos.boot.module.ugp.biz.controller;
...
@@ -2,6 +2,8 @@ package com.yeejoin.amos.boot.module.ugp.biz.controller;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.serializer.SerializerFeature
;
import
com.google.common.collect.Lists
;
import
com.sun.org.apache.bcel.internal.generic.NEW
;
import
com.sun.org.apache.bcel.internal.generic.NEW
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.StageEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.StageEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.*
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.*
;
...
@@ -13,6 +15,7 @@ import io.swagger.annotations.Api;
...
@@ -13,6 +15,7 @@ import io.swagger.annotations.Api;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -303,14 +306,175 @@ public class VerifyController extends BaseController {
...
@@ -303,14 +306,175 @@ public class VerifyController extends BaseController {
* @param
* @param
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/lookWeld"
)
@GetMapping
(
value
=
"/lookWeld"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"耐压所属焊口查看"
,
notes
=
"耐压所属焊口查看"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"耐压所属焊口查看"
,
notes
=
"耐压所属焊口查看"
)
public
ResponseModel
<
Page
<
Object
>>
lookWeld
(
@RequestParam
Long
sequenceNbr
)
{
public
ResponseModel
<
Page
<
TableDto
>>
lookWeld
(
@RequestParam
Long
sequenceNbr
)
{
Page
<
Object
>
objectPage
=
new
Page
<>(
);
JSONArray
dataList
=
verifyServiceImpl
.
getWeldLook
(
sequenceNbr
);
JSONArray
dataList
=
verifyServiceImpl
.
getWeldLook
(
sequenceNbr
);
objectPage
.
setRecords
(
dataList
);
//下面这些为了适应平台页面格式(并非逻辑)
return
ResponseHelper
.
buildResponse
(
objectPage
);
String
js
=
JSONObject
.
toJSONString
(
dataList
,
SerializerFeature
.
WriteClassName
);
List
<
JSONObject
>
list
=
JSONObject
.
parseArray
(
js
,
JSONObject
.
class
);
TableDto
tableDto
=
new
TableDto
(
);
DataGridMock
dataGridMock
=
new
DataGridMock
(
);
dataGridMock
.
setDataList
(
list
);
dataGridMock
.
setTotal
(
list
.
size
());
//dataGridMock.setTotalPage(1);
//dataGridMock.setPageSize(10);
//dataGridMock.setCurrent(1);
//dataGridMock.setPagination(false);
ColModel
colModel1
=
new
ColModel
(
);
colModel1
.
setFid
(
"code"
);
colModel1
.
setDataIndex
(
"code"
);
colModel1
.
setName
(
"焊口编号"
);
colModel1
.
setTitle
(
"焊口编号"
);
colModel1
.
setType
(
"dataGrid"
);
colModel1
.
setKey
(
"code"
);
ColModel
colModel2
=
new
ColModel
(
);
colModel2
.
setFid
(
"location"
);
colModel2
.
setDataIndex
(
"location"
);
colModel2
.
setName
(
"焊接定位信息"
);
colModel2
.
setTitle
(
"焊接定位信息"
);
colModel2
.
setType
(
"dataGrid"
);
colModel2
.
setKey
(
"location"
);
ColModel
colModel3
=
new
ColModel
(
);
colModel3
.
setFid
(
"peopleStatus"
);
colModel3
.
setDataIndex
(
"peopleStatus"
);
colModel3
.
setName
(
"焊接人员核验"
);
colModel3
.
setTitle
(
"焊接人员核验"
);
colModel3
.
setType
(
"dataGrid"
);
colModel3
.
setKey
(
"peopleStatus"
);
ColModel
colModel4
=
new
ColModel
(
);
colModel4
.
setFid
(
"equipmentStatus"
);
colModel4
.
setDataIndex
(
"equipmentStatus"
);
colModel4
.
setName
(
"焊机核验"
);
colModel4
.
setTitle
(
"焊机核验"
);
colModel4
.
setType
(
"dataGrid"
);
colModel4
.
setKey
(
"equipmentStatus"
);
ColModel
colModel5
=
new
ColModel
(
);
colModel5
.
setFid
(
"materialStatus"
);
colModel5
.
setDataIndex
(
"materialStatus"
);
colModel5
.
setName
(
"材料核验"
);
colModel5
.
setTitle
(
"材料核验"
);
colModel5
.
setType
(
"dataGrid"
);
colModel5
.
setKey
(
"materialStatus"
);
ColModel
colModel6
=
new
ColModel
(
);
colModel6
.
setFid
(
"craftStatus"
);
colModel6
.
setDataIndex
(
"craftStatus"
);
colModel6
.
setName
(
"工艺过程核验"
);
colModel6
.
setTitle
(
"工艺过程核验"
);
colModel6
.
setType
(
"dataGrid"
);
colModel6
.
setKey
(
"craftStatus"
);
ArrayList
<
ColModel
>
list1
=
Lists
.
newArrayList
(
);
list1
.
add
(
colModel1
);
list1
.
add
(
colModel2
);
list1
.
add
(
colModel3
);
list1
.
add
(
colModel4
);
list1
.
add
(
colModel5
);
list1
.
add
(
colModel6
);
tableDto
.
setDataGridMock
(
dataGridMock
);
tableDto
.
setColModel
(
list1
);
ArrayList
<
TableDto
>
list2
=
Lists
.
newArrayList
(
);
list2
.
add
(
tableDto
);
Page
<
TableDto
>
objectPage1
=
new
Page
<>(
);
objectPage1
.
setRecords
(
list2
);
return
ResponseHelper
.
buildResponse
(
objectPage1
);
}
/**焊口定位详情查看
* */
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/calibration"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"焊口定位详情查看"
,
notes
=
"焊口定位详情查看"
)
public
ResponseModel
<
Page
<
TableDto
>>
calibration
(
@RequestParam
Long
sequenceNbr
)
{
JSONArray
dataList
=
verifyServiceImpl
.
calibration
(
sequenceNbr
);
String
js
=
JSONObject
.
toJSONString
(
dataList
,
SerializerFeature
.
WriteClassName
);
List
<
JSONObject
>
list
=
JSONObject
.
parseArray
(
js
,
JSONObject
.
class
);
TableDto
tableDto
=
new
TableDto
(
);
DataGridMock
dataGridMock
=
new
DataGridMock
(
);
dataGridMock
.
setDataList
(
list
);
dataGridMock
.
setTotal
(
list
.
size
());
ColModel
colModel1
=
new
ColModel
(
);
colModel1
.
setFid
(
"code"
);
colModel1
.
setDataIndex
(
"code"
);
colModel1
.
setName
(
"焊口编号"
);
colModel1
.
setTitle
(
"焊口编号"
);
colModel1
.
setType
(
"dataGrid"
);
colModel1
.
setKey
(
"code"
);
ColModel
colModel2
=
new
ColModel
(
);
colModel2
.
setFid
(
"craftLocation"
);
colModel2
.
setDataIndex
(
"craftLocation"
);
colModel2
.
setName
(
"焊接定位信息"
);
colModel2
.
setTitle
(
"焊接定位信息"
);
colModel2
.
setType
(
"dataGrid"
);
colModel2
.
setKey
(
"craftLocation"
);
ColModel
colModel3
=
new
ColModel
(
);
colModel3
.
setFid
(
"layLocation"
);
colModel3
.
setDataIndex
(
"layLocation"
);
colModel3
.
setName
(
"焊口敷设定位信息"
);
colModel3
.
setTitle
(
"焊口敷设定位信息"
);
colModel3
.
setType
(
"dataGrid"
);
colModel3
.
setKey
(
"layLocation"
);
ColModel
colModel4
=
new
ColModel
(
);
colModel4
.
setFid
(
"offset"
);
colModel4
.
setDataIndex
(
"offset"
);
colModel4
.
setName
(
"焊接敷设位置偏差(m)"
);
colModel4
.
setTitle
(
"焊接敷设位置偏差(m)"
);
colModel4
.
setType
(
"dataGrid"
);
colModel4
.
setKey
(
"offset"
);
ColModel
colModel5
=
new
ColModel
(
);
colModel5
.
setFid
(
"verification"
);
colModel5
.
setDataIndex
(
"verification"
);
colModel5
.
setName
(
"核验信息"
);
colModel5
.
setTitle
(
"核验信息"
);
colModel5
.
setType
(
"dataGrid"
);
colModel5
.
setKey
(
"verification"
);
ArrayList
<
ColModel
>
list1
=
Lists
.
newArrayList
(
);
list1
.
add
(
colModel1
);
list1
.
add
(
colModel2
);
list1
.
add
(
colModel3
);
list1
.
add
(
colModel4
);
list1
.
add
(
colModel5
);
tableDto
.
setDataGridMock
(
dataGridMock
);
tableDto
.
setColModel
(
list1
);
ArrayList
<
TableDto
>
list2
=
Lists
.
newArrayList
(
);
list2
.
add
(
tableDto
);
Page
<
TableDto
>
objectPage1
=
new
Page
<>(
);
objectPage1
.
setRecords
(
list2
);
return
ResponseHelper
.
buildResponse
(
objectPage1
);
}
/**
*
焊口修复
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"焊口修复"
,
notes
=
"焊口修复"
)
@GetMapping
(
value
=
"/repair"
)
public
ResponseModel
<
Page
<
WeldDto
>>
repair
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
WeldDto
weldDto
)
{
return
ResponseHelper
.
buildResponse
(
verifyServiceImpl
.
repair
(
current
,
size
,
weldDto
));
}
/**
*
焊口修复弹窗
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"焊口修复弹窗"
,
notes
=
"焊口修复弹窗"
)
@GetMapping
(
value
=
"/fixedPopovers"
)
public
ResponseModel
<
Page
<
TableDto
>>
fixedPopovers
(
@RequestParam
String
code
)
{
return
ResponseHelper
.
buildResponse
(
verifyServiceImpl
.
fixedPopovers
(
code
));
}
}
}
}
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/WeldController.java
View file @
904e0183
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.ugp.biz.controller;
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.ugp.biz.controller;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.WeldVerifyDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.ProjectResource
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.ProjectResource
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Weld
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Weld
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectResourceMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectResourceMapper
;
...
@@ -169,4 +170,48 @@ public class WeldController extends BaseController {
...
@@ -169,4 +170,48 @@ public class WeldController extends BaseController {
return
ResponseHelper
.
buildResponse
(
weldServiceImpl
.
getCode
(
sequenceNbr
,
number
));
return
ResponseHelper
.
buildResponse
(
weldServiceImpl
.
getCode
(
sequenceNbr
,
number
));
}
}
/**
* 通过项目id获取焊口编码
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查看焊口编码"
,
notes
=
"查看焊口编码"
)
@GetMapping
(
value
=
"/lookCode"
)
public
ResponseModel
<
IPage
<
Weld
>>
lookCode
(
long
current
,
long
size
,
String
projectId
)
{
return
ResponseHelper
.
buildResponse
(
weldServiceImpl
.
lookCode
(
current
,
size
,
projectId
));
}
/**
* 通过项目id获取焊口智能监验信息
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"焊口智能监验信息"
,
notes
=
"焊口智能监验信息"
)
@GetMapping
(
value
=
"/selectStatus"
)
public
ResponseModel
<
WeldVerifyDto
>
selectStage
(
Long
projectId
,
String
code
)
{
return
ResponseHelper
.
buildResponse
(
weldServiceImpl
.
selectStatus
(
projectId
,
code
));
}
/**
* 检验责任单位及监检状态
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"检验责任单位"
,
notes
=
"检验责任单位"
)
@GetMapping
(
value
=
"/selectDept"
)
public
ResponseModel
<
WeldDto
>
selectDept
(
String
projectId
){
return
ResponseHelper
.
buildResponse
(
weldServiceImpl
.
selectDept
(
projectId
));
}
/**
* 通过焊口码生成二维码接口
* @return 二维码url地址
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/getWeldQRCode"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"通过焊口码生成二维码接口"
,
notes
=
"通过焊口码生成二维码接口"
)
public
ResponseModel
<
IPage
>
getWeldQRCode
(
String
HKCode
){
return
ResponseHelper
.
buildResponse
(
weldServiceImpl
.
getWeldQRCode
(
HKCode
));
}
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/WelderController.java
View file @
904e0183
...
@@ -173,14 +173,19 @@ public class WelderController extends BaseController {
...
@@ -173,14 +173,19 @@ public class WelderController extends BaseController {
IPage
companyWelder
=
orgServiceImpl
.
getCompanyWelder
(
page
);
IPage
companyWelder
=
orgServiceImpl
.
getCompanyWelder
(
page
);
List
<
Map
>
welderRecords
=
companyWelder
.
getRecords
();
List
<
Map
>
welderRecords
=
companyWelder
.
getRecords
();
try
{
//模糊查询
//模糊查询
if
(
name
!=
null
||
idNumber
!=
null
||
licensedProject
!=
null
){
if
(
name
!=
null
||
idNumber
!=
null
||
licensedProject
!=
null
){
if
(
name
!=
null
)
{
welderRecords
=
welderRecords
.
stream
().
filter
(
n
->
((
String
)
n
.
get
(
"name"
)).
indexOf
(
name
)>-
1
).
collect
(
Collectors
.
toList
());}
if
(
name
!=
null
)
{
welderRecords
=
welderRecords
.
stream
().
filter
(
n
->
((
String
)
n
.
get
(
"name"
)).
indexOf
(
name
)>-
1
).
collect
(
Collectors
.
toList
());}
if
(
idNumber
!=
null
)
{
welderRecords
=
welderRecords
.
stream
().
filter
(
n
->
((
String
)
n
.
get
(
"idNumber"
)).
indexOf
(
idNumber
)>-
1
).
collect
(
Collectors
.
toList
());}
if
(
idNumber
!=
null
)
{
welderRecords
=
welderRecords
.
stream
().
filter
(
n
->
((
String
)
n
.
get
(
"idNumber"
)).
indexOf
(
idNumber
)>-
1
).
collect
(
Collectors
.
toList
());}
if
(
licensedProject
!=
null
)
{
welderRecords
=
welderRecords
.
stream
().
filter
(
n
->
((
String
)
n
.
get
(
"licensedProject"
)).
indexOf
(
licensedProject
)>-
1
).
collect
(
Collectors
.
toList
());}
if
(
licensedProject
!=
null
)
{
welderRecords
=
welderRecords
.
stream
().
filter
(
n
->
((
String
)
n
.
get
(
"licensedProject"
)).
indexOf
(
licensedProject
)>-
1
).
collect
(
Collectors
.
toList
());}
}
}
catch
(
Exception
e
){
e
.
getStackTrace
();
System
.
out
.
println
(
"数据库数据出错"
);
}
}
Page
records
=
page
.
setRecords
(
welderRecords
);
Page
records
=
page
.
setRecords
(
welderRecords
);
return
ResponseHelper
.
buildResponse
(
records
);
return
ResponseHelper
.
buildResponse
(
records
);
}
}
...
@@ -258,7 +263,7 @@ public class WelderController extends BaseController {
...
@@ -258,7 +263,7 @@ public class WelderController extends BaseController {
* 焊工持证项目统计
* 焊工持证项目统计
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"焊工持证项目统计"
,
notes
=
"焊工持证项目统计"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"焊工持证项目统计"
,
notes
=
"焊工持证项目统计"
)
@GetMapping
(
value
=
"/welderStatistics"
)
@GetMapping
(
value
=
"/welderStatistics"
)
public
ResponseModel
<
List
<
Map
>>
welderStatistics
()
{
public
ResponseModel
<
List
<
Map
>>
welderStatistics
()
{
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/CompanyServiceImpl.java
View file @
904e0183
...
@@ -2,11 +2,15 @@ package com.yeejoin.amos.boot.module.ugp.biz.service.impl;
...
@@ -2,11 +2,15 @@ package com.yeejoin.amos.boot.module.ugp.biz.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.OrgEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.OrgEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Company
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Company
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.SuperviseRule
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.CompanyMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.CompanyMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.SuperviseRuleMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.service.ICompanyService
;
import
com.yeejoin.amos.boot.module.ugp.api.service.ICompanyService
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.CompanyDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.CompanyDto
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
...
@@ -51,6 +55,8 @@ public class CompanyServiceImpl extends BaseService<CompanyDto, Company, Company
...
@@ -51,6 +55,8 @@ public class CompanyServiceImpl extends BaseService<CompanyDto, Company, Company
@Autowired
@Autowired
OrgServiceImpl
orgServiceImpl
;
OrgServiceImpl
orgServiceImpl
;
@Autowired
private
SuperviseRuleMapper
superviseRuleMapper
;
/**
/**
* 列表查询 示例
* 列表查询 示例
...
@@ -63,12 +69,72 @@ public class CompanyServiceImpl extends BaseService<CompanyDto, Company, Company
...
@@ -63,12 +69,72 @@ public class CompanyServiceImpl extends BaseService<CompanyDto, Company, Company
/**
/**
* 分页查询+筛选
* 分页查询+筛选
*/
*/
private
static
final
String
ZERO
=
"0"
;
private
static
final
String
ONE
=
"1"
;
private
static
final
String
UNREVIEWED
=
"未审核"
;
private
static
final
String
INSANITY
=
"已审核"
;
@Override
@Override
@BusinessIdentify
public
IPage
<
CompanyDto
>
queryCompanyPage
(
int
current
,
int
size
,
Company
company
)
{
public
IPage
<
CompanyDto
>
queryCompanyPage
(
int
current
,
int
size
,
Company
company
)
{
IPage
<
Company
Dto
>
page
=
new
Page
<>();
IPage
<
Company
>
page
=
new
Page
<>();
page
.
setSize
(
size
);
page
.
setSize
(
size
);
page
.
setCurrent
(
current
);
page
.
setCurrent
(
current
);
return
companyMapper
.
queryCompanyPage
(
page
,
company
);
IPage
<
CompanyDto
>
page1
=
new
Page
<>();
page1
.
setSize
(
size
);
page1
.
setCurrent
(
current
);
ArrayList
<
CompanyDto
>
list
=
Lists
.
newArrayList
(
);
String
companyType
=
orgService
.
getReginParams
(
).
getBusinessInfo
(
).
getCompanyType
(
);
Long
companySequenceNbr
=
orgService
.
getReginParams
(
).
getBusinessInfo
(
).
getCompanySequenceNbr
(
);
LambdaQueryWrapper
<
SuperviseRule
>
wrapper
=
new
LambdaQueryWrapper
<>(
);
if
(!
ValidationUtil
.
isEmpty
(
companyType
))
{
if
(
OrgEnum
.
监察部门
.
getKey
().
equals
(
companyType
))
{
wrapper
.
eq
(
SuperviseRule:
:
getSuperviseDeptId
,
companySequenceNbr
);
List
<
SuperviseRule
>
superviseRules
=
superviseRuleMapper
.
selectList
(
wrapper
);
superviseRules
.
forEach
(
s
->{
LambdaQueryWrapper
<
Company
>
wrapper1
=
new
LambdaQueryWrapper
<>(
);
wrapper1
.
eq
(
Company:
:
getRegionCode
,
s
.
getAdminRegionCode
())
.
like
(!
ValidationUtil
.
isEmpty
(
company
.
getName
()),
Company:
:
getName
,
company
.
getName
());
IPage
<
Company
>
companyIPage
=
companyMapper
.
selectPage
(
page
,
wrapper1
);
companyIPage
.
getRecords
().
forEach
(
company1
->
{
CompanyDto
companyDto
=
new
CompanyDto
(
);
BeanUtils
.
copyProperties
(
company1
,
companyDto
);
companyDto
.
setType
(
OrgEnum
.
监察部门
.
getName
());
if
(
ZERO
.
equals
(
company1
.
getApproved
()))
{
companyDto
.
setApproved
(
UNREVIEWED
);
}
else
if
(
ONE
.
equals
(
company1
.
getApproved
()))
{
companyDto
.
setApproved
(
INSANITY
);
}
list
.
add
(
companyDto
);
});
});
page1
.
setRecords
(
list
);
return
page1
;
}
else
if
(
OrgEnum
.
监检机构
.
getKey
().
equals
(
companyType
)){
wrapper
.
eq
(
SuperviseRule:
:
getInspectionUnitId
,
companySequenceNbr
);
List
<
SuperviseRule
>
superviseRules
=
superviseRuleMapper
.
selectList
(
wrapper
);
superviseRules
.
forEach
(
s
->{
LambdaQueryWrapper
<
Company
>
wrapper1
=
new
LambdaQueryWrapper
<>(
);
wrapper1
.
eq
(
Company:
:
getRegionCode
,
s
.
getAdminRegionCode
())
.
like
(!
ValidationUtil
.
isEmpty
(
company
.
getName
()),
Company:
:
getName
,
company
.
getName
());
IPage
<
Company
>
companyIPage
=
companyMapper
.
selectPage
(
page
,
wrapper1
);
companyIPage
.
getRecords
().
forEach
(
company1
->
{
CompanyDto
companyDto
=
new
CompanyDto
(
);
BeanUtils
.
copyProperties
(
company1
,
companyDto
);
companyDto
.
setType
(
OrgEnum
.
监检机构
.
getName
());
if
(
ZERO
.
equals
(
company1
.
getApproved
()))
{
companyDto
.
setApproved
(
UNREVIEWED
);
}
else
if
(
ONE
.
equals
(
company1
.
getApproved
()))
{
companyDto
.
setApproved
(
INSANITY
);
}
list
.
add
(
companyDto
);
});
});
page1
.
setRecords
(
list
);
return
page1
;
}
}
return
page1
;
}
}
/**
/**
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/EquipmentServiceImpl.java
View file @
904e0183
...
@@ -8,11 +8,14 @@ import com.alibaba.fastjson.JSONArray;
...
@@ -8,11 +8,14 @@ import com.alibaba.fastjson.JSONArray;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.OrgEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.OrgEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.*
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.*
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.CompanyMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.EquipmentMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.EquipmentMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.SuperviseRuleMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IEquipmentService
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IEquipmentService
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.EquipmentDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.EquipmentDto
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
...
@@ -44,11 +47,17 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
...
@@ -44,11 +47,17 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
OrgServiceImpl
orgService
;
OrgServiceImpl
orgService
;
@Autowired
@Autowired
SuperviseRuleMapper
superviseRuleMapper
;
@Autowired
SuperviseRuleServiceImpl
superviseRuleService
;
SuperviseRuleServiceImpl
superviseRuleService
;
@Autowired
@Autowired
CompanyServiceImpl
companyService
;
CompanyServiceImpl
companyService
;
@Autowired
CompanyMapper
companyMapper
;
/**
/**
* 分页查询
* 分页查询
...
@@ -239,8 +248,41 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
...
@@ -239,8 +248,41 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
//设备管理->信息统计
//设备管理->信息统计
@BusinessIdentify
public
List
<
Map
<
String
,
Long
>>
informationStatistics
()
{
public
List
<
Map
<
String
,
Long
>>
informationStatistics
()
{
Set
<
String
>
companyIds
=
new
HashSet
<>();
Long
companySequenceNbr
=
orgService
.
getReginParams
().
getBusinessInfo
().
getCompanySequenceNbr
();
Long
companySequenceNbr
=
orgService
.
getReginParams
().
getBusinessInfo
().
getCompanySequenceNbr
();
return
equipmentMapper
.
informationStatistics
(
companySequenceNbr
);
String
companyKey
=
companyMapper
.
selectById
(
companySequenceNbr
).
getType
();
if
(
companyKey
.
equals
(
OrgEnum
.
安装单位
.
getKey
())){
companyIds
.
add
(
String
.
valueOf
(
companySequenceNbr
));
}
else
if
(
companyKey
.
equals
(
OrgEnum
.
监检机构
.
getKey
()))
{
LambdaQueryWrapper
<
SuperviseRule
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
SuperviseRule:
:
getInspectionUnitId
,
companySequenceNbr
);
List
<
SuperviseRule
>
inspectionLists
=
superviseRuleMapper
.
selectList
(
wrapper
);
for
(
SuperviseRule
inspectionList
:
inspectionLists
){
LambdaQueryWrapper
<
Company
>
wrapper1
=
new
LambdaQueryWrapper
<>();
wrapper1
.
eq
(
Company:
:
getRegionCode
,
inspectionList
.
getAdminRegionCode
());
List
<
Company
>
codeLists
=
companyMapper
.
selectList
(
wrapper1
);
for
(
Company
codeList
:
codeLists
){
companyIds
.
add
(
String
.
valueOf
(
codeList
.
getSequenceNbr
()));
}
}
}
else
if
(
companyKey
.
equals
(
OrgEnum
.
监察部门
.
getKey
()))
{
LambdaQueryWrapper
<
SuperviseRule
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
SuperviseRule:
:
getSuperviseDeptId
,
companySequenceNbr
);
List
<
SuperviseRule
>
superviseLists
=
superviseRuleMapper
.
selectList
(
wrapper
);
for
(
SuperviseRule
inspectionList
:
superviseLists
)
{
LambdaQueryWrapper
<
Company
>
wrapper1
=
new
LambdaQueryWrapper
<>();
wrapper1
.
eq
(
Company:
:
getRegionCode
,
inspectionList
.
getAdminRegionCode
());
List
<
Company
>
codeLists
=
companyMapper
.
selectList
(
wrapper1
);
for
(
Company
codeList
:
codeLists
)
{
companyIds
.
add
(
String
.
valueOf
(
codeList
.
getSequenceNbr
()));
}
}
}
return
equipmentMapper
.
informationStatistics
(
companyIds
);
}
}
}
}
\ No newline at end of file
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/InstallNoticeServiceImpl.java
View file @
904e0183
...
@@ -5,29 +5,40 @@ import com.alibaba.fastjson.JSONArray;
...
@@ -5,29 +5,40 @@ import com.alibaba.fastjson.JSONArray;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.yeejoin.amos.boot.biz.common.utils.QRCodeUtil
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.NoticeStatusEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.NoticeStatusEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.ProjectDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.ProjectDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.InstallNotice
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.InstallNotice
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Project
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Project
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.SuperviseRule
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.SuperviseRule
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.UnitLicence
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.InstallNoticeMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.InstallNoticeMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IInstallNoticeService
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IInstallNoticeService
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeDto
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
org.apache.http.entity.ContentType
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.mock.web.MockMultipartFile
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.io.ByteArrayInputStream
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.sql.Wrapper
;
import
java.sql.Wrapper
;
import
java.util.*
;
import
java.util.*
;
...
@@ -52,6 +63,8 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta
...
@@ -52,6 +63,8 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta
ProjectResourceServiceImpl
projectResourceServiceImpl
;
ProjectResourceServiceImpl
projectResourceServiceImpl
;
@Autowired
@Autowired
SuperviseRuleServiceImpl
superviseRuleServiceImpl
;
SuperviseRuleServiceImpl
superviseRuleServiceImpl
;
@Autowired
UnitLicenceServiceImpl
unitLicenceService
;
/**
/**
* 分页查询
* 分页查询
*/
*/
...
@@ -127,9 +140,9 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta
...
@@ -127,9 +140,9 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta
installNoticeDto
.
setOrganizationCode
(
orgServiceImpl
.
getOrgUsr
().
getBizOrgCode
());
installNoticeDto
.
setOrganizationCode
(
orgServiceImpl
.
getOrgUsr
().
getBizOrgCode
());
installNoticeDto
.
setLicenseNum
(
object
.
getString
(
"licenseNum"
));
installNoticeDto
.
setLicenseNum
(
object
.
getString
(
"licenseNum"
));
installNoticeDto
.
setLicenseCompany
(
object
.
getString
(
"licenseCompany"
));
installNoticeDto
.
setLicenseCompany
(
object
.
getString
(
"licenseCompany"
));
final
JSONArray
licenseAttch
=
object
.
getJSONArray
(
"licenseAttch"
);
//
final JSONArray licenseAttch = object.getJSONArray("licenseAttch");
final
JSONArray
contractAttch
=
object
.
getJSONArray
(
"contractAttch"
);
final
JSONArray
contractAttch
=
object
.
getJSONArray
(
"contractAttch"
);
installNoticeDto
.
setLicenseAttch
(
JSON
.
toJSONString
(
licenseAttch
));
//
installNoticeDto.setLicenseAttch(JSON.toJSONString(licenseAttch));
installNoticeDto
.
setContractAttch
(
JSON
.
toJSONString
(
contractAttch
));
installNoticeDto
.
setContractAttch
(
JSON
.
toJSONString
(
contractAttch
));
installNoticeDto
.
setOrganizationCode
(
orgServiceImpl
.
getOrgUsr
().
getBizOrgCode
());
installNoticeDto
.
setOrganizationCode
(
orgServiceImpl
.
getOrgUsr
().
getBizOrgCode
());
...
@@ -160,10 +173,15 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta
...
@@ -160,10 +173,15 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta
public
JSONObject
selectOneBySeq
(
Long
sequenceNbr
)
{
public
JSONObject
selectOneBySeq
(
Long
sequenceNbr
)
{
JSONObject
jsonObject
=
new
JSONObject
();
JSONObject
jsonObject
=
new
JSONObject
();
final
InstallNoticeDto
installNoticeDto
=
selectOneById
(
sequenceNbr
);
final
InstallNoticeDto
installNoticeDto
=
selectOneById
(
sequenceNbr
);
//项目信息
final
ProjectDto
projectDto
=
projectServiceImpl
.
queryBySeq
(
installNoticeDto
.
getProjectId
());
final
ProjectDto
projectDto
=
projectServiceImpl
.
queryBySeq
(
installNoticeDto
.
getProjectId
());
SuperviseRule
superviseRule
=
superviseRuleServiceImpl
.
getOne
(
new
LambdaQueryWrapper
<
SuperviseRule
>().
eq
(
SuperviseRule:
:
getAdminRegionCode
,
projectDto
.
getInstallRegionCode
()));
SuperviseRule
superviseRule
=
superviseRuleServiceImpl
.
getOne
(
new
LambdaQueryWrapper
<
SuperviseRule
>().
eq
(
SuperviseRule:
:
getAdminRegionCode
,
projectDto
.
getInstallRegionCode
()));
Map
map
=
new
org
.
apache
.
commons
.
beanutils
.
BeanMap
(
projectDto
);
Map
map
=
new
org
.
apache
.
commons
.
beanutils
.
BeanMap
(
projectDto
);
jsonObject
.
putAll
(
map
);
jsonObject
.
putAll
(
map
);
//项目指定的安装单位的许可信息
Long
companyId
=
projectDto
.
getInstallationUnitId
();
jsonObject
=
unitLicenceService
.
getLicenceByCompanyId
(
jsonObject
,
companyId
);
if
(!
ValidationUtil
.
isEmpty
(
superviseRule
)){
if
(!
ValidationUtil
.
isEmpty
(
superviseRule
)){
jsonObject
.
put
(
"inspectionUnit"
,
orgServiceImpl
.
getdetialInfo
(
String
.
valueOf
(
superviseRule
.
getInspectionUnitId
())).
get
(
"name"
));
jsonObject
.
put
(
"inspectionUnit"
,
orgServiceImpl
.
getdetialInfo
(
String
.
valueOf
(
superviseRule
.
getInspectionUnitId
())).
get
(
"name"
));
jsonObject
.
put
(
"superviseDept"
,
orgServiceImpl
.
getdetialInfo
(
String
.
valueOf
(
superviseRule
.
getSuperviseDeptId
())).
get
(
"name"
));
jsonObject
.
put
(
"superviseDept"
,
orgServiceImpl
.
getdetialInfo
(
String
.
valueOf
(
superviseRule
.
getSuperviseDeptId
())).
get
(
"name"
));
...
@@ -172,7 +190,7 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta
...
@@ -172,7 +190,7 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta
// jsonObject.put("installRegion",projectDto.getInstallRegion());
// jsonObject.put("installRegion",projectDto.getInstallRegion());
jsonObject
.
put
(
"licenseNum"
,
installNoticeDto
.
getLicenseNum
());
jsonObject
.
put
(
"licenseNum"
,
installNoticeDto
.
getLicenseNum
());
jsonObject
.
put
(
"licenseCompany"
,
installNoticeDto
.
getLicenseCompany
());
jsonObject
.
put
(
"licenseCompany"
,
installNoticeDto
.
getLicenseCompany
());
jsonObject
.
put
(
"licenseAttch"
,
JSON
.
parseArray
(
installNoticeDto
.
getLicenseAttch
()));
//
jsonObject.put("licenseAttch",JSON.parseArray(installNoticeDto.getLicenseAttch()));
jsonObject
.
put
(
"contractAttch"
,
JSON
.
parseArray
(
installNoticeDto
.
getContractAttch
()));
jsonObject
.
put
(
"contractAttch"
,
JSON
.
parseArray
(
installNoticeDto
.
getContractAttch
()));
jsonObject
.
put
(
"installPri"
,
installNoticeDto
.
getInstallPri
());
jsonObject
.
put
(
"installPri"
,
installNoticeDto
.
getInstallPri
());
jsonObject
.
put
(
"projectId"
,
map
.
get
(
"sequenceNbr"
));
jsonObject
.
put
(
"projectId"
,
map
.
get
(
"sequenceNbr"
));
...
...
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 @
904e0183
...
@@ -16,11 +16,13 @@ import com.yeejoin.amos.boot.module.ugp.api.mapper.IInstallationQualityMapper;
...
@@ -16,11 +16,13 @@ import com.yeejoin.amos.boot.module.ugp.api.mapper.IInstallationQualityMapper;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IInstallationQualityService
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IInstallationQualityService
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
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
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.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
...
@@ -63,8 +65,11 @@ public class InstallationQualityImpl extends BaseService<PercentOfPassDto, Quali
...
@@ -63,8 +65,11 @@ public class InstallationQualityImpl extends BaseService<PercentOfPassDto, Quali
//分页查询项目质量监检信息
//分页查询项目质量监检信息
private
static
final
String
LOOK
=
"查看"
;
private
static
final
String
PERENT
=
"0%"
;
@Override
@Override
@BusinessIdentify
@BusinessIdentify
@Transactional
public
Page
<
PercentOfPassDto
>
find
(
int
current
,
int
size
,
PercentOfPassDto
pd
)
{
public
Page
<
PercentOfPassDto
>
find
(
int
current
,
int
size
,
PercentOfPassDto
pd
)
{
Page
page
=
new
Page
<>();
Page
page
=
new
Page
<>();
page
.
setCurrent
(
current
);
page
.
setCurrent
(
current
);
...
@@ -100,6 +105,7 @@ public class InstallationQualityImpl extends BaseService<PercentOfPassDto, Quali
...
@@ -100,6 +105,7 @@ public class InstallationQualityImpl extends BaseService<PercentOfPassDto, Quali
percentOfPassDto
.
setProjectId
(
qualityInfo
.
getProjectId
(
));
percentOfPassDto
.
setProjectId
(
qualityInfo
.
getProjectId
(
));
percentOfPassDto
.
setChargePerson
(
qualityInfo
.
getProject
(
).
getChargePerson
(
));
percentOfPassDto
.
setChargePerson
(
qualityInfo
.
getProject
(
).
getChargePerson
(
));
percentOfPassDto
.
setLook
(
LOOK
);
//获取监理单位的id
//获取监理单位的id
Long
supervisoryUnitId
=
qualityInfo
.
getSupervisoryUnitId
(
);
Long
supervisoryUnitId
=
qualityInfo
.
getSupervisoryUnitId
(
);
//调用接口
//调用接口
...
@@ -131,8 +137,14 @@ public class InstallationQualityImpl extends BaseService<PercentOfPassDto, Quali
...
@@ -131,8 +137,14 @@ public class InstallationQualityImpl extends BaseService<PercentOfPassDto, Quali
if
(
weldDtoList
!=
null
&&
weldDtoList
.
size
(
)
>
0
)
{
if
(
weldDtoList
!=
null
&&
weldDtoList
.
size
(
)
>
0
)
{
//获取焊口信息总条数
//获取焊口信息总条数
int
sum
=
weldDtoList
.
size
(
);
int
sum
=
weldDtoList
.
size
(
);
List
<
WeldDto
>
collect
=
weldDtoList
.
stream
(
).
filter
(
weldDto
->
StageEnum
.
焊接工艺
.
getName
(
).
equals
(
weldDto
.
getSuperInspecStatus
(
))
||
StageEnum
.
管道耐压
.
getName
(
).
equals
(
weldDto
.
getSuperInspecStatus
(
))
||
StageEnum
.
敷设质量
.
getName
(
).
equals
(
weldDto
.
getSuperInspecStatus
(
))
||
StageEnum
.
定位
.
getName
(
).
equals
(
weldDto
.
getSuperInspecStatus
(
))
||
StageEnum
.
回填
.
getName
(
).
equals
(
weldDto
.
getSuperInspecStatus
(
))
).
collect
(
Collectors
.
toList
(
));
//焊口合格数
//焊口合格数
List
<
WeldDto
>
collect
=
weldDtoList
.
stream
(
).
filter
(
weld
->
StageEnum
.
焊接工艺
.
getName
(
).
equals
(
weld
.
getSuperInspecStatus
(
))).
collect
(
Collectors
.
toList
(
));
int
qualifiedData
=
collect
.
size
();
int
qualifiedData
=
collect
.
size
();
//合格率
//合格率
BigDecimal
sums
=
new
BigDecimal
(
sum
);
BigDecimal
sums
=
new
BigDecimal
(
sum
);
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/MaterialServiceImpl.java
View file @
904e0183
...
@@ -6,13 +6,16 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -6,13 +6,16 @@ import com.alibaba.fastjson.JSONObject;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.OrgEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.MaterialCount
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.MaterialDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.MaterialDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Attachment
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.*
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Equipment
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Material
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.AttachmentMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.AttachmentMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.CompanyMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.MaterialMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.MaterialMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.SuperviseRuleMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IMaterialService
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IMaterialService
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
...
@@ -40,6 +43,10 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
...
@@ -40,6 +43,10 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
OrgServiceImpl
orgService
;
OrgServiceImpl
orgService
;
@Autowired
@Autowired
MaterialMapper
materialMapper
;
MaterialMapper
materialMapper
;
@Autowired
CompanyMapper
companyMapper
;
@Autowired
SuperviseRuleMapper
superviseRuleMapper
;
/**
/**
* 分页查询
* 分页查询
*/
*/
...
@@ -175,12 +182,53 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
...
@@ -175,12 +182,53 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
return
material
;
return
material
;
}
}
public
Map
<
String
,
List
<
String
>>
pipeManufacturerStatistics
()
{
List
<
String
>
list1
=
materialMapper
.
pipeManufacturerStatisticsToaXisData
();
List
<
String
>
list2
=
materialMapper
.
pipeManufacturerStatisticsToaSeriesData
();
Map
<
String
,
List
<
String
>>
map
=
new
HashMap
<>();
@BusinessIdentify
map
.
put
(
"axisData"
,
list1
);
public
List
<
MaterialCount
>
pipeManufacturerStatistics
()
{
map
.
put
(
"seriesData"
,
list2
);
List
<
MaterialCount
>
materialCountList
=
null
;
return
map
;
Long
companySequenceNbr
=
orgService
.
getReginParams
().
getBusinessInfo
().
getCompanySequenceNbr
();
LambdaQueryWrapper
<
SuperviseRule
>
wrapper
=
new
LambdaQueryWrapper
<>();
String
type
=
companyMapper
.
selectById
(
companySequenceNbr
).
getType
();
if
(!
ValidationUtil
.
isEmpty
(
type
))
{
if
(
type
.
contains
(
OrgEnum
.
监检机构
.
getKey
())){
wrapper
.
eq
(
SuperviseRule:
:
getInspectionUnitId
,
companySequenceNbr
);
List
<
SuperviseRule
>
superviseRules
=
superviseRuleMapper
.
selectList
(
wrapper
);
for
(
SuperviseRule
i:
superviseRules
){
LambdaQueryWrapper
<
Company
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
lambdaQueryWrapper
.
eq
(
Company:
:
getRegionCode
,
i
.
getAdminRegionCode
());
List
<
Company
>
companies
=
companyMapper
.
selectList
(
lambdaQueryWrapper
);
ArrayList
<
Long
>
listIdList
=
Lists
.
newArrayList
();
for
(
Company
company
:
companies
)
{
listIdList
.
add
(
company
.
getSequenceNbr
());
}
materialCountList
=
materialMapper
.
getConditionCount
(
listIdList
);
}
}
else
if
(
type
.
contains
(
OrgEnum
.
监察部门
.
getKey
()))
{
wrapper
.
eq
(
SuperviseRule:
:
getSuperviseDeptId
,
companySequenceNbr
);
List
<
SuperviseRule
>
superviseRules
=
superviseRuleMapper
.
selectList
(
wrapper
);
for
(
SuperviseRule
i:
superviseRules
){
LambdaQueryWrapper
<
Company
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
lambdaQueryWrapper
.
eq
(
Company:
:
getRegionCode
,
i
.
getAdminRegionCode
());
List
<
Company
>
companies
=
companyMapper
.
selectList
(
lambdaQueryWrapper
);
ArrayList
<
Long
>
listIdList
=
Lists
.
newArrayList
();
for
(
Company
company
:
companies
)
{
listIdList
.
add
(
company
.
getSequenceNbr
());
}
materialCountList
=
materialMapper
.
getConditionCount
(
listIdList
);
}
}
else
if
(
type
.
contains
(
OrgEnum
.
安装单位
.
getKey
()))
{
materialCountList
=
materialMapper
.
getMaterialCount
(
);
}
}
return
materialCountList
;
}
}
}
}
\ No newline at end of file
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 @
904e0183
...
@@ -88,6 +88,7 @@ public class ProblemInitiationServiceImpl {
...
@@ -88,6 +88,7 @@ public class ProblemInitiationServiceImpl {
}
}
qualityProblem
.
setInstanceId
(
instanceId
);
qualityProblem
.
setInstanceId
(
instanceId
);
qualityProblem
.
setStatus
(
projectInitiationService
.
getFlowTaskName
(
instanceId
));
qualityProblem
.
setStatus
(
projectInitiationService
.
getFlowTaskName
(
instanceId
));
qualityProblem
.
setProcessProgress
(
ProblemProcessEnum
.
statusMap
.
get
(
qualityProblem
.
getStatus
()));
qualityProblemService
.
updateById
(
qualityProblem
);
qualityProblemService
.
updateById
(
qualityProblem
);
sendSms
(
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
qualityProblem
)),
SMSEnum
.
质量问题短信
.
getCode
());
sendSms
(
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
qualityProblem
)),
SMSEnum
.
质量问题短信
.
getCode
());
return
instanceId
;
return
instanceId
;
...
@@ -204,6 +205,7 @@ public class ProblemInitiationServiceImpl {
...
@@ -204,6 +205,7 @@ public class ProblemInitiationServiceImpl {
* @param object
* @param object
*/
*/
public
void
sendTo
(
String
nameKey
,
Long
projectId
,
Long
sequenceNbr
,
HashMap
<
String
,
String
>
smsParams
,
String
smsCode
,
JSONObject
object
){
public
void
sendTo
(
String
nameKey
,
Long
projectId
,
Long
sequenceNbr
,
HashMap
<
String
,
String
>
smsParams
,
String
smsCode
,
JSONObject
object
){
object
.
put
(
"projectName"
,
projectServiceImpl
.
getById
(
projectId
).
getName
());
if
(
OrgEnum
.
监检机构
.
getKey
().
equals
(
nameKey
)){
if
(
OrgEnum
.
监检机构
.
getKey
().
equals
(
nameKey
)){
LambdaQueryWrapper
<
SuperviseRule
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
SuperviseRule
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
SuperviseRule:
:
getAdminRegionCode
,
projectServiceImpl
.
getById
(
projectId
).
getInstallRegionCode
());
wrapper
.
eq
(
SuperviseRule:
:
getAdminRegionCode
,
projectServiceImpl
.
getById
(
projectId
).
getInstallRegionCode
());
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/ProjectResourceServiceImpl.java
View file @
904e0183
...
@@ -154,7 +154,6 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,P
...
@@ -154,7 +154,6 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,P
String
type
=
jsonObject
.
getString
(
"type"
);
String
type
=
jsonObject
.
getString
(
"type"
);
LambdaQueryWrapper
<
ProjectResource
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
ProjectResource
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
ProjectResource:
:
getResourceId
,
select
);
wrapper
.
eq
(
ProjectResource:
:
getResourceId
,
select
);
wrapper
.
eq
(
ProjectResource:
:
getProjectId
,
SequenceNbr
);
ProjectResource
projectResourceVerify
=
projectResourceMapper
.
selectOne
(
wrapper
);
ProjectResource
projectResourceVerify
=
projectResourceMapper
.
selectOne
(
wrapper
);
if
(
ValidationUtil
.
isEmpty
(
projectResourceVerify
))
{
if
(
ValidationUtil
.
isEmpty
(
projectResourceVerify
))
{
//判断资源类型并插入
//判断资源类型并插入
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/ProjectServiceImpl.java
View file @
904e0183
...
@@ -86,40 +86,42 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
...
@@ -86,40 +86,42 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
if
(!
ValidationUtil
.
isEmpty
(
projectInitiationList
)){
if
(!
ValidationUtil
.
isEmpty
(
projectInitiationList
)){
ProjectInitiation
projectInitiation
=
projectInitiationList
.
iterator
().
next
();
ProjectInitiation
projectInitiation
=
projectInitiationList
.
iterator
().
next
();
JSONObject
jsonObject
=
JSON
.
parseObject
(
projectInitiation
.
getContext
());
JSONObject
jsonObject
=
JSON
.
parseObject
(
projectInitiation
.
getContext
());
if
(
ProjectInitiationEnum
.
平台审核
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
审批人审批
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
审核人审核
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
监检科室分配
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
监检员分配
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
监检员审核
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
流程结束
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
项目关闭
.
getName
().
equals
(
project
.
getStatus
())){
if
(
ProjectInitiationEnum
.
审批人审批
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
审核人审核
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
监检科室分配
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
监检员分配
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
监检员审核
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
流程结束
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
项目关闭
.
getName
().
equals
(
project
.
getStatus
())){
if
(!
ValidationUtil
.
isEmpty
(
jsonObject
)){
if
(!
ValidationUtil
.
isEmpty
(
jsonObject
)){
insDepId
=
jsonObject
.
getString
(
XJConstant
.
INS_DEPID
);
insDepId
=
jsonObject
.
getString
(
XJConstant
.
INS_DEPID
);
state
=
jsonObject
.
getString
(
XJConstant
.
PROCESS_PROJECT_STATE
);
state
=
jsonObject
.
getString
(
XJConstant
.
PROCESS_PROJECT_STATE
);
insDep
=
jsonObject
.
getString
(
XJConstant
.
INS_DEP
);
insDep
=
jsonObject
.
getString
(
XJConstant
.
INS_DEP
);
insPerson
=
jsonObject
.
getString
(
XJConstant
.
INS_PRESON
);
insPerson
=
jsonObject
.
getString
(
XJConstant
.
INS_PRESON
);
}
}
}
else
{
state
=
ProjectInitiationEnum
.
getTaskDetailStatusMap
.
get
(
project
.
getStatus
());
}
}
}
}
if
(
ProjectInitiationEnum
.
平台审核
.
getName
().
equals
(
project
.
getStatus
())){
//
if(ProjectInitiationEnum.平台审核.getName().equals(project.getStatus())){
if
(
ValidationUtil
.
isEmpty
(
state
)){
//
if(ValidationUtil.isEmpty(state)){
state
=
"项目待审核"
;
//
state = "项目待审核";
}
//
}
}
else
if
(
ProjectInitiationEnum
.
告知申请
.
getName
().
equals
(
project
.
getStatus
())){
//
} else if (ProjectInitiationEnum.告知申请.getName().equals(project.getStatus())){
if
(
ValidationUtil
.
isEmpty
(
state
)){
//
if(ValidationUtil.isEmpty(state)){
state
=
"告知待申请"
;
//
state = "告知待申请";
}
//
}
}
else
if
(
ProjectInitiationEnum
.
接受告知
.
getName
().
equals
(
project
.
getStatus
())){
//
} else if (ProjectInitiationEnum.接受告知.getName().equals(project.getStatus())){
if
(
ValidationUtil
.
isEmpty
(
state
)){
//
if(ValidationUtil.isEmpty(state)){
state
=
"告知待接收"
;
//
state = "告知待接收";
}
//
}
}
else
if
(
ProjectInitiationEnum
.
审查项目
.
getName
().
equals
(
project
.
getStatus
())){
//
} else if (ProjectInitiationEnum.审查项目.getName().equals(project.getStatus())){
if
(
ValidationUtil
.
isEmpty
(
state
)){
//
if(ValidationUtil.isEmpty(state)){
state
=
"告知待接收"
;
//
state = "告知待接收";
}
//
}
}
else
if
(
ProjectInitiationEnum
.
提交资料
.
getName
().
equals
(
project
.
getStatus
())){
//
} else if (ProjectInitiationEnum.提交资料.getName().equals(project.getStatus())){
if
(
ValidationUtil
.
isEmpty
(
state
)){
//
if(ValidationUtil.isEmpty(state)){
state
=
"资料待上传"
;
//
state = "资料待上传";
}
//
}
}
else
if
(
ProjectInitiationEnum
.
项目立项
.
getName
().
equals
(
project
.
getStatus
())){
//
} else if(ProjectInitiationEnum.项目立项.getName().equals(project.getStatus())){
if
(
ValidationUtil
.
isEmpty
(
state
)){
//
if(ValidationUtil.isEmpty(state)){
state
=
"项目被驳回"
;
//
state = "项目被驳回";
}
//
}
}
//
}
project
.
setExamineProjectState
(
state
);
project
.
setExamineProjectState
(
state
);
project
.
setInsDep
(
insDep
);
project
.
setInsDep
(
insDep
);
...
@@ -168,6 +170,7 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
...
@@ -168,6 +170,7 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
return
projectMapper
.
selectBatchIds
(
ids
);
return
projectMapper
.
selectBatchIds
(
ids
);
}
}
@BusinessIdentify
public
ProjectDto
getDetail
(
Long
sequenceNbr
){
public
ProjectDto
getDetail
(
Long
sequenceNbr
){
ProjectDto
project
=
projectMapper
.
getDetail
(
sequenceNbr
);
ProjectDto
project
=
projectMapper
.
getDetail
(
sequenceNbr
);
...
@@ -196,6 +199,8 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
...
@@ -196,6 +199,8 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
// }
// }
project
.
getInstanceId
();
project
.
getInstanceId
();
getProjectState
(
project
);
getProjectState
(
project
);
project
.
setCompanyType
(
orgService
.
getReginParams
().
getBusinessInfo
().
getCompanyType
());
return
project
;
return
project
;
}
}
...
@@ -230,7 +235,7 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
...
@@ -230,7 +235,7 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
JSONObject
jo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
object
));
JSONObject
jo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
object
));
String
type
=
jo
.
getString
(
"type"
);
String
type
=
jo
.
getString
(
"type"
);
String
info
=
jo
.
getString
(
"info"
);
String
info
=
jo
.
getString
(
"info"
);
if
(
OrgEnum
.
安装单位
.
getName
().
equals
(
type
)
&&
ValidationUtil
.
isEmpty
(
info
)){
if
(
OrgEnum
.
安装单位
.
getName
().
equals
(
type
)
&&
!
ValidationUtil
.
isEmpty
(
info
)){
install
=
true
;
install
=
true
;
}
else
{
}
else
{
install
=
false
;
install
=
false
;
...
@@ -241,7 +246,7 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
...
@@ -241,7 +246,7 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
JSONObject
jo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
object
));
JSONObject
jo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
object
));
String
type
=
jo
.
getString
(
"type"
);
String
type
=
jo
.
getString
(
"type"
);
String
info
=
jo
.
getString
(
"info"
);
String
info
=
jo
.
getString
(
"info"
);
if
(
OrgEnum
.
设计单位
.
getName
().
equals
(
type
)
&&
ValidationUtil
.
isEmpty
(
info
)){
if
(
OrgEnum
.
设计单位
.
getName
().
equals
(
type
)
&&
!
ValidationUtil
.
isEmpty
(
info
)){
design
=
true
;
design
=
true
;
}
else
{
}
else
{
design
=
false
;
design
=
false
;
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/QualityProblemServiceImpl.java
View file @
904e0183
...
@@ -86,7 +86,7 @@ public class QualityProblemServiceImpl extends BaseService<QualityProblemDto,Qua
...
@@ -86,7 +86,7 @@ public class QualityProblemServiceImpl extends BaseService<QualityProblemDto,Qua
return
page
;
return
page
;
}
}
public
String
updateItem
(
QualityProblem
qualityProblem
,
Long
sequenceNbr
){
public
String
updateItem
(
QualityProblem
Dto
qualityProblem
,
Long
sequenceNbr
){
QualityProblem
quality
=
this
.
getById
(
sequenceNbr
);
QualityProblem
quality
=
this
.
getById
(
sequenceNbr
);
if
(
ProblemProcessEnum
.
确定问题
.
getName
().
equals
(
quality
.
getStatus
()))
{
if
(
ProblemProcessEnum
.
确定问题
.
getName
().
equals
(
quality
.
getStatus
()))
{
//监检机构确定问题
//监检机构确定问题
...
@@ -124,15 +124,18 @@ public class QualityProblemServiceImpl extends BaseService<QualityProblemDto,Qua
...
@@ -124,15 +124,18 @@ public class QualityProblemServiceImpl extends BaseService<QualityProblemDto,Qua
problemInitiationService
.
execute
(
quality
.
getInstanceId
(),
quality
,
"0"
);
problemInitiationService
.
execute
(
quality
.
getInstanceId
(),
quality
,
"0"
);
problemInitiationService
.
execute
(
quality
.
getInstanceId
(),
quality
,
"1"
);
problemInitiationService
.
execute
(
quality
.
getInstanceId
(),
quality
,
"1"
);
}
}
}
else
if
(
ProblemProcessEnum
.
问题分类
.
getName
().
equals
(
quality
.
get
ProblemType
()))
{
}
else
if
(
ProblemProcessEnum
.
问题分类
.
getName
().
equals
(
quality
.
get
Status
()))
{
quality
.
setHandingOpinion
(
qualityProblem
.
getHandingOpinion
());
quality
.
setHandingOpinion
(
qualityProblem
.
getHandingOpinion
());
quality
.
setHandingOpinionDesc
(
qualityProblem
.
getHandingOpinionDesc
());
quality
.
setHandingOpinionDesc
(
qualityProblem
.
getHandingOpinionDesc
());
quality
.
setProblemType
(
qualityProblem
.
getProblemType
());
//执行两次
//执行两次
//获取ProblemType状态
if
(
quality
.
getProblemType
()){
if
(
quality
.
getProblemType
()){
//拿到qualityProblem更新到数据库
quality
.
setReformLimitDate
(
qualityProblem
.
getDateTime
());
problemInitiationService
.
execute
(
quality
.
getInstanceId
(),
quality
,
"0"
);
problemInitiationService
.
execute
(
quality
.
getInstanceId
(),
quality
,
"0"
);
}
else
{
}
else
{
problemInitiationService
.
execute
(
quality
.
getInstanceId
(),
quality
,
"1"
);
problemInitiationService
.
execute
(
quality
.
getInstanceId
(),
quality
,
"1"
);
problemInitiationService
.
execute
(
quality
.
getInstanceId
(),
quality
,
"1"
);
}
}
}
else
if
(
ProblemProcessEnum
.
审查整改过程
.
getName
().
equals
(
quality
.
getStatus
()))
{
}
else
if
(
ProblemProcessEnum
.
审查整改过程
.
getName
().
equals
(
quality
.
getStatus
()))
{
quality
.
setHandingOpinion
(
qualityProblem
.
getHandingOpinion
());
quality
.
setHandingOpinion
(
qualityProblem
.
getHandingOpinion
());
...
@@ -152,6 +155,9 @@ public class QualityProblemServiceImpl extends BaseService<QualityProblemDto,Qua
...
@@ -152,6 +155,9 @@ public class QualityProblemServiceImpl extends BaseService<QualityProblemDto,Qua
}
}
}
}
// else if (ProblemProcessEnum.超期整改发送短信.getName().equals(quality.getStatus())) {
//// problemInitiationService.execute(quality.getInstanceId(),quality,"1");
//// }
return
"0k"
;
return
"0k"
;
}
}
...
@@ -164,7 +170,13 @@ public class QualityProblemServiceImpl extends BaseService<QualityProblemDto,Qua
...
@@ -164,7 +170,13 @@ public class QualityProblemServiceImpl extends BaseService<QualityProblemDto,Qua
return
qualityProblemDto
;
return
qualityProblemDto
;
}
}
public
List
<
Map
<
String
,
String
>>
qualityProblemStatistics
()
{
public
List
<
Map
<
String
,
String
>>
qualityProblemStatistics
()
{
return
qualityProblemMapper
.
qualityProblemStatistics
();
Set
<
String
>
projectIds
=
new
HashSet
<>();
for
(
Project
project:
projectResourceService
.
getProjectList
()){
projectIds
.
add
(
String
.
valueOf
(
project
.
getSequenceNbr
()));
}
qualityProblemMapper
.
getItems
(
new
Page
<>(
1
,
2
),
new
QualityProblemDto
(),
projectIds
);
return
qualityProblemMapper
.
qualityProblemStatistics
(
projectIds
);
}
}
}
}
\ No newline at end of file
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/RectifyMsgServiceImpl.java
View file @
904e0183
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.CompanyDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.CompanyDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.MsgNoticeDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.QualityProblemDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.QualityProblemDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.InstallNoticeMsg
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.RectifyMsg
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.RectifyMsg
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.InstallNoticeMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.InstallNoticeMsgMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.RectifyMsgMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.RectifyMsgMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IInstallNoticeMsgService
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IRectifyMsgService
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IRectifyMsgService
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.RectifyMsgDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.RectifyMsgDto
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.
util.ArrayLis
t
;
import
java.
text.SimpleDateForma
t
;
import
java.util.
List
;
import
java.util.
*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -31,8 +39,15 @@ public class RectifyMsgServiceImpl extends BaseService<RectifyMsgDto,RectifyMsg,
...
@@ -31,8 +39,15 @@ public class RectifyMsgServiceImpl extends BaseService<RectifyMsgDto,RectifyMsg,
@Autowired
@Autowired
RectifyMsgMapper
rectifyMsgMapper
;
RectifyMsgMapper
rectifyMsgMapper
;
@Autowired
OrgServiceImpl
orgService
;
@Autowired
InstallNoticeMsgMapper
installNoticeMsgMapper
;
/**
/**
*
分页
查询
*
质量问题整改短信列表
查询
*/
*/
public
IPage
<
RectifyMsgDto
>
queryForRectifyMsgPage
(
IPage
<
RectifyMsgDto
>
page
,
String
name
,
String
installationUnit
)
{
public
IPage
<
RectifyMsgDto
>
queryForRectifyMsgPage
(
IPage
<
RectifyMsgDto
>
page
,
String
name
,
String
installationUnit
)
{
return
rectifyMsgMapper
.
queryForRectifyMsgPage
(
page
,
name
,
installationUnit
);
return
rectifyMsgMapper
.
queryForRectifyMsgPage
(
page
,
name
,
installationUnit
);
...
@@ -46,8 +61,56 @@ public class RectifyMsgServiceImpl extends BaseService<RectifyMsgDto,RectifyMsg,
...
@@ -46,8 +61,56 @@ public class RectifyMsgServiceImpl extends BaseService<RectifyMsgDto,RectifyMsg,
}
}
/**
/**
*
质量问题整改短信列表查询
*
消息提醒
*/
*/
@BusinessIdentify
public
List
<
MsgNoticeDto
>
msgNotice
(
Boolean
isRead
){
LambdaQueryWrapper
<
InstallNoticeMsg
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
InstallNoticeMsg:
:
getTargetPersonId
,
orgService
.
getReginParams
().
getBusinessInfo
().
getUserSequenceNbr
())
.
orderByDesc
(
InstallNoticeMsg:
:
getSendTime
);
if
(!
ValidationUtil
.
isEmpty
(
isRead
)){
wrapper
.
eq
(
InstallNoticeMsg:
:
getIsRead
,
isRead
);
}
LambdaQueryWrapper
<
RectifyMsg
>
wrapper1
=
new
LambdaQueryWrapper
<>();
wrapper1
.
eq
(
RectifyMsg:
:
getMsgReceiver
,
orgService
.
getReginParams
().
getBusinessInfo
().
getUserSequenceNbr
())
.
orderByDesc
(
RectifyMsg:
:
getSendTime
);
if
(!
ValidationUtil
.
isEmpty
(
isRead
)){
wrapper1
.
eq
(
RectifyMsg:
:
getIsRead
,
isRead
);
}
List
<
RectifyMsg
>
rectifyMsgList
=
rectifyMsgMapper
.
selectList
(
wrapper1
);
List
<
InstallNoticeMsg
>
installNoticeMsgList
=
installNoticeMsgMapper
.
selectList
(
wrapper
);
List
<
MsgNoticeDto
>
msgNoticeDtoList
=
new
ArrayList
<>();
if
(!
ValidationUtil
.
isEmpty
(
installNoticeMsgList
))
{
for
(
InstallNoticeMsg
installNoticeMsg
:
installNoticeMsgList
)
{
MsgNoticeDto
msgNoticeDto
=
new
MsgNoticeDto
();
String
contents
=
installNoticeMsg
.
getContent
();
if
(!
ValidationUtil
.
isEmpty
(
contents
))
{
String
form
=
contents
.
substring
(
contents
.
indexOf
(
'【'
)
+
1
,
contents
.
indexOf
(
"】"
));
String
context
=
contents
.
substring
(
contents
.
indexOf
(
"】"
)
+
1
);
msgNoticeDto
.
setType
(
form
);
msgNoticeDto
.
setContent
(
context
);
}
msgNoticeDto
.
setCreateDate
(
installNoticeMsg
.
getSendTime
());
msgNoticeDto
.
setSequenceNbr
(
installNoticeMsg
.
getSequenceNbr
());
msgNoticeDtoList
.
add
(
msgNoticeDto
);
}
}
if
(!
ValidationUtil
.
isEmpty
(
rectifyMsgList
))
{
for
(
RectifyMsg
rectifyMsg
:
rectifyMsgList
)
{
MsgNoticeDto
msgNoticeDto
=
new
MsgNoticeDto
();
String
contents
=
rectifyMsg
.
getContent
();
if
(!
ValidationUtil
.
isEmpty
(
contents
))
{
msgNoticeDto
.
setType
(
contents
.
substring
(
contents
.
indexOf
(
'【'
)
+
1
,
contents
.
indexOf
(
"】"
)));
msgNoticeDto
.
setContent
(
contents
.
substring
(
contents
.
indexOf
(
"】"
)
+
1
));
}
msgNoticeDto
.
setCreateDate
(
rectifyMsg
.
getSendTime
());
msgNoticeDto
.
setSequenceNbr
(
rectifyMsg
.
getSequenceNbr
());
msgNoticeDtoList
.
add
(
msgNoticeDto
);
}
}
return
msgNoticeDtoList
;
}
}
}
\ No newline at end of file
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/TaskServiceImpl.java
View file @
904e0183
This diff is collapsed.
Click to expand it.
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/UnitLicenceServiceImpl.java
0 → 100644
View file @
904e0183
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.UnitLicence
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.UnitLicenceMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IUnitLicenceService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.util.List
;
import
java.util.Map
;
/**
* 单位许可信息表 服务实现类
*
* @author duanwei
* @date 2022-11-30
*/
@Service
public
class
UnitLicenceServiceImpl
extends
ServiceImpl
<
UnitLicenceMapper
,
UnitLicence
>
implements
IUnitLicenceService
{
@Autowired
OrgServiceImpl
orgServiceImpl
;
public
JSONObject
getLicenceByCompanyId
(
JSONObject
jsonObject
,
Long
companyId
){
Map
<
String
,
String
>
installationMap
=
orgServiceImpl
.
getdetialInfo
(
String
.
valueOf
(
companyId
));
String
creditCode
=
""
;
if
(!
ValidationUtil
.
isEmpty
(
installationMap
)){
creditCode
=
installationMap
.
get
(
"creditCode"
);
}
if
(!
ValidationUtil
.
isEmpty
(
creditCode
))
{
List
<
UnitLicence
>
unitLicenceList
=
this
.
list
(
new
LambdaQueryWrapper
<
UnitLicence
>().
eq
(
UnitLicence:
:
getUnitCode
,
creditCode
));
if
(
unitLicenceList
.
iterator
().
hasNext
()){
UnitLicence
unitLicence
=
unitLicenceList
.
iterator
().
next
();
jsonObject
.
put
(
"licenseCompany"
,
unitLicence
.
getUnitName
());
jsonObject
.
put
(
"licenseNum"
,
unitLicence
.
getCertNo
());
}
}
return
jsonObject
;
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/UnitPersonServiceImpl.java
0 → 100644
View file @
904e0183
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.OrgEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Company
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.SuperviseRule
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.CompanyMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.SuperviseRuleMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IUnitPersonService
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
net.sf.jsqlparser.expression.operators.arithmetic.Concat
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.util.List
;
import
java.util.stream.Collectors
;
@Service
public
class
UnitPersonServiceImpl
implements
IUnitPersonService
{
@Autowired
OrgServiceImpl
orgService
;
@Autowired
CompanyMapper
companyMapper
;
@Autowired
SuperviseRuleMapper
superviseRuleMapper
;
@BusinessIdentify
public
String
selectUnit
()
{
Long
companySequenceNbr
=
orgService
.
getReginParams
().
getBusinessInfo
().
getCompanySequenceNbr
();
Company
companyInformation
=
companyMapper
.
selectById
(
companySequenceNbr
);
String
companyKey
=
companyInformation
.
getType
();
String
regionCode
=
companyInformation
.
getRegionCode
();
String
unitName
=
""
;
if
(
companyKey
.
equals
(
OrgEnum
.
安装单位
.
getKey
())
||
companyKey
.
equals
(
OrgEnum
.
设计单位
.
getKey
())
||
companyKey
.
equals
(
OrgEnum
.
建设单位
.
getKey
()))
{
LambdaQueryWrapper
<
Company
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
Company:
:
getRegionCode
,
regionCode
);
List
<
Company
>
codeLists
=
companyMapper
.
selectList
(
wrapper
);
for
(
Company
codeList
:
codeLists
)
{
LambdaQueryWrapper
<
SuperviseRule
>
wrapper1
=
new
LambdaQueryWrapper
<>();
wrapper1
.
eq
(
SuperviseRule:
:
getAdminRegionCode
,
codeList
.
getRegionCode
());
List
<
SuperviseRule
>
superviseRuleLists
=
superviseRuleMapper
.
selectList
(
wrapper1
);
for
(
SuperviseRule
superviseRuleList
:
superviseRuleLists
)
{
LambdaQueryWrapper
<
Company
>
wrapper2
=
new
LambdaQueryWrapper
<>();
wrapper2
.
eq
(
Company:
:
getSequenceNbr
,
superviseRuleList
.
getSuperviseDeptId
());
List
<
Company
>
companyNames
=
companyMapper
.
selectList
(
wrapper2
);
for
(
Company
companyName
:
companyNames
)
{
unitName
=
companyName
.
getName
();
}
}
}
}
else
if
(
companyKey
.
equals
(
OrgEnum
.
监察部门
.
getKey
()))
{
LambdaQueryWrapper
<
SuperviseRule
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
SuperviseRule:
:
getSuperviseDeptId
,
companySequenceNbr
);
List
<
SuperviseRule
>
adminRegions
=
superviseRuleMapper
.
selectList
(
wrapper
);
for
(
SuperviseRule
adminRegion
:
adminRegions
)
{
// unitName = String.join("、", String.valueOf(adminRegion.getAdminRegion()));
if
(!
ValidationUtil
.
isEmpty
(
adminRegion
.
getAdminRegion
()))
{
if
(
unitName
.
equals
(
""
)){
unitName
=
unitName
.
concat
(
adminRegion
.
getAdminRegion
());
}
unitName
=
unitName
.
concat
(
"、"
+
adminRegion
.
getAdminRegion
());
}
}
}
else
if
(
companyKey
.
equals
(
OrgEnum
.
监检机构
.
getKey
()))
{
LambdaQueryWrapper
<
SuperviseRule
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
SuperviseRule:
:
getInspectionUnitId
,
companySequenceNbr
);
List
<
SuperviseRule
>
adminRegions
=
superviseRuleMapper
.
selectList
(
wrapper
);
for
(
SuperviseRule
adminRegion
:
adminRegions
)
{
if
(!
ValidationUtil
.
isEmpty
(
adminRegion
.
getAdminRegion
())){
if
(
unitName
.
equals
(
""
)){
unitName
=
unitName
.
concat
(
adminRegion
.
getAdminRegion
());
}
unitName
=
unitName
.
concat
(
"、"
+
adminRegion
.
getAdminRegion
());
}
}
}
return
unitName
;
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/VerifyServiceImpl.java
View file @
904e0183
This diff is collapsed.
Click to expand it.
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/WeldServiceImpl.java
View file @
904e0183
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.utils.QRCodeUtil
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.ProjectInitiationEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.StageEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.WeldCodeEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.WeldCodeEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.WeldMethodEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.WeldMethodEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.OrgUsrDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.ProjectInitiationDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.WeldDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.WeldDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Project
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.WeldVerifyDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.SuperviseRule
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.*
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Weld
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.SuperviseRuleMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.SuperviseRuleMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.VerifyMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.WeldMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.WeldMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IProjectInitiationService
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IWeldService
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IWeldService
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
org.apache.http.entity.ContentType
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.mock.web.MockMultipartFile
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.io.ByteArrayInputStream
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -46,6 +63,13 @@ class WeldServiceImpl extends BaseService<WeldDto, Weld, WeldMapper> implements
...
@@ -46,6 +63,13 @@ class WeldServiceImpl extends BaseService<WeldDto, Weld, WeldMapper> implements
SuperviseRuleMapper
superviseRuleMapper
;
SuperviseRuleMapper
superviseRuleMapper
;
@Autowired
@Autowired
ProjectResourceServiceImpl
projectResourceService
;
ProjectResourceServiceImpl
projectResourceService
;
@Autowired
VerifyMapper
verifyMapper
;
@Autowired
ProjectInitiationServiceImpl
projectInitiationService
;
@Autowired
OrgUsrServiceImpl
orgUsrServiceImpl
;
// Logger logger = LoggerFactory.getLogger(WeldServiceImpl.class);
// Logger logger = LoggerFactory.getLogger(WeldServiceImpl.class);
...
@@ -209,7 +233,127 @@ class WeldServiceImpl extends BaseService<WeldDto, Weld, WeldMapper> implements
...
@@ -209,7 +233,127 @@ class WeldServiceImpl extends BaseService<WeldDto, Weld, WeldMapper> implements
return
weldMapper
.
select
(
projectId
);
return
weldMapper
.
select
(
projectId
);
}
}
/**
* 通过项目id获取焊口编码
*/
public
IPage
<
Weld
>
lookCode
(
long
current
,
long
size
,
String
projectId
){
IPage
<
Weld
>
page
=
new
Page
<>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
LambdaQueryWrapper
<
Weld
>
wrapper
=
new
LambdaQueryWrapper
<>();
IPage
<
Weld
>
weldList
=
weldMapper
.
selectPage
(
page
,
wrapper
.
eq
(
Weld:
:
getProjectId
,
projectId
));
return
weldList
;
}
/**
* 通过项目id获取焊口智能监验信息
*/
public
WeldVerifyDto
selectStatus
(
Long
projectId
,
String
code
){
LambdaQueryWrapper
<
Project
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
Project:
:
getSequenceNbr
,
projectId
);
Project
project
=
projectMapper
.
selectOne
(
wrapper
);
WeldVerifyDto
weldVerifyDtos
=
new
WeldVerifyDto
();
weldVerifyDtos
.
setName
(
project
.
getName
());
weldVerifyDtos
.
setCode
(
project
.
getCode
());
weldVerifyDtos
.
setInstallRegion
(
project
.
getInstallRegion
());
LambdaQueryWrapper
<
Verify
>
wrapper1
=
new
LambdaQueryWrapper
<>();
wrapper1
.
eq
(
Verify:
:
getProjectId
,
projectId
)
.
eq
(
Verify:
:
getCode
,
code
)
.
groupBy
(
Verify:
:
getStage
)
.
orderByDesc
(
Verify:
:
getRecDate
);
List
<
Verify
>
verifyList
=
verifyMapper
.
selectList
(
wrapper1
);
for
(
Verify
verify
:
verifyList
){
if
(
"1"
.
equals
(
verify
.
getStatus
())){
if
(
StageEnum
.
定位
.
getStage
().
equals
(
verify
.
getStage
())){
weldVerifyDtos
.
setLocationStatus
(
"合格"
);
}
if
(
StageEnum
.
管道耐压
.
getStage
().
equals
(
verify
.
getStage
())){
weldVerifyDtos
.
setVoltageStatus
(
"合格"
);
}
if
(
StageEnum
.
敷设质量
.
getStage
().
equals
(
verify
.
getStage
())){
weldVerifyDtos
.
setLayStatus
(
"合格"
);
}
if
(
StageEnum
.
焊接工艺
.
getStage
().
equals
(
verify
.
getStage
())){
weldVerifyDtos
.
setCraftStatus
(
"合格"
);
}
}
else
if
(
"0"
.
equals
(
verify
.
getStatus
())){
if
(
StageEnum
.
定位
.
getStage
().
equals
(
verify
.
getStage
())){
weldVerifyDtos
.
setLocationStatus
(
"不合格"
);
}
if
(
StageEnum
.
管道耐压
.
getStage
().
equals
(
verify
.
getStage
())){
weldVerifyDtos
.
setVoltageStatus
(
"不合格"
);
}
if
(
StageEnum
.
敷设质量
.
getStage
().
equals
(
verify
.
getStage
())){
weldVerifyDtos
.
setLayStatus
(
"不合格"
);
}
if
(
StageEnum
.
焊接工艺
.
getStage
().
equals
(
verify
.
getStage
())){
weldVerifyDtos
.
setCraftStatus
(
"不合格"
);
}
}
}
return
weldVerifyDtos
;
}
/**
* 检验责任单位及监检状态
*/
public
WeldDto
selectDept
(
String
projectId
){
LambdaQueryWrapper
<
Project
>
wrapper
=
new
LambdaQueryWrapper
<>();
Project
project
=
projectMapper
.
selectOne
(
wrapper
.
eq
(
Project:
:
getSequenceNbr
,
projectId
));
LambdaQueryWrapper
<
SuperviseRule
>
wrapper1
=
new
LambdaQueryWrapper
<>();
WeldDto
weldDtos
=
new
WeldDto
();
if
(!
ValidationUtil
.
isEmpty
(
project
.
getInstallRegionCode
())){
SuperviseRule
superviseRule
=
superviseRuleMapper
.
selectOne
(
wrapper1
.
eq
(
SuperviseRule:
:
getAdminRegionCode
,
project
.
getInstallRegionCode
()));
OrgUsr
orgUsr
=
orgService
.
getOrgUsrById
(
String
.
valueOf
(
superviseRule
.
getSuperviseDeptId
()));
weldDtos
.
setSuperviseDept
(
orgUsr
.
getBizOrgName
());
}
LambdaQueryWrapper
<
ProjectInitiation
>
wrapper2
=
new
LambdaQueryWrapper
<>();
wrapper2
.
eq
(
ProjectInitiation:
:
getInstanceId
,
project
.
getInstanceId
())
.
groupBy
(
ProjectInitiation:
:
getTaskName
)
.
orderByDesc
(
ProjectInitiation:
:
getRecDate
);
List
<
ProjectInitiation
>
projectInitiations
=
projectInitiationService
.
list
(
wrapper2
);
for
(
ProjectInitiation
projectInitiation:
projectInitiations
){
String
context
=
projectInitiation
.
getContext
();
JSONObject
jsonObject
=
(
JSONObject
)
JSONObject
.
parse
(
context
);
if
(
ProjectInitiationEnum
.
监检员分配
.
getName
().
equals
(
projectInitiation
.
getTaskName
())){
weldDtos
.
setInsPerson
(
jsonObject
.
getString
(
"insPerson"
));
}
if
(
ProjectInitiationEnum
.
监检科室分配
.
getName
().
equals
(
projectInitiation
.
getTaskName
())){
weldDtos
.
setInsDep
(
jsonObject
.
getString
(
"insDep"
));
}
}
return
weldDtos
;
}
/**
* 获取焊口编号
* @return
*/
public
IPage
getWeldQRCode
(
String
HKCode
){
String
url
=
""
;
JSONObject
jsonObject
=
new
JSONObject
();
byte
[]
bytes
=
QRCodeUtil
.
generateQRCodeImageByteData
(
HKCode
,
200
);
InputStream
inputStream
=
new
ByteArrayInputStream
(
bytes
);
try
{
MultipartFile
file
=
new
MockMultipartFile
(
HKCode
+
".jpg"
,
HKCode
+
".jpg"
,
ContentType
.
APPLICATION_OCTET_STREAM
.
toString
(),
inputStream
);
FeignClientResult
<
Map
<
String
,
String
>>
date
=
Systemctl
.
fileStorageClient
.
updateCommonFileFree
(
file
,
"ugp/qrcode"
);
if
(
date
!=
null
)
{
Map
<
String
,
String
>
map
=
date
.
getResult
();
Iterator
<
String
>
it
=
map
.
keySet
().
iterator
();
String
urlString
=
it
.
next
();
jsonObject
.
put
(
"fileUrl"
,
urlString
);
jsonObject
.
put
(
"fileName"
,
map
.
get
(
urlString
));
}
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
List
list
=
new
ArrayList
();
list
.
add
(
jsonObject
);
IPage
page
=
new
Page
(
1
,
100
);
page
.
setRecords
(
list
);
return
page
;
}
}
}
\ No newline at end of file
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/WelderServiceImpl.java
View file @
904e0183
...
@@ -12,6 +12,7 @@ import com.yeejoin.amos.boot.module.ugp.api.Enum.OrgEnum;
...
@@ -12,6 +12,7 @@ import com.yeejoin.amos.boot.module.ugp.api.Enum.OrgEnum;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.ProjectResourceEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.ProjectResourceEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Project
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Project
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.ProjectResource
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.ProjectResource
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.CompanyMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.WelderMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.WelderMapper
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
...
@@ -47,6 +48,11 @@ public class WelderServiceImpl {
...
@@ -47,6 +48,11 @@ public class WelderServiceImpl {
@Autowired
@Autowired
WelderMapper
welderMapper
;
WelderMapper
welderMapper
;
@Autowired
CompanyMapper
companyMapper
;
/**
/**
* 获取当前登录所在单位下的项目中的所有焊工列表
* 获取当前登录所在单位下的项目中的所有焊工列表
* @return
* @return
...
@@ -167,7 +173,28 @@ public class WelderServiceImpl {
...
@@ -167,7 +173,28 @@ public class WelderServiceImpl {
@BusinessIdentify
@BusinessIdentify
public
List
<
Map
>
welderStatistics
()
{
public
List
<
Map
>
welderStatistics
()
{
String
bizOrgCode
=
orgUsrService
.
getById
(
orgService
.
getReginParams
().
getBusinessInfo
().
getCompanySequenceNbr
()).
getBizOrgCode
();
Set
<
String
>
personCode
=
new
HashSet
<>();
return
welderMapper
.
welderStatistics
(
bizOrgCode
);
Long
companyIds
=
orgService
.
getReginParams
().
getBusinessInfo
().
getCompanySequenceNbr
();
String
bizOrgCode
=
orgUsrService
.
getById
(
companyIds
).
getBizOrgCode
();
String
companyKey
=
companyMapper
.
selectById
(
companyIds
).
getType
();
if
(
companyKey
.
equals
(
OrgEnum
.
安装单位
.
getKey
())){
personCode
.
add
(
String
.
valueOf
(
bizOrgCode
));
}
else
if
(
companyKey
.
equals
(
OrgEnum
.
监检机构
.
getKey
()))
{
LambdaQueryWrapper
<
OrgUsr
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
OrgUsr:
:
getBizOrgCode
,
orgUsrService
.
getById
(
companyIds
).
getBizOrgCode
());
List
<
OrgUsr
>
selectCodes
=
orgUsrService
.
list
(
wrapper
);
for
(
OrgUsr
selectCode
:
selectCodes
){
personCode
.
add
(
String
.
valueOf
(
selectCode
.
getBizOrgCode
()));
}
}
else
if
(
companyKey
.
equals
(
OrgEnum
.
监察部门
.
getKey
()))
{
LambdaQueryWrapper
<
OrgUsr
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
OrgUsr:
:
getSequenceNbr
,
orgUsrService
.
getById
(
companyIds
).
getParentId
());
List
<
OrgUsr
>
selectCodes
=
orgUsrService
.
list
(
wrapper
);
for
(
OrgUsr
selectCode
:
selectCodes
){
personCode
.
add
(
String
.
valueOf
(
selectCode
.
getBizOrgCode
()));
}
}
return
welderMapper
.
welderStatistics
(
personCode
);
}
}
}
}
amos-boot-system-ugp/pom.xml
View file @
904e0183
...
@@ -24,6 +24,12 @@
...
@@ -24,6 +24,12 @@
<artifactId>
amos-feign-workflow
</artifactId>
<artifactId>
amos-feign-workflow
</artifactId>
<version>
1.7.9-SNAPSHOT
</version>
<version>
1.7.9-SNAPSHOT
</version>
</dependency>
</dependency>
<dependency>
<groupId>
fakepath
</groupId>
<artifactId>
ugp-welding-evaluation-inspection-sdk
</artifactId>
<version>
1.0
</version>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
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