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 com.alibaba.fastjson.JSONObject;
|
||||
import com.hbt.safety.supervision.pojo.EnterpriseInfomation;
|
||||
import com.hbt.safety.supervision.service.IEnterpriseInfomationService;
|
||||
import com.hbt.safety.supervision.pojo.EnterpriseInformation;
|
||||
import com.hbt.safety.supervision.service.IEnterpriseInformationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
@ -20,20 +20,20 @@ import com.hbt.common.core.web.page.TableDataInfo;
|
|||
* @author zhangyu
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/infomation")
|
||||
public class EnterpriseInfomationController extends BaseController
|
||||
@RequestMapping("/information")
|
||||
public class EnterpriseInformationController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IEnterpriseInfomationService enterpriseInfomationService;
|
||||
private IEnterpriseInformationService enterpriseInformationService;
|
||||
|
||||
/**
|
||||
* 查询企业信息列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public String list(EnterpriseInfomation enterpriseInfomation)
|
||||
public String list(EnterpriseInformation enterpriseInformation)
|
||||
{
|
||||
startPage();
|
||||
List<EnterpriseInfomation> list = enterpriseInfomationService.selectEnterpriseInfomationList(enterpriseInfomation);
|
||||
List<EnterpriseInformation> list = enterpriseInformationService.selectEnterpriseInformationList(enterpriseInformation);
|
||||
TableDataInfo tableDataInfo = getDataTable(list);
|
||||
return JSONObject.toJSONString(tableDataInfo);
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ public class EnterpriseInfomationController extends BaseController
|
|||
@GetMapping(value = "/getInfo")
|
||||
public String getInfo(int id)
|
||||
{
|
||||
AjaxResult ajaxResult = success(enterpriseInfomationService.selectEnterpriseInfomationById(id));
|
||||
AjaxResult ajaxResult = success(enterpriseInformationService.selectEnterpriseInformationById(id));
|
||||
return JSONObject.toJSONString(ajaxResult);
|
||||
}
|
||||
|
||||
|
@ -52,9 +52,9 @@ public class EnterpriseInfomationController extends BaseController
|
|||
* 新增企业信息
|
||||
*/
|
||||
@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);
|
||||
}
|
||||
|
||||
|
@ -62,9 +62,9 @@ public class EnterpriseInfomationController extends BaseController
|
|||
* 修改企业信息
|
||||
*/
|
||||
@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);
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@ public class EnterpriseInfomationController extends BaseController
|
|||
@GetMapping("/remove")
|
||||
public String remove(int[] ids)
|
||||
{
|
||||
AjaxResult ajaxResult = toAjax(enterpriseInfomationService.deleteEnterpriseInfomationByIds(ids));
|
||||
AjaxResult ajaxResult = toAjax(enterpriseInformationService.deleteEnterpriseInformationByIds(ids));
|
||||
return JSONObject.toJSONString(ajaxResult);
|
||||
}
|
||||
|
||||
|
@ -84,6 +84,6 @@ public class EnterpriseInfomationController extends BaseController
|
|||
@GetMapping("/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.Map;
|
||||
|
||||
import com.hbt.safety.supervision.pojo.EnterpriseInfomation;
|
||||
import com.hbt.safety.supervision.pojo.EnterpriseInformation;
|
||||
|
||||
/**
|
||||
* 企业信息Mapper接口
|
||||
*
|
||||
* @author zhangyu
|
||||
*/
|
||||
public interface EnterpriseInfomationMapper
|
||||
public interface EnterpriseInformationMapper
|
||||
{
|
||||
/**
|
||||
* 查询企业信息
|
||||
|
@ -18,31 +18,31 @@ public interface EnterpriseInfomationMapper
|
|||
* @param id 企业信息主键
|
||||
* @return 企业信息
|
||||
*/
|
||||
EnterpriseInfomation selectEnterpriseInfomationById(int id);
|
||||
EnterpriseInformation selectEnterpriseInformationById(int id);
|
||||
|
||||
/**
|
||||
* 查询企业信息列表
|
||||
*
|
||||
* @param enterpriseInfomation 企业信息
|
||||
* @param enterpriseInformation 企业信息
|
||||
* @return 企业信息集合
|
||||
*/
|
||||
List<EnterpriseInfomation> selectEnterpriseInfomationList(EnterpriseInfomation enterpriseInfomation);
|
||||
List<EnterpriseInformation> selectEnterpriseInformationList(EnterpriseInformation enterpriseInformation);
|
||||
|
||||
/**
|
||||
* 新增企业信息
|
||||
*
|
||||
* @param enterpriseInfomation 企业信息
|
||||
* @param enterpriseInformation 企业信息
|
||||
* @return 结果
|
||||
*/
|
||||
int insertEnterpriseInfomation(EnterpriseInfomation enterpriseInfomation);
|
||||
int insertEnterpriseInformation(EnterpriseInformation enterpriseInformation);
|
||||
|
||||
/**
|
||||
* 修改企业信息
|
||||
*
|
||||
* @param enterpriseInfomation 企业信息
|
||||
* @param enterpriseInformation 企业信息
|
||||
* @return 结果
|
||||
*/
|
||||
int updateEnterpriseInfomation(EnterpriseInfomation enterpriseInfomation);
|
||||
int updateEnterpriseInformation(EnterpriseInformation enterpriseInformation);
|
||||
|
||||
/**
|
||||
* 删除企业信息
|
||||
|
@ -50,7 +50,7 @@ public interface EnterpriseInfomationMapper
|
|||
* @param id 企业信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteEnterpriseInfomationById(int id);
|
||||
int deleteEnterpriseInformationById(int id);
|
||||
|
||||
/**
|
||||
* 批量删除企业信息
|
||||
|
@ -58,14 +58,14 @@ public interface EnterpriseInfomationMapper
|
|||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteEnterpriseInfomationByIds(int[] ids);
|
||||
int deleteEnterpriseInformationByIds(int[] ids);
|
||||
|
||||
/**
|
||||
* 查询企业信息列表
|
||||
*
|
||||
* @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;
|
||||
|
||||
/**
|
||||
* 企业信息对象 enterprise_infomation
|
||||
* 企业信息对象 enterprise_information
|
||||
*
|
||||
* @author zhangyu
|
||||
* @date 2023-02-14
|
||||
*/
|
||||
public class EnterpriseInfomation extends BaseEntity
|
||||
public class EnterpriseInformation extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
@ -2,7 +2,7 @@ package com.hbt.safety.supervision.service;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbt.safety.supervision.pojo.EnterpriseInfomation;
|
||||
import com.hbt.safety.supervision.pojo.EnterpriseInformation;
|
||||
|
||||
/**
|
||||
* 企业信息Service接口
|
||||
|
@ -10,7 +10,7 @@ import com.hbt.safety.supervision.pojo.EnterpriseInfomation;
|
|||
* @author zhangyu
|
||||
* @date 2023-02-14
|
||||
*/
|
||||
public interface IEnterpriseInfomationService
|
||||
public interface IEnterpriseInformationService
|
||||
{
|
||||
/**
|
||||
* 查询企业信息
|
||||
|
@ -18,31 +18,31 @@ public interface IEnterpriseInfomationService
|
|||
* @param id 企业信息主键
|
||||
* @return 企业信息
|
||||
*/
|
||||
EnterpriseInfomation selectEnterpriseInfomationById(int id);
|
||||
EnterpriseInformation selectEnterpriseInformationById(int id);
|
||||
|
||||
/**
|
||||
* 查询企业信息列表
|
||||
*
|
||||
* @param enterpriseInfomation 企业信息
|
||||
* @param enterpriseInformation 企业信息
|
||||
* @return 企业信息集合
|
||||
*/
|
||||
List<EnterpriseInfomation> selectEnterpriseInfomationList(EnterpriseInfomation enterpriseInfomation);
|
||||
List<EnterpriseInformation> selectEnterpriseInformationList(EnterpriseInformation enterpriseInformation);
|
||||
|
||||
/**
|
||||
* 新增企业信息
|
||||
*
|
||||
* @param enterpriseInfomation 企业信息
|
||||
* @param enterpriseInformation 企业信息
|
||||
* @return 结果
|
||||
*/
|
||||
int insertEnterpriseInfomation(EnterpriseInfomation enterpriseInfomation);
|
||||
int insertEnterpriseInformation(EnterpriseInformation enterpriseInformation);
|
||||
|
||||
/**
|
||||
* 修改企业信息
|
||||
*
|
||||
* @param enterpriseInfomation 企业信息
|
||||
* @param enterpriseInformation 企业信息
|
||||
* @return 结果
|
||||
*/
|
||||
int updateEnterpriseInfomation(EnterpriseInfomation enterpriseInfomation);
|
||||
int updateEnterpriseInformation(EnterpriseInformation enterpriseInformation);
|
||||
|
||||
/**
|
||||
* 批量删除企业信息
|
||||
|
@ -50,7 +50,7 @@ public interface IEnterpriseInfomationService
|
|||
* @param ids 需要删除的企业信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteEnterpriseInfomationByIds(int[] ids);
|
||||
int deleteEnterpriseInformationByIds(int[] ids);
|
||||
|
||||
/**
|
||||
* 删除企业信息信息
|
||||
|
@ -58,7 +58,7 @@ public interface IEnterpriseInfomationService
|
|||
* @param id 企业信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteEnterpriseInfomationById(int id);
|
||||
int deleteEnterpriseInformationById(int id);
|
||||
|
||||
/**
|
||||
* 在管企业分类统计
|
|
@ -5,9 +5,9 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hbt.safety.supervision.mapper.EnterpriseInfomationMapper;
|
||||
import com.hbt.safety.supervision.pojo.EnterpriseInfomation;
|
||||
import com.hbt.safety.supervision.service.IEnterpriseInfomationService;
|
||||
import com.hbt.safety.supervision.mapper.EnterpriseInformationMapper;
|
||||
import com.hbt.safety.supervision.pojo.EnterpriseInformation;
|
||||
import com.hbt.safety.supervision.service.IEnterpriseInformationService;
|
||||
import com.hbt.safety.supervision.mapper.PersonMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -19,9 +19,9 @@ import org.springframework.stereotype.Service;
|
|||
* @date 2023-02-14
|
||||
*/
|
||||
@Service
|
||||
public class EnterpriseInfomationServiceImpl implements IEnterpriseInfomationService {
|
||||
public class EnterpriseInformationServiceImpl implements IEnterpriseInformationService {
|
||||
@Autowired
|
||||
private EnterpriseInfomationMapper enterpriseInfomationMapper;
|
||||
private EnterpriseInformationMapper enterpriseInformationMapper;
|
||||
|
||||
@Autowired
|
||||
PersonMapper personMapper;
|
||||
|
@ -33,41 +33,41 @@ public class EnterpriseInfomationServiceImpl implements IEnterpriseInfomationSer
|
|||
* @return 企业信息
|
||||
*/
|
||||
@Override
|
||||
public EnterpriseInfomation selectEnterpriseInfomationById(int id) {
|
||||
return enterpriseInfomationMapper.selectEnterpriseInfomationById(id);
|
||||
public EnterpriseInformation selectEnterpriseInformationById(int id) {
|
||||
return enterpriseInformationMapper.selectEnterpriseInformationById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询企业信息列表
|
||||
*
|
||||
* @param enterpriseInfomation 企业信息
|
||||
* @param enterpriseInformation 企业信息
|
||||
* @return 企业信息
|
||||
*/
|
||||
@Override
|
||||
public List<EnterpriseInfomation> selectEnterpriseInfomationList(EnterpriseInfomation enterpriseInfomation) {
|
||||
return enterpriseInfomationMapper.selectEnterpriseInfomationList(enterpriseInfomation);
|
||||
public List<EnterpriseInformation> selectEnterpriseInformationList(EnterpriseInformation enterpriseInformation) {
|
||||
return enterpriseInformationMapper.selectEnterpriseInformationList(enterpriseInformation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增企业信息
|
||||
*
|
||||
* @param enterpriseInfomation 企业信息
|
||||
* @param enterpriseInformation 企业信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertEnterpriseInfomation(EnterpriseInfomation enterpriseInfomation) {
|
||||
return enterpriseInfomationMapper.insertEnterpriseInfomation(enterpriseInfomation);
|
||||
public int insertEnterpriseInformation(EnterpriseInformation enterpriseInformation) {
|
||||
return enterpriseInformationMapper.insertEnterpriseInformation(enterpriseInformation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改企业信息
|
||||
*
|
||||
* @param enterpriseInfomation 企业信息
|
||||
* @param enterpriseInformation 企业信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateEnterpriseInfomation(EnterpriseInfomation enterpriseInfomation) {
|
||||
return enterpriseInfomationMapper.updateEnterpriseInfomation(enterpriseInfomation);
|
||||
public int updateEnterpriseInformation(EnterpriseInformation enterpriseInformation) {
|
||||
return enterpriseInformationMapper.updateEnterpriseInformation(enterpriseInformation);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -77,8 +77,8 @@ public class EnterpriseInfomationServiceImpl implements IEnterpriseInfomationSer
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEnterpriseInfomationByIds(int[] ids) {
|
||||
return enterpriseInfomationMapper.deleteEnterpriseInfomationByIds(ids);
|
||||
public int deleteEnterpriseInformationByIds(int[] ids) {
|
||||
return enterpriseInformationMapper.deleteEnterpriseInformationByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -88,8 +88,8 @@ public class EnterpriseInfomationServiceImpl implements IEnterpriseInfomationSer
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEnterpriseInfomationById(int id) {
|
||||
return enterpriseInfomationMapper.deleteEnterpriseInfomationById(id);
|
||||
public int deleteEnterpriseInformationById(int id) {
|
||||
return enterpriseInformationMapper.deleteEnterpriseInformationById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -101,14 +101,14 @@ public class EnterpriseInfomationServiceImpl implements IEnterpriseInfomationSer
|
|||
public String enterpriseStatistics() {
|
||||
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 carCount = enterpriseInfomationMapper.getCarCount();
|
||||
int carCount = enterpriseInformationMapper.getCarCount();
|
||||
map.put("enterpriseClassification", list);
|
||||
map.put("enterpriseCount", enterpriseCount);
|
||||
map.put("personCount", personCount);
|
|
@ -2,9 +2,9 @@
|
|||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"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="unifySocialCreditCode" column="unify_social_credit_code" />
|
||||
<result property="name" column="name" />
|
||||
|
@ -20,24 +20,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="businessScope" column="business_scope" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEnterpriseInfomationVo">
|
||||
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
|
||||
<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_information
|
||||
</sql>
|
||||
|
||||
<select id="selectEnterpriseInfomationList" parameterType="com.hbt.safety.supervision.pojo.EnterpriseInfomation" resultMap="EnterpriseInfomationResult">
|
||||
<include refid="selectEnterpriseInfomationVo"/>
|
||||
<select id="selectEnterpriseInformationList" parameterType="com.hbt.safety.supervision.pojo.EnterpriseInformation" resultMap="EnterpriseInformationResult">
|
||||
<include refid="selectEnterpriseInformationVo"/>
|
||||
<where>
|
||||
<if test="id != null "> and id = #{id}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectEnterpriseInfomationById" parameterType="Integer" resultMap="EnterpriseInfomationResult">
|
||||
<include refid="selectEnterpriseInfomationVo"/>
|
||||
<select id="selectEnterpriseInformationById" parameterType="Integer" resultMap="EnterpriseInformationResult">
|
||||
<include refid="selectEnterpriseInformationVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertEnterpriseInfomation" parameterType="com.hbt.safety.supervision.pojo.EnterpriseInfomation">
|
||||
insert into enterprise_infomation
|
||||
<insert id="insertEnterpriseInformation" parameterType="com.hbt.safety.supervision.pojo.EnterpriseInformation">
|
||||
insert into enterprise_information
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="unifySocialCreditCode != null">unify_social_credit_code,</if>
|
||||
|
@ -70,8 +70,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEnterpriseInfomation" parameterType="com.hbt.safety.supervision.pojo.EnterpriseInfomation">
|
||||
update enterprise_infomation
|
||||
<update id="updateEnterpriseInformation" parameterType="com.hbt.safety.supervision.pojo.EnterpriseInformation">
|
||||
update enterprise_information
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="unifySocialCreditCode != null">unify_social_credit_code = #{unifySocialCreditCode},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
|
@ -89,27 +89,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEnterpriseInfomationById" parameterType="Integer">
|
||||
delete from enterprise_infomation where id = #{id}
|
||||
<delete id="deleteEnterpriseInformationById" parameterType="Integer">
|
||||
delete from enterprise_information where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEnterpriseInfomationByIds" parameterType="String">
|
||||
delete from enterprise_infomation where id in
|
||||
<delete id="deleteEnterpriseInformationByIds" parameterType="String">
|
||||
delete from enterprise_information where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectEnterpriseInfomations" resultType="com.hbt.safety.supervision.pojo.EnterpriseInfomation">
|
||||
select from enterprise_infomation
|
||||
<select id="selectEnterpriseInformations" resultType="com.hbt.safety.supervision.pojo.EnterpriseInformation">
|
||||
select from enterprise_information
|
||||
</select>
|
||||
|
||||
<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 id="getEnterpriseCount" resultType="Integer">
|
||||
select count(*) from enterprise_infomation
|
||||
select count(*) from enterprise_information
|
||||
</select>
|
||||
|
||||
<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
|
||||
from escalate_hidden_danger as a
|
||||
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>
|
||||
|
||||
<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
|
||||
from escalate_risk as a
|
||||
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>
|
||||
|
||||
<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,
|
||||
e.name
|
||||
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>
|
||||
|
||||
<select id="selectHazardousOperationById" parameterType="Integer" resultMap="HazardousOperationResult">
|
||||
|
|
|
@ -37,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
p.name as person,
|
||||
r.name as riskName
|
||||
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 risk as r on a.risk_id = r.id
|
||||
</sql>
|
||||
|
|
|
@ -34,7 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
b.name as enterprise,
|
||||
p.name as responsiblePerson
|
||||
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
|
||||
</sql>
|
||||
<select id="selectRiskById" parameterType="Integer" resultType="Risk">
|
||||
|
|
Loading…
Reference in New Issue