Commit 23d69d1a authored by wanghao's avatar wanghao

1 液化石油气监管-液化气用户模块功能开发。

parent 90e65fbb
package com.zehong.web.controller.lpgRegulation;
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.TYehuaqiuserSafetyDeviceInfo;
import com.zehong.system.service.ITYehuaqiuserSafetyDeviceInfoService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 液化石油气监管-液化气用户-安全装置加装维护Controller
*
* @author zehong
* @date 2024-09-09
*/
@RestController
@RequestMapping("/yehuaqiUserSafetyDeviceInfo/info")
public class TYehuaqiuserSafetyDeviceInfoController extends BaseController
{
@Autowired
private ITYehuaqiuserSafetyDeviceInfoService tYehuaqiuserSafetyDeviceInfoService;
/**
* 查询液化石油气监管-液化气用户-安全装置加装维护列表
*/
@GetMapping("/list")
public TableDataInfo list(TYehuaqiuserSafetyDeviceInfo tYehuaqiuserSafetyDeviceInfo)
{
startPage();
List<TYehuaqiuserSafetyDeviceInfo> list = tYehuaqiuserSafetyDeviceInfoService.selectTYehuaqiuserSafetyDeviceInfoList(tYehuaqiuserSafetyDeviceInfo);
return getDataTable(list);
}
/**
* 根据 燃气用户id 查询集合数据
* @param userId i
*/
@GetMapping("/queryDeviceInfoByUserId/{userId}")
public AjaxResult queryDeviceInfoByUserId(@PathVariable("userId") Long userId){
return AjaxResult.success(tYehuaqiuserSafetyDeviceInfoService.queryDeviceInfoByUserId(userId));
}
/**
* 导出液化石油气监管-液化气用户-安全装置加装维护列表
*/
@Log(title = "液化石油气监管-液化气用户-安全装置加装维护", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TYehuaqiuserSafetyDeviceInfo tYehuaqiuserSafetyDeviceInfo)
{
List<TYehuaqiuserSafetyDeviceInfo> list = tYehuaqiuserSafetyDeviceInfoService.selectTYehuaqiuserSafetyDeviceInfoList(tYehuaqiuserSafetyDeviceInfo);
ExcelUtil<TYehuaqiuserSafetyDeviceInfo> util = new ExcelUtil<TYehuaqiuserSafetyDeviceInfo>(TYehuaqiuserSafetyDeviceInfo.class);
return util.exportExcel(list, "液化石油气监管-液化气用户-安全装置加装维护数据");
}
/**
* 获取液化石油气监管-液化气用户-安全装置加装维护详细信息
*/
@GetMapping(value = "/{fSafetyDeviceId}")
public AjaxResult getInfo(@PathVariable("fSafetyDeviceId") Long fSafetyDeviceId)
{
return AjaxResult.success(tYehuaqiuserSafetyDeviceInfoService.selectTYehuaqiuserSafetyDeviceInfoById(fSafetyDeviceId));
}
/**
* 新增液化石油气监管-液化气用户-安全装置加装维护
*/
@Log(title = "液化石油气监管-液化气用户-安全装置加装维护", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TYehuaqiuserSafetyDeviceInfo tYehuaqiuserSafetyDeviceInfo)
{
return toAjax(tYehuaqiuserSafetyDeviceInfoService.insertTYehuaqiuserSafetyDeviceInfo(tYehuaqiuserSafetyDeviceInfo));
}
/**
* 修改液化石油气监管-液化气用户-安全装置加装维护
*/
@Log(title = "液化石油气监管-液化气用户-安全装置加装维护", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TYehuaqiuserSafetyDeviceInfo tYehuaqiuserSafetyDeviceInfo)
{
return toAjax(tYehuaqiuserSafetyDeviceInfoService.updateTYehuaqiuserSafetyDeviceInfo(tYehuaqiuserSafetyDeviceInfo));
}
/**
* 删除液化石油气监管-液化气用户-安全装置加装维护
*/
@Log(title = "液化石油气监管-液化气用户-安全装置加装维护", businessType = BusinessType.DELETE)
@DeleteMapping("/{fSafetyDeviceIds}")
public AjaxResult remove(@PathVariable Long[] fSafetyDeviceIds)
{
return toAjax(tYehuaqiuserSafetyDeviceInfoService.deleteTYehuaqiuserSafetyDeviceInfoByIds(fSafetyDeviceIds));
}
}
......@@ -17,7 +17,6 @@ import com.zehong.system.domain.vo.UserManageGasUserExportVo;
import com.zehong.system.domain.vo.GasUserAndSafetyDeviceVo;
import com.zehong.system.domain.vo.TDetectorUserInspectVo;
import com.zehong.system.domain.vo.UserManageSafetyDeviceExportVo;
import com.zehong.system.service.ITDetectorUserErrorService;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -63,9 +62,6 @@ public class TDetectorUserController extends BaseController
@Autowired
Environment environment;
@Autowired
private ITDetectorUserErrorService detectorUserErrorService;
/**
* 查询燃气用户列表
*/
......
......@@ -3,6 +3,7 @@ package com.zehong.web.controller.system;
import java.util.List;
import com.zehong.system.domain.TDetectorUser;
import com.zehong.system.domain.vo.GasUserAndSafetyDeviceVo;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -77,6 +78,21 @@ public class TYehuaqiUserController extends BaseController
return toAjax(tYehuaqiUserService.insertTYehuaqiUser(tYehuaqiUser));
}
/**
* 新增燃气用户和安全装置
*/
@PostMapping("/addUserAndSafetyDevice")
public AjaxResult addUserAndSafetyDevice(@RequestBody GasUserAndSafetyDeviceVo gasUserAndSafetyDeviceVo) {
return toAjax(tYehuaqiUserService.addUserAndSafetyDevice(gasUserAndSafetyDeviceVo));
}
/**
* 修改燃气用户和安全装置
*/
@PostMapping("/updateUserAndSafetyDevice")
public AjaxResult updateUserAndSafetyDevice(@RequestBody GasUserAndSafetyDeviceVo gasUserAndSafetyDeviceVo) {
return toAjax(tYehuaqiUserService.updateUserAndSafetyDevice(gasUserAndSafetyDeviceVo));
}
/**
* 修改燃气用户
*/
......@@ -102,4 +118,16 @@ public class TYehuaqiUserController extends BaseController
List<TYehuaqiUser> list = tYehuaqiUserService.selectAllUserList(tYehuaqiUser);
return getDataTable(list);
}
/**
* 查询当前用户导入 燃气用户错误的数据
* @return i
*/
@GetMapping("/countImportError")
public AjaxResult countImportError()
{
int i = tYehuaqiUserService.countByBeyondEnterpriseId();
return AjaxResult.success(i);
}
}
package com.zehong.system.domain;
import java.math.BigDecimal;
import java.util.List;
import com.zehong.system.domain.vo.UserManageSafetyDeviceExportVo;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
......@@ -69,6 +72,54 @@ public class TYehuaqiUser extends BaseEntity
private Integer zxnum;
/**
* 居住区村庄id
*/
private Long villageId;
/**
* 居住区村庄名称
*/
@Excel(name = "居住区(村、庄)")
private String villageName;
private String errorMsg;
/**
* 所属企业名称
*/
private String beyondEnterpriseName;
/**
* 安全装置集合 导出时使用
*/
private List<UserManageSafetyDeviceExportVo> userManageSafetyDeviceExportVos;
public List<UserManageSafetyDeviceExportVo> getUserManageSafetyDeviceExportVos() {
return userManageSafetyDeviceExportVos;
}
public void setUserManageSafetyDeviceExportVos(List<UserManageSafetyDeviceExportVo> userManageSafetyDeviceExportVos) {
this.userManageSafetyDeviceExportVos = userManageSafetyDeviceExportVos;
}
public String getErrorMsg() {
return errorMsg;
}
public void setErrorMsg(String errorMsg) {
this.errorMsg = errorMsg;
}
public String getBeyondEnterpriseName() {
return beyondEnterpriseName;
}
public void setBeyondEnterpriseName(String beyondEnterpriseName) {
this.beyondEnterpriseName = beyondEnterpriseName;
}
public Integer getZxnum() {
return zxnum;
}
......@@ -203,6 +254,22 @@ public class TYehuaqiUser extends BaseEntity
return remarks;
}
public Long getVillageId() {
return villageId;
}
public void setVillageId(Long villageId) {
this.villageId = villageId;
}
public String getVillageName() {
return villageName;
}
public void setVillageName(String villageName) {
this.villageName = villageName;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
package com.zehong.system.domain;
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_yehuaqiuser_safety_device_info
*
* @author zehong
* @date 2024-09-09
*/
public class TYehuaqiuserSafetyDeviceInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 安全装置ID */
private Long fSafetyDeviceId;
/** 用户管理-燃气用户关联id */
@Excel(name = "用户管理-燃气用户关联id")
private Long fRelationUserId;
/** 关联设备类型 */
@Excel(name = "关联设备类型")
private String fRelationDeviceType;
/** 设备名称 */
@Excel(name = "设备名称")
private String fDeviceName;
/** 设备型号 */
@Excel(name = "设备型号")
private String fDeviceModel;
/** 物联网编号 */
@Excel(name = "物联网编号")
private String fIotNo;
/** 探测介质 */
@Excel(name = "探测介质")
private String fDetectionMedium;
/** 设备安装时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "设备安装时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date fDeviceInstallTime;
/** 安装位置 */
@Excel(name = "安装位置")
private String fDeviceInstallPosition;
/** 负责人 */
@Excel(name = "负责人")
private String fHead;
/** 联系电话 */
@Excel(name = "联系电话")
private String fPhone;
/** 是否删除(0正常,1删除) */
@Excel(name = "是否删除(0正常,1删除)")
private String isDel;
public void setfSafetyDeviceId(Long fSafetyDeviceId)
{
this.fSafetyDeviceId = fSafetyDeviceId;
}
public Long getfSafetyDeviceId()
{
return fSafetyDeviceId;
}
public void setfRelationUserId(Long fRelationUserId)
{
this.fRelationUserId = fRelationUserId;
}
public Long getfRelationUserId()
{
return fRelationUserId;
}
public void setfRelationDeviceType(String fRelationDeviceType)
{
this.fRelationDeviceType = fRelationDeviceType;
}
public String getfRelationDeviceType()
{
return fRelationDeviceType;
}
public void setfDeviceName(String fDeviceName)
{
this.fDeviceName = fDeviceName;
}
public String getfDeviceName()
{
return fDeviceName;
}
public void setfDeviceModel(String fDeviceModel)
{
this.fDeviceModel = fDeviceModel;
}
public String getfDeviceModel()
{
return fDeviceModel;
}
public void setfIotNo(String fIotNo)
{
this.fIotNo = fIotNo;
}
public String getfIotNo()
{
return fIotNo;
}
public void setfDetectionMedium(String fDetectionMedium)
{
this.fDetectionMedium = fDetectionMedium;
}
public String getfDetectionMedium()
{
return fDetectionMedium;
}
public void setfDeviceInstallTime(Date fDeviceInstallTime)
{
this.fDeviceInstallTime = fDeviceInstallTime;
}
public Date getfDeviceInstallTime()
{
return fDeviceInstallTime;
}
public void setfDeviceInstallPosition(String fDeviceInstallPosition)
{
this.fDeviceInstallPosition = fDeviceInstallPosition;
}
public String getfDeviceInstallPosition()
{
return fDeviceInstallPosition;
}
public void setfHead(String fHead)
{
this.fHead = fHead;
}
public String getfHead()
{
return fHead;
}
public void setfPhone(String fPhone)
{
this.fPhone = fPhone;
}
public String getfPhone()
{
return fPhone;
}
public void setIsDel(String isDel)
{
this.isDel = isDel;
}
public String getIsDel()
{
return isDel;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("fSafetyDeviceId", getfSafetyDeviceId())
.append("fRelationUserId", getfRelationUserId())
.append("fRelationDeviceType", getfRelationDeviceType())
.append("fDeviceName", getfDeviceName())
.append("fDeviceModel", getfDeviceModel())
.append("fIotNo", getfIotNo())
.append("fDetectionMedium", getfDetectionMedium())
.append("fDeviceInstallTime", getfDeviceInstallTime())
.append("fDeviceInstallPosition", getfDeviceInstallPosition())
.append("fHead", getfHead())
.append("fPhone", getfPhone())
.append("isDel", getIsDel())
.toString();
}
}
......@@ -2,6 +2,8 @@ package com.zehong.system.domain.vo;
import com.zehong.system.domain.TDetectorUser;
import com.zehong.system.domain.TGasuserSafetyDeviceInfo;
import com.zehong.system.domain.TYehuaqiUser;
import com.zehong.system.domain.TYehuaqiuserSafetyDeviceInfo;
import java.util.List;
......@@ -26,4 +28,25 @@ public class GasUserAndSafetyDeviceVo {
public void setGasuserSafetyDeviceInfoList(List<TGasuserSafetyDeviceInfo> gasuserSafetyDeviceInfoList) {
this.gasuserSafetyDeviceInfoList = gasuserSafetyDeviceInfoList;
}
private TYehuaqiUser yehuaqiUser;
private List<TYehuaqiuserSafetyDeviceInfo> yehuaqiuserSafetyDeviceInfos;
public TYehuaqiUser getYehuaqiUser() {
return yehuaqiUser;
}
public void setYehuaqiUser(TYehuaqiUser yehuaqiUser) {
this.yehuaqiUser = yehuaqiUser;
}
public List<TYehuaqiuserSafetyDeviceInfo> getYehuaqiuserSafetyDeviceInfos() {
return yehuaqiuserSafetyDeviceInfos;
}
public void setYehuaqiuserSafetyDeviceInfos(List<TYehuaqiuserSafetyDeviceInfo> yehuaqiuserSafetyDeviceInfos) {
this.yehuaqiuserSafetyDeviceInfos = yehuaqiuserSafetyDeviceInfos;
}
}
......@@ -26,7 +26,6 @@ public interface TYehuaqiDeviceMapper
* @return 【请填写功能名称】集合
*/
public List<TYehuaqiDevice> selectTYehuaqiDeviceList(TYehuaqiDevice tYehuaqiDevice);
/**
* 新增【请填写功能名称】
*
......
......@@ -6,6 +6,7 @@ import com.zehong.system.domain.TDetectorUser;
import com.zehong.system.domain.TYehuaqiUser;
import com.zehong.system.domain.vo.TDetectorUserVO;
import com.zehong.system.domain.vo.TYehuaqiUserVO;
import org.apache.ibatis.annotations.Param;
/**
* 燃气用户Mapper接口
......@@ -32,6 +33,14 @@ public interface TYehuaqiUserMapper
public List<TYehuaqiUser> selectTYehuaqiUserList(TYehuaqiUser tYehuaqiUser);
public List<TYehuaqiUser> selectTYehuaqiUserListTwo(TYehuaqiUser tYehuaqiUser);
/**
* 根据企业id 统计错误数量
* @param beyondEnterpriseId id
* @return r
*/
public int countByBeyondEnterpriseId(String beyondEnterpriseId);
/**
* 新增燃气用户
*
......
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TYehuaqiuserSafetyDeviceInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;
/**
* 液化石油气监管-液化气用户-安全装置加装维护Mapper接口
*
* @author zehong
* @date 2024-09-09
*/
public interface TYehuaqiuserSafetyDeviceInfoMapper
{
/**
* 查询液化石油气监管-液化气用户-安全装置加装维护
*
* @param fSafetyDeviceId 液化石油气监管-液化气用户-安全装置加装维护ID
* @return 液化石油气监管-液化气用户-安全装置加装维护
*/
public TYehuaqiuserSafetyDeviceInfo selectTYehuaqiuserSafetyDeviceInfoById(Long fSafetyDeviceId);
/**
* 根据userid查询数据
* @param userId u
* @return r
*/
public List<TYehuaqiuserSafetyDeviceInfo> queryDeviceInfoByUserId(Long userId);
/**
* 查询液化石油气监管-液化气用户-安全装置加装维护列表
*
* @param tYehuaqiuserSafetyDeviceInfo 液化石油气监管-液化气用户-安全装置加装维护
* @return 液化石油气监管-液化气用户-安全装置加装维护集合
*/
public List<TYehuaqiuserSafetyDeviceInfo> selectTYehuaqiuserSafetyDeviceInfoList(TYehuaqiuserSafetyDeviceInfo tYehuaqiuserSafetyDeviceInfo);
/**
* 新增液化石油气监管-液化气用户-安全装置加装维护
*
* @param tYehuaqiuserSafetyDeviceInfo 液化石油气监管-液化气用户-安全装置加装维护
* @return 结果
*/
public int insertTYehuaqiuserSafetyDeviceInfo(TYehuaqiuserSafetyDeviceInfo tYehuaqiuserSafetyDeviceInfo);
/**
* 批量插入
* @param tYehuaqiuserSafetyDeviceInfos t
* @return r
*/
public int insertBatch(@Param("list") List<TYehuaqiuserSafetyDeviceInfo> tYehuaqiuserSafetyDeviceInfos);
/**
* 根据 userid删除 数据
* @param userId user
* @return r
*/
public void deleteYehuaqiuserSafetyDeviceInfoUserId(Long userId);
/**
* 修改液化石油气监管-液化气用户-安全装置加装维护
*
* @param tYehuaqiuserSafetyDeviceInfo 液化石油气监管-液化气用户-安全装置加装维护
* @return 结果
*/
public int updateTYehuaqiuserSafetyDeviceInfo(TYehuaqiuserSafetyDeviceInfo tYehuaqiuserSafetyDeviceInfo);
/**
* 删除液化石油气监管-液化气用户-安全装置加装维护
*
* @param fSafetyDeviceId 液化石油气监管-液化气用户-安全装置加装维护ID
* @return 结果
*/
public int deleteTYehuaqiuserSafetyDeviceInfoById(Long fSafetyDeviceId);
/**
* 批量删除液化石油气监管-液化气用户-安全装置加装维护
*
* @param fSafetyDeviceIds 需要删除的数据ID
* @return 结果
*/
public int deleteTYehuaqiuserSafetyDeviceInfoByIds(Long[] fSafetyDeviceIds);
}
......@@ -4,6 +4,7 @@ import java.util.List;
import com.zehong.system.domain.TDetectorUser;
import com.zehong.system.domain.TYehuaqiUser;
import com.zehong.system.domain.vo.GasUserAndSafetyDeviceVo;
import com.zehong.system.domain.vo.TDetectorUserVO;
import com.zehong.system.domain.vo.TYehuaqiUserVO;
......@@ -33,6 +34,11 @@ public interface ITYehuaqiUserService
public List<TYehuaqiUser> selectAllUserList(TYehuaqiUser tYehuaqiUser);
/**
* 根据企业id统计错误数据
* @return r
*/
public int countByBeyondEnterpriseId();
/**
* 新增燃气用户
*
......@@ -64,4 +70,19 @@ public interface ITYehuaqiUserService
* @return 结果
*/
public int deleteTYehuaqiUserById(Long userId);
/**
* 新增燃气用户和安全装置
* @param gasUserAndSafetyDeviceVo gas
* @return r
*/
public int addUserAndSafetyDevice(GasUserAndSafetyDeviceVo gasUserAndSafetyDeviceVo);
/**
* 修改燃气用户和安全装置
* @param gasUserAndSafetyDeviceVo gas
* @return r
*/
public int updateUserAndSafetyDevice(GasUserAndSafetyDeviceVo gasUserAndSafetyDeviceVo);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TYehuaqiuserSafetyDeviceInfo;
/**
* 液化石油气监管-液化气用户-安全装置加装维护Service接口
*
* @author zehong
* @date 2024-09-09
*/
public interface ITYehuaqiuserSafetyDeviceInfoService
{
/**
* 查询液化石油气监管-液化气用户-安全装置加装维护
*
* @param fSafetyDeviceId 液化石油气监管-液化气用户-安全装置加装维护ID
* @return 液化石油气监管-液化气用户-安全装置加装维护
*/
public TYehuaqiuserSafetyDeviceInfo selectTYehuaqiuserSafetyDeviceInfoById(Long fSafetyDeviceId);
/**
* 根据要用户id 查询列表
* @param userId user
* @return l
*/
public List<TYehuaqiuserSafetyDeviceInfo> queryDeviceInfoByUserId(Long userId);
/**
* 查询液化石油气监管-液化气用户-安全装置加装维护列表
*
* @param tYehuaqiuserSafetyDeviceInfo 液化石油气监管-液化气用户-安全装置加装维护
* @return 液化石油气监管-液化气用户-安全装置加装维护集合
*/
public List<TYehuaqiuserSafetyDeviceInfo> selectTYehuaqiuserSafetyDeviceInfoList(TYehuaqiuserSafetyDeviceInfo tYehuaqiuserSafetyDeviceInfo);
/**
* 新增液化石油气监管-液化气用户-安全装置加装维护
*
* @param tYehuaqiuserSafetyDeviceInfo 液化石油气监管-液化气用户-安全装置加装维护
* @return 结果
*/
public int insertTYehuaqiuserSafetyDeviceInfo(TYehuaqiuserSafetyDeviceInfo tYehuaqiuserSafetyDeviceInfo);
/**
* 修改液化石油气监管-液化气用户-安全装置加装维护
*
* @param tYehuaqiuserSafetyDeviceInfo 液化石油气监管-液化气用户-安全装置加装维护
* @return 结果
*/
public int updateTYehuaqiuserSafetyDeviceInfo(TYehuaqiuserSafetyDeviceInfo tYehuaqiuserSafetyDeviceInfo);
/**
* 批量删除液化石油气监管-液化气用户-安全装置加装维护
*
* @param fSafetyDeviceIds 需要删除的液化石油气监管-液化气用户-安全装置加装维护ID
* @return 结果
*/
public int deleteTYehuaqiuserSafetyDeviceInfoByIds(Long[] fSafetyDeviceIds);
/**
* 删除液化石油气监管-液化气用户-安全装置加装维护信息
*
* @param fSafetyDeviceId 液化石油气监管-液化气用户-安全装置加装维护ID
* @return 结果
*/
public int deleteTYehuaqiuserSafetyDeviceInfoById(Long fSafetyDeviceId);
}
package com.zehong.system.service.impl;
import java.util.List;
import com.zehong.common.core.domain.model.LoginUser;
import com.zehong.common.utils.DateUtils;
import com.zehong.system.domain.TYehuaqiDevice;
import com.zehong.common.utils.SecurityUtils;
import com.zehong.system.domain.*;
import com.zehong.system.domain.vo.GasUserAndSafetyDeviceVo;
import com.zehong.system.mapper.TYehuaqiDeviceMapper;
import com.zehong.system.mapper.TYehuaqiuserSafetyDeviceInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TYehuaqiUserMapper;
import com.zehong.system.domain.TYehuaqiUser;
import com.zehong.system.service.ITYehuaqiUserService;
import org.springframework.transaction.annotation.Transactional;
/**
* 燃气用户Service业务层处理
......@@ -24,6 +29,9 @@ public class TYehuaqiUserServiceImpl implements ITYehuaqiUserService
@Autowired
private TYehuaqiDeviceMapper tYehuaqiDeviceMapper;
@Autowired
private TYehuaqiuserSafetyDeviceInfoMapper yehuaqiuserSafetyDeviceInfoMapperl;
/**
* 查询燃气用户
*
......@@ -60,6 +68,18 @@ public class TYehuaqiUserServiceImpl implements ITYehuaqiUserService
return list;
}
/**
* 根据企业id统计错误数据
* @return r
*/
@Override
public int countByBeyondEnterpriseId() {
LoginUser loginUser = SecurityUtils.getLoginUser();
String deptId = loginUser.getUser().getDeptId();
return tYehuaqiUserMapper.countByBeyondEnterpriseId(deptId);
}
/**
* 新增燃气用户
*
......@@ -109,4 +129,50 @@ public class TYehuaqiUserServiceImpl implements ITYehuaqiUserService
{
return tYehuaqiUserMapper.deleteTYehuaqiUserById(userId);
}
/**
* 新增燃气用户 和 安全装置
* @param gasUserAndSafetyDeviceVo gas
* @return r
*/
@Override
@Transactional(rollbackFor = Exception.class)
public int addUserAndSafetyDevice(GasUserAndSafetyDeviceVo gasUserAndSafetyDeviceVo) {
TYehuaqiUser yehuaqiUser = gasUserAndSafetyDeviceVo.getYehuaqiUser();
tYehuaqiUserMapper.insertTYehuaqiUser(yehuaqiUser);
List<TYehuaqiuserSafetyDeviceInfo> yehuaqiuserSafetyDeviceInfos = gasUserAndSafetyDeviceVo.getYehuaqiuserSafetyDeviceInfos();
if (yehuaqiuserSafetyDeviceInfos != null && yehuaqiuserSafetyDeviceInfos.size() > 0) {
for (TYehuaqiuserSafetyDeviceInfo yehuaqiuserSafetyDeviceInfo : yehuaqiuserSafetyDeviceInfos) {
yehuaqiuserSafetyDeviceInfo.setfRelationUserId(yehuaqiUser.getUserId());;
}
yehuaqiuserSafetyDeviceInfoMapperl.insertBatch(yehuaqiuserSafetyDeviceInfos);
}
return 1;
}
/**
* 修改燃气用户 和 安全装置
* @param gasUserAndSafetyDeviceVo gas
* @return r
*/
@Override
@Transactional(rollbackFor = Exception.class)
public int updateUserAndSafetyDevice(GasUserAndSafetyDeviceVo gasUserAndSafetyDeviceVo) {
TYehuaqiUser yehuaqiUser = gasUserAndSafetyDeviceVo.getYehuaqiUser();
tYehuaqiUserMapper.updateTYehuaqiUser(yehuaqiUser);
List<TYehuaqiuserSafetyDeviceInfo> yehuaqiuserSafetyDeviceInfos = gasUserAndSafetyDeviceVo.getYehuaqiuserSafetyDeviceInfos();
if (yehuaqiuserSafetyDeviceInfos != null && yehuaqiuserSafetyDeviceInfos.size() > 0) {
for (TYehuaqiuserSafetyDeviceInfo yehuaqiuserSafetyDeviceInfo : yehuaqiuserSafetyDeviceInfos) {
yehuaqiuserSafetyDeviceInfo.setfRelationUserId(yehuaqiUser.getUserId());
}
}
yehuaqiuserSafetyDeviceInfoMapperl.deleteYehuaqiuserSafetyDeviceInfoUserId(yehuaqiUser.getUserId());
if (yehuaqiuserSafetyDeviceInfos != null && yehuaqiuserSafetyDeviceInfos.size() > 0) {
yehuaqiuserSafetyDeviceInfoMapperl.insertBatch(yehuaqiuserSafetyDeviceInfos);
}
return 1;
}
}
package com.zehong.system.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TYehuaqiuserSafetyDeviceInfoMapper;
import com.zehong.system.domain.TYehuaqiuserSafetyDeviceInfo;
import com.zehong.system.service.ITYehuaqiuserSafetyDeviceInfoService;
/**
* 液化石油气监管-液化气用户-安全装置加装维护Service业务层处理
*
* @author zehong
* @date 2024-09-09
*/
@Service
public class TYehuaqiuserSafetyDeviceInfoServiceImpl implements ITYehuaqiuserSafetyDeviceInfoService
{
@Autowired
private TYehuaqiuserSafetyDeviceInfoMapper tYehuaqiuserSafetyDeviceInfoMapper;
/**
* 查询液化石油气监管-液化气用户-安全装置加装维护
*
* @param fSafetyDeviceId 液化石油气监管-液化气用户-安全装置加装维护ID
* @return 液化石油气监管-液化气用户-安全装置加装维护
*/
@Override
public TYehuaqiuserSafetyDeviceInfo selectTYehuaqiuserSafetyDeviceInfoById(Long fSafetyDeviceId)
{
return tYehuaqiuserSafetyDeviceInfoMapper.selectTYehuaqiuserSafetyDeviceInfoById(fSafetyDeviceId);
}
@Override
public List<TYehuaqiuserSafetyDeviceInfo> queryDeviceInfoByUserId(Long userId) {
return null;
}
/**
* 查询液化石油气监管-液化气用户-安全装置加装维护列表
*
* @param tYehuaqiuserSafetyDeviceInfo 液化石油气监管-液化气用户-安全装置加装维护
* @return 液化石油气监管-液化气用户-安全装置加装维护
*/
@Override
public List<TYehuaqiuserSafetyDeviceInfo> selectTYehuaqiuserSafetyDeviceInfoList(TYehuaqiuserSafetyDeviceInfo tYehuaqiuserSafetyDeviceInfo)
{
return tYehuaqiuserSafetyDeviceInfoMapper.selectTYehuaqiuserSafetyDeviceInfoList(tYehuaqiuserSafetyDeviceInfo);
}
/**
* 新增液化石油气监管-液化气用户-安全装置加装维护
*
* @param tYehuaqiuserSafetyDeviceInfo 液化石油气监管-液化气用户-安全装置加装维护
* @return 结果
*/
@Override
public int insertTYehuaqiuserSafetyDeviceInfo(TYehuaqiuserSafetyDeviceInfo tYehuaqiuserSafetyDeviceInfo)
{
return tYehuaqiuserSafetyDeviceInfoMapper.insertTYehuaqiuserSafetyDeviceInfo(tYehuaqiuserSafetyDeviceInfo);
}
/**
* 修改液化石油气监管-液化气用户-安全装置加装维护
*
* @param tYehuaqiuserSafetyDeviceInfo 液化石油气监管-液化气用户-安全装置加装维护
* @return 结果
*/
@Override
public int updateTYehuaqiuserSafetyDeviceInfo(TYehuaqiuserSafetyDeviceInfo tYehuaqiuserSafetyDeviceInfo)
{
return tYehuaqiuserSafetyDeviceInfoMapper.updateTYehuaqiuserSafetyDeviceInfo(tYehuaqiuserSafetyDeviceInfo);
}
/**
* 批量删除液化石油气监管-液化气用户-安全装置加装维护
*
* @param fSafetyDeviceIds 需要删除的液化石油气监管-液化气用户-安全装置加装维护ID
* @return 结果
*/
@Override
public int deleteTYehuaqiuserSafetyDeviceInfoByIds(Long[] fSafetyDeviceIds)
{
return tYehuaqiuserSafetyDeviceInfoMapper.deleteTYehuaqiuserSafetyDeviceInfoByIds(fSafetyDeviceIds);
}
/**
* 删除液化石油气监管-液化气用户-安全装置加装维护信息
*
* @param fSafetyDeviceId 液化石油气监管-液化气用户-安全装置加装维护ID
* @return 结果
*/
@Override
public int deleteTYehuaqiuserSafetyDeviceInfoById(Long fSafetyDeviceId)
{
return tYehuaqiuserSafetyDeviceInfoMapper.deleteTYehuaqiuserSafetyDeviceInfoById(fSafetyDeviceId);
}
}
......@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zehong.system.mapper.TYehuaqiUserMapper">
<resultMap type="TYehuaqiUser" id="TYehuaqiUserResult">
<result property="userId" column="user_id" />
<result property="username" column="username" />
......@@ -22,19 +22,82 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="remarks" column="remarks" />
<result property="deviceNum" column="deviceNum" />
<result property="zxnum" column="zxnum" />
<result property="beyondEnterpriseName" column="enterprise_name" />
<result property="villageId" column="f_village_id" />
<result property="villageName" column="f_village_name" />
<result property="errorMsg" column="error_msg" />
</resultMap>
<resultMap type="TYehuaqiUser" id="TYehuaqiUserExportResult">
<result property="userId" column="user_id" />
<result property="username" column="username" />
<result property="nickName" column="nick_name" />
<result property="beyondEnterpriseId" column="beyond_enterprise_id" />
<result property="userType" column="user_type" />
<result property="address" column="address" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="linkman" column="linkman" />
<result property="phone" column="phone" />
<result property="email" column="email" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="isDel" column="is_del" />
<result property="remarks" column="remarks" />
<result property="deviceNum" column="deviceNum" />
<result property="zxnum" column="zxnum" />
<result property="beyondEnterpriseName" column="enterprise_name" />
<result property="villageId" column="f_village_id" />
<result property="villageName" column="f_village_name" />
<result property="errorMsg" column="error_msg" />
<!-- collection 是用于建立一对多中集合属性的对应关系
ofType 用于指定集合元素的数据类型
-->
<collection property="userManageSafetyDeviceExportVos" ofType="UserManageSafetyDeviceExportVo">
<id property="userOwnId" column="user_id"/>
<result property="relationDeviceType" column="f_relation_device_type"/>
<result property="deviceName" column="f_device_name"/>
<result property="deviceModel" column="f_device_model"/>
<result property="fIotNo" column="f_iot_no"/>
<result property="detectionMedium" column="f_detection_medium"/>
<result property="deviceInstallTime" column="f_device_install_time"/>
<result property="deviceInstallPosition" column="f_device_install_position"/>
<result property="head" column="f_head"/>
<result property="phone" column="f_phone"/>
</collection>
</resultMap>
<sql id="selectTYehuaqiUserVo">
select user_id, username, nick_name, beyond_enterprise_id, user_type, address, longitude, latitude, linkman, phone, email, create_time, update_time, is_del, remarks from t_yehuaqi_user
select user_id, username, nick_name, beyond_enterprise_id, user_type, address, longitude, latitude, linkman,
phone, email, create_time, update_time, is_del, remarks ,f_village_id,error_msg from t_yehuaqi_user
</sql>
<select id="selectTYehuaqiUserList" parameterType="TYehuaqiUser" resultMap="TYehuaqiUserResult">
<include refid="selectTYehuaqiUserVo"/>
<where>
<if test="username != null and username != ''"> and username like concat('%', #{username}, '%')</if>
<if test="nickName != null and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if>
<if test="phone != null and phone != ''"> and phone like concat('%', #{phone}, '%')</if>
<!-- <include refid="selectTYehuaqiUserVo"/>-->
<!-- <where> -->
<!-- <if test="username != null and username != ''"> and username like concat('%', #{username}, '%')</if>-->
<!-- <if test="nickName != null and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if>-->
<!-- <if test="phone != null and phone != ''"> and phone like concat('%', #{phone}, '%')</if>-->
<!-- </where>-->
select a.user_id,
a.username,
a.nick_name,
(CASE a.user_type WHEN '1' THEN '居民用户' WHEN '2' THEN '工商业用户' WHEN '4' THEN '餐饮单位用户'end) as user_type ,
'液化气' as gas_type ,
a.address, a.longitude, a.latitude, a.linkman, a.phone, a.email, a.create_time, a.update_time, a.is_del, a.remarks,
b.enterprise_name,a.f_village_id,v.f_village_name
from t_yehuaqi_user a left join t_enterprise_info b on a.beyond_enterprise_id=b.enterprise_id
left join t_user_manage_village v on a.f_village_id=v.f_village_id
<where> a.is_del = '0' and a.error_msg is null
<if test="beyondEnterpriseId != null and beyondEnterpriseId != -2"> and a.beyond_enterprise_id =#{beyondEnterpriseId}</if>
<if test="username != null and username != ''"> and a.username like concat('%', #{username}, '%')</if>
<if test="nickName != null and nickName != ''"> and (a.nick_name like concat('%', #{nickName}, '%') or a.username like concat('%', #{nickName}, '%'))</if>
</where>
order by a.user_id desc
</select>
<select id="selectTYehuaqiUserListTwo" parameterType="TYehuaqiUser" resultMap="TYehuaqiUserResult">
SELECT t2.zs as deviceNum,t2.zx as zxnum,t1.* FROM t_yehuaqi_user t1
......@@ -44,6 +107,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userId != null and userId != ''"> and t1.user_id = #{userId}</if>
</where>
</select>
<select id="countByBeyondEnterpriseId" parameterType="String" resultType="int">
select count(*) from t_yehuaqi_user where error_msg is not null
<if test="beyondEnterpriseId != null and beyondEnterpriseId != '' and beyondEnterpriseId != '-2'">
beyond_enterprise_id = #{beyondEnterpriseId}
</if>
</select>
<select id="selectTYehuaqiUserById" parameterType="Long" resultMap="TYehuaqiUserResult">
<include refid="selectTYehuaqiUserVo"/>
where user_id = #{userId}
......
<?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.TYehuaqiuserSafetyDeviceInfoMapper">
<resultMap type="TYehuaqiuserSafetyDeviceInfo" id="TYehuaqiuserSafetyDeviceInfoResult">
<result property="fSafetyDeviceId" column="f_safety_device_id" />
<result property="fRelationUserId" column="f_relation_user_id" />
<result property="fRelationDeviceType" column="f_relation_device_type" />
<result property="fDeviceName" column="f_device_name" />
<result property="fDeviceModel" column="f_device_model" />
<result property="fIotNo" column="f_iot_no" />
<result property="fDetectionMedium" column="f_detection_medium" />
<result property="fDeviceInstallTime" column="f_device_install_time" />
<result property="fDeviceInstallPosition" column="f_device_install_position" />
<result property="fHead" column="f_head" />
<result property="fPhone" column="f_phone" />
<result property="isDel" column="is_del" />
</resultMap>
<sql id="selectTYehuaqiuserSafetyDeviceInfoVo">
select f_safety_device_id, f_relation_user_id, f_relation_device_type, f_device_name, f_device_model, f_iot_no, f_detection_medium, f_device_install_time, f_device_install_position, f_head, f_phone, is_del from t_yehuaqiuser_safety_device_info
</sql>
<select id="selectTYehuaqiuserSafetyDeviceInfoList" parameterType="TYehuaqiuserSafetyDeviceInfo" resultMap="TYehuaqiuserSafetyDeviceInfoResult">
<include refid="selectTYehuaqiuserSafetyDeviceInfoVo"/>
<where>
<if test="fRelationUserId != null "> and f_relation_user_id = #{fRelationUserId}</if>
<if test="fRelationDeviceType != null and fRelationDeviceType != ''"> and f_relation_device_type = #{fRelationDeviceType}</if>
<if test="fDeviceName != null and fDeviceName != ''"> and f_device_name like concat('%', #{fDeviceName}, '%')</if>
<if test="fDeviceModel != null and fDeviceModel != ''"> and f_device_model = #{fDeviceModel}</if>
<if test="fIotNo != null and fIotNo != ''"> and f_iot_no = #{fIotNo}</if>
<if test="fDetectionMedium != null and fDetectionMedium != ''"> and f_detection_medium = #{fDetectionMedium}</if>
<if test="fDeviceInstallTime != null "> and f_device_install_time = #{fDeviceInstallTime}</if>
<if test="fDeviceInstallPosition != null and fDeviceInstallPosition != ''"> and f_device_install_position = #{fDeviceInstallPosition}</if>
<if test="fHead != null and fHead != ''"> and f_head = #{fHead}</if>
<if test="fPhone != null and fPhone != ''"> and f_phone = #{fPhone}</if>
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
</where>
</select>
<select id="selectTYehuaqiuserSafetyDeviceInfoById" parameterType="Long" resultMap="TYehuaqiuserSafetyDeviceInfoResult">
<include refid="selectTYehuaqiuserSafetyDeviceInfoVo"/>
where f_safety_device_id = #{fSafetyDeviceId}
</select>
<select id="queryDeviceInfoByUserId" parameterType="Long" resultMap="TYehuaqiuserSafetyDeviceInfoResult">
<include refid="selectTYehuaqiuserSafetyDeviceInfoVo"/>
where fRelationUserId = #{userId}
</select>
<insert id="insertTYehuaqiuserSafetyDeviceInfo" parameterType="TYehuaqiuserSafetyDeviceInfo" useGeneratedKeys="true" keyProperty="fSafetyDeviceId">
insert into t_yehuaqiuser_safety_device_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="fRelationUserId != null">f_relation_user_id,</if>
<if test="fRelationDeviceType != null">f_relation_device_type,</if>
<if test="fDeviceName != null">f_device_name,</if>
<if test="fDeviceModel != null">f_device_model,</if>
<if test="fIotNo != null">f_iot_no,</if>
<if test="fDetectionMedium != null">f_detection_medium,</if>
<if test="fDeviceInstallTime != null">f_device_install_time,</if>
<if test="fDeviceInstallPosition != null">f_device_install_position,</if>
<if test="fHead != null">f_head,</if>
<if test="fPhone != null">f_phone,</if>
<if test="isDel != null">is_del,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="fRelationUserId != null">#{fRelationUserId},</if>
<if test="fRelationDeviceType != null">#{fRelationDeviceType},</if>
<if test="fDeviceName != null">#{fDeviceName},</if>
<if test="fDeviceModel != null">#{fDeviceModel},</if>
<if test="fIotNo != null">#{fIotNo},</if>
<if test="fDetectionMedium != null">#{fDetectionMedium},</if>
<if test="fDeviceInstallTime != null">#{fDeviceInstallTime},</if>
<if test="fDeviceInstallPosition != null">#{fDeviceInstallPosition},</if>
<if test="fHead != null">#{fHead},</if>
<if test="fPhone != null">#{fPhone},</if>
<if test="isDel != null">#{isDel},</if>
</trim>
</insert>
<insert id="insertBatch" parameterType="list">
insert into t_yehuaqiuser_safety_device_info (f_relation_user_id, f_relation_device_type, f_device_name,
f_device_model, f_iot_no,f_detection_medium, f_device_install_time,
f_device_install_position,f_head,f_phone)
values
<foreach collection="list" item="item" index="index" separator=",">
(
#{item.fRelationUserId}, #{item.fRelationDeviceType,jdbcType=VARCHAR},
#{item.fDeviceName,jdbcType=VARCHAR}, #{item.fDeviceModel,jdbcType=VARCHAR}, #{item.fIotNo,jdbcType=VARCHAR},
#{item.fDetectionMedium,jdbcType=DECIMAL}, #{item.fDeviceInstallTime,jdbcType=DECIMAL},
#{item.fDeviceInstallPosition,jdbcType=VARCHAR},#{item.fHead,jdbcType=VARCHAR}, #{item.fPhone,jdbcType=TIMESTAMP}
)
</foreach>
</insert>
<update id="updateTYehuaqiuserSafetyDeviceInfo" parameterType="TYehuaqiuserSafetyDeviceInfo">
update t_yehuaqiuser_safety_device_info
<trim prefix="SET" suffixOverrides=",">
<if test="fRelationUserId != null">f_relation_user_id = #{fRelationUserId},</if>
<if test="fRelationDeviceType != null">f_relation_device_type = #{fRelationDeviceType},</if>
<if test="fDeviceName != null">f_device_name = #{fDeviceName},</if>
<if test="fDeviceModel != null">f_device_model = #{fDeviceModel},</if>
<if test="fIotNo != null">f_iot_no = #{fIotNo},</if>
<if test="fDetectionMedium != null">f_detection_medium = #{fDetectionMedium},</if>
<if test="fDeviceInstallTime != null">f_device_install_time = #{fDeviceInstallTime},</if>
<if test="fDeviceInstallPosition != null">f_device_install_position = #{fDeviceInstallPosition},</if>
<if test="fHead != null">f_head = #{fHead},</if>
<if test="fPhone != null">f_phone = #{fPhone},</if>
<if test="isDel != null">is_del = #{isDel},</if>
</trim>
where f_safety_device_id = #{fSafetyDeviceId}
</update>
<delete id="deleteTYehuaqiuserSafetyDeviceInfoById" parameterType="Long">
delete from t_yehuaqiuser_safety_device_info where f_safety_device_id = #{fSafetyDeviceId}
</delete>
<select id="deleteYehuaqiuserSafetyDeviceInfoUserId" parameterType="Long">
delete from t_yehuaqiuser_safety_device_info where f_relation_user_id = #{userId}
</select>
<delete id="deleteTYehuaqiuserSafetyDeviceInfoByIds" parameterType="String">
delete from t_yehuaqiuser_safety_device_info where f_safety_device_id in
<foreach item="fSafetyDeviceId" collection="array" open="(" separator="," close=")">
#{fSafetyDeviceId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
import request from '@/utils/request'
// 查询燃气用户列表
export function listUser(query) {
return request({
url: '/system/yehuaqiUser/list',
method: 'get',
params: query
})
}
// 查询燃气用户详细ee
export function getUser(userId) {
return request({
url: '/system/yehuaqiUser/' + userId,
method: 'get'
})
}
// 新增燃气用户
export function addUser(data) {
return request({
url: '/system/yehuaqiUser',
method: 'post',
data: data
})
}
// 修改燃气用户
export function updateUser(data) {
return request({
url: '/system/yehuaqiUser',
method: 'put',
data: data
})
}
// 删除燃气用户
export function delUser(userId) {
return request({
url: '/system/yehuaqiUser/' + userId,
method: 'delete'
})
}
// 导出燃气用户
export function exportUser(query) {
return request({
url: '/system/yehuaqiUser/export',
method: 'get',
params: query
})
}
// 导出燃气用户-新的-有居住区的导出
export function newExportUser(query) {
return request({
url: '/system/yehuaqiUser/newExport',
method: 'get',
params: query
})
}
// 查询 安装加装装置数据
export function getNoSelectSafetyDetailInfo(data) {
return request({
url: '/gasUserSafetyDevice/info/queryNoSelectSafeDeviceInfoList',
method: 'post',
data: data
})
}
// 查询 安装加装装置数据
export function addSafetyDetailInfo(data) {
return request({
url: '/gasUserSafetyDevice/info',
method: 'post',
data: data
})
}
// 关联安装加装装置 批量删除
export function deleteSafetyDeviceListInfo(data) {
return request({
url: '/gasUserSafetyDevice/info/deleteSafetyDeviceListInfo',
method: 'post',
data: data
})
}
// 删除关联设备信息
export function deleteSafetyDeviceInfo(deviceId) {
return request({
url: '/gasUserSafetyDevice/info/deleteSafetyDeviceInfo',
method: 'delete',
data:deviceId
})
}
// 根据燃气用户id 查询 关联 安全装置加装
export function queryDeviceInfoByUserId(userId) {
return request({
url: '/yehuaqiUserSafetyDeviceInfo/info/queryDeviceInfoByUserId/'+ userId,
method: 'get'
})
}
// 新增燃气用户-包含安全装置
export function addUserAndSafetyDevice(data) {
return request({
url: '/system/yehuaqiUser/addUserAndSafetyDevice',
method: 'post',
data: data
})
}
// 修改燃气用户-包含安全装置
export function updateUserAndSafetyDevice(data) {
return request({
url: '/system/yehuaqiUser/updateUserAndSafetyDevice',
method: 'post',
data: data
})
}
// 下载用户导入模板
export function importTemplate() {
return request({
url: '/system/yehuaqiUser/importTemplate',
method: 'get'
})
}
// 下载用户导入模板 - 自定义的模版
export function downloadTemplate() {
return request({
url: '/system/yehuaqiUser/downloadTemplate',
method: 'get',
responseType: 'blob'
})
}
// 统计错误数量
export function countImportError() {
return request({
url: '/system/yehuaqiUser/countImportError',
method: 'get'
})
}
// 清除错误数据
export function clearImportError() {
return request({
url: '/system/yehuaqiUser/clearImportError',
method: 'get'
})
}
// 导出从业人员信息- 错误数据
export function exportErrorData() {
return request({
url: '/system/yehuaqiUser/exportErrorData',
method: 'get',
responseType: 'blob'
})
}
//自定义-模版下载-正确数据导出-燃气用户
export function exportSuccessData(query) {
return request({
url: '/system/yehuaqiUser/exportSuccessData',
method: 'get',
responseType: 'blob',
params: query
})
}
\ No newline at end of file
......@@ -34,11 +34,11 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
// target: `http://localhost:8905/gassafety`,
target: `http://localhost:8905/gassafety`,
// target: `http://27.128.233.145:8905/gassafety`,
// target: `http://36.138.180.82:8905/gassafety`,
// 服务器
target: `http://36.138.180.82:8079//gassafety`,
// target: `http://36.138.180.82:8079//gassafety`,
changeOrigin: true,
pathRewrite: {
["^" + process.env.VUE_APP_BASE_API]: "",
......
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