Commit 3779046b authored by wuqinghua's avatar wuqinghua

2022-1-26 吴卿华 增加 从业人员,管道信息模块

parent d020ea4d
package com.zehong.web.controller.supervise;
import java.text.ParseException;
import java.util.List;
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.TEmployedPeopleInfo;
import com.zehong.system.service.ITEmployedPeopleInfoService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 从业人员信息Controller
*
* @author zehong
* @date 2022-01-25
*/
@RestController
@RequestMapping("/regulation/supervise")
public class TEmployedPeopleInfoController extends BaseController
{
@Autowired
private ITEmployedPeopleInfoService tEmployedPeopleInfoService;
/**
* 查询从业人员信息列表
*/
@PreAuthorize("@ss.hasPermi('regulation:supervise:list')")
@GetMapping("/list")
public TableDataInfo list(TEmployedPeopleInfo tEmployedPeopleInfo)
{
startPage();
List<TEmployedPeopleInfo> list = tEmployedPeopleInfoService.selectTEmployedPeopleInfoList(tEmployedPeopleInfo);
return getDataTable(list);
}
/**
* 导出从业人员信息列表
*/
@PreAuthorize("@ss.hasPermi('regulation:supervise:export')")
@Log(title = "从业人员信息", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TEmployedPeopleInfo tEmployedPeopleInfo)
{
List<TEmployedPeopleInfo> list = tEmployedPeopleInfoService.selectTEmployedPeopleInfoList(tEmployedPeopleInfo);
ExcelUtil<TEmployedPeopleInfo> util = new ExcelUtil<TEmployedPeopleInfo>(TEmployedPeopleInfo.class);
return util.exportExcel(list, "从业人员信息数据");
}
/**
* 获取从业人员信息详细信息
*/
@PreAuthorize("@ss.hasPermi('regulation:supervise:query')")
@GetMapping(value = "/{employedPeopleId}")
public AjaxResult getInfo(@PathVariable("employedPeopleId") Long employedPeopleId) throws ParseException {
TEmployedPeopleInfo tEmployedPeopleInfo = tEmployedPeopleInfoService.selectTEmployedPeopleInfoById(employedPeopleId);
return AjaxResult.success(tEmployedPeopleInfo);
}
/**
* 新增从业人员信息
*/
@PreAuthorize("@ss.hasPermi('regulation:supervise:add')")
@Log(title = "从业人员信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TEmployedPeopleInfo tEmployedPeopleInfo) throws ParseException {
//根据企业id查询企业名称
String EnterpriseName = tEmployedPeopleInfoService.selectEnterpriseName(tEmployedPeopleInfo.getBeyondEnterpriseId());
tEmployedPeopleInfo.setBeyondEnterpriseName(EnterpriseName);
return toAjax(tEmployedPeopleInfoService.insertTEmployedPeopleInfo(tEmployedPeopleInfo));
}
/**
* 修改从业人员信息
*/
@PreAuthorize("@ss.hasPermi('regulation:supervise:edit')")
@Log(title = "从业人员信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TEmployedPeopleInfo tEmployedPeopleInfo) throws ParseException {
//根据企业id查询企业名称
String EnterpriseName = tEmployedPeopleInfoService.selectEnterpriseName(tEmployedPeopleInfo.getBeyondEnterpriseId());
tEmployedPeopleInfo.setBeyondEnterpriseName(EnterpriseName);
return toAjax(tEmployedPeopleInfoService.updateTEmployedPeopleInfo(tEmployedPeopleInfo));
}
/**
* 删除从业人员信息
*/
@PreAuthorize("@ss.hasPermi('regulation:supervise:remove')")
@Log(title = "从业人员信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{employedPeopleIds}")
public AjaxResult remove(@PathVariable Long[] employedPeopleIds)
{
return toAjax(tEmployedPeopleInfoService.deleteTEmployedPeopleInfoByIds(employedPeopleIds));
}
/**
* 企业信息查询(下拉框)
*/
@Log(title = "企业信息查询")
@RequestMapping("/selectTEnterprise")
public AjaxResult select(){
return AjaxResult.success(tEmployedPeopleInfoService.selectTEnterprise());
}
}
package com.zehong.web.controller.supervise;
import java.util.List;
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.TPipeInfo;
import com.zehong.system.service.ITPipeInfoService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 管道信息Controller
*
* @author zehong
* @date 2022-01-26
*/
@RestController
@RequestMapping("/supervise/pipe")
public class TPipeInfoController extends BaseController
{
@Autowired
private ITPipeInfoService tPipeInfoService;
/**
* 查询管道信息列表
*/
@PreAuthorize("@ss.hasPermi('supervise:pipe:list')")
@GetMapping("/list")
public TableDataInfo list(TPipeInfo tPipeInfo)
{
startPage();
List<TPipeInfo> list = tPipeInfoService.selectTPipeInfoList(tPipeInfo);
return getDataTable(list);
}
/**
* 导出管道信息列表
*/
@PreAuthorize("@ss.hasPermi('supervise:pipe:export')")
@Log(title = "管道信息", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TPipeInfo tPipeInfo)
{
List<TPipeInfo> list = tPipeInfoService.selectTPipeInfoList(tPipeInfo);
ExcelUtil<TPipeInfo> util = new ExcelUtil<TPipeInfo>(TPipeInfo.class);
return util.exportExcel(list, "管道信息数据");
}
/**
* 获取管道信息详细信息
*/
@PreAuthorize("@ss.hasPermi('supervise:pipe:query')")
@GetMapping(value = "/{pipeId}")
public AjaxResult getInfo(@PathVariable("pipeId") Long pipeId)
{
return AjaxResult.success(tPipeInfoService.selectTPipeInfoById(pipeId));
}
/**
* 新增管道信息
*/
@PreAuthorize("@ss.hasPermi('supervise:pipe:add')")
@Log(title = "管道信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TPipeInfo tPipeInfo)
{
return toAjax(tPipeInfoService.insertTPipeInfo(tPipeInfo));
}
/**
* 修改管道信息
*/
@PreAuthorize("@ss.hasPermi('supervise:pipe:edit')")
@Log(title = "管道信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TPipeInfo tPipeInfo)
{
return toAjax(tPipeInfoService.updateTPipeInfo(tPipeInfo));
}
/**
* 删除管道信息
*/
@PreAuthorize("@ss.hasPermi('supervise:pipe:remove')")
@Log(title = "管道信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{pipeIds}")
public AjaxResult remove(@PathVariable Long[] pipeIds)
{
return toAjax(tPipeInfoService.deleteTPipeInfoByIds(pipeIds));
}
}
package com.zehong.web.timeconfig;
import javax.xml.crypto.Data;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
/**
* 时间工具类
*/
public class TimeConFig {
/**
* string时间戳转换时间方法
*/
public String setTime(String time) throws ParseException {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS Z");
Date d = format.parse(time.replace("Z", " UTC"));
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
String dateString = formatter.format(d);
return dateString;
}
/**
* string转换成data类型
*/
public Date getDate(String time) throws ParseException {
SimpleDateFormat formatter = new SimpleDateFormat( "yyyy-MM-dd ");
Date date = formatter.parse(time);
return date;
}
/**
* date类型时间加一天
*/
public Date getDateOne(Date time){
Calendar cal = Calendar.getInstance();
cal.setTime(time);
cal.add(Calendar.DATE, 1);
time = cal.getTime();
return time;
}
}
package com.zehong.system.domain;
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;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* 从业人员信息对象 t_employed_people_info
*
* @author zehong
* @date 2022-01-25
*/
public class TEmployedPeopleInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 从业人员id */
private Long employedPeopleId;
/** 姓名 */
@Excel(name = "姓名")
private String employedPeopleName;
/** 身份证号 */
@Excel(name = "身份证号")
private String idCard;
/** 证书编号 */
@Excel(name = "证书编号")
private String certificateNum;
/** 受聘企业名称 */
@Excel(name = "受聘企业名称")
private String beyondEnterpriseName;
/** 受聘企业id */
private Long beyondEnterpriseId;
/** 报考类型 */
@Excel(name = "报考类型")
private String registerExaminationType;
/** 人员类型:1.运行维护人员 2.抢修人员 */
@Excel(name = "人员类型")
private String peopleOccupation;
/** 发证日期 */
@Excel(name = "发证日期")
@JsonFormat(pattern="yyyy-MM-dd")
private String issueDate;
/** 证书变更情况 */
@Excel(name = "证书变更情况")
private String certificateChange;
/** 是否删除(0正常,1删除) */
private String isDel;
/** 备注 */
@Excel(name = "备注")
private String remarks;
public void setEmployedPeopleId(Long employedPeopleId)
{
this.employedPeopleId = employedPeopleId;
}
public Long getEmployedPeopleId()
{
return employedPeopleId;
}
public void setEmployedPeopleName(String employedPeopleName)
{
this.employedPeopleName = employedPeopleName;
}
public String getEmployedPeopleName()
{
return employedPeopleName;
}
public void setIdCard(String idCard)
{
this.idCard = idCard;
}
public String getIdCard()
{
return idCard;
}
public void setCertificateNum(String certificateNum)
{
this.certificateNum = certificateNum;
}
public String getCertificateNum()
{
return certificateNum;
}
public void setBeyondEnterpriseName(String beyondEnterpriseName)
{
this.beyondEnterpriseName = beyondEnterpriseName;
}
public String getBeyondEnterpriseName()
{
return beyondEnterpriseName;
}
public void setBeyondEnterpriseId(Long beyondEnterpriseId)
{
this.beyondEnterpriseId = beyondEnterpriseId;
}
public Long getBeyondEnterpriseId()
{
return beyondEnterpriseId;
}
public void setRegisterExaminationType(String registerExaminationType)
{
this.registerExaminationType = registerExaminationType;
}
public String getRegisterExaminationType()
{
return registerExaminationType;
}
public void setPeopleOccupation(String peopleOccupation)
{
this.peopleOccupation = peopleOccupation;
}
public String getPeopleOccupation()
{
return peopleOccupation;
}
public static long getSerialVersionUID() {
return serialVersionUID;
}
public String getIssueDate() {
return issueDate;
}
public void setIssueDate(String issueDate) {
this.issueDate = issueDate;
}
public void setCertificateChange(String certificateChange) {
this.certificateChange = certificateChange;
}
public String getCertificateChange()
{
return certificateChange;
}
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("employedPeopleId", getEmployedPeopleId())
.append("employedPeopleName", getEmployedPeopleName())
.append("idCard", getIdCard())
.append("certificateNum", getCertificateNum())
.append("beyondEnterpriseName", getBeyondEnterpriseName())
.append("beyondEnterpriseId", getBeyondEnterpriseId())
.append("registerExaminationType", getRegisterExaminationType())
.append("peopleOccupation", getPeopleOccupation())
.append("issueDate", getIssueDate())
.append("certificateChange", getCertificateChange())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("isDel", getIsDel())
.append("remarks", getRemarks())
.toString();
}
}
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_pipe_info
*
* @author zehong
* @date 2022-01-26
*/
public class TPipeInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 管道id */
private Long pipeId;
/** 管道长度 */
@Excel(name = "管道长度")
private BigDecimal pipeLength;
/** 管径 */
@Excel(name = "管径")
private BigDecimal pipeDiameter;
/** 压力 */
@Excel(name = "压力")
private BigDecimal pipePressure;
/** 材质 */
@Excel(name = "材质")
private String pipeMaterial;
/** 埋深 */
@Excel(name = "埋深")
private BigDecimal buriedDepth;
/** 走向 */
@Excel(name = "走向")
private String pipeTrend;
/** 人员类型:1.运行维护人员 2.抢修人员 */
@Excel(name = "人员类型")
private String peopleOccupation;
/** 建设年代 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "建设年代", width = 30, dateFormat = "yyyy-MM-dd")
private Date buildDate;
/** 建设单位 */
@Excel(name = "建设单位")
private String buildUnit;
/** 权属单位 */
@Excel(name = "权属单位")
private Long beyondEnterpriseId;
/** 权属单位名称 */
@Excel(name = "权属单位名称")
private String beyondEnterpriseName;
/** 坐标 */
@Excel(name = "坐标")
private String coordinates;
/** 是否删除(0正常,1删除) */
private String isDel;
/** 备注 */
@Excel(name = "备注")
private String remarks;
public void setPipeId(Long pipeId)
{
this.pipeId = pipeId;
}
public Long getPipeId()
{
return pipeId;
}
public void setPipeLength(BigDecimal pipeLength)
{
this.pipeLength = pipeLength;
}
public BigDecimal getPipeLength()
{
return pipeLength;
}
public void setPipeDiameter(BigDecimal pipeDiameter)
{
this.pipeDiameter = pipeDiameter;
}
public BigDecimal getPipeDiameter()
{
return pipeDiameter;
}
public void setPipePressure(BigDecimal pipePressure)
{
this.pipePressure = pipePressure;
}
public BigDecimal getPipePressure()
{
return pipePressure;
}
public void setPipeMaterial(String pipeMaterial)
{
this.pipeMaterial = pipeMaterial;
}
public String getPipeMaterial()
{
return pipeMaterial;
}
public void setBuriedDepth(BigDecimal buriedDepth)
{
this.buriedDepth = buriedDepth;
}
public BigDecimal getBuriedDepth()
{
return buriedDepth;
}
public void setPipeTrend(String pipeTrend)
{
this.pipeTrend = pipeTrend;
}
public String getPipeTrend()
{
return pipeTrend;
}
public void setPeopleOccupation(String peopleOccupation)
{
this.peopleOccupation = peopleOccupation;
}
public String getPeopleOccupation()
{
return peopleOccupation;
}
public void setBuildDate(Date buildDate)
{
this.buildDate = buildDate;
}
public Date getBuildDate()
{
return buildDate;
}
public void setBuildUnit(String buildUnit)
{
this.buildUnit = buildUnit;
}
public String getBuildUnit()
{
return buildUnit;
}
public void setBeyondEnterpriseId(Long beyondEnterpriseId)
{
this.beyondEnterpriseId = beyondEnterpriseId;
}
public Long getBeyondEnterpriseId()
{
return beyondEnterpriseId;
}
public void setBeyondEnterpriseName(String beyondEnterpriseName)
{
this.beyondEnterpriseName = beyondEnterpriseName;
}
public String getBeyondEnterpriseName()
{
return beyondEnterpriseName;
}
public void setCoordinates(String coordinates)
{
this.coordinates = coordinates;
}
public String getCoordinates()
{
return coordinates;
}
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("pipeId", getPipeId())
.append("pipeLength", getPipeLength())
.append("pipeDiameter", getPipeDiameter())
.append("pipePressure", getPipePressure())
.append("pipeMaterial", getPipeMaterial())
.append("buriedDepth", getBuriedDepth())
.append("pipeTrend", getPipeTrend())
.append("peopleOccupation", getPeopleOccupation())
.append("buildDate", getBuildDate())
.append("buildUnit", getBuildUnit())
.append("beyondEnterpriseId", getBeyondEnterpriseId())
.append("beyondEnterpriseName", getBeyondEnterpriseName())
.append("coordinates", getCoordinates())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("isDel", getIsDel())
.append("remarks", getRemarks())
.toString();
}
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TEmployedPeopleInfo;
import com.zehong.system.domain.TEnterpriseInfo;
/**
* 从业人员信息Mapper接口
*
* @author zehong
* @date 2022-01-25
*/
public interface TEmployedPeopleInfoMapper
{
/**
* 查询从业人员信息
*
* @param employedPeopleId 从业人员信息ID
* @return 从业人员信息
*/
public TEmployedPeopleInfo selectTEmployedPeopleInfoById(Long employedPeopleId);
/**
* 查询从业人员信息列表
*
* @param tEmployedPeopleInfo 从业人员信息
* @return 从业人员信息集合
*/
public List<TEmployedPeopleInfo> selectTEmployedPeopleInfoList(TEmployedPeopleInfo tEmployedPeopleInfo);
/**
* 新增从业人员信息
*
* @param tEmployedPeopleInfo 从业人员信息
* @return 结果
*/
public int insertTEmployedPeopleInfo(TEmployedPeopleInfo tEmployedPeopleInfo);
/**
* 修改从业人员信息
*
* @param tEmployedPeopleInfo 从业人员信息
* @return 结果
*/
public int updateTEmployedPeopleInfo(TEmployedPeopleInfo tEmployedPeopleInfo);
/**
* 删除从业人员信息
*
* @param employedPeopleId 从业人员信息ID
* @return 结果
*/
public int deleteTEmployedPeopleInfoById(Long employedPeopleId);
/**
* 批量删除从业人员信息
*
* @param employedPeopleIds 需要删除的数据ID
* @return 结果
*/
public int deleteTEmployedPeopleInfoByIds(Long[] employedPeopleIds);
/**
* 企业信息查询(下拉框数据)
* @return
*/
List<TEnterpriseInfo> selectTEnterprise();
/**
* 根据企业id查询企业名称
* @param bId
* @return
*/
String selectEnterpriseName(Long bId);
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TPipeInfo;
/**
* 管道信息Mapper接口
*
* @author zehong
* @date 2022-01-26
*/
public interface TPipeInfoMapper
{
/**
* 查询管道信息
*
* @param pipeId 管道信息ID
* @return 管道信息
*/
public TPipeInfo selectTPipeInfoById(Long pipeId);
/**
* 查询管道信息列表
*
* @param tPipeInfo 管道信息
* @return 管道信息集合
*/
public List<TPipeInfo> selectTPipeInfoList(TPipeInfo tPipeInfo);
/**
* 新增管道信息
*
* @param tPipeInfo 管道信息
* @return 结果
*/
public int insertTPipeInfo(TPipeInfo tPipeInfo);
/**
* 修改管道信息
*
* @param tPipeInfo 管道信息
* @return 结果
*/
public int updateTPipeInfo(TPipeInfo tPipeInfo);
/**
* 删除管道信息
*
* @param pipeId 管道信息ID
* @return 结果
*/
public int deleteTPipeInfoById(Long pipeId);
/**
* 批量删除管道信息
*
* @param pipeIds 需要删除的数据ID
* @return 结果
*/
public int deleteTPipeInfoByIds(Long[] pipeIds);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TEmployedPeopleInfo;
import com.zehong.system.domain.TEnterpriseInfo;
/**
* 从业人员信息Service接口
*
* @author zehong
* @date 2022-01-25
*/
public interface ITEmployedPeopleInfoService
{
/**
* 查询从业人员信息
*
* @param employedPeopleId 从业人员信息ID
* @return 从业人员信息
*/
public TEmployedPeopleInfo selectTEmployedPeopleInfoById(Long employedPeopleId);
/**
* 查询从业人员信息列表
*
* @param tEmployedPeopleInfo 从业人员信息
* @return 从业人员信息集合
*/
public List<TEmployedPeopleInfo> selectTEmployedPeopleInfoList(TEmployedPeopleInfo tEmployedPeopleInfo);
/**
* 新增从业人员信息
*
* @param tEmployedPeopleInfo 从业人员信息
* @return 结果
*/
public int insertTEmployedPeopleInfo(TEmployedPeopleInfo tEmployedPeopleInfo);
/**
* 修改从业人员信息
*
* @param tEmployedPeopleInfo 从业人员信息
* @return 结果
*/
public int updateTEmployedPeopleInfo(TEmployedPeopleInfo tEmployedPeopleInfo);
/**
* 批量删除从业人员信息
*
* @param employedPeopleIds 需要删除的从业人员信息ID
* @return 结果
*/
public int deleteTEmployedPeopleInfoByIds(Long[] employedPeopleIds);
/**
* 删除从业人员信息信息
*
* @param employedPeopleId 从业人员信息ID
* @return 结果
*/
public int deleteTEmployedPeopleInfoById(Long employedPeopleId);
/**
* 企业信息查询(下拉框数据)
* @return
*/
public List<TEnterpriseInfo> selectTEnterprise();
/**
* 根据企业id查询企业名称
* @return
*/
String selectEnterpriseName(Long bId);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TPipeInfo;
/**
* 管道信息Service接口
*
* @author zehong
* @date 2022-01-26
*/
public interface ITPipeInfoService
{
/**
* 查询管道信息
*
* @param pipeId 管道信息ID
* @return 管道信息
*/
public TPipeInfo selectTPipeInfoById(Long pipeId);
/**
* 查询管道信息列表
*
* @param tPipeInfo 管道信息
* @return 管道信息集合
*/
public List<TPipeInfo> selectTPipeInfoList(TPipeInfo tPipeInfo);
/**
* 新增管道信息
*
* @param tPipeInfo 管道信息
* @return 结果
*/
public int insertTPipeInfo(TPipeInfo tPipeInfo);
/**
* 修改管道信息
*
* @param tPipeInfo 管道信息
* @return 结果
*/
public int updateTPipeInfo(TPipeInfo tPipeInfo);
/**
* 批量删除管道信息
*
* @param pipeIds 需要删除的管道信息ID
* @return 结果
*/
public int deleteTPipeInfoByIds(Long[] pipeIds);
/**
* 删除管道信息信息
*
* @param pipeId 管道信息ID
* @return 结果
*/
public int deleteTPipeInfoById(Long pipeId);
}
package com.zehong.system.service.impl;
import java.util.List;
import com.zehong.common.utils.DateUtils;
import com.zehong.system.domain.TEnterpriseInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TEmployedPeopleInfoMapper;
import com.zehong.system.domain.TEmployedPeopleInfo;
import com.zehong.system.service.ITEmployedPeopleInfoService;
/**
* 从业人员信息Service业务层处理
*
* @author zehong
* @date 2022-01-25
*/
@Service
public class TEmployedPeopleInfoServiceImpl implements ITEmployedPeopleInfoService
{
@Autowired
private TEmployedPeopleInfoMapper tEmployedPeopleInfoMapper;
/**
* 查询从业人员信息
*
* @param employedPeopleId 从业人员信息ID
* @return 从业人员信息
*/
@Override
public TEmployedPeopleInfo selectTEmployedPeopleInfoById(Long employedPeopleId)
{
return tEmployedPeopleInfoMapper.selectTEmployedPeopleInfoById(employedPeopleId);
}
/**
* 查询从业人员信息列表
*
* @param tEmployedPeopleInfo 从业人员信息
* @return 从业人员信息
*/
@Override
public List<TEmployedPeopleInfo> selectTEmployedPeopleInfoList(TEmployedPeopleInfo tEmployedPeopleInfo)
{
return tEmployedPeopleInfoMapper.selectTEmployedPeopleInfoList(tEmployedPeopleInfo);
}
/**
* 新增从业人员信息
*
* @param tEmployedPeopleInfo 从业人员信息
* @return 结果
*/
@Override
public int insertTEmployedPeopleInfo(TEmployedPeopleInfo tEmployedPeopleInfo)
{
tEmployedPeopleInfo.setCreateTime(DateUtils.getNowDate());
return tEmployedPeopleInfoMapper.insertTEmployedPeopleInfo(tEmployedPeopleInfo);
}
/**
* 修改从业人员信息
*
* @param tEmployedPeopleInfo 从业人员信息
* @return 结果
*/
@Override
public int updateTEmployedPeopleInfo(TEmployedPeopleInfo tEmployedPeopleInfo)
{
tEmployedPeopleInfo.setUpdateTime(DateUtils.getNowDate());
return tEmployedPeopleInfoMapper.updateTEmployedPeopleInfo(tEmployedPeopleInfo);
}
/**
* 批量删除从业人员信息
*
* @param employedPeopleIds 需要删除的从业人员信息ID
* @return 结果
*/
@Override
public int deleteTEmployedPeopleInfoByIds(Long[] employedPeopleIds)
{
return tEmployedPeopleInfoMapper.deleteTEmployedPeopleInfoByIds(employedPeopleIds);
}
/**
* 删除从业人员信息信息
*
* @param employedPeopleId 从业人员信息ID
* @return 结果
*/
@Override
public int deleteTEmployedPeopleInfoById(Long employedPeopleId)
{
return tEmployedPeopleInfoMapper.deleteTEmployedPeopleInfoById(employedPeopleId);
}
/**
* 企业信息查询(下拉框数据)
* @return
*/
@Override
public List<TEnterpriseInfo> selectTEnterprise() {
return tEmployedPeopleInfoMapper.selectTEnterprise();
}
/**
* 根据企业id查询企业名称
* @param bId
* @return
*/
@Override
public String selectEnterpriseName(Long bId) {
String s = tEmployedPeopleInfoMapper.selectEnterpriseName(bId);
return s;
}
}
package com.zehong.system.service.impl;
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.TPipeInfoMapper;
import com.zehong.system.domain.TPipeInfo;
import com.zehong.system.service.ITPipeInfoService;
/**
* 管道信息Service业务层处理
*
* @author zehong
* @date 2022-01-26
*/
@Service
public class TPipeInfoServiceImpl implements ITPipeInfoService
{
@Autowired
private TPipeInfoMapper tPipeInfoMapper;
/**
* 查询管道信息
*
* @param pipeId 管道信息ID
* @return 管道信息
*/
@Override
public TPipeInfo selectTPipeInfoById(Long pipeId)
{
return tPipeInfoMapper.selectTPipeInfoById(pipeId);
}
/**
* 查询管道信息列表
*
* @param tPipeInfo 管道信息
* @return 管道信息
*/
@Override
public List<TPipeInfo> selectTPipeInfoList(TPipeInfo tPipeInfo)
{
return tPipeInfoMapper.selectTPipeInfoList(tPipeInfo);
}
/**
* 新增管道信息
*
* @param tPipeInfo 管道信息
* @return 结果
*/
@Override
public int insertTPipeInfo(TPipeInfo tPipeInfo)
{
tPipeInfo.setCreateTime(DateUtils.getNowDate());
return tPipeInfoMapper.insertTPipeInfo(tPipeInfo);
}
/**
* 修改管道信息
*
* @param tPipeInfo 管道信息
* @return 结果
*/
@Override
public int updateTPipeInfo(TPipeInfo tPipeInfo)
{
tPipeInfo.setUpdateTime(DateUtils.getNowDate());
return tPipeInfoMapper.updateTPipeInfo(tPipeInfo);
}
/**
* 批量删除管道信息
*
* @param pipeIds 需要删除的管道信息ID
* @return 结果
*/
@Override
public int deleteTPipeInfoByIds(Long[] pipeIds)
{
return tPipeInfoMapper.deleteTPipeInfoByIds(pipeIds);
}
/**
* 删除管道信息信息
*
* @param pipeId 管道信息ID
* @return 结果
*/
@Override
public int deleteTPipeInfoById(Long pipeId)
{
return tPipeInfoMapper.deleteTPipeInfoById(pipeId);
}
}
<?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.TEmployedPeopleInfoMapper">
<resultMap type="TEmployedPeopleInfo" id="TEmployedPeopleInfoResult">
<result property="employedPeopleId" column="employed_people_id" />
<result property="employedPeopleName" column="employed_people_name" />
<result property="idCard" column="id_card" />
<result property="certificateNum" column="certificate_num" />
<result property="beyondEnterpriseName" column="beyond_enterprise_name" />
<result property="beyondEnterpriseId" column="beyond_enterprise_id" />
<result property="registerExaminationType" column="register_examination_type" />
<result property="peopleOccupation" column="people_occupation" />
<result property="issueDate" column="issue_date" />
<result property="certificateChange" column="certificate_change" />
<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>
<resultMap type="TEnterpriseInfo" id="TEnterpriseInfoResult">
<result property="enterpriseId" column="enterprise_id" />
<result property="enterpriseName" column="enterprise_name" />
<result property="registerAddress" column="register_address" />
<result property="legalRepresentative" column="legal_representative" />
<result property="businessArea" column="business_area" />
<result property="licenseKey" column="license_key" />
<result property="licenseValidityTime" column="license_validity_time" />
<result property="annualSupervisionInspection" column="annual_supervision_inspection" />
<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="selectTEmployedPeopleInfoVo">
select employed_people_id, employed_people_name, id_card, certificate_num, beyond_enterprise_name, beyond_enterprise_id, register_examination_type, (CASE people_occupation WHEN '1' THEN '运行维护人员' WHEN '2' THEN '抢修人员'end ) as people_occupation, issue_date, certificate_change, create_by, create_time, update_by, update_time, is_del, remarks from t_employed_people_info
</sql>
<select id="selectTEmployedPeopleInfoList" parameterType="TEmployedPeopleInfo" resultMap="TEmployedPeopleInfoResult">
select employed_people_id, employed_people_name, id_card, certificate_num, beyond_enterprise_name, beyond_enterprise_id, register_examination_type,(CASE people_occupation WHEN '1' THEN '运行维护人员' WHEN '2' THEN '抢修人员'end ) as people_occupation, issue_date, certificate_change, create_by, create_time, update_by, update_time, is_del, remarks from t_employed_people_info
<where>
1=1 and is_del='0'
<if test="employedPeopleName != null and employedPeopleName != ''"> and employed_people_name like concat('%', #{employedPeopleName}, '%')</if>
<if test="idCard != null and idCard != ''"> and id_card = #{idCard}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
</where>
</select>
<select id="selectTEmployedPeopleInfoById" parameterType="Long" resultMap="TEmployedPeopleInfoResult">
select employed_people_id, employed_people_name, id_card, certificate_num, beyond_enterprise_name, beyond_enterprise_id, register_examination_type, people_occupation, issue_date, certificate_change, create_by, create_time, update_by, update_time, is_del, remarks from t_employed_people_info
where employed_people_id = #{employedPeopleId} and is_del='0'
</select>
<insert id="insertTEmployedPeopleInfo" parameterType="TEmployedPeopleInfo" useGeneratedKeys="true" keyProperty="employedPeopleId">
insert into t_employed_people_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="employedPeopleName != null">employed_people_name,</if>
<if test="idCard != null">id_card,</if>
<if test="certificateNum != null">certificate_num,</if>
<if test="beyondEnterpriseName != null">beyond_enterprise_name,</if>
<if test="beyondEnterpriseId != null">beyond_enterprise_id,</if>
<if test="registerExaminationType != null">register_examination_type,</if>
<if test="peopleOccupation != null">people_occupation,</if>
<if test="issueDate != null">issue_date,</if>
<if test="certificateChange != null">certificate_change,</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="employedPeopleName != null">#{employedPeopleName},</if>
<if test="idCard != null">#{idCard},</if>
<if test="certificateNum != null">#{certificateNum},</if>
<if test="beyondEnterpriseName != null">#{beyondEnterpriseName},</if>
<if test="beyondEnterpriseId != null">#{beyondEnterpriseId},</if>
<if test="registerExaminationType != null">#{registerExaminationType},</if>
<if test="peopleOccupation != null">#{peopleOccupation},</if>
<if test="issueDate != null">#{issueDate},</if>
<if test="certificateChange != null">#{certificateChange},</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="updateTEmployedPeopleInfo" parameterType="TEmployedPeopleInfo">
update t_employed_people_info
<trim prefix="SET" suffixOverrides=",">
<if test="employedPeopleName != null">employed_people_name = #{employedPeopleName},</if>
<if test="idCard != null">id_card = #{idCard},</if>
<if test="certificateNum != null">certificate_num = #{certificateNum},</if>
<if test="beyondEnterpriseName != null">beyond_enterprise_name = #{beyondEnterpriseName},</if>
<if test="beyondEnterpriseId != null">beyond_enterprise_id = #{beyondEnterpriseId},</if>
<if test="registerExaminationType != null">register_examination_type = #{registerExaminationType},</if>
<if test="peopleOccupation != null">people_occupation = #{peopleOccupation},</if>
<if test="issueDate != null">issue_date = #{issueDate},</if>
<if test="certificateChange != null">certificate_change = #{certificateChange},</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 employed_people_id = #{employedPeopleId}
</update>
<update id="deleteTEmployedPeopleInfoById" parameterType="Long">
update t_employed_people_info set is_del='1' where employed_people_id = #{employedPeopleId}
</update>
<update id="deleteTEmployedPeopleInfoByIds" parameterType="String">
update t_employed_people_info set is_del='1' where employed_people_id in
<foreach item="employedPeopleId" collection="array" open="(" separator="," close=")">
#{employedPeopleId}
</foreach>
</update>
<!--企业信息查询(下拉框数据)-->
<select id="selectTEnterprise" resultMap="TEnterpriseInfoResult">
select enterprise_id,enterprise_name from t_enterprise_info where is_del='0'
</select>
<!--根据企业id查询企业名称-->
<select id="selectEnterpriseName" resultType="String">
select enterprise_name from t_enterprise_info where enterprise_id=#{bId} and is_del='0'
</select>
</mapper>
<?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.TPipeInfoMapper">
<resultMap type="TPipeInfo" id="TPipeInfoResult">
<result property="pipeId" column="pipe_id" />
<result property="pipeLength" column="pipe_length" />
<result property="pipeDiameter" column="pipe_diameter" />
<result property="pipePressure" column="pipe_pressure" />
<result property="pipeMaterial" column="pipe_material" />
<result property="buriedDepth" column="buried_depth" />
<result property="pipeTrend" column="pipe_trend" />
<result property="peopleOccupation" column="people_occupation" />
<result property="buildDate" column="build_date" />
<result property="buildUnit" column="build_unit" />
<result property="beyondEnterpriseId" column="beyond_enterprise_id" />
<result property="beyondEnterpriseName" column="beyond_enterprise_name" />
<result property="coordinates" column="coordinates" />
<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="selectTPipeInfoVo">
select pipe_id, pipe_length, pipe_diameter, pipe_pressure, pipe_material, buried_depth, pipe_trend, (CASE people_occupation WHEN '1' THEN '运行维护人员' WHEN '2' THEN '抢修人员'end ) as people_occupation, build_date, build_unit, beyond_enterprise_id, beyond_enterprise_name, coordinates, create_by, create_time, update_by, update_time, is_del, remarks from t_pipe_info
</sql>
<select id="selectTPipeInfoList" parameterType="TPipeInfo" resultMap="TPipeInfoResult">
<include refid="selectTPipeInfoVo"/>
<where>
is_del='0'
<if test="pipeLength != null "> and pipe_length = #{pipeLength}</if>
<if test="pipeDiameter != null "> and pipe_diameter = #{pipeDiameter}</if>
<if test="pipePressure != null "> and pipe_pressure = #{pipePressure}</if>
<if test="pipeMaterial != null and pipeMaterial != ''"> and pipe_material = #{pipeMaterial}</if>
<if test="buriedDepth != null "> and buried_depth = #{buriedDepth}</if>
<if test="pipeTrend != null and pipeTrend != ''"> and pipe_trend = #{pipeTrend}</if>
<if test="peopleOccupation != null and peopleOccupation != ''"> and people_occupation = #{peopleOccupation}</if>
<if test="buildDate != null "> and build_date = #{buildDate}</if>
<if test="buildUnit != null and buildUnit != ''"> and build_unit = #{buildUnit}</if>
<if test="beyondEnterpriseId != null "> and beyond_enterprise_id = #{beyondEnterpriseId}</if>
<if test="beyondEnterpriseName != null and beyondEnterpriseName != ''"> and beyond_enterprise_name like concat('%', #{beyondEnterpriseName}, '%')</if>
<if test="coordinates != null and coordinates != ''"> and coordinates = #{coordinates}</if>
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
</where>
</select>
<select id="selectTPipeInfoById" parameterType="Long" resultMap="TPipeInfoResult">
select pipe_id, pipe_length, pipe_diameter, pipe_pressure, pipe_material, buried_depth, pipe_trend,people_occupation, build_date, build_unit, beyond_enterprise_id, beyond_enterprise_name, coordinates, create_by, create_time, update_by, update_time, is_del, remarks from t_pipe_info
where pipe_id = #{pipeId} and is_del='0'
</select>
<insert id="insertTPipeInfo" parameterType="TPipeInfo" useGeneratedKeys="true" keyProperty="pipeId">
insert into t_pipe_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="pipeLength != null">pipe_length,</if>
<if test="pipeDiameter != null">pipe_diameter,</if>
<if test="pipePressure != null">pipe_pressure,</if>
<if test="pipeMaterial != null">pipe_material,</if>
<if test="buriedDepth != null">buried_depth,</if>
<if test="pipeTrend != null">pipe_trend,</if>
<if test="peopleOccupation != null">people_occupation,</if>
<if test="buildDate != null">build_date,</if>
<if test="buildUnit != null">build_unit,</if>
<if test="beyondEnterpriseId != null">beyond_enterprise_id,</if>
<if test="beyondEnterpriseName != null">beyond_enterprise_name,</if>
<if test="coordinates != null">coordinates,</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="pipeLength != null">#{pipeLength},</if>
<if test="pipeDiameter != null">#{pipeDiameter},</if>
<if test="pipePressure != null">#{pipePressure},</if>
<if test="pipeMaterial != null">#{pipeMaterial},</if>
<if test="buriedDepth != null">#{buriedDepth},</if>
<if test="pipeTrend != null">#{pipeTrend},</if>
<if test="peopleOccupation != null">#{peopleOccupation},</if>
<if test="buildDate != null">#{buildDate},</if>
<if test="buildUnit != null">#{buildUnit},</if>
<if test="beyondEnterpriseId != null">#{beyondEnterpriseId},</if>
<if test="beyondEnterpriseName != null">#{beyondEnterpriseName},</if>
<if test="coordinates != null">#{coordinates},</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="updateTPipeInfo" parameterType="TPipeInfo">
update t_pipe_info
<trim prefix="SET" suffixOverrides=",">
<if test="pipeLength != null">pipe_length = #{pipeLength},</if>
<if test="pipeDiameter != null">pipe_diameter = #{pipeDiameter},</if>
<if test="pipePressure != null">pipe_pressure = #{pipePressure},</if>
<if test="pipeMaterial != null">pipe_material = #{pipeMaterial},</if>
<if test="buriedDepth != null">buried_depth = #{buriedDepth},</if>
<if test="pipeTrend != null">pipe_trend = #{pipeTrend},</if>
<if test="peopleOccupation != null">people_occupation = #{peopleOccupation},</if>
<if test="buildDate != null">build_date = #{buildDate},</if>
<if test="buildUnit != null">build_unit = #{buildUnit},</if>
<if test="beyondEnterpriseId != null">beyond_enterprise_id = #{beyondEnterpriseId},</if>
<if test="beyondEnterpriseName != null">beyond_enterprise_name = #{beyondEnterpriseName},</if>
<if test="coordinates != null">coordinates = #{coordinates},</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 pipe_id = #{pipeId}
</update>
<update id="deleteTPipeInfoById" parameterType="Long">
update t_pipe_info set is_del='1' where pipe_id = #{pipeId}
</update>
<update id="deleteTPipeInfoByIds" parameterType="String">
update t_pipe_info set is_del='1' where pipe_id in
<foreach item="pipeId" collection="array" open="(" separator="," close=")">
#{pipeId}
</foreach>
</update>
</mapper>
import request from '@/utils/request'
// 查询管道信息列表
export function listPipe(query) {
return request({
url: '/supervise/pipe/list',
method: 'get',
params: query
})
}
// 查询管道信息详细
export function getPipe(pipeId) {
return request({
url: '/supervise/pipe/' + pipeId,
method: 'get'
})
}
// 新增管道信息
export function addPipe(data) {
return request({
url: '/supervise/pipe',
method: 'post',
data: data
})
}
// 修改管道信息
export function updatePipe(data) {
return request({
url: '/supervise/pipe',
method: 'put',
data: data
})
}
// 删除管道信息
export function delPipe(pipeId) {
return request({
url: '/supervise/pipe/' + pipeId,
method: 'delete'
})
}
// 导出管道信息
export function exportPipe(query) {
return request({
url: '/supervise/pipe/export',
method: 'get',
params: query
})
}
\ No newline at end of file
import request from '@/utils/request'
// 查询从业人员信息列表
export function listInfo(query) {
return request({
url: '/regulation/supervise/list',
method: 'get',
params: query
})
}
// 查询从业人员信息详细
export function getInfo(employedPeopleId) {
return request({
url: '/regulation/supervise/' + employedPeopleId,
method: 'get'
})
}
// 新增从业人员信息
export function addInfo(data) {
return request({
url: '/regulation/supervise',
method: 'post',
data: data
})
}
// 修改从业人员信息
export function updateInfo(data) {
return request({
url: '/regulation/supervise',
method: 'put',
data: data
})
}
// 删除从业人员信息
export function delInfo(employedPeopleId) {
return request({
url: '/regulation/supervise/' + employedPeopleId,
method: 'delete'
})
}
// 导出从业人员信息
export function exportInfo(query) {
return request({
url: '/regulation/supervise/export',
method: 'get',
params: query
})
}
// 企业信息查询(下拉框)
export function selectTEnterprise() {
return request({
url: '/regulation/supervise/selectTEnterprise',
method: 'get'
})
}
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="管道长度" prop="pipeLength">
<el-input
v-model="queryParams.pipeLength"
placeholder="请输入管道长度"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="管径" prop="pipeDiameter">
<el-input
v-model="queryParams.pipeDiameter"
placeholder="请输入管径"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="压力" prop="pipePressure">
<el-input
v-model="queryParams.pipePressure"
placeholder="请输入压力"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['supervise:pipe:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['supervise:pipe:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['supervise:pipe:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
:loading="exportLoading"
@click="handleExport"
v-hasPermi="['supervise:pipe:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="pipeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="管道长度" align="center" prop="pipeLength" />
<el-table-column label="走向" align="center" prop="pipeTrend" />
<el-table-column label="人员类型" align="center" prop="peopleOccupation" />
<el-table-column label="建设年代" align="center" prop="buildDate" />
<el-table-column label="建设单位" align="center" prop="buildUnit" />
<el-table-column label="权属单位" align="center" prop="beyondEnterpriseId" />
<el-table-column label="坐标" align="center" prop="coordinates" />
<el-table-column label="备注" align="center" prop="remarks" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['supervise:pipe:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['supervise:pipe:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改管道信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="管道长度" prop="pipeLength">
<el-input v-model="form.pipeLength" placeholder="请输入管道长度" />
</el-form-item>
<el-form-item label="管径" prop="pipeDiameter">
<el-input v-model="form.pipeDiameter" placeholder="请输入管径" />
</el-form-item>
<el-form-item label="压力" prop="pipePressure">
<el-input v-model="form.pipePressure" placeholder="请输入压力" />
</el-form-item>
<el-form-item label="材质" prop="pipeMaterial">
<el-input v-model="form.pipeMaterial" placeholder="请输入材质" />
</el-form-item>
<el-form-item label="埋深" prop="buriedDepth">
<el-input v-model="form.buriedDepth" placeholder="请输入埋深" />
</el-form-item>
<el-form-item label="走向" prop="pipeTrend">
<el-input v-model="form.pipeTrend" placeholder="请输入走向" />
</el-form-item>
<el-form-item label="人员类型" prop="peopleOccupation">
<el-select v-model="form.peopleOccupation" placeholder="请选择人员类型">
<el-option label="运行维护人员" value="1" />
<el-option label="抢修人员" value="2" />
</el-select>
</el-form-item>
<el-form-item label="建设年代" prop="buildDate">
<el-date-picker
v-model="form.buildDate"
type="date"
placeholder="请选择建设年代"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<el-form-item label="建设单位" prop="buildUnit">
<el-input v-model="form.buildUnit" placeholder="请输入建设单位" />
</el-form-item>
<el-form-item label="权属单位" prop="beyondEnterpriseId">
<el-input v-model="form.beyondEnterpriseId" placeholder="请输入权属单位" />
</el-form-item>
<el-form-item label="权属单位名称" prop="beyondEnterpriseName">
<el-input v-model="form.beyondEnterpriseName" placeholder="请输入权属单位名称" />
</el-form-item>
<el-form-item label="坐标" prop="coordinates">
<el-input v-model="form.coordinates" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="备注" prop="remarks">
<el-input v-model="form.remarks" placeholder="请输入备注" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listPipe, getPipe, delPipe, addPipe, updatePipe, exportPipe } from "@/api/regulation/pipe";
export default {
name: "Pipe",
components: {
},
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 管道信息表格数据
pipeList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
pipeLength: null,
pipeDiameter: null,
pipePressure: null,
pipeMaterial: null,
buriedDepth: null,
pipeTrend: null,
peopleOccupation: null,
buildDate: null,
buildUnit: null,
beyondEnterpriseId: null,
beyondEnterpriseName: null,
coordinates: null,
isDel: null,
remarks: null
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询管道信息列表 */
getList() {
this.loading = true;
listPipe(this.queryParams).then(response => {
this.pipeList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
pipeId: null,
pipeLength: null,
pipeDiameter: null,
pipePressure: null,
pipeMaterial: null,
buriedDepth: null,
pipeTrend: null,
peopleOccupation: null,
buildDate: null,
buildUnit: null,
beyondEnterpriseId: null,
beyondEnterpriseName: null,
coordinates: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
isDel: null,
remarks: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.pipeId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加管道信息";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const pipeId = row.pipeId || this.ids
getPipe(pipeId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改管道信息";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.pipeId != null) {
updatePipe(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addPipe(this.form).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const pipeIds = row.pipeId || this.ids;
this.$confirm('是否确认删除管道信息编号为"' + pipeIds + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delPipe(pipeIds);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有管道信息数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportPipe(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="姓名" prop="employedPeopleName">
<el-input
v-model="queryParams.employedPeopleName"
placeholder="请输入姓名"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="身份证号" prop="idCard">
<el-input
v-model="queryParams.idCard"
placeholder="请输入身份证号"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="备注" prop="remarks">
<el-input
v-model="queryParams.remarks"
placeholder="请输入备注"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['regulation:supervise:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['regulation:supervise:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['regulation:supervise:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
:loading="exportLoading"
@click="handleExport"
v-hasPermi="['regulation:supervise:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="姓名" align="center" prop="employedPeopleName" />
<el-table-column label="身份证号" align="center" prop="idCard" />
<el-table-column label="证书编号" align="center" prop="certificateNum" />
<el-table-column label="受聘企业名称" align="center" prop="beyondEnterpriseName" />
<el-table-column label="报考类型" align="center" prop="registerExaminationType" />
<el-table-column label="人员类型" align="center" prop="peopleOccupation" />
<el-table-column label="发证日期" align="center" prop="issueDate" />
<el-table-column label="证书变更情况" align="center" prop="certificateChange" />
<el-table-column label="备注" align="center" prop="remarks" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['regulation:supervise:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['regulation:supervise:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改从业人员信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="姓名" prop="employedPeopleName">
<el-input v-model="form.employedPeopleName" placeholder="请输入姓名" />
</el-form-item>
<el-form-item label="身份证号" prop="idCard">
<el-input v-model="form.idCard" placeholder="请输入身份证号" />
</el-form-item>
<el-form-item label="证书编号" prop="certificateNum">
<el-input v-model="form.certificateNum" placeholder="请输入证书编号" />
</el-form-item>
<el-form-item label="受聘企业名称" prop="beyondEnterpriseName">
<el-select v-model="form.beyondEnterpriseId" placeholder="请在下拉框中选择名称" maxlength="255" :disabled="false" clearable>
<el-option v-for="item in test" :key="item.enterpriseId" :label="item.enterpriseName" :value="item.enterpriseId">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="报考类型" prop="registerExaminationType">
<el-input v-model="form.registerExaminationType" placeholder="请输入报考类型" />
</el-form-item>
<el-form-item label="人员类型" prop="peopleOccupation">
<el-select v-model="form.peopleOccupation" placeholder="请选择人员类型">
<el-option label="运行维护人员" value="1" />
<el-option label="抢修人员" value="2" />
</el-select>
</el-form-item>
<el-form-item label="发证日期" prop="issueDate">
<el-date-picker
v-model="form.issueDate"
type="date"
placeholder="请输入发证日期"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<el-form-item label="证书变更情况" prop="certificateChange">
<el-input v-model="form.certificateChange" placeholder="请输入证书变更情况" />
</el-form-item>
<el-form-item label="备注" prop="remarks">
<el-input v-model="form.remarks" placeholder="请输入备注" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listInfo, getInfo, delInfo, addInfo, updateInfo, exportInfo, selectTEnterprise} from "@/api/regulation/supervise";
export default {
name: "Info",
components: {
},
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 从业人员信息表格数据
infoList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
employedPeopleName: null,
idCard: null,
remarks: null
},
// 表单参数
form: {},
//下拉框数据
test:{},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询从业人员信息列表 */
getList() {
this.loading = true;
listInfo(this.queryParams).then(response => {
this.infoList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
employedPeopleId: null,
employedPeopleName: null,
idCard: null,
certificateNum: null,
beyondEnterpriseName: null,
beyondEnterpriseId: null,
registerExaminationType: null,
peopleOccupation: null,
issueDate: null,
certificateChange: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
isDel: null,
remarks: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.employedPeopleId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
//查询企业名称下拉框数据
selectTEnterprise().then(response => {
this.test = response.data;
});
this.reset();
this.open = true;
this.title = "添加从业人员信息";
},
/** 修改按钮操作 */
handleUpdate(row) {
//查询企业名称下拉框数据
selectTEnterprise().then(response => {
this.test = response.data;
});
this.reset();
const employedPeopleId = row.employedPeopleId || this.ids
getInfo(employedPeopleId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改从业人员信息";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.employedPeopleId != null) {
updateInfo(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addInfo(this.form).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const employedPeopleIds = row.employedPeopleId || this.ids;
this.$confirm('是否确认删除从业人员信息编号为"' + employedPeopleIds + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delInfo(employedPeopleIds);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有从业人员信息数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportInfo(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
},
}
};
</script>
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