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
b9a2e146
Commit
b9a2e146
authored
Oct 14, 2022
by
wanglong
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
b48501de
7c5bb785
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
728 additions
and
106 deletions
+728
-106
ControllerAop.java
...a/com/yeejoin/amos/boot/biz/common/aop/ControllerAop.java
+2
-2
InstallNoticeMsgPageDto.java
...amos/boot/module/ugp/api/dto/InstallNoticeMsgPageDto.java
+53
-0
SuperviseRuleDto.java
...eejoin/amos/boot/module/ugp/api/dto/SuperviseRuleDto.java
+2
-0
WelderEquipmentDto.java
...join/amos/boot/module/ugp/api/dto/WelderEquipmentDto.java
+71
-0
Project.java
.../com/yeejoin/amos/boot/module/ugp/api/entity/Project.java
+20
-19
AttachmentMapper.java
...oin/amos/boot/module/ugp/api/mapper/AttachmentMapper.java
+6
-0
EquipmentMapper.java
...join/amos/boot/module/ugp/api/mapper/EquipmentMapper.java
+2
-0
InstallNoticeMsgMapper.java
...os/boot/module/ugp/api/mapper/InstallNoticeMsgMapper.java
+13
-1
ProjectResourceMapper.java
...mos/boot/module/ugp/api/mapper/ProjectResourceMapper.java
+17
-0
IEquipmentService.java
...n/amos/boot/module/ugp/api/service/IEquipmentService.java
+10
-0
IInstallNoticeMsgService.java
...boot/module/ugp/api/service/IInstallNoticeMsgService.java
+9
-1
IProjectResourceService.java
.../boot/module/ugp/api/service/IProjectResourceService.java
+13
-0
AttachmentMapper.xml
...le-ugp-api/src/main/resources/mapper/AttachmentMapper.xml
+10
-0
InstallNoticeMsgMapper.xml
...-api/src/main/resources/mapper/InstallNoticeMsgMapper.xml
+65
-0
ProjectResourceMapper.xml
...p-api/src/main/resources/mapper/ProjectResourceMapper.xml
+97
-0
CompanyController.java
...mos/boot/module/ugp/biz/controller/CompanyController.java
+1
-1
EquipmentController.java
...s/boot/module/ugp/biz/controller/EquipmentController.java
+0
-0
InstallNoticeMsgController.java
...module/ugp/biz/controller/InstallNoticeMsgController.java
+29
-6
ProjectController.java
...mos/boot/module/ugp/biz/controller/ProjectController.java
+6
-3
ProjectResourceController.java
.../module/ugp/biz/controller/ProjectResourceController.java
+97
-46
SuperviseRuleController.java
...ot/module/ugp/biz/controller/SuperviseRuleController.java
+38
-15
EquipmentServiceImpl.java
...oot/module/ugp/biz/service/impl/EquipmentServiceImpl.java
+63
-4
InstallNoticeMsgServiceImpl.java
...ule/ugp/biz/service/impl/InstallNoticeMsgServiceImpl.java
+24
-0
ProjectResourceServiceImpl.java
...dule/ugp/biz/service/impl/ProjectResourceServiceImpl.java
+73
-3
SuperviseRuleServiceImpl.java
...module/ugp/biz/service/impl/SuperviseRuleServiceImpl.java
+2
-2
application.properties
...-module-ugp-biz/src/main/resources/application.properties
+5
-3
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/aop/ControllerAop.java
View file @
b9a2e146
...
...
@@ -95,9 +95,9 @@ public class ControllerAop {
// 不需要校验token的接口直接返回
if
(
joinPoint
.
getSignature
()
instanceof
MethodSignature
)
{
if
(!((
MethodSignature
)
joinPoint
.
getSignature
()).
getMethod
().
getAnnotation
(
TycloudOperation
.
class
).
needAuth
()
&&
!
request
.
getParameterMap
().
containsKey
(
"token"
)
&&
ValidationUtil
.
isEmpty
(
token
))
{
//
if (!((MethodSignature) joinPoint.getSignature()).getMethod().getAnnotation(TycloudOperation.class).needAuth() && !request.getParameterMap().containsKey("token") && ValidationUtil.isEmpty(token)) {
return
;
}
//
}
}
// 平台studio配置的下载接口token从url里取
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/InstallNoticeMsgPageDto.java
0 → 100644
View file @
b9a2e146
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
/**
* 项目安装告知短信记录表
*
* @author system_generator
* @date 2022-10-7
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"InstallNoticeMsgPageDto"
,
description
=
"项目安装告知短信通知记录表"
)
public
class
InstallNoticeMsgPageDto
extends
BaseDto
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"项目名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"项目安装区域"
)
private
String
installRegion
;
@ApiModelProperty
(
value
=
"项目开工日期"
)
private
Date
startDate
;
@ApiModelProperty
(
value
=
"建设单位"
)
private
String
constructionUnit
;
@ApiModelProperty
(
value
=
"安装单位"
)
private
String
installationUnit
;
@ApiModelProperty
(
value
=
"项目告知处理进度"
)
private
String
progressStatus
;
@ApiModelProperty
(
value
=
"短信通知单位"
)
private
Long
targetUnitId
;
@ApiModelProperty
(
value
=
"短信接收人"
)
private
Long
targetPersonId
;
@ApiModelProperty
(
value
=
"短信通知内容"
)
private
String
content
;
@ApiModelProperty
(
value
=
"短信发送日期"
)
private
Date
sendTime
;
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/SuperviseRuleDto.java
View file @
b9a2e146
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
dto
;
import
com.sun.corba.se.spi.presentation.rmi.IDLNameTranslator
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
...
...
@@ -39,4 +40,5 @@ public class SuperviseRuleDto extends BaseDto {
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createDate
;
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/WelderEquipmentDto.java
0 → 100644
View file @
b9a2e146
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
dto
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.aspectj.weaver.ast.Test
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.util.Date
;
/**
* 焊机设备表
*
* @author system_generator
* @date 2022-10-8
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"WelderEquipmentDto"
,
description
=
"焊机设备表"
)
public
class
WelderEquipmentDto
extends
BaseDto
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"设备名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"设备编号"
)
private
String
code
;
@ApiModelProperty
(
value
=
"设备类型"
)
private
String
type
;
@ApiModelProperty
(
value
=
"项目ID"
)
private
Long
projectId
;
@ApiModelProperty
(
value
=
"项目名称"
)
private
String
projectName
;
@ApiModelProperty
(
value
=
"生产厂家"
)
private
String
manufacturer
;
@ApiModelProperty
(
value
=
"出厂日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
manufactureDate
;
@ApiModelProperty
(
value
=
"使用年限"
)
private
String
serviceLife
;
@ApiModelProperty
(
value
=
"校验日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
inspectionDate
;
@ApiModelProperty
(
value
=
"使用状态"
)
private
String
useStatus
;
@ApiModelProperty
(
value
=
"检定状态"
)
private
String
verifyStatus
;
@ApiModelProperty
(
value
=
"附件信息"
)
private
String
info
;
@ApiModelProperty
(
value
=
"资源id"
)
private
String
projectResourceId
;
@ApiModelProperty
(
value
=
"附件"
)
private
MultipartFile
[]
files
;
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/entity/Project.java
View file @
b9a2e146
...
...
@@ -6,6 +6,7 @@ import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.util.Date
;
/**
...
...
@@ -25,109 +26,109 @@ public class Project extends BaseEntity {
/**
* 项目名称
*/
@TableField
(
"name"
)
@TableField
(
"name"
)
private
String
name
;
/**
* 项目编号
*/
@TableField
(
"code"
)
@TableField
(
"code"
)
private
String
code
;
/**
* 项目进度
*/
@TableField
(
"progress_status"
)
@TableField
(
"progress_status"
)
private
String
progressStatus
;
/**
* 项目地点
*/
@TableField
(
"address"
)
@TableField
(
"address"
)
private
String
address
;
/**
* 项目开工日期
*/
@TableField
(
"start_date"
)
@TableField
(
"start_date"
)
private
Date
startDate
;
/**
* 项目安装区域代码
*/
@TableField
(
"install_region_code"
)
@TableField
(
"install_region_code"
)
private
String
installRegionCode
;
/**
* 项目安装区域
*/
@TableField
(
"install_region"
)
@TableField
(
"install_region"
)
private
String
installRegion
;
/**
* 建设单位id
*/
@TableField
(
"construction_unit_id"
)
@TableField
(
"construction_unit_id"
)
private
Long
constructionUnitId
;
/**
* 建设单位名称
*/
@TableField
(
"construction_unit"
)
@TableField
(
"construction_unit"
)
private
String
constructionUnit
;
/**
* 项目设计单位
*/
@TableField
(
"design_unit"
)
@TableField
(
"design_unit"
)
private
String
designUnit
;
/**
* 项目设计单位id
*/
@TableField
(
"design_unit_id"
)
@TableField
(
"design_unit_id"
)
private
Long
designUnitId
;
/**
* 安装单位id
*/
@TableField
(
"installation_unit_id"
)
@TableField
(
"installation_unit_id"
)
private
Long
installationUnitId
;
/**
* 安装单位名称
*/
@TableField
(
"installation_unit"
)
@TableField
(
"installation_unit"
)
private
String
installationUnit
;
/**
* 企业id
*/
@TableField
(
"company_id"
)
@TableField
(
"company_id"
)
private
Long
companyId
;
/**
* 建设单位负责人id
*/
@TableField
(
"charge_person_id"
)
@TableField
(
"charge_person_id"
)
private
Long
chargePersonId
;
/**
* 建设单位负责人名称
*/
@TableField
(
"charge_person"
)
@TableField
(
"charge_person"
)
private
String
chargePerson
;
/**
* 组织机构代码
*/
@TableField
(
"org_code"
)
@TableField
(
"org_code"
)
private
String
orgCode
;
/**
* 项目提交日期
*/
@TableField
(
"submit_date"
)
@TableField
(
"submit_date"
)
private
Date
submitDate
;
/**
...
...
@@ -145,7 +146,7 @@ public class Project extends BaseEntity {
/**
* 备注
*/
@TableField
(
"remark"
)
@TableField
(
"remark"
)
private
String
remark
;
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/AttachmentMapper.java
View file @
b9a2e146
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Attachment
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
...
...
@@ -11,4 +12,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public
interface
AttachmentMapper
extends
BaseMapper
<
Attachment
>
{
//根据source_id删除附件
void
deleteBySourceId
(
Long
sourceId
);
//根据source_id查询附件
AttachmentDto
selectAttBySeq
(
Long
sourceId
);
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/EquipmentMapper.java
View file @
b9a2e146
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.ugp.api.mapper;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Equipment
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* 设备信息表 Mapper 接口
...
...
@@ -9,6 +10,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @author system_generator
* @date 2022-09-22
*/
@Mapper
public
interface
EquipmentMapper
extends
BaseMapper
<
Equipment
>
{
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/InstallNoticeMsgMapper.java
View file @
b9a2e146
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
mapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeMsgPageDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.InstallNoticeMsg
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
* 项目安装告知短信记录表 Mapper 接口
*
* @author system_generator
* @date 2022-
09-22
* @date 2022-
10-8
*/
@Mapper
public
interface
InstallNoticeMsgMapper
extends
BaseMapper
<
InstallNoticeMsg
>
{
//安装告知申请页面分页列表
Page
<
InstallNoticeMsgPageDto
>
InstallNoticeMsgPage
(
IPage
<
InstallNoticeMsgPageDto
>
page
,
@Param
(
"name"
)
String
name
,
@Param
(
"installationUnit"
)
String
installationUnit
);
Page
<
InstallNoticeMsgPageDto
>
selectByName
(
Page
<
InstallNoticeMsgPageDto
>
page
,
@Param
(
"name"
)
String
name
,
@Param
(
"unit"
)
String
unit
);
InstallNoticeMsgPageDto
customSelectById
(
@Param
(
"sequenceNbr"
)
Long
sequenceNbr
);
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/ProjectResourceMapper.java
View file @
b9a2e146
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
mapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeMsgPageDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.WelderEquipmentDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.ProjectResource
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.aspectj.weaver.ast.Test
;
/**
* 项目资源表(包括焊工、管材、设备) Mapper 接口
...
...
@@ -9,6 +16,16 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @author system_generator
* @date 2022-09-22
*/
@Mapper
public
interface
ProjectResourceMapper
extends
BaseMapper
<
ProjectResource
>
{
//焊机设备表
Page
<
WelderEquipmentDto
>
WelderEquipment
(
IPage
<
WelderEquipmentDto
>
page
,
@Param
(
"name"
)
String
name
,
@Param
(
"type"
)
String
type
);
Page
<
WelderEquipmentDto
>
selectByName
(
Page
<
WelderEquipmentDto
>
page
,
@Param
(
"name"
)
String
name
,
@Param
(
"unit"
)
String
unit
);
Page
<
WelderEquipmentDto
>
selectByInfo
(
Page
<
WelderEquipmentDto
>
page
,
@Param
(
"info"
)
Test
info
,
@Param
(
"unit"
)
String
unit
);
WelderEquipmentDto
customSelectById
(
@Param
(
"sequenceNbr"
)
Long
sequenceNbr
);
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/service/IEquipmentService.java
View file @
b9a2e146
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
service
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.EquipmentDto
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* 设备信息表接口类
*
...
...
@@ -8,5 +15,8 @@ package com.yeejoin.amos.boot.module.ugp.api.service;
* @date 2022-09-22
*/
public
interface
IEquipmentService
{
//添加设备+附件
EquipmentDto
saveEI
(
JSONObject
object
);
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/service/IInstallNoticeMsgService.java
View file @
b9a2e146
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeMsgPageDto
;
/**
* 项目安装告知短信记录表接口类
*
* @author system_generator
* @date 2022-
09-22
* @date 2022-
10-8
*/
public
interface
IInstallNoticeMsgService
{
//安装告知页面列表
Page
<
InstallNoticeMsgPageDto
>
installNoticeMsgList
(
Page
<
InstallNoticeMsgPageDto
>
page
,
String
name
,
String
installationUnit
);
//安装告知页面分页查询
Page
<
InstallNoticeMsgPageDto
>
selectByName
(
Page
<
InstallNoticeMsgPageDto
>
page
,
String
name
,
String
unit
);
//根据sequenceNbr查询列表数据
InstallNoticeMsgPageDto
customSelectById
(
Long
sequenceNbr
);
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/service/IProjectResourceService.java
View file @
b9a2e146
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.WelderEquipmentDto
;
import
org.aspectj.weaver.ast.Test
;
/**
* 项目资源表(包括焊工、管材、设备)接口类
*
...
...
@@ -9,4 +13,13 @@ package com.yeejoin.amos.boot.module.ugp.api.service;
*/
public
interface
IProjectResourceService
{
//焊机设备表
Page
<
WelderEquipmentDto
>
installNoticeMsgList
(
Page
<
WelderEquipmentDto
>
page
,
String
name
,
String
type
);
//焊机设备页面分页查询
Page
<
WelderEquipmentDto
>
selectByName
(
Page
<
WelderEquipmentDto
>
page
,
String
name
,
String
unit
);
Page
<
WelderEquipmentDto
>
selectByInfo
(
Page
<
WelderEquipmentDto
>
page
,
Test
info
,
String
unit
);
//根据sequenceNbr查询列表数据
WelderEquipmentDto
customSelectById
(
Long
sequenceNbr
);
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/AttachmentMapper.xml
View file @
b9a2e146
...
...
@@ -2,4 +2,14 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.ugp.api.mapper.AttachmentMapper"
>
<!-- //根据source_id删除附件-->
<delete
id=
"deleteBySourceId"
>
delete FROM tz_ugp_attachment where source_id=#{sourceId}
</delete>
<!-- //根据source_id查询附件-->
<select
id=
"selectAttBySeq"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.AttachmentDto"
>
select * from tz_ugp_attachment where source_id=#{sourceId}
</select>
</mapper>
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/InstallNoticeMsgMapper.xml
View file @
b9a2e146
...
...
@@ -2,4 +2,69 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.ugp.api.mapper.InstallNoticeMsgMapper"
>
<select
id=
"InstallNoticeMsgPage"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeMsgPageDto"
>
SELECT name,
install_region,
start_date,
construction_unit,
installation_unit,
progress_status,
target_unit_id,
target_person_id,
content,
send_time
FROM tz_ugp_project,
tz_ugp_install_notice_msg,
tz_ugp_install_notice
where tz_ugp_project.sequence_nbr = tz_ugp_install_notice.project_id
and tz_ugp_install_notice_msg.install_notice_id = tz_ugp_install_notice.sequence_nbr
<if
test=
"name != null and name != ''"
>
and tz_ugp_project.name = #{name}
</if>
<if
test=
"installationUnit != null and installationUnit != ''"
>
and tz_ugp_project.installationUnit = #{installationUnit}
</if>
</select>
<select
id=
"selectByName"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeMsgPageDto"
>
SELECT name,
install_region,
start_date,
construction_unit,
installation_unit,
progress_status,
target_unit_id,
target_person_id,
content,
send_time
FROM tz_ugp_project,
tz_ugp_install_notice_msg,
tz_ugp_install_notice
where tz_ugp_project.sequence_nbr = tz_ugp_install_notice.project_id
and tz_ugp_install_notice_msg.install_notice_id = tz_ugp_install_notice.sequence_nbr
<if
test=
"name != null and name != ''"
>
and tz_ugp_project.name = #{name}
</if>
<if
test=
"unit != null and unit != ''"
>
and tz_ugp_project.construction_unit_id = #{unit}
</if>
</select>
<select
id=
"customSelectById"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeMsgPageDto"
>
SELECT name,
install_region,
start_date,
construction_unit,
installation_unit,
progress_status,
target_unit_id,
target_person_id,
content,
send_time
FROM tz_ugp_project,
tz_ugp_install_notice_msg,
tz_ugp_install_notice
where tz_ugp_project.sequence_nbr = tz_ugp_install_notice.project_id
and tz_ugp_install_notice_msg.install_notice_id = tz_ugp_install_notice.sequence_nbr
and tz_ugp_project.sequence_nbr = #{sequenceNbr}
</select>
</mapper>
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/ProjectResourceMapper.xml
View file @
b9a2e146
...
...
@@ -2,4 +2,101 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectResourceMapper"
>
<select
id=
"WelderEquipment"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.WelderEquipmentDto"
>
SELECT tz_ugp_equipment.name,
tz_ugp_equipment.code,
tz_ugp_equipment.type,
tz_ugp_project.name AS projectName,
tz_ugp_project.sequence_nbr AS projectId,
tz_ugp_equipment.manufacturer,
tz_ugp_equipment.manufacture_date,
tz_ugp_equipment.service_life,
tz_ugp_equipment.verify_status,
info,
tz_ugp_project_resource.sequence_nbr as project_resource_id
FROM tz_ugp_project
inner join tz_ugp_project_resource on tz_ugp_project.sequence_nbr = tz_ugp_project_resource.project_id
and tz_ugp_project_resource.type = 'equipment'
inner join tz_ugp_equipment on tz_ugp_project_resource.resource_id = tz_ugp_equipment.sequence_nbr
left join tz_ugp_attachment on tz_ugp_equipment.sequence_nbr = tz_ugp_attachment.source_id and
tz_ugp_attachment.type = 'enuipment'
<where>
<if
test=
"name != null and name != ''"
>
and tz_ugp_equipment.name = #{name}
</if>
<if
test=
"type != null and type != ''"
>
and tz_ugp_equipment.type = #{type}
</if>
</where>
</select>
<select
id=
"selectByName"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.WelderEquipmentDto"
>
SELECT tz_ugp_equipment.name,
tz_ugp_equipment.code,
tz_ugp_equipment.type,
tz_ugp_project.name as project_Name,
tz_ugp_equipment.manufacturer,
tz_ugp_equipment.manufacture_date,
tz_ugp_equipment.service_life,
tz_ugp_equipment.verify_status,
info
FROM tz_ugp_project
inner join tz_ugp_project_resource on tz_ugp_project.sequence_nbr = tz_ugp_project_resource.project_id
and tz_ugp_project_resource.type = 'equipment'
inner join tz_ugp_equipment on tz_ugp_project_resource.resource_id = tz_ugp_equipment.sequence_nbr
left join tz_ugp_attachment on tz_ugp_equipment.sequence_nbr = tz_ugp_attachment.source_id and
tz_ugp_attachment.type = 'enuipment'
<where>
<if
test=
"name != null and name != ''"
>
and tz_ugp_project.name = #{name}
</if>
<if
test=
"unit != null and unit != ''"
>
and tz_ugp_project.construction_unit_id = #{unit}
</if>
</where>
</select>
<select
id=
"selectByInfo"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.WelderEquipmentDto"
>
SELECT tz_ugp_equipment.name,
tz_ugp_equipment.code,
tz_ugp_equipment.type,
tz_ugp_project.name AS project_Name,
tz_ugp_equipment.manufacturer,
tz_ugp_equipment.manufacture_date,
tz_ugp_equipment.service_life,
tz_ugp_equipment.verify_status,
info
FROM tz_ugp_project
inner join tz_ugp_project_resource on tz_ugp_project.sequence_nbr = tz_ugp_project_resource.project_id
and tz_ugp_project_resource.type = 'equipment'
inner join tz_ugp_equipment on tz_ugp_project_resource.resource_id = tz_ugp_equipment.sequence_nbr
left join tz_ugp_attachment on tz_ugp_equipment.sequence_nbr = tz_ugp_attachment.source_id and
tz_ugp_attachment.type = 'enuipment'
<where>
<if
test=
"info != null and info != ''"
>
and tz_ugp_attachment.info = #{info}
</if>
<if
test=
"unit != null and unit != ''"
>
and tz_ugp_attachment.company_id = #{unit}
</if>
</where>
</select>
<select
id=
"customSelectById"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.WelderEquipmentDto"
>
SELECT tz_ugp_equipment.name,
tz_ugp_equipment.code,
tz_ugp_equipment.type,
tz_ugp_project.name AS project_Name,
tz_ugp_equipment.manufacturer,
tz_ugp_equipment.manufacture_date,
tz_ugp_equipment.service_life,
tz_ugp_equipment.verify_status,
info
FROM tz_ugp_project
inner join tz_ugp_project_resource on tz_ugp_project.sequence_nbr = tz_ugp_project_resource.project_id
and tz_ugp_project_resource.type = 'equipment'
inner join tz_ugp_equipment on tz_ugp_project_resource.resource_id = tz_ugp_equipment.sequence_nbr
left join tz_ugp_attachment on tz_ugp_equipment.sequence_nbr = tz_ugp_attachment.source_id and
tz_ugp_attachment.type = 'enuipment'
where tz_ugp_equipment.sequence_nbr = #{sequenceNbr}
</select>
</mapper>
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/CompanyController.java
View file @
b9a2e146
...
...
@@ -137,7 +137,7 @@ public class CompanyController extends BaseController {
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"企业信息表列表全部数据查询"
,
notes
=
"企业信息表列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
CompanyDto
>>
selectForList
()
{
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/EquipmentController.java
View file @
b9a2e146
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/controller/InstallNoticeMsgController.java
View file @
b9a2e146
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
controller
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeMsgPageDto
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
...
...
@@ -36,7 +37,7 @@ public class InstallNoticeMsgController extends BaseController {
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增项目安装告知短信记录表"
,
notes
=
"新增项目安装告知短信记录表"
)
public
ResponseModel
<
InstallNoticeMsgDto
>
save
(
@RequestBody
InstallNoticeMsgDto
model
)
{
...
...
@@ -50,7 +51,7 @@ public class InstallNoticeMsgController extends BaseController {
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新项目安装告知短信记录表"
,
notes
=
"根据sequenceNbr更新项目安装告知短信记录表"
)
public
ResponseModel
<
InstallNoticeMsgDto
>
updateBySequenceNbrInstallNoticeMsg
(
@RequestBody
InstallNoticeMsgDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
...
...
@@ -64,7 +65,7 @@ public class InstallNoticeMsgController extends BaseController {
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除项目安装告知短信记录表"
,
notes
=
"根据sequenceNbr删除项目安装告知短信记录表"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
){
...
...
@@ -77,7 +78,7 @@ public class InstallNoticeMsgController extends BaseController {
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个项目安装告知短信记录表"
,
notes
=
"根据sequenceNbr查询单个项目安装告知短信记录表"
)
public
ResponseModel
<
InstallNoticeMsgDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
...
...
@@ -91,7 +92,7 @@ public class InstallNoticeMsgController extends BaseController {
* @param current 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"项目安装告知短信记录表分页查询"
,
notes
=
"项目安装告知短信记录表分页查询"
)
public
ResponseModel
<
Page
<
InstallNoticeMsgDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
...
...
@@ -107,10 +108,32 @@ public class InstallNoticeMsgController extends BaseController {
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"项目安装告知短信记录表列表全部数据查询"
,
notes
=
"项目安装告知短信记录表列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
InstallNoticeMsgDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
installNoticeMsgServiceImpl
.
queryForInstallNoticeMsgList
());
}
/**
* 安装告知短信通知记录列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/msgpage"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"安装告知短信记录表分页查询"
,
notes
=
"项目安装告知短信记录表分页查询"
)
public
ResponseModel
<
Page
<
InstallNoticeMsgPageDto
>>
queryForMsgPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
,
@RequestParam
(
value
=
"installationUnit"
,
required
=
false
)
String
installationUnit
){
Page
<
InstallNoticeMsgPageDto
>
page
=
new
Page
<
InstallNoticeMsgPageDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
installNoticeMsgServiceImpl
.
installNoticeMsgList
(
page
,
name
,
installationUnit
));
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/ProjectController.java
View file @
b9a2e146
...
...
@@ -112,12 +112,15 @@ public class ProjectController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"项目信息表分页查询"
,
notes
=
"项目信息表分页查询"
)
public
ResponseModel
<
Page
<
ProjectDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
public
ResponseModel
<
Page
<
ProjectDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
,
@RequestParam
(
value
=
"constructionUnit"
,
required
=
false
)
String
constructionUnit
)
{
Page
<
ProjectDto
>
page
=
new
Page
<
ProjectDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
projectServiceImpl
.
queryForProjectPage
(
page
));
return
ResponseHelper
.
buildResponse
(
projectServiceImpl
.
queryForProjectPage
(
page
,
name
,
constructionUnit
));
}
/**
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/ProjectResourceController.java
View file @
b9a2e146
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/controller/SuperviseRuleController.java
View file @
b9a2e146
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
controller
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.sql.SQLIntegrityConstraintViolationException
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.TreeSet
;
import
java.util.stream.Collectors
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.SuperviseRuleServiceImpl
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -36,10 +47,11 @@ public class SuperviseRuleController extends BaseController {
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增监管区域规则表"
,
notes
=
"新增监管区域规则表"
)
public
ResponseModel
<
SuperviseRuleDto
>
save
(
@RequestBody
SuperviseRuleDto
model
)
{
model
.
setCreateDate
(
new
Date
());
model
=
superviseRuleServiceImpl
.
createWithModel
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
}
...
...
@@ -50,10 +62,11 @@ public class SuperviseRuleController extends BaseController {
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"
/{sequenceNbr}
"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@PutMapping
(
value
=
""
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新监管区域规则表"
,
notes
=
"根据sequenceNbr更新监管区域规则表"
)
public
ResponseModel
<
SuperviseRuleDto
>
updateBySequenceNbrSuperviseRule
(
@RequestBody
SuperviseRuleDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
public
ResponseModel
<
SuperviseRuleDto
>
updateBySequenceNbrSuperviseRule
(
@RequestBody
SuperviseRuleDto
model
,
@RequestParam
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setRecDate
(
new
Date
());
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
superviseRuleServiceImpl
.
updateWithModel
(
model
));
}
...
...
@@ -64,11 +77,16 @@ public class SuperviseRuleController extends BaseController {
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"
/{sequenceNbr}
"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@DeleteMapping
(
value
=
""
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除监管区域规则表"
,
notes
=
"根据sequenceNbr删除监管区域规则表"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
){
return
ResponseHelper
.
buildResponse
(
superviseRuleServiceImpl
.
removeById
(
sequenceNbr
));
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@RequestParam
(
value
=
"sequenceNbr"
)
String
sequenceNbr
){
List
<
Long
>
ids
=
Arrays
.
stream
(
sequenceNbr
.
split
(
","
)).
map
(
Long:
:
valueOf
).
collect
(
Collectors
.
toList
());
try
{
return
ResponseHelper
.
buildResponse
(
superviseRuleServiceImpl
.
removeByIds
(
ids
));
}
catch
(
Exception
e
){
return
ResponseHelper
.
buildResponse
(
false
);
}
}
/**
...
...
@@ -77,10 +95,10 @@ public class SuperviseRuleController extends BaseController {
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"
/{sequenceNbr}
"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
""
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个监管区域规则表"
,
notes
=
"根据sequenceNbr查询单个监管区域规则表"
)
public
ResponseModel
<
SuperviseRuleDto
>
selectOne
(
@
PathVariable
Long
sequenceNbr
)
{
public
ResponseModel
<
SuperviseRuleDto
>
selectOne
(
@
RequestParam
(
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
superviseRuleServiceImpl
.
queryBySeq
(
sequenceNbr
));
}
...
...
@@ -91,15 +109,20 @@ public class SuperviseRuleController extends BaseController {
* @param current 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"监管区域规则表分页查询"
,
notes
=
"监管区域规则表分页查询"
)
public
ResponseModel
<
Page
<
SuperviseRuleDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
public
ResponseModel
<
Page
<
SuperviseRuleDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
int
adminRegionCode
,
@RequestParam
(
value
=
"superviseDeptId"
,
required
=
false
)
Long
superviseDeptId
,
@RequestParam
(
value
=
"inspectionUnitId"
,
required
=
false
)
Long
inspectionUnitId
)
{
Page
<
SuperviseRuleDto
>
page
=
new
Page
<
SuperviseRuleDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
superviseRuleServiceImpl
.
queryForSuperviseRulePage
(
page
));
return
ResponseHelper
.
buildResponse
(
superviseRuleServiceImpl
.
queryForSuperviseRulePage
(
page
,
superviseDeptId
,
inspectionUnitId
));
}
/**
...
...
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 @
b9a2e146
...
...
@@ -2,11 +2,17 @@ package com.yeejoin.amos.boot.module.ugp.biz.service.impl;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Equipment
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.EquipmentMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IEquipmentService
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.EquipmentDto
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -26,18 +32,24 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
@Autowired
EquipmentMapper
equipmentMapper
;
@Autowired
AttachmentServiceImpl
attachmentServiceImpl
;
/**
* 分页查询
*/
public
Page
<
EquipmentDto
>
queryForEquipmentPage
(
Page
<
EquipmentDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
public
Page
<
EquipmentDto
>
queryForEquipmentPage
(
Page
<
EquipmentDto
>
page
,
String
name
,
String
code
,
String
verifyStatus
)
{
return
this
.
queryForPage
(
page
,
null
,
false
,
name
,
code
,
verifyStatus
);
}
/**
* 列表查询 示例
*/
public
List
<
EquipmentDto
>
queryForEquipmentList
()
{
return
this
.
queryForList
(
""
,
false
);
public
List
<
EquipmentDto
>
queryForEquipmentList
()
{
return
this
.
queryForList
(
""
,
false
);
}
/**
...
...
@@ -62,4 +74,50 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
return
names
;
}
/**
* 根据sourceId添加附件
* @param object
*/
public
void
saveAttachment
(
JSONObject
object
,
Long
SequenceNbr
){
AttachmentDto
attachmentDto
=
new
AttachmentDto
();
JSONArray
subForm
=
object
.
getJSONArray
(
"subForm"
);
for
(
Object
o:
subForm
){
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
o
));
jsonObject
.
getString
(
"Symbol_key"
);
JSONArray
jsonArray
=
jsonObject
.
getJSONArray
(
"info"
);
for
(
Object
j:
jsonArray
){
JSONObject
info
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
j
));
String
name
=
info
.
getString
(
"name"
);
attachmentDto
.
setSourceId
(
SequenceNbr
);
attachmentDto
.
setName
(
info
.
getString
(
"name"
));
// attachmentDto.setInfo("name: "+name+","+
// "type: "+name.substring(name.lastIndexOf(".")+1)+","+
// "path: "+info.getString("url")+","+
// "certCode: "+jsonObject.getString("certCode")+","+
// "certType: "+jsonObject.getString("certType"));
attachmentDto
.
setInfo
(
JSON
.
toJSONString
(
subForm
));
attachmentDto
.
setType
(
name
.
substring
(
name
.
lastIndexOf
(
"."
)+
1
));
attachmentServiceImpl
.
createWithModel
(
attachmentDto
);
break
;
}
}
}
@Override
public
EquipmentDto
saveEI
(
JSONObject
object
)
{
EquipmentDto
model
=
new
EquipmentDto
();
model
.
setName
(
object
.
getString
(
"name"
));
model
.
setType
(
object
.
getString
(
"type"
));
model
.
setCode
(
object
.
getString
(
"code"
));
model
.
setManufacturer
(
object
.
getString
(
"manufacturer"
));
model
.
setManufactureDate
(
object
.
getDate
(
"manufactureDate"
));
model
.
setServiceLife
(
object
.
getString
(
"serviceLife"
));
model
.
setInspectionDate
(
object
.
getDate
(
"inspectionDate"
));
model
.
setUseStatus
(
object
.
getString
(
"useStatus"
));
model
.
setVerifyStatus
(
object
.
getString
(
"verifyStatus"
));
EquipmentDto
result
=
this
.
createWithModel
(
model
);
return
result
;
}
}
\ 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/InstallNoticeMsgServiceImpl.java
View file @
b9a2e146
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
service
.
impl
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeMsgPageDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.InstallNoticeMsg
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.InstallNoticeMsgMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IInstallNoticeMsgService
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeMsgDto
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -17,6 +19,9 @@ import java.util.List;
*/
@Service
public
class
InstallNoticeMsgServiceImpl
extends
BaseService
<
InstallNoticeMsgDto
,
InstallNoticeMsg
,
InstallNoticeMsgMapper
>
implements
IInstallNoticeMsgService
{
@Autowired
InstallNoticeMsgMapper
installNoticeMsgMapper
;
/**
* 分页查询
*/
...
...
@@ -30,4 +35,22 @@ public class InstallNoticeMsgServiceImpl extends BaseService<InstallNoticeMsgDto
public
List
<
InstallNoticeMsgDto
>
queryForInstallNoticeMsgList
()
{
return
this
.
queryForList
(
""
,
false
);
}
/**
* 项目安装告知短信通知记录分页查询
*/
@Override
public
Page
<
InstallNoticeMsgPageDto
>
installNoticeMsgList
(
Page
<
InstallNoticeMsgPageDto
>
page
,
String
name
,
String
installationUnit
){
return
this
.
getBaseMapper
().
InstallNoticeMsgPage
(
page
,
name
,
installationUnit
);
}
@Override
public
Page
<
InstallNoticeMsgPageDto
>
selectByName
(
Page
<
InstallNoticeMsgPageDto
>
page
,
String
name
,
String
unit
)
{
return
this
.
getBaseMapper
().
selectByName
(
page
,
name
,
unit
);
}
@Override
public
InstallNoticeMsgPageDto
customSelectById
(
Long
sequenceNbr
)
{
return
this
.
getBaseMapper
().
customSelectById
(
sequenceNbr
);
}
}
\ 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/ProjectResourceServiceImpl.java
View file @
b9a2e146
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.WelderEquipmentDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Equipment
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
...
...
@@ -9,13 +12,22 @@ import com.yeejoin.amos.boot.module.ugp.api.mapper.EquipmentMapper;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectResourceMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IProjectResourceService
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.ProjectResourceDto
;
import
org.aspectj.weaver.ast.Test
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.Map
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
Enum
.
ProjectResourceEnum
.*;
...
...
@@ -27,12 +39,13 @@ import static com.yeejoin.amos.boot.module.ugp.api.Enum.ProjectResourceEnum.*;
* @date 2022-09-22
*/
@Service
public
class
ProjectResourceServiceImpl
extends
BaseService
<
ProjectResourceDto
,
ProjectResource
,
ProjectResourceMapper
>
implements
IProjectResourceService
{
@Autowired
EquipmentMapper
equipmentMapper
;
public
class
ProjectResourceServiceImpl
extends
BaseService
<
ProjectResourceDto
,
ProjectResource
,
ProjectResourceMapper
>
implements
IProjectResourceService
{
@Autowired
ProjectResourceMapper
projectResourceMapper
;
@Autowired
EquipmentMapper
equipmentMapper
;
/**
* 分页查询
...
...
@@ -48,6 +61,63 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,
return
this
.
queryForList
(
""
,
false
);
}
@Override
public
Page
<
WelderEquipmentDto
>
installNoticeMsgList
(
Page
<
WelderEquipmentDto
>
page
,
String
name
,
String
type
)
{
return
this
.
projectResourceMapper
.
WelderEquipment
(
page
,
name
,
type
);
}
@Override
public
Page
<
WelderEquipmentDto
>
selectByName
(
Page
<
WelderEquipmentDto
>
page
,
String
name
,
String
unit
)
{
return
null
;
}
@Override
public
Page
<
WelderEquipmentDto
>
selectByInfo
(
Page
<
WelderEquipmentDto
>
page
,
Test
info
,
String
unit
)
{
return
null
;
}
@Override
public
WelderEquipmentDto
customSelectById
(
Long
sequenceNbr
)
{
return
null
;
}
/**
* 项目设备新增
*/
@Transactional
()
public
void
welderSave
(
WelderEquipmentDto
welderEquipmentDto
)
{
// 保存设备
Equipment
equipment
=
new
Equipment
();
BeanUtils
.
copyProperties
(
welderEquipmentDto
,
equipment
);
equipmentMapper
.
insert
(
equipment
);
// 处理附件
MultipartFile
[]
files
=
welderEquipmentDto
.
getFiles
();
// 保存项目与设备对应关系
ProjectResource
projectResource
=
new
ProjectResource
();
projectResource
.
setProjectId
(
welderEquipmentDto
.
getProjectId
());
projectResource
.
setName
(
equipment
.
getName
());
projectResource
.
setType
(
"equipment"
);
projectResource
.
setResourceId
(
equipment
.
getSequenceNbr
());
projectResourceMapper
.
insert
(
projectResource
);
}
/**
* 项目设备删除
* @param ids
*/
@Transactional
public
void
welderDelete
(
String
ids
)
{
this
.
list
(
new
QueryWrapper
<
ProjectResource
>().
lambda
().
in
(
ProjectResource:
:
getSequenceNbr
,
Arrays
.
stream
(
ids
.
split
(
","
)).
map
(
Long:
:
valueOf
).
collect
(
Collectors
.
toList
()))
).
forEach
(
item
->
{
this
.
equipmentMapper
.
deleteById
(
item
.
getResourceId
());
this
.
projectResourceMapper
.
deleteById
(
item
.
getSequenceNbr
());
});
}
/**
* 存储项目设备关系
*/
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/SuperviseRuleServiceImpl.java
View file @
b9a2e146
...
...
@@ -20,8 +20,8 @@ public class SuperviseRuleServiceImpl extends BaseService<SuperviseRuleDto,Super
/**
* 分页查询
*/
public
Page
<
SuperviseRuleDto
>
queryForSuperviseRulePage
(
Page
<
SuperviseRuleDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
public
Page
<
SuperviseRuleDto
>
queryForSuperviseRulePage
(
Page
<
SuperviseRuleDto
>
page
,
Long
superviseDeptId
,
Long
inspectionUnitId
)
{
return
this
.
queryForPage
(
page
,
null
,
false
,
superviseDeptId
,
inspectionUnitId
);
}
/**
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/resources/application.properties
View file @
b9a2e146
...
...
@@ -23,11 +23,13 @@ redis.cache.failure.time=10800
## emqx properties:
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}
emqx.broker
=
tcp://
172.16.10.90
:1883
emqx.broker
=
tcp://
39.98.45.134
:1883
emqx.user-name
=
super
emqx.password
=
123456
fire-rescue
=
123
params.work.flow.processDefinitionKey
=
xiangmulixiangliucheng
amos.secret.key
=
ugp
\ No newline at end of file
amos.secret.key
=
ugp
#
logging.level.com.yeejoin.amos
=
error
\ No newline at end of file
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