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
a0d32870
Commit
a0d32870
authored
Nov 01, 2022
by
wujiang
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
fd64b430
bc137977
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
251 additions
and
116 deletions
+251
-116
IdxUjerMaper.xml
...module-tzs-api/src/main/resources/mapper/IdxUjerMaper.xml
+13
-5
AlertCalledServiceImpl.java
...t/module/tzs/biz/service/impl/AlertCalledServiceImpl.java
+6
-1
InspectionServiceImpl.java
...ot/module/tzs/biz/service/impl/InspectionServiceImpl.java
+2
-2
application-dev.properties
...ule-tzs-biz/src/main/resources/application-dev.properties
+3
-2
OrgEnum.java
...va/com/yeejoin/amos/boot/module/ugp/api/Enum/OrgEnum.java
+15
-13
EquipmentDto.java
...om/yeejoin/amos/boot/module/ugp/api/dto/EquipmentDto.java
+2
-0
ProjectDto.java
.../com/yeejoin/amos/boot/module/ugp/api/dto/ProjectDto.java
+3
-0
EquipmentMapper.java
...join/amos/boot/module/ugp/api/mapper/EquipmentMapper.java
+7
-0
ProjectMapper.java
...eejoin/amos/boot/module/ugp/api/mapper/ProjectMapper.java
+5
-1
IEquipmentService.java
...n/amos/boot/module/ugp/api/service/IEquipmentService.java
+4
-0
IProjectService.java
...oin/amos/boot/module/ugp/api/service/IProjectService.java
+7
-1
EquipmentMapper.xml
...ule-ugp-api/src/main/resources/mapper/EquipmentMapper.xml
+15
-0
ProjectMapper.xml
...odule-ugp-api/src/main/resources/mapper/ProjectMapper.xml
+12
-0
CompanyController.java
...mos/boot/module/ugp/biz/controller/CompanyController.java
+13
-0
EquipmentController.java
...s/boot/module/ugp/biz/controller/EquipmentController.java
+21
-16
ProjectController.java
...mos/boot/module/ugp/biz/controller/ProjectController.java
+7
-11
WelderController.java
...amos/boot/module/ugp/biz/controller/WelderController.java
+19
-3
BusinessIdentifyAspect.java
...boot/module/ugp/biz/framework/BusinessIdentifyAspect.java
+14
-9
CompanyServiceImpl.java
.../boot/module/ugp/biz/service/impl/CompanyServiceImpl.java
+19
-4
EquipmentServiceImpl.java
...oot/module/ugp/biz/service/impl/EquipmentServiceImpl.java
+19
-18
OrgServiceImpl.java
...amos/boot/module/ugp/biz/service/impl/OrgServiceImpl.java
+18
-15
ProjectInitiationServiceImpl.java
...le/ugp/biz/service/impl/ProjectInitiationServiceImpl.java
+7
-12
ProjectServiceImpl.java
.../boot/module/ugp/biz/service/impl/ProjectServiceImpl.java
+15
-0
application.properties
...-module-ugp-biz/src/main/resources/application.properties
+5
-3
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/resources/mapper/IdxUjerMaper.xml
View file @
a0d32870
...
@@ -2,21 +2,29 @@
...
@@ -2,21 +2,29 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!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.tzs.api.mapper.IdxUjerMapper"
>
<mapper
namespace=
"com.yeejoin.amos.boot.module.tzs.api.mapper.IdxUjerMapper"
>
<select
id=
"getPage"
resultType=
"com.yeejoin.amos.boot.module.tzs.flc.api.dto.IdxUjerDto"
>
<select
id=
"getPage"
resultType=
"com.yeejoin.amos.boot.module.tzs.flc.api.dto.IdxUjerDto"
>
SELECT *, IF(b.id is null, '未建', '已建') as bizType
SELECT
a.`BUSINESS_NAME` as businessName,
a.`CREDIT_CODE` as creditCode,
a.`BUSINESS_TYPE` as businessType,
a.`BUSINESS_ADDRESS` as businessAddress,
a.`CONTACTS` as contacts,
a.`CONTACT_NUMBER` as contactNumber,
a.`COMPANYID` as companyId,
IF(b.SEQUENCE_NBR is null, '未建', '已建') as bizType
FROM idx_biz_odgu a
FROM idx_biz_odgu a
LEFT JOIN idx_biz_ujer b on a.
business_name = b.business_name
LEFT JOIN idx_biz_ujer b on a.
BUSINESS_NAME = b.BUSINESS_NAME
<where>
<where>
<if
test=
"ids !=null and ids.size()>0"
>
<if
test=
"ids !=null and ids.size()>0"
>
AND a.
companyId
in
AND a.
COMPANYID
in
<foreach
collection=
"ids"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
<foreach
collection=
"ids"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
#{item}
</foreach>
</foreach>
</if>
</if>
<if
test=
"bizType=='yingjian'"
>
<if
test=
"bizType=='yingjian'"
>
AND b.
id
is null
AND b.
SEQUENCE_NBR
is null
</if>
</if>
<if
test=
"bizType=='yijian'"
>
<if
test=
"bizType=='yijian'"
>
AND b.
id
is not null
AND b.
SEQUENCE_NBR
is not null
</if>
</if>
</where>
</where>
</select>
</select>
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/AlertCalledServiceImpl.java
View file @
a0d32870
...
@@ -112,6 +112,9 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
...
@@ -112,6 +112,9 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
@Autowired
@Autowired
TzsAuthService
tzsAuthService
;
TzsAuthService
tzsAuthService
;
@Value
(
"${duty.seats.role.ids}"
)
private
String
dutySeatsRoleIds
;
private
final
Logger
logger
=
LogManager
.
getLogger
(
AlertCalledServiceImpl
.
class
);
private
final
Logger
logger
=
LogManager
.
getLogger
(
AlertCalledServiceImpl
.
class
);
...
@@ -388,7 +391,9 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
...
@@ -388,7 +391,9 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
@Override
@Override
public
List
<
DutySeatDto
>
getSeatInfos
()
{
public
List
<
DutySeatDto
>
getSeatInfos
()
{
// 获取人员信息
// 获取人员信息
FeignClientResult
<
List
<
AgencyUserModel
>>
userListResult
=
Privilege
.
agencyUserClient
.
list
(
null
,
null
);
// FeignClientResult<List<AgencyUserModel>> userListResult = Privilege.agencyUserClient.list(null,null);
FeignClientResult
<
List
<
AgencyUserModel
>>
userListResult
=
Privilege
.
agencyUserClient
.
queryByRoleId
(
dutySeatsRoleIds
,
null
);
List
<
AgencyUserModel
>
userList
=
userListResult
.
getResult
();
List
<
AgencyUserModel
>
userList
=
userListResult
.
getResult
();
List
<
DutySeatDto
>
dutyList
=
new
ArrayList
<>();
List
<
DutySeatDto
>
dutyList
=
new
ArrayList
<>();
userList
.
stream
().
forEach
(
u
->
{
userList
.
stream
().
forEach
(
u
->
{
...
...
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 @
a0d32870
...
@@ -132,7 +132,7 @@ public class InspectionServiceImpl implements InspectionService {
...
@@ -132,7 +132,7 @@ public class InspectionServiceImpl implements InspectionService {
@Override
@Override
public
JSONObject
getSafetySupervisionCode
(
String
bizTable
)
{
public
JSONObject
getSafetySupervisionCode
(
String
bizTable
)
{
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"
);
String
region
=
""
;
String
region
=
""
;
...
@@ -208,7 +208,7 @@ public class InspectionServiceImpl implements InspectionService {
...
@@ -208,7 +208,7 @@ public class InspectionServiceImpl implements InspectionService {
}
}
});
});
JSONObject
jsonObject
=
new
JSONObject
();
JSONObject
jsonObject
=
new
JSONObject
();
String
selectSql
=
"SELECT * FROM "
+
tableName
+
" WHERE
type
="
+
StringUtils
.
str2sqlValue
(
type
);
String
selectSql
=
"SELECT * FROM "
+
tableName
+
" WHERE
TYPE
="
+
StringUtils
.
str2sqlValue
(
type
);
Map
<
String
,
Object
>
objectMap
=
bizJdbcTemplate
.
queryForMap
(
selectSql
);
Map
<
String
,
Object
>
objectMap
=
bizJdbcTemplate
.
queryForMap
(
selectSql
);
result
.
forEach
(
x
->
{
result
.
forEach
(
x
->
{
String
regionName
=
columMap
.
get
(
x
.
getRegionName
());
String
regionName
=
columMap
.
get
(
x
.
getRegionName
());
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/resources/application-dev.properties
View file @
a0d32870
...
@@ -53,4 +53,5 @@ rule.definition.model-package=com.yeejoin.amos.boot.module.tzs.api.dto
...
@@ -53,4 +53,5 @@ rule.definition.model-package=com.yeejoin.amos.boot.module.tzs.api.dto
rule.definition.default-agency
=
tzs
rule.definition.default-agency
=
tzs
rule.definition.localIp
=
172.16.3.39
rule.definition.localIp
=
172.16.3.39
org.filter.group.seq
=
1564150103147573249
org.filter.group.seq
=
1564150103147573249
\ No newline at end of file
duty.seats.role.ids
=
1585956200472674305,1585956257590706177
\ No newline at end of file
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/Enum/OrgEnum.java
View file @
a0d32870
...
@@ -9,17 +9,17 @@ import java.util.HashMap;
...
@@ -9,17 +9,17 @@ import java.util.HashMap;
@Getter
@Getter
@AllArgsConstructor
@AllArgsConstructor
public
enum
OrgEnum
{
public
enum
OrgEnum
{
公司
(
"COMPANY"
,
"244"
,
"公司"
,
1
),
公司
(
"COMPANY"
,
"244"
,
"公司"
,
1
,
"studio_normalapp_4403119"
),
部门
(
"DEPARTMENT"
,
"245"
,
"部门"
,
2
),
部门
(
"DEPARTMENT"
,
"245"
,
"部门"
,
2
,
"studio_normalapp_4403119"
),
普通人员
(
"PERSON"
,
"246"
,
"普通人员"
,
3
),
普通人员
(
"PERSON"
,
"246"
,
"普通人员"
,
3
,
"studio_normalapp_4403119"
),
焊工
(
"WELDER"
,
"247"
,
"焊工"
,
3
),
焊工
(
"WELDER"
,
"247"
,
"焊工"
,
3
,
"studio_normalapp_4403119"
),
建设单位负责人
(
"CHARGE"
,
"254"
,
"建设单位负责人"
,
3
),
建设单位负责人
(
"CHARGE"
,
"254"
,
"建设单位负责人"
,
3
,
"studio_normalapp_4403119"
),
企业管理员
(
"ADMIN"
,
"248"
,
"企业管理员"
,
3
),
企业管理员
(
"ADMIN"
,
"248"
,
"企业管理员"
,
3
,
"studio_normalapp_4403119"
),
建设单位
(
"CONSTRUCTION"
,
"249"
,
"建设单位"
,
1
),
建设单位
(
"CONSTRUCTION"
,
"249"
,
"建设单位"
,
1
,
"studio_normalapp_4403119"
),
安装单位
(
"INSTALL"
,
"250"
,
"安装单位"
,
1
),
安装单位
(
"INSTALL"
,
"250"
,
"安装单位"
,
1
,
"studio_normalapp_4403119"
),
设计单位
(
"DESIGN"
,
"251"
,
"设计单位"
,
1
),
设计单位
(
"DESIGN"
,
"251"
,
"设计单位"
,
1
,
"studio_normalapp_4403119"
),
监察部门
(
"SUPERVISION"
,
"252"
,
"监察部门"
,
1
),
监察部门
(
"SUPERVISION"
,
"252"
,
"监察部门"
,
1
,
"studio_normalapp_4403119"
),
监检机构
(
"MONITORING"
,
"253"
,
"监检机构"
,
1
);
监检机构
(
"MONITORING"
,
"253"
,
"监检机构"
,
1
,
"studio_normalapp_4403119"
);
private
String
key
;
private
String
key
;
private
String
code
;
private
String
code
;
...
@@ -28,12 +28,14 @@ public enum OrgEnum {
...
@@ -28,12 +28,14 @@ public enum OrgEnum {
* 1 公司 2 部门 3 人员
* 1 公司 2 部门 3 人员
*/
*/
private
Integer
type
;
private
Integer
type
;
private
String
appCode
;
public
static
HashMap
<
String
,
String
>
map
=
new
HashMap
();
public
static
HashMap
<
String
,
String
>
map
=
new
HashMap
();
public
static
HashMap
<
String
,
String
>
codeMap
=
new
HashMap
();
static
{
static
{
for
(
Org
PersonEnum
orgPersonEnum:
OrgPerson
Enum
.
values
()){
for
(
Org
Enum
orgPersonEnum:
Org
Enum
.
values
()){
map
.
put
(
orgPersonEnum
.
getKey
(),
orgPersonEnum
.
getName
());
map
.
put
(
orgPersonEnum
.
getKey
(),
orgPersonEnum
.
getName
());
codeMap
.
put
(
orgPersonEnum
.
getKey
(),
orgPersonEnum
.
getAppCode
());
}
}
}
}
}
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/EquipmentDto.java
View file @
a0d32870
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
dto
;
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.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
...
@@ -20,6 +21,7 @@ public class EquipmentDto extends BaseDto {
...
@@ -20,6 +21,7 @@ public class EquipmentDto extends BaseDto {
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
Equipment
equipment
;
@ApiModelProperty
(
value
=
"名称"
)
@ApiModelProperty
(
value
=
"名称"
)
private
String
name
;
private
String
name
;
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/ProjectDto.java
View file @
a0d32870
...
@@ -2,6 +2,8 @@ package com.yeejoin.amos.boot.module.ugp.api.dto;
...
@@ -2,6 +2,8 @@ package com.yeejoin.amos.boot.module.ugp.api.dto;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Company
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Project
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
...
@@ -22,6 +24,7 @@ public class ProjectDto extends BaseDto {
...
@@ -22,6 +24,7 @@ public class ProjectDto extends BaseDto {
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
Project
project
;
@ApiModelProperty
(
value
=
"项目名称"
)
@ApiModelProperty
(
value
=
"项目名称"
)
private
String
name
;
private
String
name
;
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/EquipmentMapper.java
View file @
a0d32870
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.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.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
;
import
java.util.List
;
/**
/**
* 设备信息表 Mapper 接口
* 设备信息表 Mapper 接口
*
*
...
@@ -12,5 +18,6 @@ import org.apache.ibatis.annotations.Mapper;
...
@@ -12,5 +18,6 @@ import org.apache.ibatis.annotations.Mapper;
*/
*/
@Mapper
@Mapper
public
interface
EquipmentMapper
extends
BaseMapper
<
Equipment
>
{
public
interface
EquipmentMapper
extends
BaseMapper
<
Equipment
>
{
IPage
<
EquipmentDto
>
queryEquipmentPage
(
IPage
<
EquipmentDto
>
page
,
Equipment
equipment
);
}
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/ProjectMapper.java
View file @
a0d32870
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.EquipmentDto
;
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.Equipment
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Project
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Project
;
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.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -22,5 +25,6 @@ public interface ProjectMapper extends BaseMapper<Project> {
...
@@ -22,5 +25,6 @@ public interface ProjectMapper extends BaseMapper<Project> {
ProjectDto
selectOneByName
(
@RequestParam
String
name
);
ProjectDto
selectOneByName
(
@RequestParam
String
name
);
ProjectDto
getDetail
(
Long
sequenceNbr
);
ProjectDto
getDetail
(
Long
sequenceNbr
);
//项目模糊筛选
List
<
ProjectDto
>
queryProjectPage
(
Project
projectParam
);
}
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/service/IEquipmentService.java
View file @
a0d32870
...
@@ -2,8 +2,10 @@ package com.yeejoin.amos.boot.module.ugp.api.service;
...
@@ -2,8 +2,10 @@ package com.yeejoin.amos.boot.module.ugp.api.service;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
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.module.ugp.api.dto.EquipmentDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.EquipmentDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Equipment
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.List
;
...
@@ -14,9 +16,11 @@ import java.util.List;
...
@@ -14,9 +16,11 @@ import java.util.List;
* @author system_generator
* @author system_generator
* @date 2022-09-22
* @date 2022-09-22
*/
*/
public
interface
IEquipmentService
{
public
interface
IEquipmentService
{
//添加设备+附件
//添加设备+附件
EquipmentDto
saveEI
(
JSONObject
object
);
EquipmentDto
saveEI
(
JSONObject
object
);
IPage
<
EquipmentDto
>
queryEquipmentPage
(
IPage
<
EquipmentDto
>
page
,
Equipment
equipment
);
}
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/service/IProjectService.java
View file @
a0d32870
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
service
;
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.EquipmentDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.ProjectDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Equipment
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Project
;
/**
/**
* 项目信息表接口类
* 项目信息表接口类
*
*
...
@@ -8,5 +14,5 @@ package com.yeejoin.amos.boot.module.ugp.api.service;
...
@@ -8,5 +14,5 @@ package com.yeejoin.amos.boot.module.ugp.api.service;
* @date 2022-09-22
* @date 2022-09-22
*/
*/
public
interface
IProjectService
{
public
interface
IProjectService
{
Page
<
ProjectDto
>
queryProjectPage
(
int
current
,
int
size
,
Project
project
);
}
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/EquipmentMapper.xml
View file @
a0d32870
...
@@ -2,4 +2,19 @@
...
@@ -2,4 +2,19 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!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"
>
<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 * from tz_ugp_equipment
<where>
<if
test=
"equipment.name != '' and equipment.name != null"
>
and `name` like concat('%',#{equipment.name},'%')
</if>
<if
test=
"equipment.code != '' and equipment.code != null"
>
and `code` like concat('%',#{equipment.code},'%')
</if>
<if
test=
"equipment.verifyStatus != '' and equipment.verifyStatus != null"
>
and `verify_status` like concat('%',#{equipment.verifyStatus},'%')
</if>
</where>
</select>
</mapper>
</mapper>
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/ProjectMapper.xml
View file @
a0d32870
...
@@ -17,4 +17,16 @@
...
@@ -17,4 +17,16 @@
LEFT JOIN cb_org_usr AS ou2 ON ou2.sequence_nbr = r.supervise_dept_id
LEFT JOIN cb_org_usr AS ou2 ON ou2.sequence_nbr = r.supervise_dept_id
WHERE p.sequence_nbr = #{sequenceNbr}
WHERE p.sequence_nbr = #{sequenceNbr}
</select>
</select>
<select
id=
"queryProjectPage"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.entity.Project"
>
select * from tz_ugp_project
<where>
<if
test=
"name != '' and name != null"
>
and `name` like concat('%',#{name},'%')
</if>
<if
test=
"constructionUnit != '' and constructionUnit != null"
>
and `construction_Unit` like concat('%',#{constructionUnit},'%')
</if>
</where>
</select>
</mapper>
</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 @
a0d32870
...
@@ -506,5 +506,18 @@ public class CompanyController extends BaseController {
...
@@ -506,5 +506,18 @@ public class CompanyController extends BaseController {
}
}
/**
* 验证手机号验证码是否成功
*
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/tset"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"验证手机号验证码是否成功"
,
notes
=
"验证手机号验证码是否成功"
)
public
void
tset
()
{
orgServiceImpl
.
getReginParams
();
}
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/EquipmentController.java
View file @
a0d32870
...
@@ -4,8 +4,12 @@ import com.alibaba.fastjson.JSON;
...
@@ -4,8 +4,12 @@ import com.alibaba.fastjson.JSON;
import
com.alibaba.fastjson.JSONArray
;
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.metadata.IPage
;
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.CompanyDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.WelderDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Attachment
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Attachment
;
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.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.EquipmentMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.EquipmentMapper
;
...
@@ -20,6 +24,8 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
...
@@ -20,6 +24,8 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.EquipmentServiceImpl
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.EquipmentServiceImpl
;
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
;
...
@@ -46,6 +52,7 @@ public class EquipmentController extends BaseController {
...
@@ -46,6 +52,7 @@ public class EquipmentController extends BaseController {
@Autowired
@Autowired
EquipmentServiceImpl
equipmentServiceImpl
;
EquipmentServiceImpl
equipmentServiceImpl
;
@Autowired
@Autowired
EquipmentMapper
equipmentMapper
;
EquipmentMapper
equipmentMapper
;
...
@@ -112,28 +119,26 @@ public class EquipmentController extends BaseController {
...
@@ -112,28 +119,26 @@ public class EquipmentController extends BaseController {
}
}
/**
/**
* 列表分页查询
* 列表分页查询
*
*
* @param current 当前页
* @param current 当前页
* @param current 每页大小
* @param current 每页大小
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/page"
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备信息表分页查询"
,
notes
=
"设备信息表分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备信息表分页查询"
,
notes
=
"设备信息表分页查询"
)
public
ResponseModel
<
Page
<
EquipmentDto
>>
queryForPage
(
public
ResponseModel
<
I
Page
<
EquipmentDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"size"
)
int
size
,
Equipment
equipment
)
{
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
,
IPage
<
EquipmentDto
>
page
=
new
Page
<>();
@RequestParam
(
value
=
"code"
,
required
=
false
)
String
code
,
page
.
setSize
(
size
);
@RequestParam
(
value
=
"verifyStatus"
,
required
=
false
)
String
verifyStatus
)
{
page
.
setCurrent
(
current
);
Page
<
EquipmentDto
>
page
=
new
Page
<
EquipmentDto
>();
return
ResponseHelper
.
buildResponse
(
equipmentServiceImpl
.
queryEquipmentPage
(
page
,
equipment
));
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
equipmentServiceImpl
.
queryForEquipmentPage
(
page
,
name
,
code
,
verifyStatus
));
}
}
/**
/**
* 列表全部数据查询
* 列表全部数据查询
*
*
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/ProjectController.java
View file @
a0d32870
...
@@ -8,9 +8,11 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
...
@@ -8,9 +8,11 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
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.ugp.api.Enum.OrgEnum
;
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.dto.EquipmentDto
;
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.dto.WelderEquipmentDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.WelderEquipmentDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Attachment
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Attachment
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Equipment
;
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.biz.service.impl.*
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.*
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
...
@@ -131,14 +133,9 @@ public class ProjectController extends BaseController {
...
@@ -131,14 +133,9 @@ public class ProjectController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"项目信息表分页查询"
,
notes
=
"项目信息表分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"项目信息表分页查询"
,
notes
=
"项目信息表分页查询"
)
public
ResponseModel
<
Page
<
ProjectDto
>>
queryForPage
(
public
ResponseModel
<
Page
<
ProjectDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"size"
)
int
size
,
Project
project
)
{
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
,
return
ResponseHelper
.
buildResponse
(
projectServiceImpl
.
queryProjectPage
(
current
,
size
,
project
));
@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
,
name
,
constructionUnit
));
}
}
/**
/**
...
@@ -215,9 +212,8 @@ public class ProjectController extends BaseController {
...
@@ -215,9 +212,8 @@ public class ProjectController extends BaseController {
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"项目审核"
,
notes
=
"项目审核"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"项目审核"
,
notes
=
"项目审核"
)
@PostMapping
(
value
=
"/processProject"
)
@GetMapping
(
value
=
"/processProject"
)
public
ResponseModel
<
String
>
processProject
(
String
sequenceNbr
,
@RequestBody
JSONObject
json
){
public
ResponseModel
<
String
>
processProject
(
String
sequenceNbr
,
String
option
){
String
option
=
json
.
getString
(
XJConstant
.
PROCESS_PROJECT_STATE
);
Project
project
=
projectServiceImpl
.
getById
(
sequenceNbr
);
Project
project
=
projectServiceImpl
.
getById
(
sequenceNbr
);
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
project
));
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
project
));
jsonObject
.
put
(
XJConstant
.
PROCESS_PROJECT_STATE
,
"审核不通过"
);
jsonObject
.
put
(
XJConstant
.
PROCESS_PROJECT_STATE
,
"审核不通过"
);
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/WelderController.java
View file @
a0d32870
...
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
...
@@ -7,6 +7,7 @@ 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.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
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.dto.UserDto
;
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.InstallNoticeDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.ProjectDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.ProjectDto
;
...
@@ -65,7 +66,7 @@ public class WelderController extends BaseController {
...
@@ -65,7 +66,7 @@ public class WelderController extends BaseController {
*
*
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/saveWelder"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/saveWelder"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增人员信息"
,
notes
=
"新增人员信息"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增人员信息"
,
notes
=
"新增人员信息"
)
public
ResponseModel
<
OrgUsrDto
>
saveWelder
(
@RequestBody
JSONObject
jsonObject
,
@RequestParam
String
bizOrgType
,
public
ResponseModel
<
OrgUsrDto
>
saveWelder
(
@RequestBody
JSONObject
jsonObject
,
@RequestParam
String
bizOrgType
,
...
@@ -129,12 +130,27 @@ public class WelderController extends BaseController {
...
@@ -129,12 +130,27 @@ public class WelderController extends BaseController {
@GetMapping
(
value
=
"/getCompanyWelder"
)
@GetMapping
(
value
=
"/getCompanyWelder"
)
public
ResponseModel
<
IPage
>
getCompanyWelder
(
public
ResponseModel
<
IPage
>
getCompanyWelder
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
required
=
false
)
String
name
,
@RequestParam
(
required
=
false
)
String
idNumber
,
@RequestParam
(
required
=
false
)
String
licensedProject
){
){
Page
page
=
new
Page
();
Page
page
=
new
Page
();
page
.
setCurrent
(
current
);
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
orgServiceImpl
.
getCompanyWelder
(
page
));
IPage
companyWelder
=
orgServiceImpl
.
getCompanyWelder
(
page
);
List
<
WelderDto
>
welderRecords
=
companyWelder
.
getRecords
();
//模糊查询
if
(
name
!=
null
||
idNumber
!=
null
||
licensedProject
!=
null
){
if
(
name
!=
null
)
{
welderRecords
=
welderRecords
.
stream
().
filter
(
n
->
n
.
getName
().
indexOf
(
name
)>-
1
).
collect
(
Collectors
.
toList
());}
if
(
idNumber
!=
null
)
{
welderRecords
=
welderRecords
.
stream
().
filter
(
n
->
n
.
getIdNumber
().
indexOf
(
idNumber
)>-
1
).
collect
(
Collectors
.
toList
());}
if
(
licensedProject
!=
null
)
{
welderRecords
=
welderRecords
.
stream
().
filter
(
n
->
n
.
getLicensedProject
().
indexOf
(
licensedProject
)>-
1
).
collect
(
Collectors
.
toList
());}
}
Page
records
=
page
.
setRecords
(
welderRecords
);
return
ResponseHelper
.
buildResponse
(
records
);
}
}
/**
/**
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/framework/BusinessIdentifyAspect.java
View file @
a0d32870
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.ugp.biz.framework;
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.ugp.biz.framework;
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.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
...
@@ -42,13 +43,14 @@ public class BusinessIdentifyAspect {
...
@@ -42,13 +43,14 @@ public class BusinessIdentifyAspect {
@Before
(
value
=
"@annotation(com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify) && @annotation(permission)"
)
@Before
(
value
=
"@annotation(com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify) && @annotation(permission)"
)
public
void
personIdentity
(
JoinPoint
joinPoint
,
BusinessIdentify
permission
)
throws
PermissionException
{
public
void
personIdentity
(
JoinPoint
joinPoint
,
BusinessIdentify
permission
)
throws
PermissionException
{
ReginParams
reginParam
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
if
(
permission
.
isNeedIdentity
()
&&
reginParam
!=
null
)
{
if
(
permission
.
isNeedIdentity
()
&&
reginParams
!=
null
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
ReginParams
.
BusinessInfo
businessInfo
=
new
ReginParams
.
BusinessInfo
();
ReginParams
.
BusinessInfo
businessInfo
=
new
ReginParams
.
BusinessInfo
();
//company
//company
Long
amosBizCode
=
reginParams
.
getCompany
().
getSequenceNbr
();
Long
amosOrgId
=
reginParams
.
getCompany
().
getSequenceNbr
();
OrgUsr
companyOrgUsr
=
orgUsrService
.
getById
(
amosBizCode
);
LambdaQueryWrapper
<
OrgUsr
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
OrgUsr
::
getAmosOrgId
,
amosOrgId
);
OrgUsr
companyOrgUsr
=
orgUsrService
.
getOne
(
wrapper
);
String
companyName
=
companyOrgUsr
.
getBizOrgName
();
String
companyName
=
companyOrgUsr
.
getBizOrgName
();
Long
companySequenceNbr
=
companyOrgUsr
.
getSequenceNbr
();
Long
companySequenceNbr
=
companyOrgUsr
.
getSequenceNbr
();
String
companyType
=
companyOrgUsr
.
getOrgExpandAttr1
();
String
companyType
=
companyOrgUsr
.
getOrgExpandAttr1
();
...
@@ -56,13 +58,15 @@ public class BusinessIdentifyAspect {
...
@@ -56,13 +58,15 @@ public class BusinessIdentifyAspect {
companyType
=
companyOrgUsr
.
getBizOrgType
();
companyType
=
companyOrgUsr
.
getBizOrgType
();
}
}
businessInfo
.
setCompanyName
(
companyName
);
businessInfo
.
setCompanyName
(
companyName
);
businessInfo
.
setAmosBizCode
(
amos
BizCode
);
businessInfo
.
setAmosBizCode
(
amos
OrgId
);
businessInfo
.
setCompanyType
(
companyType
);
businessInfo
.
setCompanyType
(
companyType
);
businessInfo
.
setCompanySequenceNbr
(
companySequenceNbr
);
businessInfo
.
setCompanySequenceNbr
(
companySequenceNbr
);
//User
//User
Long
amosUserCode
=
reginParams
.
getUserModel
().
getSequenceNbr
();
amosOrgId
=
reginParams
.
getUserModel
().
getSequenceNbr
();
OrgUsr
userOrgUsr
=
orgUsrService
.
getById
(
amosUserCode
);
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
OrgUsr:
:
getAmosOrgId
,
amosOrgId
);
OrgUsr
userOrgUsr
=
orgUsrService
.
getOne
(
wrapper
);
String
userName
=
userOrgUsr
.
getBizOrgName
();
String
userName
=
userOrgUsr
.
getBizOrgName
();
Long
userSequenceNbr
=
userOrgUsr
.
getSequenceNbr
();
Long
userSequenceNbr
=
userOrgUsr
.
getSequenceNbr
();
String
userType
=
userOrgUsr
.
getOrgExpandAttr1
();
String
userType
=
userOrgUsr
.
getOrgExpandAttr1
();
...
@@ -72,8 +76,9 @@ public class BusinessIdentifyAspect {
...
@@ -72,8 +76,9 @@ public class BusinessIdentifyAspect {
businessInfo
.
setUserSequenceNbr
(
userSequenceNbr
);
businessInfo
.
setUserSequenceNbr
(
userSequenceNbr
);
businessInfo
.
setUserName
(
userName
);
businessInfo
.
setUserName
(
userName
);
businessInfo
.
setUserType
(
userType
);
businessInfo
.
setUserType
(
userType
);
businessInfo
.
setAmosUserCode
(
amos
UserCode
);
businessInfo
.
setAmosUserCode
(
amos
OrgId
);
reginParams
.
setBusinessInfo
(
businessInfo
);
reginParams
.
setBusinessInfo
(
businessInfo
);
redisUtils
.
set
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
()),
JSONObject
.
toJSONString
(
reginParams
));
}
}
}
}
...
...
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 @
a0d32870
...
@@ -117,6 +117,8 @@ public class CompanyServiceImpl extends BaseService<CompanyDto, Company, Company
...
@@ -117,6 +117,8 @@ public class CompanyServiceImpl extends BaseService<CompanyDto, Company, Company
List
<
Long
>
roleIds
=
new
ArrayList
<>();
List
<
Long
>
roleIds
=
new
ArrayList
<>();
Map
<
Long
,
List
<
Long
>>
roleSeqsMap
=
new
HashMap
<>();
Map
<
Long
,
List
<
Long
>>
roleSeqsMap
=
new
HashMap
<>();
Map
<
Long
,
List
<
RoleModel
>>
orgRoles
=
new
HashMap
<>();
Map
<
Long
,
List
<
RoleModel
>>
orgRoles
=
new
HashMap
<>();
Set
<
String
>
appCodeSet
=
new
HashSet
<>();
Company
company
=
this
.
getById
(
sequenceNbr
);
Company
company
=
this
.
getById
(
sequenceNbr
);
company
.
setApproved
(
model
.
getApproved
());
company
.
setApproved
(
model
.
getApproved
());
...
@@ -140,8 +142,18 @@ public class CompanyServiceImpl extends BaseService<CompanyDto, Company, Company
...
@@ -140,8 +142,18 @@ public class CompanyServiceImpl extends BaseService<CompanyDto, Company, Company
String
[]
unitTypeCodes
=
company
.
getType
().
split
(
","
);
String
[]
unitTypeCodes
=
company
.
getType
().
split
(
","
);
for
(
String
code
:
unitTypeCodes
)
{
for
(
String
code
:
unitTypeCodes
)
{
roleNameSet
.
add
(
OrgEnum
.
map
.
get
(
code
));
roleNameSet
.
add
(
OrgEnum
.
map
.
get
(
code
));
if
(!
appCodeSet
.
contains
(
OrgEnum
.
codeMap
.
get
(
code
))){
appCodeSet
.
add
(
OrgEnum
.
codeMap
.
get
(
code
));
}
}
}
userRoleList
=
allRoleList
.
stream
().
filter
(
r
->
r
.
getRoleName
().
equals
(
roleNameSet
)).
collect
(
Collectors
.
toList
());
Iterator
iterator
=
roleNameSet
.
iterator
();
allRoleList
.
stream
().
forEach
(
r
->
{
if
(
roleNameSet
.
contains
(
r
.
getRoleName
())){
userRoleList
.
add
(
r
);
}
});
userRoleList
.
stream
().
forEach
(
r
->
{
userRoleList
.
stream
().
forEach
(
r
->
{
roleIds
.
add
(
r
.
getSequenceNbr
());
roleIds
.
add
(
r
.
getSequenceNbr
());
});
});
...
@@ -162,7 +174,9 @@ public class CompanyServiceImpl extends BaseService<CompanyDto, Company, Company
...
@@ -162,7 +174,9 @@ public class CompanyServiceImpl extends BaseService<CompanyDto, Company, Company
agencyUserModel
.
setUserName
(
adminLoginName
);
agencyUserModel
.
setUserName
(
adminLoginName
);
agencyUserModel
.
setPassword
(
DesUtil
.
encode
(
adminPassword
,
secretKey
));
agencyUserModel
.
setPassword
(
DesUtil
.
encode
(
adminPassword
,
secretKey
));
agencyUserModel
.
setRePassword
(
DesUtil
.
encode
(
adminPassword
,
secretKey
));
agencyUserModel
.
setRePassword
(
DesUtil
.
encode
(
adminPassword
,
secretKey
));
Privilege
.
agencyUserClient
.
create
(
agencyUserModel
);
List
<
String
>
appCodes
=
new
ArrayList
<>(
appCodeSet
);
agencyUserModel
.
setAppCodes
(
appCodes
);
agencyUserModel
=
Privilege
.
agencyUserClient
.
create
(
agencyUserModel
).
getResult
();
//企业动态表单存储
//企业动态表单存储
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
company
));
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
company
));
...
@@ -171,11 +185,12 @@ public class CompanyServiceImpl extends BaseService<CompanyDto, Company, Company
...
@@ -171,11 +185,12 @@ public class CompanyServiceImpl extends BaseService<CompanyDto, Company, Company
orgServiceImpl
.
dataHandling
(
jsonObject
,
bizOrgType
,
null
);
orgServiceImpl
.
dataHandling
(
jsonObject
,
bizOrgType
,
null
);
//企业管理员人员 动态表单存储
//企业管理员人员 动态表单存储
jsonObject
=
n
ull
;
jsonObject
=
n
ew
JSONObject
()
;
jsonObject
.
put
(
"name"
,
adminName
);
jsonObject
.
put
(
"name"
,
adminName
);
jsonObject
.
put
(
"phone"
,
adminPhone
);
jsonObject
.
put
(
"phone"
,
adminPhone
);
jsonObject
.
put
(
"amosOrgId"
,
agencyUserModel
.
getSequenceNbr
());
jsonObject
.
put
(
"amosOrgId"
,
agencyUserModel
.
getSequenceNbr
());
orgServiceImpl
.
dataHandling
(
jsonObject
,
OrgEnum
.
企业管理员
.
getKey
(),
null
);
jsonObject
.
put
(
"isCheck"
,
companyModelFeignClient
.
getSequenceNbr
());
orgServiceImpl
.
dataHandling
(
jsonObject
,
OrgEnum
.
普通人员
.
getKey
(),
null
);
}
}
return
this
.
updateById
(
company
);
return
this
.
updateById
(
company
);
}
}
...
...
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 @
a0d32870
...
@@ -5,19 +5,16 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
...
@@ -5,19 +5,16 @@ 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.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.
alibaba.fastjson.JSONObject
;
import
com.
baomidou.mybatisplus.core.metadata.IPage
;
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.Attachment
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Attachment
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Equipment
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Equipment
;
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.AttachmentMapper
;
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.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
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
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
;
...
@@ -25,7 +22,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -25,7 +22,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
/**
* 设备信息表服务实现类
* 设备信息表服务实现类
...
@@ -97,31 +93,31 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
...
@@ -97,31 +93,31 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
*/
*/
public
void
saveAttachment
(
JSONArray
subForm
,
Long
SequenceNbr
){
public
void
saveAttachment
(
JSONArray
subForm
,
Long
SequenceNbr
){
AttachmentDto
attachmentDto
=
new
AttachmentDto
();
AttachmentDto
attachmentDto
=
new
AttachmentDto
();
attachmentDto
.
setInfo
(
JSON
.
toJSONString
(
subForm
));
attachmentDto
.
setSourceId
(
SequenceNbr
);
if
(!
subForm
.
isEmpty
()){
if
(!
subForm
.
isEmpty
()){
for
(
Object
o:
subForm
){
for
(
Object
o:
subForm
){
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
o
));
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
o
));
jsonObject
.
getString
(
"Symbol_key"
);
jsonObject
.
getString
(
"Symbol_key"
);
JSONArray
jsonArray
=
jsonObject
.
getJSONArray
(
"info"
);
JSONArray
jsonArray
=
jsonObject
.
getJSONArray
(
"info"
);
for
(
Object
j:
jsonArray
){
if
(!
ValidationUtil
.
isEmpty
(
jsonArray
))
{
JSONObject
info
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
j
));
for
(
Object
j
:
jsonArray
)
{
String
name
=
info
.
getString
(
"name"
);
JSONObject
info
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
j
));
attachmentDto
.
setSourceId
(
SequenceNbr
);
String
name
=
info
.
getString
(
"name"
);
attachmentDto
.
setName
(
info
.
getString
(
"name"
));
attachmentDto
.
setName
(
info
.
getString
(
"name"
));
// attachmentDto.setInfo("name: "+name+","+
attachmentDto
.
setType
(
name
.
substring
(
name
.
lastIndexOf
(
"."
)+
1
));
// "type: "+name.substring(name.lastIndexOf(".")+1)+","+
break
;
// "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
;
break
;
}
}
}
}
attachmentServiceImpl
.
createWithModel
(
attachmentDto
);
}
}
}
}
@Override
@Override
public
EquipmentDto
saveEI
(
JSONObject
object
)
{
public
EquipmentDto
saveEI
(
JSONObject
object
)
{
EquipmentDto
model
=
new
EquipmentDto
();
EquipmentDto
model
=
new
EquipmentDto
();
...
@@ -172,6 +168,10 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
...
@@ -172,6 +168,10 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
// BeanUtils.copyProperties(attachmentDto,attachment);
// BeanUtils.copyProperties(attachmentDto,attachment);
}
}
//设备模糊筛选
public
IPage
<
EquipmentDto
>
queryEquipmentPage
(
IPage
<
EquipmentDto
>
page
,
Equipment
equipment
)
{
return
equipmentMapper
.
queryEquipmentPage
(
page
,
equipment
);
}
}
}
\ 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/OrgServiceImpl.java
View file @
a0d32870
...
@@ -122,9 +122,6 @@ public class OrgServiceImpl {
...
@@ -122,9 +122,6 @@ public class OrgServiceImpl {
}
}
}
}
orgUsr
.
setRecDate
(
new
Date
());
orgUsr
.
setRecDate
(
new
Date
());
AgencyUserModel
user
=
Privilege
.
agencyUserClient
.
getme
().
getResult
();
orgUsr
.
setRecUserName
(
user
.
getRealName
());
orgUsr
.
setRecUserId
(
user
.
getUserId
());
orgUsr
.
setBizOrgName
(
jsonObject
.
getString
(
"name"
));
orgUsr
.
setBizOrgName
(
jsonObject
.
getString
(
"name"
));
orgUsr
.
setSequenceNbr
(
jsonObject
.
getLong
(
"sequenceNbr"
));
orgUsr
.
setSequenceNbr
(
jsonObject
.
getLong
(
"sequenceNbr"
));
orgUsr
.
setBizOrgType
(
bizOrgType
);
orgUsr
.
setBizOrgType
(
bizOrgType
);
...
@@ -136,12 +133,21 @@ public class OrgServiceImpl {
...
@@ -136,12 +133,21 @@ public class OrgServiceImpl {
orgUsr
.
setBizOrgCode
(
jsonObject
.
getString
(
"creditCode"
));
orgUsr
.
setBizOrgCode
(
jsonObject
.
getString
(
"creditCode"
));
}
}
if
(
OrgEnum
.
普通人员
.
getKey
().
equals
(
bizOrgType
)){
if
(
OrgEnum
.
普通人员
.
getKey
().
equals
(
bizOrgType
)){
if
(
1
==
jsonObject
.
getInteger
(
"isWelder"
))
{
if
(!
ValidationUtil
.
isEmpty
(
jsonObject
.
getInteger
(
"isWelder"
))){
orgUsr
.
setOrgExpandAttr1
(
OrgEnum
.
焊工
.
getKey
());
if
(
ValidationUtil
.
isEmpty
(
sequenceNbr
)){
orgUsr
.
setCode
(
getCode
());
if
(
1
==
jsonObject
.
getInteger
(
"isWelder"
))
{
orgUsr
.
setOrgExpandAttr1
(
OrgEnum
.
焊工
.
getKey
());
orgUsr
.
setCode
(
getCode
());
}
}
}
}
LambdaQueryWrapper
<
OrgUsr
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
OrgUsr
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
OrgUsr
::
getAmosOrgId
,
String
.
valueOf
(
reginParams
.
getCompany
().
getSequenceNbr
()));
if
(!
ValidationUtil
.
isEmpty
(
jsonObject
.
getLong
(
"isCheck"
)))
{
wrapper
.
eq
(
OrgUsr
::
getAmosOrgId
,
jsonObject
.
getLong
(
"isCheck"
));
}
else
{
wrapper
.
eq
(
OrgUsr
::
getAmosOrgId
,
String
.
valueOf
(
reginParams
.
getCompany
().
getSequenceNbr
()));
}
orgUsr
.
setParentId
(
String
.
valueOf
(
orgUsrServiceImpl
.
getOne
(
wrapper
).
getSequenceNbr
()));
orgUsr
.
setParentId
(
String
.
valueOf
(
orgUsrServiceImpl
.
getOne
(
wrapper
).
getSequenceNbr
()));
}
}
if
(
OrgEnum
.
部门
.
getKey
().
equals
(
bizOrgType
))
{
if
(
OrgEnum
.
部门
.
getKey
().
equals
(
bizOrgType
))
{
...
@@ -171,7 +177,7 @@ public class OrgServiceImpl {
...
@@ -171,7 +177,7 @@ public class OrgServiceImpl {
if
(
ValidationUtil
.
isEmpty
(
code
)){
if
(
ValidationUtil
.
isEmpty
(
code
)){
c
=
0001
;
c
=
0001
;
}
else
{
}
else
{
c
=
Integer
.
parseInt
(
code
)+
1
;
c
=
Integer
.
parseInt
(
code
.
substring
(
code
.
indexOf
(
"-"
),
code
.
length
()
-
1
)
)+
1
;
}
}
String
welderCode
=
OrgEnum
.
焊工
.
getKey
()
+
"-"
+
c
;
String
welderCode
=
OrgEnum
.
焊工
.
getKey
()
+
"-"
+
c
;
...
@@ -252,8 +258,7 @@ public class OrgServiceImpl {
...
@@ -252,8 +258,7 @@ public class OrgServiceImpl {
*/
*/
public
IPage
getCompanyWelder
(
IPage
page
){
public
IPage
getCompanyWelder
(
IPage
page
){
LambdaQueryWrapper
<
OrgUsr
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
OrgUsr
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
OrgUsr
::
getAmosOrgId
,
String
.
valueOf
(
getReginParams
().
getCompany
().
getSequenceNbr
()))
wrapper
.
eq
(
OrgUsr
::
getAmosOrgId
,
String
.
valueOf
(
getReginParams
().
getCompany
().
getSequenceNbr
()));
.
eq
(
OrgUsr:
:
getBizOrgType
,
OrgEnum
.
焊工
.
getKey
());
return
getInfo
(
String
.
valueOf
(
orgUsrServiceImpl
.
getOne
(
wrapper
).
getSequenceNbr
()),
page
);
return
getInfo
(
String
.
valueOf
(
orgUsrServiceImpl
.
getOne
(
wrapper
).
getSequenceNbr
()),
page
);
}
}
...
@@ -263,8 +268,7 @@ public class OrgServiceImpl {
...
@@ -263,8 +268,7 @@ public class OrgServiceImpl {
*/
*/
public
IPage
getCompanyDept
(
IPage
page
){
public
IPage
getCompanyDept
(
IPage
page
){
LambdaQueryWrapper
<
OrgUsr
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
OrgUsr
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
OrgUsr
::
getAmosOrgId
,
String
.
valueOf
(
getReginParams
().
getCompany
().
getSequenceNbr
()))
wrapper
.
eq
(
OrgUsr
::
getAmosOrgId
,
String
.
valueOf
(
getReginParams
().
getCompany
().
getSequenceNbr
()));
.
eq
(
OrgUsr:
:
getBizOrgType
,
OrgEnum
.
部门
.
getKey
());
return
getInfo
(
String
.
valueOf
(
orgUsrServiceImpl
.
getOne
(
wrapper
).
getSequenceNbr
()),
page
);
return
getInfo
(
String
.
valueOf
(
orgUsrServiceImpl
.
getOne
(
wrapper
).
getSequenceNbr
()),
page
);
}
}
...
@@ -286,11 +290,10 @@ public class OrgServiceImpl {
...
@@ -286,11 +290,10 @@ public class OrgServiceImpl {
* 查询当前登录单位下的人员列表
* 查询当前登录单位下的人员列表
* @return
* @return
*/
*/
@BusinessIdentify
public
List
<
OrgUsr
>
getCharge
(){
public
List
<
OrgUsr
>
getCharge
(){
LambdaQueryWrapper
<
OrgUsr
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
OrgUsr
::
getAmosOrgId
,
String
.
valueOf
(
getReginParams
().
getCompany
().
getSequenceNbr
()));
LambdaQueryWrapper
<
OrgUsr
>
personWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
OrgUsr
>
personWrapper
=
new
LambdaQueryWrapper
<>();
personWrapper
.
eq
(
OrgUsr:
:
getParentId
,
orgUsrServiceImpl
.
getOne
(
wrapper
).
getSequenceNbr
(
))
personWrapper
.
eq
(
OrgUsr:
:
getParentId
,
String
.
valueOf
(
getReginParams
().
getBusinessInfo
().
getCompanySequenceNbr
()
))
.
eq
(
OrgUsr
::
getBizOrgType
,
OrgEnum
.
普通人员
.
getKey
());
.
eq
(
OrgUsr
::
getBizOrgType
,
OrgEnum
.
普通人员
.
getKey
());
return
orgUsrServiceImpl
.
list
(
personWrapper
);
return
orgUsrServiceImpl
.
list
(
personWrapper
);
}
}
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/ProjectInitiationServiceImpl.java
View file @
a0d32870
...
@@ -9,7 +9,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
...
@@ -9,7 +9,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
import
com.yeejoin.amos.boot.biz.common.service.impl.WorkflowExcuteServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.service.impl.WorkflowExcuteServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService
;
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.common.biz.utils.CommonResponseUtil
;
import
com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil
;
...
@@ -60,9 +59,6 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
...
@@ -60,9 +59,6 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
WorkflowExcuteServiceImpl
workflowExcuteService
;
WorkflowExcuteServiceImpl
workflowExcuteService
;
@Autowired
@Autowired
WorkflowFeignService
workflowFeignService
;
@Autowired
InstallNoticeMsgServiceImpl
installNoticeMsgService
;
InstallNoticeMsgServiceImpl
installNoticeMsgService
;
@Autowired
@Autowired
...
@@ -122,18 +118,15 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
...
@@ -122,18 +118,15 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
@Override
@Override
public
void
execute
(
String
instanceId
,
Object
objectd
,
String
option
){
public
void
execute
(
String
instanceId
,
Object
objectd
,
String
option
){
JSONObject
object
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
objectd
));
JSONObject
object
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
objectd
));
JSONObject
jsonObject
=
workflowFeignService
.
getTask
(
instanceId
);
AjaxResult
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
instanceId
);
JSONObject
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
ajaxResult
.
get
(
"data"
)));
ProjectInitiation
projectInitiation
=
new
ProjectInitiation
();
ProjectInitiation
projectInitiation
=
new
ProjectInitiation
();
projectInitiation
.
setInstanceId
(
instanceId
);
projectInitiation
.
setInstanceId
(
instanceId
);
projectInitiation
.
setContext
(
JSON
.
toJSONString
(
objectd
));
projectInitiation
.
setContext
(
JSON
.
toJSONString
(
objectd
));
JSONObject
dataObject
=
jsonObject
.
getJSONObject
(
"data"
);
projectInitiation
.
setTaskId
(
dataObject
.
getString
(
"id"
));
projectInitiation
.
setTaskId
(
dataObject
.
getString
(
"id"
));
projectInitiation
.
setTaskName
(
dataObject
.
getString
(
"name"
));
projectInitiation
.
setTaskName
(
dataObject
.
getString
(
"name"
));
if
(
ProjectInitiationEnum
.
平台审核
.
getName
().
equals
(
dataObject
.
getString
(
"name"
)))
{
if
(
ProjectInitiationEnum
.
平台审核
.
getName
().
equals
(
dataObject
.
getString
(
"name"
)))
{
if
(
true
)
{
option
=
"1"
;
}
}
}
if
(
ProjectInitiationEnum
.
监检员审核
.
getName
().
equals
(
dataObject
.
getString
(
"name"
))){
if
(
ProjectInitiationEnum
.
监检员审核
.
getName
().
equals
(
dataObject
.
getString
(
"name"
))){
...
@@ -189,10 +182,11 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
...
@@ -189,10 +182,11 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
* @return
* @return
*/
*/
public
String
getFlowTaskName
(
String
instanceId
){
public
String
getFlowTaskName
(
String
instanceId
){
JSONObject
jsonObject
=
workflowFeignService
.
getTask
(
instanceId
);
AjaxResult
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
instanceId
);
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
ajaxResult
.
get
(
"data"
)));
String
taskName
=
"流程结束!"
;
String
taskName
=
"流程结束!"
;
try
{
try
{
taskName
=
jsonObject
.
get
JSONObject
(
"data"
).
get
String
(
"name"
);
taskName
=
jsonObject
.
getString
(
"name"
);
}
catch
(
Exception
e
)
{}
}
catch
(
Exception
e
)
{}
return
taskName
;
return
taskName
;
}
}
...
@@ -201,7 +195,8 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
...
@@ -201,7 +195,8 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
LambdaQueryWrapper
<
Project
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
Project
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
Project:
:
getInstanceId
,
instanceId
);
wrapper
.
eq
(
Project:
:
getInstanceId
,
instanceId
);
Project
project
=
projectService
.
getOne
(
wrapper
);
Project
project
=
projectService
.
getOne
(
wrapper
);
project
.
setStatus
(
ProjectInitiationEnum
.
getCodeByNameMap
.
get
(
getFlowTaskName
(
instanceId
)));
// project.setStatus(ProjectInitiationEnum.getCodeByNameMap.get(getFlowTaskName(instanceId)));
project
.
setStatus
(
getFlowTaskName
(
instanceId
));
projectService
.
updateById
(
project
);
projectService
.
updateById
(
project
);
}
}
...
...
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 @
a0d32870
...
@@ -45,6 +45,8 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
...
@@ -45,6 +45,8 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
EquipmentServiceImpl
equipmentService
;
EquipmentServiceImpl
equipmentService
;
@Autowired
AttachmentServiceImpl
attachmentServiceImpl
;
/**
/**
* 分页查询
* 分页查询
*/
*/
...
@@ -165,4 +167,16 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
...
@@ -165,4 +167,16 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
this
.
updateById
(
project
);
this
.
updateById
(
project
);
return
"ok"
;
return
"ok"
;
}
}
//项目模糊筛选
public
Page
<
ProjectDto
>
queryProjectPage
(
int
current
,
int
size
,
Project
project
)
{
Page
<
ProjectDto
>
page
=
new
Page
<>();
page
.
setSize
(
size
);
page
.
setCurrent
(
current
);
this
.
list
();
List
<
ProjectDto
>
projects
=
projectMapper
.
queryProjectPage
(
project
);
page
.
setRecords
(
projects
);
return
page
;
}
}
}
\ No newline at end of file
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/resources/application.properties
View file @
a0d32870
...
@@ -31,7 +31,7 @@ fire-rescue=123
...
@@ -31,7 +31,7 @@ fire-rescue=123
params.work.flow.processDefinitionKey
=
xiangmulixiangliucheng
params.work.flow.processDefinitionKey
=
xiangmulixiangliucheng
params.work.flow.problemDefinitionKey
=
zhiliangwentiliucheng
params.work.flow.problemDefinitionKey
=
zhiliangwentiliucheng
amos.secret.key
=
ugp
amos.secret.key
=
qaz
ugp.sms.tempCode
=
SMS_UGP_0007
ugp.sms.tempCode
=
SMS_UGP_0007
...
@@ -39,4 +39,6 @@ ugp.sms.tempCode=SMS_UGP_0007
...
@@ -39,4 +39,6 @@ ugp.sms.tempCode=SMS_UGP_0007
#logging.level.com.yeejoin.amos=error
#logging.level.com.yeejoin.amos=error
amos.system.user.user-name
=
ugp_cti
amos.system.user.user-name
=
ugp_cti
amos.system.user.password
=
a1234567
amos.system.user.password
=
a1234567
\ No newline at end of file
amos.system.user.product
=
AMOS_STUDIO_WEB
amos.system.user.app-key
=
AMOS_STUDIO
\ 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