forked from xxhjsb/wit-park-backend
还有一个小问题
parent
bba025e47d
commit
2ec9a26365
|
@ -3,8 +3,8 @@ package com.hbt.safety.supervision.controller;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.hbt.safety.supervision.pojo.EnterpriseInfomation;
|
import com.hbt.safety.supervision.pojo.EnterpriseInformation;
|
||||||
import com.hbt.safety.supervision.service.IEnterpriseInfomationService;
|
import com.hbt.safety.supervision.service.IEnterpriseInformationService;
|
||||||
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;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
@ -20,20 +20,20 @@ import com.hbt.common.core.web.page.TableDataInfo;
|
||||||
* @author zhangyu
|
* @author zhangyu
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/infomation")
|
@RequestMapping("/information")
|
||||||
public class EnterpriseInfomationController extends BaseController
|
public class EnterpriseInformationController extends BaseController
|
||||||
{
|
{
|
||||||
@Autowired
|
@Autowired
|
||||||
private IEnterpriseInfomationService enterpriseInfomationService;
|
private IEnterpriseInformationService enterpriseInformationService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询企业信息列表
|
* 查询企业信息列表
|
||||||
*/
|
*/
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public String list(EnterpriseInfomation enterpriseInfomation)
|
public String list(EnterpriseInformation enterpriseInformation)
|
||||||
{
|
{
|
||||||
startPage();
|
startPage();
|
||||||
List<EnterpriseInfomation> list = enterpriseInfomationService.selectEnterpriseInfomationList(enterpriseInfomation);
|
List<EnterpriseInformation> list = enterpriseInformationService.selectEnterpriseInformationList(enterpriseInformation);
|
||||||
TableDataInfo tableDataInfo = getDataTable(list);
|
TableDataInfo tableDataInfo = getDataTable(list);
|
||||||
return JSONObject.toJSONString(tableDataInfo);
|
return JSONObject.toJSONString(tableDataInfo);
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ public class EnterpriseInfomationController extends BaseController
|
||||||
@GetMapping(value = "/getInfo")
|
@GetMapping(value = "/getInfo")
|
||||||
public String getInfo(int id)
|
public String getInfo(int id)
|
||||||
{
|
{
|
||||||
AjaxResult ajaxResult = success(enterpriseInfomationService.selectEnterpriseInfomationById(id));
|
AjaxResult ajaxResult = success(enterpriseInformationService.selectEnterpriseInformationById(id));
|
||||||
return JSONObject.toJSONString(ajaxResult);
|
return JSONObject.toJSONString(ajaxResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,9 +52,9 @@ public class EnterpriseInfomationController extends BaseController
|
||||||
* 新增企业信息
|
* 新增企业信息
|
||||||
*/
|
*/
|
||||||
@GetMapping("/add")
|
@GetMapping("/add")
|
||||||
public String add(@RequestBody EnterpriseInfomation enterpriseInfomation)
|
public String add(@RequestBody EnterpriseInformation enterpriseInformation)
|
||||||
{
|
{
|
||||||
AjaxResult ajaxResult = toAjax(enterpriseInfomationService.insertEnterpriseInfomation(enterpriseInfomation));
|
AjaxResult ajaxResult = toAjax(enterpriseInformationService.insertEnterpriseInformation(enterpriseInformation));
|
||||||
return JSONObject.toJSONString(ajaxResult);
|
return JSONObject.toJSONString(ajaxResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,9 +62,9 @@ public class EnterpriseInfomationController extends BaseController
|
||||||
* 修改企业信息
|
* 修改企业信息
|
||||||
*/
|
*/
|
||||||
@GetMapping("/edit")
|
@GetMapping("/edit")
|
||||||
public String edit(@RequestBody EnterpriseInfomation enterpriseInfomation)
|
public String edit(@RequestBody EnterpriseInformation enterpriseInformation)
|
||||||
{
|
{
|
||||||
AjaxResult ajaxResult = toAjax(enterpriseInfomationService.updateEnterpriseInfomation(enterpriseInfomation));
|
AjaxResult ajaxResult = toAjax(enterpriseInformationService.updateEnterpriseInformation(enterpriseInformation));
|
||||||
return JSONObject.toJSONString(ajaxResult);
|
return JSONObject.toJSONString(ajaxResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ public class EnterpriseInfomationController extends BaseController
|
||||||
@GetMapping("/remove")
|
@GetMapping("/remove")
|
||||||
public String remove(int[] ids)
|
public String remove(int[] ids)
|
||||||
{
|
{
|
||||||
AjaxResult ajaxResult = toAjax(enterpriseInfomationService.deleteEnterpriseInfomationByIds(ids));
|
AjaxResult ajaxResult = toAjax(enterpriseInformationService.deleteEnterpriseInformationByIds(ids));
|
||||||
return JSONObject.toJSONString(ajaxResult);
|
return JSONObject.toJSONString(ajaxResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,6 +84,6 @@ public class EnterpriseInfomationController extends BaseController
|
||||||
@GetMapping("/enterpriseStatistics")
|
@GetMapping("/enterpriseStatistics")
|
||||||
public String enterpriseStatistics()
|
public String enterpriseStatistics()
|
||||||
{
|
{
|
||||||
return enterpriseInfomationService.enterpriseStatistics();
|
return enterpriseInformationService.enterpriseStatistics();
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -3,14 +3,14 @@ package com.hbt.safety.supervision.mapper;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.hbt.safety.supervision.pojo.EnterpriseInfomation;
|
import com.hbt.safety.supervision.pojo.EnterpriseInformation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 企业信息Mapper接口
|
* 企业信息Mapper接口
|
||||||
*
|
*
|
||||||
* @author zhangyu
|
* @author zhangyu
|
||||||
*/
|
*/
|
||||||
public interface EnterpriseInfomationMapper
|
public interface EnterpriseInformationMapper
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 查询企业信息
|
* 查询企业信息
|
||||||
|
@ -18,31 +18,31 @@ public interface EnterpriseInfomationMapper
|
||||||
* @param id 企业信息主键
|
* @param id 企业信息主键
|
||||||
* @return 企业信息
|
* @return 企业信息
|
||||||
*/
|
*/
|
||||||
EnterpriseInfomation selectEnterpriseInfomationById(int id);
|
EnterpriseInformation selectEnterpriseInformationById(int id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询企业信息列表
|
* 查询企业信息列表
|
||||||
*
|
*
|
||||||
* @param enterpriseInfomation 企业信息
|
* @param enterpriseInformation 企业信息
|
||||||
* @return 企业信息集合
|
* @return 企业信息集合
|
||||||
*/
|
*/
|
||||||
List<EnterpriseInfomation> selectEnterpriseInfomationList(EnterpriseInfomation enterpriseInfomation);
|
List<EnterpriseInformation> selectEnterpriseInformationList(EnterpriseInformation enterpriseInformation);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增企业信息
|
* 新增企业信息
|
||||||
*
|
*
|
||||||
* @param enterpriseInfomation 企业信息
|
* @param enterpriseInformation 企业信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
int insertEnterpriseInfomation(EnterpriseInfomation enterpriseInfomation);
|
int insertEnterpriseInformation(EnterpriseInformation enterpriseInformation);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改企业信息
|
* 修改企业信息
|
||||||
*
|
*
|
||||||
* @param enterpriseInfomation 企业信息
|
* @param enterpriseInformation 企业信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
int updateEnterpriseInfomation(EnterpriseInfomation enterpriseInfomation);
|
int updateEnterpriseInformation(EnterpriseInformation enterpriseInformation);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除企业信息
|
* 删除企业信息
|
||||||
|
@ -50,7 +50,7 @@ public interface EnterpriseInfomationMapper
|
||||||
* @param id 企业信息主键
|
* @param id 企业信息主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
int deleteEnterpriseInfomationById(int id);
|
int deleteEnterpriseInformationById(int id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除企业信息
|
* 批量删除企业信息
|
||||||
|
@ -58,14 +58,14 @@ public interface EnterpriseInfomationMapper
|
||||||
* @param ids 需要删除的数据主键集合
|
* @param ids 需要删除的数据主键集合
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
int deleteEnterpriseInfomationByIds(int[] ids);
|
int deleteEnterpriseInformationByIds(int[] ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询企业信息列表
|
* 查询企业信息列表
|
||||||
*
|
*
|
||||||
* @return 企业信息集合
|
* @return 企业信息集合
|
||||||
*/
|
*/
|
||||||
List<EnterpriseInfomation> selectEnterpriseInfomations();
|
List<EnterpriseInformation> selectEnterpriseInformations();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 在管企业分类统计
|
* 在管企业分类统计
|
|
@ -6,12 +6,12 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 企业信息对象 enterprise_infomation
|
* 企业信息对象 enterprise_information
|
||||||
*
|
*
|
||||||
* @author zhangyu
|
* @author zhangyu
|
||||||
* @date 2023-02-14
|
* @date 2023-02-14
|
||||||
*/
|
*/
|
||||||
public class EnterpriseInfomation extends BaseEntity
|
public class EnterpriseInformation extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
|
@ -2,7 +2,7 @@ package com.hbt.safety.supervision.service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.hbt.safety.supervision.pojo.EnterpriseInfomation;
|
import com.hbt.safety.supervision.pojo.EnterpriseInformation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 企业信息Service接口
|
* 企业信息Service接口
|
||||||
|
@ -10,7 +10,7 @@ import com.hbt.safety.supervision.pojo.EnterpriseInfomation;
|
||||||
* @author zhangyu
|
* @author zhangyu
|
||||||
* @date 2023-02-14
|
* @date 2023-02-14
|
||||||
*/
|
*/
|
||||||
public interface IEnterpriseInfomationService
|
public interface IEnterpriseInformationService
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 查询企业信息
|
* 查询企业信息
|
||||||
|
@ -18,31 +18,31 @@ public interface IEnterpriseInfomationService
|
||||||
* @param id 企业信息主键
|
* @param id 企业信息主键
|
||||||
* @return 企业信息
|
* @return 企业信息
|
||||||
*/
|
*/
|
||||||
EnterpriseInfomation selectEnterpriseInfomationById(int id);
|
EnterpriseInformation selectEnterpriseInformationById(int id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询企业信息列表
|
* 查询企业信息列表
|
||||||
*
|
*
|
||||||
* @param enterpriseInfomation 企业信息
|
* @param enterpriseInformation 企业信息
|
||||||
* @return 企业信息集合
|
* @return 企业信息集合
|
||||||
*/
|
*/
|
||||||
List<EnterpriseInfomation> selectEnterpriseInfomationList(EnterpriseInfomation enterpriseInfomation);
|
List<EnterpriseInformation> selectEnterpriseInformationList(EnterpriseInformation enterpriseInformation);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增企业信息
|
* 新增企业信息
|
||||||
*
|
*
|
||||||
* @param enterpriseInfomation 企业信息
|
* @param enterpriseInformation 企业信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
int insertEnterpriseInfomation(EnterpriseInfomation enterpriseInfomation);
|
int insertEnterpriseInformation(EnterpriseInformation enterpriseInformation);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改企业信息
|
* 修改企业信息
|
||||||
*
|
*
|
||||||
* @param enterpriseInfomation 企业信息
|
* @param enterpriseInformation 企业信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
int updateEnterpriseInfomation(EnterpriseInfomation enterpriseInfomation);
|
int updateEnterpriseInformation(EnterpriseInformation enterpriseInformation);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除企业信息
|
* 批量删除企业信息
|
||||||
|
@ -50,7 +50,7 @@ public interface IEnterpriseInfomationService
|
||||||
* @param ids 需要删除的企业信息主键集合
|
* @param ids 需要删除的企业信息主键集合
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
int deleteEnterpriseInfomationByIds(int[] ids);
|
int deleteEnterpriseInformationByIds(int[] ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除企业信息信息
|
* 删除企业信息信息
|
||||||
|
@ -58,7 +58,7 @@ public interface IEnterpriseInfomationService
|
||||||
* @param id 企业信息主键
|
* @param id 企业信息主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
int deleteEnterpriseInfomationById(int id);
|
int deleteEnterpriseInformationById(int id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 在管企业分类统计
|
* 在管企业分类统计
|
|
@ -5,9 +5,9 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.hbt.safety.supervision.mapper.EnterpriseInfomationMapper;
|
import com.hbt.safety.supervision.mapper.EnterpriseInformationMapper;
|
||||||
import com.hbt.safety.supervision.pojo.EnterpriseInfomation;
|
import com.hbt.safety.supervision.pojo.EnterpriseInformation;
|
||||||
import com.hbt.safety.supervision.service.IEnterpriseInfomationService;
|
import com.hbt.safety.supervision.service.IEnterpriseInformationService;
|
||||||
import com.hbt.safety.supervision.mapper.PersonMapper;
|
import com.hbt.safety.supervision.mapper.PersonMapper;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
@ -19,9 +19,9 @@ import org.springframework.stereotype.Service;
|
||||||
* @date 2023-02-14
|
* @date 2023-02-14
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class EnterpriseInfomationServiceImpl implements IEnterpriseInfomationService {
|
public class EnterpriseInformationServiceImpl implements IEnterpriseInformationService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private EnterpriseInfomationMapper enterpriseInfomationMapper;
|
private EnterpriseInformationMapper enterpriseInformationMapper;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
PersonMapper personMapper;
|
PersonMapper personMapper;
|
||||||
|
@ -33,41 +33,41 @@ public class EnterpriseInfomationServiceImpl implements IEnterpriseInfomationSer
|
||||||
* @return 企业信息
|
* @return 企业信息
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public EnterpriseInfomation selectEnterpriseInfomationById(int id) {
|
public EnterpriseInformation selectEnterpriseInformationById(int id) {
|
||||||
return enterpriseInfomationMapper.selectEnterpriseInfomationById(id);
|
return enterpriseInformationMapper.selectEnterpriseInformationById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询企业信息列表
|
* 查询企业信息列表
|
||||||
*
|
*
|
||||||
* @param enterpriseInfomation 企业信息
|
* @param enterpriseInformation 企业信息
|
||||||
* @return 企业信息
|
* @return 企业信息
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<EnterpriseInfomation> selectEnterpriseInfomationList(EnterpriseInfomation enterpriseInfomation) {
|
public List<EnterpriseInformation> selectEnterpriseInformationList(EnterpriseInformation enterpriseInformation) {
|
||||||
return enterpriseInfomationMapper.selectEnterpriseInfomationList(enterpriseInfomation);
|
return enterpriseInformationMapper.selectEnterpriseInformationList(enterpriseInformation);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增企业信息
|
* 新增企业信息
|
||||||
*
|
*
|
||||||
* @param enterpriseInfomation 企业信息
|
* @param enterpriseInformation 企业信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int insertEnterpriseInfomation(EnterpriseInfomation enterpriseInfomation) {
|
public int insertEnterpriseInformation(EnterpriseInformation enterpriseInformation) {
|
||||||
return enterpriseInfomationMapper.insertEnterpriseInfomation(enterpriseInfomation);
|
return enterpriseInformationMapper.insertEnterpriseInformation(enterpriseInformation);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改企业信息
|
* 修改企业信息
|
||||||
*
|
*
|
||||||
* @param enterpriseInfomation 企业信息
|
* @param enterpriseInformation 企业信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int updateEnterpriseInfomation(EnterpriseInfomation enterpriseInfomation) {
|
public int updateEnterpriseInformation(EnterpriseInformation enterpriseInformation) {
|
||||||
return enterpriseInfomationMapper.updateEnterpriseInfomation(enterpriseInfomation);
|
return enterpriseInformationMapper.updateEnterpriseInformation(enterpriseInformation);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -77,8 +77,8 @@ public class EnterpriseInfomationServiceImpl implements IEnterpriseInfomationSer
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int deleteEnterpriseInfomationByIds(int[] ids) {
|
public int deleteEnterpriseInformationByIds(int[] ids) {
|
||||||
return enterpriseInfomationMapper.deleteEnterpriseInfomationByIds(ids);
|
return enterpriseInformationMapper.deleteEnterpriseInformationByIds(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -88,8 +88,8 @@ public class EnterpriseInfomationServiceImpl implements IEnterpriseInfomationSer
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int deleteEnterpriseInfomationById(int id) {
|
public int deleteEnterpriseInformationById(int id) {
|
||||||
return enterpriseInfomationMapper.deleteEnterpriseInfomationById(id);
|
return enterpriseInformationMapper.deleteEnterpriseInformationById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -101,14 +101,14 @@ public class EnterpriseInfomationServiceImpl implements IEnterpriseInfomationSer
|
||||||
public String enterpriseStatistics() {
|
public String enterpriseStatistics() {
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
// 企业分类及数量
|
// 企业分类及数量
|
||||||
List<Map<Object, Object>> list = enterpriseInfomationMapper.enterpriseStatistics();
|
List<Map<Object, Object>> list = enterpriseInformationMapper.enterpriseStatistics();
|
||||||
// 在管企业数量
|
// 在管企业数量
|
||||||
int enterpriseCount = enterpriseInfomationMapper.getEnterpriseCount();
|
int enterpriseCount = enterpriseInformationMapper.getEnterpriseCount();
|
||||||
// 企业员工数
|
// 企业员工数
|
||||||
int personCount = personMapper.getPersonCount();
|
int personCount = personMapper.getPersonCount();
|
||||||
|
|
||||||
// 等级车辆数
|
// 等级车辆数
|
||||||
int carCount = enterpriseInfomationMapper.getCarCount();
|
int carCount = enterpriseInformationMapper.getCarCount();
|
||||||
map.put("enterpriseClassification", list);
|
map.put("enterpriseClassification", list);
|
||||||
map.put("enterpriseCount", enterpriseCount);
|
map.put("enterpriseCount", enterpriseCount);
|
||||||
map.put("personCount", personCount);
|
map.put("personCount", personCount);
|
|
@ -2,9 +2,9 @@
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.hbt.safety.supervision.mapper.EnterpriseInfomationMapper">
|
<mapper namespace="com.hbt.safety.supervision.mapper.EnterpriseInformationMapper">
|
||||||
|
|
||||||
<resultMap type="com.hbt.safety.supervision.pojo.EnterpriseInfomation" id="EnterpriseInfomationResult">
|
<resultMap type="com.hbt.safety.supervision.pojo.EnterpriseInformation" id="EnterpriseInformationResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
<result property="unifySocialCreditCode" column="unify_social_credit_code" />
|
<result property="unifySocialCreditCode" column="unify_social_credit_code" />
|
||||||
<result property="name" column="name" />
|
<result property="name" column="name" />
|
||||||
|
@ -20,24 +20,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="businessScope" column="business_scope" />
|
<result property="businessScope" column="business_scope" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectEnterpriseInfomationVo">
|
<sql id="selectEnterpriseInformationVo">
|
||||||
select id, unify_social_credit_code, name, registration_number, legal_representative, type, establishment_date, fund_amount, approval_date, registration_authority, registration_status, dwelling_place, business_scope from enterprise_infomation
|
select id, unify_social_credit_code, name, registration_number, legal_representative, type, establishment_date, fund_amount, approval_date, registration_authority, registration_status, dwelling_place, business_scope from enterprise_information
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectEnterpriseInfomationList" parameterType="com.hbt.safety.supervision.pojo.EnterpriseInfomation" resultMap="EnterpriseInfomationResult">
|
<select id="selectEnterpriseInformationList" parameterType="com.hbt.safety.supervision.pojo.EnterpriseInformation" resultMap="EnterpriseInformationResult">
|
||||||
<include refid="selectEnterpriseInfomationVo"/>
|
<include refid="selectEnterpriseInformationVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="id != null "> and id = #{id}</if>
|
<if test="id != null "> and id = #{id}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectEnterpriseInfomationById" parameterType="Integer" resultMap="EnterpriseInfomationResult">
|
<select id="selectEnterpriseInformationById" parameterType="Integer" resultMap="EnterpriseInformationResult">
|
||||||
<include refid="selectEnterpriseInfomationVo"/>
|
<include refid="selectEnterpriseInformationVo"/>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertEnterpriseInfomation" parameterType="com.hbt.safety.supervision.pojo.EnterpriseInfomation">
|
<insert id="insertEnterpriseInformation" parameterType="com.hbt.safety.supervision.pojo.EnterpriseInformation">
|
||||||
insert into enterprise_infomation
|
insert into enterprise_information
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="id != null">id,</if>
|
<if test="id != null">id,</if>
|
||||||
<if test="unifySocialCreditCode != null">unify_social_credit_code,</if>
|
<if test="unifySocialCreditCode != null">unify_social_credit_code,</if>
|
||||||
|
@ -70,8 +70,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateEnterpriseInfomation" parameterType="com.hbt.safety.supervision.pojo.EnterpriseInfomation">
|
<update id="updateEnterpriseInformation" parameterType="com.hbt.safety.supervision.pojo.EnterpriseInformation">
|
||||||
update enterprise_infomation
|
update enterprise_information
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<if test="unifySocialCreditCode != null">unify_social_credit_code = #{unifySocialCreditCode},</if>
|
<if test="unifySocialCreditCode != null">unify_social_credit_code = #{unifySocialCreditCode},</if>
|
||||||
<if test="name != null">name = #{name},</if>
|
<if test="name != null">name = #{name},</if>
|
||||||
|
@ -89,27 +89,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<delete id="deleteEnterpriseInfomationById" parameterType="Integer">
|
<delete id="deleteEnterpriseInformationById" parameterType="Integer">
|
||||||
delete from enterprise_infomation where id = #{id}
|
delete from enterprise_information where id = #{id}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteEnterpriseInfomationByIds" parameterType="String">
|
<delete id="deleteEnterpriseInformationByIds" parameterType="String">
|
||||||
delete from enterprise_infomation where id in
|
delete from enterprise_information where id in
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<select id="selectEnterpriseInfomations" resultType="com.hbt.safety.supervision.pojo.EnterpriseInfomation">
|
<select id="selectEnterpriseInformations" resultType="com.hbt.safety.supervision.pojo.EnterpriseInformation">
|
||||||
select from enterprise_infomation
|
select from enterprise_information
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="enterpriseStatistics" resultType="java.util.Map">
|
<select id="enterpriseStatistics" resultType="java.util.Map">
|
||||||
select type as type, count(id) as num from enterprise_infomation group by type
|
select type as type, count(id) as num from enterprise_information group by type
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getEnterpriseCount" resultType="Integer">
|
<select id="getEnterpriseCount" resultType="Integer">
|
||||||
select count(*) from enterprise_infomation
|
select count(*) from enterprise_information
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getCarCount" resultType="Integer">
|
<select id="getCarCount" resultType="Integer">
|
|
@ -24,7 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
select distinct(h.id) id, h.name name, e.name enterprise
|
select distinct(h.id) id, h.name name, e.name enterprise
|
||||||
from escalate_hidden_danger as a
|
from escalate_hidden_danger as a
|
||||||
left join hidden_danger as h on a.hidden_danger_id = h.id
|
left join hidden_danger as h on a.hidden_danger_id = h.id
|
||||||
left join enterprise_infomation as e on h.enterprise_id = e.id
|
left join enterprise_information as e on h.enterprise_id = e.id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectEscalateHiddenDangerById" parameterType="Integer" resultType="HiddenDanger">
|
<select id="selectEscalateHiddenDangerById" parameterType="Integer" resultType="HiddenDanger">
|
||||||
|
|
|
@ -24,7 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
select distinct(h.id) id, h.name name, e.name enterprise
|
select distinct(h.id) id, h.name name, e.name enterprise
|
||||||
from escalate_risk as a
|
from escalate_risk as a
|
||||||
left join risk as h on a.risk_id = h.id
|
left join risk as h on a.risk_id = h.id
|
||||||
left join enterprise_infomation as e on h.enterprise_id = e.id
|
left join enterprise_information as e on h.enterprise_id = e.id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectEscalateRiskById" parameterType="Integer" resultMap="EscalateRiskResult">
|
<select id="selectEscalateRiskById" parameterType="Integer" resultMap="EscalateRiskResult">
|
||||||
|
|
|
@ -30,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
select distinct(a.id) id, a.name name, a.operation_level operationLevel, a.enterprise_id enterpriseId, a.operation_content operationContent, a.operation_type operationType, a.operation_start operationStart, a.operation_end operationEnd,a.operation_site operationSite,
|
select distinct(a.id) id, a.name name, a.operation_level operationLevel, a.enterprise_id enterpriseId, a.operation_content operationContent, a.operation_type operationType, a.operation_start operationStart, a.operation_end operationEnd,a.operation_site operationSite,
|
||||||
e.name
|
e.name
|
||||||
from hazardous_operation as a
|
from hazardous_operation as a
|
||||||
left join enterprise_infomation as e on a.enterprise_id = e.id
|
left join enterprise_information as e on a.enterprise_id = e.id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectHazardousOperationById" parameterType="Integer" resultMap="HazardousOperationResult">
|
<select id="selectHazardousOperationById" parameterType="Integer" resultMap="HazardousOperationResult">
|
||||||
|
|
|
@ -37,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
p.name as person,
|
p.name as person,
|
||||||
r.name as riskName
|
r.name as riskName
|
||||||
from hidden_danger as a
|
from hidden_danger as a
|
||||||
left join enterprise_infomation as b on a.enterprise_id = b.id
|
left join enterprise_information as b on a.enterprise_id = b.id
|
||||||
left join person as p on a.person_id = p.id
|
left join person as p on a.person_id = p.id
|
||||||
left join risk as r on a.risk_id = r.id
|
left join risk as r on a.risk_id = r.id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
|
@ -34,7 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
b.name as enterprise,
|
b.name as enterprise,
|
||||||
p.name as responsiblePerson
|
p.name as responsiblePerson
|
||||||
from risk as a
|
from risk as a
|
||||||
left join enterprise_infomation as b on a.enterprise_id = b.id
|
left join enterprise_information as b on a.enterprise_id = b.id
|
||||||
left join person as p on a.responsible_person_id = p.id
|
left join person as p on a.responsible_person_id = p.id
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectRiskById" parameterType="Integer" resultType="Risk">
|
<select id="selectRiskById" parameterType="Integer" resultType="Risk">
|
||||||
|
|
Loading…
Reference in New Issue