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
b7914cc7
Commit
b7914cc7
authored
Mar 16, 2023
by
曹盼盼
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
09d14e18
a9a15a0c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
5 deletions
+51
-5
ProblemCodeLibController.java
...t/module/ugp/biz/controller/ProblemCodeLibController.java
+36
-0
ProjectController.java
...mos/boot/module/ugp/biz/controller/ProjectController.java
+15
-5
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/ProblemCodeLibController.java
View file @
b7914cc7
...
@@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
...
@@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import
com.baomidou.mybatisplus.core.toolkit.StringUtils
;
import
com.baomidou.mybatisplus.core.toolkit.StringUtils
;
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.biz.common.workflow.feign.WorkflowFeignService
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FailureDetailsServiceImpl
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.ProblemCodeLibDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.ProblemCodeLibDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.ProblemCodeLib
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.ProblemCodeLib
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IProblemCodeLibService
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IProblemCodeLibService
;
...
@@ -16,18 +18,26 @@ import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
...
@@ -16,18 +18,26 @@ import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import
com.yeejoin.amos.feign.privilege.model.ApplicationModel
;
import
com.yeejoin.amos.feign.privilege.model.ApplicationModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel
;
import
com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel
;
import
feign.Response
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.io.IOUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.exception.BaseException
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -48,6 +58,13 @@ public class ProblemCodeLibController extends BaseController {
...
@@ -48,6 +58,13 @@ public class ProblemCodeLibController extends BaseController {
@Resource
@Resource
private
IProblemCodeLibService
problemCodeLibService
;
private
IProblemCodeLibService
problemCodeLibService
;
@Autowired
FailureDetailsServiceImpl
failureDetailsServiceImpl
;
@Autowired
WorkflowFeignService
workflowFeignService
;
/**
/**
* 新增质量监检信息表
* 新增质量监检信息表
*/
*/
...
@@ -172,4 +189,23 @@ public class ProblemCodeLibController extends BaseController {
...
@@ -172,4 +189,23 @@ public class ProblemCodeLibController extends BaseController {
List
<
DictionarieValueModel
>
result
=
adminCommonlyUsed
.
getResult
();
List
<
DictionarieValueModel
>
result
=
adminCommonlyUsed
.
getResult
();
return
ResponseHelper
.
buildResponse
(
result
);
return
ResponseHelper
.
buildResponse
(
result
);
}
}
/**
* 参考JCS服务流程图信息
* @param instanceId 流程实例ID
* @return 流程图
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getInstanceImage"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"流程图高亮图片"
,
notes
=
"流程图高亮图片"
)
public
ResponseEntity
<
String
>
downloadFile
(
@RequestParam
String
instanceId
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
Response
feignResponse
=
workflowFeignService
.
thighLineImg
(
instanceId
);
try
{
Response
.
Body
body
=
feignResponse
.
body
();
return
new
ResponseEntity
<>(
IOUtils
.
toString
(
body
.
asInputStream
()),
HttpStatus
.
OK
);
}
catch
(
Exception
e
)
{
throw
new
BaseException
(
"Error exporting diagram"
,
"500"
,
instanceId
);
}
}
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/ProjectController.java
View file @
b7914cc7
...
@@ -22,7 +22,7 @@ import io.swagger.annotations.ApiModel;
...
@@ -22,7 +22,7 @@ import io.swagger.annotations.ApiModel;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
io.swagger.models.Model
;
import
io.swagger.models.Model
;
import
org.
springframework.bean
s.BeanUtils
;
import
org.
apache.commons.beanutil
s.BeanUtils
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -31,6 +31,7 @@ import io.swagger.annotations.Api;
...
@@ -31,6 +31,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.lang.reflect.InvocationTargetException
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
...
@@ -249,7 +250,8 @@ public class ProjectController extends BaseController {
...
@@ -249,7 +250,8 @@ public class ProjectController 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
=
"/processProject"
)
@PostMapping
(
value
=
"/processProject"
)
public
ResponseModel
<
String
>
processProject
(
@RequestParam
(
"sequenceNbr"
)
String
sequenceNbr
,
String
option
,
@RequestBody
JSONObject
json
){
public
ResponseModel
<
String
>
processProject
(
@RequestParam
(
"sequenceNbr"
)
String
sequenceNbr
,
String
option
,
@RequestBody
JSONObject
j
){
JSONObject
json
=
j
.
getJSONObject
(
"fileInfo"
);
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
,
"审核通过"
);
...
@@ -262,7 +264,6 @@ public class ProjectController extends BaseController {
...
@@ -262,7 +264,6 @@ public class ProjectController extends BaseController {
jsonObject
.
put
(
XJConstant
.
INS_DEP
,
map
.
get
(
"name"
));
jsonObject
.
put
(
XJConstant
.
INS_DEP
,
map
.
get
(
"name"
));
jsonObject
.
put
(
XJConstant
.
PROCESS_PROJECT_STATE
,
"监检员待审核"
);
jsonObject
.
put
(
XJConstant
.
PROCESS_PROJECT_STATE
,
"监检员待审核"
);
}
else
if
(!
ValidationUtil
.
isEmpty
(
insDepId
))
{
}
else
if
(!
ValidationUtil
.
isEmpty
(
insDepId
))
{
Map
map
=
orgServiceImpl
.
getdetialInfo
(
insDepId
);
Map
map
=
orgServiceImpl
.
getdetialInfo
(
insDepId
);
jsonObject
.
put
(
XJConstant
.
INS_DEPID
,
map
.
get
(
"sequenceNbr"
));
jsonObject
.
put
(
XJConstant
.
INS_DEPID
,
map
.
get
(
"sequenceNbr"
));
jsonObject
.
put
(
XJConstant
.
INS_DEP
,
map
.
get
(
"name"
));
jsonObject
.
put
(
XJConstant
.
INS_DEP
,
map
.
get
(
"name"
));
...
@@ -335,8 +336,17 @@ public class ProjectController extends BaseController {
...
@@ -335,8 +336,17 @@ public class ProjectController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"通过sequenceNbr查询项目详情"
,
notes
=
"通过sequenceNbr查询项目详情"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"通过sequenceNbr查询项目详情"
,
notes
=
"通过sequenceNbr查询项目详情"
)
@GetMapping
(
value
=
"/getDetail"
)
@GetMapping
(
value
=
"/getDetail"
)
public
ResponseModel
<
ProjectDto
>
getDetail
(
Long
sequenceNbr
){
public
ResponseModel
<
JSONObject
>
getDetail
(
Long
sequenceNbr
){
return
ResponseHelper
.
buildResponse
(
projectServiceImpl
.
getDetail
(
sequenceNbr
));
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
projectServiceImpl
.
getInformationDetail
(
sequenceNbr
)));
try
{
jsonObject
.
putAll
(
BeanUtils
.
describe
(
projectServiceImpl
.
getDetail
(
sequenceNbr
)));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
JSONObject
jo
=
new
JSONObject
();
jo
.
put
(
"projectInfo"
,
projectServiceImpl
.
selectById
(
sequenceNbr
));
jo
.
put
(
"fileInfo"
,
jsonObject
);
return
ResponseHelper
.
buildResponse
(
jo
);
}
}
...
...
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