Commit d06cb8f3 authored by 耿迪迪's avatar 耿迪迪
parents e4b33e08 91487f9c
...@@ -73,6 +73,19 @@ ...@@ -73,6 +73,19 @@
<build> <build>
<finalName>gassafetyprogress-${project.version}</finalName> <finalName>gassafetyprogress-${project.version}</finalName>
<plugins> <plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.1.3.RELEASE</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId> <artifactId>maven-jar-plugin</artifactId>
...@@ -179,4 +192,4 @@ ...@@ -179,4 +192,4 @@
</build> </build>
</project> </project>
\ No newline at end of file
...@@ -19,7 +19,7 @@ import com.zehong.common.core.page.TableDataInfo; ...@@ -19,7 +19,7 @@ import com.zehong.common.core.page.TableDataInfo;
/** /**
* 燃气车辆信息Controller * 燃气车辆信息Controller
* *
* @author zehong * @author zehong
* @date 2022-03-17 * @date 2022-03-17
*/ */
...@@ -33,6 +33,9 @@ public class TVehicleInfoController extends BaseController ...@@ -33,6 +33,9 @@ public class TVehicleInfoController extends BaseController
@Autowired @Autowired
private ITVehicleLocationInfoService itVehicleLocationInfoService; private ITVehicleLocationInfoService itVehicleLocationInfoService;
@Autowired
private ITVehicleLocationInfoService tVehicleLocationInfoService;
/** /**
* 查询燃气车辆信息列表 * 查询燃气车辆信息列表
*/ */
...@@ -80,6 +83,8 @@ public class TVehicleInfoController extends BaseController ...@@ -80,6 +83,8 @@ public class TVehicleInfoController extends BaseController
return util.exportExcel(list, "燃气车辆信息数据"); return util.exportExcel(list, "燃气车辆信息数据");
} }
/** /**
* 获取燃气车辆信息详细信息 * 获取燃气车辆信息详细信息
*/ */
......
package com.zehong.web.controller.standingBook; package com.zehong.web.controller.standingBook;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.zehong.system.domain.Statistics;
import com.zehong.system.domain.form.THiddenDangerStandingBookForm; import com.zehong.system.domain.form.THiddenDangerStandingBookForm;
import com.zehong.web.controller.tool.TimeConfig;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -24,7 +27,7 @@ import com.zehong.common.core.page.TableDataInfo; ...@@ -24,7 +27,7 @@ import com.zehong.common.core.page.TableDataInfo;
/** /**
* 隐患整治台账Controller * 隐患整治台账Controller
* *
* @author zehong * @author zehong
* @date 2022-02-09 * @date 2022-02-09
*/ */
...@@ -47,6 +50,44 @@ public class THiddenDangerStandingBookController extends BaseController ...@@ -47,6 +50,44 @@ public class THiddenDangerStandingBookController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
/**
* 获取隐患整治台账统计信息
*/
@GetMapping("/hazardStatistics")
public AjaxResult hazardStatistics()
{
//生成近7天数据
List<String> sevenDate = TimeConfig.getSevenDate();
List<Statistics> list=new ArrayList<>();
//查询统计日期和数量
List<Statistics> statistics = tHiddenDangerStandingBookService.hazardStatistics(TimeConfig.getSevenDate());
if (statistics.size()==0){
for (int n=0;n<7;n++){
Statistics statisticsn=new Statistics();
statisticsn.setCount(0);
statisticsn.setDate(sevenDate.get(n));
list.add(statisticsn);
}
}
for (int s=0;s<statistics.size();s++){
for (int i=0;i<sevenDate.size();i++){
Statistics statistics1=new Statistics();
if (statistics.get(s).getDate().equals(sevenDate.get(i))){
statistics1.setCount(statistics.get(s).getCount());
statistics1.setDate(sevenDate.get(i));
list.add(statistics1);
}else {
statistics1.setCount(0);
statistics1.setDate(sevenDate.get(i));
list.add(statistics1);
}
}
}
return AjaxResult.success(list);
}
/** /**
* 导出隐患整治台账列表 * 导出隐患整治台账列表
*/ */
......
package com.zehong.web.controller.standingBook; package com.zehong.web.controller.standingBook;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.zehong.system.domain.Statistics;
import com.zehong.system.domain.form.TTroubleStandingBookForm; import com.zehong.system.domain.form.TTroubleStandingBookForm;
import com.zehong.web.controller.tool.TimeConfig;
import com.zehong.web.timeconfig.TimeConFig;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -24,7 +28,7 @@ import com.zehong.common.core.page.TableDataInfo; ...@@ -24,7 +28,7 @@ import com.zehong.common.core.page.TableDataInfo;
/** /**
* 事故台账Controller * 事故台账Controller
* *
* @author zehong * @author zehong
* @date 2022-02-09 * @date 2022-02-09
*/ */
...@@ -47,6 +51,43 @@ public class TTroubleStandingBookController extends BaseController ...@@ -47,6 +51,43 @@ public class TTroubleStandingBookController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
/**
* 获取事故台账统计
*/
@GetMapping("/accidentLedger")
public AjaxResult accidentLedger()
{
List<Statistics> list=new ArrayList<>();
//查询统计日期和数量
List<Statistics> statistics = tTroubleStandingBookService.accidentLedger(TimeConfig.getSevenDate());
//生成近7天数据
List<String> sevenDate = TimeConfig.getSevenDate();
if (statistics.size()==0){
for (int n=0;n<7;n++){
Statistics statisticsn=new Statistics();
statisticsn.setCount(0);
statisticsn.setDate(sevenDate.get(n));
list.add(statisticsn);
}
}
for (int s=0;s<statistics.size();s++){
for (int i=0;i<sevenDate.size();i++){
Statistics statistics1=new Statistics();
if (statistics.get(s).getDate().equals(sevenDate.get(i))){
statistics1.setCount(statistics.get(s).getCount());
statistics1.setDate(sevenDate.get(i));
list.add(statistics1);
}else {
statistics1.setCount(0);
statistics1.setDate(sevenDate.get(i));
list.add(statistics1);
}
}
}
return AjaxResult.success(list);
}
/** /**
* 导出事故台账列表 * 导出事故台账列表
*/ */
......
...@@ -37,14 +37,14 @@ public class PipeInterfaceController extends BaseController { ...@@ -37,14 +37,14 @@ public class PipeInterfaceController extends BaseController {
//循环根据权属单位名称分组的数据 //循环根据权属单位名称分组的数据
for (int i=0;i<pipeDatesGroup.size();i++){ for (int i=0;i<pipeDatesGroup.size();i++){
//循环全部数据 //循环全部数据
for (int n=0;n<pipeDates.size();n++){ // for (int n=0;n<pipeDates.size();n++){
//判断如果名称一样就一组 // //判断如果名称一样就一组
if (pipeDatesGroup.get(i).getPowerCompany().equals(pipeDates.get(n).getPowerCompany())){ // if (pipeDatesGroup.get(i).getPowerCompany().equals(pipeDates.get(n).getPowerCompany())){
// //设置分组类型 //// //设置分组类型
// pipeDates.get(n).setCompanyType(Integer.parseInt(pipeDates.get(n).getPipeId())); //// pipeDates.get(n).setCompanyType(Integer.parseInt(pipeDates.get(n).getPipeId()));
pipeDates.get(n).setIconType(1); // pipeDates.get(n).setIconType(1);
} // }
} // }
k++; k++;
} }
PipeList pipeList=new PipeList(); PipeList pipeList=new PipeList();
......
...@@ -51,6 +51,17 @@ public class TDetectorUserController extends BaseController ...@@ -51,6 +51,17 @@ public class TDetectorUserController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
/**
* 获取燃气用户统计信息
*/
@GetMapping("/userStatistics")
public AjaxResult userStatistics()
{
return AjaxResult.success(tDetectorUserService.userStatistics());
}
/** /**
* 获取探测器用户列表 * 获取探测器用户列表
* @return * @return
......
...@@ -49,6 +49,16 @@ public class TEnterpriseInfoController extends BaseController ...@@ -49,6 +49,16 @@ public class TEnterpriseInfoController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
/**
* 查询企业类型
* @return
*/
// @RequestMapping("/getEnterpriseType")
// public TableDataInfo getEnterpriseType(){
// List<TEnterpriseInfo> enterpriseType = tEnterpriseInfoService.getEnterpriseType();
// return getDataTable(enterpriseType);
// }
/** /**
*查询所有企业信息 *查询所有企业信息
* @param tEnterpriseInfo * @param tEnterpriseInfo
......
package com.zehong.web.controller.system; package com.zehong.web.controller.system;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import com.zehong.framework.systemsetting.SystemSetting; import com.zehong.framework.systemsetting.SystemSetting;
import com.zehong.framework.web.domain.server.Sys;
import com.zehong.system.service.ISysPostService; import com.zehong.system.service.ISysPostService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -24,7 +26,7 @@ import com.zehong.system.service.ISysMenuService; ...@@ -24,7 +26,7 @@ import com.zehong.system.service.ISysMenuService;
/** /**
* 登录验证 * 登录验证
* *
* @author zehong * @author zehong
*/ */
@RestController @RestController
...@@ -50,7 +52,7 @@ public class SysLoginController ...@@ -50,7 +52,7 @@ public class SysLoginController
/** /**
* 登录方法 * 登录方法
* *
* @param loginBody 登录信息 * @param loginBody 登录信息
* @return 结果 * @return 结果
*/ */
...@@ -67,7 +69,7 @@ public class SysLoginController ...@@ -67,7 +69,7 @@ public class SysLoginController
/** /**
* 获取用户信息 * 获取用户信息
* *
* @return 用户信息 * @return 用户信息
*/ */
@GetMapping("getInfo") @GetMapping("getInfo")
...@@ -79,18 +81,21 @@ public class SysLoginController ...@@ -79,18 +81,21 @@ public class SysLoginController
Set<String> roles = permissionService.getRolePermission(user); Set<String> roles = permissionService.getRolePermission(user);
// 权限集合 // 权限集合
Set<String> permissions = permissionService.getMenuPermission(user); Set<String> permissions = permissionService.getMenuPermission(user);
HashMap hashMap=new HashMap();
hashMap.put("map_center","[118.168541,39.838353]");
hashMap.put("prod_test","prod");
AjaxResult ajax = AjaxResult.success(); AjaxResult ajax = AjaxResult.success();
ajax.put("user", user); ajax.put("user", user);
ajax.put("roles", roles); ajax.put("roles", roles);
ajax.put("permissions", permissions); ajax.put("permissions", permissions);
ajax.put("systemSetting",systemSetting.getSystemWebSetting()); ajax.put("systemSetting",hashMap);
ajax.put("posts",iSysPostService.getPostListByUserId(user.getUserId())); ajax.put("posts",iSysPostService.getPostListByUserId(user.getUserId()));
return ajax; return ajax;
} }
/** /**
* 获取路由信息 * 获取路由信息
* *
* @return 路由信息 * @return 路由信息
*/ */
@GetMapping("getRouters") @GetMapping("getRouters")
......
package com.zehong.web.controller.system;
import java.util.List;
import com.zehong.system.domain.TVehicleLocationInfo;
import com.zehong.system.service.ITVehicleLocationInfoService;
import io.jsonwebtoken.lang.Collections;
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.TVehicleInfo;
import com.zehong.system.service.ITVehicleInfoService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 燃气车辆信息Controller
*
* @author zehong
* @date 2023-08-16
*/
@RestController
@RequestMapping("/system/infos")
public class TVehicleInfosController extends BaseController
{
@Autowired
private ITVehicleInfoService tVehicleInfoService;
@Autowired
private ITVehicleLocationInfoService itVehicleLocationInfoService;
/**
* 查询燃气车辆信息列表
*/
@PreAuthorize("@ss.hasPermi('system:info:list')")
@GetMapping("/list")
public TableDataInfo list(TVehicleInfo tVehicleInfo)
{
startPage();
List<TVehicleInfo> list = tVehicleInfoService.selectTVehicleInfoList(tVehicleInfo);
for (int i=0;i<list.size();i++){
//获取最后位置信息
TVehicleLocationInfo tVehicleLocationInfo = new TVehicleLocationInfo();
tVehicleLocationInfo.setCarNum(list.get(i).getCarNum());
tVehicleLocationInfo.setLast(true);
List<TVehicleLocationInfo> tVehicleLocationInfoList=itVehicleLocationInfoService.selectTVehicleLocationInfoList(tVehicleLocationInfo);
//车辆最后位置
if(!Collections.isEmpty(tVehicleLocationInfoList) && tVehicleLocationInfoList.size() > 0){
list.get(i).setLongitude(tVehicleLocationInfoList.get(0).getLongitude());
list.get(i).setLatitude(tVehicleLocationInfoList.get(0).getLatitude());
}
}
return getDataTable(list);
}
/**
* 导出燃气车辆信息列表
*/
@PreAuthorize("@ss.hasPermi('system:info:export')")
@Log(title = "燃气车辆信息", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TVehicleInfo tVehicleInfo)
{
List<TVehicleInfo> list = tVehicleInfoService.selectTVehicleInfoList(tVehicleInfo);
ExcelUtil<TVehicleInfo> util = new ExcelUtil<TVehicleInfo>(TVehicleInfo.class);
return util.exportExcel(list, "燃气车辆信息数据");
}
/**
* 获取燃气车辆信息详细信息
*/
@PreAuthorize("@ss.hasPermi('system:info:query')")
@GetMapping(value = "/{vehicleId}")
public AjaxResult getInfo(@PathVariable("vehicleId") Long vehicleId)
{
return AjaxResult.success(tVehicleInfoService.selectTVehicleInfoById(vehicleId));
}
/**
* 新增燃气车辆信息
*/
@PreAuthorize("@ss.hasPermi('system:info:add')")
@Log(title = "燃气车辆信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TVehicleInfo tVehicleInfo)
{
return toAjax(tVehicleInfoService.insertTVehicleInfo(tVehicleInfo));
}
/**
* 修改燃气车辆信息
*/
@PreAuthorize("@ss.hasPermi('system:info:edit')")
@Log(title = "燃气车辆信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TVehicleInfo tVehicleInfo)
{
return toAjax(tVehicleInfoService.updateTVehicleInfo(tVehicleInfo));
}
/**
* 删除燃气车辆信息
*/
@PreAuthorize("@ss.hasPermi('system:info:remove')")
@Log(title = "燃气车辆信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{vehicleIds}")
public AjaxResult remove(@PathVariable Long[] vehicleIds)
{
return toAjax(tVehicleInfoService.deleteTVehicleInfoByIds(vehicleIds));
}
}
package com.zehong.web.controller.tool;
import com.zehong.common.utils.DateUtils;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* 时间工具类
*/
public class TimeConfig {
//获取近七天日期
public static List<String> getSevenDate() {
List<String> dateList = new ArrayList<>();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for (int i = 0; i < 7; i++) {
Date date = DateUtils.addDays(new Date(), -i);
String formatDate = sdf.format(date);
dateList.add(formatDate);
}
return dateList;
}
}
package com.zehong.system.domain;
import lombok.Data;
import lombok.ToString;
/**
* 统计封装类
*/
@Data
@ToString
public class Statistics {
private int count;
private String date;
}
package com.zehong.system.domain;
import lombok.Data;
import lombok.ToString;
/**
* 用户信息统计封装类
*/
@Data
@ToString
public class TDetectorUserCount {
/**
* 用户总数
*/
private int totalNumberUsers;
/**
* 居民用户
*/
private int residentUsers;
/**
* 商业用户
*/
private int businessUser;
/**
* 工业用户
*/
private int industrialUsers;
}
...@@ -9,9 +9,9 @@ import java.math.BigDecimal; ...@@ -9,9 +9,9 @@ import java.math.BigDecimal;
/** /**
* 燃气车辆信息对象 t_vehicle_info * 燃气车辆信息对象 t_vehicle_info
* *
* @author zehong * @author zehong
* @date 2022-03-17 * @date 2023-08-16
*/ */
public class TVehicleInfo extends BaseEntity public class TVehicleInfo extends BaseEntity
{ {
...@@ -50,7 +50,7 @@ public class TVehicleInfo extends BaseEntity ...@@ -50,7 +50,7 @@ public class TVehicleInfo extends BaseEntity
/** 所属企业 */ /** 所属企业 */
@Excel(name = "所属企业") @Excel(name = "所属企业")
private String beyondEnterpriseId; private int beyondEnterpriseId;
/** 责任人 */ /** 责任人 */
@Excel(name = "责任人") @Excel(name = "责任人")
...@@ -69,15 +69,37 @@ public class TVehicleInfo extends BaseEntity ...@@ -69,15 +69,37 @@ public class TVehicleInfo extends BaseEntity
private String remarks; private String remarks;
/** /**
* 经度 * 储配站名称
*/ */
private String siteStationName;
private BigDecimal longitude; private BigDecimal longitude;
/**
* 纬度
*/
private BigDecimal latitude; private BigDecimal latitude;
private String beyondEnterpriseName;
public String getSiteStationName() {
return siteStationName;
}
public void setSiteStationName(String siteStationName) {
this.siteStationName = siteStationName;
}
public String getBeyondEnterpriseName() {
return beyondEnterpriseName;
}
public void setBeyondEnterpriseName(String beyondEnterpriseName) {
this.beyondEnterpriseName = beyondEnterpriseName;
}
public static long getSerialVersionUID() {
return serialVersionUID;
}
public BigDecimal getLongitude() { public BigDecimal getLongitude() {
return longitude; return longitude;
...@@ -100,115 +122,115 @@ public class TVehicleInfo extends BaseEntity ...@@ -100,115 +122,115 @@ public class TVehicleInfo extends BaseEntity
this.vehicleId = vehicleId; this.vehicleId = vehicleId;
} }
public Long getVehicleId() public Long getVehicleId()
{ {
return vehicleId; return vehicleId;
} }
public void setCarNum(String carNum) public void setCarNum(String carNum)
{ {
this.carNum = carNum; this.carNum = carNum;
} }
public String getCarNum() public String getCarNum()
{ {
return carNum; return carNum;
} }
public void setBrandModel(String brandModel) public void setBrandModel(String brandModel)
{ {
this.brandModel = brandModel; this.brandModel = brandModel;
} }
public String getBrandModel() public String getBrandModel()
{ {
return brandModel; return brandModel;
} }
public void setVehicleType(String vehicleType) public void setVehicleType(String vehicleType)
{ {
this.vehicleType = vehicleType; this.vehicleType = vehicleType;
} }
public String getVehicleType() public String getVehicleType()
{ {
return vehicleType; return vehicleType;
} }
public void setVehicleLoad(String vehicleLoad) public void setVehicleLoad(String vehicleLoad)
{ {
this.vehicleLoad = vehicleLoad; this.vehicleLoad = vehicleLoad;
} }
public String getVehicleLoad() public String getVehicleLoad()
{ {
return vehicleLoad; return vehicleLoad;
} }
public void setVehicleSize(String vehicleSize) public void setVehicleSize(String vehicleSize)
{ {
this.vehicleSize = vehicleSize; this.vehicleSize = vehicleSize;
} }
public String getVehicleSize() public String getVehicleSize()
{ {
return vehicleSize; return vehicleSize;
} }
public void setVehicleLimt(String vehicleLimt) public void setVehicleLimt(String vehicleLimt)
{ {
this.vehicleLimt = vehicleLimt; this.vehicleLimt = vehicleLimt;
} }
public String getVehicleLimt() public String getVehicleLimt()
{ {
return vehicleLimt; return vehicleLimt;
} }
public void setVehicleInspect(String vehicleInspect) public void setVehicleInspect(String vehicleInspect)
{ {
this.vehicleInspect = vehicleInspect; this.vehicleInspect = vehicleInspect;
} }
public String getVehicleInspect() public String getVehicleInspect()
{ {
return vehicleInspect; return vehicleInspect;
} }
public void setBeyondEnterpriseId(String beyondEnterpriseId)
{
this.beyondEnterpriseId = beyondEnterpriseId;
}
public String getBeyondEnterpriseId() public int getBeyondEnterpriseId() {
{
return beyondEnterpriseId; return beyondEnterpriseId;
} }
public void setPersonLiable(String personLiable)
public void setBeyondEnterpriseId(int beyondEnterpriseId) {
this.beyondEnterpriseId = beyondEnterpriseId;
}
public void setPersonLiable(String personLiable)
{ {
this.personLiable = personLiable; this.personLiable = personLiable;
} }
public String getPersonLiable() public String getPersonLiable()
{ {
return personLiable; return personLiable;
} }
public void setPhone(String phone) public void setPhone(String phone)
{ {
this.phone = phone; this.phone = phone;
} }
public String getPhone() public String getPhone()
{ {
return phone; return phone;
} }
public void setIsDel(String isDel) public void setIsDel(String isDel)
{ {
this.isDel = isDel; this.isDel = isDel;
} }
public String getIsDel() public String getIsDel()
{ {
return isDel; return isDel;
} }
public void setRemarks(String remarks) public void setRemarks(String remarks)
{ {
this.remarks = remarks; this.remarks = remarks;
} }
public String getRemarks() public String getRemarks()
{ {
return remarks; return remarks;
} }
......
...@@ -6,6 +6,16 @@ public class TenterpriseInfoData { ...@@ -6,6 +6,16 @@ public class TenterpriseInfoData {
private String enterpriseName; private String enterpriseName;
private String enterpriseType;
public String getEnterpriseType() {
return enterpriseType;
}
public void setEnterpriseType(String enterpriseType) {
this.enterpriseType = enterpriseType;
}
public String getEnterpriseId() { public String getEnterpriseId() {
return enterpriseId; return enterpriseId;
} }
......
...@@ -5,19 +5,20 @@ import java.util.Map; ...@@ -5,19 +5,20 @@ import java.util.Map;
import com.zehong.system.domain.TDetectorInfo; import com.zehong.system.domain.TDetectorInfo;
import com.zehong.system.domain.TDetectorUser; import com.zehong.system.domain.TDetectorUser;
import com.zehong.system.domain.TDetectorUserCount;
import com.zehong.system.domain.vo.TDetectorUserVO; import com.zehong.system.domain.vo.TDetectorUserVO;
/** /**
* 燃气用户Mapper接口 * 燃气用户Mapper接口
* *
* @author zehong * @author zehong
* @date 2022-02-07 * @date 2022-02-07
*/ */
public interface TDetectorUserMapper public interface TDetectorUserMapper
{ {
/** /**
* 查询燃气用户 * 查询燃气用户
* *
* @param userId 燃气用户ID * @param userId 燃气用户ID
* @return 燃气用户 * @return 燃气用户
*/ */
...@@ -47,7 +48,7 @@ public interface TDetectorUserMapper ...@@ -47,7 +48,7 @@ public interface TDetectorUserMapper
/** /**
* 查询燃气用户列表 * 查询燃气用户列表
* *
* @param tDetectorUser 燃气用户 * @param tDetectorUser 燃气用户
* @return 燃气用户集合 * @return 燃气用户集合
*/ */
...@@ -55,7 +56,7 @@ public interface TDetectorUserMapper ...@@ -55,7 +56,7 @@ public interface TDetectorUserMapper
/** /**
* 新增燃气用户 * 新增燃气用户
* *
* @param tDetectorUser 燃气用户 * @param tDetectorUser 燃气用户
* @return 结果 * @return 结果
*/ */
...@@ -63,7 +64,7 @@ public interface TDetectorUserMapper ...@@ -63,7 +64,7 @@ public interface TDetectorUserMapper
/** /**
* 修改燃气用户 * 修改燃气用户
* *
* @param tDetectorUser 燃气用户 * @param tDetectorUser 燃气用户
* @return 结果 * @return 结果
*/ */
...@@ -71,7 +72,7 @@ public interface TDetectorUserMapper ...@@ -71,7 +72,7 @@ public interface TDetectorUserMapper
/** /**
* 删除燃气用户 * 删除燃气用户
* *
* @param userId 燃气用户ID * @param userId 燃气用户ID
* @return 结果 * @return 结果
*/ */
...@@ -79,7 +80,7 @@ public interface TDetectorUserMapper ...@@ -79,7 +80,7 @@ public interface TDetectorUserMapper
/** /**
* 批量删除燃气用户 * 批量删除燃气用户
* *
* @param userIds 需要删除的数据ID * @param userIds 需要删除的数据ID
* @return 结果 * @return 结果
*/ */
...@@ -90,4 +91,10 @@ public interface TDetectorUserMapper ...@@ -90,4 +91,10 @@ public interface TDetectorUserMapper
* @return * @return
*/ */
public Map<String,Object> selectUserNum(); public Map<String,Object> selectUserNum();
/**
* 查询用户统计信息
* @return
*/
TDetectorUserCount userStatistics();
} }
package com.zehong.system.mapper; package com.zehong.system.mapper;
import java.util.List; import java.util.List;
import com.zehong.system.domain.Statistics;
import com.zehong.system.domain.THiddenDangerStandingBook; import com.zehong.system.domain.THiddenDangerStandingBook;
import com.zehong.system.domain.form.THiddenDangerStandingBookForm; import com.zehong.system.domain.form.THiddenDangerStandingBookForm;
import com.zehong.system.domain.vo.THiddenDangerStandingBookVo; import com.zehong.system.domain.vo.THiddenDangerStandingBookVo;
/** /**
* 隐患整治台账Mapper接口 * 隐患整治台账Mapper接口
* *
* @author zehong * @author zehong
* @date 2022-02-09 * @date 2022-02-09
*/ */
public interface THiddenDangerStandingBookMapper public interface THiddenDangerStandingBookMapper
{ {
/** /**
* 查询隐患整治台账 * 查询隐患整治台账
* *
* @param hiddenId 隐患整治台账ID * @param hiddenId 隐患整治台账ID
* @return 隐患整治台账 * @return 隐患整治台账
*/ */
...@@ -23,7 +25,7 @@ public interface THiddenDangerStandingBookMapper ...@@ -23,7 +25,7 @@ public interface THiddenDangerStandingBookMapper
/** /**
* 查询隐患整治台账列表 * 查询隐患整治台账列表
* *
* @param tHiddenDangerStandingBook 隐患整治台账 * @param tHiddenDangerStandingBook 隐患整治台账
* @return 隐患整治台账集合 * @return 隐患整治台账集合
*/ */
...@@ -38,7 +40,7 @@ public interface THiddenDangerStandingBookMapper ...@@ -38,7 +40,7 @@ public interface THiddenDangerStandingBookMapper
/** /**
* 新增隐患整治台账 * 新增隐患整治台账
* *
* @param tHiddenDangerStandingBook 隐患整治台账 * @param tHiddenDangerStandingBook 隐患整治台账
* @return 结果 * @return 结果
*/ */
...@@ -46,7 +48,7 @@ public interface THiddenDangerStandingBookMapper ...@@ -46,7 +48,7 @@ public interface THiddenDangerStandingBookMapper
/** /**
* 修改隐患整治台账 * 修改隐患整治台账
* *
* @param tHiddenDangerStandingBook 隐患整治台账 * @param tHiddenDangerStandingBook 隐患整治台账
* @return 结果 * @return 结果
*/ */
...@@ -54,7 +56,7 @@ public interface THiddenDangerStandingBookMapper ...@@ -54,7 +56,7 @@ public interface THiddenDangerStandingBookMapper
/** /**
* 删除隐患整治台账 * 删除隐患整治台账
* *
* @param hiddenId 隐患整治台账ID * @param hiddenId 隐患整治台账ID
* @return 结果 * @return 结果
*/ */
...@@ -62,9 +64,16 @@ public interface THiddenDangerStandingBookMapper ...@@ -62,9 +64,16 @@ public interface THiddenDangerStandingBookMapper
/** /**
* 批量删除隐患整治台账 * 批量删除隐患整治台账
* *
* @param hiddenIds 需要删除的数据ID * @param hiddenIds 需要删除的数据ID
* @return 结果 * @return 结果
*/ */
public int deleteTHiddenDangerStandingBookByIds(Long[] hiddenIds); public int deleteTHiddenDangerStandingBookByIds(Long[] hiddenIds);
/**
* 获取隐患整治台账统计信息
* @param sevenDate
* @return
*/
List<Statistics> hazardStatistics(List<String> sevenDate);
} }
package com.zehong.system.mapper; package com.zehong.system.mapper;
import java.util.List; import java.util.List;
import com.zehong.system.domain.Statistics;
import com.zehong.system.domain.TTroubleStandingBook; import com.zehong.system.domain.TTroubleStandingBook;
import com.zehong.system.domain.form.TTroubleStandingBookForm; import com.zehong.system.domain.form.TTroubleStandingBookForm;
import com.zehong.system.domain.vo.TTroubleStandingBookVo; import com.zehong.system.domain.vo.TTroubleStandingBookVo;
/** /**
* 事故台账Mapper接口 * 事故台账Mapper接口
* *
* @author zehong * @author zehong
* @date 2022-02-09 * @date 2022-02-09
*/ */
public interface TTroubleStandingBookMapper public interface TTroubleStandingBookMapper
{ {
/** /**
* 查询事故台账 * 查询事故台账
* *
* @param troubleId 事故台账ID * @param troubleId 事故台账ID
* @return 事故台账 * @return 事故台账
*/ */
...@@ -23,7 +25,7 @@ public interface TTroubleStandingBookMapper ...@@ -23,7 +25,7 @@ public interface TTroubleStandingBookMapper
/** /**
* 查询事故台账列表 * 查询事故台账列表
* *
* @param tTroubleStandingBook 事故台账 * @param tTroubleStandingBook 事故台账
* @return 事故台账集合 * @return 事故台账集合
*/ */
...@@ -38,7 +40,7 @@ public interface TTroubleStandingBookMapper ...@@ -38,7 +40,7 @@ public interface TTroubleStandingBookMapper
/** /**
* 新增事故台账 * 新增事故台账
* *
* @param tTroubleStandingBook 事故台账 * @param tTroubleStandingBook 事故台账
* @return 结果 * @return 结果
*/ */
...@@ -46,7 +48,7 @@ public interface TTroubleStandingBookMapper ...@@ -46,7 +48,7 @@ public interface TTroubleStandingBookMapper
/** /**
* 修改事故台账 * 修改事故台账
* *
* @param tTroubleStandingBook 事故台账 * @param tTroubleStandingBook 事故台账
* @return 结果 * @return 结果
*/ */
...@@ -54,7 +56,7 @@ public interface TTroubleStandingBookMapper ...@@ -54,7 +56,7 @@ public interface TTroubleStandingBookMapper
/** /**
* 删除事故台账 * 删除事故台账
* *
* @param troubleId 事故台账ID * @param troubleId 事故台账ID
* @return 结果 * @return 结果
*/ */
...@@ -62,9 +64,16 @@ public interface TTroubleStandingBookMapper ...@@ -62,9 +64,16 @@ public interface TTroubleStandingBookMapper
/** /**
* 批量删除事故台账 * 批量删除事故台账
* *
* @param troubleIds 需要删除的数据ID * @param troubleIds 需要删除的数据ID
* @return 结果 * @return 结果
*/ */
public int deleteTTroubleStandingBookByIds(Long[] troubleIds); public int deleteTTroubleStandingBookByIds(Long[] troubleIds);
/**
* 查询统计信息
* @param sevenDate
* @return
*/
List<Statistics> accidentLedger(List<String> sevenDate);
} }
...@@ -4,15 +4,16 @@ import java.util.List; ...@@ -4,15 +4,16 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import com.zehong.system.domain.TDetectorUser; import com.zehong.system.domain.TDetectorUser;
import com.zehong.system.domain.TDetectorUserCount;
import com.zehong.system.domain.vo.TDetectorUserVO; import com.zehong.system.domain.vo.TDetectorUserVO;
/** /**
* 燃气用户Service接口 * 燃气用户Service接口
* *
* @author zehong * @author zehong
* @date 2022-02-07 * @date 2022-02-07
*/ */
public interface ITDetectorUserService public interface ITDetectorUserService
{ {
/** /**
...@@ -47,7 +48,7 @@ public interface ITDetectorUserService ...@@ -47,7 +48,7 @@ public interface ITDetectorUserService
/** /**
* 查询燃气用户 * 查询燃气用户
* *
* @param userId 燃气用户ID * @param userId 燃气用户ID
* @return 燃气用户 * @return 燃气用户
*/ */
...@@ -55,7 +56,7 @@ public interface ITDetectorUserService ...@@ -55,7 +56,7 @@ public interface ITDetectorUserService
/** /**
* 查询燃气用户列表 * 查询燃气用户列表
* *
* @param tDetectorUser 燃气用户 * @param tDetectorUser 燃气用户
* @return 燃气用户集合 * @return 燃气用户集合
*/ */
...@@ -63,7 +64,7 @@ public interface ITDetectorUserService ...@@ -63,7 +64,7 @@ public interface ITDetectorUserService
/** /**
* 新增燃气用户 * 新增燃气用户
* *
* @param tDetectorUser 燃气用户 * @param tDetectorUser 燃气用户
* @return 结果 * @return 结果
*/ */
...@@ -71,7 +72,7 @@ public interface ITDetectorUserService ...@@ -71,7 +72,7 @@ public interface ITDetectorUserService
/** /**
* 修改燃气用户 * 修改燃气用户
* *
* @param tDetectorUser 燃气用户 * @param tDetectorUser 燃气用户
* @return 结果 * @return 结果
*/ */
...@@ -79,7 +80,7 @@ public interface ITDetectorUserService ...@@ -79,7 +80,7 @@ public interface ITDetectorUserService
/** /**
* 批量删除燃气用户 * 批量删除燃气用户
* *
* @param userIds 需要删除的燃气用户ID * @param userIds 需要删除的燃气用户ID
* @return 结果 * @return 结果
*/ */
...@@ -87,7 +88,7 @@ public interface ITDetectorUserService ...@@ -87,7 +88,7 @@ public interface ITDetectorUserService
/** /**
* 删除燃气用户信息 * 删除燃气用户信息
* *
* @param userId 燃气用户ID * @param userId 燃气用户ID
* @return 结果 * @return 结果
*/ */
...@@ -98,4 +99,11 @@ public interface ITDetectorUserService ...@@ -98,4 +99,11 @@ public interface ITDetectorUserService
* @return * @return
*/ */
public Map<String,Object> selectUserNum(); public Map<String,Object> selectUserNum();
/**
* 查询用户统计信息
* @return
*/
TDetectorUserCount userStatistics();
} }
...@@ -6,15 +6,15 @@ import com.zehong.system.domain.vo.TEnterpriseInfoVO; ...@@ -6,15 +6,15 @@ import com.zehong.system.domain.vo.TEnterpriseInfoVO;
/** /**
* 企业信息Service接口 * 企业信息Service接口
* *
* @author zehong * @author zehong
* @date 2022-01-24 * @date 2022-01-24
*/ */
public interface ITEnterpriseInfoService public interface ITEnterpriseInfoService
{ {
/** /**
* 查询企业信息 * 查询企业信息
* *
* @param enterpriseId 企业信息ID * @param enterpriseId 企业信息ID
* @return 企业信息 * @return 企业信息
*/ */
...@@ -24,7 +24,7 @@ public interface ITEnterpriseInfoService ...@@ -24,7 +24,7 @@ public interface ITEnterpriseInfoService
/** /**
* 查询企业信息列表 * 查询企业信息列表
* *
* @param tEnterpriseInfo 企业信息 * @param tEnterpriseInfo 企业信息
* @return 企业信息集合 * @return 企业信息集合
*/ */
...@@ -32,7 +32,7 @@ public interface ITEnterpriseInfoService ...@@ -32,7 +32,7 @@ public interface ITEnterpriseInfoService
/** /**
* 新增企业信息 * 新增企业信息
* *
* @param tEnterpriseInfo 企业信息 * @param tEnterpriseInfo 企业信息
* @return 结果 * @return 结果
*/ */
...@@ -40,7 +40,7 @@ public interface ITEnterpriseInfoService ...@@ -40,7 +40,7 @@ public interface ITEnterpriseInfoService
/** /**
* 修改企业信息 * 修改企业信息
* *
* @param tEnterpriseInfo 企业信息 * @param tEnterpriseInfo 企业信息
* @return 结果 * @return 结果
*/ */
...@@ -48,7 +48,7 @@ public interface ITEnterpriseInfoService ...@@ -48,7 +48,7 @@ public interface ITEnterpriseInfoService
/** /**
* 批量删除企业信息 * 批量删除企业信息
* *
* @param enterpriseIds 需要删除的企业信息ID * @param enterpriseIds 需要删除的企业信息ID
* @return 结果 * @return 结果
*/ */
...@@ -56,9 +56,11 @@ public interface ITEnterpriseInfoService ...@@ -56,9 +56,11 @@ public interface ITEnterpriseInfoService
/** /**
* 删除企业信息信息 * 删除企业信息信息
* *
* @param enterpriseId 企业信息ID * @param enterpriseId 企业信息ID
* @return 结果 * @return 结果
*/ */
public int deleteTEnterpriseInfoById(Long enterpriseId); public int deleteTEnterpriseInfoById(Long enterpriseId);
} }
package com.zehong.system.service; package com.zehong.system.service;
import java.util.List; import java.util.List;
import com.zehong.system.domain.Statistics;
import com.zehong.system.domain.THiddenDangerStandingBook; import com.zehong.system.domain.THiddenDangerStandingBook;
import com.zehong.system.domain.form.THiddenDangerStandingBookForm; import com.zehong.system.domain.form.THiddenDangerStandingBookForm;
import com.zehong.system.domain.vo.THiddenDangerStandingBookVo; import com.zehong.system.domain.vo.THiddenDangerStandingBookVo;
/** /**
* 隐患整治台账Service接口 * 隐患整治台账Service接口
* *
* @author zehong * @author zehong
* @date 2022-02-09 * @date 2022-02-09
*/ */
public interface ITHiddenDangerStandingBookService public interface ITHiddenDangerStandingBookService
{ {
/** /**
* 查询隐患整治台账 * 查询隐患整治台账
* *
* @param hiddenId 隐患整治台账ID * @param hiddenId 隐患整治台账ID
* @return 隐患整治台账 * @return 隐患整治台账
*/ */
...@@ -23,7 +25,7 @@ public interface ITHiddenDangerStandingBookService ...@@ -23,7 +25,7 @@ public interface ITHiddenDangerStandingBookService
/** /**
* 查询隐患整治台账列表 * 查询隐患整治台账列表
* *
* @param tHiddenDangerStandingBook 隐患整治台账 * @param tHiddenDangerStandingBook 隐患整治台账
* @return 隐患整治台账集合 * @return 隐患整治台账集合
*/ */
...@@ -38,7 +40,7 @@ public interface ITHiddenDangerStandingBookService ...@@ -38,7 +40,7 @@ public interface ITHiddenDangerStandingBookService
/** /**
* 新增隐患整治台账 * 新增隐患整治台账
* *
* @param tHiddenDangerStandingBook 隐患整治台账 * @param tHiddenDangerStandingBook 隐患整治台账
* @return 结果 * @return 结果
*/ */
...@@ -46,7 +48,7 @@ public interface ITHiddenDangerStandingBookService ...@@ -46,7 +48,7 @@ public interface ITHiddenDangerStandingBookService
/** /**
* 修改隐患整治台账 * 修改隐患整治台账
* *
* @param tHiddenDangerStandingBook 隐患整治台账 * @param tHiddenDangerStandingBook 隐患整治台账
* @return 结果 * @return 结果
*/ */
...@@ -54,7 +56,7 @@ public interface ITHiddenDangerStandingBookService ...@@ -54,7 +56,7 @@ public interface ITHiddenDangerStandingBookService
/** /**
* 批量删除隐患整治台账 * 批量删除隐患整治台账
* *
* @param hiddenIds 需要删除的隐患整治台账ID * @param hiddenIds 需要删除的隐患整治台账ID
* @return 结果 * @return 结果
*/ */
...@@ -62,9 +64,15 @@ public interface ITHiddenDangerStandingBookService ...@@ -62,9 +64,15 @@ public interface ITHiddenDangerStandingBookService
/** /**
* 删除隐患整治台账信息 * 删除隐患整治台账信息
* *
* @param hiddenId 隐患整治台账ID * @param hiddenId 隐患整治台账ID
* @return 结果 * @return 结果
*/ */
public int deleteTHiddenDangerStandingBookById(Long hiddenId); public int deleteTHiddenDangerStandingBookById(Long hiddenId);
/**
* 获取隐患整治台账统计信息
* @param sevenDate
*/
List<Statistics> hazardStatistics(List<String> sevenDate);
} }
package com.zehong.system.service; package com.zehong.system.service;
import java.util.List; import java.util.List;
import com.zehong.system.domain.Statistics;
import com.zehong.system.domain.TTroubleStandingBook; import com.zehong.system.domain.TTroubleStandingBook;
import com.zehong.system.domain.form.TTroubleStandingBookForm; import com.zehong.system.domain.form.TTroubleStandingBookForm;
import com.zehong.system.domain.vo.TTroubleStandingBookVo; import com.zehong.system.domain.vo.TTroubleStandingBookVo;
/** /**
* 事故台账Service接口 * 事故台账Service接口
* *
* @author zehong * @author zehong
* @date 2022-02-09 * @date 2022-02-09
*/ */
public interface ITTroubleStandingBookService public interface ITTroubleStandingBookService
{ {
/** /**
* 查询事故台账 * 查询事故台账
* *
* @param troubleId 事故台账ID * @param troubleId 事故台账ID
* @return 事故台账 * @return 事故台账
*/ */
...@@ -23,7 +25,7 @@ public interface ITTroubleStandingBookService ...@@ -23,7 +25,7 @@ public interface ITTroubleStandingBookService
/** /**
* 查询事故台账列表 * 查询事故台账列表
* *
* @param tTroubleStandingBook 事故台账 * @param tTroubleStandingBook 事故台账
* @return 事故台账集合 * @return 事故台账集合
*/ */
...@@ -38,7 +40,7 @@ public interface ITTroubleStandingBookService ...@@ -38,7 +40,7 @@ public interface ITTroubleStandingBookService
/** /**
* 新增事故台账 * 新增事故台账
* *
* @param tTroubleStandingBook 事故台账 * @param tTroubleStandingBook 事故台账
* @return 结果 * @return 结果
*/ */
...@@ -46,7 +48,7 @@ public interface ITTroubleStandingBookService ...@@ -46,7 +48,7 @@ public interface ITTroubleStandingBookService
/** /**
* 修改事故台账 * 修改事故台账
* *
* @param tTroubleStandingBook 事故台账 * @param tTroubleStandingBook 事故台账
* @return 结果 * @return 结果
*/ */
...@@ -54,7 +56,7 @@ public interface ITTroubleStandingBookService ...@@ -54,7 +56,7 @@ public interface ITTroubleStandingBookService
/** /**
* 批量删除事故台账 * 批量删除事故台账
* *
* @param troubleIds 需要删除的事故台账ID * @param troubleIds 需要删除的事故台账ID
* @return 结果 * @return 结果
*/ */
...@@ -62,9 +64,19 @@ public interface ITTroubleStandingBookService ...@@ -62,9 +64,19 @@ public interface ITTroubleStandingBookService
/** /**
* 删除事故台账信息 * 删除事故台账信息
* *
* @param troubleId 事故台账ID * @param troubleId 事故台账ID
* @return 结果 * @return 结果
*/ */
public int deleteTTroubleStandingBookById(Long troubleId); public int deleteTTroubleStandingBookById(Long troubleId);
/**
* 查询统计信息
* @return
*/
List<Statistics> accidentLedger(List<String> sevenDate);
} }
...@@ -5,6 +5,7 @@ import java.util.List; ...@@ -5,6 +5,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import com.zehong.common.utils.DateUtils; import com.zehong.common.utils.DateUtils;
import com.zehong.system.domain.TDetectorUserCount;
import com.zehong.system.domain.vo.TDetectorUserVO; import com.zehong.system.domain.vo.TDetectorUserVO;
import com.zehong.system.mapper.TDetectorInfoMapper; import com.zehong.system.mapper.TDetectorInfoMapper;
import com.zehong.system.mapper.TDeviceInfoMapper; import com.zehong.system.mapper.TDeviceInfoMapper;
...@@ -18,12 +19,12 @@ import com.zehong.system.service.ITDetectorUserService; ...@@ -18,12 +19,12 @@ import com.zehong.system.service.ITDetectorUserService;
/** /**
* 燃气用户Service业务层处理 * 燃气用户Service业务层处理
* *
* @author zehong * @author zehong
* @date 2022-02-07 * @date 2022-02-07
*/ */
@Service @Service
public class TDetectorUserServiceImpl implements ITDetectorUserService public class TDetectorUserServiceImpl implements ITDetectorUserService
{ {
@Autowired @Autowired
private TDetectorUserMapper tDetectorUserMapper; private TDetectorUserMapper tDetectorUserMapper;
...@@ -143,7 +144,7 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService ...@@ -143,7 +144,7 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
/** /**
* 查询燃气用户 * 查询燃气用户
* *
* @param userId 燃气用户ID * @param userId 燃气用户ID
* @return 燃气用户 * @return 燃气用户
*/ */
...@@ -155,7 +156,7 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService ...@@ -155,7 +156,7 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
/** /**
* 查询燃气用户列表 * 查询燃气用户列表
* *
* @param tDetectorUser 燃气用户 * @param tDetectorUser 燃气用户
* @return 燃气用户 * @return 燃气用户
*/ */
...@@ -167,7 +168,7 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService ...@@ -167,7 +168,7 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
/** /**
* 新增燃气用户 * 新增燃气用户
* *
* @param tDetectorUser 燃气用户 * @param tDetectorUser 燃气用户
* @return 结果 * @return 结果
*/ */
...@@ -179,7 +180,7 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService ...@@ -179,7 +180,7 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
/** /**
* 修改燃气用户 * 修改燃气用户
* *
* @param tDetectorUser 燃气用户 * @param tDetectorUser 燃气用户
* @return 结果 * @return 结果
*/ */
...@@ -192,7 +193,7 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService ...@@ -192,7 +193,7 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
/** /**
* 批量删除燃气用户 * 批量删除燃气用户
* *
* @param userIds 需要删除的燃气用户ID * @param userIds 需要删除的燃气用户ID
* @return 结果 * @return 结果
*/ */
...@@ -204,7 +205,7 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService ...@@ -204,7 +205,7 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
/** /**
* 删除燃气用户信息 * 删除燃气用户信息
* *
* @param userId 燃气用户ID * @param userId 燃气用户ID
* @return 结果 * @return 结果
*/ */
...@@ -221,4 +222,13 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService ...@@ -221,4 +222,13 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
public Map<String,Object> selectUserNum(){ public Map<String,Object> selectUserNum(){
return tDetectorUserMapper.selectUserNum(); return tDetectorUserMapper.selectUserNum();
} }
/**
* 查询用户统计信息
* @return
*/
@Override
public TDetectorUserCount userStatistics() {
return tDetectorUserMapper.userStatistics();
}
} }
...@@ -2,6 +2,7 @@ package com.zehong.system.service.impl; ...@@ -2,6 +2,7 @@ package com.zehong.system.service.impl;
import java.util.List; import java.util.List;
import com.zehong.common.utils.DateUtils; import com.zehong.common.utils.DateUtils;
import com.zehong.system.domain.Statistics;
import com.zehong.system.domain.form.THiddenDangerStandingBookForm; import com.zehong.system.domain.form.THiddenDangerStandingBookForm;
import com.zehong.system.domain.vo.THiddenDangerStandingBookVo; import com.zehong.system.domain.vo.THiddenDangerStandingBookVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -12,19 +13,19 @@ import com.zehong.system.service.ITHiddenDangerStandingBookService; ...@@ -12,19 +13,19 @@ import com.zehong.system.service.ITHiddenDangerStandingBookService;
/** /**
* 隐患整治台账Service业务层处理 * 隐患整治台账Service业务层处理
* *
* @author zehong * @author zehong
* @date 2022-02-09 * @date 2022-02-09
*/ */
@Service @Service
public class THiddenDangerStandingBookServiceImpl implements ITHiddenDangerStandingBookService public class THiddenDangerStandingBookServiceImpl implements ITHiddenDangerStandingBookService
{ {
@Autowired @Autowired
private THiddenDangerStandingBookMapper tHiddenDangerStandingBookMapper; private THiddenDangerStandingBookMapper tHiddenDangerStandingBookMapper;
/** /**
* 查询隐患整治台账 * 查询隐患整治台账
* *
* @param hiddenId 隐患整治台账ID * @param hiddenId 隐患整治台账ID
* @return 隐患整治台账 * @return 隐患整治台账
*/ */
...@@ -36,7 +37,7 @@ public class THiddenDangerStandingBookServiceImpl implements ITHiddenDangerStand ...@@ -36,7 +37,7 @@ public class THiddenDangerStandingBookServiceImpl implements ITHiddenDangerStand
/** /**
* 查询隐患整治台账列表 * 查询隐患整治台账列表
* *
* @param tHiddenDangerStandingBook 隐患整治台账 * @param tHiddenDangerStandingBook 隐患整治台账
* @return 隐患整治台账 * @return 隐患整治台账
*/ */
...@@ -58,7 +59,7 @@ public class THiddenDangerStandingBookServiceImpl implements ITHiddenDangerStand ...@@ -58,7 +59,7 @@ public class THiddenDangerStandingBookServiceImpl implements ITHiddenDangerStand
/** /**
* 新增隐患整治台账 * 新增隐患整治台账
* *
* @param tHiddenDangerStandingBook 隐患整治台账 * @param tHiddenDangerStandingBook 隐患整治台账
* @return 结果 * @return 结果
*/ */
...@@ -71,7 +72,7 @@ public class THiddenDangerStandingBookServiceImpl implements ITHiddenDangerStand ...@@ -71,7 +72,7 @@ public class THiddenDangerStandingBookServiceImpl implements ITHiddenDangerStand
/** /**
* 修改隐患整治台账 * 修改隐患整治台账
* *
* @param tHiddenDangerStandingBook 隐患整治台账 * @param tHiddenDangerStandingBook 隐患整治台账
* @return 结果 * @return 结果
*/ */
...@@ -84,7 +85,7 @@ public class THiddenDangerStandingBookServiceImpl implements ITHiddenDangerStand ...@@ -84,7 +85,7 @@ public class THiddenDangerStandingBookServiceImpl implements ITHiddenDangerStand
/** /**
* 批量删除隐患整治台账 * 批量删除隐患整治台账
* *
* @param hiddenIds 需要删除的隐患整治台账ID * @param hiddenIds 需要删除的隐患整治台账ID
* @return 结果 * @return 结果
*/ */
...@@ -96,7 +97,7 @@ public class THiddenDangerStandingBookServiceImpl implements ITHiddenDangerStand ...@@ -96,7 +97,7 @@ public class THiddenDangerStandingBookServiceImpl implements ITHiddenDangerStand
/** /**
* 删除隐患整治台账信息 * 删除隐患整治台账信息
* *
* @param hiddenId 隐患整治台账ID * @param hiddenId 隐患整治台账ID
* @return 结果 * @return 结果
*/ */
...@@ -105,4 +106,14 @@ public class THiddenDangerStandingBookServiceImpl implements ITHiddenDangerStand ...@@ -105,4 +106,14 @@ public class THiddenDangerStandingBookServiceImpl implements ITHiddenDangerStand
{ {
return tHiddenDangerStandingBookMapper.deleteTHiddenDangerStandingBookById(hiddenId); return tHiddenDangerStandingBookMapper.deleteTHiddenDangerStandingBookById(hiddenId);
} }
/**
* 获取隐患整治台账统计信息
* @param sevenDate
* @return
*/
@Override
public List<Statistics> hazardStatistics(List<String> sevenDate) {
return tHiddenDangerStandingBookMapper.hazardStatistics(sevenDate);
}
} }
...@@ -2,6 +2,7 @@ package com.zehong.system.service.impl; ...@@ -2,6 +2,7 @@ package com.zehong.system.service.impl;
import java.util.List; import java.util.List;
import com.zehong.common.utils.DateUtils; import com.zehong.common.utils.DateUtils;
import com.zehong.system.domain.Statistics;
import com.zehong.system.domain.form.TTroubleStandingBookForm; import com.zehong.system.domain.form.TTroubleStandingBookForm;
import com.zehong.system.domain.vo.TTroubleStandingBookVo; import com.zehong.system.domain.vo.TTroubleStandingBookVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -12,19 +13,19 @@ import com.zehong.system.service.ITTroubleStandingBookService; ...@@ -12,19 +13,19 @@ import com.zehong.system.service.ITTroubleStandingBookService;
/** /**
* 事故台账Service业务层处理 * 事故台账Service业务层处理
* *
* @author zehong * @author zehong
* @date 2022-02-09 * @date 2022-02-09
*/ */
@Service @Service
public class TTroubleStandingBookServiceImpl implements ITTroubleStandingBookService public class TTroubleStandingBookServiceImpl implements ITTroubleStandingBookService
{ {
@Autowired @Autowired
private TTroubleStandingBookMapper tTroubleStandingBookMapper; private TTroubleStandingBookMapper tTroubleStandingBookMapper;
/** /**
* 查询事故台账 * 查询事故台账
* *
* @param troubleId 事故台账ID * @param troubleId 事故台账ID
* @return 事故台账 * @return 事故台账
*/ */
...@@ -36,7 +37,7 @@ public class TTroubleStandingBookServiceImpl implements ITTroubleStandingBookSer ...@@ -36,7 +37,7 @@ public class TTroubleStandingBookServiceImpl implements ITTroubleStandingBookSer
/** /**
* 查询事故台账列表 * 查询事故台账列表
* *
* @param tTroubleStandingBook 事故台账 * @param tTroubleStandingBook 事故台账
* @return 事故台账 * @return 事故台账
*/ */
...@@ -59,7 +60,7 @@ public class TTroubleStandingBookServiceImpl implements ITTroubleStandingBookSer ...@@ -59,7 +60,7 @@ public class TTroubleStandingBookServiceImpl implements ITTroubleStandingBookSer
/** /**
* 新增事故台账 * 新增事故台账
* *
* @param tTroubleStandingBook 事故台账 * @param tTroubleStandingBook 事故台账
* @return 结果 * @return 结果
*/ */
...@@ -72,7 +73,7 @@ public class TTroubleStandingBookServiceImpl implements ITTroubleStandingBookSer ...@@ -72,7 +73,7 @@ public class TTroubleStandingBookServiceImpl implements ITTroubleStandingBookSer
/** /**
* 修改事故台账 * 修改事故台账
* *
* @param tTroubleStandingBook 事故台账 * @param tTroubleStandingBook 事故台账
* @return 结果 * @return 结果
*/ */
...@@ -90,7 +91,7 @@ public class TTroubleStandingBookServiceImpl implements ITTroubleStandingBookSer ...@@ -90,7 +91,7 @@ public class TTroubleStandingBookServiceImpl implements ITTroubleStandingBookSer
/** /**
* 批量删除事故台账 * 批量删除事故台账
* *
* @param troubleIds 需要删除的事故台账ID * @param troubleIds 需要删除的事故台账ID
* @return 结果 * @return 结果
*/ */
...@@ -102,7 +103,7 @@ public class TTroubleStandingBookServiceImpl implements ITTroubleStandingBookSer ...@@ -102,7 +103,7 @@ public class TTroubleStandingBookServiceImpl implements ITTroubleStandingBookSer
/** /**
* 删除事故台账信息 * 删除事故台账信息
* *
* @param troubleId 事故台账ID * @param troubleId 事故台账ID
* @return 结果 * @return 结果
*/ */
...@@ -111,4 +112,17 @@ public class TTroubleStandingBookServiceImpl implements ITTroubleStandingBookSer ...@@ -111,4 +112,17 @@ public class TTroubleStandingBookServiceImpl implements ITTroubleStandingBookSer
{ {
return tTroubleStandingBookMapper.deleteTTroubleStandingBookById(troubleId); return tTroubleStandingBookMapper.deleteTTroubleStandingBookById(troubleId);
} }
/**
* 查询统计信息
* @param sevenDate
* @return
*/
@Override
public List<Statistics> accidentLedger(List<String> sevenDate) {
return tTroubleStandingBookMapper.accidentLedger(sevenDate);
}
} }
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<!--管道--> <!--管道-->
<resultMap type="PipeDate" id="PipeDateResult"> <resultMap type="PipeDate" id="PipeDateResult">
<result property="pipeId" column="pipe_id" /> <result property="pipeId" column="pipe_id" />
<result property="pipePressure" column="pipe_pressure" />
<result property="pipeDiameter" column="pipe_diameter" /> <result property="pipeDiameter" column="pipe_diameter" />
<result property="pipeMaterial" column="pipe_material" /> <result property="pipeMaterial" column="pipe_material" />
<result property="pipeDepth" column="buried_depth" /> <result property="pipeDepth" column="buried_depth" />
...@@ -85,6 +86,8 @@ ...@@ -85,6 +86,8 @@
<resultMap type="TenterpriseInfoData" id="TenterpriseInfoDataResult"> <resultMap type="TenterpriseInfoData" id="TenterpriseInfoDataResult">
<result property="enterpriseId" column="enterprise_id" /> <result property="enterpriseId" column="enterprise_id" />
<result property="enterpriseName" column="enterprise_name" /> <result property="enterpriseName" column="enterprise_name" />
<result property="enterpriseType" column="enterprise_type" />
</resultMap> </resultMap>
<!--感知设备列表--> <!--感知设备列表-->
...@@ -100,7 +103,7 @@ ...@@ -100,7 +103,7 @@
<!--查询管道数据列表--> <!--查询管道数据列表-->
<select id="selectPipeData" parameterType="PipeDate" resultMap="PipeDateResult"> <select id="selectPipeData" parameterType="PipeDate" resultMap="PipeDateResult">
select format(pipe_length,2)pipe_length,beyond_enterprise_id,pipe_id,pipe_diameter,pipe_material,buried_depth,pipe_trend,build_date,pipe_addr,coordinates,remarks,build_unit,beyond_enterprise_name from t_pipe_info select format(pipe_length,2)pipe_length,pipe_pressure,beyond_enterprise_id,pipe_id,pipe_diameter,pipe_material,buried_depth,pipe_trend,build_date,pipe_addr,coordinates,remarks,build_unit,beyond_enterprise_name from t_pipe_info
where is_del='0' where is_del='0'
</select> </select>
...@@ -149,7 +152,7 @@ ...@@ -149,7 +152,7 @@
<!--查询企业名称id方法--> <!--查询企业名称id方法-->
<select id="selectTenterpriseInfoData" resultMap="TenterpriseInfoDataResult"> <select id="selectTenterpriseInfoData" resultMap="TenterpriseInfoDataResult">
select enterprise_id,enterprise_name from t_enterprise_info where is_del='0' select enterprise_id,enterprise_name,enterprise_type from t_enterprise_info where is_del='0'
</select> </select>
<!--查询阀门井数据--> <!--查询阀门井数据-->
......
...@@ -176,4 +176,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -176,4 +176,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT SUM(IF(user_type=1,1,0)) AS juminNum,SUM(IF(user_type=2,1,0)) AS shangNum, SELECT SUM(IF(user_type=1,1,0)) AS juminNum,SUM(IF(user_type=2,1,0)) AS shangNum,
SUM(IF(user_type=3,1,0)) AS gongNum FROM t_detector_user WHERE is_del = 0 SUM(IF(user_type=3,1,0)) AS gongNum FROM t_detector_user WHERE is_del = 0
</select> </select>
<!--查询用户统计信息-->
<select id="userStatistics" resultType="com.zehong.system.domain.TDetectorUserCount">
SELECT
(select count(user_id) from t_detector_user where is_del='0')as totalNumberUsers,
(select count(user_id) from t_detector_user where user_type=1 and is_del='0')as residentUsers,
(select count(user_id) from t_detector_user where user_type=2 and is_del='0')as businessUser,
(select count(user_id) from t_detector_user where user_type=3 and is_del='0')as industrialUsers
FROM `t_detector_user` limit 0,1
</select>
</mapper> </mapper>
...@@ -108,7 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -108,7 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update t_enterprise_info update t_enterprise_info
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if> <if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if>
<if test="enterpriseType!=null"> enterprise_type = #{enterpriseType}</if> <if test="enterpriseType!=null"> enterprise_type = #{enterpriseType},</if>
<if test="registerAddress != null">register_address = #{registerAddress},</if> <if test="registerAddress != null">register_address = #{registerAddress},</if>
<if test="legalRepresentative != null">legal_representative = #{legalRepresentative},</if> <if test="legalRepresentative != null">legal_representative = #{legalRepresentative},</if>
<if test="businessArea != null">business_area = #{businessArea},</if> <if test="businessArea != null">business_area = #{businessArea},</if>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zehong.system.mapper.THiddenDangerStandingBookMapper"> <mapper namespace="com.zehong.system.mapper.THiddenDangerStandingBookMapper">
<resultMap type="THiddenDangerStandingBook" id="THiddenDangerStandingBookResult"> <resultMap type="THiddenDangerStandingBook" id="THiddenDangerStandingBookResult">
<result property="hiddenId" column="hidden_id" /> <result property="hiddenId" column="hidden_id" />
<result property="hiddenTitle" column="hidden_title" /> <result property="hiddenTitle" column="hidden_title" />
...@@ -50,12 +50,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -50,12 +50,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SUM(CASE t.remediation WHEN '2' THEN 1 ELSE 0 END) AS incompleteTotal SUM(CASE t.remediation WHEN '2' THEN 1 ELSE 0 END) AS incompleteTotal
from (select * from t_hidden_danger_standing_book where is_del = '0') t from (select * from t_hidden_danger_standing_book where is_del = '0') t
</select> </select>
<select id="selectTHiddenDangerStandingBookById" parameterType="Long" resultMap="THiddenDangerStandingBookResult"> <select id="selectTHiddenDangerStandingBookById" parameterType="Long" resultMap="THiddenDangerStandingBookResult">
<include refid="selectTHiddenDangerStandingBookVo"/> <include refid="selectTHiddenDangerStandingBookVo"/>
where hidden_id = #{hiddenId} where hidden_id = #{hiddenId}
</select> </select>
<insert id="insertTHiddenDangerStandingBook" parameterType="THiddenDangerStandingBook" useGeneratedKeys="true" keyProperty="hiddenId"> <insert id="insertTHiddenDangerStandingBook" parameterType="THiddenDangerStandingBook" useGeneratedKeys="true" keyProperty="hiddenId">
insert into t_hidden_danger_standing_book insert into t_hidden_danger_standing_book
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
...@@ -127,9 +127,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -127,9 +127,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete> </delete>
<delete id="deleteTHiddenDangerStandingBookByIds" parameterType="String"> <delete id="deleteTHiddenDangerStandingBookByIds" parameterType="String">
delete from t_hidden_danger_standing_book where hidden_id in delete from t_hidden_danger_standing_book where hidden_id in
<foreach item="hiddenId" collection="array" open="(" separator="," close=")"> <foreach item="hiddenId" collection="array" open="(" separator="," close=")">
#{hiddenId} #{hiddenId}
</foreach> </foreach>
</delete> </delete>
</mapper>
\ No newline at end of file <!--获取隐患整治台账统计信息-->
<select id="hazardStatistics" resultType="com.zehong.system.domain.Statistics">
SELECT
COUNT( * ) AS 'count',
DATE_FORMAT( create_time, '%Y-%m-%d' ) AS date
FROM
t_hidden_danger_standing_book
WHERE
is_del='0'
and
DATE_FORMAT( create_time, '%Y-%m-%d' ) IN
<foreach collection="list" item="sevenDate" separator="," open="(" close=")">
#{sevenDate}
</foreach>
GROUP BY
DATE_FORMAT( create_time, '%Y-%m-%d' )
ORDER BY
DATE_FORMAT( create_time, '%Y-%m-%d' ) DESC;
</select>
</mapper>
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zehong.system.mapper.TTroubleStandingBookMapper"> <mapper namespace="com.zehong.system.mapper.TTroubleStandingBookMapper">
<resultMap type="TTroubleStandingBook" id="TTroubleStandingBookResult"> <resultMap type="TTroubleStandingBook" id="TTroubleStandingBookResult">
<result property="troubleId" column="trouble_id" /> <result property="troubleId" column="trouble_id" />
<result property="troubleName" column="trouble_name" /> <result property="troubleName" column="trouble_name" />
...@@ -54,12 +54,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -54,12 +54,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ROUND(SUM(CASE t.is_deal WHEN '1' THEN 1 ELSE 0 END)/COUNT(t.trouble_id)*100, 1) AS completionRate ROUND(SUM(CASE t.is_deal WHEN '1' THEN 1 ELSE 0 END)/COUNT(t.trouble_id)*100, 1) AS completionRate
from (select * from t_trouble_standing_book where is_del = '0') t from (select * from t_trouble_standing_book where is_del = '0') t
</select> </select>
<select id="selectTTroubleStandingBookById" parameterType="Long" resultMap="TTroubleStandingBookResult"> <select id="selectTTroubleStandingBookById" parameterType="Long" resultMap="TTroubleStandingBookResult">
<include refid="selectTTroubleStandingBookVo"/> <include refid="selectTTroubleStandingBookVo"/>
where trouble_id = #{troubleId} where trouble_id = #{troubleId}
</select> </select>
<insert id="insertTTroubleStandingBook" parameterType="TTroubleStandingBook" useGeneratedKeys="true" keyProperty="troubleId"> <insert id="insertTTroubleStandingBook" parameterType="TTroubleStandingBook" useGeneratedKeys="true" keyProperty="troubleId">
insert into t_trouble_standing_book insert into t_trouble_standing_book
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
...@@ -143,9 +143,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -143,9 +143,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete> </delete>
<delete id="deleteTTroubleStandingBookByIds" parameterType="String"> <delete id="deleteTTroubleStandingBookByIds" parameterType="String">
delete from t_trouble_standing_book where trouble_id in delete from t_trouble_standing_book where trouble_id in
<foreach item="troubleId" collection="array" open="(" separator="," close=")"> <foreach item="troubleId" collection="array" open="(" separator="," close=")">
#{troubleId} #{troubleId}
</foreach> </foreach>
</delete> </delete>
</mapper>
\ No newline at end of file
<!--查询统计信息-->
<select id="accidentLedger" resultType="com.zehong.system.domain.Statistics">
SELECT
COUNT( * ) AS 'count',
DATE_FORMAT( create_time, '%Y-%m-%d' ) AS date
FROM
t_trouble_standing_book
WHERE
is_del='0'
and
DATE_FORMAT( create_time, '%Y-%m-%d' ) IN
<foreach collection="list" item="sevenDate" separator="," open="(" close=")">
#{sevenDate}
</foreach>
GROUP BY
DATE_FORMAT( create_time, '%Y-%m-%d' )
ORDER BY
DATE_FORMAT( create_time, '%Y-%m-%d' ) DESC;
</select>
</mapper>
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zehong.system.mapper.TVehicleInfoMapper"> <mapper namespace="com.zehong.system.mapper.TVehicleInfoMapper">
<resultMap type="TVehicleInfo" id="TVehicleInfoResult"> <resultMap type="TVehicleInfo" id="TVehicleInfoResult">
<result property="vehicleId" column="vehicle_id" /> <result property="vehicleId" column="vehicle_id" />
<result property="carNum" column="car_num" /> <result property="carNum" column="car_num" />
...@@ -18,6 +18,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -18,6 +18,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="phone" column="phone" /> <result property="phone" column="phone" />
<result property="isDel" column="is_del" /> <result property="isDel" column="is_del" />
<result property="remarks" column="remarks" /> <result property="remarks" column="remarks" />
<result property="beyondEnterpriseName" column="enterprise_name" />
<result property="siteStationName" column="site_station_name" />
</resultMap> </resultMap>
<sql id="selectTVehicleInfoVo"> <sql id="selectTVehicleInfoVo">
...@@ -25,28 +27,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -25,28 +27,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql> </sql>
<select id="selectTVehicleInfoList" parameterType="TVehicleInfo" resultMap="TVehicleInfoResult"> <select id="selectTVehicleInfoList" parameterType="TVehicleInfo" resultMap="TVehicleInfoResult">
<include refid="selectTVehicleInfoVo"/> select a.*,b.enterprise_name,c.site_station_name
<where> from t_vehicle_info a
left join t_enterprise_info b on a.beyond_enterprise_id=b.enterprise_id
left join t_site_station_info c on c.site_station_id=a.station_id
<where>
<if test="carNum != null and carNum != ''"> and car_num like concat('%', #{carNum}, '%') </if> <if test="carNum != null and carNum != ''"> and car_num like concat('%', #{carNum}, '%') </if>
<if test="brandModel != null and brandModel != ''"> and brand_model = #{brandModel}</if> <if test="brandModel != null and brandModel != ''"> and a.brand_model = #{brandModel}</if>
<if test="vehicleType != null and vehicleType != ''"> and vehicle_type = #{vehicleType}</if> <if test="vehicleType != null and vehicleType != ''"> and a.vehicle_type = #{vehicleType}</if>
<if test="vehicleLoad != null and vehicleLoad != ''"> and vehicle_load = #{vehicleLoad}</if> <if test="vehicleLoad != null and vehicleLoad != ''"> and a.vehicle_load = #{vehicleLoad}</if>
<if test="vehicleSize != null and vehicleSize != ''"> and vehicle_size = #{vehicleSize}</if> <if test="vehicleSize != null and vehicleSize != ''"> and a.vehicle_size = #{vehicleSize}</if>
<if test="vehicleLimt != null and vehicleLimt != ''"> and vehicle_limt = #{vehicleLimt}</if> <if test="vehicleLimt != null and vehicleLimt != ''"> and a.vehicle_limt = #{vehicleLimt}</if>
<if test="vehicleInspect != null and vehicleInspect != ''"> and vehicle_inspect = #{vehicleInspect}</if> <if test="vehicleInspect != null and vehicleInspect != ''"> and a.vehicle_inspect = #{vehicleInspect}</if>
<if test="beyondEnterpriseId != null and beyondEnterpriseId != ''"> and beyond_enterprise_id = #{beyondEnterpriseId}</if> <if test="beyondEnterpriseId != null and beyondEnterpriseId != ''"> and a.beyond_enterprise_id = #{beyondEnterpriseId}</if>
<if test="personLiable != null and personLiable != ''"> and person_liable = #{personLiable}</if> <if test="personLiable != null and personLiable != ''"> and a.person_liable = #{personLiable}</if>
<if test="phone != null and phone != ''"> and phone = #{phone}</if> <if test="phone != null and phone != ''"> and a.phone = #{phone}</if>
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if> <if test="isDel != null and isDel != ''"> and a.is_del = #{isDel}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if> <if test="remarks != null and remarks != ''"> and a.remarks = #{remarks}</if>
</where> </where>
order by a.vehicle_id desc
</select> </select>
<select id="selectTVehicleInfoById" parameterType="Long" resultMap="TVehicleInfoResult"> <select id="selectTVehicleInfoById" parameterType="Long" resultMap="TVehicleInfoResult">
<include refid="selectTVehicleInfoVo"/> select a.*,b.enterprise_name
from t_vehicle_info a left join t_enterprise_info b on a.beyond_enterprise_id=b.enterprise_id
where vehicle_id = #{vehicleId} where vehicle_id = #{vehicleId}
</select> </select>
<insert id="insertTVehicleInfo" parameterType="TVehicleInfo" useGeneratedKeys="true" keyProperty="vehicleId"> <insert id="insertTVehicleInfo" parameterType="TVehicleInfo" useGeneratedKeys="true" keyProperty="vehicleId">
insert into t_vehicle_info insert into t_vehicle_info
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
...@@ -103,9 +110,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -103,9 +110,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete> </delete>
<delete id="deleteTVehicleInfoByIds" parameterType="String"> <delete id="deleteTVehicleInfoByIds" parameterType="String">
delete from t_vehicle_info where vehicle_id in delete from t_vehicle_info where vehicle_id in
<foreach item="vehicleId" collection="array" open="(" separator="," close=")"> <foreach item="vehicleId" collection="array" open="(" separator="," close=")">
#{vehicleId} #{vehicleId}
</foreach> </foreach>
</delete> </delete>
</mapper> </mapper>
\ No newline at end of file
import request from '@/utils/request'
// 查询燃气车辆信息列表
export function listInfo(query) {
return request({
url: '/system/infos/list',
method: 'get',
params: query
})
}
// 查询燃气车辆信息详细
export function getInfo(vehicleId) {
return request({
url: '/system/infos/' + vehicleId,
method: 'get'
})
}
// 新增燃气车辆信息
export function addInfo(data) {
return request({
url: '/system/infos',
method: 'post',
data: data
})
}
// 修改燃气车辆信息
export function updateInfo(data) {
return request({
url: '/system/infos',
method: 'put',
data: data
})
}
// 删除燃气车辆信息
export function delInfo(vehicleId) {
return request({
url: '/system/infos/' + vehicleId,
method: 'delete'
})
}
// 导出燃气车辆信息
export function exportInfo(query) {
return request({
url: '/system/infos/export',
method: 'get',
params: query
})
}
...@@ -339,25 +339,25 @@ export default { ...@@ -339,25 +339,25 @@ export default {
{ required: true, message: "请输入管道长度", trigger: "blur" }, { required: true, message: "请输入管道长度", trigger: "blur" },
// { min: 0, max: 10, message: "长度10位", trigger: "blur" }, // { min: 0, max: 10, message: "长度10位", trigger: "blur" },
], ],
pipeDiameter: [ // pipeDiameter: [
{ required: true, message: "请输入管径", trigger: "blur" }, // { required: true, message: "请输入管径", trigger: "blur" },
// { min: 0, max: 15, message: "长度15位", trigger: "blur" }, // // { min: 0, max: 15, message: "长度15位", trigger: "blur" },
], // ],
pipePressure: [ // pipePressure: [
{ required: true, message: "请输入压力", trigger: "blur" }, // { required: true, message: "请输入压力", trigger: "blur" },
// { min: 0, max: 10, message: "长度10位", trigger: "blur" }, // // { min: 0, max: 10, message: "长度10位", trigger: "blur" },
], // ],
buildDate: [ // buildDate: [
{ required: true, message: "请选择建设年代", trigger: "blur" }, // { required: true, message: "请选择建设年代", trigger: "blur" },
], // ],
pipeMaterial: [ // pipeMaterial: [
{ required: true, message: "请输入材质", trigger: "blur" }, // { required: true, message: "请输入材质", trigger: "blur" },
// { min: 0, max: 10, message: "长度10位", trigger: "blur" }, // // { min: 0, max: 10, message: "长度10位", trigger: "blur" },
], // ],
buriedDepth:[ // buriedDepth:[
{ required: true, message: "请输入埋深", trigger: "blur" }, // { required: true, message: "请输入埋深", trigger: "blur" },
// { min: 0, max: 10, message: "长度10位", trigger: "blur" }, // // { min: 0, max: 10, message: "长度10位", trigger: "blur" },
], // ],
} }
}; };
}, },
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment