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
748b2ca1
Commit
748b2ca1
authored
Jun 27, 2023
by
lisong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加通用表单提交远程接口
parent
668db2bc
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
64 additions
and
6 deletions
+64
-6
PrivilegeFeginService.java
.../boot/module/tzs/flc/api/feign/PrivilegeFeginService.java
+1
-1
IRegUnitInfoService.java
.../boot/module/tzs/flc/api/service/IRegUnitInfoService.java
+3
-0
EquipmentCategoryServiceImpl.java
...le/tzs/biz/service/impl/EquipmentCategoryServiceImpl.java
+1
-1
RegUnitInfoController.java
.../module/tzs/flc/biz/controller/RegUnitInfoController.java
+14
-4
RegUnitInfoServiceImpl.java
...dule/tzs/flc/biz/service/impl/RegUnitInfoServiceImpl.java
+45
-0
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/api/feign/PrivilegeFeginService.java
View file @
748b2ca1
...
...
@@ -29,7 +29,7 @@ public interface PrivilegeFeginService {
//获取单位树
@RequestMapping
(
value
=
"/privilege/v1/company/tree"
,
method
=
RequestMethod
.
GET
)
FeignClientResult
tree
();
FeignClientResult
tree
(
@RequestHeader
(
"token"
)
String
token
,
@RequestHeader
(
"appKey"
)
String
appKey
,
@RequestHeader
(
"product"
)
String
product
);
//获取省级行政区划
@RequestMapping
(
value
=
"systemctl/v1/region/level"
,
method
=
RequestMethod
.
GET
)
...
...
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/api/service/IRegUnitInfoService.java
View file @
748b2ca1
...
...
@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.module.tzs.flc.api.dto.RegUnitInfoDto;
import
java.util.Collection
;
import
java.util.List
;
import
java.util.Map
;
/**
* 单位注册信息表接口类
...
...
@@ -70,4 +71,6 @@ public interface IRegUnitInfoService {
Boolean
creatQrCode
();
RegUnitInfoDto
adminInfo
(
String
unitCode
);
String
submit
(
Long
pageId
,
String
taskId
,
String
planInstanceId
,
String
topic
,
String
tableName
,
Map
<
String
,
Object
>
objectMap
)
throws
Exception
;
}
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/EquipmentCategoryServiceImpl.java
View file @
748b2ca1
...
...
@@ -302,7 +302,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
@Override
public
List
<
LinkedHashMap
>
creatTree
()
{
FeignClientResult
tree
=
privilegeFeginService
.
tree
();
FeignClientResult
tree
=
privilegeFeginService
.
tree
(
RequestContext
.
getToken
(),
RequestContext
.
getAppKey
(),
RequestContext
.
getProduct
()
);
List
<
LinkedHashMap
>
result
=
(
List
<
LinkedHashMap
>)
tree
.
getResult
();
List
<
LinkedHashMap
>
treeData
=
deleteRegulatorTreeData
(
result
);
List
<
LinkedHashMap
>
supervisionTree
=
treeData
.
stream
().
filter
(
e
->
code
.
equals
(
e
.
get
(
"orgCode"
))).
collect
(
Collectors
.
toList
());
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/controller/RegUnitInfoController.java
View file @
748b2ca1
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
flc
.
biz
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
...
...
@@ -29,10 +30,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.Collection
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Random
;
import
java.util.*
;
/**
* 单位注册信息表
...
...
@@ -85,6 +83,18 @@ public class RegUnitInfoController extends BaseController {
return
ResponseHelper
.
buildResponse
(
iRegUnitInfoService
.
creatQrCode
());
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@PostMapping
(
value
=
"/submit"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
""
,
notes
=
""
)
public
ResponseModel
<
Object
>
submit
(
@RequestParam
(
value
=
"pageId"
)
long
pageId
,
@RequestParam
(
value
=
"taskId"
,
required
=
false
)
String
taskId
,
@RequestParam
(
value
=
"planInstanceId"
,
required
=
false
)
String
planInstanceId
,
@RequestParam
(
value
=
"topic"
,
required
=
false
)
String
topic
,
@RequestParam
(
value
=
"tableName"
,
required
=
false
)
String
tableName
,
@RequestBody
Map
<
String
,
Object
>
kv
)
throws
Exception
{
return
ResponseHelper
.
buildResponse
(
iRegUnitInfoService
.
submit
(
pageId
,
taskId
,
planInstanceId
,
topic
,
tableName
,
kv
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/adminInfo"
,
method
=
RequestMethod
.
GET
)
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/service/impl/RegUnitInfoServiceImpl.java
View file @
748b2ca1
...
...
@@ -29,6 +29,7 @@ import com.yeejoin.amos.boot.module.tzs.flc.api.dto.RegUnitInfoDto;
import
com.yeejoin.amos.boot.module.tzs.flc.api.entity.RegUnitIc
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.entity.RegUnitInfo
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.feign.AccessFeignService
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.feign.IdxFeignService
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.feign.UgpServiceFeignClient
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.mapper.RegUnitInfoMapper
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.service.IRegUnitInfoService
;
...
...
@@ -44,6 +45,7 @@ import org.apache.http.entity.ContentType;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.mock.web.MockMultipartFile
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -117,6 +119,9 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
@Autowired
EquipmentCategoryServiceImpl
equipmentCategoryService
;
@Autowired
IdxFeignService
idxFeignService
;
/**
* 使用单位的类型,数据来源:cb_data_dictionary code = 1232
*/
...
...
@@ -698,6 +703,46 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
}
}
@Override
public
String
submit
(
Long
pageId
,
String
taskId
,
String
planInstanceId
,
String
topic
,
String
tableName
,
Map
<
String
,
Object
>
objectMap
)
throws
Exception
{
// 企业下所有用户(上送工作流)
ArrayList
<
String
>
flow
=
new
ArrayList
<>();
// 企业下所有用户(更新任务)
ArrayList
<
String
>
task
=
new
ArrayList
<>();
// 查询第一个填报信息获取企业
String
companyName
=
""
;
FeignClientResult
<
JSONObject
>
firstTask
=
idxFeignService
.
getFirstTask
(
taskId
);
if
(!
ObjectUtils
.
isEmpty
(
firstTask
))
{
companyName
=
String
.
valueOf
(
firstTask
.
getResult
().
get
(
"CHECKED_COMPANY"
));
}
if
(!
ObjectUtils
.
isEmpty
(
objectMap
))
{
FeignClientResult
<
CompanyModel
>
companyModelFeignClientResult
=
Privilege
.
companyClient
.
queryByCompanyName
(
companyName
);
if
(!
ObjectUtils
.
isEmpty
(
companyModelFeignClientResult
.
getResult
())
&&
!
ObjectUtils
.
isEmpty
(
companyModelFeignClientResult
.
getResult
().
getOrgCode
()))
{
FeignClientResult
<
Set
<
AgencyUserModel
>>
setFeignClientResult
=
Privilege
.
agencyUserClient
.
queryByOrgCode
(
companyModelFeignClientResult
.
getResult
().
getOrgCode
(),
null
);
if
(!
ObjectUtils
.
isEmpty
(
setFeignClientResult
))
{
setFeignClientResult
.
getResult
().
forEach
(
item
->
{
flow
.
add
(
item
.
getUserName
());
task
.
add
(
item
.
getUserId
());
});
}
}
}
String
userIds
=
String
.
join
(
","
,
flow
);
String
userIdsTask
=
String
.
join
(
","
,
task
);
// 添加被检查企业下的人员id
objectMap
.
put
(
"CHECKED_COMPANY_USERS"
,
userIds
);
// 表单信息提交
FeignClientResult
<
String
>
submit
=
idxFeignService
.
submit
(
pageId
,
taskId
,
planInstanceId
,
topic
,
tableName
,
objectMap
);
if
(
"200"
.
equals
(
String
.
valueOf
(
submit
.
getStatus
())))
{
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"title"
,
"企业整改"
);
jsonObject
.
put
(
"userIds"
,
userIdsTask
);
idxFeignService
.
updateAmosTask
(
taskId
,
jsonObject
);
}
return
"ok"
;
}
private
String
dealNull2EmptyString
(
String
t
)
{
return
StringUtils
.
isEmpty
(
t
)
?
""
:
t
;
}
...
...
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