动火气体检测分析的创建

pull/4/head
chenxinying 2024-01-18 16:43:05 +08:00
parent fb0f7cf1fe
commit 2f1ef51627
5 changed files with 351 additions and 4 deletions

View File

@ -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);
}

View File

@ -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;
}

View File

@ -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);
}
}

View File

@ -48,7 +48,8 @@
f.MONITOR_DEPARTMENT_ID, f.MONITOR_DEPARTMENT_ID,
f.MONITOR_USER_ID, f.MONITOR_USER_ID,
f.ACCEPT_DEPARTMENT_ID, f.ACCEPT_DEPARTMENT_ID,
f.ACCEPT_USER_ID f.ACCEPT_USER_ID,
f.ANALYZE_TIME
</sql> </sql>
<!-- 字段用于新增 --> <!-- 字段用于新增 -->
@ -93,7 +94,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,
ANALYZE_TIME
</sql> </sql>
<!-- 字段值 --> <!-- 字段值 -->
@ -138,7 +140,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},
#{ANALYZE_TIME}
</sql> </sql>
<!-- 获取编码 --> <!-- 获取编码 -->
@ -212,7 +215,8 @@
MONITOR_DEPARTMENT_ID = #{MONITOR_DEPARTMENT_ID}, MONITOR_DEPARTMENT_ID = #{MONITOR_DEPARTMENT_ID},
MONITOR_USER_ID = #{MONITOR_USER_ID}, MONITOR_USER_ID = #{MONITOR_USER_ID},
ACCEPT_DEPARTMENT_ID = #{ACCEPT_DEPARTMENT_ID}, ACCEPT_DEPARTMENT_ID = #{ACCEPT_DEPARTMENT_ID},
ACCEPT_USER_ID = #{ACCEPT_USER_ID} ACCEPT_USER_ID = #{ACCEPT_USER_ID},
ANALYZE_TIME=#{ANALYZE_TIME}
where where
HIGHWORK_ID = #{HIGHWORK_ID} HIGHWORK_ID = #{HIGHWORK_ID}
</update> </update>

View File

@ -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-->
<!-- (-->
<!-- &lt;!&ndash; 根据需求自己加检索条件-->
<!-- 字段1 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')-->
<!-- or-->
<!-- 字段2 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')-->
<!-- &ndash;&gt;-->
<!-- )-->
</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>