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
38fe4391
Commit
38fe4391
authored
Nov 09, 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
8838bfc4
47d52f84
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
107 additions
and
49 deletions
+107
-49
CylinderInfoMapper.xml
...-tzs-api/src/main/resources/mapper/CylinderInfoMapper.xml
+1
-1
InstallNoticeController.java
...ot/module/ugp/biz/controller/InstallNoticeController.java
+1
-2
ProjectController.java
...mos/boot/module/ugp/biz/controller/ProjectController.java
+15
-0
ProjectResourceController.java
.../module/ugp/biz/controller/ProjectResourceController.java
+10
-3
InstallNoticeServiceImpl.java
...module/ugp/biz/service/impl/InstallNoticeServiceImpl.java
+1
-0
ProblemInitiationServiceImpl.java
...le/ugp/biz/service/impl/ProblemInitiationServiceImpl.java
+19
-17
ProjectResourceServiceImpl.java
...dule/ugp/biz/service/impl/ProjectResourceServiceImpl.java
+33
-15
ProjectServiceImpl.java
.../boot/module/ugp/biz/service/impl/ProjectServiceImpl.java
+22
-9
application.properties
...-module-ugp-biz/src/main/resources/application.properties
+5
-2
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/resources/mapper/CylinderInfoMapper.xml
View file @
38fe4391
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
SELECT
SELECT
count( t.sequence_nbr ) AS cylinderNum,
count( t.sequence_nbr ) AS cylinderNum,
l.expiry_date AS fillingPermitDate,
l.expiry_date AS fillingPermitDate,
count( CASE WHEN i.next_inspection_date
<![CDATA[ < ]]>
now() THEN 1 E
LSE 0 E
ND ) AS outOfDateNum
count( CASE WHEN i.next_inspection_date
<![CDATA[ < ]]>
now() THEN 1 END ) AS outOfDateNum
FROM
FROM
tz_cylinder_unit U
tz_cylinder_unit U
LEFT JOIN tz_cylinder_info AS t ON u.credit_code = t.credit_code
LEFT JOIN tz_cylinder_info AS t ON u.credit_code = t.credit_code
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/InstallNoticeController.java
View file @
38fe4391
...
@@ -195,8 +195,7 @@ public class InstallNoticeController extends BaseController {
...
@@ -195,8 +195,7 @@ public class InstallNoticeController extends BaseController {
@PostMapping
(
value
=
"/saveInstallNotice"
)
@PostMapping
(
value
=
"/saveInstallNotice"
)
@ApiOperation
(
httpMethod
=
"Post"
,
value
=
"新增安装告知申请"
,
notes
=
"新增安装告知申请"
)
@ApiOperation
(
httpMethod
=
"Post"
,
value
=
"新增安装告知申请"
,
notes
=
"新增安装告知申请"
)
public
ResponseModel
<
InstallNoticeDto
>
saveInstallNotice
(
@RequestBody
JSONObject
object
,
@RequestParam
(
required
=
false
)
String
noticeStatus
)
{
public
ResponseModel
<
InstallNoticeDto
>
saveInstallNotice
(
@RequestBody
JSONObject
object
,
@RequestParam
(
required
=
false
)
String
noticeStatus
)
{
InstallNoticeDto
installNoticeDto
=
installNoticeServiceImpl
.
saveInstallNotice
(
object
,
noticeStatus
);
return
ResponseHelper
.
buildResponse
(
installNoticeServiceImpl
.
saveInstallNotice
(
object
,
noticeStatus
));
return
ResponseHelper
.
buildResponse
(
installNoticeServiceImpl
.
createWithModel
(
installNoticeDto
));
}
}
/**
/**
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/ProjectController.java
View file @
38fe4391
...
@@ -28,6 +28,7 @@ import io.swagger.annotations.Api;
...
@@ -28,6 +28,7 @@ import io.swagger.annotations.Api;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
...
@@ -84,6 +85,7 @@ public class ProjectController extends BaseController {
...
@@ -84,6 +85,7 @@ public class ProjectController extends BaseController {
model
.
setChargePerson
(
orgServiceImpl
.
getOrgUsrById
(
String
.
valueOf
(
model
.
getChargePersonId
())).
getBizOrgName
());
model
.
setChargePerson
(
orgServiceImpl
.
getOrgUsrById
(
String
.
valueOf
(
model
.
getChargePersonId
())).
getBizOrgName
());
model
.
setInstallRegion
(
map
.
get
(
"regionName"
));
model
.
setInstallRegion
(
map
.
get
(
"regionName"
));
model
.
setInstallRegionCode
(
map
.
get
(
"regionCode"
));
model
.
setInstallRegionCode
(
map
.
get
(
"regionCode"
));
model
.
setCode
(
getCode
());
model
=
projectServiceImpl
.
createWithModel
(
model
);
model
=
projectServiceImpl
.
createWithModel
(
model
);
Project
project
=
new
Project
();
Project
project
=
new
Project
();
BeanUtils
.
copyProperties
(
model
,
project
);
BeanUtils
.
copyProperties
(
model
,
project
);
...
@@ -91,6 +93,19 @@ public class ProjectController extends BaseController {
...
@@ -91,6 +93,19 @@ public class ProjectController extends BaseController {
return
ResponseHelper
.
buildResponse
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
}
}
public
String
getCode
(){
String
date
=
new
SimpleDateFormat
(
"MMdd"
).
format
(
new
Date
());
String
code
=
"XM"
+
date
+
"-"
;
int
c
=
1
;
LambdaQueryWrapper
<
Project
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
orderByDesc
(
Project:
:
getCode
);
String
projectCode
=
projectServiceImpl
.
list
(
wrapper
).
iterator
().
next
().
getCode
();
if
(!
ValidationUtil
.
isEmpty
(
projectCode
)){
c
=
Integer
.
parseInt
(
projectCode
.
substring
(
projectCode
.
indexOf
(
"-"
)+
1
,
projectCode
.
length
()))+
1
;
}
return
code
+
c
;
}
public
Map
<
String
,
String
>
getInfo
(
String
regionName
,
String
regionCode
,
Long
sequenceNbr
){
public
Map
<
String
,
String
>
getInfo
(
String
regionName
,
String
regionCode
,
Long
sequenceNbr
){
RegionModel
region
=
Systemctl
.
regionClient
.
getRegion
(
sequenceNbr
).
getResult
();
RegionModel
region
=
Systemctl
.
regionClient
.
getRegion
(
sequenceNbr
).
getResult
();
regionName
=
region
.
getRegionName
()
+
regionName
;
regionName
=
region
.
getRegionName
()
+
regionName
;
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/ProjectResourceController.java
View file @
38fe4391
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.ProjectMaterialDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.ProjectMaterialDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.WelderEquipmentDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.WelderEquipmentDto
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
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.entity.ProjectResource
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.ProjectResource
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.EquipmentMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectResourceMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectResourceMapper
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.MaterialServiceImpl
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.MaterialServiceImpl
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -178,9 +182,12 @@ public class ProjectResourceController extends BaseController {
...
@@ -178,9 +182,12 @@ public class ProjectResourceController extends BaseController {
@DeleteMapping
(
value
=
"/welderDelete"
)
@DeleteMapping
(
value
=
"/welderDelete"
)
@ApiOperation
(
httpMethod
=
"Delete"
,
value
=
"项目设备删除"
,
notes
=
"项目设备删除"
)
@ApiOperation
(
httpMethod
=
"Delete"
,
value
=
"项目设备删除"
,
notes
=
"项目设备删除"
)
public
ResponseModel
<
Boolean
>
welderDelete
(
public
ResponseModel
<
Boolean
>
welderDelete
(
@RequestParam
Stri
ng
ids
@RequestParam
Lo
ng
ids
){
){
this
.
projectResourceServiceImpl
.
welderDelete
(
ids
);
LambdaQueryWrapper
<
ProjectResource
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
ProjectResource:
:
getResourceId
,
ids
);
projectResourceMapper
.
delete
(
wrapper
);
return
ResponseHelper
.
buildResponse
(
true
);
return
ResponseHelper
.
buildResponse
(
true
);
}
}
...
@@ -192,7 +199,7 @@ public class ProjectResourceController extends BaseController {
...
@@ -192,7 +199,7 @@ public class ProjectResourceController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"绑定项目所用到的设备管材"
,
notes
=
"绑定项目所用到的设备管材"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"绑定项目所用到的设备管材"
,
notes
=
"绑定项目所用到的设备管材"
)
@PostMapping
(
value
=
"/saveId"
)
@PostMapping
(
value
=
"/saveId"
)
public
ResponseModel
<
ProjectResource
>
saveId
(
@RequestBody
JSONObject
jsonObject
)
{
public
ResponseModel
<
ProjectResource
>
saveId
(
@RequestBody
JSONObject
jsonObject
)
throws
Exception
{
return
ResponseHelper
.
buildResponse
(
projectResourceServiceImpl
.
saveIds
(
jsonObject
));
return
ResponseHelper
.
buildResponse
(
projectResourceServiceImpl
.
saveIds
(
jsonObject
));
}
}
...
...
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 @
38fe4391
...
@@ -116,6 +116,7 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta
...
@@ -116,6 +116,7 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta
installNoticeDto
.
setLicenseAttch
(
JSON
.
toJSONString
(
licenseAttch
));
installNoticeDto
.
setLicenseAttch
(
JSON
.
toJSONString
(
licenseAttch
));
installNoticeDto
.
setContractAttch
(
JSON
.
toJSONString
(
contractAttch
));
installNoticeDto
.
setContractAttch
(
JSON
.
toJSONString
(
contractAttch
));
installNoticeDto
.
setOrganizationCode
(
orgServiceImpl
.
getOrgUsr
().
getBizOrgCode
());
installNoticeDto
.
setOrganizationCode
(
orgServiceImpl
.
getOrgUsr
().
getBizOrgCode
());
installNoticeDto
=
this
.
createWithModel
(
installNoticeDto
);
projectInitiationServiceImpl
.
execute
(
projectDto
.
getInstanceId
(),
installNoticeDto
,
"1"
);
projectInitiationServiceImpl
.
execute
(
projectDto
.
getInstanceId
(),
installNoticeDto
,
"1"
);
return
installNoticeDto
;
return
installNoticeDto
;
}
}
...
...
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 @
38fe4391
...
@@ -64,10 +64,10 @@ public class ProblemInitiationServiceImpl {
...
@@ -64,10 +64,10 @@ public class ProblemInitiationServiceImpl {
@Value
(
"${params.work.flow.problemDefinitionKey}"
)
@Value
(
"${params.work.flow.problemDefinitionKey}"
)
private
String
problemDefinitionKey
;
private
String
problemDefinitionKey
;
@Value
(
"
supervisionRoleId
"
)
@Value
(
"
${supervisionRoleId}
"
)
private
String
supervisionRoleId
;
private
String
supervisionRoleId
;
@Value
(
"
installationRoleId
"
)
@Value
(
"
${installationRoleId}
"
)
private
String
installationRoleId
;
private
String
installationRoleId
;
public
String
start
(
QualityProblem
qualityProblem
)
{
public
String
start
(
QualityProblem
qualityProblem
)
{
...
@@ -161,7 +161,7 @@ public class ProblemInitiationServiceImpl {
...
@@ -161,7 +161,7 @@ public class ProblemInitiationServiceImpl {
LambdaQueryWrapper
<
SuperviseRule
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
SuperviseRule
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
SuperviseRule:
:
getAdminRegionCode
,
projectServiceImpl
.
getById
(
object
.
getLong
(
"projectId"
)).
getInstallRegionCode
());
wrapper
.
eq
(
SuperviseRule:
:
getAdminRegionCode
,
projectServiceImpl
.
getById
(
object
.
getLong
(
"projectId"
)).
getInstallRegionCode
());
String
noticeUnitId
=
orgUsrServiceImpl
.
getById
(
superviseRuleServiceImpl
.
getOne
(
wrapper
).
getSuperviseDeptId
()).
getAmosOrgId
();
String
noticeUnitId
=
orgUsrServiceImpl
.
getById
(
superviseRuleServiceImpl
.
getOne
(
wrapper
).
getSuperviseDeptId
()).
getAmosOrgId
();
sendMessage
(
sequenceNbr
,
noticeUnitId
,
smsParams
,
smsCode
,
supervisionRoleId
);
sendMessage
(
sequenceNbr
,
noticeUnitId
,
smsParams
,
smsCode
,
supervisionRoleId
,
object
);
}
else
if
(
SMSEnum
.
项目立项驳回短信
.
getCode
().
equals
(
smsCode
))
{
}
else
if
(
SMSEnum
.
项目立项驳回短信
.
getCode
().
equals
(
smsCode
))
{
//设置短信发送的基本参数
//设置短信发送的基本参数
HashMap
<
String
,
String
>
smsParams
=
new
HashMap
();
HashMap
<
String
,
String
>
smsParams
=
new
HashMap
();
...
@@ -172,10 +172,10 @@ public class ProblemInitiationServiceImpl {
...
@@ -172,10 +172,10 @@ public class ProblemInitiationServiceImpl {
LambdaQueryWrapper
<
SuperviseRule
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
SuperviseRule
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
SuperviseRule:
:
getAdminRegionCode
,
projectServiceImpl
.
getById
(
object
.
getLong
(
"projectId"
)).
getInstallRegionCode
());
wrapper
.
eq
(
SuperviseRule:
:
getAdminRegionCode
,
projectServiceImpl
.
getById
(
object
.
getLong
(
"projectId"
)).
getInstallRegionCode
());
String
supervisionUnitId
=
orgUsrServiceImpl
.
getById
(
superviseRuleServiceImpl
.
getOne
(
wrapper
).
getSuperviseDeptId
()).
getAmosOrgId
();
String
supervisionUnitId
=
orgUsrServiceImpl
.
getById
(
superviseRuleServiceImpl
.
getOne
(
wrapper
).
getSuperviseDeptId
()).
getAmosOrgId
();
sendMessage
(
sequenceNbr
,
supervisionUnitId
,
smsParams
,
smsCode
,
supervisionRoleId
);
sendMessage
(
sequenceNbr
,
supervisionUnitId
,
smsParams
,
smsCode
,
supervisionRoleId
,
object
);
//给安装发短信
//给安装发短信
String
installationUnitId
=
orgUsrServiceImpl
.
getById
(
projectServiceImpl
.
getById
(
object
.
getLong
(
"projectId"
)).
getInstallationUnitId
()).
getAmosOrgId
();
String
installationUnitId
=
orgUsrServiceImpl
.
getById
(
projectServiceImpl
.
getById
(
object
.
getLong
(
"projectId"
)).
getInstallationUnitId
()).
getAmosOrgId
();
sendMessage
(
sequenceNbr
,
installationUnitId
,
smsParams
,
smsCode
,
installationRoleId
);
sendMessage
(
sequenceNbr
,
installationUnitId
,
smsParams
,
smsCode
,
installationRoleId
,
object
);
}
}
}
}
...
@@ -189,18 +189,20 @@ public class ProblemInitiationServiceImpl {
...
@@ -189,18 +189,20 @@ public class ProblemInitiationServiceImpl {
* @param smsCode 短信模板
* @param smsCode 短信模板
* @param roleId 角色id
* @param roleId 角色id
*/
*/
public
void
sendMessage
(
Long
sequenceNbr
,
String
noticeUnitId
,
HashMap
<
String
,
String
>
smsParams
,
String
smsCode
,
String
roleId
){
public
void
sendMessage
(
Long
sequenceNbr
,
String
noticeUnitId
,
HashMap
<
String
,
String
>
smsParams
,
String
smsCode
,
String
roleId
,
JSONObject
object
){
//向noticeUnitId的部门发送短信
//向noticeUnitId的部门发送短信
List
<
AgencyUserModel
>
agencyUserModelList
=
Privilege
.
agencyUserClient
.
queryByRoleId
(
roleId
,
null
).
getResult
();
List
<
AgencyUserModel
>
agencyUserModelList
=
Privilege
.
agencyUserClient
.
queryByRoleId
(
roleId
,
null
).
getResult
();
List
<
AgencyUserModel
>
companyUserModelList
=
Privilege
.
agencyUserClient
.
queryByCompanyId
(
Long
.
valueOf
(
noticeUnitId
),
null
,
null
,
null
).
getResult
();
Map
<
String
,
AgencyUserModel
>
map
=
new
HashMap
<>();
for
(
AgencyUserModel
agencyUserModel
:
companyUserModelList
)
{
map
.
put
(
agencyUserModel
.
getUserId
(),
agencyUserModel
);
}
//遍历用户List,拿到用户手机号、userId,来发短信、存短信日志。
//遍历用户List,拿到用户手机号、userId,来发短信、存短信日志。
for
(
AgencyUserModel
agencyUserModel
:
agencyUserModelList
)
{
for
(
AgencyUserModel
agencyUserModel
:
agencyUserModelList
)
{
boolean
bool
=
false
;
boolean
bool
=
false
;
List
<
CompanyModel
>
companyModelList
=
agencyUserModel
.
getCompanys
();
if
(!
ValidationUtil
.
isEmpty
(
map
.
get
(
agencyUserModel
.
getUserId
()))){
for
(
CompanyModel
companyModel
:
companyModelList
)
{
bool
=
true
;
bool
=
companyModel
.
getSequenceNbr
().
equals
(
noticeUnitId
);
if
(
bool
){
break
;
}
}
}
if
(
bool
)
{
if
(
bool
)
{
...
@@ -209,7 +211,7 @@ public class ProblemInitiationServiceImpl {
...
@@ -209,7 +211,7 @@ public class ProblemInitiationServiceImpl {
continue
;
continue
;
}
}
if
(
SMSEnum
.
项目安装告知申请
.
getCode
().
equals
(
smsCode
)
||
SMSEnum
.
项目立项驳回短信
.
getCode
().
equals
(
smsCode
)){
if
(
SMSEnum
.
项目安装告知申请
.
getCode
().
equals
(
smsCode
)
||
SMSEnum
.
项目立项驳回短信
.
getCode
().
equals
(
smsCode
)){
saveProjectSmsLog
(
smsRecordModel
,
sequenceNbr
,
noticeUnitId
,
agencyUserModel
);
saveProjectSmsLog
(
smsRecordModel
,
sequenceNbr
,
noticeUnitId
,
agencyUserModel
,
object
);
}
else
{
}
else
{
saveProblemSmsLog
(
smsRecordModel
,
sequenceNbr
,
noticeUnitId
,
agencyUserModel
);
saveProblemSmsLog
(
smsRecordModel
,
sequenceNbr
,
noticeUnitId
,
agencyUserModel
);
}
}
...
@@ -218,14 +220,14 @@ public class ProblemInitiationServiceImpl {
...
@@ -218,14 +220,14 @@ public class ProblemInitiationServiceImpl {
}
}
}
}
public
void
saveProjectSmsLog
(
SmsRecordModel
smsRecordModel
,
Long
sequenceNbr
,
String
noticeUnitId
,
AgencyUserModel
agencyUserModel
){
public
void
saveProjectSmsLog
(
SmsRecordModel
smsRecordModel
,
Long
sequenceNbr
,
String
noticeUnitId
,
AgencyUserModel
agencyUserModel
,
JSONObject
object
){
LambdaQueryWrapper
<
OrgUsr
>
wrapperQueryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
OrgUsr
>
wrapperQueryWrapper
=
new
LambdaQueryWrapper
<>();
wrapperQueryWrapper
.
eq
(
OrgUsr:
:
getAmosOrgId
,
agencyUserModel
.
getSequenceNbr
());
wrapperQueryWrapper
.
eq
(
OrgUsr:
:
getAmosOrgId
,
agencyUserModel
.
getSequenceNbr
());
InstallNoticeMsg
installNoticeMsg
=
new
InstallNoticeMsg
();
InstallNoticeMsg
installNoticeMsg
=
new
InstallNoticeMsg
();
installNoticeMsg
.
setContent
(
smsRecordModel
.
getSmsContent
());
installNoticeMsg
.
setContent
(
smsRecordModel
.
getSmsContent
());
installNoticeMsg
.
setInstallNoticeId
(
smsRecordModel
.
getSequenceNbr
(
));
installNoticeMsg
.
setInstallNoticeId
(
object
.
getLong
(
"sequenceNbr"
));
installNoticeMsg
.
setTargetUnitId
(
Long
.
valueOf
(
smsRecordModel
.
getAgencyCode
()
));
installNoticeMsg
.
setTargetUnitId
(
Long
.
valueOf
(
noticeUnitId
));
installNoticeMsg
.
setTargetPersonId
(
Long
.
valueOf
(
agencyUserModel
.
getUserId
()
));
installNoticeMsg
.
setTargetPersonId
(
orgUsrServiceImpl
.
getOne
(
wrapperQueryWrapper
).
getSequenceNbr
(
));
installNoticeMsg
.
setSendTime
(
smsRecordModel
.
getSendTime
());
installNoticeMsg
.
setSendTime
(
smsRecordModel
.
getSendTime
());
installNoticeMsgService
.
save
(
installNoticeMsg
);
installNoticeMsgService
.
save
(
installNoticeMsg
);
}
}
...
...
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 @
38fe4391
...
@@ -122,25 +122,25 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,P
...
@@ -122,25 +122,25 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,P
projectResourceMapper
.
insert
(
projectResource
);
projectResourceMapper
.
insert
(
projectResource
);
}
}
/**
//
/**
* 项目设备删除
//
* 项目设备删除
* @param ids
//
* @param ids
*/
//
*/
@Transactional
//
@Transactional
public
void
welderDelete
(
String
ids
)
{
//
public void welderDelete(String ids) {
this
.
list
(
new
QueryWrapper
<
ProjectResource
>().
lambda
().
in
(
//
this.list(new QueryWrapper<ProjectResource>().lambda().in(
ProjectResource:
:
getSequenceNbr
,
//
ProjectResource::getSequenceNbr,
Arrays
.
stream
(
ids
.
split
(
","
)).
map
(
Long:
:
valueOf
).
collect
(
Collectors
.
toList
()))
//
Arrays.stream(ids.split(",")).map(Long::valueOf).collect(Collectors.toList()))
).
forEach
(
item
->
{
//
).forEach(item -> {
this
.
equipmentMapper
.
deleteById
(
item
.
getResourceId
());
//
this.equipmentMapper.deleteById(item.getResourceId());
this
.
projectResourceMapper
.
deleteById
(
item
.
getSequenceNbr
());
//
this.projectResourceMapper.deleteById(item.getSequenceNbr());
});
//
});
}
//
}
/**
/**
* 绑定项目所用到的设备管材
* 绑定项目所用到的设备管材
*/
*/
public
ProjectResource
saveIds
(
JSONObject
jsonObject
)
{
public
ProjectResource
saveIds
(
JSONObject
jsonObject
)
throws
Exception
{
JSONArray
subForm
=
jsonObject
.
getJSONArray
(
"subForm"
);
JSONArray
subForm
=
jsonObject
.
getJSONArray
(
"subForm"
);
ProjectResource
Resource
=
new
ProjectResource
();
ProjectResource
Resource
=
new
ProjectResource
();
...
@@ -151,6 +151,11 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,P
...
@@ -151,6 +151,11 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,P
Long
SequenceNbr
=
Long
.
valueOf
(
jsonObject
.
getString
(
"sequenceNbr"
));
Long
SequenceNbr
=
Long
.
valueOf
(
jsonObject
.
getString
(
"sequenceNbr"
));
String
type
=
jsonObject
.
getString
(
"type"
);
String
type
=
jsonObject
.
getString
(
"type"
);
LambdaQueryWrapper
<
ProjectResource
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
ProjectResource:
:
getResourceId
,
select
);
wrapper
.
eq
(
ProjectResource:
:
getProjectId
,
SequenceNbr
);
ProjectResource
projectResourceVerify
=
projectResourceMapper
.
selectOne
(
wrapper
);
if
(
ValidationUtil
.
isEmpty
(
projectResourceVerify
)){
//判断资源类型并插入
//判断资源类型并插入
if
(
type
.
equals
(
设备资源
.
getName
()))
{
if
(
type
.
equals
(
设备资源
.
getName
()))
{
projectResource
.
setType
(
设备资源
.
getCode
());
projectResource
.
setType
(
设备资源
.
getCode
());
...
@@ -172,6 +177,9 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,P
...
@@ -172,6 +177,9 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,P
projectResource
.
setResourceId
(
Long
.
valueOf
(
select
));
projectResource
.
setResourceId
(
Long
.
valueOf
(
select
));
BeanUtils
.
copyProperties
(
projectResource
,
Resource
);
BeanUtils
.
copyProperties
(
projectResource
,
Resource
);
this
.
save
(
projectResource
);
this
.
save
(
projectResource
);
}
else
{
throw
new
Exception
(
"该资源已存在"
);
}
}
}
return
Resource
;
return
Resource
;
}
}
...
@@ -285,6 +293,11 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,P
...
@@ -285,6 +293,11 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,P
for
(
Long
id:
idList
){
for
(
Long
id:
idList
){
ProjectMaterialDto
projectMaterialDto
=
new
ProjectMaterialDto
();
ProjectMaterialDto
projectMaterialDto
=
new
ProjectMaterialDto
();
BeanUtils
.
copyProperties
(
materialService
.
getById
(
id
),
projectMaterialDto
);
BeanUtils
.
copyProperties
(
materialService
.
getById
(
id
),
projectMaterialDto
);
//获取项目创建时间
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
.
setProjectName
(
String
.
valueOf
(
map
.
get
(
id
)));
projectMaterialDto
.
setProjectResourceId
(
id
);
projectMaterialDto
.
setProjectResourceId
(
id
);
list
.
add
(
projectMaterialDto
);
list
.
add
(
projectMaterialDto
);
...
@@ -294,6 +307,11 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,P
...
@@ -294,6 +307,11 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,P
for
(
Long
id:
idList
){
for
(
Long
id:
idList
){
WelderEquipmentDto
welderEquipmentDto
=
new
WelderEquipmentDto
();
WelderEquipmentDto
welderEquipmentDto
=
new
WelderEquipmentDto
();
BeanUtils
.
copyProperties
(
equipmentService
.
getById
(
id
),
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
.
setProjectName
(
String
.
valueOf
(
map
.
get
(
id
)));
welderEquipmentDto
.
setProjectResourceId
(
String
.
valueOf
(
id
));
welderEquipmentDto
.
setProjectResourceId
(
String
.
valueOf
(
id
));
list
.
add
(
welderEquipmentDto
);
list
.
add
(
welderEquipmentDto
);
...
...
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 @
38fe4391
...
@@ -76,22 +76,34 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
...
@@ -76,22 +76,34 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
}
}
private
void
getProjectState
(
ProjectDto
project
)
{
private
void
getProjectState
(
ProjectDto
project
)
{
String
state
=
"
待审核
"
,
insDep
=
""
,
insPerson
=
""
;
String
state
=
""
,
insDep
=
""
,
insPerson
=
""
;
LambdaQueryWrapper
<
ProjectInitiation
>
lambdaQueryWrap
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
ProjectInitiation
>
lambdaQueryWrap
=
new
LambdaQueryWrapper
<>();
lambdaQueryWrap
.
eq
(
ProjectInitiation:
:
getInstanceId
,
project
.
getInstanceId
())
lambdaQueryWrap
.
eq
(
ProjectInitiation:
:
getInstanceId
,
project
.
getInstanceId
())
.
eq
(
ProjectInitiation
::
getTaskName
,
ProjectInitiationEnum
.
平台审核
.
getName
())
//
.eq(ProjectInitiation ::getTaskName, ProjectInitiationEnum.平台审核.getName())
.
orderByDesc
(
ProjectInitiation:
:
getSequenceNbr
);
.
orderByDesc
(
ProjectInitiation:
:
getSequenceNbr
);
List
<
ProjectInitiation
>
projectInitiationList
=
projectInitiationService
.
list
(
lambdaQueryWrap
);
List
<
ProjectInitiation
>
projectInitiationList
=
projectInitiationService
.
list
(
lambdaQueryWrap
);
if
(!
ValidationUtil
.
isEmpty
(
projectInitiationList
)){
if
(!
ValidationUtil
.
isEmpty
(
projectInitiationList
)){
ProjectInitiation
projectInitiation
=
projectInitiationList
.
iterator
().
next
();
ProjectInitiation
projectInitiation
=
projectInitiationList
.
iterator
().
next
();
JSONObject
jsonObject
=
JSON
.
parseObject
(
projectInitiation
.
getContext
());
JSONObject
jsonObject
=
JSON
.
parseObject
(
projectInitiation
.
getContext
());
if
(!
ValidationUtil
.
isEmpty
(
jsonObject
)){
if
(
ProjectInitiationEnum
.
平台审核
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
审批人审批
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
审核人审核
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
监检科室分配
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
监检员分配
.
getName
().
equals
(
project
.
getStatus
())
||
ProjectInitiationEnum
.
监检员审核
.
getName
().
equals
(
project
.
getStatus
())){
state
=
jsonObject
.
getString
(
XJConstant
.
PROCESS_PROJECT_STATE
);
if
(!
ValidationUtil
.
isEmpty
(
jsonObject
)){
insDep
=
jsonObject
.
getString
(
XJConstant
.
INS_DEP
);
state
=
jsonObject
.
getString
(
XJConstant
.
PROCESS_PROJECT_STATE
);
insPerson
=
jsonObject
.
getString
(
XJConstant
.
INS_PRESON
);
insDep
=
jsonObject
.
getString
(
XJConstant
.
INS_DEP
);
insPerson
=
jsonObject
.
getString
(
XJConstant
.
INS_PRESON
);
}
}
}
}
}
if
(
ProjectInitiationEnum
.
平台审核
.
getName
().
equals
(
project
.
getStatus
())){
if
(
ValidationUtil
.
isEmpty
(
state
)){
state
=
"待审核"
;
}
}
else
{
if
(
ValidationUtil
.
isEmpty
(
state
)){
state
=
"待上传资料"
;
}
}
project
.
setExamineProjectState
(
state
);
project
.
setExamineProjectState
(
state
);
project
.
setInsDep
(
insDep
);
project
.
setInsDep
(
insDep
);
project
.
setInsPerson
(
insPerson
);
project
.
setInsPerson
(
insPerson
);
...
@@ -166,13 +178,15 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
...
@@ -166,13 +178,15 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
attachment
.
setInfo
(
JSON
.
toJSONString
(
subForm
));
attachment
.
setInfo
(
JSON
.
toJSONString
(
subForm
));
attachmentService
.
updateById
(
attachment
);
attachmentService
.
updateById
(
attachment
);
}
}
if
(
ValidationUtil
.
isEmpty
(
jsonObject
.
getString
(
XJConstant
.
PROCESS_PROJECT_STATE
))){
jsonObject
.
put
(
XJConstant
.
PROCESS_PROJECT_STATE
,
"资料已上传"
);
}
Project
project
=
this
.
getById
(
sequenceNbr
);
Project
project
=
this
.
getById
(
sequenceNbr
);
ProjectDto
projectDto
=
new
ProjectDto
();
ProjectDto
projectDto
=
new
ProjectDto
();
BeanUtils
.
copyProperties
(
project
,
projectDto
);
BeanUtils
.
copyProperties
(
project
,
projectDto
);
projectDto
.
setInsDep
(
jsonObject
.
getString
(
"insDep"
));
projectDto
.
setInsDep
(
jsonObject
.
getString
(
"insDep"
));
projectDto
.
setInsDep
(
jsonObject
.
getString
(
"insPerson"
));
projectDto
.
setInsDep
(
jsonObject
.
getString
(
"insPerson"
));
projectDto
.
setProcessProjectState
(
jsonObject
.
getString
(
"processProjectState"
));
projectDto
.
setProcessProjectState
(
jsonObject
.
getString
(
XJConstant
.
PROCESS_PROJECT_STATE
));
boolean
design
=
false
,
install
=
false
;
boolean
design
=
false
,
install
=
false
;
for
(
Object
object:
subForm
){
for
(
Object
object:
subForm
){
JSONObject
jo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
object
));
JSONObject
jo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
object
));
...
@@ -188,7 +202,6 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
...
@@ -188,7 +202,6 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
if
(
design
&&
install
){
if
(
design
&&
install
){
projectInitiationService
.
execute
(
project
.
getInstanceId
(),
projectDto
,
"1"
);
projectInitiationService
.
execute
(
project
.
getInstanceId
(),
projectDto
,
"1"
);
}
}
this
.
updateById
(
project
);
return
"ok"
;
return
"ok"
;
}
}
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/resources/application.properties
View file @
38fe4391
...
@@ -41,4 +41,7 @@ ugp.sms.tempCode=SMS_UGP_0007
...
@@ -41,4 +41,7 @@ ugp.sms.tempCode=SMS_UGP_0007
amos.system.user.user-name
=
ugp_cti
amos.system.user.user-name
=
ugp_cti
amos.system.user.password
=
a1234567
amos.system.user.password
=
a1234567
amos.system.user.product
=
AMOS_STUDIO_WEB
amos.system.user.product
=
AMOS_STUDIO_WEB
amos.system.user.app-key
=
AMOS_STUDIO
amos.system.user.app-key
=
AMOS_STUDIO
\ No newline at end of file
supervisionRoleId
=
1582983768581369857
installationRoleId
=
1585099284334800898
\ 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