Commit 91487f9c authored by 吴卿华's avatar 吴卿华

车辆管理

parent ca9e48cd
......@@ -73,6 +73,19 @@
<build>
<finalName>gassafetyprogress-${project.version}</finalName>
<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>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
......
......@@ -33,6 +33,9 @@ public class TVehicleInfoController extends BaseController
@Autowired
private ITVehicleLocationInfoService itVehicleLocationInfoService;
@Autowired
private ITVehicleLocationInfoService tVehicleLocationInfoService;
/**
* 查询燃气车辆信息列表
*/
......@@ -80,6 +83,8 @@ public class TVehicleInfoController extends BaseController
return util.exportExcel(list, "燃气车辆信息数据");
}
/**
* 获取燃气车辆信息详细信息
*/
......
package com.zehong.web.controller.standingBook;
import java.util.ArrayList;
import java.util.List;
import com.zehong.system.domain.Statistics;
import com.zehong.system.domain.form.THiddenDangerStandingBookForm;
import com.zehong.web.controller.tool.TimeConfig;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -47,6 +50,44 @@ public class THiddenDangerStandingBookController extends BaseController
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;
import java.util.ArrayList;
import java.util.List;
import com.zehong.system.domain.Statistics;
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.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -47,6 +51,43 @@ public class TTroubleStandingBookController extends BaseController
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 {
//循环根据权属单位名称分组的数据
for (int i=0;i<pipeDatesGroup.size();i++){
//循环全部数据
for (int n=0;n<pipeDates.size();n++){
//判断如果名称一样就一组
if (pipeDatesGroup.get(i).getPowerCompany().equals(pipeDates.get(n).getPowerCompany())){
// //设置分组类型
// pipeDates.get(n).setCompanyType(Integer.parseInt(pipeDates.get(n).getPipeId()));
pipeDates.get(n).setIconType(1);
}
}
// for (int n=0;n<pipeDates.size();n++){
// //判断如果名称一样就一组
// if (pipeDatesGroup.get(i).getPowerCompany().equals(pipeDates.get(n).getPowerCompany())){
//// //设置分组类型
//// pipeDates.get(n).setCompanyType(Integer.parseInt(pipeDates.get(n).getPipeId()));
// pipeDates.get(n).setIconType(1);
// }
// }
k++;
}
PipeList pipeList=new PipeList();
......
......@@ -51,6 +51,17 @@ public class TDetectorUserController extends BaseController
return getDataTable(list);
}
/**
* 获取燃气用户统计信息
*/
@GetMapping("/userStatistics")
public AjaxResult userStatistics()
{
return AjaxResult.success(tDetectorUserService.userStatistics());
}
/**
* 获取探测器用户列表
* @return
......
......@@ -49,6 +49,16 @@ public class TEnterpriseInfoController extends BaseController
return getDataTable(list);
}
/**
* 查询企业类型
* @return
*/
// @RequestMapping("/getEnterpriseType")
// public TableDataInfo getEnterpriseType(){
// List<TEnterpriseInfo> enterpriseType = tEnterpriseInfoService.getEnterpriseType();
// return getDataTable(enterpriseType);
// }
/**
*查询所有企业信息
* @param tEnterpriseInfo
......
package com.zehong.web.controller.system;
import java.util.HashMap;
import java.util.List;
import java.util.Set;
import com.zehong.framework.systemsetting.SystemSetting;
import com.zehong.framework.web.domain.server.Sys;
import com.zehong.system.service.ISysPostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -79,11 +81,14 @@ public class SysLoginController
Set<String> roles = permissionService.getRolePermission(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();
ajax.put("user", user);
ajax.put("roles", roles);
ajax.put("permissions", permissions);
ajax.put("systemSetting",systemSetting.getSystemWebSetting());
ajax.put("systemSetting",hashMap);
ajax.put("posts",iSysPostService.getPostListByUserId(user.getUserId()));
return ajax;
}
......
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;
}
......@@ -11,7 +11,7 @@ import java.math.BigDecimal;
* 燃气车辆信息对象 t_vehicle_info
*
* @author zehong
* @date 2022-03-17
* @date 2023-08-16
*/
public class TVehicleInfo extends BaseEntity
{
......@@ -50,7 +50,7 @@ public class TVehicleInfo extends BaseEntity
/** 所属企业 */
@Excel(name = "所属企业")
private String beyondEnterpriseId;
private int beyondEnterpriseId;
/** 责任人 */
@Excel(name = "责任人")
......@@ -69,15 +69,37 @@ public class TVehicleInfo extends BaseEntity
private String remarks;
/**
* 经度
* 储配站名称
*/
private String siteStationName;
private BigDecimal longitude;
/**
* 纬度
*/
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() {
return longitude;
......@@ -167,15 +189,15 @@ public class TVehicleInfo extends BaseEntity
{
return vehicleInspect;
}
public void setBeyondEnterpriseId(String beyondEnterpriseId)
{
this.beyondEnterpriseId = beyondEnterpriseId;
}
public String getBeyondEnterpriseId()
{
public int getBeyondEnterpriseId() {
return beyondEnterpriseId;
}
public void setBeyondEnterpriseId(int beyondEnterpriseId) {
this.beyondEnterpriseId = beyondEnterpriseId;
}
public void setPersonLiable(String personLiable)
{
this.personLiable = personLiable;
......
......@@ -6,6 +6,16 @@ public class TenterpriseInfoData {
private String enterpriseName;
private String enterpriseType;
public String getEnterpriseType() {
return enterpriseType;
}
public void setEnterpriseType(String enterpriseType) {
this.enterpriseType = enterpriseType;
}
public String getEnterpriseId() {
return enterpriseId;
}
......
......@@ -5,6 +5,7 @@ import java.util.Map;
import com.zehong.system.domain.TDetectorInfo;
import com.zehong.system.domain.TDetectorUser;
import com.zehong.system.domain.TDetectorUserCount;
import com.zehong.system.domain.vo.TDetectorUserVO;
/**
......@@ -90,4 +91,10 @@ public interface TDetectorUserMapper
* @return
*/
public Map<String,Object> selectUserNum();
/**
* 查询用户统计信息
* @return
*/
TDetectorUserCount userStatistics();
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.Statistics;
import com.zehong.system.domain.THiddenDangerStandingBook;
import com.zehong.system.domain.form.THiddenDangerStandingBookForm;
import com.zehong.system.domain.vo.THiddenDangerStandingBookVo;
......@@ -67,4 +69,11 @@ public interface THiddenDangerStandingBookMapper
* @return 结果
*/
public int deleteTHiddenDangerStandingBookByIds(Long[] hiddenIds);
/**
* 获取隐患整治台账统计信息
* @param sevenDate
* @return
*/
List<Statistics> hazardStatistics(List<String> sevenDate);
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.Statistics;
import com.zehong.system.domain.TTroubleStandingBook;
import com.zehong.system.domain.form.TTroubleStandingBookForm;
import com.zehong.system.domain.vo.TTroubleStandingBookVo;
......@@ -67,4 +69,11 @@ public interface TTroubleStandingBookMapper
* @return 结果
*/
public int deleteTTroubleStandingBookByIds(Long[] troubleIds);
/**
* 查询统计信息
* @param sevenDate
* @return
*/
List<Statistics> accidentLedger(List<String> sevenDate);
}
......@@ -4,6 +4,7 @@ import java.util.List;
import java.util.Map;
import com.zehong.system.domain.TDetectorUser;
import com.zehong.system.domain.TDetectorUserCount;
import com.zehong.system.domain.vo.TDetectorUserVO;
/**
......@@ -98,4 +99,11 @@ public interface ITDetectorUserService
* @return
*/
public Map<String,Object> selectUserNum();
/**
* 查询用户统计信息
* @return
*/
TDetectorUserCount userStatistics();
}
......@@ -61,4 +61,6 @@ public interface ITEnterpriseInfoService
* @return 结果
*/
public int deleteTEnterpriseInfoById(Long enterpriseId);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.Statistics;
import com.zehong.system.domain.THiddenDangerStandingBook;
import com.zehong.system.domain.form.THiddenDangerStandingBookForm;
import com.zehong.system.domain.vo.THiddenDangerStandingBookVo;
......@@ -67,4 +69,10 @@ public interface ITHiddenDangerStandingBookService
* @return 结果
*/
public int deleteTHiddenDangerStandingBookById(Long hiddenId);
/**
* 获取隐患整治台账统计信息
* @param sevenDate
*/
List<Statistics> hazardStatistics(List<String> sevenDate);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.Statistics;
import com.zehong.system.domain.TTroubleStandingBook;
import com.zehong.system.domain.form.TTroubleStandingBookForm;
import com.zehong.system.domain.vo.TTroubleStandingBookVo;
......@@ -67,4 +69,14 @@ public interface ITTroubleStandingBookService
* @return 结果
*/
public int deleteTTroubleStandingBookById(Long troubleId);
/**
* 查询统计信息
* @return
*/
List<Statistics> accidentLedger(List<String> sevenDate);
}
......@@ -5,6 +5,7 @@ import java.util.List;
import java.util.Map;
import com.zehong.common.utils.DateUtils;
import com.zehong.system.domain.TDetectorUserCount;
import com.zehong.system.domain.vo.TDetectorUserVO;
import com.zehong.system.mapper.TDetectorInfoMapper;
import com.zehong.system.mapper.TDeviceInfoMapper;
......@@ -221,4 +222,13 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
public Map<String,Object> selectUserNum(){
return tDetectorUserMapper.selectUserNum();
}
/**
* 查询用户统计信息
* @return
*/
@Override
public TDetectorUserCount userStatistics() {
return tDetectorUserMapper.userStatistics();
}
}
......@@ -2,6 +2,7 @@ package com.zehong.system.service.impl;
import java.util.List;
import com.zehong.common.utils.DateUtils;
import com.zehong.system.domain.Statistics;
import com.zehong.system.domain.form.THiddenDangerStandingBookForm;
import com.zehong.system.domain.vo.THiddenDangerStandingBookVo;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -105,4 +106,14 @@ public class THiddenDangerStandingBookServiceImpl implements ITHiddenDangerStand
{
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;
import java.util.List;
import com.zehong.common.utils.DateUtils;
import com.zehong.system.domain.Statistics;
import com.zehong.system.domain.form.TTroubleStandingBookForm;
import com.zehong.system.domain.vo.TTroubleStandingBookVo;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -111,4 +112,17 @@ public class TTroubleStandingBookServiceImpl implements ITTroubleStandingBookSer
{
return tTroubleStandingBookMapper.deleteTTroubleStandingBookById(troubleId);
}
/**
* 查询统计信息
* @param sevenDate
* @return
*/
@Override
public List<Statistics> accidentLedger(List<String> sevenDate) {
return tTroubleStandingBookMapper.accidentLedger(sevenDate);
}
}
......@@ -6,6 +6,7 @@
<!--管道-->
<resultMap type="PipeDate" id="PipeDateResult">
<result property="pipeId" column="pipe_id" />
<result property="pipePressure" column="pipe_pressure" />
<result property="pipeDiameter" column="pipe_diameter" />
<result property="pipeMaterial" column="pipe_material" />
<result property="pipeDepth" column="buried_depth" />
......@@ -85,6 +86,8 @@
<resultMap type="TenterpriseInfoData" id="TenterpriseInfoDataResult">
<result property="enterpriseId" column="enterprise_id" />
<result property="enterpriseName" column="enterprise_name" />
<result property="enterpriseType" column="enterprise_type" />
</resultMap>
<!--感知设备列表-->
......@@ -100,7 +103,7 @@
<!--查询管道数据列表-->
<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'
</select>
......@@ -149,7 +152,7 @@
<!--查询企业名称id方法-->
<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>
<!--查询阀门井数据-->
......
......@@ -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,
SUM(IF(user_type=3,1,0)) AS gongNum FROM t_detector_user WHERE is_del = 0
</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>
......@@ -108,7 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update t_enterprise_info
<trim prefix="SET" suffixOverrides=",">
<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="legalRepresentative != null">legal_representative = #{legalRepresentative},</if>
<if test="businessArea != null">business_area = #{businessArea},</if>
......
......@@ -132,4 +132,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{hiddenId}
</foreach>
</delete>
<!--获取隐患整治台账统计信息-->
<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>
......@@ -148,4 +148,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{troubleId}
</foreach>
</delete>
<!--查询统计信息-->
<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>
......@@ -18,6 +18,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="phone" column="phone" />
<result property="isDel" column="is_del" />
<result property="remarks" column="remarks" />
<result property="beyondEnterpriseName" column="enterprise_name" />
<result property="siteStationName" column="site_station_name" />
</resultMap>
<sql id="selectTVehicleInfoVo">
......@@ -25,25 +27,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectTVehicleInfoList" parameterType="TVehicleInfo" resultMap="TVehicleInfoResult">
<include refid="selectTVehicleInfoVo"/>
select a.*,b.enterprise_name,c.site_station_name
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="brandModel != null and brandModel != ''"> and brand_model = #{brandModel}</if>
<if test="vehicleType != null and vehicleType != ''"> and vehicle_type = #{vehicleType}</if>
<if test="vehicleLoad != null and vehicleLoad != ''"> and vehicle_load = #{vehicleLoad}</if>
<if test="vehicleSize != null and vehicleSize != ''"> and vehicle_size = #{vehicleSize}</if>
<if test="vehicleLimt != null and vehicleLimt != ''"> and vehicle_limt = #{vehicleLimt}</if>
<if test="vehicleInspect != null and vehicleInspect != ''"> and vehicle_inspect = #{vehicleInspect}</if>
<if test="beyondEnterpriseId != null and beyondEnterpriseId != ''"> and beyond_enterprise_id = #{beyondEnterpriseId}</if>
<if test="personLiable != null and personLiable != ''"> and person_liable = #{personLiable}</if>
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
<if test="brandModel != null and brandModel != ''"> and a.brand_model = #{brandModel}</if>
<if test="vehicleType != null and vehicleType != ''"> and a.vehicle_type = #{vehicleType}</if>
<if test="vehicleLoad != null and vehicleLoad != ''"> and a.vehicle_load = #{vehicleLoad}</if>
<if test="vehicleSize != null and vehicleSize != ''"> and a.vehicle_size = #{vehicleSize}</if>
<if test="vehicleLimt != null and vehicleLimt != ''"> and a.vehicle_limt = #{vehicleLimt}</if>
<if test="vehicleInspect != null and vehicleInspect != ''"> and a.vehicle_inspect = #{vehicleInspect}</if>
<if test="beyondEnterpriseId != null and beyondEnterpriseId != ''"> and a.beyond_enterprise_id = #{beyondEnterpriseId}</if>
<if test="personLiable != null and personLiable != ''"> and a.person_liable = #{personLiable}</if>
<if test="phone != null and phone != ''"> and a.phone = #{phone}</if>
<if test="isDel != null and isDel != ''"> and a.is_del = #{isDel}</if>
<if test="remarks != null and remarks != ''"> and a.remarks = #{remarks}</if>
</where>
order by a.vehicle_id desc
</select>
<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}
</select>
......
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 {
{ required: true, message: "请输入管道长度", trigger: "blur" },
// { min: 0, max: 10, message: "长度10位", trigger: "blur" },
],
pipeDiameter: [
{ required: true, message: "请输入管径", trigger: "blur" },
// { min: 0, max: 15, message: "长度15位", trigger: "blur" },
],
pipePressure: [
{ required: true, message: "请输入压力", trigger: "blur" },
// { min: 0, max: 10, message: "长度10位", trigger: "blur" },
],
buildDate: [
{ required: true, message: "请选择建设年代", trigger: "blur" },
],
pipeMaterial: [
{ required: true, message: "请输入材质", trigger: "blur" },
// { min: 0, max: 10, message: "长度10位", trigger: "blur" },
],
buriedDepth:[
{ required: true, message: "请输入埋深", trigger: "blur" },
// { min: 0, max: 10, message: "长度10位", trigger: "blur" },
],
// pipeDiameter: [
// { required: true, message: "请输入管径", trigger: "blur" },
// // { min: 0, max: 15, message: "长度15位", trigger: "blur" },
// ],
// pipePressure: [
// { required: true, message: "请输入压力", trigger: "blur" },
// // { min: 0, max: 10, message: "长度10位", trigger: "blur" },
// ],
// buildDate: [
// { required: true, message: "请选择建设年代", trigger: "blur" },
// ],
// pipeMaterial: [
// { required: true, message: "请输入材质", trigger: "blur" },
// // { min: 0, max: 10, message: "长度10位", trigger: "blur" },
// ],
// buriedDepth:[
// { required: true, message: "请输入埋深", 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