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
715ead06
Commit
715ead06
authored
Mar 16, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资料审核相关业务修改
parent
53e505df
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
38 deletions
+35
-38
FileDto.java
...ava/com/yeejoin/amos/boot/module/ugp/api/dto/FileDto.java
+7
-0
IProjectInitiationService.java
...oot/module/ugp/api/service/IProjectInitiationService.java
+0
-2
ProjectController.java
...mos/boot/module/ugp/biz/controller/ProjectController.java
+14
-16
ProjectOverFlowController.java
.../module/ugp/biz/controller/ProjectOverFlowController.java
+8
-11
ProjectOverFlowServiceImpl.java
...dule/ugp/biz/service/impl/ProjectOverFlowServiceImpl.java
+0
-6
ProjectServiceImpl.java
.../boot/module/ugp/biz/service/impl/ProjectServiceImpl.java
+6
-3
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/FileDto.java
View file @
715ead06
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
dto
;
import
com.alibaba.fastjson.JSONArray
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
lombok.Data
;
import
java.util.List
;
import
java.util.Map
;
@Data
public
class
FileDto
{
...
...
@@ -13,4 +17,7 @@ public class FileDto {
private
JSONArray
installSubForm
;
private
JSONArray
designSubForm
;
// 前端定制组件格式 文件
Page
<
Map
<
String
,
Object
>>
mapPage
;
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/service/IProjectInitiationService.java
View file @
715ead06
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
service
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.OverProjectDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Project
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
public
interface
IProjectInitiationService
{
/**
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/ProjectController.java
View file @
715ead06
...
...
@@ -24,6 +24,7 @@ import com.yeejoin.amos.feign.systemctl.Systemctl;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
io.swagger.models.Model
;
import
org.apache.commons.beanutils.BeanUtils
;
import
org.apache.commons.beanutils.BeanUtilsBean
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -457,10 +458,11 @@ public class ProjectController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"资料提交/保存"
,
notes
=
"资料提交/保存"
)
@PostMapping
(
value
=
"/informationSaveOrUpdate"
)
public
ResponseModel
<
Object
>
informationSaveOrUpdate
(
@RequestBody
JSONObject
object
)
{
public
ResponseModel
<
Object
>
informationSaveOrUpdate
(
@RequestBody
JSONObject
jsonObject
)
{
Map
<
String
,
Object
>
map
=
(
Map
<
String
,
Object
>)
jsonObject
.
get
(
TabLogoEnum
.
项目资料信息
.
getLogo
());
InformationDto
dto
=
new
InformationDto
();
dto
.
setProjectId
(
Long
.
valueOf
(
String
.
valueOf
(
object
.
get
(
"projectId"
)
)));
Map
<
String
,
Object
>
map
=
JSON
.
parseObject
(
object
.
toString
(
));
Long
projectId
=
Long
.
valueOf
(
String
.
valueOf
(
jsonObject
.
get
(
"projectId"
)));
String
type
=
String
.
valueOf
(
jsonObject
.
get
(
"type"
));
List
<
Map
<
String
,
Object
>>
welderList
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"welderList"
);
if
(!
ObjectUtils
.
isEmpty
(
welderList
))
{
dto
.
setWelderList
(
welderList
);
...
...
@@ -476,25 +478,21 @@ public class ProjectController extends BaseController {
dto
.
setEquipmentList
(
equipmentList
);
}
List
<
Map
<
String
,
Object
>>
fileList
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"fileList"
);
if
(!
ObjectUtils
.
isEmpty
(
fileList
))
{
dto
.
setFileList
(
fileList
);
}
dto
.
setType
(
String
.
valueOf
(
object
.
get
(
"type"
)));
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"designSubForm"
,
object
.
get
(
"designSubForm"
));
jsonObject
.
put
(
"installSubForm"
,
object
.
get
(
"installSubForm"
));
projectServiceImpl
.
informationSaveOrUpdate
(
dto
.
getEquipmentList
(),
dto
.
getWelderList
(),
dto
.
getMaterialList
(),
jsonObject
,
dto
.
getProjectId
(),
dto
.
getType
());
dto
.
setType
(
String
.
valueOf
(
jsonObject
.
get
(
"type"
)));
JSONObject
jsonObject2
=
new
JSONObject
();
jsonObject2
.
put
(
"designSubForm"
,
map
.
get
(
"designSubForm"
));
jsonObject2
.
put
(
"installSubForm"
,
map
.
get
(
"installSubForm"
));
projectServiceImpl
.
informationSaveOrUpdate
(
dto
.
getEquipmentList
(),
dto
.
getWelderList
(),
dto
.
getMaterialList
(),
jsonObject2
,
projectId
,
type
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"资料保存、审核"
,
notes
=
"资料保存、审核"
)
@PostMapping
(
value
=
"/informationAudit"
)
public
ResponseModel
<
Object
>
informationAudit
(
@RequestBody
JSONObject
object
)
{
public
ResponseModel
<
Object
>
informationAudit
(
@RequestBody
JSONObject
jsonObject
)
{
Map
<
String
,
Object
>
map
=
(
Map
<
String
,
Object
>)
jsonObject
.
get
(
TabLogoEnum
.
项目资料信息
.
getLogo
());
InformationDto
dto
=
new
InformationDto
();
dto
.
setProjectId
(
Long
.
valueOf
(
String
.
valueOf
(
object
.
get
(
"projectId"
))));
Map
<
String
,
Object
>
map
=
JSON
.
parseObject
(
object
.
toString
());
dto
.
setProjectId
(
Long
.
valueOf
(
String
.
valueOf
(
jsonObject
.
get
(
"projectId"
))));
List
<
Map
<
String
,
Object
>>
welderList
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"welderList"
);
if
(!
ObjectUtils
.
isEmpty
(
welderList
))
{
dto
.
setWelderList
(
welderList
);
...
...
@@ -511,7 +509,7 @@ public class ProjectController extends BaseController {
if
(!
ObjectUtils
.
isEmpty
(
fileList
))
{
dto
.
setFileList
(
fileList
);
}
projectServiceImpl
.
informationAudit
(
dto
.
getEquipmentList
(),
dto
.
getWelderList
(),
dto
.
getMaterialList
(),
dto
.
getFileList
(),
dto
.
getProjectId
(),
dto
.
getType
(
));
projectServiceImpl
.
informationAudit
(
dto
.
getEquipmentList
(),
dto
.
getWelderList
(),
dto
.
getMaterialList
(),
dto
.
getFileList
(),
dto
.
getProjectId
(),
String
.
valueOf
(
jsonObject
.
get
(
"type"
)
));
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/ProjectOverFlowController.java
View file @
715ead06
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.ObjectUtils
;
import
com.baomidou.mybatisplus.core.toolkit.StringUtils
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.ProcessTypeEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.WhetherItPassEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.TabLogoEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.OverProjectDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Project
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.ProjectInitiation
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IProjectInitiationService
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.ProjectInitiationServiceImpl
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.ProjectOverFlowServiceImpl
;
...
...
@@ -53,12 +48,13 @@ public class ProjectOverFlowController extends BaseController {
/**
* 项目结项流程启动API
*
* @param
dto 项目结项信息
* @param
jsonObject 表单信息: 项目结项信息 key为:{@link TabLogoEnum}
*/
@PostMapping
(
value
=
"/flowStart"
)
@ApiOperation
(
value
=
"项目竣工结项(竣工结项确认)- 结项项目结项流程启动API"
,
notes
=
"项目竣工结项(竣工结项确认)- 项目结项流程启动API"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
public
ResponseModel
<
Object
>
overProjectFlowStart
(
@RequestBody
OverProjectDto
dto
)
{
public
ResponseModel
<
Object
>
overProjectFlowStart
(
@RequestBody
JSONObject
jsonObject
)
{
OverProjectDto
dto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
jsonObject
.
get
(
TabLogoEnum
.
项目竣工信息
.
getLogo
())),
OverProjectDto
.
class
);
String
token
=
RequestContext
.
getToken
();
String
appKey
=
RequestContext
.
getAppKey
();
String
product
=
RequestContext
.
getProduct
();
...
...
@@ -76,12 +72,13 @@ public class ProjectOverFlowController extends BaseController {
/**
* 项目结项执行流程
*
* @param
dto 项目结项信息
* @param
jsonObject @param jsonObject 表单信息: 项目结项信息 key为:{@link TabLogoEnum}
*/
@PostMapping
(
value
=
"/flowExecute"
)
@ApiOperation
(
value
=
"项目结项流程执行通用API"
,
notes
=
"项目结项流程执行通用API"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
public
ResponseModel
<
Object
>
overProjectFlowExecute
(
@RequestBody
OverProjectDto
dto
)
{
public
ResponseModel
<
Object
>
overProjectFlowExecute
(
@RequestBody
JSONObject
jsonObject
)
{
OverProjectDto
dto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
jsonObject
.
get
(
TabLogoEnum
.
项目竣工信息
.
getLogo
())),
OverProjectDto
.
class
);
iProjectInitiationService
.
overProjectFlowExecute
(
dto
);
return
ResponseHelper
.
buildResponse
(
null
);
}
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/ProjectOverFlowServiceImpl.java
View file @
715ead06
...
...
@@ -6,16 +6,10 @@ import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.ProcessTypeEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.WhetherItPassEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.OverProjectDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.ProjectResourceDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Project
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.ProjectInitiation
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.ProjectResource
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectResourceMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IProjectResourceService
;
import
org.kie.internal.runtime.cdi.Activate
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
@Service
public
class
ProjectOverFlowServiceImpl
{
...
...
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 @
715ead06
...
...
@@ -31,6 +31,7 @@ import org.springframework.beans.BeanUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
...
...
@@ -776,7 +777,7 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
equipmentList
.
forEach
(
item
->
{
ProjectResource
projectResource
=
new
ProjectResource
();
projectResource
.
setProjectId
(
projectId
);
projectResource
.
setResourceId
(
Long
.
valueOf
(
String
.
valueOf
(
item
.
get
(
"sequence
N
br"
))));
projectResource
.
setResourceId
(
Long
.
valueOf
(
String
.
valueOf
(
item
.
get
(
"sequence
_n
br"
))));
projectResource
.
setType
(
"equipment"
);
projectResource
.
setName
(
String
.
valueOf
(
item
.
get
(
"name"
)));
projectResource
.
setStatus
(
ObjectUtils
.
isEmpty
(
item
.
get
(
status
))
?
"0"
:
String
.
valueOf
(
item
.
get
(
status
)));
...
...
@@ -809,8 +810,10 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
}
LambdaQueryWrapper
<
ProjectResource
>
lambda
=
new
QueryWrapper
<
ProjectResource
>().
lambda
();
lambda
.
eq
(
ProjectResource:
:
getProjectId
,
projectId
);
projectResourceMapper
.
delete
(
lambda
);
projectResourceService
.
saveBatch
(
projectResources
);
if
(!
CollectionUtils
.
isEmpty
(
projectResources
))
{
projectResourceMapper
.
delete
(
lambda
);
projectResourceService
.
saveBatch
(
projectResources
);
}
}
@Transactional
...
...
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