Commit 3b1fe34d authored by 耿迪迪's avatar 耿迪迪
parents f36ebc5e 7c8ae314
package com.zehong.web.controller.supervise;
import java.io.File;
import java.util.List;
import com.zehong.common.config.GassafetyProgressConfig;
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.TProjectInfo;
import com.zehong.system.service.ITProjectInfoService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 工程项目信息Controller
*
* @author zehong
* @date 2022-03-16
*/
@RestController
@RequestMapping("/project/info")
public class TProjectInfoController extends BaseController
{
@Autowired
private ITProjectInfoService tProjectInfoService;
/**
* 查询工程项目信息列表
*/
@PreAuthorize("@ss.hasPermi('project:info:list')")
@GetMapping("/list")
public TableDataInfo list(TProjectInfo tProjectInfo)
{
startPage();
List<TProjectInfo> list = tProjectInfoService.selectTProjectInfoList(tProjectInfo);
return getDataTable(list);
}
/**
* 导出工程项目信息列表
*/
@PreAuthorize("@ss.hasPermi('project:info:export')")
@Log(title = "工程项目信息", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TProjectInfo tProjectInfo)
{
List<TProjectInfo> list = tProjectInfoService.selectTProjectInfoList(tProjectInfo);
ExcelUtil<TProjectInfo> util = new ExcelUtil<TProjectInfo>(TProjectInfo.class);
return util.exportExcel(list, "工程项目信息数据");
}
/**
* 获取工程项目信息详细信息
*/
@PreAuthorize("@ss.hasPermi('project:info:query')")
@GetMapping(value = "/{projectId}")
public AjaxResult getInfo(@PathVariable("projectId") Long projectId)
{
return AjaxResult.success(tProjectInfoService.selectTProjectInfoById(projectId));
}
/**
* 新增工程项目信息
*/
@PreAuthorize("@ss.hasPermi('project:info:add')")
@Log(title = "工程项目信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TProjectInfo tProjectInfo)
{
//查询是否已经有重复的年份数据
List<TProjectInfo> tProjectInfos = tProjectInfoService.selectSameYear(tProjectInfo.getProjectYear());
//说明有重复的年份 将重复的年份删除
if (tProjectInfos.size()!=0){
//重复年份删除方法
tProjectInfoService.deleteisSameYear(tProjectInfo.getProjectYear());
}
return toAjax(tProjectInfoService.insertTProjectInfo(tProjectInfo));
}
/**
* 修改工程项目信息
*/
@PreAuthorize("@ss.hasPermi('project:info:edit')")
@Log(title = "工程项目信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TProjectInfo tProjectInfo)
{
//查询修改文件之前的路径
TProjectInfo tProjectInfos = tProjectInfoService.selectNearbyAddress(tProjectInfo.getProjectId());
if (tProjectInfos.getNearbyAddress()!=null){
// 上传文件路径
String filePath = GassafetyProgressConfig.getUploadPath();
String[] strs = tProjectInfos.getNearbyAddress().split("upload");
//删除
File file = new File(filePath+strs[1].toString());
// 上传文件路径
if(file.isFile()){
file.delete();
}
}
return toAjax(tProjectInfoService.updateTProjectInfo(tProjectInfo));
}
/**
* 删除工程项目信息
*/
@PreAuthorize("@ss.hasPermi('project:info:remove')")
@Log(title = "工程项目信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{projectIds}")
public AjaxResult remove(@PathVariable Long[] projectIds)
{
return toAjax(tProjectInfoService.deleteTProjectInfoByIds(projectIds));
}
}
......@@ -30,6 +30,8 @@ public class DeviceData {
private int iconType;
private String iconUrl;
//下级设备数据封装类数组
private List<SubordinateEquipmentList> subordinateEquipmentList;
......@@ -87,6 +89,13 @@ public class DeviceData {
//探测器报警中
private int detectorInAlarm;
public String getIconUrl() {
return iconUrl;
}
public void setIconUrl(String iconUrl) {
this.iconUrl = iconUrl;
}
public List<SubordinateEquipmentList> getSubordinateEquipmentList() {
return subordinateEquipmentList;
......@@ -351,6 +360,7 @@ public class DeviceData {
", pressureFlows=" + pressureFlows +
", beyondEnterpriseName='" + beyondEnterpriseName + '\'' +
", iconType=" + iconType +
", iconUrl='" + iconUrl + '\'' +
", subordinateEquipmentList=" + subordinateEquipmentList +
", numberPressureGauges=" + numberPressureGauges +
", onlineEquipment=" + onlineEquipment +
......
package com.zehong.system.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
/**
* 工程项目信息对象 t_project_info
*
* @author zehong
* @date 2022-03-16
*/
public class TProjectInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 工程项目主键ID */
private Long projectId;
/** 工程项目年度 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "工程项目年度", width = 30, dateFormat = "yyyy-MM-dd")
private Date projectYear;
/** 门站地址 */
@Excel(name = "门站地址")
private String gateStationAddress;
/** 门站金额 */
@Excel(name = "门站金额")
private BigDecimal gateStationInvestment;
/** 门站数量 */
@Excel(name = "门站数量")
private Long numberGateStations;
/** 管道长度 */
@Excel(name = "管道长度")
private Long pipeLength;
/** 管道金额 */
@Excel(name = "管道金额")
private BigDecimal pipeInvestment;
/** 附件地址 */
private String nearbyAddress;
/** 是否删除(0正常,1删除) */
private String isDel;
/** 备注 */
@Excel(name = "备注")
private String remarks;
public void setProjectId(Long projectId)
{
this.projectId = projectId;
}
public Long getProjectId()
{
return projectId;
}
public void setProjectYear(Date projectYear)
{
this.projectYear = projectYear;
}
public Date getProjectYear()
{
return projectYear;
}
public void setGateStationAddress(String gateStationAddress)
{
this.gateStationAddress = gateStationAddress;
}
public String getGateStationAddress()
{
return gateStationAddress;
}
public void setGateStationInvestment(BigDecimal gateStationInvestment)
{
this.gateStationInvestment = gateStationInvestment;
}
public BigDecimal getGateStationInvestment()
{
return gateStationInvestment;
}
public void setNumberGateStations(Long numberGateStations)
{
this.numberGateStations = numberGateStations;
}
public Long getNumberGateStations()
{
return numberGateStations;
}
public void setPipeLength(Long pipeLength)
{
this.pipeLength = pipeLength;
}
public Long getPipeLength()
{
return pipeLength;
}
public void setPipeInvestment(BigDecimal pipeInvestment)
{
this.pipeInvestment = pipeInvestment;
}
public BigDecimal getPipeInvestment()
{
return pipeInvestment;
}
public void setNearbyAddress(String nearbyAddress)
{
this.nearbyAddress = nearbyAddress;
}
public String getNearbyAddress()
{
return nearbyAddress;
}
public void setIsDel(String isDel)
{
this.isDel = isDel;
}
public String getIsDel()
{
return isDel;
}
public void setRemarks(String remarks)
{
this.remarks = remarks;
}
public String getRemarks()
{
return remarks;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("projectId", getProjectId())
.append("projectYear", getProjectYear())
.append("gateStationAddress", getGateStationAddress())
.append("gateStationInvestment", getGateStationInvestment())
.append("numberGateStations", getNumberGateStations())
.append("pipeLength", getPipeLength())
.append("pipeInvestment", getPipeInvestment())
.append("nearbyAddress", getNearbyAddress())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("isDel", getIsDel())
.append("remarks", getRemarks())
.toString();
}
}
......@@ -22,6 +22,8 @@ public class TSiteStationInfoData {
private String buildCompany;
private String powerCompany;
private String pictureAddress;
//流量计数组
private List<PressureFlow> pressureFlows;
......@@ -86,6 +88,14 @@ public class TSiteStationInfoData {
//探测器报警中
private int detectorInAlarm;
public String getPictureAddress() {
return pictureAddress;
}
public void setPictureAddress(String pictureAddress) {
this.pictureAddress = pictureAddress;
}
public List<SubordinateEquipmentList> getSubordinateEquipmentList() {
return subordinateEquipmentList;
}
......@@ -357,6 +367,7 @@ public class TSiteStationInfoData {
", buildyear='" + buildyear + '\'' +
", buildCompany='" + buildCompany + '\'' +
", powerCompany='" + powerCompany + '\'' +
", pictureAddress='" + pictureAddress + '\'' +
", pressureFlows=" + pressureFlows +
", subordinateEquipmentList=" + subordinateEquipmentList +
", iconType=" + iconType +
......
package com.zehong.system.mapper;
import java.util.Date;
import java.util.List;
import com.zehong.system.domain.TProjectInfo;
/**
* 工程项目信息Mapper接口
*
* @author zehong
* @date 2022-03-16
*/
public interface TProjectInfoMapper
{
/**
* 查询工程项目信息
*
* @param projectId 工程项目信息ID
* @return 工程项目信息
*/
public TProjectInfo selectTProjectInfoById(Long projectId);
/**
* 查询工程项目信息列表
*
* @param tProjectInfo 工程项目信息
* @return 工程项目信息集合
*/
public List<TProjectInfo> selectTProjectInfoList(TProjectInfo tProjectInfo);
/**
* 新增工程项目信息
*
* @param tProjectInfo 工程项目信息
* @return 结果
*/
public int insertTProjectInfo(TProjectInfo tProjectInfo);
/**
* 修改工程项目信息
*
* @param tProjectInfo 工程项目信息
* @return 结果
*/
public int updateTProjectInfo(TProjectInfo tProjectInfo);
/**
* 删除工程项目信息
*
* @param projectId 工程项目信息ID
* @return 结果
*/
public int deleteTProjectInfoById(Long projectId);
/**
* 批量删除工程项目信息
*
* @param projectIds 需要删除的数据ID
* @return 结果
*/
public int deleteTProjectInfoByIds(Long[] projectIds);
/**
* 查询是否已经有重复的年份数据
* @param projectYear
* @return
*/
List<TProjectInfo> selectSameYear(Date projectYear);
/**
* 重复年份删除方法
* @param isSameYear
*/
void deleteisSameYear(Date isSameYear);
/**
* 查询修改文件之前的路径
* @param projectId
* @return
*/
TProjectInfo selectNearbyAddress(Long projectId);
}
package com.zehong.system.service;
import java.util.Date;
import java.util.List;
import com.zehong.system.domain.TProjectInfo;
/**
* 工程项目信息Service接口
*
* @author zehong
* @date 2022-03-16
*/
public interface ITProjectInfoService
{
/**
* 查询工程项目信息
*
* @param projectId 工程项目信息ID
* @return 工程项目信息
*/
public TProjectInfo selectTProjectInfoById(Long projectId);
/**
* 查询工程项目信息列表
*
* @param tProjectInfo 工程项目信息
* @return 工程项目信息集合
*/
public List<TProjectInfo> selectTProjectInfoList(TProjectInfo tProjectInfo);
/**
* 新增工程项目信息
*
* @param tProjectInfo 工程项目信息
* @return 结果
*/
public int insertTProjectInfo(TProjectInfo tProjectInfo);
/**
* 修改工程项目信息
*
* @param tProjectInfo 工程项目信息
* @return 结果
*/
public int updateTProjectInfo(TProjectInfo tProjectInfo);
/**
* 批量删除工程项目信息
*
* @param projectIds 需要删除的工程项目信息ID
* @return 结果
*/
public int deleteTProjectInfoByIds(Long[] projectIds);
/**
* 删除工程项目信息信息
*
* @param projectId 工程项目信息ID
* @return 结果
*/
public int deleteTProjectInfoById(Long projectId);
/**
* 查询是否已经有重复的年份数据
* @param projectYear
* @return
*/
List<TProjectInfo> selectSameYear(Date projectYear);
/**
* 重复年份删除方法
* @param isSameYear
*/
void deleteisSameYear(Date isSameYear);
/**
* 查询修改文件之前的路径
* @param projectId
*/
TProjectInfo selectNearbyAddress(Long projectId);
}
package com.zehong.system.service.impl;
import java.util.Date;
import java.util.List;
import com.zehong.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TProjectInfoMapper;
import com.zehong.system.domain.TProjectInfo;
import com.zehong.system.service.ITProjectInfoService;
/**
* 工程项目信息Service业务层处理
*
* @author zehong
* @date 2022-03-16
*/
@Service
public class TProjectInfoServiceImpl implements ITProjectInfoService
{
@Autowired
private TProjectInfoMapper tProjectInfoMapper;
/**
* 查询工程项目信息
*
* @param projectId 工程项目信息ID
* @return 工程项目信息
*/
@Override
public TProjectInfo selectTProjectInfoById(Long projectId)
{
return tProjectInfoMapper.selectTProjectInfoById(projectId);
}
/**
* 查询工程项目信息列表
*
* @param tProjectInfo 工程项目信息
* @return 工程项目信息
*/
@Override
public List<TProjectInfo> selectTProjectInfoList(TProjectInfo tProjectInfo)
{
return tProjectInfoMapper.selectTProjectInfoList(tProjectInfo);
}
/**
* 新增工程项目信息
*
* @param tProjectInfo 工程项目信息
* @return 结果
*/
@Override
public int insertTProjectInfo(TProjectInfo tProjectInfo)
{
tProjectInfo.setCreateTime(DateUtils.getNowDate());
return tProjectInfoMapper.insertTProjectInfo(tProjectInfo);
}
/**
* 修改工程项目信息
*
* @param tProjectInfo 工程项目信息
* @return 结果
*/
@Override
public int updateTProjectInfo(TProjectInfo tProjectInfo)
{
tProjectInfo.setUpdateTime(DateUtils.getNowDate());
return tProjectInfoMapper.updateTProjectInfo(tProjectInfo);
}
/**
* 批量删除工程项目信息
*
* @param projectIds 需要删除的工程项目信息ID
* @return 结果
*/
@Override
public int deleteTProjectInfoByIds(Long[] projectIds)
{
return tProjectInfoMapper.deleteTProjectInfoByIds(projectIds);
}
/**
* 删除工程项目信息信息
*
* @param projectId 工程项目信息ID
* @return 结果
*/
@Override
public int deleteTProjectInfoById(Long projectId)
{
return tProjectInfoMapper.deleteTProjectInfoById(projectId);
}
/**
* 查询是否已经有重复的年份数据
* @param projectYear
* @return
*/
@Override
public List<TProjectInfo> selectSameYear(Date projectYear) {
List<TProjectInfo> tProjectInfos = tProjectInfoMapper.selectSameYear(projectYear);
return tProjectInfos;
}
/**
* 重复年份删除方法
* @param isSameYear
*/
@Override
public void deleteisSameYear(Date isSameYear) {
tProjectInfoMapper.deleteisSameYear(isSameYear);
}
/**
* 查询修改文件之前的路径
* @param projectId
* @return
*/
@Override
public TProjectInfo selectNearbyAddress(Long projectId) {
TProjectInfo tProjectInfo = tProjectInfoMapper.selectNearbyAddress(projectId);
return tProjectInfo;
}
}
......@@ -30,6 +30,7 @@
<result property="companyType" column="device_id" />
<result property="beyondEnterpriseName" column="beyond_enterprise_name" />
<result property="companyType" column="beyond_enterprise_id" />
<result property="iconUrl" column="icon_url" />
</resultMap>
<!--下级设备数据-->
......@@ -52,6 +53,7 @@
<result property="buildCompany" column="build_unit" />
<result property="powerCompany" column="beyond_enterprise_name" />
<result property="companyType" column="beyond_enterprise_id" />
<result property="pictureAddress" column="picture_address" />
</resultMap>
<!--监控数据-->
......@@ -109,7 +111,7 @@
<!--调压箱数据查询方法-->
<select id="selectDeviceData" resultMap="DeviceDateResult">
select beyond_enterprise_id,device_id,device_type,device_name,device_code,device_addr,longitude,latitude,beyond_enterprise_name from t_device_info
select beyond_enterprise_id,icon_url,device_id,device_type,device_name,device_code,device_addr,longitude,latitude,beyond_enterprise_name from t_device_info
where device_type='2' and is_del='0'
</select>
......@@ -121,7 +123,7 @@
<!--场站信息查询方法-->
<select id="selectTSiteStationInfoData" resultMap="TSiteStationInfoDataResult">
select beyond_enterprise_id,site_station_id,site_station_name,site_station_type,longitude,latitude,create_time,build_unit,beyond_enterprise_name
select beyond_enterprise_id,picture_address,site_station_id,site_station_name,site_station_type,longitude,latitude,create_time,build_unit,beyond_enterprise_name
from t_site_station_info where is_del='0'
</select>
......@@ -150,7 +152,7 @@
<!--查询阀门井数据-->
<select id="selectvalveData" resultMap="DeviceDateResult">
select beyond_enterprise_id,device_id,device_type,device_name,device_code,device_addr,longitude,latitude,beyond_enterprise_name from t_device_info
select beyond_enterprise_id,device_id,icon_url,device_type,device_name,device_code,device_addr,longitude,latitude,beyond_enterprise_name from t_device_info
where device_type='1' and is_del='0'
</select>
......
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zehong.system.mapper.TProjectInfoMapper">
<resultMap type="TProjectInfo" id="TProjectInfoResult">
<result property="projectId" column="project_id" />
<result property="projectYear" column="project_year" />
<result property="gateStationAddress" column="gate_station_address" />
<result property="gateStationInvestment" column="gate_station_investment" />
<result property="numberGateStations" column="number_gate_stations" />
<result property="pipeLength" column="pipe_length" />
<result property="pipeInvestment" column="pipe_investment" />
<result property="nearbyAddress" column="nearby_address" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="isDel" column="is_del" />
<result property="remarks" column="remarks" />
</resultMap>
<sql id="selectTProjectInfoVo">
select project_id, project_year, gate_station_address, gate_station_investment, number_gate_stations, pipe_length, pipe_investment, nearby_address, create_by, create_time, update_by, update_time, is_del, remarks from t_project_info
</sql>
<select id="selectTProjectInfoList" parameterType="TProjectInfo" resultMap="TProjectInfoResult">
<include refid="selectTProjectInfoVo"/>
<where>
is_del='0'
<if test="projectYear != null "> and project_year = #{projectYear}</if>
<if test="gateStationAddress != null and gateStationAddress != ''"> and gate_station_address = #{gateStationAddress}</if>
<if test="gateStationInvestment != null "> and gate_station_investment = #{gateStationInvestment}</if>
<if test="numberGateStations != null "> and number_gate_stations = #{numberGateStations}</if>
<if test="pipeLength != null "> and pipe_length = #{pipeLength}</if>
<if test="pipeInvestment != null "> and pipe_investment = #{pipeInvestment}</if>
<if test="nearbyAddress != null and nearbyAddress != ''"> and nearby_address = #{nearbyAddress}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
</where>
group by project_id desc
</select>
<select id="selectTProjectInfoById" parameterType="Long" resultMap="TProjectInfoResult">
<include refid="selectTProjectInfoVo"/>
where project_id = #{projectId} and is_del='0'
</select>
<insert id="insertTProjectInfo" parameterType="TProjectInfo" useGeneratedKeys="true" keyProperty="projectId">
insert into t_project_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="projectYear != null">project_year,</if>
<if test="gateStationAddress != null">gate_station_address,</if>
<if test="gateStationInvestment != null">gate_station_investment,</if>
<if test="numberGateStations != null">number_gate_stations,</if>
<if test="pipeLength != null">pipe_length,</if>
<if test="pipeInvestment != null">pipe_investment,</if>
<if test="nearbyAddress != null">nearby_address,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="isDel != null">is_del,</if>
<if test="remarks != null">remarks,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="projectYear != null">#{projectYear},</if>
<if test="gateStationAddress != null">#{gateStationAddress},</if>
<if test="gateStationInvestment != null">#{gateStationInvestment},</if>
<if test="numberGateStations != null">#{numberGateStations},</if>
<if test="pipeLength != null">#{pipeLength},</if>
<if test="pipeInvestment != null">#{pipeInvestment},</if>
<if test="nearbyAddress != null">#{nearbyAddress},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="isDel != null">#{isDel},</if>
<if test="remarks != null">#{remarks},</if>
</trim>
</insert>
<update id="updateTProjectInfo" parameterType="TProjectInfo">
update t_project_info
<trim prefix="SET" suffixOverrides=",">
<if test="projectYear != null">project_year = #{projectYear},</if>
<if test="gateStationAddress != null">gate_station_address = #{gateStationAddress},</if>
<if test="gateStationInvestment != null">gate_station_investment = #{gateStationInvestment},</if>
<if test="numberGateStations != null">number_gate_stations = #{numberGateStations},</if>
<if test="pipeLength != null">pipe_length = #{pipeLength},</if>
<if test="pipeInvestment != null">pipe_investment = #{pipeInvestment},</if>
<if test="nearbyAddress != null">nearby_address = #{nearbyAddress},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="isDel != null">is_del = #{isDel},</if>
<if test="remarks != null">remarks = #{remarks},</if>
</trim>
where project_id = #{projectId}
</update>
<update id="deleteTProjectInfoById" parameterType="Long">
update t_project_info set is_del='1' where project_id = #{projectId}
</update>
<update id="deleteTProjectInfoByIds" parameterType="String">
update t_project_info set is_del='1' where project_id in
<foreach item="projectId" collection="array" open="(" separator="," close=")">
#{projectId}
</foreach>
</update>
<!--查询是否已经有重复的年份数据-->
<select id="selectSameYear" resultMap="TProjectInfoResult">
select project_id from t_project_info where project_year=#{projectYear}
</select>
<!--重复年份删除方法-->
<update id="deleteisSameYear">
update t_project_info set is_del='1' where project_year=#{isSameYear}
</update>
<!--查询修改文件之前的路径-->
<select id="selectNearbyAddress" resultMap="TProjectInfoResult">
select nearby_address from t_project_info where project_id=#{projectId}
</select>
</mapper>
import request from '@/utils/request'
// 查询工程项目信息列表
export function listInfo(query) {
return request({
url: '/project/info/list',
method: 'get',
params: query
})
}
// 查询工程项目信息详细
export function getInfo(projectId) {
return request({
url: '/project/info/' + projectId,
method: 'get'
})
}
// 新增工程项目信息
export function addInfo(data) {
return request({
url: '/project/info',
method: 'post',
data: data
})
}
// 修改工程项目信息
export function updateInfo(data) {
return request({
url: '/project/info',
method: 'put',
data: data
})
}
// 删除工程项目信息
export function delInfo(projectId) {
return request({
url: '/project/info/' + projectId,
method: 'delete'
})
}
// 导出工程项目信息
export function exportInfo(query) {
return request({
url: '/project/info/export',
method: 'get',
params: query
})
}
\ No newline at end of file
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