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
670552e2
Commit
670552e2
authored
Nov 01, 2024
by
changxiangyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增'监督检验列表(企业)','检验业务开通列表监管'导出
parent
e8ff69b4
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
170 additions
and
153 deletions
+170
-153
JyjcOpeningApplicationMapper.java
.../module/jyjc/api/mapper/JyjcOpeningApplicationMapper.java
+3
-0
JyjcOpeningApplicationVo.java
...mos/boot/module/jyjc/api/vo/JyjcOpeningApplicationVo.java
+46
-0
JyjcOpeningApplicationMapper.xml
...rc/main/resources/mapper/JyjcOpeningApplicationMapper.xml
+7
-0
JyjcInspectionApplicationController.java
...c/biz/controller/JyjcInspectionApplicationController.java
+1
-1
JyjcOpeningApplicationController.java
...jyjc/biz/controller/JyjcOpeningApplicationController.java
+16
-0
JyjcInspectionApplicationServiceImpl.java
...iz/service/impl/JyjcInspectionApplicationServiceImpl.java
+45
-95
JyjcOpeningApplicationServiceImpl.java
...c/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
+52
-57
No files found.
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/mapper/JyjcOpeningApplicationMapper.java
View file @
670552e2
...
@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationModel;
...
@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationModel;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcOpeningApplication
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcOpeningApplication
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationRequstDto
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationRequstDto
;
import
com.yeejoin.amos.boot.module.jyjc.api.vo.JyjcOpeningApplicationVo
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.List
;
...
@@ -39,4 +40,6 @@ public interface JyjcOpeningApplicationMapper extends BaseMapper<JyjcOpeningAppl
...
@@ -39,4 +40,6 @@ public interface JyjcOpeningApplicationMapper extends BaseMapper<JyjcOpeningAppl
List
<
PublicityInspectOrgInfoDto
>
queryInspectionOrgListForPublicity
(
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"dto"
)
DPFilterParamDto
dpFilterParamDto
);
List
<
PublicityInspectOrgInfoDto
>
queryInspectionOrgListForPublicity
(
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"dto"
)
DPFilterParamDto
dpFilterParamDto
);
List
<
InspectionCompanyPublicityDto
>
queryInspectionOrgListForBiz
();
List
<
InspectionCompanyPublicityDto
>
queryInspectionOrgListForBiz
();
List
<
JyjcOpeningApplicationVo
>
queryJyjcOpeningApplicationListByIds
(
List
<
String
>
ids
);
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/vo/JyjcOpeningApplicationVo.java
0 → 100644
View file @
670552e2
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
api
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.format.DateTimeFormat
;
import
lombok.Data
;
import
org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity
;
import
java.util.Date
;
/**
* @author system_generator
* @date 2023-12-14
*/
@Data
public
class
JyjcOpeningApplicationVo
{
@ExcelProperty
(
value
=
"申请单编号"
,
index
=
0
)
String
applicationSeq
;
@ExcelProperty
(
value
=
"申请时间"
,
index
=
1
)
String
applyTime
;
@ExcelProperty
(
value
=
"检验检测机构名称"
,
index
=
2
)
String
unitCodeName
;
@ExcelProperty
(
value
=
"开通业务类型"
,
index
=
3
)
String
openBizType
;
@ExcelProperty
(
value
=
"统一信用代码"
,
index
=
4
)
String
unitCode
;
@ExcelProperty
(
value
=
"业务有效期至"
,
index
=
5
)
@DateTimeFormat
(
"yyyy-MM-dd"
)
Date
expiryDate
;
@ExcelProperty
(
value
=
"作废原因"
,
index
=
6
)
String
remark
;
@ExcelProperty
(
value
=
"办理状态"
,
index
=
7
)
String
statusName
;
@ExcelProperty
(
value
=
"办理日期"
,
index
=
8
)
@DateTimeFormat
(
"yyyy-MM-dd"
)
Date
acceptDate
;
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/resources/mapper/JyjcOpeningApplicationMapper.xml
View file @
670552e2
...
@@ -121,4 +121,11 @@
...
@@ -121,4 +121,11 @@
oa.unit_code = ei.use_unit_code
oa.unit_code = ei.use_unit_code
and oa.status = 6616
and oa.status = 6616
</select>
</select>
<select
id=
"queryJyjcOpeningApplicationListByIds"
resultType=
"com.yeejoin.amos.boot.module.jyjc.api.vo.JyjcOpeningApplicationVo"
>
select * from tz_jyjc_opening_application where sequence_nbr in
<foreach
collection=
"list"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{id}
</foreach>
;
</select>
</mapper>
</mapper>
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 @
670552e2
...
@@ -284,7 +284,7 @@ public class JyjcInspectionApplicationController extends BaseController {
...
@@ -284,7 +284,7 @@ public class JyjcInspectionApplicationController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{bizType}/export"
)
@GetMapping
(
value
=
"/{bizType}/export"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"定(首)检验列表(企业)/电梯检测
列表数据导出"
,
notes
=
"定(首)检验列表(企业)/电梯检测
列表数据导出"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"定(首)检验列表(企业)/电梯检测
/监督检验 列表数据导出"
,
notes
=
"定(首)检验列表(企业)/电梯检测/监督检验
列表数据导出"
)
public
void
export
(
@PathVariable
(
value
=
"bizType"
)
String
bizType
,
HttpServletResponse
response
,
String
ids
)
{
public
void
export
(
@PathVariable
(
value
=
"bizType"
)
String
bizType
,
HttpServletResponse
response
,
String
ids
)
{
Assert
.
hasText
(
ids
,
"未选择导出数据"
);
Assert
.
hasText
(
ids
,
"未选择导出数据"
);
jyjcInspectionApplicationServiceImpl
.
export
(
bizType
,
response
,
Arrays
.
asList
(
ids
.
split
(
","
)));
jyjcInspectionApplicationServiceImpl
.
export
(
bizType
,
response
,
Arrays
.
asList
(
ids
.
split
(
","
)));
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/controller/JyjcOpeningApplicationController.java
View file @
670552e2
...
@@ -21,6 +21,7 @@ import io.swagger.annotations.ApiOperation;
...
@@ -21,6 +21,7 @@ import io.swagger.annotations.ApiOperation;
import
io.swagger.annotations.ApiParam
;
import
io.swagger.annotations.ApiParam
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.Assert
;
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
;
...
@@ -31,6 +32,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
...
@@ -31,6 +32,7 @@ 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.servlet.http.HttpServletRequest
;
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
;
...
@@ -292,4 +294,18 @@ public class JyjcOpeningApplicationController extends BaseController {
...
@@ -292,4 +294,18 @@ public class JyjcOpeningApplicationController extends BaseController {
return
ResponseHelper
.
buildResponse
(
jyjcOpeningApplicationServiceImpl
.
queryInspectionOrgListForBiz
());
return
ResponseHelper
.
buildResponse
(
jyjcOpeningApplicationServiceImpl
.
queryInspectionOrgListForBiz
());
}
}
/**
* 检验业务开通列表导出
* @param response
* @param ids
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/exportdata"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"检验业务开通列表导出"
,
notes
=
"检验业务开通列表导出"
)
public
void
dataExport
(
HttpServletResponse
response
,
String
ids
)
{
Assert
.
hasText
(
ids
,
"未选择导出数据"
);
jyjcOpeningApplicationServiceImpl
.
exportData
(
response
,
Arrays
.
asList
(
ids
.
split
(
","
)));
}
}
}
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 @
670552e2
...
@@ -93,16 +93,16 @@ import java.util.stream.Collectors;
...
@@ -93,16 +93,16 @@ import java.util.stream.Collectors;
@Slf4j
@Slf4j
public
class
JyjcInspectionApplicationServiceImpl
extends
BaseService
<
JyjcInspectionApplicationModel
,
JyjcInspectionApplication
,
JyjcInspectionApplicationMapper
>
implements
IJyjcInspectionApplicationService
{
public
class
JyjcInspectionApplicationServiceImpl
extends
BaseService
<
JyjcInspectionApplicationModel
,
JyjcInspectionApplication
,
JyjcInspectionApplicationMapper
>
implements
IJyjcInspectionApplicationService
{
@Autowired
private
static
final
String
EQU_STATE
=
"EQU_STATE"
;
private
JyjcInspectionResultServiceImpl
inspectionResultService
;
private
static
final
String
EQU_CODE
=
"EQU_CODE"
;
@Autowired
private
static
final
String
SEQUENCE_NBR
=
"SEQUENCE_NBR"
;
private
JyjcInspectionApplicationEquipServiceImpl
applicationEquipService
;
private
static
final
String
SUMMIT_TYPE
=
"0"
;
private
static
final
String
FIRST_INSPECT
=
"firstInspect"
;
private
static
final
String
SUPERVISE
=
"supervise"
;
@Autowired
@Autowired
TzsServiceFeignClient
tzsServiceFeignClient
;
TzsServiceFeignClient
tzsServiceFeignClient
;
@Autowired
@Autowired
EventPublisher
eventPublisher
;
EventPublisher
eventPublisher
;
@Autowired
@Autowired
@Lazy
@Lazy
InspectionPlanServiceImpl
inspectionPlanService
;
InspectionPlanServiceImpl
inspectionPlanService
;
...
@@ -112,80 +112,64 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -112,80 +112,64 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
@Autowired
@Autowired
JyjcInspectionApplicationAttachmentServiceImpl
jyjcInspectionApplicationAttachmentService
;
JyjcInspectionApplicationAttachmentServiceImpl
jyjcInspectionApplicationAttachmentService
;
@Autowired
@Autowired
JyjcInspectionApplicationEquipServiceImpl
jyjcInspectionApplicationEquipService
;
JyjcInspectionApplicationEquipServiceImpl
jyjcInspectionApplicationEquipService
;
@Autowired
@Autowired
JyjcInspectionApplicationPushLogServiceImpl
jyjcInspectionApplicationPushLogService
;
JyjcInspectionApplicationPushLogServiceImpl
jyjcInspectionApplicationPushLogService
;
@Autowired
@Autowired
JyjcOpeningApplicationServiceImpl
jyjcOpeningApplicationService
;
JyjcOpeningApplicationServiceImpl
jyjcOpeningApplicationService
;
@Autowired
@Autowired
WorkflowFeignService
workflowFeignService
;
WorkflowFeignService
workflowFeignService
;
@Autowired
@Autowired
CommonServiceImpl
commonService
;
CommonServiceImpl
commonService
;
@Autowired
@Autowired
CmWorkflowServiceImpl
cmWorkflowService
;
CmWorkflowServiceImpl
cmWorkflowService
;
@Value
(
"classpath:/json/bizTypeInfo.json"
)
private
Resource
bizTypeInfo
;
@Autowired
private
JyjcInspectionApplicationEquipMapper
jyjcInspectionApplicationEquipMapper
;
@Autowired
@Autowired
JgFeignClient
jgFeignClient
;
JgFeignClient
jgFeignClient
;
@Autowired
private
RedisUtils
redisUtils
;
@Autowired
@Autowired
TaskModelServiceImpl
taskModelService
;
TaskModelServiceImpl
taskModelService
;
@Autowired
@Autowired
DataDictionaryServiceImpl
dataDictionaryService
;
DataDictionaryServiceImpl
dataDictionaryService
;
@Autowired
@Autowired
JyjcOpeningApplicationServiceImpl
openingApplicationService
;
JyjcOpeningApplicationServiceImpl
openingApplicationService
;
@Autowired
@Autowired
RedissonClient
redissonClient
;
RedissonClient
redissonClient
;
@Autowired
@Autowired
JyjcBaseMapper
jyjcBaseMapper
;
JyjcBaseMapper
jyjcBaseMapper
;
@Autowired
@Autowired
IdxBizJgUseInfoMapper
jgUseInfoMapper
;
IdxBizJgUseInfoMapper
jgUseInfoMapper
;
@Autowired
@Autowired
JyjcInspectionApplicationNoAcceptLogServiceImpl
noAcceptLogService
;
JyjcInspectionApplicationNoAcceptLogServiceImpl
noAcceptLogService
;
@Autowired
RestHighLevelClient
restHighLevelClient
;
@Autowired
private
JyjcInspectionResultServiceImpl
inspectionResultService
;
@Autowired
private
JyjcInspectionApplicationEquipServiceImpl
applicationEquipService
;
@Value
(
"classpath:/json/bizTypeInfo.json"
)
private
Resource
bizTypeInfo
;
@Autowired
private
JyjcInspectionApplicationEquipMapper
jyjcInspectionApplicationEquipMapper
;
@Autowired
private
RedisUtils
redisUtils
;
@Autowired
@Autowired
private
ESEquipmentCategory
esEquipmentCategory
;
private
ESEquipmentCategory
esEquipmentCategory
;
private
static
final
String
EQU_STATE
=
"EQU_STATE"
;
private
static
final
String
EQU_CODE
=
"EQU_CODE"
;
private
static
final
String
SEQUENCE_NBR
=
"SEQUENCE_NBR"
;
private
static
final
String
SUMMIT_TYPE
=
"0"
;
private
static
final
String
FIRST_INSPECT
=
"firstInspect"
;
/**
/**
* 省特检院等特殊公司code
* 省特检院等特殊公司code
*/
*/
@Value
(
"${shanxi.tjy.code:126100004352004822}"
)
@Value
(
"${shanxi.tjy.code:126100004352004822}"
)
private
String
shanxiCompanyCode
;
private
String
shanxiCompanyCode
;
@NotNull
@Autowired
public
static
List
<
DictionarieModel
>
getDictionarieModels
(
String
bizType
)
{
RestHighLevelClient
restHighLevelClient
;
List
<
JYJCTypeEnum
>
enums
=
JYJCTypeEnum
.
getListByBizType
(
bizType
);
return
enums
.
stream
().
map
(
e
->
{
DictionarieModel
dictionarieModel
=
new
DictionarieModel
();
dictionarieModel
.
setDictCode
(
e
.
getCode
());
dictionarieModel
.
setDictName
(
e
.
getName
());
return
dictionarieModel
;
}).
collect
(
Collectors
.
toList
());
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
JyjcInspectionApplicationModel
save
(
@RequestBody
JSONObject
obj
,
ReginParams
reginParams
)
{
public
JyjcInspectionApplicationModel
save
(
@RequestBody
JSONObject
obj
,
ReginParams
reginParams
)
{
...
@@ -320,8 +304,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -320,8 +304,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
}
else
{
}
else
{
String
taskContent
=
"来自"
+
model
.
getEquList
()
+
"【"
+
model
.
getSupervisoryCode
()
+
"】的业务办理,【申请单号:"
+
model
.
getApplicationNo
()
+
"】"
;
String
taskContent
=
"来自"
+
model
.
getEquList
()
+
"【"
+
model
.
getSupervisoryCode
()
+
"】的业务办理,【申请单号:"
+
model
.
getApplicationNo
()
+
"】"
;
taskModelService
.
updateTaskContentById
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"taskContent"
,
taskContent
).
taskModelService
.
updateTaskContentById
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"taskContent"
,
taskContent
).
put
(
"relationId"
,
model
.
getSequenceNbr
()
+
""
).
build
());
put
(
"relationId"
,
model
.
getSequenceNbr
()
+
""
).
build
());
}
}
}
}
...
@@ -488,7 +471,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -488,7 +471,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
return
dictionary
!=
null
?
dictionary
.
getName
()
:
""
;
return
dictionary
!=
null
?
dictionary
.
getName
()
:
""
;
}
}
@Override
@Override
public
Boolean
deleteBatchData
(
List
<
Long
>
sequenceNbr
)
{
public
Boolean
deleteBatchData
(
List
<
Long
>
sequenceNbr
)
{
this
.
deleteBatchSeq
(
sequenceNbr
);
this
.
deleteBatchSeq
(
sequenceNbr
);
...
@@ -505,11 +487,9 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -505,11 +487,9 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
return
getBaseMapper
().
listByCategory
(
page
,
equipClassify
);
return
getBaseMapper
().
listByCategory
(
page
,
equipClassify
);
}
}
@Override
@Override
public
Page
<
JyjcInspectionApplicationModel
>
queryForPageList
(
Page
<
JyjcInspectionApplication
>
page
,
JyjcInspectionApplicationModel
model
)
{
public
Page
<
JyjcInspectionApplicationModel
>
queryForPageList
(
Page
<
JyjcInspectionApplication
>
page
,
JyjcInspectionApplicationModel
model
)
{
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
String
companyType
=
reginParams
.
getCompany
().
getCompanyType
();
String
companyType
=
reginParams
.
getCompany
().
getCompanyType
();
String
companyCode
=
reginParams
.
getCompany
().
getCompanyCode
();
String
companyCode
=
reginParams
.
getCompany
().
getCompanyCode
();
String
currentUserId
=
reginParams
.
getUserModel
().
getUserId
();
String
currentUserId
=
reginParams
.
getUserModel
().
getUserId
();
...
@@ -535,6 +515,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -535,6 +515,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
/**
/**
* 定(首)检验列表(企业)/ 电梯检测 列表数据导出
* 定(首)检验列表(企业)/ 电梯检测 列表数据导出
*
* @param bizType
* @param bizType
* @param response
* @param response
* @param ids
* @param ids
...
@@ -542,7 +523,15 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -542,7 +523,15 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
@Override
@Override
public
void
export
(
String
bizType
,
HttpServletResponse
response
,
List
<
String
>
ids
)
{
public
void
export
(
String
bizType
,
HttpServletResponse
response
,
List
<
String
>
ids
)
{
List
<
JyjcInspectionApplicationVo
>
exportData
=
this
.
baseMapper
.
queryExportInIds
(
ids
);
List
<
JyjcInspectionApplicationVo
>
exportData
=
this
.
baseMapper
.
queryExportInIds
(
ids
);
String
typeName
=
FIRST_INSPECT
.
equals
(
bizType
)
?
"定(首)检验列表"
:
"电梯检测列表"
;
String
typeName
;
if
(
FIRST_INSPECT
.
equals
(
bizType
))
{
typeName
=
"定(首)检验列表"
;
}
else
if
(
SUPERVISE
.
equals
(
bizType
))
{
typeName
=
"监督检验列表"
;
}
else
{
typeName
=
"电梯检验列表"
;
}
ExcelUtil
.
createTemplate
(
response
,
typeName
+
"数据"
,
typeName
,
exportData
,
JyjcInspectionApplicationVo
.
class
,
null
,
false
);
ExcelUtil
.
createTemplate
(
response
,
typeName
+
"数据"
,
typeName
,
exportData
,
JyjcInspectionApplicationVo
.
class
,
null
,
false
);
}
}
...
@@ -722,16 +711,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -722,16 +711,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
this
.
setResultTypeByBizType
(
resultModel
,
model
.
getBizType
());
this
.
setResultTypeByBizType
(
resultModel
,
model
.
getBizType
());
resultModels
.
add
(
resultModel
);
resultModels
.
add
(
resultModel
);
// 新增设备履历信息
// 新增设备履历信息
jgResumeInfoDtoList
.
add
(
JgResumeInfoDto
.
builder
()
jgResumeInfoDtoList
.
add
(
JgResumeInfoDto
.
builder
().
applyNo
(
entity
.
getApplicationNo
()).
businessType
(
resultModel
.
getInspectionTypeName
()).
businessId
(
String
.
valueOf
(
entity
.
getSequenceNbr
())).
equId
(
applicationEquipModels
.
get
(
i
).
getEquipUnicode
()).
approvalUnit
(
model
.
getInspectionUnitName
()).
approvalUnitCode
(
model
.
getInspectionUnitCode
()).
status
(
"正常"
).
routePath
(
taskV2Model
.
getRoutePath
()).
build
());
.
applyNo
(
entity
.
getApplicationNo
())
.
businessType
(
resultModel
.
getInspectionTypeName
())
.
businessId
(
String
.
valueOf
(
entity
.
getSequenceNbr
()))
.
equId
(
applicationEquipModels
.
get
(
i
).
getEquipUnicode
())
.
approvalUnit
(
model
.
getInspectionUnitName
())
.
approvalUnitCode
(
model
.
getInspectionUnitCode
())
.
status
(
"正常"
)
.
routePath
(
taskV2Model
.
getRoutePath
())
.
build
());
}
}
inspectionResultService
.
saveOrUpdateBatch
(
resultModels
);
inspectionResultService
.
saveOrUpdateBatch
(
resultModels
);
// 报检信息推送
// 报检信息推送
...
@@ -748,7 +728,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -748,7 +728,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
}
}
}
}
private
void
saveBatchResume
(
List
<
JgResumeInfoDto
>
jgResumeInfoDtoList
)
{
private
void
saveBatchResume
(
List
<
JgResumeInfoDto
>
jgResumeInfoDtoList
)
{
try
{
try
{
jgFeignClient
.
saveBatchResume
(
jgResumeInfoDtoList
);
jgFeignClient
.
saveBatchResume
(
jgResumeInfoDtoList
);
...
@@ -876,7 +855,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -876,7 +855,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
return
true
;
return
true
;
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Boolean
doNoAccept
(
Map
<
String
,
Object
>
params
)
{
public
Boolean
doNoAccept
(
Map
<
String
,
Object
>
params
)
{
String
instanceId
=
params
.
get
(
"instanceId"
).
toString
();
String
instanceId
=
params
.
get
(
"instanceId"
).
toString
();
...
@@ -956,7 +934,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -956,7 +934,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
noAcceptLogService
.
createWithModel
(
noAcceptLogModel
);
noAcceptLogService
.
createWithModel
(
noAcceptLogModel
);
}
}
/**
/**
* 撤回流程办理单
* 撤回流程办理单
*/
*/
...
@@ -1017,22 +994,13 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -1017,22 +994,13 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
}
}
private
InstanceRuntimeData
buildInstanceRuntimeData
(
JyjcInspectionApplication
jyjcInspectionApplication
)
{
private
InstanceRuntimeData
buildInstanceRuntimeData
(
JyjcInspectionApplication
jyjcInspectionApplication
)
{
return
InstanceRuntimeData
.
builder
()
return
InstanceRuntimeData
.
builder
().
nextExecuteUserIds
(
jyjcInspectionApplication
.
getNextExecuteUserIds
()).
promoter
(
jyjcInspectionApplication
.
getPromoter
()).
nextTaskId
(
jyjcInspectionApplication
.
getNextTaskId
()).
build
();
.
nextExecuteUserIds
(
jyjcInspectionApplication
.
getNextExecuteUserIds
())
.
promoter
(
jyjcInspectionApplication
.
getPromoter
())
.
nextTaskId
(
jyjcInspectionApplication
.
getNextTaskId
())
.
build
();
}
}
private
InstanceRuntimeData
buildInstanceRuntimeData
(
JyjcInspectionApplicationModel
jyjcInspectionApplication
)
{
private
InstanceRuntimeData
buildInstanceRuntimeData
(
JyjcInspectionApplicationModel
jyjcInspectionApplication
)
{
return
InstanceRuntimeData
.
builder
()
return
InstanceRuntimeData
.
builder
().
nextExecuteUserIds
(
jyjcInspectionApplication
.
getNextExecuteUserIds
()).
promoter
(
jyjcInspectionApplication
.
getPromoter
()).
nextTaskId
(
jyjcInspectionApplication
.
getNextTaskId
()).
build
();
.
nextExecuteUserIds
(
jyjcInspectionApplication
.
getNextExecuteUserIds
())
.
promoter
(
jyjcInspectionApplication
.
getPromoter
())
.
nextTaskId
(
jyjcInspectionApplication
.
getNextTaskId
())
.
build
();
}
}
private
void
buildRoleList
(
List
<
ProcessTaskDTO
>
processTasks
,
List
<
String
>
roleListNext
,
List
<
String
>
roleListAll
)
{
private
void
buildRoleList
(
List
<
ProcessTaskDTO
>
processTasks
,
List
<
String
>
roleListNext
,
List
<
String
>
roleListAll
)
{
processTasks
.
forEach
(
p
->
{
processTasks
.
forEach
(
p
->
{
p
.
getNextCandidateGroups
().
values
().
forEach
(
e
->
{
p
.
getNextCandidateGroups
().
values
().
forEach
(
e
->
{
...
@@ -1080,7 +1048,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -1080,7 +1048,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
taskModelService
.
buildTaskModel
(
Arrays
.
asList
(
dto
));
taskModelService
.
buildTaskModel
(
Arrays
.
asList
(
dto
));
}
}
private
void
createNextTask
(
JyjcInspectionApplicationModel
model
,
String
taskName
,
String
nextUserIds
)
{
private
void
createNextTask
(
JyjcInspectionApplicationModel
model
,
String
taskName
,
String
nextUserIds
)
{
// 先更新之前的待办
// 先更新之前的待办
TaskV2Model
taskV2Model
=
updateTaskModel
(
model
);
TaskV2Model
taskV2Model
=
updateTaskModel
(
model
);
...
@@ -1117,7 +1084,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -1117,7 +1084,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
taskModelService
.
buildTaskModel
(
Collections
.
singletonList
(
modelDto
));
taskModelService
.
buildTaskModel
(
Collections
.
singletonList
(
modelDto
));
}
}
private
TaskV2Model
updateTaskModel
(
JyjcInspectionApplicationModel
model
)
{
private
TaskV2Model
updateTaskModel
(
JyjcInspectionApplicationModel
model
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"relationId"
,
model
.
getProcessInstanceId
());
params
.
put
(
"relationId"
,
model
.
getProcessInstanceId
());
...
@@ -1132,7 +1098,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -1132,7 +1098,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
return
taskModelService
.
updateTaskModel
(
params
);
return
taskModelService
.
updateTaskModel
(
params
);
}
}
/**
/**
* 缓存当前正在流程中的实例的流程数据
* 缓存当前正在流程中的实例的流程数据
*/
*/
...
@@ -1195,8 +1160,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -1195,8 +1160,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
result
.
setTotal
(
0
);
result
.
setTotal
(
0
);
return
result
;
return
result
;
}
}
String
companyCode
=
company
.
getString
(
"companyCode"
).
contains
(
"_"
)
?
String
companyCode
=
company
.
getString
(
"companyCode"
).
contains
(
"_"
)
?
company
.
getString
(
"companyCode"
).
split
(
"_"
)[
1
]
:
company
.
getString
(
"companyCode"
);
company
.
getString
(
"companyCode"
).
split
(
"_"
)[
1
]
:
company
.
getString
(
"companyCode"
);
String
type
=
company
.
getString
(
"companyType"
);
String
type
=
company
.
getString
(
"companyType"
);
// 根据当前登录用户类型及管辖机构筛选条件添加对应参数
// 根据当前登录用户类型及管辖机构筛选条件添加对应参数
...
@@ -1301,7 +1265,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -1301,7 +1265,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
*
*
* @param boolMust 条件
* @param boolMust 条件
*/
*/
private
void
setFilterOfInFlowing
(
BoolQueryBuilder
boolMust
,
String
equListCode
,
String
inspectionType
)
{
private
void
setFilterOfInFlowing
(
BoolQueryBuilder
boolMust
,
String
equListCode
,
String
inspectionType
)
{
Set
<
String
>
records
=
this
.
getEquipInFlowing
();
Set
<
String
>
records
=
this
.
getEquipInFlowing
();
if
(
records
!=
null
&&
!
records
.
isEmpty
())
{
if
(
records
!=
null
&&
!
records
.
isEmpty
())
{
boolMust
.
mustNot
(
QueryBuilders
.
termsQuery
(
"SEQUENCE_NBR.keyword"
,
records
));
boolMust
.
mustNot
(
QueryBuilders
.
termsQuery
(
"SEQUENCE_NBR.keyword"
,
records
));
...
@@ -1330,24 +1294,11 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -1330,24 +1294,11 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
return
fullAddress
;
return
fullAddress
;
}
}
public
List
<
TzBaseEnterpriseInfoDto
>
getInspectionUnitListForWorkbench
(
String
openBizType
)
{
public
List
<
TzBaseEnterpriseInfoDto
>
getInspectionUnitListForWorkbench
(
String
openBizType
)
{
return
commonService
.
getInspectionUnitList
(
openBizType
);
return
commonService
.
getInspectionUnitList
(
openBizType
);
}
}
public
List
<
DictionarieModel
>
inspectTypeListByBizType
(
String
bizType
)
{
public
List
<
DictionarieModel
>
inspectTypeListByBizType
(
String
bizType
)
{
return
getDictionarieModels
(
bizType
);
return
getDictionarieModels
(
bizType
);
}
}
@NotNull
public
static
List
<
DictionarieModel
>
getDictionarieModels
(
String
bizType
)
{
List
<
JYJCTypeEnum
>
enums
=
JYJCTypeEnum
.
getListByBizType
(
bizType
);
return
enums
.
stream
().
map
(
e
->
{
DictionarieModel
dictionarieModel
=
new
DictionarieModel
();
dictionarieModel
.
setDictCode
(
e
.
getCode
());
dictionarieModel
.
setDictName
(
e
.
getName
());
return
dictionarieModel
;
}).
collect
(
Collectors
.
toList
());
}
}
}
\ No newline at end of file
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/JyjcOpeningApplicationServiceImpl.java
View file @
670552e2
...
@@ -16,6 +16,7 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
...
@@ -16,6 +16,7 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import
com.yeejoin.amos.boot.biz.common.dao.mapper.DataDictionaryMapper
;
import
com.yeejoin.amos.boot.biz.common.dao.mapper.DataDictionaryMapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.excel.ExcelUtil
;
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.TzsUserPermissionDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.TzsUserPermissionDto
;
import
com.yeejoin.amos.boot.module.jyjc.api.dto.InspectionCompanyPublicityDto
;
import
com.yeejoin.amos.boot.module.jyjc.api.dto.InspectionCompanyPublicityDto
;
...
@@ -26,6 +27,8 @@ import com.yeejoin.amos.boot.module.jyjc.api.enums.OpenBizTypeEnum;
...
@@ -26,6 +27,8 @@ import com.yeejoin.amos.boot.module.jyjc.api.enums.OpenBizTypeEnum;
import
com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcOpeningApplicationMapper
;
import
com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcOpeningApplicationMapper
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.*
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.*
;
import
com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcOpeningApplicationService
;
import
com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcOpeningApplicationService
;
import
com.yeejoin.amos.boot.module.jyjc.api.vo.JyjcInspectionApplicationVo
;
import
com.yeejoin.amos.boot.module.jyjc.api.vo.JyjcOpeningApplicationVo
;
import
com.yeejoin.amos.boot.module.jyjc.biz.action.RuleActionHandler
;
import
com.yeejoin.amos.boot.module.jyjc.biz.action.RuleActionHandler
;
import
com.yeejoin.amos.boot.module.jyjc.biz.config.BaseException
;
import
com.yeejoin.amos.boot.module.jyjc.biz.config.BaseException
;
import
com.yeejoin.amos.boot.module.jyjc.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jyjc.biz.feign.TzsServiceFeignClient
;
...
@@ -65,6 +68,9 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
...
@@ -65,6 +68,9 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
import
java.util.function.Function
;
import
java.util.function.Function
;
...
@@ -81,80 +87,56 @@ import java.util.stream.Collectors;
...
@@ -81,80 +87,56 @@ import java.util.stream.Collectors;
@Slf4j
@Slf4j
public
class
JyjcOpeningApplicationServiceImpl
extends
BaseService
<
JyjcOpeningApplicationModel
,
JyjcOpeningApplication
,
JyjcOpeningApplicationMapper
>
implements
IJyjcOpeningApplicationService
{
public
class
JyjcOpeningApplicationServiceImpl
extends
BaseService
<
JyjcOpeningApplicationModel
,
JyjcOpeningApplication
,
JyjcOpeningApplicationMapper
>
implements
IJyjcOpeningApplicationService
{
@Autowired
private
final
static
String
INDUSTRY_SUPERVISOR_DICT_TYPE
=
"HYZGBM"
;
private
TzsServiceFeignClient
tzsServiceFeignClient
;
/**
* 人员级别字典KEY
*/
private
final
static
String
RYJB_JYJC_DICT_KEY
=
"RYJB_JYJC"
;
/**
* 所有人员资质检验检测项目key
*/
private
final
static
String
ZZXM_JYJC_DICT_KEY
=
"ZZXM_JYJC_ALL"
;
private
static
Map
<
String
,
DictionarieValueModel
>
permissionLevelMap
;
private
static
List
<
DictionarieValueModel
>
permissionItemList
;
@Autowired
@Autowired
JyjcOpeningApplicationMapper
jyjcOpeningApplicationMapper
;
JyjcOpeningApplicationMapper
jyjcOpeningApplicationMapper
;
@Autowired
BaseUnitLicenceMapper
baseUnitLicenceMapper
;
@Autowired
CommonServiceImpl
commonService
;
@Autowired
CmWorkflowServiceImpl
cmWorkflowService
;
@Autowired
TaskModelServiceImpl
taskModelService
;
@Autowired
DataDictionaryMapper
dataDictionaryMapper
;
@Autowired
RuleActionHandler
ruleActionHandler
;
@Autowired
RedissonClient
redissonClient
;
@Autowired
private
TzsServiceFeignClient
tzsServiceFeignClient
;
@Value
(
"${process-definition-key.jyjc.openapplication:}"
)
@Value
(
"${process-definition-key.jyjc.openapplication:}"
)
private
String
processDefinitionKey
;
private
String
processDefinitionKey
;
@Value
(
"${jy.user-post:66151}"
)
@Value
(
"${jy.user-post:66151}"
)
private
String
jyUserPost
;
private
String
jyUserPost
;
@Value
(
"${jy.cert.type.code:1233-1}"
)
@Value
(
"${jy.cert.type.code:1233-1}"
)
private
String
jyCertTypeCode
;
private
String
jyCertTypeCode
;
@Value
(
"${jc.user-post:66152}"
)
@Value
(
"${jc.user-post:66152}"
)
private
String
jcUserPost
;
private
String
jcUserPost
;
@Value
(
"${jc.cert.type.code:1233-2}"
)
@Value
(
"${jc.cert.type.code:1233-2}"
)
private
String
jcCertTypeCode
;
private
String
jcCertTypeCode
;
@Value
(
"classpath:/json/bizTypeInfo.json"
)
@Value
(
"classpath:/json/bizTypeInfo.json"
)
private
org
.
springframework
.
core
.
io
.
Resource
bizTypeInfo
;
private
org
.
springframework
.
core
.
io
.
Resource
bizTypeInfo
;
@Autowired
@Autowired
private
TzBaseEnterpriseInfoMapper
enterpriseInfoMapper
;
private
TzBaseEnterpriseInfoMapper
enterpriseInfoMapper
;
@Autowired
BaseUnitLicenceMapper
baseUnitLicenceMapper
;
@Autowired
@Autowired
private
TzsUserInfoMapper
userInfoMapper
;
private
TzsUserInfoMapper
userInfoMapper
;
@Autowired
CommonServiceImpl
commonService
;
@Autowired
CmWorkflowServiceImpl
cmWorkflowService
;
@Autowired
TaskModelServiceImpl
taskModelService
;
@Autowired
DataDictionaryMapper
dataDictionaryMapper
;
@Autowired
RuleActionHandler
ruleActionHandler
;
@Autowired
RedissonClient
redissonClient
;
@Autowired
@Autowired
private
RuleCommonServiceImpl
ruleCommonService
;
private
RuleCommonServiceImpl
ruleCommonService
;
@Autowired
@Autowired
private
TzBaseEnterpriseInfoMapper
tzBaseEnterpriseInfoMapper
;
private
TzBaseEnterpriseInfoMapper
tzBaseEnterpriseInfoMapper
;
private
static
Map
<
String
,
DictionarieValueModel
>
permissionLevelMap
;
private
static
List
<
DictionarieValueModel
>
permissionItemList
;
private
final
static
String
INDUSTRY_SUPERVISOR_DICT_TYPE
=
"HYZGBM"
;
/**
* 人员级别字典KEY
*/
private
final
static
String
RYJB_JYJC_DICT_KEY
=
"RYJB_JYJC"
;
/**
* 所有人员资质检验检测项目key
*/
private
final
static
String
ZZXM_JYJC_DICT_KEY
=
"ZZXM_JYJC_ALL"
;
/**
/**
* 编辑、工作台暂存逻辑
* 编辑、工作台暂存逻辑
*
*
...
@@ -457,7 +439,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -457,7 +439,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
private
void
setBaseUnitLicences
(
String
unitCode
,
JyjcOpeningApplicationModel
jyjcOpeningApplicationModel
,
boolean
isNeedFilter
)
{
private
void
setBaseUnitLicences
(
String
unitCode
,
JyjcOpeningApplicationModel
jyjcOpeningApplicationModel
,
boolean
isNeedFilter
)
{
List
<
BaseUnitLicence
>
baseUnitLicences
=
baseUnitLicenceMapper
.
selectList
(
new
LambdaQueryWrapper
<
BaseUnitLicence
>()
List
<
BaseUnitLicence
>
baseUnitLicences
=
baseUnitLicenceMapper
.
selectList
(
new
LambdaQueryWrapper
<
BaseUnitLicence
>()
.
eq
(
BaseUnitLicence:
:
getUnitCode
,
unitCode
)
.
eq
(
BaseUnitLicence:
:
getUnitCode
,
unitCode
)
.
gt
(
BaseUnitLicence:
:
getExpiryDate
,
new
Date
())
.
gt
(
BaseUnitLicence:
:
getExpiryDate
,
new
Date
())
.
in
(
BaseUnitLicence:
:
getCertTypeCode
,
Arrays
.
asList
(
jyCertTypeCode
,
jcCertTypeCode
)));
.
in
(
BaseUnitLicence:
:
getCertTypeCode
,
Arrays
.
asList
(
jyCertTypeCode
,
jcCertTypeCode
)));
List
<
TzBaseUnitLicenceDto
>
licences
=
baseUnitLicences
.
stream
().
map
(
l
->
{
List
<
TzBaseUnitLicenceDto
>
licences
=
baseUnitLicences
.
stream
().
map
(
l
->
{
TzBaseUnitLicenceDto
licenceDto
=
new
TzBaseUnitLicenceDto
();
TzBaseUnitLicenceDto
licenceDto
=
new
TzBaseUnitLicenceDto
();
...
@@ -566,10 +548,10 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -566,10 +548,10 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
// 查询资质的人,
// 查询资质的人,
List
<
TzsUserPermissionDto
>
permissionDtos
=
userInfoMapper
.
queryPermissionByUserSeq
(
userInfo
.
getSequenceNbr
(),
this
.
buildPermissionKey
(
post
));
List
<
TzsUserPermissionDto
>
permissionDtos
=
userInfoMapper
.
queryPermissionByUserSeq
(
userInfo
.
getSequenceNbr
(),
this
.
buildPermissionKey
(
post
));
// 注意检验资质、检测资质,每人只有一行数据, 一个人一个证
// 注意检验资质、检测资质,每人只有一行数据, 一个人一个证
if
(
permissionDtos
.
size
()
>
0
)
{
if
(
permissionDtos
.
size
()
>
0
)
{
TzsUserPermissionDto
userPermissionDto
=
permissionDtos
.
get
(
0
);
TzsUserPermissionDto
userPermissionDto
=
permissionDtos
.
get
(
0
);
// 不会出现为null, 程序健壮处理
// 不会出现为null, 程序健壮处理
if
(
userPermissionDto
.
getPermissionItem
()
!=
null
&&
userPermissionDto
.
getPermissionLevel
()
!=
null
)
{
if
(
userPermissionDto
.
getPermissionItem
()
!=
null
&&
userPermissionDto
.
getPermissionLevel
()
!=
null
)
{
vo
.
setPermissionItem
(
JSONArray
.
parseArray
(
userPermissionDto
.
getPermissionItem
()));
vo
.
setPermissionItem
(
JSONArray
.
parseArray
(
userPermissionDto
.
getPermissionItem
()));
vo
.
setPermissionItemName
(
this
.
castItemCode2Name
(
vo
.
getPermissionItem
()));
vo
.
setPermissionItemName
(
this
.
castItemCode2Name
(
vo
.
getPermissionItem
()));
vo
.
setPermissionLevelName
(
this
.
getDictNameByCode
(
userPermissionDto
.
getPermissionLevel
()));
vo
.
setPermissionLevelName
(
this
.
getDictNameByCode
(
userPermissionDto
.
getPermissionLevel
()));
...
@@ -677,7 +659,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -677,7 +659,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
taskParams
.
put
(
"taskStatusLabel"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
taskParams
.
put
(
"taskStatusLabel"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
taskParams
.
put
(
"model"
,
jyjcOpeningApplication
);
taskParams
.
put
(
"model"
,
jyjcOpeningApplication
);
taskModelService
.
updateTaskModel
(
taskParams
);
taskModelService
.
updateTaskModel
(
taskParams
);
List
<
String
>
detectionRegion
=
(
List
<
String
>)
params
.
get
(
"detectionRegion"
);
List
<
String
>
detectionRegion
=
(
List
<
String
>)
params
.
get
(
"detectionRegion"
);
jyjcOpeningApplication
.
setDetectionRegion
(
detectionRegion
);
jyjcOpeningApplication
.
setDetectionRegion
(
detectionRegion
);
jyjcOpeningApplication
.
setPromoter
(
""
);
jyjcOpeningApplication
.
setPromoter
(
""
);
jyjcOpeningApplication
.
setNextTaskId
(
""
);
jyjcOpeningApplication
.
setNextTaskId
(
""
);
...
@@ -969,9 +951,9 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -969,9 +951,9 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
public
List
<
InspectionCompanyPublicityDto
>
queryInspectionOrgListForBiz
()
{
public
List
<
InspectionCompanyPublicityDto
>
queryInspectionOrgListForBiz
()
{
// 查询所有已经业务开通的检验检测机构,已机构为维度进行证的合并处理
// 查询所有已经业务开通的检验检测机构,已机构为维度进行证的合并处理
List
<
InspectionCompanyPublicityDto
>
inspectionCompanyPublicityDtos
=
this
.
getBaseMapper
().
queryInspectionOrgListForBiz
();
List
<
InspectionCompanyPublicityDto
>
inspectionCompanyPublicityDtos
=
this
.
getBaseMapper
().
queryInspectionOrgListForBiz
();
// 枚举转换
// 枚举转换
inspectionCompanyPublicityDtos
.
forEach
(
c
->
{
inspectionCompanyPublicityDtos
.
forEach
(
c
->
{
c
.
setDetectionRegion
(
this
.
castRegionCode2Name
(
c
.
getDetectionRegion
()));
c
.
setDetectionRegion
(
this
.
castRegionCode2Name
(
c
.
getDetectionRegion
()));
c
.
setApprovalInfo
(
this
.
breakNewLineForApprovalInfo
(
c
.
getApprovalInfo
()));
c
.
setApprovalInfo
(
this
.
breakNewLineForApprovalInfo
(
c
.
getApprovalInfo
()));
c
.
setOpenBizType
(
this
.
castOpenBizTypeCode2Name
(
c
.
getOpenBizType
()));
c
.
setOpenBizType
(
this
.
castOpenBizTypeCode2Name
(
c
.
getOpenBizType
()));
...
@@ -992,4 +974,16 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -992,4 +974,16 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
private
String
castOpenBizTypeCode2Name
(
String
openBizType
)
{
private
String
castOpenBizTypeCode2Name
(
String
openBizType
)
{
return
OpenBizTypeEnum
.
getOneByCode
(
openBizType
).
getName
();
return
OpenBizTypeEnum
.
getOneByCode
(
openBizType
).
getName
();
}
}
public
void
exportData
(
HttpServletResponse
response
,
List
<
String
>
ids
)
{
List
<
JyjcOpeningApplicationVo
>
exportData
=
jyjcOpeningApplicationMapper
.
queryJyjcOpeningApplicationListByIds
(
ids
);
for
(
JyjcOpeningApplicationVo
data
:
exportData
)
{
data
.
setOpenBizType
(
this
.
getOpenBizTypeName
(
data
.
getOpenBizType
()));
}
ExcelUtil
.
createTemplate
(
response
,
"检验检测开通列表数据"
,
"检验检测开通列表"
,
exportData
,
JyjcOpeningApplicationVo
.
class
,
null
,
false
);
}
}
}
\ 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