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
141bc55b
Commit
141bc55b
authored
Jan 07, 2025
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):延炼八大类设备数据调整接口
parent
599a92bb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
148 additions
and
24 deletions
+148
-24
DataDockController.java
...mos/boot/module/jg/biz/controller/DataDockController.java
+22
-12
DataDockServiceImpl.java
.../boot/module/jg/biz/service/impl/DataDockServiceImpl.java
+126
-12
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/DataDockController.java
View file @
141bc55b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.DataDockServiceImpl
;
import
com.yeejoin.amos.component.robot.BadRequest
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.io.FilenameUtils
;
...
...
@@ -8,6 +9,7 @@ import org.springframework.validation.annotation.Validated;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
...
@@ -52,9 +54,7 @@ public class DataDockController {
String
contentType
=
file
.
getContentType
();
String
fileExtension
=
FilenameUtils
.
getExtension
(
file
.
getOriginalFilename
());
// 校验 Excel 文件的 MIME type 和扩展名
if
(!(
"application/vnd.ms-excel"
.
equals
(
contentType
)
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
.
equals
(
contentType
))
||
!(
"xls"
.
equalsIgnoreCase
(
fileExtension
)
||
"xlsx"
.
equalsIgnoreCase
(
fileExtension
)))
{
if
(!(
"application/vnd.ms-excel"
.
equals
(
contentType
)
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
.
equals
(
contentType
))
||
!(
"xls"
.
equalsIgnoreCase
(
fileExtension
)
||
"xlsx"
.
equalsIgnoreCase
(
fileExtension
)))
{
return
ResponseHelper
.
buildResponse
(
"文件类型必须是 Excel 文件"
);
}
return
ResponseHelper
.
buildResponse
(
dataDockService
.
dataCheckAndImportEquipmentData
(
remark
,
file
));
...
...
@@ -68,14 +68,24 @@ public class DataDockController {
// return ResponseHelper.buildResponse("ok");
// }
// @TycloudOperation(ApiLevel = UserType.AGENCY)
// @GetMapping(value = "/yanChang/ORG_BRANCH_CODE")
// @ApiOperation(httpMethod = "get", value = "延炼-延长-刷入属地监管部门", notes = "延炼-延长-刷入属地监管部门")
// public Object writeOrgBranchCode2YanChang(@NotNull @RequestParam String remark) {
// if (ValidationUtil.isEmpty(remark)) {
// throw new BadRequest("remark必填!");
// }
// return ResponseHelper.buildResponse("更新成功,共" + dataDockService.writeOrgBranchCode2YanChang(remark) + "条数据");
// }
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/yanChang/ORG_BRANCH_CODE"
)
@ApiOperation
(
httpMethod
=
"get"
,
value
=
"延炼-延长-刷入属地监管部门"
,
notes
=
"延炼-延长-刷入属地监管部门"
)
public
Object
writeOrgBranchCode2YanChang
(
@RequestParam
String
remark
)
{
if
(
ValidationUtil
.
isEmpty
(
remark
))
{
throw
new
BadRequest
(
"remark必填!"
);
}
return
ResponseHelper
.
buildResponse
(
"更新成功,共"
+
dataDockService
.
writeOrgBranchCode2YanChang
(
remark
)
+
"条数据"
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/yanChang/USE_PLACE"
)
@ApiOperation
(
httpMethod
=
"get"
,
value
=
"延炼-延长-刷入所属区域"
,
notes
=
"延炼-延长-刷入所属区域"
)
public
Object
writeUsePlace2YanChang
(
@RequestParam
String
remark
)
{
if
(
ValidationUtil
.
isEmpty
(
remark
))
{
throw
new
BadRequest
(
"remark必填!"
);
}
return
ResponseHelper
.
buildResponse
(
"更新成功,共"
+
dataDockService
.
writeUsePlace2YanChang
(
remark
)
+
"条数据"
);
}
}
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/DataDockServiceImpl.java
View file @
141bc55b
This diff is collapsed.
Click to expand it.
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