Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety-progress
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
耿迪迪
gassafety-progress
Commits
e4b33e08
Commit
e4b33e08
authored
Aug 18, 2023
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
燃气用户
parent
ca9e48cd
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
720 additions
and
4 deletions
+720
-4
TGasBottleInfoController.java
...b/controller/gasBottleTrack/TGasBottleInfoController.java
+2
-2
TGasUserInfoController.java
...web/controller/gasBottleTrack/TGasUserInfoController.java
+130
-0
TPractitionerInfoController.java
...ontroller/gasBottleTrack/TPractitionerInfoController.java
+2
-2
TGasUserInfo.java
.../src/main/java/com/zehong/system/domain/TGasUserInfo.java
+182
-0
TGasUserInfoMapper.java
...ain/java/com/zehong/system/mapper/TGasUserInfoMapper.java
+61
-0
ITGasUserInfoService.java
.../java/com/zehong/system/service/ITGasUserInfoService.java
+69
-0
TGasUserInfoServiceImpl.java
...m/zehong/system/service/impl/TGasUserInfoServiceImpl.java
+161
-0
TGasUserInfoMapper.xml
...m/src/main/resources/mapper/system/TGasUserInfoMapper.xml
+113
-0
No files found.
gassafetyprogress-admin/src/main/java/com/zehong/web/controller/gasBottleTrack/TGasBottleInfoController.java
View file @
e4b33e08
...
...
@@ -97,14 +97,14 @@ public class TGasBottleInfoController extends BaseController
}
/**
*
储配站
导入
*
气瓶
导入
* @param file
* @param updateSupport
* @return
* @throws Exception
*/
@PreAuthorize
(
"@ss.hasPermi('gasBottle:info:import')"
)
@Log
(
title
=
"
储配站维护
"
,
businessType
=
BusinessType
.
IMPORT
)
@Log
(
title
=
"
气瓶导入
"
,
businessType
=
BusinessType
.
IMPORT
)
@PostMapping
(
"/importData"
)
public
AjaxResult
importData
(
MultipartFile
file
,
boolean
updateSupport
)
throws
Exception
{
...
...
gassafetyprogress-admin/src/main/java/com/zehong/web/controller/gasBottleTrack/TGasUserInfoController.java
0 → 100644
View file @
e4b33e08
package
com
.
zehong
.
web
.
controller
.
gasBottleTrack
;
import
java.util.List
;
import
com.zehong.system.domain.TGasBottleInfo
;
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
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.zehong.common.annotation.Log
;
import
com.zehong.common.core.controller.BaseController
;
import
com.zehong.common.core.domain.AjaxResult
;
import
com.zehong.common.enums.BusinessType
;
import
com.zehong.system.domain.TGasUserInfo
;
import
com.zehong.system.service.ITGasUserInfoService
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.zehong.common.core.page.TableDataInfo
;
import
org.springframework.web.multipart.MultipartFile
;
/**
* 燃气用户Controller
*
* @author zehong
* @date 2023-08-17
*/
@RestController
@RequestMapping
(
"/gasUser/info"
)
public
class
TGasUserInfoController
extends
BaseController
{
@Autowired
private
ITGasUserInfoService
tGasUserInfoService
;
/**
* 查询燃气用户列表
*/
@PreAuthorize
(
"@ss.hasPermi('gasUser:info:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
TGasUserInfo
tGasUserInfo
)
{
startPage
();
List
<
TGasUserInfo
>
list
=
tGasUserInfoService
.
selectTGasUserInfoList
(
tGasUserInfo
);
return
getDataTable
(
list
);
}
/**
* 导出燃气用户列表
*/
@PreAuthorize
(
"@ss.hasPermi('gasUser:info:export')"
)
@Log
(
title
=
"燃气用户"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
TGasUserInfo
tGasUserInfo
)
{
List
<
TGasUserInfo
>
list
=
tGasUserInfoService
.
selectTGasUserInfoList
(
tGasUserInfo
);
ExcelUtil
<
TGasUserInfo
>
util
=
new
ExcelUtil
<
TGasUserInfo
>(
TGasUserInfo
.
class
);
return
util
.
exportExcel
(
list
,
"燃气用户数据"
);
}
/**
* 获取燃气用户详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('gasUser:info:query')"
)
@GetMapping
(
value
=
"/{gasUserId}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"gasUserId"
)
Long
gasUserId
)
{
return
AjaxResult
.
success
(
tGasUserInfoService
.
selectTGasUserInfoById
(
gasUserId
));
}
/**
* 新增燃气用户
*/
@PreAuthorize
(
"@ss.hasPermi('gasUser:info:add')"
)
@Log
(
title
=
"燃气用户"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
TGasUserInfo
tGasUserInfo
)
{
return
toAjax
(
tGasUserInfoService
.
insertTGasUserInfo
(
tGasUserInfo
));
}
/**
* 修改燃气用户
*/
@PreAuthorize
(
"@ss.hasPermi('gasUser:info:edit')"
)
@Log
(
title
=
"燃气用户"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
TGasUserInfo
tGasUserInfo
)
{
return
toAjax
(
tGasUserInfoService
.
updateTGasUserInfo
(
tGasUserInfo
));
}
/**
* 删除燃气用户
*/
@PreAuthorize
(
"@ss.hasPermi('gasUser:info:remove')"
)
@Log
(
title
=
"燃气用户"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{gasUserIds}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
gasUserIds
)
{
return
toAjax
(
tGasUserInfoService
.
deleteTGasUserInfoByIds
(
gasUserIds
));
}
/**
* 燃气用户导入
* @param file
* @param updateSupport
* @return
* @throws Exception
*/
@PreAuthorize
(
"@ss.hasPermi('gasUser:info:import')"
)
@Log
(
title
=
"燃气用户导入"
,
businessType
=
BusinessType
.
IMPORT
)
@PostMapping
(
"/importData"
)
public
AjaxResult
importData
(
MultipartFile
file
,
boolean
updateSupport
)
throws
Exception
{
ExcelUtil
<
TGasUserInfo
>
util
=
new
ExcelUtil
<>(
TGasUserInfo
.
class
);
List
<
TGasUserInfo
>
tGasUserInfoList
=
util
.
importExcel
(
file
.
getInputStream
());
String
message
=
tGasUserInfoService
.
importTGasUserInfo
(
tGasUserInfoList
,
updateSupport
);
return
AjaxResult
.
success
(
message
);
}
@GetMapping
(
"/importTemplate"
)
public
AjaxResult
importTemplate
(){
ExcelUtil
<
TGasUserInfo
>
util
=
new
ExcelUtil
<>(
TGasUserInfo
.
class
);
return
util
.
importTemplateExcel
(
"燃气用户数据"
);
}
}
gassafetyprogress-admin/src/main/java/com/zehong/web/controller/gasBottleTrack/TPractitionerInfoController.java
View file @
e4b33e08
...
...
@@ -105,14 +105,14 @@ public class TPractitionerInfoController extends BaseController
}
/**
*
储配站
导入
*
从业人员
导入
* @param file
* @param updateSupport
* @return
* @throws Exception
*/
@PreAuthorize
(
"@ss.hasPermi('practitioner:info:import')"
)
@Log
(
title
=
"
储配站维护
"
,
businessType
=
BusinessType
.
IMPORT
)
@Log
(
title
=
"
从业人员导入
"
,
businessType
=
BusinessType
.
IMPORT
)
@PostMapping
(
"/importData"
)
public
AjaxResult
importData
(
MultipartFile
file
,
boolean
updateSupport
)
throws
Exception
{
...
...
gassafetyprogress-system/src/main/java/com/zehong/system/domain/TGasUserInfo.java
0 → 100644
View file @
e4b33e08
package
com
.
zehong
.
system
.
domain
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.zehong.common.annotation.Excel
;
import
com.zehong.common.core.domain.BaseEntity
;
/**
* 燃气用户对象 t_gas_user_info
*
* @author zehong
* @date 2023-08-17
*/
public
class
TGasUserInfo
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 燃气用户主键 */
private
Long
gasUserId
;
/** 名称 */
@Excel
(
name
=
"用户名称"
)
private
String
gasUserName
;
/** 代码 */
@Excel
(
name
=
"用户编码"
)
private
String
gasUserCode
;
/** 0.居民 1.非居民 */
@Excel
(
name
=
"用户类型:0.居民 1.非居民"
)
private
String
gasUserType
;
/** 联系电话 */
@Excel
(
name
=
"联系电话"
)
private
String
telNum
;
/** 0.正常 1.停用 */
@Excel
(
name
=
"用户状态:0.正常 1.停用"
)
private
String
gasUserStatus
;
/** 用户地址 */
@Excel
(
name
=
"用户地址"
)
private
String
gasUserAddress
;
/** 末次配送时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Excel
(
name
=
"末次配送时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
lastDeliveryDate
;
/** 入户安检状态:0.正常入户 1.拒绝安检 */
@Excel
(
name
=
"入户安检状态:0.正常入户 1.拒绝安检"
)
private
String
gasUserCheckStatus
;
/** 累计安检次数 */
@Excel
(
name
=
"累计安检次数"
)
private
Integer
totalCheckNum
;
/** 删除状态:0.否 1.是 */
private
String
isDel
;
public
void
setGasUserId
(
Long
gasUserId
)
{
this
.
gasUserId
=
gasUserId
;
}
public
Long
getGasUserId
()
{
return
gasUserId
;
}
public
void
setGasUserName
(
String
gasUserName
)
{
this
.
gasUserName
=
gasUserName
;
}
public
String
getGasUserName
()
{
return
gasUserName
;
}
public
void
setGasUserCode
(
String
gasUserCode
)
{
this
.
gasUserCode
=
gasUserCode
;
}
public
String
getGasUserCode
()
{
return
gasUserCode
;
}
public
void
setGasUserType
(
String
gasUserType
)
{
this
.
gasUserType
=
gasUserType
;
}
public
String
getGasUserType
()
{
return
gasUserType
;
}
public
void
setTelNum
(
String
telNum
)
{
this
.
telNum
=
telNum
;
}
public
String
getTelNum
()
{
return
telNum
;
}
public
void
setGasUserStatus
(
String
gasUserStatus
)
{
this
.
gasUserStatus
=
gasUserStatus
;
}
public
String
getGasUserStatus
()
{
return
gasUserStatus
;
}
public
void
setGasUserAddress
(
String
gasUserAddress
)
{
this
.
gasUserAddress
=
gasUserAddress
;
}
public
String
getGasUserAddress
()
{
return
gasUserAddress
;
}
public
void
setLastDeliveryDate
(
Date
lastDeliveryDate
)
{
this
.
lastDeliveryDate
=
lastDeliveryDate
;
}
public
Date
getLastDeliveryDate
()
{
return
lastDeliveryDate
;
}
public
void
setGasUserCheckStatus
(
String
gasUserCheckStatus
)
{
this
.
gasUserCheckStatus
=
gasUserCheckStatus
;
}
public
String
getGasUserCheckStatus
()
{
return
gasUserCheckStatus
;
}
public
void
setTotalCheckNum
(
Integer
totalCheckNum
)
{
this
.
totalCheckNum
=
totalCheckNum
;
}
public
Integer
getTotalCheckNum
()
{
return
totalCheckNum
;
}
public
void
setIsDel
(
String
isDel
)
{
this
.
isDel
=
isDel
;
}
public
String
getIsDel
()
{
return
isDel
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"gasUserId"
,
getGasUserId
())
.
append
(
"gasUserName"
,
getGasUserName
())
.
append
(
"gasUserCode"
,
getGasUserCode
())
.
append
(
"gasUserType"
,
getGasUserType
())
.
append
(
"telNum"
,
getTelNum
())
.
append
(
"gasUserStatus"
,
getGasUserStatus
())
.
append
(
"gasUserAddress"
,
getGasUserAddress
())
.
append
(
"lastDeliveryDate"
,
getLastDeliveryDate
())
.
append
(
"gasUserCheckStatus"
,
getGasUserCheckStatus
())
.
append
(
"totalCheckNum"
,
getTotalCheckNum
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"isDel"
,
getIsDel
())
.
append
(
"remark"
,
getRemark
())
.
toString
();
}
}
gassafetyprogress-system/src/main/java/com/zehong/system/mapper/TGasUserInfoMapper.java
0 → 100644
View file @
e4b33e08
package
com
.
zehong
.
system
.
mapper
;
import
java.util.List
;
import
com.zehong.system.domain.TGasUserInfo
;
/**
* 燃气用户Mapper接口
*
* @author zehong
* @date 2023-08-17
*/
public
interface
TGasUserInfoMapper
{
/**
* 查询燃气用户
*
* @param gasUserId 燃气用户ID
* @return 燃气用户
*/
public
TGasUserInfo
selectTGasUserInfoById
(
Long
gasUserId
);
/**
* 查询燃气用户列表
*
* @param tGasUserInfo 燃气用户
* @return 燃气用户集合
*/
public
List
<
TGasUserInfo
>
selectTGasUserInfoList
(
TGasUserInfo
tGasUserInfo
);
/**
* 新增燃气用户
*
* @param tGasUserInfo 燃气用户
* @return 结果
*/
public
int
insertTGasUserInfo
(
TGasUserInfo
tGasUserInfo
);
/**
* 修改燃气用户
*
* @param tGasUserInfo 燃气用户
* @return 结果
*/
public
int
updateTGasUserInfo
(
TGasUserInfo
tGasUserInfo
);
/**
* 删除燃气用户
*
* @param gasUserId 燃气用户ID
* @return 结果
*/
public
int
deleteTGasUserInfoById
(
Long
gasUserId
);
/**
* 批量删除燃气用户
*
* @param gasUserIds 需要删除的数据ID
* @return 结果
*/
public
int
deleteTGasUserInfoByIds
(
Long
[]
gasUserIds
);
}
gassafetyprogress-system/src/main/java/com/zehong/system/service/ITGasUserInfoService.java
0 → 100644
View file @
e4b33e08
package
com
.
zehong
.
system
.
service
;
import
java.util.List
;
import
com.zehong.system.domain.TGasUserInfo
;
/**
* 燃气用户Service接口
*
* @author zehong
* @date 2023-08-17
*/
public
interface
ITGasUserInfoService
{
/**
* 查询燃气用户
*
* @param gasUserId 燃气用户ID
* @return 燃气用户
*/
public
TGasUserInfo
selectTGasUserInfoById
(
Long
gasUserId
);
/**
* 查询燃气用户列表
*
* @param tGasUserInfo 燃气用户
* @return 燃气用户集合
*/
public
List
<
TGasUserInfo
>
selectTGasUserInfoList
(
TGasUserInfo
tGasUserInfo
);
/**
* 新增燃气用户
*
* @param tGasUserInfo 燃气用户
* @return 结果
*/
public
int
insertTGasUserInfo
(
TGasUserInfo
tGasUserInfo
);
/**
* 修改燃气用户
*
* @param tGasUserInfo 燃气用户
* @return 结果
*/
public
int
updateTGasUserInfo
(
TGasUserInfo
tGasUserInfo
);
/**
* 批量删除燃气用户
*
* @param gasUserIds 需要删除的燃气用户ID
* @return 结果
*/
public
int
deleteTGasUserInfoByIds
(
Long
[]
gasUserIds
);
/**
* 删除燃气用户信息
*
* @param gasUserId 燃气用户ID
* @return 结果
*/
public
int
deleteTGasUserInfoById
(
Long
gasUserId
);
/**
* 燃气用户导入
* @param tGasUserInfoList 燃气用户实体
* @param isUpdateSupport 是否更新
* @return
*/
String
importTGasUserInfo
(
List
<
TGasUserInfo
>
tGasUserInfoList
,
boolean
isUpdateSupport
);
}
gassafetyprogress-system/src/main/java/com/zehong/system/service/impl/TGasUserInfoServiceImpl.java
0 → 100644
View file @
e4b33e08
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.List
;
import
com.zehong.common.exception.CustomException
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.common.utils.StringUtils
;
import
com.zehong.system.domain.SysPost
;
import
com.zehong.system.domain.TGasStorageStationInfo
;
import
com.zehong.system.domain.TPractitionerInfo
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TGasUserInfoMapper
;
import
com.zehong.system.domain.TGasUserInfo
;
import
com.zehong.system.service.ITGasUserInfoService
;
import
org.springframework.util.CollectionUtils
;
/**
* 燃气用户Service业务层处理
*
* @author zehong
* @date 2023-08-17
*/
@Service
public
class
TGasUserInfoServiceImpl
implements
ITGasUserInfoService
{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
TGasUserInfoServiceImpl
.
class
);
@Autowired
private
TGasUserInfoMapper
tGasUserInfoMapper
;
/**
* 查询燃气用户
*
* @param gasUserId 燃气用户ID
* @return 燃气用户
*/
@Override
public
TGasUserInfo
selectTGasUserInfoById
(
Long
gasUserId
)
{
return
tGasUserInfoMapper
.
selectTGasUserInfoById
(
gasUserId
);
}
/**
* 查询燃气用户列表
*
* @param tGasUserInfo 燃气用户
* @return 燃气用户
*/
@Override
public
List
<
TGasUserInfo
>
selectTGasUserInfoList
(
TGasUserInfo
tGasUserInfo
)
{
return
tGasUserInfoMapper
.
selectTGasUserInfoList
(
tGasUserInfo
);
}
/**
* 新增燃气用户
*
* @param tGasUserInfo 燃气用户
* @return 结果
*/
@Override
public
int
insertTGasUserInfo
(
TGasUserInfo
tGasUserInfo
)
{
tGasUserInfo
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
tGasUserInfoMapper
.
insertTGasUserInfo
(
tGasUserInfo
);
}
/**
* 修改燃气用户
*
* @param tGasUserInfo 燃气用户
* @return 结果
*/
@Override
public
int
updateTGasUserInfo
(
TGasUserInfo
tGasUserInfo
)
{
tGasUserInfo
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
tGasUserInfoMapper
.
updateTGasUserInfo
(
tGasUserInfo
);
}
/**
* 批量删除燃气用户
*
* @param gasUserIds 需要删除的燃气用户ID
* @return 结果
*/
@Override
public
int
deleteTGasUserInfoByIds
(
Long
[]
gasUserIds
)
{
return
tGasUserInfoMapper
.
deleteTGasUserInfoByIds
(
gasUserIds
);
}
/**
* 删除燃气用户信息
*
* @param gasUserId 燃气用户ID
* @return 结果
*/
@Override
public
int
deleteTGasUserInfoById
(
Long
gasUserId
)
{
return
tGasUserInfoMapper
.
deleteTGasUserInfoById
(
gasUserId
);
}
/**
* 燃气用户导入
* @param tGasUserInfoList 燃气用户实体
* @param updateSupport 是否更新
* @return
*/
@Override
public
String
importTGasUserInfo
(
List
<
TGasUserInfo
>
tGasUserInfoList
,
boolean
isUpdateSupport
){
if
(
StringUtils
.
isNull
(
tGasUserInfoList
)
||
tGasUserInfoList
.
size
()
==
0
){
throw
new
CustomException
(
"导入数据不能为空!"
);
}
int
successNum
=
0
;
int
failureNum
=
0
;
StringBuilder
successMsg
=
new
StringBuilder
();
StringBuilder
failureMsg
=
new
StringBuilder
();
for
(
TGasUserInfo
tGasUserInfo
:
tGasUserInfoList
){
try
{
TGasUserInfo
queryGasUserInfo
=
new
TGasUserInfo
();
queryGasUserInfo
.
setGasUserName
(
tGasUserInfo
.
getGasUserName
());
List
<
TGasUserInfo
>
queryGasUserInfoList
=
tGasUserInfoMapper
.
selectTGasUserInfoList
(
queryGasUserInfo
);
if
(
StringUtils
.
isNull
(
queryGasUserInfoList
)
||
queryGasUserInfoList
.
size
()
==
0
){
this
.
insertTGasUserInfo
(
tGasUserInfo
);
successNum
++;
successMsg
.
append
(
"<br/>"
+
successNum
+
"、燃气用户名称 "
+
tGasUserInfo
.
getGasUserName
()
+
" 导入成功"
);
}
else
if
(
isUpdateSupport
){
tGasUserInfo
.
setGasUserId
(
queryGasUserInfoList
.
get
(
0
).
getGasUserId
());
this
.
updateTGasUserInfo
(
tGasUserInfo
);
successNum
++;
successMsg
.
append
(
"<br/>"
+
successNum
+
"、燃气用户名称 "
+
tGasUserInfo
.
getGasUserName
()
+
" 更新成功"
);
}
else
{
failureNum
++;
failureMsg
.
append
(
"<br/>"
+
failureNum
+
"、燃气用户名称 "
+
tGasUserInfo
.
getGasUserName
()
+
" 已存在"
);
}
}
catch
(
Exception
e
)
{
failureNum
++;
String
msg
=
"<br/>"
+
failureNum
+
"、燃气用户名称 "
+
tGasUserInfo
.
getGasUserName
()
+
" 导入失败:"
;
failureMsg
.
append
(
msg
+
e
.
getMessage
());
log
.
error
(
msg
,
e
);
}
}
if
(
failureNum
>
0
)
{
failureMsg
.
insert
(
0
,
"很抱歉,导入失败!共 "
+
failureNum
+
" 条数据格式不正确,错误如下:"
);
throw
new
CustomException
(
failureMsg
.
toString
());
}
else
{
successMsg
.
insert
(
0
,
"恭喜您,数据已全部导入成功!共 "
+
successNum
+
" 条,数据如下:"
);
}
return
successMsg
.
toString
();
}
}
gassafetyprogress-system/src/main/resources/mapper/system/TGasUserInfoMapper.xml
0 → 100644
View file @
e4b33e08
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.zehong.system.mapper.TGasUserInfoMapper"
>
<resultMap
type=
"TGasUserInfo"
id=
"TGasUserInfoResult"
>
<result
property=
"gasUserId"
column=
"gas_user_id"
/>
<result
property=
"gasUserName"
column=
"gas_user_name"
/>
<result
property=
"gasUserCode"
column=
"gas_user_code"
/>
<result
property=
"gasUserType"
column=
"gas_user_type"
/>
<result
property=
"telNum"
column=
"tel_num"
/>
<result
property=
"gasUserStatus"
column=
"gas_user_status"
/>
<result
property=
"gasUserAddress"
column=
"gas_user_address"
/>
<result
property=
"lastDeliveryDate"
column=
"last_delivery_date"
/>
<result
property=
"gasUserCheckStatus"
column=
"gas_user_check_status"
/>
<result
property=
"totalCheckNum"
column=
"total_check_num"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"isDel"
column=
"is_del"
/>
<result
property=
"remark"
column=
"remark"
/>
</resultMap>
<sql
id=
"selectTGasUserInfoVo"
>
select gas_user_id, gas_user_name, gas_user_code, gas_user_type, tel_num, gas_user_status, gas_user_address, last_delivery_date, gas_user_check_status, total_check_num, create_time, update_time, is_del, remark from t_gas_user_info
</sql>
<select
id=
"selectTGasUserInfoList"
parameterType=
"TGasUserInfo"
resultMap=
"TGasUserInfoResult"
>
<include
refid=
"selectTGasUserInfoVo"
/>
<where>
<if
test=
"gasUserName != null and gasUserName != ''"
>
and gas_user_name like concat('%', #{gasUserName}, '%')
</if>
<if
test=
"gasUserCode != null and gasUserCode != ''"
>
and gas_user_code = #{gasUserCode}
</if>
<if
test=
"gasUserType != null and gasUserType != ''"
>
and gas_user_type = #{gasUserType}
</if>
<if
test=
"telNum != null and telNum != ''"
>
and tel_num = #{telNum}
</if>
<if
test=
"gasUserStatus != null and gasUserStatus != ''"
>
and gas_user_status = #{gasUserStatus}
</if>
<if
test=
"gasUserAddress != null and gasUserAddress != ''"
>
and gas_user_address = #{gasUserAddress}
</if>
<if
test=
"lastDeliveryDate != null "
>
and last_delivery_date = #{lastDeliveryDate}
</if>
<if
test=
"gasUserCheckStatus != null and gasUserCheckStatus != ''"
>
and gas_user_check_status = #{gasUserCheckStatus}
</if>
<if
test=
"totalCheckNum != null "
>
and total_check_num = #{totalCheckNum}
</if>
<if
test=
"isDel != null and isDel != ''"
>
and is_del = #{isDel}
</if>
</where>
</select>
<select
id=
"selectTGasUserInfoById"
parameterType=
"Long"
resultMap=
"TGasUserInfoResult"
>
<include
refid=
"selectTGasUserInfoVo"
/>
where gas_user_id = #{gasUserId}
</select>
<insert
id=
"insertTGasUserInfo"
parameterType=
"TGasUserInfo"
useGeneratedKeys=
"true"
keyProperty=
"gasUserId"
>
insert into t_gas_user_info
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"gasUserName != null"
>
gas_user_name,
</if>
<if
test=
"gasUserCode != null"
>
gas_user_code,
</if>
<if
test=
"gasUserType != null"
>
gas_user_type,
</if>
<if
test=
"telNum != null"
>
tel_num,
</if>
<if
test=
"gasUserStatus != null"
>
gas_user_status,
</if>
<if
test=
"gasUserAddress != null"
>
gas_user_address,
</if>
<if
test=
"lastDeliveryDate != null"
>
last_delivery_date,
</if>
<if
test=
"gasUserCheckStatus != null"
>
gas_user_check_status,
</if>
<if
test=
"totalCheckNum != null"
>
total_check_num,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"isDel != null"
>
is_del,
</if>
<if
test=
"remark != null"
>
remark,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"gasUserName != null"
>
#{gasUserName},
</if>
<if
test=
"gasUserCode != null"
>
#{gasUserCode},
</if>
<if
test=
"gasUserType != null"
>
#{gasUserType},
</if>
<if
test=
"telNum != null"
>
#{telNum},
</if>
<if
test=
"gasUserStatus != null"
>
#{gasUserStatus},
</if>
<if
test=
"gasUserAddress != null"
>
#{gasUserAddress},
</if>
<if
test=
"lastDeliveryDate != null"
>
#{lastDeliveryDate},
</if>
<if
test=
"gasUserCheckStatus != null"
>
#{gasUserCheckStatus},
</if>
<if
test=
"totalCheckNum != null"
>
#{totalCheckNum},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"isDel != null"
>
#{isDel},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
</trim>
</insert>
<update
id=
"updateTGasUserInfo"
parameterType=
"TGasUserInfo"
>
update t_gas_user_info
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"gasUserName != null"
>
gas_user_name = #{gasUserName},
</if>
<if
test=
"gasUserCode != null"
>
gas_user_code = #{gasUserCode},
</if>
<if
test=
"gasUserType != null"
>
gas_user_type = #{gasUserType},
</if>
<if
test=
"telNum != null"
>
tel_num = #{telNum},
</if>
<if
test=
"gasUserStatus != null"
>
gas_user_status = #{gasUserStatus},
</if>
<if
test=
"gasUserAddress != null"
>
gas_user_address = #{gasUserAddress},
</if>
<if
test=
"lastDeliveryDate != null"
>
last_delivery_date = #{lastDeliveryDate},
</if>
<if
test=
"gasUserCheckStatus != null"
>
gas_user_check_status = #{gasUserCheckStatus},
</if>
<if
test=
"totalCheckNum != null"
>
total_check_num = #{totalCheckNum},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"isDel != null"
>
is_del = #{isDel},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
</trim>
where gas_user_id = #{gasUserId}
</update>
<delete
id=
"deleteTGasUserInfoById"
parameterType=
"Long"
>
delete from t_gas_user_info where gas_user_id = #{gasUserId}
</delete>
<delete
id=
"deleteTGasUserInfoByIds"
parameterType=
"String"
>
delete from t_gas_user_info where gas_user_id in
<foreach
item=
"gasUserId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{gasUserId}
</foreach>
</delete>
</mapper>
\ 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