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
f4231d1a
Commit
f4231d1a
authored
Oct 25, 2024
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 大屏端 地图显示 液化气用户 及气瓶信息接口开发 及联调。
parent
0f799cc3
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
879 additions
and
4 deletions
+879
-4
TDetectorUserController.java
...ong/web/controller/supervise/TDetectorUserController.java
+10
-0
UserLinkGasBottleIdDTO.java
.../com/zehong/system/domain/dto/UserLinkGasBottleIdDTO.java
+43
-0
UserLinkGasBottleTitleDTO.java
...m/zehong/system/domain/dto/UserLinkGasBottleTitleDTO.java
+56
-0
LpgGasBottleFilesBackToVo.java
...om/zehong/system/domain/vo/LpgGasBottleFilesBackToVo.java
+557
-0
TDetectorUserMapper.java
...in/java/com/zehong/system/mapper/TDetectorUserMapper.java
+15
-0
TLpgAirChargeFilesMapper.java
...va/com/zehong/system/mapper/TLpgAirChargeFilesMapper.java
+7
-0
TLpgDeliveryRecordMapper.java
...va/com/zehong/system/mapper/TLpgDeliveryRecordMapper.java
+7
-0
ITDetectorUserService.java
...java/com/zehong/system/service/ITDetectorUserService.java
+7
-0
TDetectorUserServiceImpl.java
.../zehong/system/service/impl/TDetectorUserServiceImpl.java
+131
-4
TDetectorUserMapper.xml
.../src/main/resources/mapper/system/TDetectorUserMapper.xml
+38
-0
TLpgAirChargeFilesMapper.xml
...main/resources/mapper/system/TLpgAirChargeFilesMapper.xml
+4
-0
TLpgDeliveryRecordMapper.xml
...main/resources/mapper/system/TLpgDeliveryRecordMapper.xml
+4
-0
No files found.
zh-baseversion-admin/src/main/java/com/zehong/web/controller/supervise/TDetectorUserController.java
View file @
f4231d1a
...
...
@@ -133,6 +133,16 @@ public class TDetectorUserController extends BaseController
}
/**
* 根据气瓶条码查询 气瓶详情和 气瓶追溯
* @param code r
* @return r
*/
@GetMapping
(
"/getLpgGasBottleFilesBackToByCode"
)
public
AjaxResult
getLpgGasBottleFilesBackToByCode
(
String
code
)
{
return
AjaxResult
.
success
(
tDetectorUserService
.
getLpgGasBottleFilesBackToByCode
(
code
));
}
/**
* 获取探测器用户列表 大屏地图 labelsLayer 标注的方式 分页查询 居民用户
* @param tDetectorUser t
...
...
zh-baseversion-system/src/main/java/com/zehong/system/domain/dto/UserLinkGasBottleIdDTO.java
0 → 100644
View file @
f4231d1a
package
com
.
zehong
.
system
.
domain
.
dto
;
public
class
UserLinkGasBottleIdDTO
{
/**
* 用户id
*/
private
Long
userId
;
/**
* 村庄id
*/
private
Long
villageId
;
/**
* 气瓶id
*/
private
Long
gasBottleFilesId
;
public
Long
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
Long
userId
)
{
this
.
userId
=
userId
;
}
public
Long
getVillageId
()
{
return
villageId
;
}
public
void
setVillageId
(
Long
villageId
)
{
this
.
villageId
=
villageId
;
}
public
Long
getGasBottleFilesId
()
{
return
gasBottleFilesId
;
}
public
void
setGasBottleFilesId
(
Long
gasBottleFilesId
)
{
this
.
gasBottleFilesId
=
gasBottleFilesId
;
}
}
zh-baseversion-system/src/main/java/com/zehong/system/domain/dto/UserLinkGasBottleTitleDTO.java
0 → 100644
View file @
f4231d1a
package
com
.
zehong
.
system
.
domain
.
dto
;
public
class
UserLinkGasBottleTitleDTO
{
/**
* 用户id
*/
private
Long
userId
;
/**
* 村庄id
*/
private
Long
villageId
;
/**
* 气瓶id
*/
private
Long
gasBottleFilesId
;
/**
* 气瓶条码
*/
private
String
rCode
;
public
Long
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
Long
userId
)
{
this
.
userId
=
userId
;
}
public
Long
getVillageId
()
{
return
villageId
;
}
public
void
setVillageId
(
Long
villageId
)
{
this
.
villageId
=
villageId
;
}
public
Long
getGasBottleFilesId
()
{
return
gasBottleFilesId
;
}
public
void
setGasBottleFilesId
(
Long
gasBottleFilesId
)
{
this
.
gasBottleFilesId
=
gasBottleFilesId
;
}
public
String
getrCode
()
{
return
rCode
;
}
public
void
setrCode
(
String
rCode
)
{
this
.
rCode
=
rCode
;
}
}
zh-baseversion-system/src/main/java/com/zehong/system/domain/vo/LpgGasBottleFilesBackToVo.java
0 → 100644
View file @
f4231d1a
package
com
.
zehong
.
system
.
domain
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
* 气瓶追溯详情
*/
public
class
LpgGasBottleFilesBackToVo
{
/**
* 燃气企业名称
*/
/** 燃气企业 */
private
String
enterpriseName
;
/** 生产(制造单位) */
private
String
makeInfo
;
/** 气瓶条码 */
private
String
qrcode
;
/** 登记证号 */
private
String
regCode
;
/** 产品编号 */
private
String
equNo
;
/** 设备类型 */
private
String
equType
;
/** 充装介质 */
private
String
medium
;
/** 生产日期 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
makeDate
;
/** 单位内编号 */
private
String
selfId
;
/** 压力 */
private
BigDecimal
pressure
;
/** 体积 */
private
BigDecimal
volume
;
/** 电子标签 */
private
String
appId
;
/** 使用单位 */
private
String
buildUser
;
/** 录入日期 */
private
Date
addTime
;
/** 录入人姓名 */
private
String
optName
;
/** 更新日期 */
private
Date
upTime
;
/** 状态1 新增、2 修改、-1、删除 (默认1) 3.注销 */
private
String
state
;
/** 修改人姓名 */
private
String
upOptName
;
/** 上检日期 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
pchkDate
;
/** 下检日期 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
nchkDate
;
/** 生产日期 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
productDate
;
/** 报废日期 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
discardDate
;
/** 安全评定日期 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
safeJudgeDate
;
/** 公称压力Mpa */
private
BigDecimal
gpressure
;
/** 水试验压力Mpa */
private
BigDecimal
wpressure
;
/** 标准重量KG */
private
BigDecimal
selfWeight
;
/** 壁厚mm */
private
BigDecimal
thickness
;
/** 气瓶许可证号 */
private
String
permitNo
;
/** 阀类型名称 */
private
String
valveName
;
/** 钢瓶交付文件照片 */
private
String
payImage
;
/** 检验质量证明书照片 */
private
String
batchImage
;
/** 制造监督检验证书照片 */
private
String
deviceImage
;
/** 检验报告照片 */
private
String
checkImage
;
/** 产品编号照片 2024-09-13 wh 去掉 界面上不展示了*/
private
String
equNoImage
;
/** 单位内编号照片 2024-09-13 wh 去掉 界面上不展示了*/
private
String
selfIdImage
;
/** 钢瓶信息照片 */
private
String
botImage
;
/** 钢瓶规格名称 */
private
String
botSpecName
;
/** 钢瓶型号 */
private
String
bottleType
;
/** 已检验次数 */
private
Long
inspectedTimes
;
/** 是否专用(1:专用 2:托管) */
//@Excel(name = "是否专用") 2024-09-13 wh 去掉,感觉监管不需要
private
String
isSpecialized
;
/** 阀厂家 */
private
String
valveManuFacturer
;
/** 检验标牌(有/无) */
private
String
inspectionLabel
;
/** 第三方标签 */
private
String
thirdPartyLabel
;
/** 孔洞码 */
private
String
holeCode
;
/** 存储类型(气相/液相) */
private
String
bottleStorageType
;
private
String
rowVersion
;
/**
* 燃气企业id
*/
private
String
enterpriseId
;
/**
* 追溯 详情
*/
private
List
<
Map
<
String
,
Object
>>
backToMessage
;
public
String
getEnterpriseName
()
{
return
enterpriseName
;
}
public
void
setEnterpriseName
(
String
enterpriseName
)
{
this
.
enterpriseName
=
enterpriseName
;
}
public
String
getMakeInfo
()
{
return
makeInfo
;
}
public
void
setMakeInfo
(
String
makeInfo
)
{
this
.
makeInfo
=
makeInfo
;
}
public
String
getQrcode
()
{
return
qrcode
;
}
public
void
setQrcode
(
String
qrcode
)
{
this
.
qrcode
=
qrcode
;
}
public
String
getRegCode
()
{
return
regCode
;
}
public
void
setRegCode
(
String
regCode
)
{
this
.
regCode
=
regCode
;
}
public
String
getEquNo
()
{
return
equNo
;
}
public
void
setEquNo
(
String
equNo
)
{
this
.
equNo
=
equNo
;
}
public
String
getEquType
()
{
return
equType
;
}
public
void
setEquType
(
String
equType
)
{
this
.
equType
=
equType
;
}
public
String
getMedium
()
{
return
medium
;
}
public
void
setMedium
(
String
medium
)
{
this
.
medium
=
medium
;
}
public
Date
getMakeDate
()
{
return
makeDate
;
}
public
void
setMakeDate
(
Date
makeDate
)
{
this
.
makeDate
=
makeDate
;
}
public
String
getSelfId
()
{
return
selfId
;
}
public
void
setSelfId
(
String
selfId
)
{
this
.
selfId
=
selfId
;
}
public
BigDecimal
getPressure
()
{
return
pressure
;
}
public
void
setPressure
(
BigDecimal
pressure
)
{
this
.
pressure
=
pressure
;
}
public
BigDecimal
getVolume
()
{
return
volume
;
}
public
void
setVolume
(
BigDecimal
volume
)
{
this
.
volume
=
volume
;
}
public
String
getAppId
()
{
return
appId
;
}
public
void
setAppId
(
String
appId
)
{
this
.
appId
=
appId
;
}
public
String
getBuildUser
()
{
return
buildUser
;
}
public
void
setBuildUser
(
String
buildUser
)
{
this
.
buildUser
=
buildUser
;
}
public
Date
getAddTime
()
{
return
addTime
;
}
public
void
setAddTime
(
Date
addTime
)
{
this
.
addTime
=
addTime
;
}
public
String
getOptName
()
{
return
optName
;
}
public
void
setOptName
(
String
optName
)
{
this
.
optName
=
optName
;
}
public
Date
getUpTime
()
{
return
upTime
;
}
public
void
setUpTime
(
Date
upTime
)
{
this
.
upTime
=
upTime
;
}
public
String
getState
()
{
return
state
;
}
public
void
setState
(
String
state
)
{
this
.
state
=
state
;
}
public
String
getUpOptName
()
{
return
upOptName
;
}
public
void
setUpOptName
(
String
upOptName
)
{
this
.
upOptName
=
upOptName
;
}
public
Date
getPchkDate
()
{
return
pchkDate
;
}
public
void
setPchkDate
(
Date
pchkDate
)
{
this
.
pchkDate
=
pchkDate
;
}
public
Date
getNchkDate
()
{
return
nchkDate
;
}
public
void
setNchkDate
(
Date
nchkDate
)
{
this
.
nchkDate
=
nchkDate
;
}
public
Date
getProductDate
()
{
return
productDate
;
}
public
void
setProductDate
(
Date
productDate
)
{
this
.
productDate
=
productDate
;
}
public
Date
getDiscardDate
()
{
return
discardDate
;
}
public
void
setDiscardDate
(
Date
discardDate
)
{
this
.
discardDate
=
discardDate
;
}
public
Date
getSafeJudgeDate
()
{
return
safeJudgeDate
;
}
public
void
setSafeJudgeDate
(
Date
safeJudgeDate
)
{
this
.
safeJudgeDate
=
safeJudgeDate
;
}
public
BigDecimal
getGpressure
()
{
return
gpressure
;
}
public
void
setGpressure
(
BigDecimal
gpressure
)
{
this
.
gpressure
=
gpressure
;
}
public
BigDecimal
getWpressure
()
{
return
wpressure
;
}
public
void
setWpressure
(
BigDecimal
wpressure
)
{
this
.
wpressure
=
wpressure
;
}
public
BigDecimal
getSelfWeight
()
{
return
selfWeight
;
}
public
void
setSelfWeight
(
BigDecimal
selfWeight
)
{
this
.
selfWeight
=
selfWeight
;
}
public
BigDecimal
getThickness
()
{
return
thickness
;
}
public
void
setThickness
(
BigDecimal
thickness
)
{
this
.
thickness
=
thickness
;
}
public
String
getPermitNo
()
{
return
permitNo
;
}
public
void
setPermitNo
(
String
permitNo
)
{
this
.
permitNo
=
permitNo
;
}
public
String
getValveName
()
{
return
valveName
;
}
public
void
setValveName
(
String
valveName
)
{
this
.
valveName
=
valveName
;
}
public
String
getPayImage
()
{
return
payImage
;
}
public
void
setPayImage
(
String
payImage
)
{
this
.
payImage
=
payImage
;
}
public
String
getBatchImage
()
{
return
batchImage
;
}
public
void
setBatchImage
(
String
batchImage
)
{
this
.
batchImage
=
batchImage
;
}
public
String
getDeviceImage
()
{
return
deviceImage
;
}
public
void
setDeviceImage
(
String
deviceImage
)
{
this
.
deviceImage
=
deviceImage
;
}
public
String
getCheckImage
()
{
return
checkImage
;
}
public
void
setCheckImage
(
String
checkImage
)
{
this
.
checkImage
=
checkImage
;
}
public
String
getEquNoImage
()
{
return
equNoImage
;
}
public
void
setEquNoImage
(
String
equNoImage
)
{
this
.
equNoImage
=
equNoImage
;
}
public
String
getSelfIdImage
()
{
return
selfIdImage
;
}
public
void
setSelfIdImage
(
String
selfIdImage
)
{
this
.
selfIdImage
=
selfIdImage
;
}
public
String
getBotImage
()
{
return
botImage
;
}
public
void
setBotImage
(
String
botImage
)
{
this
.
botImage
=
botImage
;
}
public
String
getBotSpecName
()
{
return
botSpecName
;
}
public
void
setBotSpecName
(
String
botSpecName
)
{
this
.
botSpecName
=
botSpecName
;
}
public
String
getBottleType
()
{
return
bottleType
;
}
public
void
setBottleType
(
String
bottleType
)
{
this
.
bottleType
=
bottleType
;
}
public
Long
getInspectedTimes
()
{
return
inspectedTimes
;
}
public
void
setInspectedTimes
(
Long
inspectedTimes
)
{
this
.
inspectedTimes
=
inspectedTimes
;
}
public
String
getIsSpecialized
()
{
return
isSpecialized
;
}
public
void
setIsSpecialized
(
String
isSpecialized
)
{
this
.
isSpecialized
=
isSpecialized
;
}
public
String
getValveManuFacturer
()
{
return
valveManuFacturer
;
}
public
void
setValveManuFacturer
(
String
valveManuFacturer
)
{
this
.
valveManuFacturer
=
valveManuFacturer
;
}
public
String
getInspectionLabel
()
{
return
inspectionLabel
;
}
public
void
setInspectionLabel
(
String
inspectionLabel
)
{
this
.
inspectionLabel
=
inspectionLabel
;
}
public
String
getThirdPartyLabel
()
{
return
thirdPartyLabel
;
}
public
void
setThirdPartyLabel
(
String
thirdPartyLabel
)
{
this
.
thirdPartyLabel
=
thirdPartyLabel
;
}
public
String
getHoleCode
()
{
return
holeCode
;
}
public
void
setHoleCode
(
String
holeCode
)
{
this
.
holeCode
=
holeCode
;
}
public
String
getBottleStorageType
()
{
return
bottleStorageType
;
}
public
void
setBottleStorageType
(
String
bottleStorageType
)
{
this
.
bottleStorageType
=
bottleStorageType
;
}
public
String
getRowVersion
()
{
return
rowVersion
;
}
public
void
setRowVersion
(
String
rowVersion
)
{
this
.
rowVersion
=
rowVersion
;
}
public
String
getEnterpriseId
()
{
return
enterpriseId
;
}
public
void
setEnterpriseId
(
String
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
public
List
<
Map
<
String
,
Object
>>
getBackToMessage
()
{
return
backToMessage
;
}
public
void
setBackToMessage
(
List
<
Map
<
String
,
Object
>>
backToMessage
)
{
this
.
backToMessage
=
backToMessage
;
}
}
zh-baseversion-system/src/main/java/com/zehong/system/mapper/TDetectorUserMapper.java
View file @
f4231d1a
...
...
@@ -5,6 +5,8 @@ import java.util.Map;
import
com.zehong.system.domain.TDetectorUser
;
import
com.zehong.system.domain.TDetectorUserCount
;
import
com.zehong.system.domain.dto.UserLinkGasBottleIdDTO
;
import
com.zehong.system.domain.dto.UserLinkGasBottleTitleDTO
;
import
com.zehong.system.domain.vo.TDetectorUserInspectVo
;
import
com.zehong.system.domain.vo.TDetectorUserVO
;
import
com.zehong.system.domain.vo.TDetectorUserVillageSafetyDeviceInfoVo
;
...
...
@@ -40,6 +42,19 @@ public interface TDetectorUserMapper
*/
List
<
TDetectorUserVillageSafetyDeviceInfoVo
>
queryDuserVilSafDevInfo
(
TDetectorUser
tDetectorUser
);
/**
* 根据村庄查询 用户 关联 气瓶数量
* @param villageIds v
* @return r
*/
List
<
UserLinkGasBottleIdDTO
>
queryUserIdLinkGasBottleIdByVillageIds
(
@Param
(
"villageIds"
)
List
<
Long
>
villageIds
);
/**
* 根据村庄查询 用户 关联 气瓶信息
* @param villageIds v
* @return r
*/
List
<
UserLinkGasBottleTitleDTO
>
queryUserIdLinkGasBottleTitleByVillageIds
(
@Param
(
"villageIds"
)
List
<
Long
>
villageIds
);
/**
* 查询燃气用户统计信息大屏界面 使用massMarks标注的方式
* @param tDetectorUser
...
...
zh-baseversion-system/src/main/java/com/zehong/system/mapper/TLpgAirChargeFilesMapper.java
View file @
f4231d1a
...
...
@@ -44,6 +44,13 @@ public interface TLpgAirChargeFilesMapper
*/
public
List
<
TLpgAirChargeFiles
>
queryALlByBarcodeAndGizId
(
@Param
(
"list"
)
List
<
TLpgAirChargeFiles
>
tLpgAirChargeFiles
);
/**
* 根据气瓶条码 查询 最近的两条充装记录
* @param barCode r
* @return r
*/
public
List
<
TLpgAirChargeFiles
>
queryAllByBarCodeLimit2
(
String
barCode
);
/**
* 新增液化石油气-充装记录
*
...
...
zh-baseversion-system/src/main/java/com/zehong/system/mapper/TLpgDeliveryRecordMapper.java
View file @
f4231d1a
...
...
@@ -29,6 +29,13 @@ public interface TLpgDeliveryRecordMapper
*/
public
List
<
TLpgDeliveryRecord
>
selectTLpgDeliveryRecordList
(
TLpgDeliveryRecord
tLpgDeliveryRecord
);
/**
* 根据气瓶条码查询配气记录
* @param bottleCode r
* @return r
*/
public
List
<
TLpgDeliveryRecord
>
queryAllByBottleCodeLimit2
(
String
bottleCode
);
/**
* 新增液化石油配送记录
*
...
...
zh-baseversion-system/src/main/java/com/zehong/system/service/ITDetectorUserService.java
View file @
f4231d1a
...
...
@@ -57,6 +57,13 @@ public interface ITDetectorUserService
*/
TableDataInfo
pageQueryLabelsLayerMarksDUser
(
TDetectorUser
tDetectorUser
);
/**
* 根据气瓶条码 查询 详情和追溯信息
* @param code r
* @return r
*/
LpgGasBottleFilesBackToVo
getLpgGasBottleFilesBackToByCode
(
String
code
);
/**
* 查询探测器用户列表
*
...
...
zh-baseversion-system/src/main/java/com/zehong/system/service/impl/TDetectorUserServiceImpl.java
View file @
f4231d1a
...
...
@@ -5,10 +5,7 @@ import java.sql.Connection;
import
java.sql.PreparedStatement
;
import
java.sql.SQLException
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
com.zehong.common.core.domain.model.LoginUser
;
...
...
@@ -18,6 +15,8 @@ import com.zehong.common.core.page.TableSupport;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.common.utils.SecurityUtils
;
import
com.zehong.system.domain.*
;
import
com.zehong.system.domain.dto.UserLinkGasBottleIdDTO
;
import
com.zehong.system.domain.dto.UserLinkGasBottleTitleDTO
;
import
com.zehong.system.domain.vo.*
;
import
com.zehong.system.mapper.*
;
import
org.apache.commons.lang.StringUtils
;
...
...
@@ -58,6 +57,25 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
@Resource
private
DataSource
dataSource
;
/**
* 气瓶档案
*/
@Resource
private
TLpgGasBottleFilesMapper
lpgGasBottleFilesMapper
;
/**
* 重装记录
*/
@Resource
private
TLpgAirChargeFilesMapper
lpgAirChargeFilesMapper
;
/**
* 配送记录
*/
@Resource
private
TLpgDeliveryRecordMapper
tLpgDeliveryRecordMapper
;
/**
* 查询探测器用户列表
*
...
...
@@ -165,6 +183,82 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
return
collect
;
}
/**
* 根据气瓶条码查询 气瓶详情和 气瓶追溯
* @param code r
* @return r
*/
@Override
public
LpgGasBottleFilesBackToVo
getLpgGasBottleFilesBackToByCode
(
String
code
)
{
LpgGasBottleFilesBackToVo
lpgGasBottleFilesBackToVo
=
new
LpgGasBottleFilesBackToVo
();
List
<
String
>
strings
=
Collections
.
singletonList
(
code
);
List
<
TLpgGasBottleFiles
>
lpgGasBottleFiles
=
lpgGasBottleFilesMapper
.
queryAllByFQRcodeList
(
strings
);
if
(
lpgGasBottleFiles
!=
null
&&
lpgGasBottleFiles
.
size
()
>
0
)
{
TLpgGasBottleFiles
tLpgGasBottleFiles
=
lpgGasBottleFiles
.
get
(
0
);
BeanUtils
.
copyProperties
(
tLpgGasBottleFiles
,
lpgGasBottleFilesBackToVo
);
}
//最后两次的充装记录
List
<
TLpgAirChargeFiles
>
lpgAirChargeFiles
=
lpgAirChargeFilesMapper
.
queryAllByBarCodeLimit2
(
code
);
//最后两次的配送记录
List
<
TLpgDeliveryRecord
>
lpgDeliveryRecords
=
tLpgDeliveryRecordMapper
.
queryAllByBottleCodeLimit2
(
code
);
List
<
Map
<
String
,
Object
>>
backToMessage
=
new
ArrayList
<>();
StringBuilder
sb
=
new
StringBuilder
();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
lpgAirChargeFiles
.
size
()
>
0
)
{
TLpgAirChargeFiles
tLpgAirChargeFiles
=
lpgAirChargeFiles
.
get
(
0
);
map
.
put
(
"time"
,
tLpgAirChargeFiles
.
getFillEndTime
());
map
.
put
(
"title"
,
"充装记录"
);
sb
.
append
(
"由充装单位为【"
).
append
(
tLpgAirChargeFiles
.
getStationName
()).
append
(
"】完成充装"
);
map
.
put
(
"message"
,
sb
.
toString
());
backToMessage
.
add
(
map
);
if
(
lpgAirChargeFiles
.
size
()
>
1
)
{
TLpgAirChargeFiles
tLpgAirChargeFiles1
=
lpgAirChargeFiles
.
get
(
1
);
map
=
new
HashMap
<>();
sb
=
new
StringBuilder
();
map
.
put
(
"time"
,
tLpgAirChargeFiles1
.
getFillEndTime
());
map
.
put
(
"title"
,
"充装记录"
);
sb
.
append
(
"由充装单位为【"
).
append
(
tLpgAirChargeFiles1
.
getStationName
()).
append
(
"】完成充装"
);
map
.
put
(
"message"
,
sb
.
toString
());
backToMessage
.
add
(
map
);
}
}
if
(
lpgDeliveryRecords
.
size
()
>
0
)
{
map
=
new
HashMap
<>();
sb
=
new
StringBuilder
();
TLpgDeliveryRecord
lpgDeliveryRecord
=
lpgDeliveryRecords
.
get
(
0
);
map
.
put
(
"time"
,
lpgDeliveryRecord
.
getDeliveryDate
());
map
.
put
(
"title"
,
"配送记录"
);
sb
.
append
(
"由配送人员【"
).
append
(
lpgDeliveryRecord
.
getDeliveryPerson
()).
append
(
"】完成配送"
);
map
.
put
(
"message"
,
sb
.
toString
());
backToMessage
.
add
(
map
);
if
(
lpgDeliveryRecords
.
size
()
>
1
)
{
map
=
new
HashMap
<>();
sb
=
new
StringBuilder
();
TLpgDeliveryRecord
lpgDeliveryRecord1
=
lpgDeliveryRecords
.
get
(
1
);
map
.
put
(
"time"
,
lpgDeliveryRecord1
.
getDeliveryDate
());
map
.
put
(
"title"
,
"配送记录"
);
sb
.
append
(
"由配送人员【"
).
append
(
lpgDeliveryRecord1
.
getDeliveryPerson
()).
append
(
"】完成配送"
);
map
.
put
(
"message"
,
sb
.
toString
());
backToMessage
.
add
(
map
);
}
}
lpgGasBottleFilesBackToVo
.
setBackToMessage
(
backToMessage
);
return
lpgGasBottleFilesBackToVo
;
}
/**
* 获取探测器用户列表 大屏地图 labelsLayer 标注的方式 分页查询 居民用户
...
...
@@ -398,6 +492,11 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
//按照 村id 分组
Map
<
Long
,
List
<
TDetectorUserVillageSafetyDeviceInfoVo
>>
collect1
=
collect
.
stream
().
collect
(
Collectors
.
groupingBy
(
TDetectorUserVillageSafetyDeviceInfoVo:
:
getVillageId
));
// 查询气瓶信息
List
<
Long
>
collect5
=
collect
.
stream
().
map
(
TDetectorUserVillageSafetyDeviceInfoVo:
:
getVillageId
).
collect
(
Collectors
.
toList
());
List
<
UserLinkGasBottleTitleDTO
>
userLinkGasBottleTitleDTOS
=
tDetectorUserMapper
.
queryUserIdLinkGasBottleTitleByVillageIds
(
collect5
);
Map
<
Long
,
List
<
UserLinkGasBottleTitleDTO
>>
collect6
=
userLinkGasBottleTitleDTOS
.
stream
().
collect
(
Collectors
.
groupingBy
(
UserLinkGasBottleTitleDTO:
:
getUserId
));
for
(
Map
.
Entry
<
Long
,
List
<
TDetectorUserVillageSafetyDeviceInfoVo
>>
longListEntry
:
collect1
.
entrySet
())
{
List
<
TDetectorUserVillageSafetyDeviceInfoVo
>
villageList
=
longListEntry
.
getValue
();
...
...
@@ -413,6 +512,7 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
for
(
Map
.
Entry
<
Long
,
List
<
TDetectorUserVillageSafetyDeviceInfoVo
>>
listEntry
:
collect2
.
entrySet
())
{
List
<
Map
<
String
,
Object
>>
safetyDeviceMapList
=
new
ArrayList
<>();
List
<
String
>
gasBottleTitleList
=
new
ArrayList
<>();
List
<
TDetectorUserVillageSafetyDeviceInfoVo
>
userList
=
listEntry
.
getValue
();
Long
key
=
listEntry
.
getKey
();
...
...
@@ -458,6 +558,22 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
}
}
}
// 封装 气瓶条码,只是气瓶条码,然后点击条码再查询详细数据
userMapListItme
.
put
(
"gasBottleTitleList"
,
gasBottleTitleList
);
List
<
UserLinkGasBottleTitleDTO
>
userLinkGasBottleTitleDTOS1
=
collect6
.
get
(
key
);
if
(
userLinkGasBottleTitleDTOS1
!=
null
&&
userLinkGasBottleTitleDTOS1
.
size
()
>
0
)
{
List
<
String
>
collect7
=
userLinkGasBottleTitleDTOS1
.
stream
().
map
(
UserLinkGasBottleTitleDTO:
:
getrCode
).
collect
(
Collectors
.
toList
());
List
<
Map
<
String
,
Object
>>
gasBottleTitleMapList
=
new
ArrayList
<>();
if
(
collect7
.
size
()
>
0
)
{
for
(
String
s
:
collect7
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"code"
,
s
);
gasBottleTitleMapList
.
add
(
map
);
}
}
userMapListItme
.
put
(
"gasBottleTitleList"
,
gasBottleTitleMapList
);
}
userMapList
.
add
(
userMapListItme
);
}
}
...
...
@@ -486,6 +602,11 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
//按照 村id 分组
Map
<
Long
,
List
<
TDetectorUserVillageSafetyDeviceInfoVo
>>
collect1
=
collect5
.
stream
().
collect
(
Collectors
.
groupingBy
(
TDetectorUserVillageSafetyDeviceInfoVo:
:
getVillageId
));
// 统计气瓶数量
List
<
Long
>
collect6
=
collect5
.
stream
().
map
(
TDetectorUserVillageSafetyDeviceInfoVo:
:
getVillageId
).
collect
(
Collectors
.
toList
());
List
<
UserLinkGasBottleIdDTO
>
userLinkGasBottleIdDTOS
=
tDetectorUserMapper
.
queryUserIdLinkGasBottleIdByVillageIds
(
collect6
);
Map
<
Long
,
List
<
UserLinkGasBottleIdDTO
>>
collect7
=
userLinkGasBottleIdDTOS
.
stream
().
collect
(
Collectors
.
groupingBy
(
UserLinkGasBottleIdDTO:
:
getVillageId
));
for
(
Map
.
Entry
<
Long
,
List
<
TDetectorUserVillageSafetyDeviceInfoVo
>>
longListEntry
:
collect1
.
entrySet
())
{
List
<
TDetectorUserVillageSafetyDeviceInfoVo
>
villageList
=
longListEntry
.
getValue
();
Long
key1
=
longListEntry
.
getKey
();
...
...
@@ -527,6 +648,12 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
villageMapListItem
.
put
(
"userNum"
,
userNum
);
villageMapListItem
.
put
(
"deviceNum"
,
deviceNum
);
villageMapListItem
.
put
(
"userMapList"
,
userMapList
);
List
<
UserLinkGasBottleIdDTO
>
userLinkGasBottleIdDTOS1
=
collect7
.
get
(
key1
);
if
(
userLinkGasBottleIdDTOS1
!=
null
&&
userLinkGasBottleIdDTOS1
.
size
()
>
0
)
{
villageMapListItem
.
put
(
"gasBottle"
,
userLinkGasBottleIdDTOS1
.
size
());
}
else
{
villageMapListItem
.
put
(
"gasBottle"
,
0
);
}
villageMapList
.
add
(
villageMapListItem
);
}
}
...
...
zh-baseversion-system/src/main/resources/mapper/system/TDetectorUserMapper.xml
View file @
f4231d1a
...
...
@@ -300,6 +300,44 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
) t2 on t2.userId = t1.userId
</select>
<select
id=
"queryUserIdLinkGasBottleIdByVillageIds"
resultType=
"com.zehong.system.domain.dto.UserLinkGasBottleIdDTO"
>
SELECT
duser.user_id as userId,
duser.f_village_id as villageId,
userlinkgas.f_gas_bottle_files_id as gasBottleFilesId
FROM
t_detector_user duser
LEFT JOIN t_detector_user_link_gas_bottle userlinkgas
on duser.user_id = userlinkgas.f_user_id
WHERE
duser.user_type = 1
AND duser.f_village_id IS NOT NULL
and duser.f_village_id in
<foreach
collection=
"villageIds"
close=
")"
separator=
","
open=
"("
item=
"item"
index=
"i"
>
#{item}
</foreach>
</select>
<select
id=
"queryUserIdLinkGasBottleTitleByVillageIds"
resultType=
"com.zehong.system.domain.dto.UserLinkGasBottleTitleDTO"
>
SELECT
duser.user_id as userId,
duser.f_village_id as villageId,
userlinkgas.f_gas_bottle_files_id as gasBottleFilesId,
gasBottleFiles.f_q_rcode as rcode
FROM
t_detector_user duser
LEFT JOIN t_detector_user_link_gas_bottle userlinkgas
on duser.user_id = userlinkgas.f_user_id
LEFT JOIN t_lpg_gas_bottle_files gasBottleFiles
on userlinkgas.f_gas_bottle_files_id = gasBottleFiles.f_gas_bottle_files_id
WHERE
duser.user_type = 1
AND duser.f_village_id IS NOT NULL
and duser.f_village_id in
<foreach
collection=
"villageIds"
close=
")"
separator=
","
open=
"("
item=
"item"
index=
"i"
>
#{item}
</foreach>
</select>
<select
id=
"queryDuserVilSafDevInfo"
resultType=
"TDetectorUserVillageSafetyDeviceInfoVo"
parameterType=
"TDetectorUser"
>
SELECT
dUser.user_id as userId,
...
...
zh-baseversion-system/src/main/resources/mapper/system/TLpgAirChargeFilesMapper.xml
View file @
f4231d1a
...
...
@@ -53,6 +53,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
(#{item.barCode}, #{item.gzId})
</foreach>
</select>
<select
id=
"queryAllByBarCodeLimit2"
resultMap=
"TLpgAirChargeFilesResult"
>
<include
refid=
"selectTLpgAirChargeFilesVo"
></include>
where f_bar_code = #{barCode} order by f_fill_end_time desc limit 2
</select>
<select
id=
"selectTLpgAirChargeFilesById"
parameterType=
"Long"
resultMap=
"TLpgAirChargeFilesResult"
>
<include
refid=
"selectTLpgAirChargeFilesVo"
/>
where f_gas_air_charge_id = #{gasAirChargeId}
...
...
zh-baseversion-system/src/main/resources/mapper/system/TLpgDeliveryRecordMapper.xml
View file @
f4231d1a
...
...
@@ -56,6 +56,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"bottleCode != null and bottleCode != ''"
>
and bottle.f_bottle_code like concat('%', #{bottleCode}, '%')
</if>
</where>
</select>
<select
id=
"queryAllByBottleCodeLimit2"
resultMap=
"TLpgDeliveryRecordResult"
>
<include
refid=
"selectTLpgDeliveryRecordVo"
></include>
where delivery.f_bottle_code = #{bottleCode}
</select>
<select
id=
"selectTLpgDeliveryRecordById"
parameterType=
"Long"
resultMap=
"TLpgDeliveryRecordResult"
>
<include
refid=
"selectTLpgDeliveryRecordVo"
/>
...
...
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