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
5cd2a301
Commit
5cd2a301
authored
Aug 01, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into…
Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into develop_tzs_register_to_0715
parents
ffe69631
5f8679a2
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
153 additions
and
2 deletions
+153
-2
WorkflowFeignService.java
.../boot/biz/common/workflow/feign/WorkflowFeignService.java
+10
-0
JyjcInspectionApplicationController.java
...c/biz/controller/JyjcInspectionApplicationController.java
+12
-0
JyjcInspectionApplicationServiceImpl.java
...iz/service/impl/JyjcInspectionApplicationServiceImpl.java
+59
-0
bigScreenDetail.json
...ule-jyjc-biz/src/main/resources/json/bigScreenDetail.json
+14
-0
DPSubController.java
...boot/module/statistcs/biz/controller/DPSubController.java
+3
-1
DPSubServiceImpl.java
...t/module/statistcs/biz/service/impl/DPSubServiceImpl.java
+1
-1
reportEqu.json
...ule-statistics-biz/src/main/resources/json/reportEqu.json
+54
-0
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/workflow/feign/WorkflowFeignService.java
View file @
5cd2a301
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.biz.common.workflow.feign;
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.biz.common.workflow.feign;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
@@ -9,6 +10,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -9,6 +10,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.util.Map
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
feign.Response
;
import
feign.Response
;
...
@@ -227,4 +230,11 @@ public interface WorkflowFeignService {
...
@@ -227,4 +230,11 @@ public interface WorkflowFeignService {
@RequestMapping
(
"/task/getTaskNoAuth/{processInstanceId}"
)
@RequestMapping
(
"/task/getTaskNoAuth/{processInstanceId}"
)
JSONObject
getTaskId
(
@PathVariable
String
processInstanceId
);
JSONObject
getTaskId
(
@PathVariable
String
processInstanceId
);
/***
*
* 获取流程审批日志
* */
@RequestMapping
(
value
=
"/task/flowLogger/{procInsId}"
,
method
=
RequestMethod
.
GET
)
FeignClientResult
<
Map
<
String
,
Object
>>
getFlowLogger
(
@PathVariable
(
value
=
"procInsId"
)
String
procInsId
);
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/controller/JyjcInspectionApplicationController.java
View file @
5cd2a301
...
@@ -134,6 +134,18 @@ public class JyjcInspectionApplicationController extends BaseController {
...
@@ -134,6 +134,18 @@ public class JyjcInspectionApplicationController extends BaseController {
return
ResponseHelper
.
buildResponse
(
jyjcInspectionApplicationServiceImpl
.
selectBySeq
(
sequenceNbr
,
getSelectedOrgInfo
().
getCompany
().
getCompanyType
()));
return
ResponseHelper
.
buildResponse
(
jyjcInspectionApplicationServiceImpl
.
selectBySeq
(
sequenceNbr
,
getSelectedOrgInfo
().
getCompany
().
getCompanyType
()));
}
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/selectOneForBigScreen/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个"
,
notes
=
"根据sequenceNbr查询单个"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
selectOneForBigScreen
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
jyjcInspectionApplicationServiceImpl
.
selectOneForBigScreen
(
sequenceNbr
,
getSelectedOrgInfo
().
getCompany
().
getCompanyType
()));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/pageList"
)
@PostMapping
(
value
=
"/pageList"
)
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/JyjcInspectionApplicationServiceImpl.java
View file @
5cd2a301
...
@@ -19,6 +19,7 @@ import com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService;
...
@@ -19,6 +19,7 @@ import com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService;
import
com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory
;
import
com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory
;
import
com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FormValue
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.*
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.*
;
import
com.yeejoin.amos.boot.module.jyjc.api.enums.*
;
import
com.yeejoin.amos.boot.module.jyjc.api.enums.*
;
import
com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcBaseMapper
;
import
com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcBaseMapper
;
...
@@ -45,6 +46,7 @@ import com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO;
...
@@ -45,6 +46,7 @@ import com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO;
import
com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO
;
import
com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.lucene.queryparser.classic.QueryParser
;
import
org.apache.lucene.queryparser.classic.QueryParser
;
...
@@ -74,10 +76,13 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
...
@@ -74,10 +76,13 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.nio.charset.StandardCharsets
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
static
com
.
alibaba
.
fastjson
.
JSON
.
parseArray
;
/**
/**
* 服务实现类
* 服务实现类
...
@@ -129,6 +134,8 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -129,6 +134,8 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
@Value
(
"classpath:/json/bizTypeInfo.json"
)
@Value
(
"classpath:/json/bizTypeInfo.json"
)
private
Resource
bizTypeInfo
;
private
Resource
bizTypeInfo
;
@Value
(
"classpath:/json/bigScreenDetail.json"
)
private
Resource
bigScreenDetail
;
@Autowired
@Autowired
private
JyjcInspectionApplicationEquipMapper
jyjcInspectionApplicationEquipMapper
;
private
JyjcInspectionApplicationEquipMapper
jyjcInspectionApplicationEquipMapper
;
...
@@ -572,6 +579,58 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -572,6 +579,58 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
this
.
setPlanData
(
sequenceNbr
,
map
);
this
.
setPlanData
(
sequenceNbr
,
map
);
return
map
;
return
map
;
}
}
public
Map
<
String
,
Object
>
selectOneForBigScreen
(
Long
sequenceNbr
,
String
companyType
)
{
JyjcInspectionApplicationModel
model
=
this
.
getBaseMapper
().
selectDataBySeq
(
sequenceNbr
);
Map
<
String
,
Object
>
map
=
BeanUtil
.
beanToMap
(
model
);
// 附件
Map
<
String
,
Object
>
attMap
=
getAttachmentMap
(
sequenceNbr
);
// 设备
List
<
Map
<
String
,
Object
>>
arrayList
=
getEquipInfoList
(
sequenceNbr
);
map
.
put
(
"equip"
,
arrayList
);
map
.
putAll
(
attMap
);
map
.
put
(
"companyType"
,
companyType
);
this
.
setPlanData
(
sequenceNbr
,
map
);
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
workflowResult
=
workflowFeignService
.
getFlowLogger
(
model
.
getProcessInstanceId
()).
getResult
();
ArrayList
<
Map
<
String
,
Object
>>
flowLogger
=
(
ArrayList
)
workflowResult
.
get
(
"flowLogger"
);
ArrayList
<
Map
<
String
,
Object
>>
records
=
new
ArrayList
<>();
List
<
FormValue
>
jsonData
=
getJsonData
(
bigScreenDetail
);
jsonData
.
forEach
(
f
->
{
Object
o
=
map
.
get
(
f
.
getKey
());
if
(!
ObjectUtils
.
isEmpty
(
o
))
{
f
.
setValue
(
o
.
toString
());
}
});
if
(!
CollectionUtils
.
isEmpty
(
flowLogger
)){
for
(
int
i
=
flowLogger
.
size
()-
1
;
i
>=
0
;
i
--){
HashMap
<
String
,
Object
>
data
=
new
HashMap
<>();
data
.
put
(
"label"
,
flowLogger
.
get
(
i
).
get
(
"approvalStatue"
));
data
.
put
(
"operatingTime"
,
flowLogger
.
get
(
i
).
get
(
"operateDate"
));
data
.
put
(
"operater"
,
((
Map
<
String
,
Object
>)
flowLogger
.
get
(
i
).
get
(
"assignee"
)).
get
(
"orgNamesWithoutRole"
)+
":"
+
flowLogger
.
get
(
i
).
get
(
"taskName"
));
records
.
add
(
data
);
}
}
HashMap
<
String
,
Object
>
datas
=
new
HashMap
<>();
datas
.
put
(
"datas"
,
records
);
datas
.
put
(
"title"
,
"审批进度"
);
datas
.
put
(
"renderType"
,
"timeline"
);
resultMap
.
put
(
"infoRecords"
,
datas
);
resultMap
.
put
(
"keyParams"
,
jsonData
);
return
resultMap
;
}
private
List
<
FormValue
>
getJsonData
(
Resource
resource
)
{
String
json
;
try
{
json
=
IOUtils
.
toString
(
resource
.
getInputStream
(),
String
.
valueOf
(
StandardCharsets
.
UTF_8
));
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
e
);
}
return
parseArray
(
json
,
FormValue
.
class
);
}
private
List
<
Map
<
String
,
Object
>>
getEquipInfoList
(
Long
sequenceNbr
)
{
private
List
<
Map
<
String
,
Object
>>
getEquipInfoList
(
Long
sequenceNbr
)
{
Iterable
<
ESEquipmentCategoryDto
>
equips
=
getEsEquipmentCategoryDtos
(
sequenceNbr
);
Iterable
<
ESEquipmentCategoryDto
>
equips
=
getEsEquipmentCategoryDtos
(
sequenceNbr
);
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/resources/json/bigScreenDetail.json
0 → 100644
View file @
5cd2a301
[
{
"key"
:
"applicationNo"
,
"label"
:
"报检单号"
,
"type"
:
"text"
},
{
"key"
:
"applicationDate"
,
"label"
:
"报检日期"
,
"type"
:
"text"
},
{
"key"
:
"inspectionType"
,
"label"
:
"检验类型"
,
"type"
:
"text"
},
{
"key"
:
"applicationUnitName"
,
"label"
:
"申报单位名称"
,
"type"
:
"text"
},
{
"key"
:
"applicationUnitCode"
,
"label"
:
"单位统一信用代码"
,
"type"
:
"text"
},
{
"key"
:
"address"
,
"label"
:
"单位地址"
,
"type"
:
"text"
},
{
"key"
:
"superviseOrgName"
,
"label"
:
"监管单位名称"
,
"type"
:
"text"
},
{
"key"
:
"applicationContactName"
,
"label"
:
"单位联系人"
,
"type"
:
"text"
},
{
"key"
:
"applicationContactPhone"
,
"label"
:
"联系电话"
,
"type"
:
"text"
},
{
"key"
:
"inspectionUnitName"
,
"label"
:
"检验机构名称"
,
"type"
:
"text"
},
{
"key"
:
"applicationRemark"
,
"label"
:
"备注"
,
"type"
:
"text"
}
]
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/controller/DPSubController.java
View file @
5cd2a301
...
@@ -39,7 +39,9 @@ public class DPSubController {
...
@@ -39,7 +39,9 @@ public class DPSubController {
public
ResponseModel
<
JSONObject
>
commonQuery
(
@PathVariable
String
template
,
@RequestBody
Map
<
String
,
Object
>
param
)
{
public
ResponseModel
<
JSONObject
>
commonQuery
(
@PathVariable
String
template
,
@RequestBody
Map
<
String
,
Object
>
param
)
{
if
(
template
.
equals
(
"company"
))
{
// 企业
if
(
template
.
equals
(
"company"
))
{
// 企业
Assert
.
notNull
(
param
.
get
(
"useUnitCode"
),
"企业统一信用代码不能为空"
);
Assert
.
notNull
(
param
.
get
(
"useUnitCode"
),
"企业统一信用代码不能为空"
);
}
else
if
(
template
.
equals
(
"equip"
))
{
// 设备
}
else
if
(
template
.
equals
(
"reportEqu"
))
{
// 监督检验
Assert
.
notNull
(
param
.
get
(
"sequenceNbr"
),
"sequenceNbr不能为空"
);
}
else
if
(
template
.
equals
(
"equip"
))
{
//设备
if
(
ValidationUtil
.
isEmpty
(
param
.
get
(
"record"
))){
if
(
ValidationUtil
.
isEmpty
(
param
.
get
(
"record"
))){
param
.
put
(
"record"
,
param
.
get
(
"SEQUENCE_NBR"
));
param
.
put
(
"record"
,
param
.
get
(
"SEQUENCE_NBR"
));
}
}
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/service/impl/DPSubServiceImpl.java
View file @
5cd2a301
...
@@ -133,7 +133,7 @@ public class DPSubServiceImpl {
...
@@ -133,7 +133,7 @@ public class DPSubServiceImpl {
log
.
info
(
"{}tab页获取详情接口,共耗时:{} 毫秒"
,
tab
.
get
(
"displayName"
),
(
e
-
s
));
log
.
info
(
"{}tab页获取详情接口,共耗时:{} 毫秒"
,
tab
.
get
(
"displayName"
),
(
e
-
s
));
}
}
if
(!
tab
.
getString
(
"template"
).
contains
(
"equip"
)
&&
!
tab
.
getString
(
"template"
).
contains
(
"company"
)
&&
!
tab
.
getString
(
"template"
).
contains
(
"problem"
)
&&
tab
.
getString
(
"key"
).
equals
(
"keyinfo"
)){
if
(!
tab
.
getString
(
"template"
).
contains
(
"equip"
)
&&
!
tab
.
getString
(
"template"
).
contains
(
"company"
)
&&
!
tab
.
getString
(
"template"
).
contains
(
"problem"
)
&&
!
tab
.
getString
(
"template"
).
contains
(
"reportEqu"
)
&&
tab
.
getString
(
"key"
).
equals
(
"keyinfo"
)){
content
.
put
(
tab
.
getString
(
"key"
),
JSONObject
.
parseObject
(
apiResult
.
toString
()));
content
.
put
(
tab
.
getString
(
"key"
),
JSONObject
.
parseObject
(
apiResult
.
toString
()));
return
;
return
;
}
}
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/resources/json/reportEqu.json
0 → 100644
View file @
5cd2a301
{
"name"
:
"问题模板"
,
"tabs"
:
[
{
"key"
:
"keyinfo"
,
"displayName"
:
"基本信息"
,
"renderType"
:
"keyinfo"
,
"dataConfig"
:
{
"api"
:
{
"httpMethod"
:
"GET"
,
"apiPath"
:
"/jyjc/jyjc-inspection-application/selectOneForBigScreen/{sequenceNbr}"
,
"params"
:
{
}
}
}
},
{
"key"
:
"devtable"
,
"displayName"
:
"报检设备"
,
"renderType"
:
"table"
,
"useAloneApi"
:
true
,
"dataConfig"
:
{
"api"
:
{
"httpMethod"
:
"GET"
,
"apiPath"
:
"/jyjc/jyjc-inspection-application/{sequenceNbr}"
,
"params"
:
{
"current"
:
1
,
"size"
:
10
,
"sequenceNbr"
:
"{sequenceNbr}"
}
}
},
"visualParams"
:
{
"rowKey"
:
"record"
,
"columns"
:
[
{
"dataRenderingMode"
:
"defaultText"
,
"dataIndex"
:
"EQU_CATEGORY"
,
"width"
:
150
,
"align"
:
"left"
,
"title"
:
"设备类别"
,
"key"
:
"1"
},
{
"dataRenderingMode"
:
"defaultText"
,
"dataIndex"
:
"EQU_DEFINE"
,
"width"
:
200
,
"align"
:
"left"
,
"title"
:
"设备品种"
,
"key"
:
"2"
},
{
"dataRenderingMode"
:
"defaultText"
,
"dataIndex"
:
"PRODUCT_NAME"
,
"width"
:
300
,
"align"
:
"left"
,
"title"
:
"设备名称"
,
"key"
:
"3"
},
{
"dataRenderingMode"
:
"defaultText"
,
"dataIndex"
:
"PRODUCE_UNIT_NAME"
,
"width"
:
200
,
"align"
:
"left"
,
"title"
:
"设备出厂编号"
,
"key"
:
"4"
},
{
"dataRenderingMode"
:
"defaultText"
,
"dataIndex"
:
"USE_INNER_CODE"
,
"width"
:
200
,
"align"
:
"left"
,
"title"
:
"单位内部编号"
,
"key"
:
"5"
},
{
"dataRenderingMode"
:
"defaultText"
,
"dataIndex"
:
"ADDRESS"
,
"width"
:
300
,
"align"
:
"left"
,
"title"
:
"设备地址"
,
"key"
:
"6"
},
{
"dataRenderingMode"
:
"defaultText"
,
"dataIndex"
:
"EQU_CODE"
,
"width"
:
300
,
"align"
:
"left"
,
"title"
:
"设备代码"
,
"key"
:
"7"
},
{
"dataRenderingMode"
:
"defaultText"
,
"dataIndex"
:
"SUPERVISORY_CODE"
,
"width"
:
300
,
"align"
:
"left"
,
"title"
:
"监管码"
,
"key"
:
"8"
},
{
"dataRenderingMode"
:
"actionDetailBtn"
,
"dataIndex"
:
"action"
,
"width"
:
60
,
"align"
:
"left"
,
"title"
:
"操作"
,
"key"
:
"9"
,
"conf"
:
{
"title"
:
"设备详情"
,
"linkModelKey"
:
"equip"
}}
]
}
}
],
"content"
:
{
}
}
\ 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