Commit 76b34c17 authored by wuqinghua's avatar wuqinghua

2022-3-30 吴卿华

parent 0cba0013
package com.zehong.web.controller.supervise; package com.zehong.web.controller.supervise;
import java.util.List; import java.util.List;
import com.zehong.common.core.domain.entity.SysUser;
import com.zehong.common.utils.SecurityUtils;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -40,6 +43,9 @@ public class TDetectorUserController extends BaseController ...@@ -40,6 +43,9 @@ public class TDetectorUserController extends BaseController
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TDetectorUser tDetectorUser) public TableDataInfo list(TDetectorUser tDetectorUser)
{ {
//获取用户信息
SysUser user = SecurityUtils.getLoginUser().getUser();
tDetectorUser.setBeyondEnterpriseId(user.getDeptId());
startPage(); startPage();
List<TDetectorUser> list = tDetectorUserService.selectTDetectorUserList(tDetectorUser); List<TDetectorUser> list = tDetectorUserService.selectTDetectorUserList(tDetectorUser);
return getDataTable(list); return getDataTable(list);
...@@ -71,6 +77,9 @@ public class TDetectorUserController extends BaseController ...@@ -71,6 +77,9 @@ public class TDetectorUserController extends BaseController
@GetMapping("/export") @GetMapping("/export")
public AjaxResult export(TDetectorUser tDetectorUser) public AjaxResult export(TDetectorUser tDetectorUser)
{ {
//获取用户信息
SysUser user = SecurityUtils.getLoginUser().getUser();
tDetectorUser.setBeyondEnterpriseId(user.getDeptId());
List<TDetectorUser> list = tDetectorUserService.selectTDetectorUserList(tDetectorUser); List<TDetectorUser> list = tDetectorUserService.selectTDetectorUserList(tDetectorUser);
ExcelUtil<TDetectorUser> util = new ExcelUtil<TDetectorUser>(TDetectorUser.class); ExcelUtil<TDetectorUser> util = new ExcelUtil<TDetectorUser>(TDetectorUser.class);
return util.exportExcel(list, "燃气用户数据"); return util.exportExcel(list, "燃气用户数据");
...@@ -94,6 +103,9 @@ public class TDetectorUserController extends BaseController ...@@ -94,6 +103,9 @@ public class TDetectorUserController extends BaseController
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TDetectorUser tDetectorUser) public AjaxResult add(@RequestBody TDetectorUser tDetectorUser)
{ {
//获取用户信息
SysUser user = SecurityUtils.getLoginUser().getUser();
tDetectorUser.setBeyondEnterpriseId(user.getDeptId());
return toAjax(tDetectorUserService.insertTDetectorUser(tDetectorUser)); return toAjax(tDetectorUserService.insertTDetectorUser(tDetectorUser));
} }
......
...@@ -5,6 +5,8 @@ import java.util.List; ...@@ -5,6 +5,8 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import com.zehong.common.config.GassafetyProgressConfig; import com.zehong.common.config.GassafetyProgressConfig;
import com.zehong.common.core.domain.entity.SysUser;
import com.zehong.common.utils.SecurityUtils;
import com.zehong.system.domain.Listaw; import com.zehong.system.domain.Listaw;
import com.zehong.system.domain.TDetailInfoList; import com.zehong.system.domain.TDetailInfoList;
import com.zehong.system.domain.TDeviceInfoS; import com.zehong.system.domain.TDeviceInfoS;
...@@ -53,6 +55,9 @@ public class TDeviceInfoController extends BaseController ...@@ -53,6 +55,9 @@ public class TDeviceInfoController extends BaseController
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TDeviceInfo tDeviceInfo) public TableDataInfo list(TDeviceInfo tDeviceInfo)
{ {
//获取用户信息
SysUser user = SecurityUtils.getLoginUser().getUser();
tDeviceInfo.setBeyondEnterpriseId(user.getDeptId());
startPage(); startPage();
List<TDeviceInfo> list = tDeviceInfoService.selectTDeviceInfoList(tDeviceInfo); List<TDeviceInfo> list = tDeviceInfoService.selectTDeviceInfoList(tDeviceInfo);
return getDataTable(list); return getDataTable(list);
...@@ -66,6 +71,9 @@ public class TDeviceInfoController extends BaseController ...@@ -66,6 +71,9 @@ public class TDeviceInfoController extends BaseController
@GetMapping("/export") @GetMapping("/export")
public AjaxResult export(TDeviceInfo tDeviceInfo) public AjaxResult export(TDeviceInfo tDeviceInfo)
{ {
//获取用户信息
SysUser user = SecurityUtils.getLoginUser().getUser();
tDeviceInfo.setBeyondEnterpriseId(user.getDeptId());
List<TDeviceInfo> list = tDeviceInfoService.selectTDeviceInfoList(tDeviceInfo); List<TDeviceInfo> list = tDeviceInfoService.selectTDeviceInfoList(tDeviceInfo);
ExcelUtil<TDeviceInfo> util = new ExcelUtil<TDeviceInfo>(TDeviceInfo.class); ExcelUtil<TDeviceInfo> util = new ExcelUtil<TDeviceInfo>(TDeviceInfo.class);
return util.exportExcel(list, "设备信息数据"); return util.exportExcel(list, "设备信息数据");
...@@ -95,7 +103,6 @@ public class TDeviceInfoController extends BaseController ...@@ -95,7 +103,6 @@ public class TDeviceInfoController extends BaseController
listaw.gettDeviceInfo().setDeviceCode(intFlag); listaw.gettDeviceInfo().setDeviceCode(intFlag);
//添加设备信息表数据 并且返回新增id //添加设备信息表数据 并且返回新增id
tDeviceInfoService.insertTDeviceInfo(listaw.gettDeviceInfo()); tDeviceInfoService.insertTDeviceInfo(listaw.gettDeviceInfo());
if (CollectionUtils.isNotEmpty(listaw.gettDeviceInfoS())){ if (CollectionUtils.isNotEmpty(listaw.gettDeviceInfoS())){
//将关联设备信息与设备进行绑定 //将关联设备信息与设备进行绑定
tDeviceInfoService.updatetRelationDeviceDetailInfo(listaw.gettDeviceInfoS(),listaw.gettDeviceInfo().getDeviceId(),listaw.gettDeviceInfo().getRelationDeviceType()); tDeviceInfoService.updatetRelationDeviceDetailInfo(listaw.gettDeviceInfoS(),listaw.gettDeviceInfo().getDeviceId(),listaw.gettDeviceInfo().getRelationDeviceType());
......
...@@ -2,8 +2,9 @@ package com.zehong.web.controller.supervise; ...@@ -2,8 +2,9 @@ package com.zehong.web.controller.supervise;
import java.io.File; import java.io.File;
import java.text.ParseException; import java.text.ParseException;
import java.util.List; import java.util.List;
import com.zehong.common.config.GassafetyProgressConfig; import com.zehong.common.config.GassafetyProgressConfig;
import com.zehong.common.core.domain.entity.SysUser;
import com.zehong.common.utils.SecurityUtils;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -37,6 +38,9 @@ public class TEmployedPeopleInfoController extends BaseController ...@@ -37,6 +38,9 @@ public class TEmployedPeopleInfoController extends BaseController
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TEmployedPeopleInfo tEmployedPeopleInfo) public TableDataInfo list(TEmployedPeopleInfo tEmployedPeopleInfo)
{ {
//获取用户信息
SysUser user = SecurityUtils.getLoginUser().getUser();
tEmployedPeopleInfo.setBeyondEnterpriseId(user.getDeptId());
startPage(); startPage();
List<TEmployedPeopleInfo> list = tEmployedPeopleInfoService.selectTEmployedPeopleInfoList(tEmployedPeopleInfo); List<TEmployedPeopleInfo> list = tEmployedPeopleInfoService.selectTEmployedPeopleInfoList(tEmployedPeopleInfo);
return getDataTable(list); return getDataTable(list);
...@@ -50,6 +54,9 @@ public class TEmployedPeopleInfoController extends BaseController ...@@ -50,6 +54,9 @@ public class TEmployedPeopleInfoController extends BaseController
@GetMapping("/export") @GetMapping("/export")
public AjaxResult export(TEmployedPeopleInfo tEmployedPeopleInfo) public AjaxResult export(TEmployedPeopleInfo tEmployedPeopleInfo)
{ {
//获取用户信息
SysUser user = SecurityUtils.getLoginUser().getUser();
tEmployedPeopleInfo.setBeyondEnterpriseId(user.getDeptId());
List<TEmployedPeopleInfo> list = tEmployedPeopleInfoService.selectTEmployedPeopleInfoList(tEmployedPeopleInfo); List<TEmployedPeopleInfo> list = tEmployedPeopleInfoService.selectTEmployedPeopleInfoList(tEmployedPeopleInfo);
ExcelUtil<TEmployedPeopleInfo> util = new ExcelUtil<TEmployedPeopleInfo>(TEmployedPeopleInfo.class); ExcelUtil<TEmployedPeopleInfo> util = new ExcelUtil<TEmployedPeopleInfo>(TEmployedPeopleInfo.class);
return util.exportExcel(list, "从业人员信息数据"); return util.exportExcel(list, "从业人员信息数据");
...@@ -122,7 +129,9 @@ public class TEmployedPeopleInfoController extends BaseController ...@@ -122,7 +129,9 @@ public class TEmployedPeopleInfoController extends BaseController
@Log(title = "企业信息查询") @Log(title = "企业信息查询")
@RequestMapping("/selectTEnterprise") @RequestMapping("/selectTEnterprise")
public AjaxResult select(){ public AjaxResult select(){
return AjaxResult.success(tEmployedPeopleInfoService.selectTEnterprise()); //获取用户信息
SysUser user = SecurityUtils.getLoginUser().getUser();
return AjaxResult.success(tEmployedPeopleInfoService.selectTEnterprise(user.getDeptId()));
} }
......
package com.zehong.web.controller.system; package com.zehong.web.controller.supervise;
import java.io.File;
import java.util.List;
import com.zehong.common.config.GassafetyProgressConfig;
import com.zehong.common.utils.file.FileUploadUtils;
import com.zehong.framework.config.ServerConfig;
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.annotation.Log;
import com.zehong.common.config.GassafetyProgressConfig;
import com.zehong.common.core.controller.BaseController; import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult; import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.domain.entity.SysUser;
import com.zehong.common.core.page.TableDataInfo;
import com.zehong.common.enums.BusinessType; import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.SecurityUtils;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.framework.config.ServerConfig;
import com.zehong.system.domain.TEnterpriseInfo; import com.zehong.system.domain.TEnterpriseInfo;
import com.zehong.system.service.ITEnterpriseInfoService; import com.zehong.system.service.ITEnterpriseInfoService;
import com.zehong.common.utils.poi.ExcelUtil; import org.springframework.beans.factory.annotation.Autowired;
import com.zehong.common.core.page.TableDataInfo; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import static com.zehong.common.utils.file.FileUtils.deleteFile; import java.io.File;
import static org.apache.tomcat.util.http.fileupload.FileUtils.deleteDirectory; import java.util.List;
/** /**
* 企业信息Controller * 企业信息Controller
...@@ -45,10 +36,13 @@ public class TEnterpriseInfoController extends BaseController ...@@ -45,10 +36,13 @@ public class TEnterpriseInfoController extends BaseController
/** /**
* 查询企业信息列表 * 查询企业信息列表
*/ */
@PreAuthorize("@ss.hasPermi('system:info:list')") @PreAuthorize("@ss.hasPermi('regulation:info:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TEnterpriseInfo tEnterpriseInfo) public TableDataInfo list(TEnterpriseInfo tEnterpriseInfo)
{ {
//获取用户信息
SysUser user = SecurityUtils.getLoginUser().getUser();
tEnterpriseInfo.setEnterpriseId(user.getDeptId());
startPage(); startPage();
List<TEnterpriseInfo> list = tEnterpriseInfoService.selectTEnterpriseInfoList(tEnterpriseInfo); List<TEnterpriseInfo> list = tEnterpriseInfoService.selectTEnterpriseInfoList(tEnterpriseInfo);
return getDataTable(list); return getDataTable(list);
...@@ -62,6 +56,9 @@ public class TEnterpriseInfoController extends BaseController ...@@ -62,6 +56,9 @@ public class TEnterpriseInfoController extends BaseController
@GetMapping("/enterpriseLists") @GetMapping("/enterpriseLists")
public TableDataInfo enterpriseLists(TEnterpriseInfo tEnterpriseInfo) public TableDataInfo enterpriseLists(TEnterpriseInfo tEnterpriseInfo)
{ {
//获取用户信息
SysUser user = SecurityUtils.getLoginUser().getUser();
tEnterpriseInfo.setEnterpriseId(user.getDeptId());
List<TEnterpriseInfo> list = tEnterpriseInfoService.selectTEnterpriseInfoList(tEnterpriseInfo); List<TEnterpriseInfo> list = tEnterpriseInfoService.selectTEnterpriseInfoList(tEnterpriseInfo);
return getDataTable(list); return getDataTable(list);
} }
...@@ -80,11 +77,14 @@ public class TEnterpriseInfoController extends BaseController ...@@ -80,11 +77,14 @@ public class TEnterpriseInfoController extends BaseController
/** /**
* 导出企业信息列表 * 导出企业信息列表
*/ */
@PreAuthorize("@ss.hasPermi('system:info:export')") @PreAuthorize("@ss.hasPermi('regulation:info:export')")
@Log(title = "企业信息", businessType = BusinessType.EXPORT) @Log(title = "企业信息", businessType = BusinessType.EXPORT)
@GetMapping("/export") @GetMapping("/export")
public AjaxResult export(TEnterpriseInfo tEnterpriseInfo) public AjaxResult export(TEnterpriseInfo tEnterpriseInfo)
{ {
//获取用户信息
SysUser user = SecurityUtils.getLoginUser().getUser();
tEnterpriseInfo.setEnterpriseId(user.getDeptId());
List<TEnterpriseInfo> list = tEnterpriseInfoService.selectTEnterpriseInfoList(tEnterpriseInfo); List<TEnterpriseInfo> list = tEnterpriseInfoService.selectTEnterpriseInfoList(tEnterpriseInfo);
ExcelUtil<TEnterpriseInfo> util = new ExcelUtil<TEnterpriseInfo>(TEnterpriseInfo.class); ExcelUtil<TEnterpriseInfo> util = new ExcelUtil<TEnterpriseInfo>(TEnterpriseInfo.class);
return util.exportExcel(list, "企业信息数据"); return util.exportExcel(list, "企业信息数据");
...@@ -93,7 +93,7 @@ public class TEnterpriseInfoController extends BaseController ...@@ -93,7 +93,7 @@ public class TEnterpriseInfoController extends BaseController
/** /**
* 获取企业信息详细信息 * 获取企业信息详细信息
*/ */
@PreAuthorize("@ss.hasPermi('system:info:query')") @PreAuthorize("@ss.hasPermi('regulation:info:query')")
@GetMapping(value = "/{enterpriseId}") @GetMapping(value = "/{enterpriseId}")
public AjaxResult getInfo(@PathVariable("enterpriseId") Long enterpriseId) public AjaxResult getInfo(@PathVariable("enterpriseId") Long enterpriseId)
{ {
...@@ -103,18 +103,21 @@ public class TEnterpriseInfoController extends BaseController ...@@ -103,18 +103,21 @@ public class TEnterpriseInfoController extends BaseController
/** /**
* 新增企业信息 * 新增企业信息
*/ */
@PreAuthorize("@ss.hasPermi('system:info:add')") @PreAuthorize("@ss.hasPermi('regulation:info:add')")
@Log(title = "企业信息", businessType = BusinessType.INSERT) @Log(title = "企业信息", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TEnterpriseInfo tEnterpriseInfo) public AjaxResult add(@RequestBody TEnterpriseInfo tEnterpriseInfo)
{ {
//获取用户信息
SysUser user = SecurityUtils.getLoginUser().getUser();
tEnterpriseInfo.setCreateEnterpriseId(user.getDeptId());
return toAjax(tEnterpriseInfoService.insertTEnterpriseInfo(tEnterpriseInfo)); return toAjax(tEnterpriseInfoService.insertTEnterpriseInfo(tEnterpriseInfo));
} }
/** /**
* 修改企业信息 * 修改企业信息
*/ */
@PreAuthorize("@ss.hasPermi('system:info:edit')") @PreAuthorize("@ss.hasPermi('regulation:info:edit')")
@Log(title = "企业信息", businessType = BusinessType.UPDATE) @Log(title = "企业信息", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TEnterpriseInfo tEnterpriseInfo) public AjaxResult edit(@RequestBody TEnterpriseInfo tEnterpriseInfo)
...@@ -139,7 +142,7 @@ public class TEnterpriseInfoController extends BaseController ...@@ -139,7 +142,7 @@ public class TEnterpriseInfoController extends BaseController
/** /**
* 删除企业信息 * 删除企业信息
*/ */
@PreAuthorize("@ss.hasPermi('system:info:remove')") @PreAuthorize("@ss.hasPermi('regulation:info:remove')")
@Log(title = "企业信息", businessType = BusinessType.DELETE) @Log(title = "企业信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{enterpriseIds}") @DeleteMapping("/{enterpriseIds}")
public AjaxResult remove(@PathVariable Long[] enterpriseIds) public AjaxResult remove(@PathVariable Long[] enterpriseIds)
......
package com.zehong.web.controller.supervise; package com.zehong.web.controller.supervise;
import java.util.List; import java.util.List;
import com.zehong.common.core.domain.entity.SysUser;
import com.zehong.common.utils.SecurityUtils;
import com.zehong.system.service.ITEmployedPeopleInfoService; import com.zehong.system.service.ITEmployedPeopleInfoService;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -43,6 +46,9 @@ public class TPipeInfoController extends BaseController ...@@ -43,6 +46,9 @@ public class TPipeInfoController extends BaseController
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TPipeInfo tPipeInfo) public TableDataInfo list(TPipeInfo tPipeInfo)
{ {
//获取用户信息
SysUser user = SecurityUtils.getLoginUser().getUser();
tPipeInfo.setBeyondEnterpriseId(user.getDeptId());
startPage(); startPage();
List<TPipeInfo> list = tPipeInfoService.selectTPipeInfoList(tPipeInfo); List<TPipeInfo> list = tPipeInfoService.selectTPipeInfoList(tPipeInfo);
return getDataTable(list); return getDataTable(list);
...@@ -56,6 +62,9 @@ public class TPipeInfoController extends BaseController ...@@ -56,6 +62,9 @@ public class TPipeInfoController extends BaseController
@GetMapping("/export") @GetMapping("/export")
public AjaxResult export(TPipeInfo tPipeInfo) public AjaxResult export(TPipeInfo tPipeInfo)
{ {
//获取用户信息
SysUser user = SecurityUtils.getLoginUser().getUser();
tPipeInfo.setBeyondEnterpriseId(user.getDeptId());
List<TPipeInfo> list = tPipeInfoService.selectTPipeInfoList(tPipeInfo); List<TPipeInfo> list = tPipeInfoService.selectTPipeInfoList(tPipeInfo);
ExcelUtil<TPipeInfo> util = new ExcelUtil<TPipeInfo>(TPipeInfo.class); ExcelUtil<TPipeInfo> util = new ExcelUtil<TPipeInfo>(TPipeInfo.class);
return util.exportExcel(list, "管道信息数据"); return util.exportExcel(list, "管道信息数据");
......
...@@ -44,6 +44,9 @@ public class TProjectInfoController extends BaseController ...@@ -44,6 +44,9 @@ public class TProjectInfoController extends BaseController
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TProjectInfo tProjectInfo) public TableDataInfo list(TProjectInfo tProjectInfo)
{ {
//获取用户信息
SysUser user = SecurityUtils.getLoginUser().getUser();
tProjectInfo.setBeyondEnterpriseId(user.getDeptId());
startPage(); startPage();
List<TProjectInfo> list = tProjectInfoService.selectTProjectInfoList(tProjectInfo); List<TProjectInfo> list = tProjectInfoService.selectTProjectInfoList(tProjectInfo);
return getDataTable(list); return getDataTable(list);
...@@ -57,6 +60,9 @@ public class TProjectInfoController extends BaseController ...@@ -57,6 +60,9 @@ public class TProjectInfoController extends BaseController
@GetMapping("/export") @GetMapping("/export")
public AjaxResult export(TProjectInfo tProjectInfo) public AjaxResult export(TProjectInfo tProjectInfo)
{ {
//获取用户信息
SysUser user = SecurityUtils.getLoginUser().getUser();
tProjectInfo.setBeyondEnterpriseId(user.getDeptId());
List<TProjectInfo> list = tProjectInfoService.selectTProjectInfoList(tProjectInfo); List<TProjectInfo> list = tProjectInfoService.selectTProjectInfoList(tProjectInfo);
ExcelUtil<TProjectInfo> util = new ExcelUtil<TProjectInfo>(TProjectInfo.class); ExcelUtil<TProjectInfo> util = new ExcelUtil<TProjectInfo>(TProjectInfo.class);
return util.exportExcel(list, "工程项目信息数据"); return util.exportExcel(list, "工程项目信息数据");
...@@ -79,17 +85,25 @@ public class TProjectInfoController extends BaseController ...@@ -79,17 +85,25 @@ public class TProjectInfoController extends BaseController
@Log(title = "工程项目信息", businessType = BusinessType.INSERT) @Log(title = "工程项目信息", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TProjectInfo tProjectInfo) throws ParseException { public AjaxResult add(@RequestBody TProjectInfo tProjectInfo) throws ParseException {
//获取用户信息
SysUser user = SecurityUtils.getLoginUser().getUser();
tProjectInfo.setBeyondEnterpriseId(user.getDeptId());
//查询是否已经有重复的年份数据 //查询是否已经有重复的年份数据
List<TProjectInfo> tProjectInfos = tProjectInfoService.selectSameYear(tProjectInfo.getProjectYear()); List<TProjectInfo> tProjectInfos = tProjectInfoService.selectSameYear(tProjectInfo.getProjectYear(),tProjectInfo.getBeyondEnterpriseId());
//说明有重复的年份 将重复的年份删除 //说明有重复的年份 将重复的年份删除
if (tProjectInfos.size()!=0){ if (tProjectInfos.size()!=0){
//重复年份删除方法 //重复年份删除方法
tProjectInfoService.deleteisSameYear(tProjectInfo.getProjectYear()); tProjectInfoService.deleteisSameYear(tProjectInfo.getProjectYear(),tProjectInfo.getBeyondEnterpriseId());
} }
SysUser user = SecurityUtils.getLoginUser().getUser(); if (user.getDeptId()!=-2){
//获取用户所属单位 //查询企业名称
String enterpriseName = user.getEnterpriseName(); String enterpriseName = tProjectInfoService.selectEnterpriseName(user.getDeptId());
tProjectInfo.setEnterpriseCode(String.valueOf(enterpriseName)); tProjectInfo.setEnterpriseCode(String.valueOf(enterpriseName));
}else {
tProjectInfo.setEnterpriseCode("政府部门");
}
//添加企业
tProjectInfo.setBeyondEnterpriseId(user.getDeptId());
return toAjax(tProjectInfoService.insertTProjectInfo(tProjectInfo)); return toAjax(tProjectInfoService.insertTProjectInfo(tProjectInfo));
} }
......
package com.zehong.web.controller.supervise; package com.zehong.web.controller.supervise;
import java.util.List; import java.util.List;
import com.zehong.common.core.domain.entity.SysUser;
import com.zehong.common.utils.SecurityUtils;
import com.zehong.system.domain.TTSiteStationInfoList; import com.zehong.system.domain.TTSiteStationInfoList;
import com.zehong.system.service.ITDeviceInfoService; import com.zehong.system.service.ITDeviceInfoService;
import com.zehong.system.service.ITEmployedPeopleInfoService; import com.zehong.system.service.ITEmployedPeopleInfoService;
...@@ -49,6 +51,9 @@ public class TSiteStationInfoController extends BaseController { ...@@ -49,6 +51,9 @@ public class TSiteStationInfoController extends BaseController {
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TSiteStationInfo tSiteStationInfo) public TableDataInfo list(TSiteStationInfo tSiteStationInfo)
{ {
//获取用户信息
SysUser user = SecurityUtils.getLoginUser().getUser();
tSiteStationInfo.setBeyondEnterpriseId(user.getDeptId());
startPage(); startPage();
List<TSiteStationInfo> list = tSiteStationInfoService.selectTSiteStationInfoList(tSiteStationInfo); List<TSiteStationInfo> list = tSiteStationInfoService.selectTSiteStationInfoList(tSiteStationInfo);
return getDataTable(list); return getDataTable(list);
...@@ -62,6 +67,9 @@ public class TSiteStationInfoController extends BaseController { ...@@ -62,6 +67,9 @@ public class TSiteStationInfoController extends BaseController {
@GetMapping("/export") @GetMapping("/export")
public AjaxResult export(TSiteStationInfo tSiteStationInfo) public AjaxResult export(TSiteStationInfo tSiteStationInfo)
{ {
//获取用户信息
SysUser user = SecurityUtils.getLoginUser().getUser();
tSiteStationInfo.setBeyondEnterpriseId(user.getDeptId());
List<TSiteStationInfo> list = tSiteStationInfoService.selectTSiteStationInfoList(tSiteStationInfo); List<TSiteStationInfo> list = tSiteStationInfoService.selectTSiteStationInfoList(tSiteStationInfo);
ExcelUtil<TSiteStationInfo> util = new ExcelUtil<TSiteStationInfo>(TSiteStationInfo.class); ExcelUtil<TSiteStationInfo> util = new ExcelUtil<TSiteStationInfo>(TSiteStationInfo.class);
return util.exportExcel(list, "场站信息数据"); return util.exportExcel(list, "场站信息数据");
......
...@@ -20,13 +20,15 @@ public class TDetectorUser extends BaseEntity ...@@ -20,13 +20,15 @@ public class TDetectorUser extends BaseEntity
private Long userId; private Long userId;
/** 用户账号 */ /** 用户账号 */
@Excel(name = "用户账号")
private String username; private String username;
/** 用户名称 */ /** 用户名称 */
@Excel(name = "用户名称") @Excel(name = "用户名称")
private String nickName; private String nickName;
/** 权属单位 */
private Long beyondEnterpriseId;
/** 用户类型(1居民用户,2商业用户,3工业用户) */ /** 用户类型(1居民用户,2商业用户,3工业用户) */
@Excel(name = "用户类型") @Excel(name = "用户类型")
private String userType; private String userType;
...@@ -62,6 +64,18 @@ public class TDetectorUser extends BaseEntity ...@@ -62,6 +64,18 @@ public class TDetectorUser extends BaseEntity
@Excel(name = "备注") @Excel(name = "备注")
private String remarks; private String remarks;
public static long getSerialVersionUID() {
return serialVersionUID;
}
public Long getBeyondEnterpriseId() {
return beyondEnterpriseId;
}
public void setBeyondEnterpriseId(Long beyondEnterpriseId) {
this.beyondEnterpriseId = beyondEnterpriseId;
}
public void setUserId(Long userId) public void setUserId(Long userId)
{ {
this.userId = userId; this.userId = userId;
...@@ -173,19 +187,20 @@ public class TDetectorUser extends BaseEntity ...@@ -173,19 +187,20 @@ public class TDetectorUser extends BaseEntity
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return "TDetectorUser{" +
.append("userId", getUserId()) "userId=" + userId +
.append("username", getUsername()) ", username='" + username + '\'' +
.append("nickName", getNickName()) ", nickName='" + nickName + '\'' +
.append("userType", getUserType()) ", beyondEnterpriseId=" + beyondEnterpriseId +
.append("address", getAddress()) ", userType='" + userType + '\'' +
.append("longitude", getLongitude()) ", address='" + address + '\'' +
.append("latitude", getLatitude()) ", longitude=" + longitude +
.append("linkman", getLinkman()) ", latitude=" + latitude +
.append("phone", getPhone()) ", linkman='" + linkman + '\'' +
.append("email", getEmail()) ", phone='" + phone + '\'' +
.append("isDel", getIsDel()) ", email='" + email + '\'' +
.append("remarks", getRemarks()) ", isDel='" + isDel + '\'' +
.toString(); ", remarks='" + remarks + '\'' +
'}';
} }
} }
...@@ -20,6 +20,9 @@ public class TEnterpriseInfo extends BaseEntity ...@@ -20,6 +20,9 @@ public class TEnterpriseInfo extends BaseEntity
/** 企业id */ /** 企业id */
private Long enterpriseId; private Long enterpriseId;
/**创建企业id*/
private Long createEnterpriseId;
/** 企业名称 */ /** 企业名称 */
@Excel(name = "企业名称") @Excel(name = "企业名称")
private String enterpriseName; private String enterpriseName;
...@@ -70,6 +73,14 @@ public class TEnterpriseInfo extends BaseEntity ...@@ -70,6 +73,14 @@ public class TEnterpriseInfo extends BaseEntity
/**本地存储图片路径*/ /**本地存储图片路径*/
private String burl; private String burl;
public Long getCreateEnterpriseId() {
return createEnterpriseId;
}
public void setCreateEnterpriseId(Long createEnterpriseId) {
this.createEnterpriseId = createEnterpriseId;
}
public String getBurl() { public String getBurl() {
return burl; return burl;
} }
...@@ -210,6 +221,7 @@ public class TEnterpriseInfo extends BaseEntity ...@@ -210,6 +221,7 @@ public class TEnterpriseInfo extends BaseEntity
public String toString() { public String toString() {
return "TEnterpriseInfo{" + return "TEnterpriseInfo{" +
"enterpriseId=" + enterpriseId + "enterpriseId=" + enterpriseId +
", createEnterpriseId=" + createEnterpriseId +
", enterpriseName='" + enterpriseName + '\'' + ", enterpriseName='" + enterpriseName + '\'' +
", registerAddress='" + registerAddress + '\'' + ", registerAddress='" + registerAddress + '\'' +
", legalRepresentative='" + legalRepresentative + '\'' + ", legalRepresentative='" + legalRepresentative + '\'' +
......
...@@ -20,11 +20,11 @@ public class TPipeInfo extends BaseEntity ...@@ -20,11 +20,11 @@ public class TPipeInfo extends BaseEntity
private Long pipeId; private Long pipeId;
/** 管道长度 */ /** 管道长度 */
@Excel(name = "管道长度") @Excel(name = "管道长度(米)")
private BigDecimal pipeLength; private BigDecimal pipeLength;
/** 管径 */ /** 管径 */
@Excel(name = "管径") @Excel(name = "管径(厘米)")
private String pipeDiameter; private String pipeDiameter;
/** 压力 */ /** 压力 */
...@@ -36,7 +36,6 @@ public class TPipeInfo extends BaseEntity ...@@ -36,7 +36,6 @@ public class TPipeInfo extends BaseEntity
private String pipeMaterial; private String pipeMaterial;
/** 管道地址 */ /** 管道地址 */
@Excel(name = "管道地址")
private String pipeAddr; private String pipeAddr;
/** 埋深 */ /** 埋深 */
...@@ -59,7 +58,6 @@ public class TPipeInfo extends BaseEntity ...@@ -59,7 +58,6 @@ public class TPipeInfo extends BaseEntity
private String peopleOccupation; private String peopleOccupation;
/** 权属单位 */ /** 权属单位 */
@Excel(name = "权属单位")
private Long beyondEnterpriseId; private Long beyondEnterpriseId;
/** 权属单位名称 */ /** 权属单位名称 */
......
...@@ -23,33 +23,35 @@ public class TProjectInfo extends BaseEntity ...@@ -23,33 +23,35 @@ public class TProjectInfo extends BaseEntity
/** 工程项目年度 */ /** 工程项目年度 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "工程项目年度", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "工程项目年度", width = 30, dateFormat = "yyyy")
private Date projectYear; private Date projectYear;
/**企业编码*/
@Excel(name = "企业名称")
private String enterpriseCode;
/** 权属单位 */
private Long beyondEnterpriseId;
/** 门站地址 */ /** 门站地址 */
@Excel(name = "门站地址") @Excel(name = "门站地址")
private String gateStationAddress; private String gateStationAddress;
/** 门站金额 */ /** 门站金额 */
@Excel(name = "门站金额") @Excel(name = "门站投资额(万元)")
private BigDecimal gateStationInvestment; private BigDecimal gateStationInvestment;
/** 门站数量 */ /** 门站数量 */
@Excel(name = "门站数量") @Excel(name = "门站数量(个)")
private Long numberGateStations; private Long numberGateStations;
/** 管道长度 */ /** 管道长度 */
@Excel(name = "管道长度") @Excel(name = "管道长度(米)")
private Long pipeLength; private Long pipeLength;
/** 管道金额 */ /** 管道金额 */
@Excel(name = "管道金额") @Excel(name = "管道投资额(万元)")
private BigDecimal pipeInvestment; private BigDecimal pipeInvestment;
/**企业编码*/
@Excel(name = "企业编码")
private String enterpriseCode;
/** 附件地址 */ /** 附件地址 */
private String nearbyAddress; private String nearbyAddress;
...@@ -60,6 +62,13 @@ public class TProjectInfo extends BaseEntity ...@@ -60,6 +62,13 @@ public class TProjectInfo extends BaseEntity
@Excel(name = "备注") @Excel(name = "备注")
private String remarks; private String remarks;
public Long getBeyondEnterpriseId() {
return beyondEnterpriseId;
}
public void setBeyondEnterpriseId(Long beyondEnterpriseId) {
this.beyondEnterpriseId = beyondEnterpriseId;
}
public String getEnterpriseCode() { public String getEnterpriseCode() {
return enterpriseCode; return enterpriseCode;
...@@ -167,6 +176,7 @@ public class TProjectInfo extends BaseEntity ...@@ -167,6 +176,7 @@ public class TProjectInfo extends BaseEntity
return "TProjectInfo{" + return "TProjectInfo{" +
"projectId=" + projectId + "projectId=" + projectId +
", projectYear=" + projectYear + ", projectYear=" + projectYear +
", beyondEnterpriseId=" + beyondEnterpriseId +
", gateStationAddress='" + gateStationAddress + '\'' + ", gateStationAddress='" + gateStationAddress + '\'' +
", gateStationInvestment=" + gateStationInvestment + ", gateStationInvestment=" + gateStationInvestment +
", numberGateStations=" + numberGateStations + ", numberGateStations=" + numberGateStations +
......
...@@ -64,7 +64,7 @@ public interface TEmployedPeopleInfoMapper ...@@ -64,7 +64,7 @@ public interface TEmployedPeopleInfoMapper
* 企业信息查询(下拉框数据) * 企业信息查询(下拉框数据)
* @return * @return
*/ */
List<TEnterpriseInfo> selectTEnterprise(); List<TEnterpriseInfo> selectTEnterprise(Long deptId);
/** /**
* 根据企业id查询企业名称 * 根据企业id查询企业名称
......
...@@ -3,6 +3,7 @@ package com.zehong.system.mapper; ...@@ -3,6 +3,7 @@ package com.zehong.system.mapper;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import com.zehong.system.domain.TProjectInfo; import com.zehong.system.domain.TProjectInfo;
import org.apache.ibatis.annotations.Param;
/** /**
* 工程项目信息Mapper接口 * 工程项目信息Mapper接口
...@@ -65,13 +66,13 @@ public interface TProjectInfoMapper ...@@ -65,13 +66,13 @@ public interface TProjectInfoMapper
* @param projectYear * @param projectYear
* @return * @return
*/ */
List<TProjectInfo> selectSameYear(Date projectYear); List<TProjectInfo> selectSameYear(@Param("projectYear") Date projectYear,@Param("beyondEnterpriseId") Long beyondEnterpriseId);
/** /**
* 重复年份删除方法 * 重复年份删除方法
* @param isSameYear * @param isSameYear
*/ */
void deleteisSameYear(Date isSameYear); void deleteisSameYear(@Param("isSameYear")Date isSameYear,@Param("beyondEnterpriseId")Long beyondEnterpriseId);
/** /**
* 查询修改文件之前的路径 * 查询修改文件之前的路径
...@@ -79,4 +80,11 @@ public interface TProjectInfoMapper ...@@ -79,4 +80,11 @@ public interface TProjectInfoMapper
* @return * @return
*/ */
TProjectInfo selectNearbyAddress(Long projectId); TProjectInfo selectNearbyAddress(Long projectId);
/**
* 查询企业名称
* @param deptId
* @return
*/
String selectEnterpriseName(Long deptId);
} }
...@@ -64,7 +64,7 @@ public interface ITEmployedPeopleInfoService ...@@ -64,7 +64,7 @@ public interface ITEmployedPeopleInfoService
* 企业信息查询(下拉框数据) * 企业信息查询(下拉框数据)
* @return * @return
*/ */
public List<TEnterpriseInfo> selectTEnterprise(); public List<TEnterpriseInfo> selectTEnterprise(Long deptId);
/** /**
* 根据企业id查询企业名称 * 根据企业id查询企业名称
......
...@@ -65,17 +65,24 @@ public interface ITProjectInfoService ...@@ -65,17 +65,24 @@ public interface ITProjectInfoService
* @param projectYear * @param projectYear
* @return * @return
*/ */
List<TProjectInfo> selectSameYear(Date projectYear); List<TProjectInfo> selectSameYear(Date projectYear,Long beyondEnterpriseId);
/** /**
* 重复年份删除方法 * 重复年份删除方法
* @param isSameYear * @param isSameYear
*/ */
void deleteisSameYear(Date isSameYear); void deleteisSameYear(Date isSameYear,Long beyondEnterpriseId);
/** /**
* 查询修改文件之前的路径 * 查询修改文件之前的路径
* @param projectId * @param projectId
*/ */
TProjectInfo selectNearbyAddress(Long projectId); TProjectInfo selectNearbyAddress(Long projectId);
/**
* 查询企业名称
* @param deptId
* @return
*/
String selectEnterpriseName(Long deptId);
} }
...@@ -100,8 +100,8 @@ public class TEmployedPeopleInfoServiceImpl implements ITEmployedPeopleInfoServi ...@@ -100,8 +100,8 @@ public class TEmployedPeopleInfoServiceImpl implements ITEmployedPeopleInfoServi
* @return * @return
*/ */
@Override @Override
public List<TEnterpriseInfo> selectTEnterprise() { public List<TEnterpriseInfo> selectTEnterprise(Long deptId) {
return tEmployedPeopleInfoMapper.selectTEnterprise(); return tEmployedPeopleInfoMapper.selectTEnterprise(deptId);
} }
/** /**
......
...@@ -101,8 +101,8 @@ public class TProjectInfoServiceImpl implements ITProjectInfoService ...@@ -101,8 +101,8 @@ public class TProjectInfoServiceImpl implements ITProjectInfoService
* @return * @return
*/ */
@Override @Override
public List<TProjectInfo> selectSameYear(Date projectYear) { public List<TProjectInfo> selectSameYear(Date projectYear,Long beyondEnterpriseId) {
List<TProjectInfo> tProjectInfos = tProjectInfoMapper.selectSameYear(projectYear); List<TProjectInfo> tProjectInfos = tProjectInfoMapper.selectSameYear(projectYear,beyondEnterpriseId);
return tProjectInfos; return tProjectInfos;
} }
...@@ -111,8 +111,8 @@ public class TProjectInfoServiceImpl implements ITProjectInfoService ...@@ -111,8 +111,8 @@ public class TProjectInfoServiceImpl implements ITProjectInfoService
* @param isSameYear * @param isSameYear
*/ */
@Override @Override
public void deleteisSameYear(Date isSameYear) { public void deleteisSameYear(Date isSameYear,Long beyondEnterpriseId) {
tProjectInfoMapper.deleteisSameYear(isSameYear); tProjectInfoMapper.deleteisSameYear(isSameYear,beyondEnterpriseId);
} }
/** /**
...@@ -125,4 +125,15 @@ public class TProjectInfoServiceImpl implements ITProjectInfoService ...@@ -125,4 +125,15 @@ public class TProjectInfoServiceImpl implements ITProjectInfoService
TProjectInfo tProjectInfo = tProjectInfoMapper.selectNearbyAddress(projectId); TProjectInfo tProjectInfo = tProjectInfoMapper.selectNearbyAddress(projectId);
return tProjectInfo; return tProjectInfo;
} }
/**
* 查询企业名称
* @param deptId
* @return
*/
@Override
public String selectEnterpriseName(Long deptId) {
String enterpriseName = tProjectInfoMapper.selectEnterpriseName(deptId);
return enterpriseName;
}
} }
...@@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="userId" column="user_id" /> <result property="userId" column="user_id" />
<result property="username" column="username" /> <result property="username" column="username" />
<result property="nickName" column="nick_name" /> <result property="nickName" column="nick_name" />
<result property="beyondEnterpriseId" column="beyond_enterprise_id" />
<result property="userType" column="user_type" /> <result property="userType" column="user_type" />
<result property="address" column="address" /> <result property="address" column="address" />
<result property="longitude" column="longitude" /> <result property="longitude" column="longitude" />
...@@ -26,6 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -26,6 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectTDetectorUserList" parameterType="TDetectorUser" resultMap="TDetectorUserResult"> <select id="selectTDetectorUserList" parameterType="TDetectorUser" resultMap="TDetectorUserResult">
select user_id, username, nick_name, (CASE user_type WHEN '1' THEN '居民用户' WHEN '2' THEN '商业用户'WHEN '3' THEN '工业用户'end) as user_type , address, longitude, latitude, linkman, phone, email, is_del, remarks from t_detector_user select user_id, username, nick_name, (CASE user_type WHEN '1' THEN '居民用户' WHEN '2' THEN '商业用户'WHEN '3' THEN '工业用户'end) as user_type , address, longitude, latitude, linkman, phone, email, is_del, remarks from t_detector_user
<where> is_del = '0' <where> is_del = '0'
<if test="beyondEnterpriseId != null and beyondEnterpriseId != -2"> and beyond_enterprise_id =#{beyondEnterpriseId}</if>
<if test="username != null and username != ''"> and username like concat('%', #{username}, '%')</if> <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="nickName != null and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if>
</where> </where>
...@@ -115,6 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -115,6 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="address != null">address,</if> <if test="address != null">address,</if>
<if test="longitude != null">longitude,</if> <if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if> <if test="latitude != null">latitude,</if>
<if test="beyondEnterpriseId != null">beyond_enterprise_id,</if>
<if test="linkman != null">linkman,</if> <if test="linkman != null">linkman,</if>
<if test="phone != null">phone,</if> <if test="phone != null">phone,</if>
<if test="email != null">email,</if> <if test="email != null">email,</if>
...@@ -128,6 +131,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -128,6 +131,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="address != null">#{address},</if> <if test="address != null">#{address},</if>
<if test="longitude != null">#{longitude},</if> <if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if> <if test="latitude != null">#{latitude},</if>
<if test="beyondEnterpriseId != null">#{beyondEnterpriseId},</if>
<if test="linkman != null">#{linkman},</if> <if test="linkman != null">#{linkman},</if>
<if test="phone != null">#{phone},</if> <if test="phone != null">#{phone},</if>
<if test="email != null">#{email},</if> <if test="email != null">#{email},</if>
......
...@@ -52,6 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -52,6 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectTDeviceInfoVo"/> <include refid="selectTDeviceInfoVo"/>
<where> <where>
a.is_del='0' a.is_del='0'
<if test="beyondEnterpriseId != null and beyondEnterpriseId != -2"> and beyond_enterprise_id = #{beyondEnterpriseId}</if>
<if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if> <if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
<if test="deviceCode != null and deviceCode != ''"> and device_code = #{deviceCode}</if> <if test="deviceCode != null and deviceCode != ''"> and device_code = #{deviceCode}</if>
<if test="deviceAddr != null and deviceAddr != ''"> and device_addr = #{deviceAddr}</if> <if test="deviceAddr != null and deviceAddr != ''"> and device_addr = #{deviceAddr}</if>
......
...@@ -49,6 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -49,6 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select employed_people_id, employed_people_name,avatar_address, id_card, certificate_num, beyond_enterprise_name, beyond_enterprise_id, register_examination_type,(CASE people_occupation WHEN '1' THEN '主要负责人' WHEN '2' THEN '安全管理人员' WHEN '3' 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 select employed_people_id, employed_people_name,avatar_address, id_card, certificate_num, beyond_enterprise_name, beyond_enterprise_id, register_examination_type,(CASE people_occupation WHEN '1' THEN '主要负责人' WHEN '2' THEN '安全管理人员' WHEN '3' 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> <where>
1=1 and is_del='0' 1=1 and is_del='0'
<if test=" beyondEnterpriseId !='-2' and beyondEnterpriseId != null and beyondEnterpriseId != ''"> and beyond_enterprise_id = #{beyondEnterpriseId}</if>
<if test="employedPeopleName != null and employedPeopleName != ''"> and employed_people_name like concat('%', #{employedPeopleName}, '%')</if> <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="idCard != null and idCard != ''"> and id_card = #{idCard}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if> <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
...@@ -137,7 +138,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -137,7 +138,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--企业信息查询(下拉框数据)--> <!--企业信息查询(下拉框数据)-->
<select id="selectTEnterprise" resultMap="TEnterpriseInfoResult"> <select id="selectTEnterprise" resultMap="TEnterpriseInfoResult">
select enterprise_id,enterprise_name from t_enterprise_info where is_del='0' select enterprise_id,enterprise_name from t_enterprise_info where
<if test="deptId!=null and deptId!= -2">
enterprise_id =#{deptId} and
</if>
is_del='0'
</select> </select>
<!--根据企业id查询企业名称--> <!--根据企业id查询企业名称-->
......
...@@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="TEnterpriseInfo" id="TEnterpriseInfoResult"> <resultMap type="TEnterpriseInfo" id="TEnterpriseInfoResult">
<result property="enterpriseId" column="enterprise_id" /> <result property="enterpriseId" column="enterprise_id" />
<result property="createEnterpriseId" column="create_enterprise_id" />
<result property="enterpriseName" column="enterprise_name" /> <result property="enterpriseName" column="enterprise_name" />
<result property="registerAddress" column="register_address" /> <result property="registerAddress" column="register_address" />
<result property="legalRepresentative" column="legal_representative" /> <result property="legalRepresentative" column="legal_representative" />
...@@ -35,6 +36,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -35,6 +36,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectTEnterpriseInfoVo"/> <include refid="selectTEnterpriseInfoVo"/>
<where> <where>
1=1 and is_del='0' 1=1 and is_del='0'
<if test="enterpriseId != -2 and enterpriseId != null and enterpriseId != ''">
and create_enterprise_id = #{enterpriseId}
</if>
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if> <if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
<if test="registerAddress != null and registerAddress != ''"> and register_address = #{registerAddress}</if> <if test="registerAddress != null and registerAddress != ''"> and register_address = #{registerAddress}</if>
<if test="legalRepresentative != null and legalRepresentative != ''"> and legal_representative = #{legalRepresentative}</if> <if test="legalRepresentative != null and legalRepresentative != ''"> and legal_representative = #{legalRepresentative}</if>
...@@ -43,7 +47,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -43,7 +47,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="licenseValidityTime != null and licenseValidityTime != ''"> and license_validity_time = #{licenseValidityTime}</if> <if test="licenseValidityTime != null and licenseValidityTime != ''"> and license_validity_time = #{licenseValidityTime}</if>
<if test="annualSupervisionInspection != null and annualSupervisionInspection != ''"> and annual_supervision_inspection = #{annualSupervisionInspection}</if> <if test="annualSupervisionInspection != null and annualSupervisionInspection != ''"> and annual_supervision_inspection = #{annualSupervisionInspection}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if> <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
<if test="enterpriseId != null and enterpriseId != ''"> and enterprise_id = #{enterpriseId}</if>
</where> </where>
group by enterprise_id desc group by enterprise_id desc
</select> </select>
...@@ -56,6 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -56,6 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="insertTEnterpriseInfo" parameterType="TEnterpriseInfo" useGeneratedKeys="true" keyProperty="enterpriseId"> <insert id="insertTEnterpriseInfo" parameterType="TEnterpriseInfo" useGeneratedKeys="true" keyProperty="enterpriseId">
insert into t_enterprise_info insert into t_enterprise_info
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="createEnterpriseId != null">create_enterprise_id,</if>
<if test="enterpriseName != null">enterprise_name,</if> <if test="enterpriseName != null">enterprise_name,</if>
<if test="registerAddress != null">register_address,</if> <if test="registerAddress != null">register_address,</if>
<if test="legalRepresentative != null">legal_representative,</if> <if test="legalRepresentative != null">legal_representative,</if>
...@@ -75,6 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -75,6 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="doDusiness != null">do_business,</if> <if test="doDusiness != null">do_business,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="createEnterpriseId != null">#{createEnterpriseId},</if>
<if test="enterpriseName != null">#{enterpriseName},</if> <if test="enterpriseName != null">#{enterpriseName},</if>
<if test="registerAddress != null">#{registerAddress},</if> <if test="registerAddress != null">#{registerAddress},</if>
<if test="legalRepresentative != null">#{legalRepresentative},</if> <if test="legalRepresentative != null">#{legalRepresentative},</if>
......
...@@ -43,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -43,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="pipeTrend != null and pipeTrend != ''"> and pipe_trend = #{pipeTrend}</if> <if test="pipeTrend != null and pipeTrend != ''"> and pipe_trend = #{pipeTrend}</if>
<if test="buildDate != null and buildDate != ''"> and build_date = #{buildDate}</if> <if test="buildDate != null and buildDate != ''"> and build_date = #{buildDate}</if>
<if test="buildUnit != null and buildUnit != ''"> and build_unit = #{buildUnit}</if> <if test="buildUnit != null and buildUnit != ''"> and build_unit = #{buildUnit}</if>
<if test="beyondEnterpriseId != null "> and beyond_enterprise_id = #{beyondEnterpriseId}</if> <if test="beyondEnterpriseId != null and beyondEnterpriseId != -2"> and beyond_enterprise_id = #{beyondEnterpriseId}</if>
<if test="beyondEnterpriseName != null and beyondEnterpriseName != ''"> and beyond_enterprise_name like concat('%', #{beyondEnterpriseName}, '%')</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="coordinates != null and coordinates != ''"> and coordinates = #{coordinates}</if>
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if> <if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
......
...@@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="projectId" column="project_id" /> <result property="projectId" column="project_id" />
<result property="enterpriseCode" column="enterprise_code" /> <result property="enterpriseCode" column="enterprise_code" />
<result property="projectYear" column="project_year" /> <result property="projectYear" column="project_year" />
<result property="beyondEnterpriseId" column="beyond_enterprise_id" />
<result property="gateStationAddress" column="gate_station_address" /> <result property="gateStationAddress" column="gate_station_address" />
<result property="gateStationInvestment" column="gate_station_investment" /> <result property="gateStationInvestment" column="gate_station_investment" />
<result property="numberGateStations" column="number_gate_stations" /> <result property="numberGateStations" column="number_gate_stations" />
...@@ -31,6 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -31,6 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where> <where>
is_del='0' is_del='0'
<if test="projectYear != null "> and project_year = #{projectYear}</if> <if test="projectYear != null "> and project_year = #{projectYear}</if>
<if test="beyondEnterpriseId != null and beyondEnterpriseId != -2 "> and beyond_enterprise_id = #{beyondEnterpriseId}</if>
<if test="gateStationAddress != null and gateStationAddress != ''"> and gate_station_address = #{gateStationAddress}</if> <if test="gateStationAddress != null and gateStationAddress != ''"> and gate_station_address = #{gateStationAddress}</if>
<if test="gateStationInvestment != null "> and gate_station_investment = #{gateStationInvestment}</if> <if test="gateStationInvestment != null "> and gate_station_investment = #{gateStationInvestment}</if>
<if test="numberGateStations != null "> and number_gate_stations = #{numberGateStations}</if> <if test="numberGateStations != null "> and number_gate_stations = #{numberGateStations}</if>
...@@ -51,6 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -51,6 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="insertTProjectInfo" parameterType="TProjectInfo" useGeneratedKeys="true" keyProperty="projectId"> <insert id="insertTProjectInfo" parameterType="TProjectInfo" useGeneratedKeys="true" keyProperty="projectId">
insert into t_project_info insert into t_project_info
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="beyondEnterpriseId != null">beyond_enterprise_id,</if>
<if test="projectYear != null">project_year,</if> <if test="projectYear != null">project_year,</if>
<if test="enterpriseCode != null">enterprise_code,</if> <if test="enterpriseCode != null">enterprise_code,</if>
<if test="gateStationAddress != null">gate_station_address,</if> <if test="gateStationAddress != null">gate_station_address,</if>
...@@ -67,6 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -67,6 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="remarks != null">remarks,</if> <if test="remarks != null">remarks,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="beyondEnterpriseId != null">#{beyondEnterpriseId},</if>
<if test="projectYear != null">#{projectYear},</if> <if test="projectYear != null">#{projectYear},</if>
<if test="enterpriseCode != null">#{enterpriseCode},</if> <if test="enterpriseCode != null">#{enterpriseCode},</if>
<if test="gateStationAddress != null">#{gateStationAddress},</if> <if test="gateStationAddress != null">#{gateStationAddress},</if>
...@@ -118,16 +122,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -118,16 +122,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--查询是否已经有重复的年份数据--> <!--查询是否已经有重复的年份数据-->
<select id="selectSameYear" resultMap="TProjectInfoResult"> <select id="selectSameYear" resultMap="TProjectInfoResult">
select project_id from t_project_info where project_year=#{projectYear} select project_id from t_project_info where project_year=#{projectYear} and beyond_enterprise_id=#{beyondEnterpriseId}
</select> </select>
<!--重复年份删除方法--> <!--重复年份删除方法-->
<update id="deleteisSameYear"> <update id="deleteisSameYear">
update t_project_info set is_del='1' where project_year=#{isSameYear} update t_project_info set is_del='1' where project_year=#{isSameYear} and beyond_enterprise_id=#{beyondEnterpriseId}
</update> </update>
<!--查询修改文件之前的路径--> <!--查询修改文件之前的路径-->
<select id="selectNearbyAddress" resultMap="TProjectInfoResult"> <select id="selectNearbyAddress" resultMap="TProjectInfoResult">
select nearby_address from t_project_info where project_id=#{projectId} select nearby_address from t_project_info where project_id=#{projectId}
</select> </select>
<!--查询企业名称-->
<select id="selectEnterpriseName" resultType="java.lang.String">
select enterprise_name from t_enterprise_info where
enterprise_id =#{deptId} and is_del='0'
</select>
</mapper> </mapper>
...@@ -33,6 +33,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -33,6 +33,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectTSiteStationInfoVo"/> <include refid="selectTSiteStationInfoVo"/>
<where> <where>
is_del='0' is_del='0'
<if test="beyondEnterpriseId != null and beyondEnterpriseId != -2">
and beyond_enterprise_id = #{beyondEnterpriseId}
</if>
<if test="siteStationName != null and siteStationName != ''"> and site_station_name like concat('%', #{siteStationName}, '%')</if> <if test="siteStationName != null and siteStationName != ''"> and site_station_name like concat('%', #{siteStationName}, '%')</if>
<if test="beyondEnterpriseName != null and beyondEnterpriseName != ''"> and beyond_enterprise_name like concat('%', #{beyondEnterpriseName}, '%')</if> <if test="beyondEnterpriseName != null and beyondEnterpriseName != ''"> and beyond_enterprise_name like concat('%', #{beyondEnterpriseName}, '%')</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if> <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
......
...@@ -365,7 +365,7 @@ ...@@ -365,7 +365,7 @@
<el-row> <el-row>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="设备类型" prop="deviceType"> <el-form-item label="设备类型" prop="deviceType">
<el-select v-model="form.deviceType" placeholder="请选择设备类型"> <el-select v-model="form.deviceType" placeholder="请选择设备类型" style="width: 100%">
<el-option label="阀井" value="1" /> <el-option label="阀井" value="1" />
<el-option label="调压箱" value="2" /> <el-option label="调压箱" value="2" />
</el-select> </el-select>
...@@ -374,7 +374,7 @@ ...@@ -374,7 +374,7 @@
<el-col :span="11"> <el-col :span="11">
<el-form-item label="权属单位" prop="beyondEnterpriseId"> <el-form-item label="权属单位" prop="beyondEnterpriseId">
<el-select v-model="form.beyondEnterpriseId" placeholder="请在下拉框中选择权属单位" maxlength="255" :disabled="false" clearable> <el-select v-model="form.beyondEnterpriseId" style="width: 100%" placeholder="请在下拉框中选择权属单位" maxlength="255" :disabled="false" clearable>
<el-option v-for="item in test" :key="item.enterpriseId" :label="item.enterpriseName" :value="item.enterpriseId"> <el-option v-for="item in test" :key="item.enterpriseId" :label="item.enterpriseName" :value="item.enterpriseId">
</el-option> </el-option>
</el-select> </el-select>
......
...@@ -36,6 +36,28 @@ ...@@ -36,6 +36,28 @@
v-hasPermi="['supervise:user:add']" v-hasPermi="['supervise:user:add']"
>新增</el-button> >新增</el-button>
</el-col> </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:user: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:user:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
...@@ -133,9 +155,9 @@ ...@@ -133,9 +155,9 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="11"> <el-col :span="11" >
<el-form-item label="用户类型" prop="userType"> <el-form-item label="用户类型" prop="userType">
<el-select v-model="form.userType" placeholder="请选择用户类型"> <el-select v-model="form.userType" placeholder="请选择用户类型" style="width:220px">
<el-option label="居民用户" value="1" /> <el-option label="居民用户" value="1" />
<el-option label="商业用户" value="2" /> <el-option label="商业用户" value="2" />
<el-option label="工业用户" value="3" /> <el-option label="工业用户" value="3" />
......
...@@ -105,10 +105,10 @@ ...@@ -105,10 +105,10 @@
<span slot-scope="scope" v-if="scope.row.buildUnit">{{scope.row.buildUnit}}</span> <span slot-scope="scope" v-if="scope.row.buildUnit">{{scope.row.buildUnit}}</span>
<span v-else>-</span> <span v-else>-</span>
</el-table-column> </el-table-column>
<el-table-column label="权属单位" align="center" prop="beyondEnterpriseId" > <!-- <el-table-column label="权属单位" align="center" prop="beyondEnterpriseId" >-->
<span slot-scope="scope" v-if="scope.row.beyondEnterpriseId">{{scope.row.beyondEnterpriseId}}</span> <!-- <span slot-scope="scope" v-if="scope.row.beyondEnterpriseId">{{scope.row.beyondEnterpriseId}}</span>-->
<span v-else>-</span> <!-- <span v-else>-</span>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="权属单位" align="center" prop="beyondEnterpriseName" > <el-table-column label="权属单位" align="center" prop="beyondEnterpriseName" >
<span slot-scope="scope" v-if="scope.row.beyondEnterpriseName">{{scope.row.beyondEnterpriseName}}</span> <span slot-scope="scope" v-if="scope.row.beyondEnterpriseName">{{scope.row.beyondEnterpriseName}}</span>
<span v-else>-</span> <span v-else>-</span>
......
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