Commit 79ccf1d3 by 焦荣

修改厂商附件和设备详情界面

parent 0faeeaed
<?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.founder.cjqx.dao.SysClientCsfjMapper">
<resultMap id="BaseResultMap" type="com.founder.model.amsis.SysClientCsfj">
<id column="ID" jdbcType="VARCHAR" property="id" />
<id column="CSID" jdbcType="VARCHAR" property="csid" />
<id column="DZWJMC" jdbcType="VARCHAR" property="dzwjmc" />
<id column="DZWJBT" jdbcType="VARCHAR" property="dzwjbt" />
<id column="DZWJGS" jdbcType="VARCHAR" property="dzwjgs" />
<id column="DZWJNR" jdbcType="BLOB" property="dzwjnr" />
<id column="DZWJDX" jdbcType="VARCHAR" property="dzwjdx" />
<id column="DZWJWZ" jdbcType="VARCHAR" property="dzwjwz" />
<id column="JLSJ" jdbcType="DATE" property="jlsj" />
<id column="LRDW" jdbcType="VARCHAR" property="lrdw" />
<id column="LRR" jdbcType="VARCHAR" property="lrr" />
</resultMap>
<sql id="Base_Column_List" >
ID,CSID,DZWJMC,DZWJBT,DZWJGS,DZWJNR,DZWJDX,DZWJWZ,JLSJ,SCBZ,LRDW,LRR,LRSJ,GXSJ
</sql>
<sql id="queryWhere" >
<where>
<if test="id!=null and id !=''">AND id = #{id}</if>
<if test="csid!=null and csid !=''">AND csid = #{csid}</if>
AND SCBZ='0'
</where>
</sql>
<!-- 通过条件分页查询,返回数据集 -->
<select id="selectPageList" parameterType="com.founder.model.amsis.SysClientCsfj" resultMap="BaseResultMap">
SELECT * FROM
(
SELECT A.*, ROWNUM RN
FROM (SELECT * FROM Sys_Client_Csfj
<include refid="queryWhere"/>) A
WHERE ROWNUM <![CDATA[ <= ]]> ${end}
)
WHERE RN <![CDATA[ >= ]]> ${begin}
</select>
<!-- 通过条件分页查询,返回数据集 -->
<select id="selectClientCsfj" parameterType="com.founder.model.amsis.SysClientCsfj" resultMap="BaseResultMap">
SELECT * FROM
(
SELECT A.*, ROWNUM RN
FROM (SELECT * FROM Sys_Client_Csfj
<include refid="queryWhere"/>) A
WHERE ROWNUM <![CDATA[ <= ]]> 1000
)
WHERE RN <![CDATA[ >= ]]> 0
</select>
<!-- 通过条件分页查询,返回总记录数 -->
<select id="selectPageCount" parameterType="com.founder.model.amsis.SysClientCsfj" resultType="java.lang.Integer">
select count(1) from Sys_Client_Csfj
<include refid="queryWhere"/>
</select>
<!-- 保存设备-->
<insert id="saveSysClientCsfj" parameterType="com.founder.model.amsis.SysClientCsfj">
insert into Sys_Client_Csfj ( ID,CSID,DZWJMC,DZWJBT,DZWJGS,DZWJNR,DZWJDX,DZWJWZ,JLSJ,LRDW,LRR)
values (
#{id,jdbcType=VARCHAR},
#{csid,jdbcType=VARCHAR},
#{dzwjmc,jdbcType=VARCHAR},
#{dzwjbt,jdbcType=VARCHAR},
#{dzwjgs,jdbcType=VARCHAR},
#{dzwjnr,jdbcType=BLOB},
#{dzwjdx,jdbcType=NUMERIC},
#{dzwjwz,jdbcType=VARCHAR},
#{jlsj,jdbcType=DATE},
#{lrdw,jdbcType=VARCHAR},
#{lrr,jdbcType=VARCHAR}
)
</insert>
<select id="selectSysClientCsfj" parameterType="java.lang.String" resultType="com.founder.model.amsis.SysClientCsfj">
select <include refid="Base_Column_List"/>
from Sys_Client_Csfj
where ID = #{id,jdbcType=VARCHAR }AND SCBZ='0'
</select>
<delete id="deleteSysClientCsfj" parameterType="java.lang.String" >
update Sys_Client_Csfj set SCBZ='1'
where ID = #{id,jdbcType=VARCHAR}
</delete>
</mapper>
\ No newline at end of file
......@@ -50,6 +50,8 @@
<result column="IFDNABQDYJ" jdbcType="VARCHAR" property="ifdnabqdyj" />
<result column="ZRMJNAME" jdbcType="VARCHAR" property="zrmjname" />
<result column="SBZTSTR" jdbcType="VARCHAR" property="sbztstr" />
<result column="YYSJSTR" jdbcType="VARCHAR" property="yysjstr" />
<result column="YYCSSTR" jdbcType="NUMERIC" property="yycsstr" />
</resultMap>
<sql id="Base_Column_List" >
ID, VID, PID, SCBZ, LRSJ,IP,MAC,IFYTHCJY,ZWCJY_NAME,ZWCJY_CODE,EDZYDQ_NAME,EDZYDQ_CODE,SGTZZCCJY_NAME,SGTZZCCJY_CODE,
......@@ -354,4 +356,31 @@
<if test="id!=null and id !=''">AND id != #{id}</if>
AND SCBZ='0'
</select>
<sql id="cyxj" >
select to_char(lrsj,'yyyy-mm') mo ,count(*) sl from tb_ry_rycj
where lrsj > trunc(sysdate ,'yyyy') and ip = #{ip,jdbcType=VARCHAR}
group by to_char(lrsj,'yyyy-mm')
</sql>
<sql id="dnyf" >
SELECT TO_CHAR(add_months(trunc(sysdate,'yy'), ROWNUM - 1),'yyyy-MM') as month
FROM DUAL
CONNECT BY ROWNUM <![CDATA[ <= ]]> (select months_between(trunc(sysdate,'mm'),trunc(sysdate,'yy')) + 1
from dual)
</sql>
<select id="ClientYlist" parameterType="java.lang.String" resultMap="BaseResultMap">
select b.month yysjstr,decode(sl,'',0,sl) yycsstr from
( <include refid="cyxj"/> ) a,
( <include refid="dnyf"/>) b where a.mo(+) = b.month order by b.month
</select>
<select id="getMCjsj" parameterType="java.lang.String" resultType="java.lang.String">
select to_char(max(lrsj),'yyyy-mm-dd') mlrsj from tb_ry_rycj
where ip = #{ip,jdbcType=VARCHAR}
</select>
</mapper>
\ No newline at end of file
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