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
8af6e25a
Commit
8af6e25a
authored
Nov 05, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'refs/heads/develop_tzs_bugfix' into develop_tzs_register
parents
de7c8636
6f34caa8
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
188 additions
and
57 deletions
+188
-57
JgUseRegistrationDto.java
...oin/amos/boot/module/jg/api/dto/JgUseRegistrationDto.java
+9
-0
JgUseRegistrationMapper.java
...os/boot/module/jg/api/mapper/JgUseRegistrationMapper.java
+1
-1
RegistrationVo.java
...ot/module/jg/api/vo/tableDataExportVo/RegistrationVo.java
+18
-15
JgUseRegistrationMapper.xml
...api/src/main/resources/mapper/JgUseRegistrationMapper.xml
+66
-9
JgTableDataExportController.java
...module/jg/biz/controller/JgTableDataExportController.java
+15
-3
JgUseRegistrationController.java
...module/jg/biz/controller/JgUseRegistrationController.java
+27
-3
IJgTableDataExportService.java
...boot/module/jg/biz/service/IJgTableDataExportService.java
+3
-1
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+14
-21
JgTableDataExportServiceImpl.java
...ule/jg/biz/service/impl/JgTableDataExportServiceImpl.java
+35
-4
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/JgUseRegistrationDto.java
View file @
8af6e25a
...
@@ -60,6 +60,15 @@ public class JgUseRegistrationDto extends BaseDto {
...
@@ -60,6 +60,15 @@ public class JgUseRegistrationDto extends BaseDto {
@ApiModelProperty
(
value
=
"终审通过时间"
)
@ApiModelProperty
(
value
=
"终审通过时间"
)
private
Date
auditPassDate
;
private
Date
auditPassDate
;
@ApiModelProperty
(
value
=
"办理日期范围"
)
private
String
auditPassDateRange
;
@ApiModelProperty
(
value
=
"办理日期起始日期"
)
private
Date
auditPassDateStart
;
@ApiModelProperty
(
value
=
"办理日期结束日期"
)
private
Date
auditPassDateEnd
;
@ApiModelProperty
(
value
=
"登记类别"
)
@ApiModelProperty
(
value
=
"登记类别"
)
private
String
regType
;
private
String
regType
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgUseRegistrationMapper.java
View file @
8af6e25a
...
@@ -31,7 +31,7 @@ public interface JgUseRegistrationMapper extends BaseMapper<JgUseRegistration> {
...
@@ -31,7 +31,7 @@ public interface JgUseRegistrationMapper extends BaseMapper<JgUseRegistration> {
@Param
(
"dto"
)
JgUseRegistrationDto
dto
,
@Param
(
"dto"
)
JgUseRegistrationDto
dto
,
@Param
(
"roleIds"
)
List
<
String
>
roleIds
);
@Param
(
"roleIds"
)
List
<
String
>
roleIds
);
List
<
RegistrationVo
>
queryRegistrationInIds
(
@Param
(
"
ids"
)
List
<
String
>
ids
);
List
<
RegistrationVo
>
queryRegistrationInIds
(
@Param
(
"
dto"
)
JgUseRegistrationDto
dto
);
Map
<
String
,
Object
>
getDetail
(
@Param
(
"id"
)
String
id
);
Map
<
String
,
Object
>
getDetail
(
@Param
(
"id"
)
String
id
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/vo/tableDataExportVo/RegistrationVo.java
View file @
8af6e25a
...
@@ -14,49 +14,52 @@ public class RegistrationVo {
...
@@ -14,49 +14,52 @@ public class RegistrationVo {
@ExcelProperty
(
value
=
"申请日期"
,
index
=
1
)
@ExcelProperty
(
value
=
"申请日期"
,
index
=
1
)
String
createDate
;
String
createDate
;
@ExcelProperty
(
value
=
"登记证来源"
,
index
=
2
)
String
regType
;
@ExcelProperty
(
value
=
"设备种类"
,
index
=
2
)
@ExcelProperty
(
value
=
"设备种类"
,
index
=
3
)
String
equListName
;
String
equListName
;
@ExcelProperty
(
value
=
"设备类别"
,
index
=
3
)
@ExcelProperty
(
value
=
"设备类别"
,
index
=
4
)
String
equCategory
;
String
equCategory
;
@ExcelProperty
(
value
=
"设备品种"
,
index
=
4
)
@ExcelProperty
(
value
=
"设备品种"
,
index
=
5
)
String
equDefine
;
String
equDefine
;
@ExcelProperty
(
value
=
"设备代码"
,
index
=
5
)
@ExcelProperty
(
value
=
"设备代码"
,
index
=
6
)
String
equCode
;
String
equCode
;
@ExcelProperty
(
value
=
"使用登记证编号"
,
index
=
6
)
@ExcelProperty
(
value
=
"使用登记证编号"
,
index
=
7
)
String
useRegistrationCode
;
String
useRegistrationCode
;
@ExcelProperty
(
value
=
"96333识别码"
,
index
=
7
)
@ExcelProperty
(
value
=
"96333识别码"
,
index
=
8
)
String
code96333
;
String
code96333
;
@ExcelProperty
(
value
=
"监管码"
,
index
=
8
)
@ExcelProperty
(
value
=
"监管码"
,
index
=
9
)
String
supervisoryCode
;
String
supervisoryCode
;
@ExcelProperty
(
value
=
"设备地址"
,
index
=
9
)
@ExcelProperty
(
value
=
"设备地址"
,
index
=
10
)
String
fullAddress
;
String
fullAddress
;
@ExcelProperty
(
value
=
"详细地址"
,
index
=
1
0
)
@ExcelProperty
(
value
=
"详细地址"
,
index
=
1
1
)
String
detailedAddress
;
String
detailedAddress
;
@ExcelProperty
(
value
=
"使用单位"
,
index
=
1
1
)
@ExcelProperty
(
value
=
"使用单位"
,
index
=
1
2
)
String
useUnitName
;
String
useUnitName
;
@ExcelProperty
(
value
=
"接收机构"
,
index
=
1
2
)
@ExcelProperty
(
value
=
"接收机构"
,
index
=
1
3
)
String
receiveOrgName
;
String
receiveOrgName
;
@ExcelProperty
(
value
=
"属地监管部门"
,
index
=
1
3
)
@ExcelProperty
(
value
=
"属地监管部门"
,
index
=
1
4
)
String
orgBranchName
;
String
orgBranchName
;
@ExcelProperty
(
value
=
"作废原因"
,
index
=
1
4
)
@ExcelProperty
(
value
=
"作废原因"
,
index
=
1
5
)
String
cancelReason
;
String
cancelReason
;
@ExcelProperty
(
value
=
"办理状态"
,
index
=
1
5
)
@ExcelProperty
(
value
=
"办理状态"
,
index
=
1
6
)
String
status
;
String
status
;
@ExcelProperty
(
value
=
"办理日期"
,
index
=
1
6
)
@ExcelProperty
(
value
=
"办理日期"
,
index
=
1
7
)
String
auditPassDate
;
String
auditPassDate
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgUseRegistrationMapper.xml
View file @
8af6e25a
...
@@ -182,6 +182,9 @@
...
@@ -182,6 +182,9 @@
<if
test=
"dto.useUnitCode != null and dto.useUnitCode != ''"
>
<if
test=
"dto.useUnitCode != null and dto.useUnitCode != ''"
>
and use_unit_credit_code = #{dto.useUnitCode}
and use_unit_credit_code = #{dto.useUnitCode}
</if>
</if>
<if
test=
"dto.auditPassDateStart != null and dto.auditPassDateEnd != null"
>
AND auditPassDate BETWEEN #{dto.auditPassDateStart} AND #{dto.auditPassDateEnd}
</if>
<if
test=
"dto.dataType == 'supervision' "
>
<if
test=
"dto.dataType == 'supervision' "
>
AND (receive_company_code = #{dto.receiveCompanyCode} or transfer_to_user_ids LIKE concat ('%',
AND (receive_company_code = #{dto.receiveCompanyCode} or transfer_to_user_ids LIKE concat ('%',
#{dto.currentUserId}, '%'))
#{dto.currentUserId}, '%'))
...
@@ -203,19 +206,73 @@
...
@@ -203,19 +206,73 @@
</select>
</select>
<select
id=
"queryRegistrationInIds"
resultType=
"com.yeejoin.amos.boot.module.jg.api.vo.tableDataExportVo.RegistrationVo"
>
<select
id=
"queryRegistrationInIds"
resultType=
"com.yeejoin.amos.boot.module.jg.api.vo.tableDataExportVo.RegistrationVo"
>
<include
refid=
"page-list"
/>
select
*
from
(
<include
refid=
"page-list-sub-select"
/>
)
<where>
<where>
<if
test=
'ids != null'
>
is_delete = 0
and ur.sequence_nbr in
<if
test=
"dto.equList != null and dto.equList != ''"
>
<foreach
collection=
"ids"
item=
"id"
open=
"("
close=
")"
separator=
","
>
and equListCode= #{dto.equList}
#{id}
</if>
</foreach>
<if
test=
"dto.equCategory != null and dto.equCategory != ''"
>
and equCategoryCode = #{dto.equCategory}
</if>
<if
test=
"dto.equDefine != null and dto.equDefine != ''"
>
and equDefineCode = #{dto.equDefine}
</if>
<if
test=
"dto.status != null and dto.status != ''"
>
and status = #{dto.status}
</if>
<if
test=
"dto.applicationDate != null"
>
and create_date like concat('%',DATE_FORMAT(#{dto.applicationDate},'%Y-%m-%d'),'%')
</if>
<if
test=
"dto.equCode != null and dto.equCode != ''"
>
and equCode like concat('%',#{dto.equCode},'%')
</if>
<if
test=
"dto.code96333 != null and dto.code96333 != ''"
>
and code96333 like concat('%',#{dto.code96333},'%')
</if>
<if
test=
"dto.supervisoryCode != null and dto.supervisoryCode != ''"
>
and supervisoryCode like concat('%',#{dto.supervisoryCode},'%')
</if>
<if
test=
"dto.fullAddress != null and dto.fullAddress != ''"
>
AND fullAddress LIKE CONCAT('%', #{dto.fullAddress}, '%')
</if>
<if
test=
"dto.receiveCompanyCode != null and dto.receiveCompanyCode != ''"
>
AND receive_company_code = #{dto.receiveCompanyCode}
</if>
<if
test=
"dto.useUnitName != null and dto.useUnitName != ''"
>
and useUnitName like concat('%',#{dto.useUnitName},'%')
</if>
<if
test=
"dto.applyNo != null and dto.applyNo != ''"
>
and applyNo like concat('%',#{dto.applyNo},'%')
</if>
<if
test=
"dto.useRegistrationCode != null and dto.useRegistrationCode != ''"
>
and useRegistrationCode like concat('%',#{dto.useRegistrationCode},'%')
</if>
<if
test=
"dto.useUnitCode != null and dto.useUnitCode != ''"
>
and use_unit_credit_code = #{dto.useUnitCode}
</if>
<if
test=
"dto.auditPassDateStart != null and dto.auditPassDateEnd != null"
>
AND auditPassDate BETWEEN #{dto.auditPassDateStart} AND #{dto.auditPassDateEnd}
</if>
<if
test=
"dto.dataType == 'supervision' "
>
AND (receive_company_code = #{dto.receiveCompanyCode} or transfer_to_user_ids LIKE concat ('%',
#{dto.currentUserId}, '%'))
AND status
<![CDATA[<>]]>
'使用单位待提交'
</if>
<if
test=
"dto.dataType == 'company' "
>
AND (use_unit_credit_code = #{dto.unitCode} or transfer_to_user_ids LIKE concat ('%',#{dto.currentUserId}, '%'))
</if>
</if>
</where>
</where>
GROUP BY
--
GROUP BY
re.equip_transfer_id
--
re.equip_transfer_id
order by
order by
ur.create_date DESC, ur.apply_n
o DESC
create_date DESC, applyN
o DESC
</select>
</select>
<select
id=
"getDetail"
resultType=
"java.util.Map"
>
<select
id=
"getDetail"
resultType=
"java.util.Map"
>
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgTableDataExportController.java
View file @
8af6e25a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
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.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IJgTableDataExportService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IJgTableDataExportService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -91,9 +94,18 @@ public class JgTableDataExportController extends BaseController {
...
@@ -91,9 +94,18 @@ public class JgTableDataExportController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/registration"
)
@GetMapping
(
value
=
"/registration"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"使用登记列表数据导出"
,
notes
=
"使用登记列表数据导出"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"使用登记列表数据导出"
,
notes
=
"使用登记列表数据导出"
)
public
void
registrationExport
(
HttpServletResponse
response
,
String
ids
)
{
public
void
registrationExport
(
HttpServletResponse
response
,
JgUseRegistrationDto
dto
)
{
Assert
.
hasText
(
ids
,
"未选择导出数据"
);
ReginParams
info
=
getSelectedOrgInfo
();
iJgTableDataExportService
.
registration
(
response
,
Arrays
.
asList
(
ids
.
split
(
","
)));
dto
.
setCurrentUserId
(
info
.
getUserModel
().
getUserId
());
if
(
info
.
getCompany
().
getLevel
().
equals
(
BaseController
.
COMPANY_TYPE_COMPANY
))
{
dto
.
setDataType
(
BaseController
.
COMPANY_TYPE_COMPANY
);
dto
.
setUnitCode
(
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
info
.
getCompany
().
getCompanyType
())
?
info
.
getCompany
().
getCompanyCode
().
split
(
"_"
)[
1
]
:
info
.
getCompany
().
getCompanyCode
());
}
else
{
dto
.
setDataType
(
BaseController
.
COMPANY_TYPE_SUPERVISION
);
dto
.
setReceiveCompanyCode
(
info
.
getCompany
().
getCompanyCode
());
}
iJgTableDataExportService
.
registration
(
response
,
dto
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgUseRegistrationController.java
View file @
8af6e25a
...
@@ -27,6 +27,8 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
...
@@ -27,6 +27,8 @@ 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.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
/**
/**
...
@@ -111,6 +113,26 @@ public class JgUseRegistrationController extends BaseController {
...
@@ -111,6 +113,26 @@ public class JgUseRegistrationController extends BaseController {
dto
.
setDataType
(
BaseController
.
COMPANY_TYPE_SUPERVISION
);
dto
.
setDataType
(
BaseController
.
COMPANY_TYPE_SUPERVISION
);
dto
.
setReceiveCompanyCode
(
info
.
getCompany
().
getCompanyCode
());
dto
.
setReceiveCompanyCode
(
info
.
getCompany
().
getCompanyCode
());
}
}
if
(
dto
.
getAuditPassDateRange
()
!=
null
&&
!
dto
.
getAuditPassDateRange
().
isEmpty
()
&&
!
dto
.
getAuditPassDateRange
().
equals
(
"[, ]"
))
{
String
dateRangeStr
=
dto
.
getAuditPassDateRange
();
String
[]
dates
=
dateRangeStr
.
replace
(
"["
,
""
).
replace
(
"]"
,
""
).
split
(
", "
);
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Date
start
=
null
;
Date
end
=
null
;
try
{
start
=
dateFormat
.
parse
(
dates
[
0
]);
end
=
dateFormat
.
parse
(
dates
[
1
]);
}
catch
(
ParseException
e
)
{
throw
new
RuntimeException
(
e
);
}
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
start
);
calendar
.
add
(
Calendar
.
DAY_OF_MONTH
,
-
1
);
start
=
calendar
.
getTime
();
dto
.
setAuditPassDateStart
(
start
);
dto
.
setAuditPassDateEnd
(
end
);
}
Page
<
Map
<
String
,
Object
>>
list
=
jgUseRegistrationServiceImpl
.
getList
(
dto
,
sort
,
page
,
dto
.
getRoleIds
());
Page
<
Map
<
String
,
Object
>>
list
=
jgUseRegistrationServiceImpl
.
getList
(
dto
,
sort
,
page
,
dto
.
getRoleIds
());
list
.
getRecords
().
forEach
(
x
->
{
list
.
getRecords
().
forEach
(
x
->
{
x
.
put
(
"companyType"
,
info
.
getCompany
().
getCompanyType
());
x
.
put
(
"companyType"
,
info
.
getCompany
().
getCompanyType
());
...
@@ -252,6 +274,7 @@ public class JgUseRegistrationController extends BaseController {
...
@@ -252,6 +274,7 @@ public class JgUseRegistrationController extends BaseController {
/**
/**
* 使用登记流程错误数据处理
* 使用登记流程错误数据处理
*
* @param applyNo applyNo
* @param applyNo applyNo
* @return s
* @return s
*/
*/
...
@@ -260,7 +283,7 @@ public class JgUseRegistrationController extends BaseController {
...
@@ -260,7 +283,7 @@ public class JgUseRegistrationController extends BaseController {
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"使用登记流程错误数据处理"
,
notes
=
"使用登记流程错误数据处理"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"使用登记流程错误数据处理"
,
notes
=
"使用登记流程错误数据处理"
)
public
ResponseModel
<
Object
>
handleErrorForm
(
@RequestParam
(
"applyNo"
)
String
applyNo
)
{
public
ResponseModel
<
Object
>
handleErrorForm
(
@RequestParam
(
"applyNo"
)
String
applyNo
)
{
jgUseRegistrationServiceImpl
.
handleErrorForm
(
applyNo
);
jgUseRegistrationServiceImpl
.
handleErrorForm
(
applyNo
);
return
ResponseHelper
.
buildResponse
(
"申请单【"
+
applyNo
+
"】处理成功"
);
return
ResponseHelper
.
buildResponse
(
"申请单【"
+
applyNo
+
"】处理成功"
);
}
}
...
@@ -271,12 +294,13 @@ public class JgUseRegistrationController extends BaseController {
...
@@ -271,12 +294,13 @@ public class JgUseRegistrationController extends BaseController {
public
ResponseModel
<
Object
>
saveHistoryEquip
(
@RequestBody
JSONObject
map
)
{
public
ResponseModel
<
Object
>
saveHistoryEquip
(
@RequestBody
JSONObject
map
)
{
JSONObject
firstMap
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
map
.
get
(
"first"
)));
JSONObject
firstMap
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
map
.
get
(
"first"
)));
JSONObject
secondMap
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
map
.
get
(
"second"
)));
JSONObject
secondMap
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
map
.
get
(
"second"
)));
secondMap
.
put
(
"type"
,
firstMap
.
get
(
"type"
));
secondMap
.
put
(
"type"
,
firstMap
.
get
(
"type"
));
return
ResponseHelper
.
buildResponse
(
jgUseRegistrationServiceImpl
.
saveHistoryEquip
(
secondMap
));
return
ResponseHelper
.
buildResponse
(
jgUseRegistrationServiceImpl
.
saveHistoryEquip
(
secondMap
));
}
}
/**
/**
* 根据使用登记证查询工程装置名称
* 根据使用登记证查询工程装置名称
*
* @param useRegistrationCode 使用登记证
* @param useRegistrationCode 使用登记证
* @return projectContraption
* @return projectContraption
*/
*/
...
@@ -287,7 +311,7 @@ public class JgUseRegistrationController extends BaseController {
...
@@ -287,7 +311,7 @@ public class JgUseRegistrationController extends BaseController {
ReginParams
selectedOrgInfo
=
getSelectedOrgInfo
();
ReginParams
selectedOrgInfo
=
getSelectedOrgInfo
();
String
companyCode
=
selectedOrgInfo
.
getCompany
().
getCompanyCode
();
String
companyCode
=
selectedOrgInfo
.
getCompany
().
getCompanyCode
();
String
companyType
=
selectedOrgInfo
.
getCompany
().
getCompanyType
();
String
companyType
=
selectedOrgInfo
.
getCompany
().
getCompanyType
();
String
useUnitCreditCode
=
"个人主体"
.
equals
(
companyType
)
&&
companyCode
.
contains
(
"_"
)?
companyCode
.
split
(
"_"
,
2
)[
1
]
String
useUnitCreditCode
=
"个人主体"
.
equals
(
companyType
)
&&
companyCode
.
contains
(
"_"
)
?
companyCode
.
split
(
"_"
,
2
)[
1
]
:
companyCode
;
:
companyCode
;
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"useRegistrationCode"
,
useRegistrationCode
);
map
.
put
(
"useRegistrationCode"
,
useRegistrationCode
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/IJgTableDataExportService.java
View file @
8af6e25a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
import
java.util.List
;
...
@@ -23,7 +25,7 @@ public interface IJgTableDataExportService {
...
@@ -23,7 +25,7 @@ public interface IJgTableDataExportService {
void
transfer
(
HttpServletResponse
response
,
List
<
String
>
ids
);
void
transfer
(
HttpServletResponse
response
,
List
<
String
>
ids
);
void
registration
(
HttpServletResponse
response
,
List
<
String
>
ids
);
void
registration
(
HttpServletResponse
response
,
JgUseRegistrationDto
dto
);
void
changeRegistrationUnit
(
HttpServletResponse
response
,
List
<
String
>
ids
);
void
changeRegistrationUnit
(
HttpServletResponse
response
,
List
<
String
>
ids
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
View file @
8af6e25a
...
@@ -3012,9 +3012,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -3012,9 +3012,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
esEquipmentDto
.
setUSE_INNER_CODE
(
useInfo
.
getUseInnerCode
());
esEquipmentDto
.
setUSE_INNER_CODE
(
useInfo
.
getUseInnerCode
());
esEquipmentDto
.
setUSE_ORG_CODE
(
equipInfoDto
.
getUseOrgCode
());
esEquipmentDto
.
setUSE_ORG_CODE
(
equipInfoDto
.
getUseOrgCode
());
esEquipmentDto
.
setIS_INTO_MANAGEMENT
(
"his"
.
equals
(
equipInfoDto
.
getDataSource
()));
esEquipmentDto
.
setIS_INTO_MANAGEMENT
(
"his"
.
equals
(
equipInfoDto
.
getDataSource
()));
if
(
"his"
.
equals
(
equipInfoDto
.
getDataSource
()))
{
esEquipmentDto
.
setEQU_CODE
(
registerInfo
.
getEquCode
());
esEquipmentDto
.
setEQU_CODE
(
registerInfo
.
getEquCode
());
}
esEquipmentDto
.
setEQU_CATEGORY_CODE
(
equipInfoDto
.
getEquCategoryCode
());
esEquipmentDto
.
setEQU_CATEGORY_CODE
(
equipInfoDto
.
getEquCategoryCode
());
esEquipmentDto
.
setEQU_CATEGORY
(
equipInfoDto
.
getEquCategory
());
esEquipmentDto
.
setEQU_CATEGORY
(
equipInfoDto
.
getEquCategory
());
esEquipmentDto
.
setEQU_LIST_CODE
(
equipInfoDto
.
getEquListCode
());
esEquipmentDto
.
setEQU_LIST_CODE
(
equipInfoDto
.
getEquListCode
());
...
@@ -3362,21 +3360,19 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -3362,21 +3360,19 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
checkNotBlank
(
data
.
getEquCodeType
(),
"是否有设备代码不能为空;"
,
result
);
checkNotBlank
(
data
.
getEquCodeType
(),
"是否有设备代码不能为空;"
,
result
);
if
(
"1"
.
equals
(
data
.
getEquCodeType
()))
{
if
(
"1"
.
equals
(
data
.
getEquCodeType
()))
{
checkNotBlank
(
data
.
getEquCode
(),
"设备代码不能为空;"
,
result
);
checkNotBlank
(
data
.
getEquCode
(),
"设备代码不能为空;"
,
result
);
String
equCode
=
data
.
getEquCode
();
Optional
.
ofNullable
(
data
.
getEquCode
())
if
(
equCode
.
matches
(
"[a-zA-Z0-9]+"
))
{
.
ifPresent
(
equCode
->
{
if
(
equCode
.
length
()
<=
17
)
{
if
(!
equCode
.
matches
(
"[a-zA-Z0-9]+"
))
{
result
.
append
(
"设备代码不能小于17位;"
);
result
.
append
(
"设备代码不能包含特殊字符;"
);
}
}
else
{
if
(
equCode
.
length
()
>=
20
)
{
Stream
.
of
(
equCode
.
length
()
<=
17
?
"设备代码不能小于17位;"
:
""
,
result
.
append
(
"设备代码不能大于20位;"
);
equCode
.
length
()
>=
20
?
"设备代码不能大于20位;"
:
""
,
}
equCodeList
.
contains
(
equCode
)
?
"设备代码不能重复;"
:
""
}
else
{
).
filter
(
msg
->
!
msg
.
isEmpty
())
result
.
append
(
"设备代码不能包含特殊字符;"
);
.
forEach
(
result:
:
append
);
}
this
.
checkEquCodeUniqueness
(
equCode
,
result
);
if
(
equCodeList
.
contains
(
data
.
getEquCode
()))
{
}
result
.
append
(
"设备代码不能重复;"
);
});
}
this
.
checkEquCodeUniqueness
(
data
.
getEquCode
(),
result
);
}
else
{
}
else
{
data
.
setEquCode
(
""
);
data
.
setEquCode
(
""
);
}
}
...
@@ -3389,9 +3385,6 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -3389,9 +3385,6 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
checkNotBlank
(
data
.
getProduceLicenseNum
(),
"制造许可编号不能为空;"
,
result
);
checkNotBlank
(
data
.
getProduceLicenseNum
(),
"制造许可编号不能为空;"
,
result
);
checkNotBlank
(
data
.
getFactoryNum
(),
"出厂编号/产品编码不能为空;"
,
result
);
checkNotBlank
(
data
.
getFactoryNum
(),
"出厂编号/产品编码不能为空;"
,
result
);
if
(
"0"
.
equals
(
data
.
getWhetherVehicleCylinder
()))
{
if
(
"0"
.
equals
(
data
.
getWhetherVehicleCylinder
()))
{
if
(
factoryNumList
.
contains
(
data
.
getFactoryNum
()))
{
result
.
append
(
"出厂编号/产品编码不能重复;"
);
}
checkNotBlank
(
data
.
getCylinderCategory
(),
"气瓶分类不能为空;"
,
result
);
checkNotBlank
(
data
.
getCylinderCategory
(),
"气瓶分类不能为空;"
,
result
);
checkFactoryNumUnique
(
data
.
getFactoryNum
(),
data
.
getProduceUnitCreditCode
(),
result
);
checkFactoryNumUnique
(
data
.
getFactoryNum
(),
data
.
getProduceUnitCreditCode
(),
result
);
}
else
{
}
else
{
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgTableDataExportServiceImpl.java
View file @
8af6e25a
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.biz.common.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.*
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.*
;
import
com.yeejoin.amos.boot.module.jg.api.vo.tableDataExportVo.*
;
import
com.yeejoin.amos.boot.module.jg.api.vo.tableDataExportVo.*
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IJgTableDataExportService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IJgTableDataExportService
;
...
@@ -16,6 +17,10 @@ import java.io.IOException;
...
@@ -16,6 +17,10 @@ import java.io.IOException;
import
java.nio.file.Files
;
import
java.nio.file.Files
;
import
java.nio.file.Path
;
import
java.nio.file.Path
;
import
java.nio.file.Paths
;
import
java.nio.file.Paths
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -226,11 +231,37 @@ public class JgTableDataExportServiceImpl implements IJgTableDataExportService {
...
@@ -226,11 +231,37 @@ public class JgTableDataExportServiceImpl implements IJgTableDataExportService {
* 使用登记列表数据导出
* 使用登记列表数据导出
*
*
* @param response 响应
* @param response 响应
* @param
ids 数据id
* @param
dto 筛选面板数据
*/
*/
@Override
public
void
registration
(
HttpServletResponse
response
,
JgUseRegistrationDto
dto
)
{
public
void
registration
(
HttpServletResponse
response
,
List
<
String
>
ids
)
{
if
(
dto
.
getAuditPassDateRange
()
!=
null
&&
!
dto
.
getAuditPassDateRange
().
isEmpty
()
&&
!
dto
.
getAuditPassDateRange
().
equals
(
"[, ]"
))
{
List
<
RegistrationVo
>
exportData
=
registrationMapper
.
queryRegistrationInIds
(
ids
);
String
dateRangeStr
=
dto
.
getAuditPassDateRange
();
String
[]
dates
=
dateRangeStr
.
replace
(
"["
,
""
).
replace
(
"]"
,
""
).
split
(
", "
);
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Date
start
=
null
;
Date
end
=
null
;
try
{
start
=
dateFormat
.
parse
(
dates
[
0
]);
end
=
dateFormat
.
parse
(
dates
[
1
]);
}
catch
(
ParseException
e
)
{
throw
new
RuntimeException
(
e
);
}
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
start
);
calendar
.
add
(
Calendar
.
DAY_OF_MONTH
,
-
1
);
// 减去一天
start
=
calendar
.
getTime
();
dto
.
setAuditPassDateStart
(
start
);
dto
.
setAuditPassDateEnd
(
end
);
}
List
<
RegistrationVo
>
exportData
=
registrationMapper
.
queryRegistrationInIds
(
dto
);
for
(
RegistrationVo
vo
:
exportData
)
{
if
(
vo
.
getRegType
()==
null
)
{
vo
.
setRegType
(
"新增登记"
);
}
else
if
(
vo
.
getRegType
().
equals
(
"1"
)){
vo
.
setRegType
(
"历史登记"
);
}
}
ExcelUtil
.
createTemplate
(
response
,
"使用登记列表数据"
,
"使用登记列表"
,
exportData
,
RegistrationVo
.
class
,
null
,
false
);
ExcelUtil
.
createTemplate
(
response
,
"使用登记列表数据"
,
"使用登记列表"
,
exportData
,
RegistrationVo
.
class
,
null
,
false
);
}
}
...
...
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