forked from integrated_whb/integrated_whb
动火气体检测分析的创建
parent
fb0f7cf1fe
commit
2f1ef51627
|
@ -0,0 +1,59 @@
|
|||
package com.zcloud.mapper.datasource.eightwork;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:动火气体检测
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-09-18
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface HotworkGasMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
package com.zcloud.service.eightwork;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:动火气体检测
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-09-18
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface HotworkGasService {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
package com.zcloud.service.eightwork.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.eightwork.HotworkGasMapper;
|
||||
import com.zcloud.service.eightwork.HotworkGasService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:动火气体检测
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-09-18
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class HotworkGasServiceImpl implements HotworkGasService {
|
||||
|
||||
@Autowired
|
||||
private HotworkGasMapper hotworkgasMapper;
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception{
|
||||
hotworkgasMapper.save(pd);
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception{
|
||||
hotworkgasMapper.delete(pd);
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception{
|
||||
hotworkgasMapper.edit(pd);
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception{
|
||||
return hotworkgasMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
return hotworkgasMapper.listAll(pd);
|
||||
}
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception{
|
||||
return hotworkgasMapper.findById(pd);
|
||||
}
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
|
||||
hotworkgasMapper.deleteAll(ArrayDATA_IDS);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -48,7 +48,8 @@
|
|||
f.MONITOR_DEPARTMENT_ID,
|
||||
f.MONITOR_USER_ID,
|
||||
f.ACCEPT_DEPARTMENT_ID,
|
||||
f.ACCEPT_USER_ID
|
||||
f.ACCEPT_USER_ID,
|
||||
f.ANALYZE_TIME
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
|
@ -93,7 +94,8 @@
|
|||
MONITOR_DEPARTMENT_ID,
|
||||
MONITOR_USER_ID,
|
||||
ACCEPT_DEPARTMENT_ID,
|
||||
ACCEPT_USER_ID
|
||||
ACCEPT_USER_ID,
|
||||
ANALYZE_TIME
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
|
@ -138,7 +140,8 @@
|
|||
#{MONITOR_DEPARTMENT_ID},
|
||||
#{MONITOR_USER_ID},
|
||||
#{ACCEPT_DEPARTMENT_ID},
|
||||
#{ACCEPT_USER_ID}
|
||||
#{ACCEPT_USER_ID},
|
||||
#{ANALYZE_TIME}
|
||||
</sql>
|
||||
|
||||
<!-- 获取编码 -->
|
||||
|
@ -212,7 +215,8 @@
|
|||
MONITOR_DEPARTMENT_ID = #{MONITOR_DEPARTMENT_ID},
|
||||
MONITOR_USER_ID = #{MONITOR_USER_ID},
|
||||
ACCEPT_DEPARTMENT_ID = #{ACCEPT_DEPARTMENT_ID},
|
||||
ACCEPT_USER_ID = #{ACCEPT_USER_ID}
|
||||
ACCEPT_USER_ID = #{ACCEPT_USER_ID},
|
||||
ANALYZE_TIME=#{ANALYZE_TIME}
|
||||
where
|
||||
HIGHWORK_ID = #{HIGHWORK_ID}
|
||||
</update>
|
|
@ -0,0 +1,142 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.datasource.eightwork.HotworkGasMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
BUS_HOTWORKGAS
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.HOTWORK_ID,
|
||||
f.ANALYZE_TIME,
|
||||
f.ANALYZE_PLACE,
|
||||
f.ANALYZE_RESULT,
|
||||
f.ANALYZE_USER,
|
||||
f.ISDELETE,
|
||||
f.HOTWORKGAS_ID,
|
||||
f.ANALYZE_PATH
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
HOTWORK_ID,
|
||||
ANALYZE_TIME,
|
||||
ANALYZE_PLACE,
|
||||
ANALYZE_RESULT,
|
||||
ANALYZE_USER,
|
||||
ISDELETE,
|
||||
HOTWORKGAS_ID,
|
||||
ANALYZE_PATH
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{HOTWORK_ID},
|
||||
#{ANALYZE_TIME},
|
||||
#{ANALYZE_PLACE},
|
||||
#{ANALYZE_RESULT},
|
||||
#{ANALYZE_USER},
|
||||
#{ISDELETE},
|
||||
#{HOTWORKGAS_ID},
|
||||
#{ANALYZE_PATH}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
HOTWORKGAS_ID = #{HOTWORKGAS_ID}
|
||||
</delete>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
HOTWORK_ID = #{HOTWORK_ID},
|
||||
ANALYZE_TIME = #{ANALYZE_TIME},
|
||||
ANALYZE_PLACE = #{ANALYZE_PLACE},
|
||||
ANALYZE_RESULT = #{ANALYZE_RESULT},
|
||||
ANALYZE_USER = #{ANALYZE_USER},
|
||||
ISDELETE = #{ISDELETE},
|
||||
HOTWORKGAS_ID = HOTWORKGAS_ID,
|
||||
ANALYZE_PATH = #{ANALYZE_PATH}
|
||||
where
|
||||
HOTWORKGAS_ID = #{HOTWORKGAS_ID}
|
||||
</update>
|
||||
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.HOTWORK_ID = #{HOTWORK_ID}
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
<!-- and-->
|
||||
<!-- (-->
|
||||
<!-- <!– 根据需求自己加检索条件-->
|
||||
<!-- 字段1 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')-->
|
||||
<!-- or-->
|
||||
<!-- 字段2 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')-->
|
||||
<!-- –>-->
|
||||
<!-- )-->
|
||||
</if>
|
||||
ORDER BY f.ANALYZE_TIME desc
|
||||
</select>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0' and f.HOTWORK_ID = #{HOTWORK_ID}
|
||||
ORDER BY f.ANALYZE_TIME desc
|
||||
</select>
|
||||
|
||||
<!-- 批量删除 -->
|
||||
<delete id="deleteAll" parameterType="String">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
HOTWORKGAS_ID in
|
||||
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue