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
d402b3a1
Commit
d402b3a1
authored
Nov 11, 2022
by
limei
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
3268d426
fd3fd6b5
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
285 additions
and
76 deletions
+285
-76
EquipmentDto.java
...om/yeejoin/amos/boot/module/ugp/api/dto/EquipmentDto.java
+2
-0
InstallNoticeDto.java
...eejoin/amos/boot/module/ugp/api/dto/InstallNoticeDto.java
+4
-0
ProjectDto.java
.../com/yeejoin/amos/boot/module/ugp/api/dto/ProjectDto.java
+1
-0
ProjectMaterialDto.java
...join/amos/boot/module/ugp/api/dto/ProjectMaterialDto.java
+1
-1
ProjectResourceDto.java
...join/amos/boot/module/ugp/api/dto/ProjectResourceDto.java
+64
-0
CompanyMapper.java
...eejoin/amos/boot/module/ugp/api/mapper/CompanyMapper.java
+2
-1
ProjectResourceMapper.java
...mos/boot/module/ugp/api/mapper/ProjectResourceMapper.java
+4
-1
ICompanyService.java
...oin/amos/boot/module/ugp/api/service/ICompanyService.java
+2
-1
CompanyMapper.xml
...odule-ugp-api/src/main/resources/mapper/CompanyMapper.xml
+4
-4
EquipmentMapper.xml
...ule-ugp-api/src/main/resources/mapper/EquipmentMapper.xml
+1
-1
ProjectResourceMapper.xml
...p-api/src/main/resources/mapper/ProjectResourceMapper.xml
+68
-0
CompanyController.java
...mos/boot/module/ugp/biz/controller/CompanyController.java
+3
-4
EquipmentController.java
...s/boot/module/ugp/biz/controller/EquipmentController.java
+8
-2
ProjectController.java
...mos/boot/module/ugp/biz/controller/ProjectController.java
+20
-3
ProjectResourceController.java
.../module/ugp/biz/controller/ProjectResourceController.java
+2
-2
CompanyServiceImpl.java
.../boot/module/ugp/biz/service/impl/CompanyServiceImpl.java
+5
-16
InstallNoticeServiceImpl.java
...module/ugp/biz/service/impl/InstallNoticeServiceImpl.java
+2
-0
OrgServiceImpl.java
...amos/boot/module/ugp/biz/service/impl/OrgServiceImpl.java
+13
-2
ProblemInitiationServiceImpl.java
...le/ugp/biz/service/impl/ProblemInitiationServiceImpl.java
+25
-4
ProjectResourceServiceImpl.java
...dule/ugp/biz/service/impl/ProjectResourceServiceImpl.java
+35
-31
ProjectServiceImpl.java
.../boot/module/ugp/biz/service/impl/ProjectServiceImpl.java
+19
-3
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/EquipmentDto.java
View file @
d402b3a1
...
...
@@ -59,4 +59,6 @@ public class EquipmentDto extends BaseDto {
@ApiModelProperty
(
value
=
"单位机构代码"
)
private
String
orgCode
;
private
String
companyName
;
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/InstallNoticeDto.java
View file @
d402b3a1
...
...
@@ -57,4 +57,8 @@ public class InstallNoticeDto extends BaseDto {
@ApiModelProperty
(
value
=
"安装负责人"
)
private
String
installPri
;
private
String
projectName
;
private
String
companyName
;
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/ProjectDto.java
View file @
d402b3a1
...
...
@@ -106,4 +106,5 @@ public class ProjectDto extends BaseDto {
private
String
insDep
;
private
String
insPerson
;
private
String
startDateString
;
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/ProjectMaterialDto.java
View file @
d402b3a1
...
...
@@ -25,7 +25,7 @@ public class ProjectMaterialDto extends BaseDto {
@ApiModelProperty
(
value
=
"名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"
项目
id"
)
@ApiModelProperty
(
value
=
"
企业
id"
)
private
Long
companyId
;
@ApiModelProperty
(
value
=
"管材编号"
)
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/ProjectResourceDto.java
View file @
d402b3a1
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
dto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Equipment
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
...
...
@@ -27,10 +28,73 @@ public class ProjectResourceDto extends BaseDto {
@ApiModelProperty
(
value
=
"资源名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"sb名称"
)
private
String
equipmentName
;
@ApiModelProperty
(
value
=
"资源类型(welder、material、equipment)"
)
private
String
type
;
@ApiModelProperty
(
value
=
"资源id"
)
private
Long
resourceId
;
@ApiModelProperty
(
value
=
"管材编号"
)
private
String
code
;
@ApiModelProperty
(
value
=
"管材规格"
)
private
String
spec
;
@ApiModelProperty
(
value
=
"管材壁厚"
)
private
Integer
wallThickness
;
@ApiModelProperty
(
value
=
"生产厂家"
)
private
String
manufacturer
;
@ApiModelProperty
(
value
=
"生产日期"
)
private
Date
manufactureDate
;
@ApiModelProperty
(
value
=
"生产编号"
)
private
String
batchNum
;
@ApiModelProperty
(
value
=
"项目名称"
)
private
String
projectName
;
@ApiModelProperty
(
value
=
"项目资源id"
)
private
Long
projectResourceId
;
Equipment
equipment
;
@ApiModelProperty
(
value
=
"企业id"
)
private
Long
companyId
;
// private String equipmentCode;
// private String equipmentType;
// private String equipmentManufacturer;
// private String equipmentManufacture_date;
@ApiModelProperty
(
value
=
"使用年限"
)
private
String
serviceLife
;
@ApiModelProperty
(
value
=
"检定状态"
)
private
String
verifyStatus
;
@ApiModelProperty
(
value
=
"检验日期"
)
private
Date
inspectionDate
;
@ApiModelProperty
(
value
=
"使用状态"
)
private
String
useStatus
;
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
@ApiModelProperty
(
value
=
"单位机构代码"
)
private
String
orgCode
;
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/CompanyMapper.java
View file @
d402b3a1
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
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.entity.Company
;
...
...
@@ -17,5 +18,5 @@ import java.util.List;
*/
@Mapper
public
interface
CompanyMapper
extends
BaseMapper
<
Company
>
{
List
<
CompanyDto
>
queryCompanyPage
(
Company
companyParam
);
IPage
<
CompanyDto
>
queryCompanyPage
(
IPage
<
CompanyDto
>
page
,
Company
companyParam
);
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/ProjectResourceMapper.java
View file @
d402b3a1
...
...
@@ -3,13 +3,13 @@ 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.*
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Material
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Project
;
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
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
java.util.List
;
import
java.util.Set
;
...
...
@@ -43,4 +43,7 @@ public interface ProjectResourceMapper extends BaseMapper<ProjectResource> {
* 根据登录人角色去筛选
*/
List
<
Project
>
getProjectPage
(
String
roleName
,
String
companyId
,
Set
<
String
>
codes
);
List
<
ProjectResourceDto
>
getProjectMaterial
(
String
type
,
Set
<
String
>
codes
,
@RequestBody
(
required
=
false
)
ProjectResourceDto
projectResourceDto
);
List
<
ProjectResourceDto
>
getProjectEquipment
(
String
type
,
Set
<
String
>
codes
,
@RequestBody
(
required
=
false
)
ProjectResourceDto
projectResourceDto
);
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/service/ICompanyService.java
View file @
d402b3a1
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.ugp.api.service;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
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.entity.Company
;
...
...
@@ -14,7 +15,7 @@ import com.yeejoin.amos.boot.module.ugp.api.entity.Company;
*/
public
interface
ICompanyService
{
Page
<
CompanyDto
>
queryCompanyPage
(
int
current
,
int
size
,
Company
company
);
IPage
<
CompanyDto
>
queryCompanyPage
(
int
current
,
int
size
,
Company
company
);
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/CompanyMapper.xml
View file @
d402b3a1
...
...
@@ -6,11 +6,11 @@
<select
id=
"queryCompanyPage"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.entity.Company"
>
select * from tz_ugp_company
<where>
<if
test=
"
name != '' and
name != null"
>
and `name` like concat('%',#{name},'%')
<if
test=
"
companyParam.name != '' and companyParam.
name != null"
>
and `name` like concat('%',#{
companyParam.
name},'%')
</if>
<if
test=
"
type != '' and
type != null"
>
and `type` like concat('%',#{type},'%')
<if
test=
"
companyParam.type != '' and companyParam.
type != null"
>
and `type` like concat('%',#{
companyParam.
type},'%')
</if>
</where>
</select>
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/EquipmentMapper.xml
View file @
d402b3a1
...
...
@@ -2,7 +2,7 @@
<!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.EquipmentMapper"
>
<select
id=
"queryEquipmentPage"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.
entity.Equipment
"
>
<select
id=
"queryEquipmentPage"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.
dto.EquipmentDto
"
>
select * from tz_ugp_equipment
<where>
<if
test=
"equipment.name != '' and equipment.name != null"
>
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/ProjectResourceMapper.xml
View file @
d402b3a1
...
...
@@ -134,4 +134,72 @@
</where>
</select>
<select
id=
"getProjectMaterial"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.ProjectResourceDto"
>
SELECT
material.`name`,
material.`code`,
material.type,
material.spec,
material.wall_thickness,
material.manufacturer,
material.manufacture_date,
material.batch_num,
material.sequence_nbr,
material.rec_date,
project.`name` AS projectName
FROM tz_ugp_project_resource resource
LEFT JOIN tz_ugp_material AS material ON resource.resource_id = material.sequence_nbr
LEFT JOIN tz_ugp_project AS project ON project.sequence_nbr = resource.project_id
<where>
resource.type = #{type}
<if
test=
"projectResourceDto !=null"
>
<if
test=
"projectResourceDto.name !=null and projectResourceDto.name != ''"
>
and material.`name` LIKE CONCAT("%",#{projectResourceDto.name},"%")
</if>
<if
test=
"projectResourceDto.projectName !=null and projectResourceDto.projectName != ''"
>
and project.`name` LIKE CONCAT("%",#{projectResourceDto.projectName},"%")
</if>
</if>
<if
test=
"codes !=null"
>
AND resource.project_id in
<foreach
collection=
"codes"
item =
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</where>
</select>
<select
id=
"getProjectEquipment"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.ProjectResourceDto"
>
SELECT
equipment.name ,
equipment.`code`,
equipment.type ,
equipment.manufacturer,
equipment.manufacture_date ,
equipment.service_life,
equipment.verify_status,
equipment.sequence_nbr,
project.`name` AS projectName
FROM tz_ugp_project_resource resource
LEFT JOIN tz_ugp_project AS project ON project.sequence_nbr = resource.project_id
LEFT JOIN tz_ugp_equipment AS equipment ON equipment.sequence_nbr = resource.resource_id
<where>
resource.type = #{type}
<if
test=
"projectResourceDto !=null"
>
<if
test=
"projectResourceDto.name !=null and projectResourceDto.name != ''"
>
and equipment.`name` LIKE CONCAT("%",#{projectResourceDto.name},"%")
</if>
<if
test=
"projectResourceDto.projectName !=null and projectResourceDto.projectName != ''"
>
and project.`name` LIKE CONCAT("%",#{projectResourceDto.projectName},"%")
</if>
</if>
<if
test=
"codes !=null"
>
AND resource.project_id in
<foreach
collection=
"codes"
item =
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</where>
</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 @
d402b3a1
...
...
@@ -164,11 +164,10 @@ public class CompanyController extends BaseController {
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@
Ge
tMapping
(
value
=
"/page"
)
@
Pos
tMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"企业信息表分页查询"
,
notes
=
"企业信息表分页查询"
)
public
ResponseModel
<
Page
<
CompanyDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
Company
company
)
{
public
ResponseModel
<
IPage
<
CompanyDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestBody
Company
company
)
{
return
ResponseHelper
.
buildResponse
(
companyServiceImpl
.
queryCompanyPage
(
current
,
size
,
company
));
}
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/EquipmentController.java
View file @
d402b3a1
...
...
@@ -142,8 +142,14 @@ public class EquipmentController extends BaseController {
IPage
<
EquipmentDto
>
page
=
new
Page
<>();
page
.
setSize
(
size
);
page
.
setCurrent
(
current
);
// equipment.setCompanyId(orgService.getReginParams().getBusinessInfo().getCompanySequenceNbr());
return
ResponseHelper
.
buildResponse
(
equipmentServiceImpl
.
queryEquipmentPage
(
page
,
equipment
));
page
=
equipmentServiceImpl
.
queryEquipmentPage
(
page
,
equipment
);
List
<
EquipmentDto
>
equipments
=
page
.
getRecords
();
if
(!
ValidationUtil
.
isEmpty
(
equipments
))
{
for
(
EquipmentDto
equipmentDto
:
equipments
)
{
equipmentDto
.
setCompanyName
((
String
)
orgService
.
getdetialInfo
(
String
.
valueOf
(
equipmentDto
.
getCompanyId
())).
get
(
"name"
));
}
}
return
ResponseHelper
.
buildResponse
(
page
);
}
/**
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/ProjectController.java
View file @
d402b3a1
...
...
@@ -28,6 +28,7 @@ import io.swagger.annotations.Api;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
...
...
@@ -77,7 +78,6 @@ public class ProjectController extends BaseController {
public
ResponseModel
<
ProjectDto
>
save
(
@RequestBody
ProjectDto
model
)
{
String
regionName
=
""
,
regionCode
=
""
;
Map
<
String
,
String
>
map
=
getInfo
(
regionName
,
regionCode
,
Long
.
valueOf
(
model
.
getInstallRegionCode
()));
model
.
setStartDate
(
new
Date
());
model
.
setSubmitDate
(
new
Date
());
model
.
setInstallationUnit
(
orgServiceImpl
.
getOrgUsrById
(
String
.
valueOf
(
model
.
getInstallationUnitId
())).
getBizOrgName
());
model
.
setDesignUnit
(
orgServiceImpl
.
getOrgUsrById
(
String
.
valueOf
(
model
.
getDesignUnitId
())).
getBizOrgName
());
...
...
@@ -162,6 +162,8 @@ public class ProjectController extends BaseController {
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个项目信息表"
,
notes
=
"根据sequenceNbr查询单个项目信息表"
)
public
ResponseModel
<
ProjectDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
ProjectDto
projectDto
=
projectServiceImpl
.
queryBySeq
(
sequenceNbr
);
projectDto
.
setStartDateString
(
new
SimpleDateFormat
(
"yyy-MM-dd HH:mm:ss"
).
format
(
projectDto
.
getStartDate
()));
return
ResponseHelper
.
buildResponse
(
projectServiceImpl
.
queryBySeq
(
sequenceNbr
));
}
...
...
@@ -255,14 +257,29 @@ public class ProjectController extends BaseController {
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"项目审核"
,
notes
=
"项目审核"
)
@
Ge
tMapping
(
value
=
"/processProject"
)
public
ResponseModel
<
String
>
processProject
(
String
sequenceNbr
,
String
opti
on
){
@
Pos
tMapping
(
value
=
"/processProject"
)
public
ResponseModel
<
String
>
processProject
(
@RequestParam
(
"sequenceNbr"
)
String
sequenceNbr
,
String
option
,
@RequestBody
JSONObject
js
on
){
Project
project
=
projectServiceImpl
.
getById
(
sequenceNbr
);
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
project
));
jsonObject
.
put
(
XJConstant
.
PROCESS_PROJECT_STATE
,
"审核不通过"
);
if
(
"1"
.
equals
(
option
)){
jsonObject
.
put
(
XJConstant
.
PROCESS_PROJECT_STATE
,
"审核通过"
);
}
if
(
ValidationUtil
.
isEmpty
(
option
)){
option
=
json
.
getString
(
XJConstant
.
PROCESS_PROJECT_STATE
);
if
(
"1"
.
equals
(
option
)){
jsonObject
.
put
(
XJConstant
.
PROCESS_PROJECT_STATE
,
"资料审批通过"
);
}
else
if
(
"0"
.
equals
(
option
)){
jsonObject
.
put
(
XJConstant
.
PROCESS_PROJECT_STATE
,
"资料审批不通过"
);
}
else
if
(
"2"
.
equals
(
option
)){
jsonObject
.
put
(
XJConstant
.
PROCESS_PROJECT_STATE
,
"资料审核通过"
);
option
=
"1"
;
}
else
if
(
"3"
.
equals
(
option
)){
jsonObject
.
put
(
XJConstant
.
PROCESS_PROJECT_STATE
,
"资料审核不通过"
);
option
=
"0"
;
}
}
projectInitiationService
.
execute
(
project
.
getInstanceId
(),
jsonObject
,
option
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/ProjectResourceController.java
View file @
d402b3a1
...
...
@@ -271,11 +271,11 @@ public class ProjectResourceController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@PostMapping
(
value
=
"/getResourceInfo"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"根据type获取当前登录所在单位下的项目中的所有资源列表"
,
notes
=
"根据type获取当前登录所在单位下的项目中的所有资源列表"
)
public
ResponseModel
<
IPage
>
getResourceInfo
(
Long
current
,
Long
size
,
String
type
){
public
ResponseModel
<
IPage
>
getResourceInfo
(
Long
current
,
Long
size
,
String
type
,
@RequestBody
(
required
=
false
)
ProjectResourceDto
projectResourceinfo
){
IPage
page
=
new
Page
();
page
.
setSize
(
size
);
page
.
setCurrent
(
current
);
return
ResponseHelper
.
buildResponse
(
projectResourceServiceImpl
.
getResourceInfo
(
type
,
page
));
return
ResponseHelper
.
buildResponse
(
projectResourceServiceImpl
.
getResourceInfo
(
type
,
page
,
projectResourceinfo
));
}
...
...
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 @
d402b3a1
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.ugp.biz.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
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.entity.Company
;
...
...
@@ -62,24 +63,12 @@ public class CompanyServiceImpl extends BaseService<CompanyDto, Company, Company
/**
* 分页查询+筛选
*/
public
Page
<
CompanyDto
>
queryCompanyPage
(
int
current
,
int
size
,
Company
company
)
{
Page
<
CompanyDto
>
page
=
new
Page
<>();
@Override
public
IPage
<
CompanyDto
>
queryCompanyPage
(
int
current
,
int
size
,
Company
company
)
{
IPage
<
CompanyDto
>
page
=
new
Page
<>();
page
.
setSize
(
size
);
page
.
setCurrent
(
current
);
this
.
list
();
List
<
CompanyDto
>
companies
=
companyMapper
.
queryCompanyPage
(
company
);
// List<CompanyDto> companyDtos = new ArrayList<>();
// BeanUtils.copyProperties(companies,companyDtos);
page
.
setRecords
(
companies
);
// if (companyDto.getName() != null) {
// List<CompanyDto> collect = page1.getRecords().stream().filter(a -> a.getName().equals(companyDto.getName())).collect(Collectors.toList());
// page1.setRecords(collect);
// }
return
page
;
return
companyMapper
.
queryCompanyPage
(
page
,
company
);
}
/**
...
...
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 @
d402b3a1
...
...
@@ -104,6 +104,8 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta
InstallNoticeDto
installNoticeDto
=
new
InstallNoticeDto
();
final
ProjectDto
projectDto
=
projectServiceImpl
.
queryBySeq
(
object
.
getLong
(
"name"
));
installNoticeDto
.
setProjectId
(
object
.
getLong
(
"name"
));
installNoticeDto
.
setProjectName
(
projectDto
.
getName
());
installNoticeDto
.
setCompanyName
(
projectDto
.
getInstallationUnit
());
installNoticeDto
.
setNoticeStatus
(
noticeStatus
);
installNoticeDto
.
setNoticeDate
(
new
Date
());
installNoticeDto
.
setApproved
(
false
);
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/OrgServiceImpl.java
View file @
d402b3a1
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
...
@@ -77,7 +78,11 @@ public class OrgServiceImpl {
BeanUtils
.
copyProperties
(
dynamicFormColumn
,
dynamicFormInstance
);
dynamicFormInstance
.
setFormColumnId
(
dynamicFormColumn
.
getSequenceNbr
());
//通过字段名去拿到表单传来的值
dynamicFormInstance
.
setFieldValue
(
jsonObject
.
getString
(
dynamicFormInstance
.
getFieldCode
()));
if
(
"image"
.
equals
(
dynamicFormColumn
.
getFieldCode
())){
dynamicFormInstance
.
setFieldValue
(
JSON
.
toJSONString
(
jsonObject
.
getJSONArray
(
dynamicFormInstance
.
getFieldCode
())));
}
else
{
dynamicFormInstance
.
setFieldValue
(
jsonObject
.
getString
(
dynamicFormInstance
.
getFieldCode
()));
}
dynamicFormInstance
.
setInstanceId
(
orgUsr
.
getSequenceNbr
());
dynamicFormInstance
.
setSequenceNbr
(
null
);
dynamicFormInstanceList
.
add
(
dynamicFormInstance
);
...
...
@@ -235,7 +240,13 @@ public class OrgServiceImpl {
map
.
put
(
"type"
,
type
);
map
.
put
(
"sequenceNbr"
,
sequenceNbr
);
for
(
DynamicFormInstance
dynamicFormInstance
:
dynamicFormInstanceList
)
{
map
.
put
(
dynamicFormInstance
.
getFieldCode
(),
dynamicFormInstance
.
getFieldValue
());
if
(
"image"
.
equals
(
dynamicFormInstance
.
getFieldCode
())){
if
(!
ValidationUtil
.
isEmpty
(
dynamicFormInstance
.
getFieldValue
())){
map
.
put
(
dynamicFormInstance
.
getFieldCode
(),
JSON
.
parseArray
(
dynamicFormInstance
.
getFieldValue
()));
}
}
else
{
map
.
put
(
dynamicFormInstance
.
getFieldCode
(),
dynamicFormInstance
.
getFieldValue
());
}
}
return
map
;
}
...
...
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 @
d402b3a1
...
...
@@ -156,7 +156,7 @@ public class ProblemInitiationServiceImpl {
HashMap
<
String
,
String
>
smsParams
=
new
HashMap
();
smsParams
.
put
(
"smsCode"
,
smsCode
);
smsParams
.
put
(
"projectName"
,
object
.
getString
(
"projectName"
));
smsParams
.
put
(
"
problemDesc"
,
object
.
getString
(
"problemDesc
"
));
smsParams
.
put
(
"
CompanyName"
,
object
.
getString
(
"CompanyName
"
));
//条件构造器 通过项目id查出来的项目详情信息中的区域代码,在监管区域规则表中拿到详细信息中的监察部门id,在使用监察部门id拿到平台的监察部门id
LambdaQueryWrapper
<
SuperviseRule
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
SuperviseRule:
:
getAdminRegionCode
,
projectServiceImpl
.
getById
(
object
.
getLong
(
"projectId"
)).
getInstallRegionCode
());
...
...
@@ -211,7 +211,7 @@ public class ProblemInitiationServiceImpl {
continue
;
}
if
(
SMSEnum
.
项目安装告知申请
.
getCode
().
equals
(
smsCode
)
||
SMSEnum
.
项目立项驳回短信
.
getCode
().
equals
(
smsCode
)){
saveProjectSmsLog
(
smsRecordModel
,
sequenceNbr
,
noticeUnitId
,
agencyUserModel
,
object
);
saveProjectSmsLog
(
smsRecordModel
,
sequenceNbr
,
noticeUnitId
,
agencyUserModel
,
object
,
smsCode
);
}
else
{
saveProblemSmsLog
(
smsRecordModel
,
sequenceNbr
,
noticeUnitId
,
agencyUserModel
);
}
...
...
@@ -220,11 +220,32 @@ public class ProblemInitiationServiceImpl {
}
}
public
void
saveProjectSmsLog
(
SmsRecordModel
smsRecordModel
,
Long
sequenceNbr
,
String
noticeUnitId
,
AgencyUserModel
agencyUserModel
,
JSONObject
object
){
public
void
saveProjectSmsLog
(
SmsRecordModel
smsRecordModel
,
Long
sequenceNbr
,
String
noticeUnitId
,
AgencyUserModel
agencyUserModel
,
JSONObject
object
,
String
smsCode
){
String
content
=
Systemctl
.
smsTemplateClient
.
seleteOne
(
smsCode
).
getResult
().
getSmsContent
();
String
projectName
=
object
.
getString
(
"projectName"
);
String
companyName
=
object
.
getString
(
"companyName"
);
String
reviewInfo
=
object
.
getString
(
"reviewInfo"
);
if
(!
ValidationUtil
.
isEmpty
(
projectName
)){
if
(
content
.
contains
(
"${projectName}"
))
{
content
=
content
.
replace
(
"${projectName}"
,
projectName
);
}
}
if
(!
ValidationUtil
.
isEmpty
(
companyName
)){
if
(
content
.
contains
(
"${companyName}"
)){
content
=
content
.
replace
(
"${companyName}"
,
companyName
);
}
}
if
(!
ValidationUtil
.
isEmpty
(
reviewInfo
)){
if
(
content
.
contains
(
"${reviewInfo}"
))
{
content
=
content
.
replace
(
"${reviewInfo}"
,
reviewInfo
);
}
}
LambdaQueryWrapper
<
OrgUsr
>
wrapperQueryWrapper
=
new
LambdaQueryWrapper
<>();
wrapperQueryWrapper
.
eq
(
OrgUsr:
:
getAmosOrgId
,
agencyUserModel
.
getSequenceNbr
());
InstallNoticeMsg
installNoticeMsg
=
new
InstallNoticeMsg
();
installNoticeMsg
.
setContent
(
smsRecordModel
.
getSmsContent
()
);
installNoticeMsg
.
setContent
(
content
);
installNoticeMsg
.
setInstallNoticeId
(
object
.
getLong
(
"sequenceNbr"
));
installNoticeMsg
.
setTargetUnitId
(
Long
.
valueOf
(
noticeUnitId
));
installNoticeMsg
.
setTargetPersonId
(
orgUsrServiceImpl
.
getOne
(
wrapperQueryWrapper
).
getSequenceNbr
());
...
...
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 @
d402b3a1
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
...
...
@@ -20,7 +19,6 @@ 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
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
io.swagger.annotations.Api
;
import
org.aspectj.weaver.ast.Test
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -33,8 +31,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
Enum
.
ProjectResourceEnum
.*;
/**
...
...
@@ -261,14 +257,17 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,P
* @return
*/
@BusinessIdentify
public
IPage
getResourceInfo
(
String
type
,
IPage
page
){
public
IPage
getResourceInfo
(
String
type
,
IPage
page
,
ProjectResourceDto
projectResourceinfo
){
List
<
Project
>
projectList
=
this
.
getProjectList
();
List
<
Long
>
projectIdList
=
new
ArrayList
<>();
List
<
Long
>
idList
=
new
ArrayList
<>();
List
list
=
new
ArrayList
<>();
List
<
ProjectResourceDto
>
list
=
new
ArrayList
<>();
Set
<
String
>
codes
=
new
HashSet
<>();
Map
map
=
new
HashMap
();
for
(
Project
project:
projectList
){
//获取项目id
projectIdList
.
add
(
project
.
getSequenceNbr
());
codes
.
add
(
project
.
getSequenceNbr
().
toString
());
map
.
put
(
project
.
getSequenceNbr
(),
project
.
getName
());
}
for
(
Long
projectId:
projectIdList
){
...
...
@@ -277,7 +276,9 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,P
.
eq
(
ProjectResource:
:
getProjectId
,
projectId
);
IPage
<
ProjectResource
>
projectResourceList
=
this
.
page
(
page
,
projectResourceWrapper
);
for
(
ProjectResource
projectResource
:
projectResourceList
.
getRecords
()){
//获取资源ID
idList
.
add
(
projectResource
.
getResourceId
());
map
.
put
(
projectResource
.
getResourceId
(),
map
.
get
(
projectId
));
}
}
...
...
@@ -290,34 +291,36 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,P
}
page
.
setRecords
(
mapList
);
}
else
if
(
管材资源
.
getCode
().
equals
(
type
)){
for
(
Long
id:
idList
){
ProjectMaterialDto
projectMaterialDto
=
new
ProjectMaterialDto
();
BeanUtils
.
copyProperties
(
materialService
.
getById
(
id
),
projectMaterialDto
);
// for(Long id:idList){
// ProjectResourceDto projectMaterialDto = new ProjectResourceDto();
List
<
ProjectResourceDto
>
projectResource1
=
projectResourceMapper
.
getProjectMaterial
(
type
,
codes
,
projectResourceinfo
);
//获取项目创建时间
LambdaQueryWrapper
<
ProjectResource
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
ProjectResource:
:
getResourceId
,
id
);
ProjectResource
projectResource
=
projectResourceMapper
.
selectOne
(
wrapper
);
projectMaterialDto
.
setRecDate
(
projectResource
.
getRecDate
());
projectMaterialDto
.
setProjectName
(
String
.
valueOf
(
map
.
get
(
id
)));
projectMaterialDto
.
setProjectResourceId
(
id
);
list
.
add
(
projectMaterialDto
);
}
page
.
setRecords
(
list
);
//
LambdaQueryWrapper<ProjectResource> wrapper = new LambdaQueryWrapper<>();
//
wrapper.eq(ProjectResource::getResourceId,id);
//
ProjectResource projectResource = projectResourceMapper.selectOne(wrapper);
//
projectMaterialDto.setRecDate(projectResource.getRecDate());
//
projectMaterialDto.setProjectName(String.valueOf(map.get(id)));
//
projectMaterialDto.setProjectResourceId(id);
//
}
page
.
setRecords
(
projectResource1
);
}
else
{
for
(
Long
id:
idList
){
WelderEquipmentDto
welderEquipmentDto
=
new
WelderEquipmentDto
();
BeanUtils
.
copyProperties
(
equipmentService
.
getById
(
id
),
welderEquipmentDto
);
//获取项目创建时间
LambdaQueryWrapper
<
ProjectResource
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
ProjectResource:
:
getResourceId
,
id
);
ProjectResource
projectResource
=
projectResourceMapper
.
selectOne
(
wrapper
);
welderEquipmentDto
.
setRecDate
(
projectResource
.
getRecDate
());
welderEquipmentDto
.
setProjectName
(
String
.
valueOf
(
map
.
get
(
id
)));
welderEquipmentDto
.
setProjectResourceId
(
String
.
valueOf
(
id
));
list
.
add
(
welderEquipmentDto
);
// for(Long id:idList){
// ProjectResourceDto projectResourceDto = new ProjectResourceDto();
List
<
ProjectResourceDto
>
projectResource1
=
projectResourceMapper
.
getProjectEquipment
(
type
,
codes
,
projectResourceinfo
);
// for (ProjectResourceDto i:projectResource1) {
// BeanUtils.copyProperties(i,projectResourceDto);
// list.add(projectResourceDto);
// }
page
.
setRecords
(
projectResource1
);
}
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/ProjectServiceImpl.java
View file @
d402b3a1
...
...
@@ -96,11 +96,27 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
}
if
(
ProjectInitiationEnum
.
平台审核
.
getName
().
equals
(
project
.
getStatus
())){
if
(
ValidationUtil
.
isEmpty
(
state
)){
state
=
"待审核"
;
state
=
"
项目
待审核"
;
}
}
else
{
}
else
if
(
ProjectInitiationEnum
.
告知申请
.
getName
().
equals
(
project
.
getStatus
())){
if
(
ValidationUtil
.
isEmpty
(
state
)){
state
=
"告知待申请"
;
}
}
else
if
(
ProjectInitiationEnum
.
接受告知
.
getName
().
equals
(
project
.
getStatus
())){
if
(
ValidationUtil
.
isEmpty
(
state
)){
state
=
"告知待接收"
;
}
}
else
if
(
ProjectInitiationEnum
.
审查项目
.
getName
().
equals
(
project
.
getStatus
())){
if
(
ValidationUtil
.
isEmpty
(
state
)){
state
=
"告知待接收"
;
}
}
else
if
(
ProjectInitiationEnum
.
提交资料
.
getName
().
equals
(
project
.
getStatus
())){
if
(
ValidationUtil
.
isEmpty
(
state
)){
state
=
"资料待上传"
;
}
}
else
if
(
ProjectInitiationEnum
.
项目立项
.
getName
().
equals
(
project
.
getStatus
())){
if
(
ValidationUtil
.
isEmpty
(
state
)){
state
=
"
待上传资料
"
;
state
=
"
项目被驳回
"
;
}
}
...
...
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