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
c9c2b19c
Commit
c9c2b19c
authored
Dec 15, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_tzs_register' of…
Merge branch 'develop_tzs_register' of
http://36.40.66.175:5000/moa/amos-boot-biz
into develop_tzs_register
parents
1a16af6c
81f3b88c
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
281 additions
and
53 deletions
+281
-53
JyjcInspectionResult.java
...mos/boot/module/jyjc/api/entity/JyjcInspectionResult.java
+18
-0
ResultStatusEnum.java
...oin/amos/boot/module/jyjc/api/enums/ResultStatusEnum.java
+32
-0
JyjcInspectionResultMapper.java
...ot/module/jyjc/api/mapper/JyjcInspectionResultMapper.java
+6
-1
JyjcInspectionResultModel.java
...boot/module/jyjc/api/model/JyjcInspectionResultModel.java
+49
-4
IJyjcInspectionResultAttachmentService.java
...c/api/service/IJyjcInspectionResultAttachmentService.java
+2
-4
IJyjcInspectionResultParamService.java
...e/jyjc/api/service/IJyjcInspectionResultParamService.java
+12
-1
JyjcInspectionResultMapper.xml
.../src/main/resources/mapper/JyjcInspectionResultMapper.xml
+20
-0
JyjcInspectionResultController.java
...e/jyjc/biz/controller/JyjcInspectionResultController.java
+63
-30
JyjcInspectionResultParamServiceImpl.java
...iz/service/impl/JyjcInspectionResultParamServiceImpl.java
+9
-0
JyjcInspectionResultServiceImpl.java
...yjc/biz/service/impl/JyjcInspectionResultServiceImpl.java
+70
-13
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/entity/JyjcInspectionResult.java
View file @
c9c2b19c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
api
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity
;
import
lombok.Data
;
...
...
@@ -137,4 +138,21 @@ public class JyjcInspectionResult extends BaseEntity {
@TableField
(
"biz_type"
)
private
String
bizType
;
/**
* 设备类别
*/
@TableField
(
"equ_category"
)
private
String
equCategory
;
/**
* 检验检测类型编码
*/
@TableField
(
"inspection_type"
)
private
String
inspectionType
;
/**
* 检验检测类型名称(冗余)
*/
@TableField
(
"inspection_type_name"
)
private
String
inspectionTypeName
;
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/enums/ResultStatusEnum.java
0 → 100644
View file @
c9c2b19c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
api
.
enums
;
public
enum
ResultStatusEnum
{
NO_RESULT
(
"未出"
,
"1"
),
YES_RESULT
(
"已出"
,
"2"
);
private
String
name
;
private
String
code
;
public
String
getName
()
{
return
name
;
}
ResultStatusEnum
(
String
name
,
String
code
)
{
this
.
name
=
name
;
this
.
code
=
code
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/mapper/JyjcInspectionResultMapper.java
View file @
c9c2b19c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionResult
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionResult
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionResultModel
;
import
org.apache.ibatis.annotations.Param
;
/**
* 业务开通申请表 Mapper 接口
...
...
@@ -11,4 +14,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public
interface
JyjcInspectionResultMapper
extends
BaseMapper
<
JyjcInspectionResult
>
{
Page
<
JyjcInspectionResultModel
>
selectJyjcInspectionResultpPage
(
@Param
(
"page"
)
Page
<
JyjcInspectionResultModel
>
page
,
@Param
(
"jyjcInspectionResultModel"
)
JyjcInspectionResultModel
jyjcInspectionResultModel
);
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/model/JyjcInspectionResultModel.java
View file @
c9c2b19c
...
...
@@ -2,9 +2,9 @@ package com.yeejoin.amos.boot.module.jyjc.api.model;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
org.typroject.tyboot.core.rdbms.model.BaseModel
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.typroject.tyboot.core.rdbms.model.BaseModel
;
import
java.util.Date
;
...
...
@@ -16,10 +16,10 @@ import java.util.Date;
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"JyjcInspectionResultModel"
,
description
=
"业务开通申请表"
)
@ApiModel
(
value
=
"JyjcInspectionResultModel"
,
description
=
"业务开通申请表"
)
public
class
JyjcInspectionResultModel
extends
BaseModel
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"检验检测单位编码"
)
...
...
@@ -34,9 +34,12 @@ public class JyjcInspectionResultModel extends BaseModel {
@ApiModelProperty
(
value
=
"设备唯一标识"
)
private
String
equipUnicode
;
@ApiModelProperty
(
value
=
"检验结果状态(已出
、未出
)"
)
@ApiModelProperty
(
value
=
"检验结果状态(已出
2、未出1
)"
)
private
String
resultStatus
;
@ApiModelProperty
(
value
=
"检验结果状态名称(已出2、未出1)(冗余)"
)
private
String
resultStatusName
;
@ApiModelProperty
(
value
=
"核准证号/许可证号"
)
private
String
licenseNumber
;
...
...
@@ -79,4 +82,46 @@ public class JyjcInspectionResultModel extends BaseModel {
@ApiModelProperty
(
value
=
"业务类型(与菜单对应拆表使用)"
)
private
String
bizType
;
@ApiModelProperty
(
value
=
"设备类别"
)
private
String
equCategory
;
@ApiModelProperty
(
value
=
"检验检测类型编码"
)
private
String
inspectionType
;
@ApiModelProperty
(
value
=
"检验检测类型名称(冗余)"
)
private
String
inspectionTypeName
;
@ApiModelProperty
(
value
=
"设备种类"
)
private
String
equList
;
@ApiModelProperty
(
value
=
"监管码"
)
private
String
supervisoryCode
;
@ApiModelProperty
(
value
=
"使用登记证编号"
)
private
String
useOrgCode
;
@ApiModelProperty
(
value
=
"单位内部编号"
)
private
String
useInnerCode
;
@ApiModelProperty
(
value
=
"注册代码"
)
private
String
equCode
;
/**
* 设备使用地点 = 设备使用地点省(province_name)+设备使用地点市(city_name)+
* 设备使用地点区(county_name)+设备使用地点街道(street_name)+设备使用地点详细(address)
*/
@ApiModelProperty
(
value
=
"设备使用地点"
)
private
String
equAddress
;
@ApiModelProperty
(
value
=
"使用单位"
)
private
String
useUnitName
;
@ApiModelProperty
(
value
=
"使用单位统一信用代码"
)
private
String
useUnitCreditCode
;
@ApiModelProperty
(
value
=
"检验结果技术参数"
)
private
JyjcInspectionResultParamModel
resultParamModel
;
@ApiModelProperty
(
value
=
"检验结果附件"
)
private
JyjcInspectionResultAttachmentModel
resultAttachmentModel
;
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/service/IJyjcInspectionResultAttachmentService.java
View file @
c9c2b19c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
api
.
service
;
import
com.baomidou.mybatisplus.
core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.
extension.service.IService
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionResultAttachment
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.List
;
...
...
@@ -13,7 +11,7 @@ import java.util.List;
* @author system_generator
* @date 2023-12-14
*/
public
interface
IJyjcInspectionResultAttachmentService
{
public
interface
IJyjcInspectionResultAttachmentService
extends
IService
<
JyjcInspectionResultAttachment
>
{
/**
* 根据结果表主键获取附件列表
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/service/IJyjcInspectionResultParamService.java
View file @
c9c2b19c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
api
.
service
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionResultParam
;
import
java.util.List
;
/**
* 检验结果技术参数表接口类
*
* @author system_generator
* @date 2023-12-14
*/
public
interface
IJyjcInspectionResultParamService
{}
public
interface
IJyjcInspectionResultParamService
{
/**
* 根据
* @param sequenceNbr
* @return
*/
List
<
JyjcInspectionResultParam
>
getParamByResultSeq
(
Long
sequenceNbr
);
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/resources/mapper/JyjcInspectionResultMapper.xml
View file @
c9c2b19c
...
...
@@ -2,4 +2,24 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcInspectionResultMapper"
>
<select
id=
"selectJyjcInspectionResultpPage"
resultType=
"com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionResultModel"
>
SELECT sequence_nbr, inspection_unit_code, application_no, application_unit_code, equip_unicode, result_status,
license_number, result_no, inspector, inner_person_code, inspection_conclusion, inspection_date,
next_inspection_date, inspection_start_date, inspection_end_date, inspection_result_summary, non_conformance,
rectification, remark, rec_user_id, rec_date, biz_type
FROM tz_jyjc_inspection_result
<where>
<if
test=
"jyjcInspectionResultModel.applicationNo != '' and jyjcInspectionResultModel.applicationNo != null"
>
and application_no like concat('%',#{jyjcInspectionResultModel.applicationNo},'%')
</if>
<if
test=
"jyjcInspectionResultModel.inspectionUnitCode != '' and jyjcInspectionResultModel.inspectionUnitCode != null"
>
and inspection_unit_code = #{jyjcInspectionResultModel.inspectionUnitCode}
</if>
<if
test=
"jyjcInspectionResultModel.applicationUnitCode != '' and jyjcInspectionResultModel.applicationUnitCode != null"
>
and application_unit_code = #{jyjcInspectionResultModel.applicationUnitCode}
</if>
</where>
</select>
</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/JyjcInspectionResultController.java
View file @
c9c2b19c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.List
;
import
java.util.Map
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionResultModel
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.impl.JyjcInspectionResultServiceImpl
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionResultModel
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
import
java.util.Map
;
/**
*
...
...
@@ -86,23 +84,6 @@ public class JyjcInspectionResultController extends BaseController {
return
ResponseHelper
.
buildResponse
(
jyjcInspectionResultServiceImpl
.
queryDetailBySeq
(
sequenceNbr
));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询"
,
notes
=
"分页查询"
)
public
ResponseModel
<
Page
<
JyjcInspectionResultModel
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
JyjcInspectionResultModel
>
page
=
new
Page
<
JyjcInspectionResultModel
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
jyjcInspectionResultServiceImpl
.
queryForJyjcInspectionResultPage
(
page
));
}
/**
* 列表全部数据查询
...
...
@@ -115,4 +96,56 @@ public class JyjcInspectionResultController extends BaseController {
public
ResponseModel
<
List
<
JyjcInspectionResultModel
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
jyjcInspectionResultServiceImpl
.
queryForJyjcInspectionResultList
());
}
/**
* 列表页面(报检单位)
*
* @param current 当前页
* @param size 当前页大小
* @param model 查询参数
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/applicationUnitPage"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表页面(报检单位)"
,
notes
=
"列表页面(报检单位)"
)
public
ResponseModel
<
Page
<
JyjcInspectionResultModel
>>
applicationUnitQueryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
JyjcInspectionResultModel
model
)
{
Page
<
JyjcInspectionResultModel
>
page
=
new
Page
<>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
jyjcInspectionResultServiceImpl
.
queryForJyjcInspectionResultPage
(
page
,
model
,
false
));
}
/**
* 列表页面(检验检测单位)
*
* @param current 当前页
* @param size 当前页大小
* @param model 查询参数
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/inspectionUnitPage"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表页面(检验检测单位)"
,
notes
=
"列表页面(检验检测单位)"
)
public
ResponseModel
<
Page
<
JyjcInspectionResultModel
>>
inspectionUnitQueryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
JyjcInspectionResultModel
model
)
{
Page
<
JyjcInspectionResultModel
>
page
=
new
Page
<>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
jyjcInspectionResultServiceImpl
.
queryForJyjcInspectionResultPage
(
page
,
model
,
true
));
}
/**
* 检验结果-上传结果和编辑结果
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/updateResult"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"检验结果-上传结果和编辑结果"
,
notes
=
"检验结果-上传结果和编辑结果"
)
public
ResponseModel
<
JyjcInspectionResultModel
>
updateJyjcInspectionResult
(
@RequestBody
JyjcInspectionResultModel
model
)
{
return
ResponseHelper
.
buildResponse
(
jyjcInspectionResultServiceImpl
.
updateJyjcInspectionResult
(
model
));
}
}
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/JyjcInspectionResultParamServiceImpl.java
View file @
c9c2b19c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionResultParam
;
import
com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcInspectionResultParamMapper
;
import
com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcInspectionResultParamService
;
...
...
@@ -30,4 +31,11 @@ public class JyjcInspectionResultParamServiceImpl extends BaseService<JyjcInspec
public
List
<
JyjcInspectionResultParamModel
>
queryForJyjcInspectionResultParamList
()
{
return
this
.
queryForList
(
""
,
false
);
}
@Override
public
List
<
JyjcInspectionResultParam
>
getParamByResultSeq
(
Long
sequenceNbr
)
{
LambdaQueryWrapper
<
JyjcInspectionResultParam
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
JyjcInspectionResultParam:
:
getResultSeq
,
sequenceNbr
);
return
this
.
baseMapper
.
selectList
(
wrapper
);
}
}
\ 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/JyjcInspectionResultServiceImpl.java
View file @
c9c2b19c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.map.MapUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionResult
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionResultAttachment
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionResultParam
;
import
com.yeejoin.amos.boot.module.jyjc.api.enums.ResultStatusEnum
;
import
com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcInspectionResultMapper
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionResultModel
;
import
com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcInspectionResultAttachmentService
;
import
com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcInspectionResultParamService
;
import
com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcInspectionResultService
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionResultModel
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -28,24 +35,62 @@ import java.util.stream.Collectors;
* @date 2023-12-14
*/
@Service
public
class
JyjcInspectionResultServiceImpl
extends
BaseService
<
JyjcInspectionResultModel
,
JyjcInspectionResult
,
JyjcInspectionResultMapper
>
implements
IJyjcInspectionResultService
{
public
class
JyjcInspectionResultServiceImpl
extends
BaseService
<
JyjcInspectionResultModel
,
JyjcInspectionResult
,
JyjcInspectionResultMapper
>
implements
IJyjcInspectionResultService
{
@Autowired
private
IJyjcInspectionResultAttachmentService
j
yjcInspectionResultAttachmentService
;
private
IJyjcInspectionResultAttachmentService
iJ
yjcInspectionResultAttachmentService
;
@Autowired
private
IJyjcInspectionResultParamService
iJyjcInspectionResultParamService
;
@Autowired
JyjcInspectionResultMapper
resultMapper
;
@Autowired
JyjcInspectionResultParamServiceImpl
resultParamService
;
@Autowired
JyjcInspectionResultAttachmentServiceImpl
attachmentService
;
@Autowired
private
RedisUtils
redisUtils
;
/**
* 分页查询
*
检验检测单位
分页查询
*/
public
Page
<
JyjcInspectionResultModel
>
queryForJyjcInspectionResultPage
(
Page
<
JyjcInspectionResultModel
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
public
Page
<
JyjcInspectionResultModel
>
queryForJyjcInspectionResultPage
(
Page
<
JyjcInspectionResultModel
>
page
,
JyjcInspectionResultModel
model
,
boolean
type
)
{
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
if
(
type
)
{
//检验检测单位分页查询
model
.
setInspectionUnitCode
(
reginParams
.
getCompany
().
getCompanyCode
());
}
else
{
//报检单位分页查询
model
.
setApplicationUnitCode
(
reginParams
.
getCompany
().
getCompanyCode
());
}
Page
<
JyjcInspectionResultModel
>
resultPage
=
resultMapper
.
selectJyjcInspectionResultpPage
(
page
,
model
);
resultPage
.
getRecords
().
stream
().
forEach
(
v
->
{
if
(
ResultStatusEnum
.
NO_RESULT
.
getCode
().
equals
(
v
.
getResultStatus
()))
v
.
setResultStatusName
(
ResultStatusEnum
.
NO_RESULT
.
getName
());
if
(
ResultStatusEnum
.
YES_RESULT
.
getCode
().
equals
(
v
.
getResultStatus
()))
v
.
setResultStatusName
(
ResultStatusEnum
.
YES_RESULT
.
getName
());
});
return
resultPage
;
}
public
JyjcInspectionResultModel
updateJyjcInspectionResult
(
JyjcInspectionResultModel
model
)
{
updateWithModel
(
model
);
if
(
ObjectUtil
.
isNotEmpty
(
model
.
getResultAttachmentModel
()))
attachmentService
.
createWithModel
(
model
.
getResultAttachmentModel
());
if
(
ObjectUtil
.
isNotEmpty
(
model
.
getResultParamModel
()))
resultParamService
.
createWithModel
(
model
.
getResultParamModel
());
return
model
;
}
/**
* 列表查询 示例
*/
public
List
<
JyjcInspectionResultModel
>
queryForJyjcInspectionResultList
()
{
return
this
.
queryForList
(
""
,
false
);
public
List
<
JyjcInspectionResultModel
>
queryForJyjcInspectionResultList
()
{
return
this
.
queryForList
(
""
,
false
);
}
@Override
...
...
@@ -58,11 +103,23 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
map
=
BeanUtil
.
beanToMap
(
jyjcInspectionResultModel
);
// 获取附件
List
<
JyjcInspectionResultAttachment
>
attachmentList
=
j
yjcInspectionResultAttachmentService
.
getObjByResultSeq
(
sequenceNbr
);
List
<
JyjcInspectionResultAttachment
>
attachmentList
=
iJ
yjcInspectionResultAttachmentService
.
getObjByResultSeq
(
sequenceNbr
);
if
(!
CollectionUtils
.
isEmpty
(
attachmentList
))
{
Map
<
String
,
Object
>
attachmentMap
=
attachmentList
.
stream
().
collect
(
Collectors
.
toMap
(
JyjcInspectionResultAttachment:
:
getAttachmentType
,
JyjcInspectionResultAttachment:
:
getAttachmentUrl
));
map
.
putAll
(
attachmentMap
);
}
// 获取技术参数
List
<
JyjcInspectionResultParam
>
paramList
=
iJyjcInspectionResultParamService
.
getParamByResultSeq
(
sequenceNbr
);
Map
<
String
,
Object
>
mapParam
=
new
HashMap
<>();
if
(!
CollectionUtils
.
isEmpty
(
paramList
))
{
paramList
.
forEach
(
param
->
{
if
(!
ObjectUtils
.
isEmpty
(
param
.
getParamJson
()))
{
mapParam
.
putAll
(
JSON
.
parseObject
(
param
.
getParamJson
()));
}
});
map
.
put
(
"paramJson"
,
mapParam
);
}
}
return
map
;
}
...
...
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