Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zh-baseversion-project
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
王浩
zh-baseversion-project
Commits
65ae33b4
Commit
65ae33b4
authored
Sep 12, 2024
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 液化石油气监管-充装记录导入-功能开发中
parent
95d73b3e
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
262 additions
and
76 deletions
+262
-76
TLpgAirChargeFilesController.java
...ontroller/lpgRegulation/TLpgAirChargeFilesController.java
+35
-2
TLpgAirChargeFiles.java
...ain/java/com/zehong/system/domain/TLpgAirChargeFiles.java
+57
-72
TLpgAirChargeFilesMapper.java
...va/com/zehong/system/mapper/TLpgAirChargeFilesMapper.java
+7
-0
ITLpgAirChargeFilesService.java
...com/zehong/system/service/ITLpgAirChargeFilesService.java
+23
-0
TLpgAirChargeFilesServiceImpl.java
...ng/system/service/impl/TLpgAirChargeFilesServiceImpl.java
+34
-0
TLpgAirChargeFilesMapper.xml
...main/resources/mapper/system/TLpgAirChargeFilesMapper.xml
+8
-1
airchargefiles.js
zh-baseversion-web/src/api/lpgRegulation/airchargefiles.js
+8
-0
index.vue
...sion-web/src/views/lpgRegulation/airchargefiles/index.vue
+90
-1
No files found.
zh-baseversion-admin/src/main/java/com/zehong/web/controller/lpgRegulation/TLpgAirChargeFilesController.java
View file @
65ae33b4
package
com
.
zehong
.
web
.
controller
.
lpgRegulation
;
import
java.util.List
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
...
...
@@ -19,6 +19,9 @@ import com.zehong.system.domain.TLpgAirChargeFiles;
import
com.zehong.system.service.ITLpgAirChargeFilesService
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.zehong.common.core.page.TableDataInfo
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletResponse
;
/**
* 液化石油气-充装记录Controller
...
...
@@ -51,7 +54,7 @@ public class TLpgAirChargeFilesController extends BaseController
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
TLpgAirChargeFiles
tLpgAirChargeFiles
)
{
List
<
TLpgAirChargeFiles
>
list
=
tLpgAirChargeFilesService
.
selectTLpgAirChargeFilesLis
t
(
tLpgAirChargeFiles
);
List
<
TLpgAirChargeFiles
>
list
=
tLpgAirChargeFilesService
.
queryAllForExpor
t
(
tLpgAirChargeFiles
);
ExcelUtil
<
TLpgAirChargeFiles
>
util
=
new
ExcelUtil
<
TLpgAirChargeFiles
>(
TLpgAirChargeFiles
.
class
);
return
util
.
exportExcel
(
list
,
"液化石油气-充装记录数据"
);
}
...
...
@@ -94,4 +97,34 @@ public class TLpgAirChargeFilesController extends BaseController
{
return
toAjax
(
tLpgAirChargeFilesService
.
deleteTLpgAirChargeFilesByIds
(
fGasAirChargeIds
));
}
/**
* 模版下载
* @return r
*/
@GetMapping
(
"/importTemplate"
)
public
AjaxResult
importTemplate
(){
ExcelUtil
<
TLpgAirChargeFiles
>
util
=
new
ExcelUtil
<>(
TLpgAirChargeFiles
.
class
);
return
util
.
importTemplateExcel
(
"充装记录数据"
);
}
/**
* 文件导入
* @param file f
* @param updateSupport u
* @return r
* @throws Exception r
*/
@PostMapping
(
"/importData"
)
public
AjaxResult
importData
(
MultipartFile
file
,
boolean
updateSupport
,
HttpServletResponse
response
)
throws
Exception
{
ExcelUtil
<
TLpgAirChargeFiles
>
util
=
new
ExcelUtil
<>(
TLpgAirChargeFiles
.
class
);
List
<
TLpgAirChargeFiles
>
XmbhList
=
util
.
importExcel
(
file
.
getInputStream
());
tLpgAirChargeFilesService
.
importLpgAirChargeFileInfo
(
XmbhList
,
updateSupport
,
response
);
return
AjaxResult
.
success
();
}
}
zh-baseversion-system/src/main/java/com/zehong/system/domain/TLpgAirChargeFiles.java
View file @
65ae33b4
...
...
@@ -70,133 +70,118 @@ public class TLpgAirChargeFiles extends BaseEntity
@Excel
(
name
=
"充装工"
)
private
String
fOprateName
;
public
void
setfGasAirChargeId
(
Long
fGasAirChargeId
)
{
this
.
fGasAirChargeId
=
fGasAirChargeId
;
}
public
Long
getfGasAirChargeId
()
{
public
Long
getfGasAirChargeId
()
{
return
fGasAirChargeId
;
}
public
void
setfGzId
(
Long
fGzId
)
{
this
.
fG
zId
=
fGz
Id
;
public
void
setfGasAirChargeId
(
Long
fGasAirChargeId
)
{
this
.
fG
asAirChargeId
=
fGasAirCharge
Id
;
}
public
Long
getfGzId
()
{
public
Long
getfGzId
()
{
return
fGzId
;
}
public
void
setfStationName
(
String
fStationName
)
{
this
.
f
StationName
=
fStationName
;
public
void
setfGzId
(
Long
fGzId
)
{
this
.
f
GzId
=
fGzId
;
}
public
String
getfStationName
()
{
public
String
getfStationName
()
{
return
fStationName
;
}
public
void
setfBarCode
(
String
fBarCode
)
{
this
.
f
BarCode
=
fBarCod
e
;
public
void
setfStationName
(
String
fStationName
)
{
this
.
f
StationName
=
fStationNam
e
;
}
public
String
getfBarCode
()
{
public
String
getfBarCode
()
{
return
fBarCode
;
}
public
void
setfVaseCode
(
String
fVaseCode
)
{
this
.
f
VaseCode
=
fVase
Code
;
public
void
setfBarCode
(
String
fBarCode
)
{
this
.
f
BarCode
=
fBar
Code
;
}
public
String
getfVaseCode
()
{
public
String
getfVaseCode
()
{
return
fVaseCode
;
}
public
void
setfScaleNum
(
String
fScaleNum
)
{
this
.
f
ScaleNum
=
fScaleNum
;
public
void
setfVaseCode
(
String
fVaseCode
)
{
this
.
f
VaseCode
=
fVaseCode
;
}
public
String
getfScaleNum
()
{
public
String
getfScaleNum
()
{
return
fScaleNum
;
}
public
void
setfFillStatrTime
(
String
fFillStatrTime
)
{
this
.
f
FillStatrTime
=
fFillStatrTime
;
public
void
setfScaleNum
(
String
fScaleNum
)
{
this
.
f
ScaleNum
=
fScaleNum
;
}
public
String
getfFillStatrTime
()
{
public
String
getfFillStatrTime
()
{
return
fFillStatrTime
;
}
public
void
setfFillEndTime
(
String
fFillEndTime
)
{
this
.
fFill
EndTime
=
fFillEnd
Time
;
public
void
setfFillStatrTime
(
String
fFillStatrTime
)
{
this
.
fFill
StatrTime
=
fFillStatr
Time
;
}
public
String
getfFillEndTime
()
{
public
String
getfFillEndTime
()
{
return
fFillEndTime
;
}
public
void
setfSetWeight
(
String
fSetWeight
)
{
this
.
f
SetWeight
=
fSetWeight
;
public
void
setfFillEndTime
(
String
fFillEndTime
)
{
this
.
f
FillEndTime
=
fFillEndTime
;
}
public
String
getfSetWeight
()
{
public
String
getfSetWeight
()
{
return
fSetWeight
;
}
public
void
setfWtNet
(
String
fWtNet
)
{
this
.
f
WtNet
=
fWtNe
t
;
public
void
setfSetWeight
(
String
fSetWeight
)
{
this
.
f
SetWeight
=
fSetWeigh
t
;
}
public
String
getfWtNet
()
{
public
String
getfWtNet
()
{
return
fWtNet
;
}
public
void
setfSetBottleWeight
(
String
fSetBottleWeight
)
{
this
.
f
SetBottleWeight
=
fSetBottleWeigh
t
;
public
void
setfWtNet
(
String
fWtNet
)
{
this
.
f
WtNet
=
fWtNe
t
;
}
public
String
getfSetBottleWeight
()
{
public
String
getfSetBottleWeight
()
{
return
fSetBottleWeight
;
}
public
void
setfBottleWeight
(
String
fBottleWeight
)
{
this
.
f
BottleWeight
=
f
BottleWeight
;
public
void
setfSetBottleWeight
(
String
fSetBottleWeight
)
{
this
.
f
SetBottleWeight
=
fSet
BottleWeight
;
}
public
String
getfBottleWeight
()
{
public
String
getfBottleWeight
()
{
return
fBottleWeight
;
}
public
void
setfWtGross
(
String
fWtGross
)
{
this
.
f
WtGross
=
fWtGross
;
public
void
setfBottleWeight
(
String
fBottleWeight
)
{
this
.
f
BottleWeight
=
fBottleWeight
;
}
public
String
getfWtGross
()
{
public
String
getfWtGross
()
{
return
fWtGross
;
}
public
void
setfOprateName
(
String
fOprateName
)
{
this
.
f
OprateName
=
fOprateName
;
public
void
setfWtGross
(
String
fWtGross
)
{
this
.
f
WtGross
=
fWtGross
;
}
public
String
getfOprateName
()
{
public
String
getfOprateName
()
{
return
fOprateName
;
}
public
void
setfOprateName
(
String
fOprateName
)
{
this
.
fOprateName
=
fOprateName
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
...
...
zh-baseversion-system/src/main/java/com/zehong/system/mapper/TLpgAirChargeFilesMapper.java
View file @
65ae33b4
...
...
@@ -29,6 +29,13 @@ public interface TLpgAirChargeFilesMapper
*/
public
List
<
TLpgAirChargeFiles
>
selectTLpgAirChargeFilesList
(
TLpgAirChargeFiles
tLpgAirChargeFiles
);
/**
* 2024-09-12 wh 查询数据为了导出用 限制导出数量
* @param tLpgAirChargeFiles t
* @return r
*/
public
List
<
TLpgAirChargeFiles
>
queryAllForExport
(
TLpgAirChargeFiles
tLpgAirChargeFiles
);
/**
* 新增液化石油气-充装记录
*
...
...
zh-baseversion-system/src/main/java/com/zehong/system/service/ITLpgAirChargeFilesService.java
View file @
65ae33b4
package
com
.
zehong
.
system
.
service
;
import
java.util.List
;
import
java.util.Map
;
import
com.zehong.system.domain.TLpgAirChargeFiles
;
import
com.zehong.system.domain.TLpgVehicleInfo
;
import
javax.servlet.http.HttpServletResponse
;
/**
* 液化石油气-充装记录Service接口
...
...
@@ -29,6 +34,14 @@ public interface ITLpgAirChargeFilesService
*/
public
List
<
TLpgAirChargeFiles
>
selectTLpgAirChargeFilesList
(
TLpgAirChargeFiles
tLpgAirChargeFiles
);
/**
* 2024-09-12 wh 查询数据为了导出用 限制导出数量
* @param tLpgAirChargeFiles t
* @return r
*/
public
List
<
TLpgAirChargeFiles
>
queryAllForExport
(
TLpgAirChargeFiles
tLpgAirChargeFiles
);
/**
* 新增液化石油气-充装记录
*
...
...
@@ -60,4 +73,14 @@ public interface ITLpgAirChargeFilesService
* @return 结果
*/
public
int
deleteTLpgAirChargeFilesById
(
Long
fGasAirChargeId
);
/**
* 导入
* @param xmbhList data
* @param updateSupport 是否更新
* @param response res
* @return r
*/
public
Map
<
String
,
Object
>
importLpgAirChargeFileInfo
(
List
<
TLpgAirChargeFiles
>
xmbhList
,
boolean
updateSupport
,
HttpServletResponse
response
);
}
zh-baseversion-system/src/main/java/com/zehong/system/service/impl/TLpgAirChargeFilesServiceImpl.java
View file @
65ae33b4
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TLpgAirChargeFilesMapper
;
import
com.zehong.system.domain.TLpgAirChargeFiles
;
import
com.zehong.system.service.ITLpgAirChargeFilesService
;
import
javax.servlet.http.HttpServletResponse
;
/**
* 液化石油气-充装记录Service业务层处理
*
...
...
@@ -50,6 +55,16 @@ public class TLpgAirChargeFilesServiceImpl implements ITLpgAirChargeFilesService
return
tLpgAirChargeFilesMapper
.
selectTLpgAirChargeFilesList
(
tLpgAirChargeFiles
);
}
/**
* 2024-09-12 wh 查询数据为了导出用 限制导出数量
* @param tLpgAirChargeFiles t
* @return r
*/
@Override
public
List
<
TLpgAirChargeFiles
>
queryAllForExport
(
TLpgAirChargeFiles
tLpgAirChargeFiles
)
{
return
tLpgAirChargeFilesMapper
.
queryAllForExport
(
tLpgAirChargeFiles
);
}
/**
* 新增液化石油气-充装记录
*
...
...
@@ -97,4 +112,23 @@ public class TLpgAirChargeFilesServiceImpl implements ITLpgAirChargeFilesService
{
return
tLpgAirChargeFilesMapper
.
deleteTLpgAirChargeFilesById
(
fGasAirChargeId
);
}
/**
* 导出
* @param xmbhList data
* @param updateSupport 是否更新
* @param response res
*/
@Override
public
Map
<
String
,
Object
>
importLpgAirChargeFileInfo
(
List
<
TLpgAirChargeFiles
>
xmbhList
,
boolean
updateSupport
,
HttpServletResponse
response
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
for
(
TLpgAirChargeFiles
tLpgAirChargeFiles
:
xmbhList
)
{
System
.
out
.
println
(
tLpgAirChargeFiles
.
getfBarCode
());
}
return
map
;
}
}
zh-baseversion-system/src/main/resources/mapper/system/TLpgAirChargeFilesMapper.xml
View file @
65ae33b4
...
...
@@ -32,7 +32,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"fBarCode != null and fBarCode != ''"
>
and f_bar_code like concat('%', #{fBarCode}, '%')
</if>
</where>
</select>
<select
id=
"queryAllForExport"
resultMap=
"TLpgAirChargeFilesResult"
>
<include
refid=
"selectTLpgAirChargeFilesVo"
/>
<where>
<if
test=
"fVaseCode != null and fVaseCode != ''"
>
and f_vase_code like concat('%', #{fVaseCode}, '%')
</if>
<if
test=
"fBarCode != null and fBarCode != ''"
>
and f_bar_code like concat('%', #{fBarCode}, '%')
</if>
</where>
limit 1000
</select>
<select
id=
"selectTLpgAirChargeFilesById"
parameterType=
"Long"
resultMap=
"TLpgAirChargeFilesResult"
>
<include
refid=
"selectTLpgAirChargeFilesVo"
/>
where f_gas_air_charge_id = #{fGasAirChargeId}
...
...
zh-baseversion-web/src/api/lpgRegulation/airchargefiles.js
View file @
65ae33b4
...
...
@@ -51,3 +51,11 @@ export function exportFiles(query) {
params
:
query
})
}
// 下载用户导入模板
export
function
importTemplate
()
{
return
request
({
url
:
'/lpg/airchargefiles/importTemplate'
,
method
:
'get'
})
}
\ No newline at end of file
zh-baseversion-web/src/views/lpgRegulation/airchargefiles/index.vue
View file @
65ae33b4
...
...
@@ -36,6 +36,15 @@
@
click=
"handleExport"
>
导出
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"info"
icon=
"el-icon-upload2"
size=
"mini"
@
click=
"handleImport"
>
导入
</el-button>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
...
...
@@ -68,12 +77,44 @@
<!-- 详情 -->
<DetailInfo
ref=
"detail"
/>
<!-- 用户导入对话框 -->
<el-dialog
:title=
"upload.title"
:visible
.
sync=
"upload.open"
width=
"400px"
append-to-body
>
<el-upload
ref=
"upload"
:limit=
"1"
accept=
".xlsx, .xls"
:headers=
"upload.headers"
:action=
"upload.url + '?updateSupport=' + upload.updateSupport"
:disabled=
"upload.isUploading"
:on-progress=
"handleFileUploadProgress"
:on-success=
"handleFileSuccess"
:auto-upload=
"false"
drag
>
<i
class=
"el-icon-upload"
></i>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
<div
class=
"el-upload__tip text-center"
slot=
"tip"
>
<span>
仅允许导入xls、xlsx格式文件。
</span>
<el-link
type=
"primary"
:underline=
"false"
style=
"font-size:12px;vertical-align: baseline;"
@
click=
"importTemplate"
>
下载模板
</el-link>
<br>
</div>
</el-upload>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitFileForm"
>
确 定
</el-button>
<el-button
@
click=
"upload.open = false"
>
取 消
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
listFiles
,
exportFiles
}
from
"@/api/lpgRegulation/airchargefiles"
;
import
{
listFiles
,
exportFiles
,
importTemplate
}
from
"@/api/lpgRegulation/airchargefiles"
;
import
DetailInfo
from
"./components/indexInfo"
;
import
{
getToken
}
from
"@/utils/auth"
;
export
default
{
name
:
"Files"
,
...
...
@@ -82,6 +123,22 @@ export default {
},
data
()
{
return
{
upload
:
{
// 是否显示弹出层(用户导入)
open
:
false
,
// 弹出层标题(用户导入)
title
:
""
,
// 是否禁用上传
isUploading
:
false
,
// 是否更新已经存在的用户数据
updateSupport
:
0
,
// 设置上传的请求头部
headers
:
{
Authorization
:
"Bearer "
+
getToken
()
},
// 上传的地址
url
:
process
.
env
.
VUE_APP_BASE_API
+
"/lpg/airchargefiles/importData"
},
// 遮罩层
loading
:
true
,
// 导出遮罩层
...
...
@@ -119,6 +176,38 @@ export default {
this
.
getList
();
},
methods
:
{
/** 下载模板操作 */
importTemplate
()
{
importTemplate
().
then
(
response
=>
{
this
.
download
(
response
.
msg
);
});
},
handleImport
(){
this
.
upload
.
title
=
"充装记录导入"
;
// todo
this
.
upload
.
open
=
true
;
},
// 文件上传处理中
handleFileUploadProgress
(
event
,
file
,
fileList
)
{
this
.
upload
.
isUploading
=
true
;
},
// 文件上传成功处理
handleFileSuccess
(
response
,
file
,
fileList
)
{
this
.
upload
.
open
=
false
;
this
.
upload
.
isUploading
=
false
;
this
.
$refs
.
upload
.
clearFiles
();
this
.
$alert
(
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>"
+
response
.
msg
+
"</div>"
,
"导入结果"
,
{
dangerouslyUseHTMLString
:
true
});
this
.
getList
();
},
// 提交上传文件
submitFileForm
()
{
this
.
$refs
.
upload
.
submit
();
},
/** 查询液化石油气-充装记录列表 */
getList
()
{
this
.
loading
=
true
;
...
...
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