first commit

This commit is contained in:
2026-01-16 14:13:44 +08:00
commit 903ff8d495
34603 changed files with 8585054 additions and 0 deletions

View File

@ -0,0 +1,187 @@
<?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="material.AuxiliaryMaterialPickingMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.material.AuxiliaryMaterialPicking" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
<result column="pid" property="pid" jdbcType="VARCHAR" />
<result column="bomprojects" property="bomprojects" jdbcType="VARCHAR" />
<result column="num" property="num" jdbcType="VARCHAR" />
<result column="unit" property="unit" jdbcType="VARCHAR" />
<result column="pickingpeople" property="pickingpeople" jdbcType="VARCHAR" />
<result column="pickingdate" property="pickingdate" jdbcType="TIMESTAMP" />
<result column="remark" property="remark" jdbcType="VARCHAR" />
<result column="keyword" property="keyword" jdbcType="VARCHAR" />
<result column="materialcode" property="materialcode" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, insuser, insdt, pid, bomprojects, num, unit, pickingpeople, pickingdate, remark,
keyword, materialcode
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_material_AuxiliaryMaterialPicking
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from tb_material_AuxiliaryMaterialPicking
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.material.AuxiliaryMaterialPicking" >
insert into tb_material_AuxiliaryMaterialPicking (id, insuser, insdt,
pid, bomprojects, num,
unit, pickingpeople, pickingdate,
remark, keyword, materialcode
)
values (#{id,jdbcType=VARCHAR}, #{insuser,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP},
#{pid,jdbcType=VARCHAR}, #{bomprojects,jdbcType=VARCHAR}, #{num,jdbcType=VARCHAR},
#{unit,jdbcType=VARCHAR}, #{pickingpeople,jdbcType=VARCHAR}, #{pickingdate,jdbcType=TIMESTAMP},
#{remark,jdbcType=VARCHAR}, #{keyword,jdbcType=VARCHAR}, #{materialcode,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.material.AuxiliaryMaterialPicking" >
insert into tb_material_AuxiliaryMaterialPicking
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="insuser != null" >
insuser,
</if>
<if test="insdt != null" >
insdt,
</if>
<if test="pid != null" >
pid,
</if>
<if test="bomprojects != null" >
bomprojects,
</if>
<if test="num != null" >
num,
</if>
<if test="unit != null" >
unit,
</if>
<if test="pickingpeople != null" >
pickingpeople,
</if>
<if test="pickingdate != null" >
pickingdate,
</if>
<if test="remark != null" >
remark,
</if>
<if test="keyword != null" >
keyword,
</if>
<if test="materialcode != null" >
materialcode,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
#{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
#{insdt,jdbcType=TIMESTAMP},
</if>
<if test="pid != null" >
#{pid,jdbcType=VARCHAR},
</if>
<if test="bomprojects != null" >
#{bomprojects,jdbcType=VARCHAR},
</if>
<if test="num != null" >
#{num,jdbcType=VARCHAR},
</if>
<if test="unit != null" >
#{unit,jdbcType=VARCHAR},
</if>
<if test="pickingpeople != null" >
#{pickingpeople,jdbcType=VARCHAR},
</if>
<if test="pickingdate != null" >
#{pickingdate,jdbcType=TIMESTAMP},
</if>
<if test="remark != null" >
#{remark,jdbcType=VARCHAR},
</if>
<if test="keyword != null" >
#{keyword,jdbcType=VARCHAR},
</if>
<if test="materialcode != null" >
#{materialcode,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.material.AuxiliaryMaterialPicking" >
update tb_material_AuxiliaryMaterialPicking
<set >
<if test="insuser != null" >
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
insdt = #{insdt,jdbcType=TIMESTAMP},
</if>
<if test="pid != null" >
pid = #{pid,jdbcType=VARCHAR},
</if>
<if test="bomprojects != null" >
bomprojects = #{bomprojects,jdbcType=VARCHAR},
</if>
<if test="num != null" >
num = #{num,jdbcType=VARCHAR},
</if>
<if test="unit != null" >
unit = #{unit,jdbcType=VARCHAR},
</if>
<if test="pickingpeople != null" >
pickingpeople = #{pickingpeople,jdbcType=VARCHAR},
</if>
<if test="pickingdate != null" >
pickingdate = #{pickingdate,jdbcType=TIMESTAMP},
</if>
<if test="remark != null" >
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="keyword != null" >
keyword = #{keyword,jdbcType=VARCHAR},
</if>
<if test="materialcode != null" >
materialcode = #{materialcode,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.material.AuxiliaryMaterialPicking" >
update tb_material_AuxiliaryMaterialPicking
set insuser = #{insuser,jdbcType=VARCHAR},
insdt = #{insdt,jdbcType=TIMESTAMP},
pid = #{pid,jdbcType=VARCHAR},
bomprojects = #{bomprojects,jdbcType=VARCHAR},
num = #{num,jdbcType=VARCHAR},
unit = #{unit,jdbcType=VARCHAR},
pickingpeople = #{pickingpeople,jdbcType=VARCHAR},
pickingdate = #{pickingdate,jdbcType=TIMESTAMP},
remark = #{remark,jdbcType=VARCHAR},
keyword = #{keyword,jdbcType=VARCHAR},
materialcode = #{materialcode,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectListByWhere" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_material_AuxiliaryMaterialPicking
${where}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String">
delete from tb_material_AuxiliaryMaterialPicking
${where}
</delete>
</mapper>

View File

@ -0,0 +1,246 @@
<?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="material.BoardbatchMapper">
<resultMap id="BaseResultMap" type="com.sipai.entity.material.Boardbatch">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="no" jdbcType="VARCHAR" property="no" />
<result column="status" jdbcType="VARCHAR" property="status" />
<result column="starttime" jdbcType="TIMESTAMP" property="starttime" />
<result column="endtime" jdbcType="TIMESTAMP" property="endtime" />
<result column="insuser" jdbcType="VARCHAR" property="insuser" />
<result column="insdt" jdbcType="TIMESTAMP" property="insdt" />
<result column="alterdt" jdbcType="TIMESTAMP" property="alterdt" />
<result column="alteruser" jdbcType="VARCHAR" property="alteruser" />
<result column="alterstatus" jdbcType="VARCHAR" property="alterstatus" />
<result column="processrealid" jdbcType="VARCHAR" property="processrealid" />
</resultMap>
<sql id="Base_Column_List">
id, type, name, no, status, starttime, endtime, insuser, insdt, alterdt, alteruser,
alterstatus, processrealid
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_material_boardbatch
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from tb_material_boardbatch
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.material.Boardbatch">
insert into tb_material_boardbatch (id, type, name,
no, status, starttime,
endtime, insuser, insdt,
alterdt, alteruser, alterstatus,
processrealid)
values (#{id,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{no,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{starttime,jdbcType=TIMESTAMP},
#{endtime,jdbcType=TIMESTAMP}, #{insuser,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP},
#{alterdt,jdbcType=TIMESTAMP}, #{alteruser,jdbcType=VARCHAR}, #{alterstatus,jdbcType=VARCHAR},
#{processrealid,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.material.Boardbatch">
insert into tb_material_boardbatch
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="type != null">
type,
</if>
<if test="name != null">
name,
</if>
<if test="no != null">
no,
</if>
<if test="status != null">
status,
</if>
<if test="starttime != null">
starttime,
</if>
<if test="endtime != null">
endtime,
</if>
<if test="insuser != null">
insuser,
</if>
<if test="insdt != null">
insdt,
</if>
<if test="alterdt != null">
alterdt,
</if>
<if test="alteruser != null">
alteruser,
</if>
<if test="alterstatus != null">
alterstatus,
</if>
<if test="processrealid != null">
processrealid,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="no != null">
#{no,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=VARCHAR},
</if>
<if test="starttime != null">
#{starttime,jdbcType=TIMESTAMP},
</if>
<if test="endtime != null">
#{endtime,jdbcType=TIMESTAMP},
</if>
<if test="insuser != null">
#{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null">
#{insdt,jdbcType=TIMESTAMP},
</if>
<if test="alterdt != null">
#{alterdt,jdbcType=TIMESTAMP},
</if>
<if test="alteruser != null">
#{alteruser,jdbcType=VARCHAR},
</if>
<if test="alterstatus != null">
#{alterstatus,jdbcType=VARCHAR},
</if>
<if test="processrealid != null">
#{processrealid,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.material.Boardbatch">
update tb_material_boardbatch
<set>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="no != null">
no = #{no,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=VARCHAR},
</if>
<if test="starttime != null">
starttime = #{starttime,jdbcType=TIMESTAMP},
</if>
<if test="endtime != null">
endtime = #{endtime,jdbcType=TIMESTAMP},
</if>
<if test="insuser != null">
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null">
insdt = #{insdt,jdbcType=TIMESTAMP},
</if>
<if test="alterdt != null">
alterdt = #{alterdt,jdbcType=TIMESTAMP},
</if>
<if test="alteruser != null">
alteruser = #{alteruser,jdbcType=VARCHAR},
</if>
<if test="alterstatus != null">
alterstatus = #{alterstatus,jdbcType=VARCHAR},
</if>
<if test="processrealid != null">
processrealid = #{processrealid,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.material.Boardbatch">
update tb_material_boardbatch
set type = #{type,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
no = #{no,jdbcType=VARCHAR},
status = #{status,jdbcType=VARCHAR},
starttime = #{starttime,jdbcType=TIMESTAMP},
endtime = #{endtime,jdbcType=TIMESTAMP},
insuser = #{insuser,jdbcType=VARCHAR},
insdt = #{insdt,jdbcType=TIMESTAMP},
alterdt = #{alterdt,jdbcType=TIMESTAMP},
alteruser = #{alteruser,jdbcType=VARCHAR},
alterstatus = #{alterstatus,jdbcType=VARCHAR},
processrealid = #{processrealid,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectListByWhere" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_material_boardbatch
${where}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String">
delete from tb_material_boardbatch
${where}
</delete>
<select id="getListByNo" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_material_boardbatch
where no = #{no,jdbcType=VARCHAR}
</select>
<select id="getListByName" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_material_boardbatch
where name = #{name,jdbcType=VARCHAR}
</select>
<resultMap id="BaseResultMap1" type="com.sipai.entity.material.Boardbatch">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="no" jdbcType="VARCHAR" property="no" />
<result column="status" jdbcType="VARCHAR" property="status" />
<result column="starttime" jdbcType="TIMESTAMP" property="starttime" />
<result column="endtime" jdbcType="TIMESTAMP" property="endtime" />
<result column="insuser" jdbcType="VARCHAR" property="insuser" />
<result column="insdt" jdbcType="TIMESTAMP" property="insdt" />
<result column="alterdt" jdbcType="TIMESTAMP" property="alterdt" />
<result column="alteruser" jdbcType="VARCHAR" property="alteruser" />
<result column="equipmentName" jdbcType="VARCHAR" property="equipmentName" />
<result column="equipmentcardid" jdbcType="VARCHAR" property="equipmentcardid" />
<result column="processrealid" jdbcType="VARCHAR" property="processrealid" />
</resultMap>
<sql id="Base_Column_List1">
id, type, name, no, status, starttime, endtime, insuser, insdt, alterdt, alteruser,
alterstatus, processrealid,equipmentcardid,equipmentName
</sql>
<select id="getListByEquipmentName" parameterType="com.sipai.entity.material.Boardbatch" resultMap="BaseResultMap1">
select p.id,p.type,p.name,p.status,p.starttime,p.endtime,p.alteruser,p.alterdt,p.No,p.equipmentcardid,p.processrealid,t.equipmentName
from (select M.equipmentcardid AS equipmentcardid,M.status AS machinestatus,B.type AS type,B.name,B.status,B.starttime,B.No,B.id,
B.endtime,B.alteruser,B.alterdt,B.processrealid
from tb_material_boardbatch B ,tb_material_boardbatchmachine M
where M.No = B.id) p
left outer join TB_EM_EquipmentCard t on p.equipmentcardid = t.id
${where}
</select>
<select id="getListByBoardno" resultMap="BaseResultMap1" parameterType="java.lang.String" >
select
<include refid="Base_Column_List1" />
from tb_material_boardbatch
where no = #{no,jdbcType=VARCHAR}
</select>
</mapper>

View File

@ -0,0 +1,134 @@
<?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="material.BoardbatchmachineMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.material.Boardbatchmachine" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
<result column="no" property="no" jdbcType="VARCHAR" />
<result column="equipmentCardID" property="equipmentcardid" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, insuser, insdt, no, equipmentCardID, status
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_material_boardbatchmachine
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from tb_material_boardbatchmachine
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.material.Boardbatchmachine" >
insert into tb_material_boardbatchmachine (id, insuser, insdt,
no, equipmentCardID, status
)
values (#{id,jdbcType=VARCHAR}, #{insuser,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP},
#{no,jdbcType=VARCHAR}, #{equipmentcardid,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.material.Boardbatchmachine" >
insert into tb_material_boardbatchmachine
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="insuser != null" >
insuser,
</if>
<if test="insdt != null" >
insdt,
</if>
<if test="no != null" >
no,
</if>
<if test="equipmentcardid != null" >
equipmentCardID,
</if>
<if test="status != null" >
status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
#{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
#{insdt,jdbcType=TIMESTAMP},
</if>
<if test="no != null" >
#{no,jdbcType=VARCHAR},
</if>
<if test="equipmentcardid != null" >
#{equipmentcardid,jdbcType=VARCHAR},
</if>
<if test="status != null" >
#{status,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.material.Boardbatchmachine" >
update tb_material_boardbatchmachine
<set >
<if test="insuser != null" >
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
insdt = #{insdt,jdbcType=TIMESTAMP},
</if>
<if test="no != null" >
no = #{no,jdbcType=VARCHAR},
</if>
<if test="equipmentcardid != null" >
equipmentCardID = #{equipmentcardid,jdbcType=VARCHAR},
</if>
<if test="status != null" >
status = #{status,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.material.Boardbatchmachine" >
update tb_material_boardbatchmachine
set insuser = #{insuser,jdbcType=VARCHAR},
insdt = #{insdt,jdbcType=TIMESTAMP},
no = #{no,jdbcType=VARCHAR},
equipmentCardID = #{equipmentcardid,jdbcType=VARCHAR},
status = #{status,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectListByWhere" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_material_boardbatchmachine
${where}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String" >
delete from tb_material_boardbatchmachine
${where}
</delete>
<resultMap id="BaseResultMap1" type="com.sipai.entity.equipment.EquipmentCard" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="VARCHAR" />
<result column="equipmentCardID" property="equipmentcardid" jdbcType="VARCHAR" />
<result column="equipmentClassID" property="equipmentclassid" jdbcType="VARCHAR" />
<result column="equipmentModel" property="equipmentmodel" jdbcType="VARCHAR" />
<result column="areaID" property="areaid" jdbcType="VARCHAR" />
<result column="equipmentName" property="equipmentname" jdbcType="CLOB" />
</resultMap>
<select id="getEquipmentCard" resultMap="BaseResultMap1" parameterType="java.lang.String">
select E.*,
M.status AS ibmstatus
from tb_material_boardbatchmachine M
left join TB_EM_EquipmentCard E on E.id=M.equipmentCardID
${where}
</select>
</mapper>

View File

@ -0,0 +1,173 @@
<?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="material.ClientsMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.material.Clients" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="tel" property="tel" jdbcType="VARCHAR" />
<result column="fax" property="fax" jdbcType="VARCHAR" />
<result column="address" property="address" jdbcType="VARCHAR" />
<result column="email" property="email" jdbcType="VARCHAR" />
<result column="remark" property="remark" jdbcType="VARCHAR" />
<result column="contactname" property="contactname" jdbcType="VARCHAR" />
<result column="contacttel" property="contacttel" jdbcType="VARCHAR" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Base_Column_List" >
id, name, tel, fax, address, email, remark, contactname, contacttel, insuser, insdt
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_clients
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from tb_clients
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.material.Clients" >
insert into tb_clients (id, name, tel,
fax, address, email,
remark, contactname, contacttel,
insuser, insdt)
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{tel,jdbcType=VARCHAR},
#{fax,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR}, #{contactname,jdbcType=VARCHAR}, #{contacttel,jdbcType=VARCHAR},
#{insuser,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.material.Clients" >
insert into tb_clients
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="name != null" >
name,
</if>
<if test="tel != null" >
tel,
</if>
<if test="fax != null" >
fax,
</if>
<if test="address != null" >
address,
</if>
<if test="email != null" >
email,
</if>
<if test="remark != null" >
remark,
</if>
<if test="contactname != null" >
contactname,
</if>
<if test="contacttel != null" >
contacttel,
</if>
<if test="insuser != null" >
insuser,
</if>
<if test="insdt != null" >
insdt,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="name != null" >
#{name,jdbcType=VARCHAR},
</if>
<if test="tel != null" >
#{tel,jdbcType=VARCHAR},
</if>
<if test="fax != null" >
#{fax,jdbcType=VARCHAR},
</if>
<if test="address != null" >
#{address,jdbcType=VARCHAR},
</if>
<if test="email != null" >
#{email,jdbcType=VARCHAR},
</if>
<if test="remark != null" >
#{remark,jdbcType=VARCHAR},
</if>
<if test="contactname != null" >
#{contactname,jdbcType=VARCHAR},
</if>
<if test="contacttel != null" >
#{contacttel,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
#{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
#{insdt,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.material.Clients" >
update tb_clients
<set >
<if test="name != null" >
name = #{name,jdbcType=VARCHAR},
</if>
<if test="tel != null" >
tel = #{tel,jdbcType=VARCHAR},
</if>
<if test="fax != null" >
fax = #{fax,jdbcType=VARCHAR},
</if>
<if test="address != null" >
address = #{address,jdbcType=VARCHAR},
</if>
<if test="email != null" >
email = #{email,jdbcType=VARCHAR},
</if>
<if test="remark != null" >
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="contactname != null" >
contactname = #{contactname,jdbcType=VARCHAR},
</if>
<if test="contacttel != null" >
contacttel = #{contacttel,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
insdt = #{insdt,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.material.Clients" >
update tb_clients
set name = #{name,jdbcType=VARCHAR},
tel = #{tel,jdbcType=VARCHAR},
fax = #{fax,jdbcType=VARCHAR},
address = #{address,jdbcType=VARCHAR},
email = #{email,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
contactname = #{contactname,jdbcType=VARCHAR},
contacttel = #{contacttel,jdbcType=VARCHAR},
insuser = #{insuser,jdbcType=VARCHAR},
insdt = #{insdt,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectListByWhere" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_clients
${where}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String" >
delete from tb_clients
${where}
</delete>
</mapper>

View File

@ -0,0 +1,204 @@
<?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="material.CutterCNCPointMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.material.CutterCNCPoint" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
<result column="equid" property="equid" jdbcType="VARCHAR" />
<result column="equstatus" property="equstatus" jdbcType="VARCHAR" />
<result column="equrunmode" property="equrunmode" jdbcType="VARCHAR" />
<result column="equgospeed" property="equgospeed" jdbcType="VARCHAR" />
<result column="equcaspeed" property="equcaspeed" jdbcType="VARCHAR" />
<result column="processcumno" property="processcumno" jdbcType="VARCHAR" />
<result column="mechandno" property="mechandno" jdbcType="VARCHAR" />
<result column="cutterlossno" property="cutterlossno" jdbcType="VARCHAR" />
<result column="cutterlossset" property="cutterlossset" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, insuser, insdt, equid, equstatus, equrunmode, equgospeed, equcaspeed, processcumno,
mechandno, cutterlossno, cutterlossset
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_cutter_cncpoint
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from tb_cutter_cncpoint
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.material.CutterCNCPoint" >
insert into tb_cutter_cncpoint (id, insuser, insdt,
equid, equstatus, equrunmode,
equgospeed, equcaspeed, processcumno,
mechandno, cutterlossno, cutterlossset
)
values (#{id,jdbcType=VARCHAR}, #{insuser,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP},
#{equid,jdbcType=VARCHAR}, #{equstatus,jdbcType=VARCHAR}, #{equrunmode,jdbcType=VARCHAR},
#{equgospeed,jdbcType=VARCHAR}, #{equcaspeed,jdbcType=VARCHAR}, #{processcumno,jdbcType=VARCHAR},
#{mechandno,jdbcType=VARCHAR}, #{cutterlossno,jdbcType=VARCHAR}, #{cutterlossset,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.material.CutterCNCPoint" >
insert into tb_cutter_cncpoint
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="insuser != null" >
insuser,
</if>
<if test="insdt != null" >
insdt,
</if>
<if test="equid != null" >
equid,
</if>
<if test="equstatus != null" >
equstatus,
</if>
<if test="equrunmode != null" >
equrunmode,
</if>
<if test="equgospeed != null" >
equgospeed,
</if>
<if test="equcaspeed != null" >
equcaspeed,
</if>
<if test="processcumno != null" >
processcumno,
</if>
<if test="mechandno != null" >
mechandno,
</if>
<if test="cutterlossno != null" >
cutterlossno,
</if>
<if test="cutterlossset != null" >
cutterlossset,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
#{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
#{insdt,jdbcType=TIMESTAMP},
</if>
<if test="equid != null" >
#{equid,jdbcType=VARCHAR},
</if>
<if test="equstatus != null" >
#{equstatus,jdbcType=VARCHAR},
</if>
<if test="equrunmode != null" >
#{equrunmode,jdbcType=VARCHAR},
</if>
<if test="equgospeed != null" >
#{equgospeed,jdbcType=VARCHAR},
</if>
<if test="equcaspeed != null" >
#{equcaspeed,jdbcType=VARCHAR},
</if>
<if test="processcumno != null" >
#{processcumno,jdbcType=VARCHAR},
</if>
<if test="mechandno != null" >
#{mechandno,jdbcType=VARCHAR},
</if>
<if test="cutterlossno != null" >
#{cutterlossno,jdbcType=VARCHAR},
</if>
<if test="cutterlossset != null" >
#{cutterlossset,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.material.CutterCNCPoint" >
update tb_cutter_cncpoint
<set >
<if test="insuser != null" >
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
insdt = #{insdt,jdbcType=TIMESTAMP},
</if>
<if test="equid != null" >
equid = #{equid,jdbcType=VARCHAR},
</if>
<if test="equstatus != null" >
equstatus = #{equstatus,jdbcType=VARCHAR},
</if>
<if test="equrunmode != null" >
equrunmode = #{equrunmode,jdbcType=VARCHAR},
</if>
<if test="equgospeed != null" >
equgospeed = #{equgospeed,jdbcType=VARCHAR},
</if>
<if test="equcaspeed != null" >
equcaspeed = #{equcaspeed,jdbcType=VARCHAR},
</if>
<if test="processcumno != null" >
processcumno = #{processcumno,jdbcType=VARCHAR},
</if>
<if test="mechandno != null" >
mechandno = #{mechandno,jdbcType=VARCHAR},
</if>
<if test="cutterlossno != null" >
cutterlossno = #{cutterlossno,jdbcType=VARCHAR},
</if>
<if test="cutterlossset != null" >
cutterlossset = #{cutterlossset,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.material.CutterCNCPoint" >
update tb_cutter_cncpoint
set insuser = #{insuser,jdbcType=VARCHAR},
insdt = #{insdt,jdbcType=TIMESTAMP},
equid = #{equid,jdbcType=VARCHAR},
equstatus = #{equstatus,jdbcType=VARCHAR},
equrunmode = #{equrunmode,jdbcType=VARCHAR},
equgospeed = #{equgospeed,jdbcType=VARCHAR},
equcaspeed = #{equcaspeed,jdbcType=VARCHAR},
processcumno = #{processcumno,jdbcType=VARCHAR},
mechandno = #{mechandno,jdbcType=VARCHAR},
cutterlossno = #{cutterlossno,jdbcType=VARCHAR},
cutterlossset = #{cutterlossset,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectListByWhere" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_cutter_cncpoint
${where}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String">
delete from tb_cutter_cncpoint
${where}
</delete>
<select id="selectListByEquipment" parameterType="java.lang.String" resultMap="BaseResultMap">
select C.equstatus,C.equrunmode ,C.equgospeed,C.equcaspeed,C.processcumno,C.mechandno,C.cutterlossno,C.cutterlossset,
C.insdt,C.id,C.insuser,C.equid,
E.equipmentCardID,E.equipmentName
from tb_cutter_cncpoint C
left outer join TB_EM_EquipmentCard E on E.id = C.equid
${where}
</select>
<select id="selectByEquid" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_cutter_cncpoint
${where}
</select>
</mapper>

View File

@ -0,0 +1,186 @@
<?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="material.CutterCNCStandardMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.material.CutterCNCStandard" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
<result column="materialcode" property="materialcode" jdbcType="VARCHAR" />
<result column="equid" property="equid" jdbcType="VARCHAR" />
<result column="stequgospeedvalue" property="stequgospeedvalue" jdbcType="VARCHAR" />
<result column="stequcaspeedvalue" property="stequcaspeedvalue" jdbcType="VARCHAR" />
<result column="stprocesscumnovalue" property="stprocesscumnovalue" jdbcType="VARCHAR" />
<result column="stmechandnovalue" property="stmechandnovalue" jdbcType="VARCHAR" />
<result column="stcutterlossnovalue" property="stcutterlossnovalue" jdbcType="VARCHAR" />
<result column="stcutterlosssetvalue" property="stcutterlosssetvalue" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, insuser, insdt, materialcode, equid, stequgospeedvalue, stequcaspeedvalue, stprocesscumnovalue,
stmechandnovalue, stcutterlossnovalue, stcutterlosssetvalue
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_cutter_cncstandardvalue
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from tb_cutter_cncstandardvalue
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.material.CutterCNCStandard" >
insert into tb_cutter_cncstandardvalue (id, insuser, insdt,
materialcode, equid, stequgospeedvalue,
stequcaspeedvalue, stprocesscumnovalue,
stmechandnovalue, stcutterlossnovalue,
stcutterlosssetvalue)
values (#{id,jdbcType=VARCHAR}, #{insuser,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP},
#{materialcode,jdbcType=VARCHAR}, #{equid,jdbcType=VARCHAR}, #{stequgospeedvalue,jdbcType=VARCHAR},
#{stequcaspeedvalue,jdbcType=VARCHAR}, #{stprocesscumnovalue,jdbcType=VARCHAR},
#{stmechandnovalue,jdbcType=VARCHAR}, #{stcutterlossnovalue,jdbcType=VARCHAR},
#{stcutterlosssetvalue,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.material.CutterCNCStandard" >
insert into tb_cutter_cncstandardvalue
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="insuser != null" >
insuser,
</if>
<if test="insdt != null" >
insdt,
</if>
<if test="materialcode != null" >
materialcode,
</if>
<if test="equid != null" >
equid,
</if>
<if test="stequgospeedvalue != null" >
stequgospeedvalue,
</if>
<if test="stequcaspeedvalue != null" >
stequcaspeedvalue,
</if>
<if test="stprocesscumnovalue != null" >
stprocesscumnovalue,
</if>
<if test="stmechandnovalue != null" >
stmechandnovalue,
</if>
<if test="stcutterlossnovalue != null" >
stcutterlossnovalue,
</if>
<if test="stcutterlosssetvalue != null" >
stcutterlosssetvalue,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
#{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
#{insdt,jdbcType=TIMESTAMP},
</if>
<if test="materialcode != null" >
#{materialcode,jdbcType=VARCHAR},
</if>
<if test="equid != null" >
#{equid,jdbcType=VARCHAR},
</if>
<if test="stequgospeedvalue != null" >
#{stequgospeedvalue,jdbcType=VARCHAR},
</if>
<if test="stequcaspeedvalue != null" >
#{stequcaspeedvalue,jdbcType=VARCHAR},
</if>
<if test="stprocesscumnovalue != null" >
#{stprocesscumnovalue,jdbcType=VARCHAR},
</if>
<if test="stmechandnovalue != null" >
#{stmechandnovalue,jdbcType=VARCHAR},
</if>
<if test="stcutterlossnovalue != null" >
#{stcutterlossnovalue,jdbcType=VARCHAR},
</if>
<if test="stcutterlosssetvalue != null" >
#{stcutterlosssetvalue,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.material.CutterCNCStandard" >
update tb_cutter_cncstandardvalue
<set >
<if test="insuser != null" >
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
insdt = #{insdt,jdbcType=TIMESTAMP},
</if>
<if test="materialcode != null" >
materialcode = #{materialcode,jdbcType=VARCHAR},
</if>
<if test="equid != null" >
equid = #{equid,jdbcType=VARCHAR},
</if>
<if test="stequgospeedvalue != null" >
stequgospeedvalue = #{stequgospeedvalue,jdbcType=VARCHAR},
</if>
<if test="stequcaspeedvalue != null" >
stequcaspeedvalue = #{stequcaspeedvalue,jdbcType=VARCHAR},
</if>
<if test="stprocesscumnovalue != null" >
stprocesscumnovalue = #{stprocesscumnovalue,jdbcType=VARCHAR},
</if>
<if test="stmechandnovalue != null" >
stmechandnovalue = #{stmechandnovalue,jdbcType=VARCHAR},
</if>
<if test="stcutterlossnovalue != null" >
stcutterlossnovalue = #{stcutterlossnovalue,jdbcType=VARCHAR},
</if>
<if test="stcutterlosssetvalue != null" >
stcutterlosssetvalue = #{stcutterlosssetvalue,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.material.CutterCNCStandard" >
update tb_cutter_cncstandardvalue
set insuser = #{insuser,jdbcType=VARCHAR},
insdt = #{insdt,jdbcType=TIMESTAMP},
materialcode = #{materialcode,jdbcType=VARCHAR},
equid = #{equid,jdbcType=VARCHAR},
stequgospeedvalue = #{stequgospeedvalue,jdbcType=VARCHAR},
stequcaspeedvalue = #{stequcaspeedvalue,jdbcType=VARCHAR},
stprocesscumnovalue = #{stprocesscumnovalue,jdbcType=VARCHAR},
stmechandnovalue = #{stmechandnovalue,jdbcType=VARCHAR},
stcutterlossnovalue = #{stcutterlossnovalue,jdbcType=VARCHAR},
stcutterlosssetvalue = #{stcutterlosssetvalue,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectListByWhere" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_cutter_cncstandardvalue
${where}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String">
delete from tb_cutter_cncstandardvalue
${where}
</delete>
<select id="selectListByEquipment" parameterType="java.lang.String" resultMap="BaseResultMap">
select C.stequgospeedvalue,C.stequcaspeedvalue,C.stprocesscumnovalue,C.stmechandnovalue,C.stcutterlossnovalue,C.stcutterlosssetvalue,
C.insdt,C.id,C.insuser,C.equid,C.materialcode,
E.equipmentCardID,E.equipmentName
from tb_cutter_cncstandardvalue C
left outer join TB_EM_EquipmentCard E on E.id = C.equid
${where}
</select>
</mapper>

View File

@ -0,0 +1,293 @@
<?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="material.CutterInfoMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.material.CutterInfo" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="cuttercode" property="cuttercode" jdbcType="VARCHAR" />
<result column="cuttername" property="cuttername" jdbcType="VARCHAR" />
<result column="typeid" property="typeid" jdbcType="VARCHAR" />
<result column="positionid" property="positionid" jdbcType="VARCHAR" />
<result column="life" property="life" jdbcType="DOUBLE" />
<result column="length" property="length" jdbcType="DOUBLE" />
<result column="ply" property="ply" jdbcType="DOUBLE" />
<result column="width" property="width" jdbcType="DOUBLE" />
<result column="producer" property="producer" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="VARCHAR" />
<result column="remark" property="remark" jdbcType="VARCHAR" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
<result column="modify" property="modify" jdbcType="VARCHAR" />
<result column="modifydt" property="modifydt" jdbcType="TIMESTAMP" />
<association column="positionid" property="_positionname" jdbcType="VARCHAR" select="selectPosition"/>
<association column="typeid" property="_typename" jdbcType="VARCHAR" select="selectType"/>
</resultMap>
<sql id="Base_Column_List" >
id, cuttercode, cuttername, typeid, positionid, life, length, ply, width, producer,
status, remark, insuser, insdt, modify, modifydt
</sql>
<select id="selectPosition" parameterType="String" resultType="String">
select name from tb_cutter_position where id = #{positionid}
</select>
<select id="selectType" parameterType="String" resultType="String">
select typename from tb_cutter_type where id = #{typeid}
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_cutter_info
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from tb_cutter_info
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.material.CutterInfo" >
insert into tb_cutter_info (id, cuttercode, cuttername,
typeid, positionid, life,
length, ply, width, producer,
status, remark, insuser,
insdt, modify, modifydt
)
values (#{id,jdbcType=VARCHAR}, #{cuttercode,jdbcType=VARCHAR}, #{cuttername,jdbcType=VARCHAR},
#{typeid,jdbcType=VARCHAR}, #{positionid,jdbcType=VARCHAR}, #{life,jdbcType=DOUBLE},
#{length,jdbcType=DOUBLE}, #{ply,jdbcType=DOUBLE}, #{width,jdbcType=DOUBLE}, #{producer,jdbcType=VARCHAR},
#{status,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{insuser,jdbcType=VARCHAR},
#{insdt,jdbcType=TIMESTAMP}, #{modify,jdbcType=VARCHAR}, #{modifydt,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.material.CutterInfo" >
insert into tb_cutter_info
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="cuttercode != null" >
cuttercode,
</if>
<if test="cuttername != null" >
cuttername,
</if>
<if test="typeid != null" >
typeid,
</if>
<if test="positionid != null" >
positionid,
</if>
<if test="life != null" >
life,
</if>
<if test="length != null" >
length,
</if>
<if test="ply != null" >
ply,
</if>
<if test="width != null" >
width,
</if>
<if test="producer != null" >
producer,
</if>
<if test="status != null" >
status,
</if>
<if test="remark != null" >
remark,
</if>
<if test="insuser != null" >
insuser,
</if>
<if test="insdt != null" >
insdt,
</if>
<if test="modify != null" >
modify,
</if>
<if test="modifydt != null" >
modifydt,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="cuttercode != null" >
#{cuttercode,jdbcType=VARCHAR},
</if>
<if test="cuttername != null" >
#{cuttername,jdbcType=VARCHAR},
</if>
<if test="typeid != null" >
#{typeid,jdbcType=VARCHAR},
</if>
<if test="positionid != null" >
#{positionid,jdbcType=VARCHAR},
</if>
<if test="life != null" >
#{life,jdbcType=DOUBLE},
</if>
<if test="length != null" >
#{length,jdbcType=DOUBLE},
</if>
<if test="ply != null" >
#{ply,jdbcType=DOUBLE},
</if>
<if test="width != null" >
#{width,jdbcType=DOUBLE},
</if>
<if test="producer != null" >
#{producer,jdbcType=VARCHAR},
</if>
<if test="status != null" >
#{status,jdbcType=VARCHAR},
</if>
<if test="remark != null" >
#{remark,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
#{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
#{insdt,jdbcType=TIMESTAMP},
</if>
<if test="modify != null" >
#{modify,jdbcType=VARCHAR},
</if>
<if test="modifydt != null" >
#{modifydt,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.material.CutterInfo" >
update tb_cutter_info
<set >
<if test="cuttercode != null" >
cuttercode = #{cuttercode,jdbcType=VARCHAR},
</if>
<if test="cuttername != null" >
cuttername = #{cuttername,jdbcType=VARCHAR},
</if>
<if test="typeid != null" >
typeid = #{typeid,jdbcType=VARCHAR},
</if>
<if test="positionid != null" >
positionid = #{positionid,jdbcType=VARCHAR},
</if>
<if test="life != null" >
life = #{life,jdbcType=DOUBLE},
</if>
<if test="length != null" >
length = #{length,jdbcType=DOUBLE},
</if>
<if test="ply != null" >
ply = #{ply,jdbcType=DOUBLE},
</if>
<if test="width != null" >
width = #{width,jdbcType=DOUBLE},
</if>
<if test="producer != null" >
producer = #{producer,jdbcType=VARCHAR},
</if>
<if test="status != null" >
status = #{status,jdbcType=VARCHAR},
</if>
<if test="remark != null" >
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
insdt = #{insdt,jdbcType=TIMESTAMP},
</if>
<if test="modify != null" >
modify = #{modify,jdbcType=VARCHAR},
</if>
<if test="modifydt != null" >
modifydt = #{modifydt,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.material.CutterInfo" >
update tb_cutter_info
set cuttercode = #{cuttercode,jdbcType=VARCHAR},
cuttername = #{cuttername,jdbcType=VARCHAR},
typeid = #{typeid,jdbcType=VARCHAR},
positionid = #{positionid,jdbcType=VARCHAR},
life = #{life,jdbcType=DOUBLE},
length = #{length,jdbcType=DOUBLE},
ply = #{ply,jdbcType=DOUBLE},
width = #{width,jdbcType=DOUBLE},
producer = #{producer,jdbcType=VARCHAR},
status = #{status,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
insuser = #{insuser,jdbcType=VARCHAR},
insdt = #{insdt,jdbcType=TIMESTAMP},
modify = #{modify,jdbcType=VARCHAR},
modifydt = #{modifydt,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectListByWhere" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_cutter_info
${where}
</select>
<select id="getListByCutterCode" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_cutter_info
where cuttercode = #{cuttercode,jdbcType=VARCHAR}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String" >
delete from tb_cutter_info
${where}
</delete>
<select id="getCutterInfo" resultMap="ResultMapMInfo" parameterType="java.lang.String">
SELECT
I.*,
T.id as t_id,
T.typename as t_name,
T.status as t_status,
P.id as p_id,
P.name as p_name,
P.status as p_status
FROM tb_cutter_info I
LEFT OUTER JOIN tb_cutter_type T ON I.typeid = T.id
Left join tb_cutter_position P on P.id = I.positionid
${where}
</select>
<resultMap id="ResultMapMInfo" type="com.sipai.entity.material.CutterInfo">
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="cuttercode" property="cuttercode" jdbcType="VARCHAR" />
<result column="cuttername" property="cuttername" jdbcType="VARCHAR" />
<result column="typeid" property="typeid" jdbcType="VARCHAR" />
<result column="positionid" property="positionid" jdbcType="VARCHAR" />
<result column="life" property="life" jdbcType="DOUBLE" />
<result column="length" property="length" jdbcType="DOUBLE" />
<result column="ply" property="ply" jdbcType="DOUBLE" />
<result column="width" property="width" jdbcType="DOUBLE" />
<result column="producer" property="producer" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="VARCHAR" />
<result column="remark" property="remark" jdbcType="VARCHAR" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
<result column="modify" property="modify" jdbcType="VARCHAR" />
<result column="modifydt" property="modifydt" jdbcType="TIMESTAMP" />
<association property="cutterType" resultMap="typeResult"/>
<association property="cutterPosition" resultMap="positionResult" />
</resultMap>
<resultMap id="typeResult" type="com.sipai.entity.material.CutterType">
<id property="id" column="id"/>
<result property="typename" column="t_name"/>
<result property="status" column="t_status"/>
</resultMap>
<resultMap id="positionResult" type="com.sipai.entity.material.CutterPosition">
<id property="id" column="p_id"/>
<result property="name" column="p_name"/>
<result property="status" column="p_status"/>
</resultMap>
</mapper>

View File

@ -0,0 +1,188 @@
<?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="material.CutterPointSetMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.material.CutterPointSet" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
<result column="cutterno" property="cutterno" jdbcType="VARCHAR" />
<result column="equipmentid" property="equipmentid" jdbcType="VARCHAR" />
<result column="cutterswitch" property="cutterswitch" jdbcType="VARCHAR" />
<result column="cutteramount" property="cutteramount" jdbcType="VARCHAR" />
<result column="firstpieceno" property="firstpieceno" jdbcType="VARCHAR" />
<result column="firstamount" property="firstamount" jdbcType="VARCHAR" />
<result column="autofreq" property="autofreq" jdbcType="VARCHAR" />
<result column="autoamount" property="autoamount" jdbcType="VARCHAR" />
<result column="pid" property="pid" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, insuser, insdt, cutterno, equipmentid, cutterswitch, cutteramount, firstpieceno,
firstamount, autofreq, autoamount, pid
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_cutter_pointset
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from tb_cutter_pointset
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.material.CutterPointSet" >
insert into tb_cutter_pointset (id, insuser, insdt,
cutterno, equipmentid, cutterswitch,
cutteramount, firstpieceno, firstamount,
autofreq, autoamount, pid
)
values (#{id,jdbcType=VARCHAR}, #{insuser,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP},
#{cutterno,jdbcType=VARCHAR}, #{equipmentid,jdbcType=VARCHAR}, #{cutterswitch,jdbcType=VARCHAR},
#{cutteramount,jdbcType=VARCHAR}, #{firstpieceno,jdbcType=VARCHAR}, #{firstamount,jdbcType=VARCHAR},
#{autofreq,jdbcType=VARCHAR}, #{autoamount,jdbcType=VARCHAR}, #{pid,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.material.CutterPointSet" >
insert into tb_cutter_pointset
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="insuser != null" >
insuser,
</if>
<if test="insdt != null" >
insdt,
</if>
<if test="cutterno != null" >
cutterno,
</if>
<if test="equipmentid != null" >
equipmentid,
</if>
<if test="cutterswitch != null" >
cutterswitch,
</if>
<if test="cutteramount != null" >
cutteramount,
</if>
<if test="firstpieceno != null" >
firstpieceno,
</if>
<if test="firstamount != null" >
firstamount,
</if>
<if test="autofreq != null" >
autofreq,
</if>
<if test="autoamount != null" >
autoamount,
</if>
<if test="pid != null" >
pid,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
#{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
#{insdt,jdbcType=TIMESTAMP},
</if>
<if test="cutterno != null" >
#{cutterno,jdbcType=VARCHAR},
</if>
<if test="equipmentid != null" >
#{equipmentid,jdbcType=VARCHAR},
</if>
<if test="cutterswitch != null" >
#{cutterswitch,jdbcType=VARCHAR},
</if>
<if test="cutteramount != null" >
#{cutteramount,jdbcType=VARCHAR},
</if>
<if test="firstpieceno != null" >
#{firstpieceno,jdbcType=VARCHAR},
</if>
<if test="firstamount != null" >
#{firstamount,jdbcType=VARCHAR},
</if>
<if test="autofreq != null" >
#{autofreq,jdbcType=VARCHAR},
</if>
<if test="autoamount != null" >
#{autoamount,jdbcType=VARCHAR},
</if>
<if test="pid != null" >
#{pid,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.material.CutterPointSet" >
update tb_cutter_pointset
<set >
<if test="insuser != null" >
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
insdt = #{insdt,jdbcType=TIMESTAMP},
</if>
<if test="cutterno != null" >
cutterno = #{cutterno,jdbcType=VARCHAR},
</if>
<if test="equipmentid != null" >
equipmentid = #{equipmentid,jdbcType=VARCHAR},
</if>
<if test="cutterswitch != null" >
cutterswitch = #{cutterswitch,jdbcType=VARCHAR},
</if>
<if test="cutteramount != null" >
cutteramount = #{cutteramount,jdbcType=VARCHAR},
</if>
<if test="firstpieceno != null" >
firstpieceno = #{firstpieceno,jdbcType=VARCHAR},
</if>
<if test="firstamount != null" >
firstamount = #{firstamount,jdbcType=VARCHAR},
</if>
<if test="autofreq != null" >
autofreq = #{autofreq,jdbcType=VARCHAR},
</if>
<if test="autoamount != null" >
autoamount = #{autoamount,jdbcType=VARCHAR},
</if>
<if test="pid != null" >
pid = #{pid,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.material.CutterPointSet" >
update tb_cutter_pointset
set insuser = #{insuser,jdbcType=VARCHAR},
insdt = #{insdt,jdbcType=TIMESTAMP},
cutterno = #{cutterno,jdbcType=VARCHAR},
equipmentid = #{equipmentid,jdbcType=VARCHAR},
cutterswitch = #{cutterswitch,jdbcType=VARCHAR},
cutteramount = #{cutteramount,jdbcType=VARCHAR},
firstpieceno = #{firstpieceno,jdbcType=VARCHAR},
firstamount = #{firstamount,jdbcType=VARCHAR},
autofreq = #{autofreq,jdbcType=VARCHAR},
autoamount = #{autoamount,jdbcType=VARCHAR},
pid = #{pid,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectListByWhere" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_cutter_pointset
${where}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String">
delete from tb_cutter_pointset
${where}
</delete>
</mapper>

View File

@ -0,0 +1,157 @@
<?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="material.CutterPositionMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.material.CutterPosition" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="parentid" property="parentid" jdbcType="VARCHAR" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="VARCHAR" />
<result column="remark" property="remark" jdbcType="VARCHAR" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
<result column="modify" property="modify" jdbcType="VARCHAR" />
<result column="modifydt" property="modifydt" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Base_Column_List" >
id, parentid, name, status, remark, insuser, insdt, modify, modifydt
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_cutter_position
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from tb_cutter_position
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.material.CutterPosition" >
insert into tb_cutter_position (id, parentid, name,
status, remark, insuser,
insdt, modify, modifydt
)
values (#{id,jdbcType=VARCHAR}, #{parentid,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{status,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{insuser,jdbcType=VARCHAR},
#{insdt,jdbcType=TIMESTAMP}, #{modify,jdbcType=VARCHAR}, #{modifydt,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.material.CutterPosition" >
insert into tb_cutter_position
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="parentid != null" >
parentid,
</if>
<if test="name != null" >
name,
</if>
<if test="status != null" >
status,
</if>
<if test="remark != null" >
remark,
</if>
<if test="insuser != null" >
insuser,
</if>
<if test="insdt != null" >
insdt,
</if>
<if test="modify != null" >
modify,
</if>
<if test="modifydt != null" >
modifydt,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="parentid != null" >
#{parentid,jdbcType=VARCHAR},
</if>
<if test="name != null" >
#{name,jdbcType=VARCHAR},
</if>
<if test="status != null" >
#{status,jdbcType=VARCHAR},
</if>
<if test="remark != null" >
#{remark,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
#{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
#{insdt,jdbcType=TIMESTAMP},
</if>
<if test="modify != null" >
#{modify,jdbcType=VARCHAR},
</if>
<if test="modifydt != null" >
#{modifydt,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.material.CutterPosition" >
update tb_cutter_position
<set >
<if test="parentid != null" >
parentid = #{parentid,jdbcType=VARCHAR},
</if>
<if test="name != null" >
name = #{name,jdbcType=VARCHAR},
</if>
<if test="status != null" >
status = #{status,jdbcType=VARCHAR},
</if>
<if test="remark != null" >
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
insdt = #{insdt,jdbcType=TIMESTAMP},
</if>
<if test="modify != null" >
modify = #{modify,jdbcType=VARCHAR},
</if>
<if test="modifydt != null" >
modifydt = #{modifydt,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.material.CutterPosition" >
update tb_cutter_position
set parentid = #{parentid,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
status = #{status,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
insuser = #{insuser,jdbcType=VARCHAR},
insdt = #{insdt,jdbcType=TIMESTAMP},
modify = #{modify,jdbcType=VARCHAR},
modifydt = #{modifydt,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectListByWhere" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_cutter_position
${where}
</select>
<select id="getListByName" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_cutter_position
where name = #{name,jdbcType=VARCHAR}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String" >
delete from tb_cutter_position
${where}
</delete>
</mapper>

View File

@ -0,0 +1,154 @@
<?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="material.CutterStandardMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.material.CutterStandard" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
<result column="stcutteramountvalue" property="stcutteramountvalue" jdbcType="VARCHAR" />
<result column="stfirstpiecenovalue" property="stfirstpiecenovalue" jdbcType="VARCHAR" />
<result column="stfirstamountvalue" property="stfirstamountvalue" jdbcType="VARCHAR" />
<result column="stautofreqvalue" property="stautofreqvalue" jdbcType="VARCHAR" />
<result column="stautoamountvalue" property="stautoamountvalue" jdbcType="VARCHAR" />
<result column="pid" property="pid" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, insuser, insdt, stcutteramountvalue, stfirstpiecenovalue, stfirstamountvalue,
stautofreqvalue, stautoamountvalue, pid
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_cutter_cutterstandardvalue
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from tb_cutter_cutterstandardvalue
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.material.CutterStandard" >
insert into tb_cutter_cutterstandardvalue (id, insuser, insdt,
stcutteramountvalue, stfirstpiecenovalue,
stfirstamountvalue, stautofreqvalue, stautoamountvalue,
pid)
values (#{id,jdbcType=VARCHAR}, #{insuser,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP},
#{stcutteramountvalue,jdbcType=VARCHAR}, #{stfirstpiecenovalue,jdbcType=VARCHAR},
#{stfirstamountvalue,jdbcType=VARCHAR}, #{stautofreqvalue,jdbcType=VARCHAR}, #{stautoamountvalue,jdbcType=VARCHAR},
#{pid,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.material.CutterStandard" >
insert into tb_cutter_cutterstandardvalue
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="insuser != null" >
insuser,
</if>
<if test="insdt != null" >
insdt,
</if>
<if test="stcutteramountvalue != null" >
stcutteramountvalue,
</if>
<if test="stfirstpiecenovalue != null" >
stfirstpiecenovalue,
</if>
<if test="stfirstamountvalue != null" >
stfirstamountvalue,
</if>
<if test="stautofreqvalue != null" >
stautofreqvalue,
</if>
<if test="stautoamountvalue != null" >
stautoamountvalue,
</if>
<if test="pid != null" >
pid,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
#{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
#{insdt,jdbcType=TIMESTAMP},
</if>
<if test="stcutteramountvalue != null" >
#{stcutteramountvalue,jdbcType=VARCHAR},
</if>
<if test="stfirstpiecenovalue != null" >
#{stfirstpiecenovalue,jdbcType=VARCHAR},
</if>
<if test="stfirstamountvalue != null" >
#{stfirstamountvalue,jdbcType=VARCHAR},
</if>
<if test="stautofreqvalue != null" >
#{stautofreqvalue,jdbcType=VARCHAR},
</if>
<if test="stautoamountvalue != null" >
#{stautoamountvalue,jdbcType=VARCHAR},
</if>
<if test="pid != null" >
#{pid,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.material.CutterStandard" >
update tb_cutter_cutterstandardvalue
<set >
<if test="insuser != null" >
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
insdt = #{insdt,jdbcType=TIMESTAMP},
</if>
<if test="stcutteramountvalue != null" >
stcutteramountvalue = #{stcutteramountvalue,jdbcType=VARCHAR},
</if>
<if test="stfirstpiecenovalue != null" >
stfirstpiecenovalue = #{stfirstpiecenovalue,jdbcType=VARCHAR},
</if>
<if test="stfirstamountvalue != null" >
stfirstamountvalue = #{stfirstamountvalue,jdbcType=VARCHAR},
</if>
<if test="stautofreqvalue != null" >
stautofreqvalue = #{stautofreqvalue,jdbcType=VARCHAR},
</if>
<if test="stautoamountvalue != null" >
stautoamountvalue = #{stautoamountvalue,jdbcType=VARCHAR},
</if>
<if test="pid != null" >
pid = #{pid,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.material.CutterStandard" >
update tb_cutter_cutterstandardvalue
set insuser = #{insuser,jdbcType=VARCHAR},
insdt = #{insdt,jdbcType=TIMESTAMP},
stcutteramountvalue = #{stcutteramountvalue,jdbcType=VARCHAR},
stfirstpiecenovalue = #{stfirstpiecenovalue,jdbcType=VARCHAR},
stfirstamountvalue = #{stfirstamountvalue,jdbcType=VARCHAR},
stautofreqvalue = #{stautofreqvalue,jdbcType=VARCHAR},
stautoamountvalue = #{stautoamountvalue,jdbcType=VARCHAR},
pid = #{pid,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectListByWhere" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_cutter_cutterstandardvalue
${where}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String">
delete from tb_cutter_cutterstandardvalue
${where}
</delete>
</mapper>

View File

@ -0,0 +1,157 @@
<?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="material.CutterTypeMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.material.CutterType" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="parentid" property="parentid" jdbcType="VARCHAR" />
<result column="typename" property="typename" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="VARCHAR" />
<result column="remark" property="remark" jdbcType="VARCHAR" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
<result column="modify" property="modify" jdbcType="VARCHAR" />
<result column="modifydt" property="modifydt" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Base_Column_List" >
id, parentid, typename, status, remark, insuser, insdt, modify, modifydt
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_cutter_type
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from tb_cutter_type
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.material.CutterType" >
insert into tb_cutter_type (id, parentid, typename,
status, remark, insuser,
insdt, modify, modifydt
)
values (#{id,jdbcType=VARCHAR}, #{parentid,jdbcType=VARCHAR}, #{typename,jdbcType=VARCHAR},
#{status,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{insuser,jdbcType=VARCHAR},
#{insdt,jdbcType=TIMESTAMP}, #{modify,jdbcType=VARCHAR}, #{modifydt,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.material.CutterType" >
insert into tb_cutter_type
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="parentid != null" >
parentid,
</if>
<if test="typename != null" >
typename,
</if>
<if test="status != null" >
status,
</if>
<if test="remark != null" >
remark,
</if>
<if test="insuser != null" >
insuser,
</if>
<if test="insdt != null" >
insdt,
</if>
<if test="modify != null" >
modify,
</if>
<if test="modifydt != null" >
modifydt,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="parentid != null" >
#{parentid,jdbcType=VARCHAR},
</if>
<if test="typename != null" >
#{typename,jdbcType=VARCHAR},
</if>
<if test="status != null" >
#{status,jdbcType=VARCHAR},
</if>
<if test="remark != null" >
#{remark,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
#{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
#{insdt,jdbcType=TIMESTAMP},
</if>
<if test="modify != null" >
#{modify,jdbcType=VARCHAR},
</if>
<if test="modifydt != null" >
#{modifydt,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.material.CutterType" >
update tb_cutter_type
<set >
<if test="parentid != null" >
parentid = #{parentid,jdbcType=VARCHAR},
</if>
<if test="typename != null" >
typename = #{typename,jdbcType=VARCHAR},
</if>
<if test="status != null" >
status = #{status,jdbcType=VARCHAR},
</if>
<if test="remark != null" >
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
insdt = #{insdt,jdbcType=TIMESTAMP},
</if>
<if test="modify != null" >
modify = #{modify,jdbcType=VARCHAR},
</if>
<if test="modifydt != null" >
modifydt = #{modifydt,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.material.CutterType" >
update tb_cutter_type
set parentid = #{parentid,jdbcType=VARCHAR},
typename = #{typename,jdbcType=VARCHAR},
status = #{status,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
insuser = #{insuser,jdbcType=VARCHAR},
insdt = #{insdt,jdbcType=TIMESTAMP},
modify = #{modify,jdbcType=VARCHAR},
modifydt = #{modifydt,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectListByWhere" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_cutter_type
${where}
</select>
<select id="getListByTypename" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_cutter_type
where typename = #{typename,jdbcType=VARCHAR}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String" >
delete from tb_cutter_type
${where}
</delete>
</mapper>

View File

@ -0,0 +1,218 @@
<?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="material.inkalertMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.material.Inkalert" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="equipmentCardID" property="equipmentcardid" jdbcType="VARCHAR" />
<result column="inkbatchNo" property="inkbatchno" jdbcType="VARCHAR" />
<result column="boardbatchNo" property="boardbatchno" jdbcType="VARCHAR" />
<result column="handletime" property="handletime" jdbcType="TIMESTAMP" />
<result column="handleuesr" property="handleuesr" jdbcType="VARCHAR" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
<result column="lastinkbatchNo" property="lastinkbatchno" jdbcType="VARCHAR" />
<result column="lastboardbatchNo" property="lastboardbatchno" jdbcType="VARCHAR" />
<result column="lasthandletime" property="lasthandletime" jdbcType="TIMESTAMP" />
<result column="no" property="no" jdbcType="VARCHAR" />
<result column="equipmentname" property="equipmentname" jdbcType="VARCHAR" />
<result column="starttime" property="starttime" jdbcType="TIMESTAMP" />
<result column="parameter1" property="parameter1" jdbcType="TIMESTAMP" /><!-- 机台油墨提醒时间间隔 -->
<result column="parameter2" property="parameter2" jdbcType="TIMESTAMP" /><!-- 机台网板提醒时间间隔 -->
</resultMap>
<sql id="Base_Column_List" >
id, equipmentCardID, inkbatchNo, boardbatchNo, handletime, handleuesr, insuser, insdt,
lastinkbatchNo, lastboardbatchNo, lasthandletime
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_material_inkalert
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from tb_material_inkalert
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.material.Inkalert" >
insert into tb_material_inkalert (id, equipmentCardID, inkbatchNo,
boardbatchNo, handletime, handleuesr,
insuser, insdt, lastinkbatchNo,
lastboardbatchNo, lasthandletime)
values (#{id,jdbcType=VARCHAR}, #{equipmentcardid,jdbcType=VARCHAR}, #{inkbatchno,jdbcType=VARCHAR},
#{boardbatchno,jdbcType=VARCHAR}, #{handletime,jdbcType=TIMESTAMP}, #{handleuesr,jdbcType=VARCHAR},
#{insuser,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP}, #{lastinkbatchno,jdbcType=VARCHAR},
#{lastboardbatchno,jdbcType=VARCHAR}, #{lasthandletime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.material.Inkalert" >
insert into tb_material_inkalert
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="equipmentcardid != null" >
equipmentCardID,
</if>
<if test="inkbatchno != null" >
inkbatchNo,
</if>
<if test="boardbatchno != null" >
boardbatchNo,
</if>
<if test="handletime != null" >
handletime,
</if>
<if test="handleuesr != null" >
handleuesr,
</if>
<if test="insuser != null" >
insuser,
</if>
<if test="insdt != null" >
insdt,
</if>
<if test="lastinkbatchno != null" >
lastinkbatchNo,
</if>
<if test="lastboardbatchno != null" >
lastboardbatchNo,
</if>
<if test="lasthandletime != null" >
lasthandletime,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="equipmentcardid != null" >
#{equipmentcardid,jdbcType=VARCHAR},
</if>
<if test="inkbatchno != null" >
#{inkbatchno,jdbcType=VARCHAR},
</if>
<if test="boardbatchno != null" >
#{boardbatchno,jdbcType=VARCHAR},
</if>
<if test="handletime != null" >
#{handletime,jdbcType=TIMESTAMP},
</if>
<if test="handleuesr != null" >
#{handleuesr,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
#{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
#{insdt,jdbcType=TIMESTAMP},
</if>
<if test="lastinkbatchno != null" >
#{lastinkbatchno,jdbcType=VARCHAR},
</if>
<if test="lastboardbatchno != null" >
#{lastboardbatchno,jdbcType=VARCHAR},
</if>
<if test="lasthandletime != null" >
#{lasthandletime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.material.Inkalert" >
update tb_material_inkalert
<set >
<if test="equipmentcardid != null" >
equipmentCardID = #{equipmentcardid,jdbcType=VARCHAR},
</if>
<if test="inkbatchno != null" >
inkbatchNo = #{inkbatchno,jdbcType=VARCHAR},
</if>
<if test="boardbatchno != null" >
boardbatchNo = #{boardbatchno,jdbcType=VARCHAR},
</if>
<if test="handletime != null" >
handletime = #{handletime,jdbcType=TIMESTAMP},
</if>
<if test="handleuesr != null" >
handleuesr = #{handleuesr,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
insdt = #{insdt,jdbcType=TIMESTAMP},
</if>
<if test="lastinkbatchno != null" >
lastinkbatchNo = #{lastinkbatchno,jdbcType=VARCHAR},
</if>
<if test="lastboardbatchno != null" >
lastboardbatchNo = #{lastboardbatchno,jdbcType=VARCHAR},
</if>
<if test="lasthandletime != null" >
lasthandletime = #{lasthandletime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.material.Inkalert" >
update tb_material_inkalert
set equipmentCardID = #{equipmentcardid,jdbcType=VARCHAR},
inkbatchNo = #{inkbatchno,jdbcType=VARCHAR},
boardbatchNo = #{boardbatchno,jdbcType=VARCHAR},
handletime = #{handletime,jdbcType=TIMESTAMP},
handleuesr = #{handleuesr,jdbcType=VARCHAR},
insuser = #{insuser,jdbcType=VARCHAR},
insdt = #{insdt,jdbcType=TIMESTAMP},
lastinkbatchNo = #{lastinkbatchno,jdbcType=VARCHAR},
lastboardbatchNo = #{lastboardbatchno,jdbcType=VARCHAR},
lasthandletime = #{lasthandletime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectListByWhere" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_material_inkalert
${where}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String" >
delete from tb_material_inkalert
${where}
</delete>
<select id="selectInkByMachine" resultMap="BaseResultMap" parameterType="java.lang.String" >
select card.id AS equipmentCardID,
inkb.No as no,inkb.id AS lastinkbatchNo,
inkb.starttime,ink.parameter1,
card.equipmentName
from tb_material_inkinfo ink
left join TB_EM_EquipmentCard card on card.id=ink.equipmentCardID
left join tb_material_inkbatchmachine inkm on card.id=inkm.equipmentCardID
left join tb_material_inkbatch inkb on inkb.id= inkm.No
${where}
</select>
<select id="selectBoardByMachine" resultMap="BaseResultMap" parameterType="java.lang.String" >
select C.id AS equipmentCardID,
B.No as no,B.id AS lastboardbatchNo,
B.starttime,I.parameter2 as parameter2,
C.equipmentName
from tb_material_inkinfo I
left join TB_EM_EquipmentCard C on C.id=I.equipmentCardID
left join tb_material_boardbatchmachine M on C.id=M.equipmentCardID
left join tb_material_boardbatch B on B.id= M.No
${where}
</select>
<select id="getListByAlert" resultMap="BaseResultMap" parameterType="java.lang.String" >
select I.No AS inkbatchno,
E.equipmentcardid,
E.equipmentName,
A.handletime,A.handleuesr,B.no AS boardbatchno,
A.id AS id
from tb_material_inkalert A
left join TB_EM_EquipmentCard E on E.id=A.equipmentCardID
left join tb_material_inkbatch I on I.id= A.inkbatchNo
left join tb_material_boardbatch B on B.id= A.boardbatchNo
${where}
</select>
</mapper>

View File

@ -0,0 +1,248 @@
<?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="material.inkbatchMapper">
<resultMap id="BaseResultMap" type="com.sipai.entity.material.Inkbatch">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="No" jdbcType="VARCHAR" property="no" />
<result column="status" jdbcType="VARCHAR" property="status" />
<result column="starttime" jdbcType="TIMESTAMP" property="starttime" />
<result column="endtime" jdbcType="TIMESTAMP" property="endtime" />
<result column="insuser" jdbcType="VARCHAR" property="insuser" />
<result column="insdt" jdbcType="TIMESTAMP" property="insdt" />
<result column="alterdt" jdbcType="TIMESTAMP" property="alterdt" />
<result column="alteruser" jdbcType="VARCHAR" property="alteruser" />
<result column="alterstatus" jdbcType="VARCHAR" property="alterstatus" />
<result column="processrealid" jdbcType="VARCHAR" property="processrealid" />
</resultMap>
<sql id="Base_Column_List">
id, type, name, No, status, starttime, endtime, insuser, insdt, alterdt, alteruser,
alterstatus, processrealid
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_material_inkbatch
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from tb_material_inkbatch
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.material.Inkbatch">
insert into tb_material_inkbatch (id, type, name,
No, status, starttime,
endtime, insuser, insdt,
alterdt, alteruser, alterstatus,
processrealid)
values (#{id,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{no,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{starttime,jdbcType=TIMESTAMP},
#{endtime,jdbcType=TIMESTAMP}, #{insuser,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP},
#{alterdt,jdbcType=TIMESTAMP}, #{alteruser,jdbcType=VARCHAR}, #{alterstatus,jdbcType=VARCHAR},
#{processrealid,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.material.Inkbatch">
insert into tb_material_inkbatch
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="type != null">
type,
</if>
<if test="name != null">
name,
</if>
<if test="no != null">
No,
</if>
<if test="status != null">
status,
</if>
<if test="starttime != null">
starttime,
</if>
<if test="endtime != null">
endtime,
</if>
<if test="insuser != null">
insuser,
</if>
<if test="insdt != null">
insdt,
</if>
<if test="alterdt != null">
alterdt,
</if>
<if test="alteruser != null">
alteruser,
</if>
<if test="alterstatus != null">
alterstatus,
</if>
<if test="processrealid != null">
processrealid,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="no != null">
#{no,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=VARCHAR},
</if>
<if test="starttime != null">
#{starttime,jdbcType=TIMESTAMP},
</if>
<if test="endtime != null">
#{endtime,jdbcType=TIMESTAMP},
</if>
<if test="insuser != null">
#{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null">
#{insdt,jdbcType=TIMESTAMP},
</if>
<if test="alterdt != null">
#{alterdt,jdbcType=TIMESTAMP},
</if>
<if test="alteruser != null">
#{alteruser,jdbcType=VARCHAR},
</if>
<if test="alterstatus != null">
#{alterstatus,jdbcType=VARCHAR},
</if>
<if test="processrealid != null">
#{processrealid,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.material.Inkbatch">
update tb_material_inkbatch
<set>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="no != null">
No = #{no,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=VARCHAR},
</if>
<if test="starttime != null">
starttime = #{starttime,jdbcType=TIMESTAMP},
</if>
<if test="endtime != null">
endtime = #{endtime,jdbcType=TIMESTAMP},
</if>
<if test="insuser != null">
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null">
insdt = #{insdt,jdbcType=TIMESTAMP},
</if>
<if test="alterdt != null">
alterdt = #{alterdt,jdbcType=TIMESTAMP},
</if>
<if test="alteruser != null">
alteruser = #{alteruser,jdbcType=VARCHAR},
</if>
<if test="alterstatus != null">
alterstatus = #{alterstatus,jdbcType=VARCHAR},
</if>
<if test="processrealid != null">
processrealid = #{processrealid,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.material.Inkbatch">
update tb_material_inkbatch
set type = #{type,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
No = #{no,jdbcType=VARCHAR},
status = #{status,jdbcType=VARCHAR},
starttime = #{starttime,jdbcType=TIMESTAMP},
endtime = #{endtime,jdbcType=TIMESTAMP},
insuser = #{insuser,jdbcType=VARCHAR},
insdt = #{insdt,jdbcType=TIMESTAMP},
alterdt = #{alterdt,jdbcType=TIMESTAMP},
alteruser = #{alteruser,jdbcType=VARCHAR},
alterstatus = #{alterstatus,jdbcType=VARCHAR},
processrealid = #{processrealid,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectListByWhere" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_material_inkbatch
${where}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String">
delete from tb_material_inkbatch
${where}
</delete>
<select id="getListByNo" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_material_inkbatch
where No = #{no,jdbcType=VARCHAR}
</select>
<select id="getListByName" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_material_inkbatch
where name = #{name,jdbcType=VARCHAR}
</select>
<resultMap id="BaseResultMap1" type="com.sipai.entity.material.Inkbatch">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="No" jdbcType="VARCHAR" property="no" />
<result column="status" jdbcType="VARCHAR" property="status" />
<result column="starttime" jdbcType="TIMESTAMP" property="starttime" />
<result column="endtime" jdbcType="TIMESTAMP" property="endtime" />
<result column="insuser" jdbcType="VARCHAR" property="insuser" />
<result column="insdt" jdbcType="TIMESTAMP" property="insdt" />
<result column="alterdt" jdbcType="TIMESTAMP" property="alterdt" />
<result column="alteruser" jdbcType="VARCHAR" property="alteruser" />
<result column="equipmentName" jdbcType="VARCHAR" property="equipmentName" />
<result column="equipmentcardid" jdbcType="VARCHAR" property="equipmentcardid" />
<result column="processrealid" jdbcType="VARCHAR" property="processrealid" />
</resultMap>
<sql id="Base_Column_List1">
id, type, name, No, status, starttime, endtime, insuser, insdt, alterdt, alteruser,
alterstatus, processrealid,equipmentcardid,equipmentName
</sql>
<select id="getListByEquipmentName" parameterType="com.sipai.entity.material.Inkbatch" resultMap="BaseResultMap1">
select p.id,p.type,p.name,p.status,p.starttime,p.endtime,p.alteruser,p.alterdt,p.No,p.processrealid,t.equipmentName,t.equipmentcardid
from (select M.equipmentcardid AS equid,M.status AS machinestatus,I.type AS type,I.name,I.status,I.starttime,I.No,I.id,
I.endtime,I.alteruser,I.alterdt,I.processrealid
from tb_material_inkbatch I ,tb_material_inkbatchmachine M
where M.No = I.id) p
left outer join TB_EM_EquipmentCard t on p.equid = t.id
${where}
</select>
<select id="getListByInkno" resultMap="BaseResultMap1" parameterType="java.lang.String" >
select
<include refid="Base_Column_List1" />
from tb_material_inkbatch
where No = #{No,jdbcType=VARCHAR}
</select>
</mapper>

View File

@ -0,0 +1,135 @@
<?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="material.InkbatchmachineMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.material.Inkbatchmachine" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
<result column="No" property="no" jdbcType="VARCHAR" />
<result column="equipmentCardID" property="equipmentcardid" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, insuser, insdt, No, equipmentCardID, status
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_material_inkbatchmachine
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from tb_material_inkbatchmachine
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.material.Inkbatchmachine" >
insert into tb_material_inkbatchmachine (id, insuser, insdt,
No, equipmentCardID, status
)
values (#{id,jdbcType=VARCHAR}, #{insuser,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP},
#{no,jdbcType=VARCHAR}, #{equipmentcardid,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.material.Inkbatchmachine" >
insert into tb_material_inkbatchmachine
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="insuser != null" >
insuser,
</if>
<if test="insdt != null" >
insdt,
</if>
<if test="no != null" >
No,
</if>
<if test="equipmentcardid != null" >
equipmentCardID,
</if>
<if test="status != null" >
status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
#{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
#{insdt,jdbcType=TIMESTAMP},
</if>
<if test="no != null" >
#{no,jdbcType=VARCHAR},
</if>
<if test="equipmentcardid != null" >
#{equipmentcardid,jdbcType=VARCHAR},
</if>
<if test="status != null" >
#{status,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.material.Inkbatchmachine" >
update tb_material_inkbatchmachine
<set >
<if test="insuser != null" >
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
insdt = #{insdt,jdbcType=TIMESTAMP},
</if>
<if test="no != null" >
No = #{no,jdbcType=VARCHAR},
</if>
<if test="equipmentcardid != null" >
equipmentCardID = #{equipmentcardid,jdbcType=VARCHAR},
</if>
<if test="status != null" >
status = #{status,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.material.Inkbatchmachine" >
update tb_material_inkbatchmachine
set insuser = #{insuser,jdbcType=VARCHAR},
insdt = #{insdt,jdbcType=TIMESTAMP},
No = #{no,jdbcType=VARCHAR},
equipmentCardID = #{equipmentcardid,jdbcType=VARCHAR},
status = #{status,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectListByWhere" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_material_inkbatchmachine
${where}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String" >
delete from tb_material_inkbatchmachine
${where}
</delete>
<resultMap id="BaseResultMap1" type="com.sipai.entity.equipment.EquipmentCard" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="ibmstatus" property="ibmstatus" jdbcType="VARCHAR" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="VARCHAR" />
<result column="equipmentCardID" property="equipmentcardid" jdbcType="VARCHAR" />
<result column="equipmentClassID" property="equipmentclassid" jdbcType="VARCHAR" />
<result column="equipmentModel" property="equipmentmodel" jdbcType="VARCHAR" />
<result column="areaID" property="areaid" jdbcType="VARCHAR" />
<result column="equipmentName" property="equipmentname" jdbcType="CLOB" />
</resultMap>
<select id="getEquipmentCard" resultMap="BaseResultMap1" parameterType="java.lang.String">
select E.*,
M.status AS ibmstatus
from tb_material_inkbatchmachine M
left join TB_EM_EquipmentCard E on E.id=M.equipmentCardID
${where}
</select>
</mapper>

View File

@ -0,0 +1,259 @@
<?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="material.InkinfoMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.material.Inkinfo" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="operator" property="operator" jdbcType="VARCHAR" />
<result column="time" property="time" jdbcType="TIMESTAMP" />
<result column="parameter1" property="parameter1" jdbcType="VARCHAR" />
<result column="parameter2" property="parameter2" jdbcType="VARCHAR" />
<result column="parameter3" property="parameter3" jdbcType="VARCHAR" />
<result column="parameter4" property="parameter4" jdbcType="VARCHAR" />
<result column="parameter5" property="parameter5" jdbcType="VARCHAR" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
<result column="equipmentCardID" property="equipmentcardid" jdbcType="VARCHAR" />
<result column="equipmentName" property="equipmentname" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id,operator, time, parameter1, parameter2, parameter3, parameter4, parameter5,
insuser, insdt, equipmentCardID
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_material_inkinfo
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from tb_material_inkinfo
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.material.Inkinfo" >
insert into tb_material_inkinfo (id, operator,
time, parameter1, parameter2,
parameter3, parameter4, parameter5,
insuser, insdt, equipmentCardID
)
values (#{id,jdbcType=VARCHAR}, #{operator,jdbcType=VARCHAR},
#{time,jdbcType=TIMESTAMP}, #{parameter1,jdbcType=VARCHAR}, #{parameter2,jdbcType=VARCHAR},
#{parameter3,jdbcType=VARCHAR}, #{parameter4,jdbcType=VARCHAR}, #{parameter5,jdbcType=VARCHAR},
#{insuser,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP}, #{equipmentcardid,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.material.Inkinfo" >
insert into tb_material_inkinfo
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="operator != null" >
operator,
</if>
<if test="time != null" >
time,
</if>
<if test="parameter1 != null" >
parameter1,
</if>
<if test="parameter2 != null" >
parameter2,
</if>
<if test="parameter3 != null" >
parameter3,
</if>
<if test="parameter4 != null" >
parameter4,
</if>
<if test="parameter5 != null" >
parameter5,
</if>
<if test="insuser != null" >
insuser,
</if>
<if test="insdt != null" >
insdt,
</if>
<if test="equipmentcardid != null" >
equipmentCardID,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="operator != null" >
#{operator,jdbcType=VARCHAR},
</if>
<if test="time != null" >
#{time,jdbcType=TIMESTAMP},
</if>
<if test="parameter1 != null" >
#{parameter1,jdbcType=VARCHAR},
</if>
<if test="parameter2 != null" >
#{parameter2,jdbcType=VARCHAR},
</if>
<if test="parameter3 != null" >
#{parameter3,jdbcType=VARCHAR},
</if>
<if test="parameter4 != null" >
#{parameter4,jdbcType=VARCHAR},
</if>
<if test="parameter5 != null" >
#{parameter5,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
#{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
#{insdt,jdbcType=TIMESTAMP},
</if>
<if test="equipmentcardid != null" >
#{equipmentcardid,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.material.Inkinfo" >
update tb_material_inkinfo
<set >
<if test="operator != null" >
operator = #{operator,jdbcType=VARCHAR},
</if>
<if test="time != null" >
time = #{time,jdbcType=TIMESTAMP},
</if>
<if test="parameter1 != null" >
parameter1 = #{parameter1,jdbcType=VARCHAR},
</if>
<if test="parameter2 != null" >
parameter2 = #{parameter2,jdbcType=VARCHAR},
</if>
<if test="parameter3 != null" >
parameter3 = #{parameter3,jdbcType=VARCHAR},
</if>
<if test="parameter4 != null" >
parameter4 = #{parameter4,jdbcType=VARCHAR},
</if>
<if test="parameter5 != null" >
parameter5 = #{parameter5,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
insdt = #{insdt,jdbcType=TIMESTAMP},
</if>
<if test="equipmentcardid != null" >
equipmentCardID = #{equipmentcardid,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.material.Inkinfo" >
update tb_material_inkinfo
set operator = #{operator,jdbcType=VARCHAR},
time = #{time,jdbcType=TIMESTAMP},
parameter1 = #{parameter1,jdbcType=VARCHAR},
parameter2 = #{parameter2,jdbcType=VARCHAR},
parameter3 = #{parameter3,jdbcType=VARCHAR},
parameter4 = #{parameter4,jdbcType=VARCHAR},
parameter5 = #{parameter5,jdbcType=VARCHAR},
insuser = #{insuser,jdbcType=VARCHAR},
insdt = #{insdt,jdbcType=TIMESTAMP},
equipmentCardID = #{equipmentcardid,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectListByWhere" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_material_inkinfo
${where}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String" >
delete from tb_material_inkinfo
${where}
</delete>
<resultMap id="BaseResultMap1" type="com.sipai.entity.material.Inkinfo" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="operator" property="operator" jdbcType="VARCHAR" />
<result column="time" property="time" jdbcType="TIMESTAMP" />
<result column="parameter1" property="parameter1" jdbcType="VARCHAR" />
<result column="parameter2" property="parameter2" jdbcType="VARCHAR" />
<result column="parameter3" property="parameter3" jdbcType="VARCHAR" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
<result column="equipmentCardID" property="equipmentcardid" jdbcType="VARCHAR" />
<result column="equipmentName" property="equipmentname" jdbcType="VARCHAR" />
<result column="equipmentcode" property="equipmentcode" jdbcType="VARCHAR" />
<result column="equipmentClassID" property="equipmentclassid" jdbcType="VARCHAR" />
<result column="equipmentModel" property="equipmentmodel" jdbcType="VARCHAR" />
<result column="areaID" property="areaid" jdbcType="VARCHAR" />
<result column="currentManageFlag" property="currentmanageflag" jdbcType="VARCHAR" />
<result column="remark" property="remark" jdbcType="VARCHAR" />
<result column="equipmentClassName" property="equipmentclassname" jdbcType="VARCHAR" />
<result column="areaName" property="areaname" jdbcType="VARCHAR" />
</resultMap>
<select id="getListByEquipmentcardid" resultMap="BaseResultMap1" parameterType="java.lang.String" >
select I.id AS id,
I.operator AS operator,
I.time AS time,
I.parameter1 AS parameter1,
I.parameter2 AS parameter2,
I.parameter3 AS parameter3,
I.insdt AS I_insdt,
I.insuser AS I_insuser,
E.equipmentCardID AS equipmentcode,
E.id AS equipmentCardID,
E.equipmentName AS equipmentName
from tb_material_inkinfo I
left outer join TB_EM_EquipmentCard E on E.id= I.equipmentCardID
${where}
</select>
<resultMap id="ClassResultMapEquipmentCard" type="com.sipai.entity.equipment.EquipmentCard">
<id property="id" column="e_id" jdbcType="VARCHAR" />
<result column="equipmentCardID" property="equipmentcardid" jdbcType="VARCHAR" />
<result column="equipmentName" property="equipmentname" jdbcType="VARCHAR" />
<result column="equipmentClassID" property="equipmentclassid" jdbcType="VARCHAR" />
<result column="equipmentModel" property="equipmentmodel" jdbcType="VARCHAR" />
<result column="areaID" property="areaid" jdbcType="VARCHAR" />
<result column="currentManageFlag" property="currentmanageflag" jdbcType="VARCHAR" />
<result column="remark" property="remark" jdbcType="VARCHAR" />
<result column="equipmentcode" property="equipmentcode" jdbcType="VARCHAR" />
<association property="equipmentclass" resultMap="equipmentclassResult" />
<association property="geographyarea" resultMap="geographyareaResult" />
</resultMap>
<resultMap id="equipmentclassResult" type="com.sipai.entity.equipment.EquipmentClass">
<id property="id" column="c_id"/>
<result property="name" column="c_name"/>
</resultMap>
<resultMap id="geographyareaResult" type="com.sipai.entity.equipment.GeographyArea">
<id property="id" column="g_id"/>
<result property="name" column="g_name"/>
</resultMap>
<select id="getEquipmentcard" resultMap="ClassResultMapEquipmentCard" parameterType="java.lang.String" >
SELECT
E.id as e_id,
E.equipmentCardID,
E.equipmentName,
E.equipmentClassID,
E.equipmentModel,
E.areaID,
E.currentManageFlag,
E.remark,
C.id as c_id,
C.name as c_name,
G.id as g_id,
G.name as g_name
FROM tb_material_inkinfo I
LEFT OUTER JOIN TB_EM_EquipmentCard E ON E.id = I.equipmentCardID
LEFT OUTER JOIN TB_EM_EquipmentClass C ON C.id = E.equipmentClassID
LEFT OUTER JOIN TB_EM_GeographyArea G ON G.id = E.areaID
${where}
</select>
</mapper>

View File

@ -0,0 +1,174 @@
<?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="material.MaterialApplicationMapper">
<resultMap id="BaseResultMap" type="com.sipai.entity.material.MaterialApplication">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="insuser" jdbcType="VARCHAR" property="insuser" />
<result column="insdt" jdbcType="TIMESTAMP" property="insdt" />
<result column="workorderid" jdbcType="VARCHAR" property="workorderid" />
<result column="materialcode" jdbcType="VARCHAR" property="materialcode" />
<result column="materialname" jdbcType="VARCHAR" property="materialname" />
<result column="currentInventory" jdbcType="VARCHAR" property="currentinventory" />
<result column="materialRequest" jdbcType="VARCHAR" property="materialrequest" />
<result column="supplyMaterial" jdbcType="VARCHAR" property="supplymaterial" />
<result column="status" jdbcType="VARCHAR" property="status" />
<result column="taskorderid" jdbcType="VARCHAR" property="taskorderid" />
</resultMap>
<sql id="Base_Column_List">
id, insuser, insdt, workorderid, materialcode, materialname, currentInventory, materialRequest,
supplyMaterial, status, taskorderid
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_material_application
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from tb_material_application
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.material.MaterialApplication">
insert into tb_material_application (id, insuser, insdt,
workorderid, materialcode, materialname,
currentInventory, materialRequest, supplyMaterial,
status, taskorderid)
values (#{id,jdbcType=VARCHAR}, #{insuser,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP},
#{workorderid,jdbcType=VARCHAR}, #{materialcode,jdbcType=VARCHAR}, #{materialname,jdbcType=VARCHAR},
#{currentinventory,jdbcType=VARCHAR}, #{materialrequest,jdbcType=VARCHAR}, #{supplymaterial,jdbcType=VARCHAR},
#{status,jdbcType=VARCHAR}, #{taskorderid,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.material.MaterialApplication">
insert into tb_material_application
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="insuser != null">
insuser,
</if>
<if test="insdt != null">
insdt,
</if>
<if test="workorderid != null">
workorderid,
</if>
<if test="materialcode != null">
materialcode,
</if>
<if test="materialname != null">
materialname,
</if>
<if test="currentinventory != null">
currentInventory,
</if>
<if test="materialrequest != null">
materialRequest,
</if>
<if test="supplymaterial != null">
supplyMaterial,
</if>
<if test="status != null">
status,
</if>
<if test="taskorderid != null">
taskorderid,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="insuser != null">
#{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null">
#{insdt,jdbcType=TIMESTAMP},
</if>
<if test="workorderid != null">
#{workorderid,jdbcType=VARCHAR},
</if>
<if test="materialcode != null">
#{materialcode,jdbcType=VARCHAR},
</if>
<if test="materialname != null">
#{materialname,jdbcType=VARCHAR},
</if>
<if test="currentinventory != null">
#{currentinventory,jdbcType=VARCHAR},
</if>
<if test="materialrequest != null">
#{materialrequest,jdbcType=VARCHAR},
</if>
<if test="supplymaterial != null">
#{supplymaterial,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=VARCHAR},
</if>
<if test="taskorderid != null">
#{taskorderid,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.material.MaterialApplication">
update tb_material_application
<set>
<if test="insuser != null">
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null">
insdt = #{insdt,jdbcType=TIMESTAMP},
</if>
<if test="workorderid != null">
workorderid = #{workorderid,jdbcType=VARCHAR},
</if>
<if test="materialcode != null">
materialcode = #{materialcode,jdbcType=VARCHAR},
</if>
<if test="materialname != null">
materialname = #{materialname,jdbcType=VARCHAR},
</if>
<if test="currentinventory != null">
currentInventory = #{currentinventory,jdbcType=VARCHAR},
</if>
<if test="materialrequest != null">
materialRequest = #{materialrequest,jdbcType=VARCHAR},
</if>
<if test="supplymaterial != null">
supplyMaterial = #{supplymaterial,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=VARCHAR},
</if>
<if test="taskorderid != null">
taskorderid = #{taskorderid,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.material.MaterialApplication">
update tb_material_application
set insuser = #{insuser,jdbcType=VARCHAR},
insdt = #{insdt,jdbcType=TIMESTAMP},
workorderid = #{workorderid,jdbcType=VARCHAR},
materialcode = #{materialcode,jdbcType=VARCHAR},
materialname = #{materialname,jdbcType=VARCHAR},
currentInventory = #{currentinventory,jdbcType=VARCHAR},
materialRequest = #{materialrequest,jdbcType=VARCHAR},
supplyMaterial = #{supplymaterial,jdbcType=VARCHAR},
status = #{status,jdbcType=VARCHAR},
taskorderid = #{taskorderid,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectListByWhere" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_material_application
${where}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String">
delete from tb_material_application
${where}
</delete>
</mapper>

View File

@ -0,0 +1,653 @@
<?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="material.MaterialBOMMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.material.MaterialBOM" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="materialcode" property="materialcode" jdbcType="VARCHAR" />
<result column="materialname" property="materialname" jdbcType="VARCHAR" />
<result column="materialmodel" property="materialmodel" jdbcType="VARCHAR" />
<result column="materialproperties" property="materialproperties" jdbcType="VARCHAR" />
<result column="secondaryattribute" property="secondaryattribute" jdbcType="VARCHAR" />
<result column="unit" property="unit" jdbcType="VARCHAR" />
<result column="num" property="num" jdbcType="VARCHAR" />
<result column="yield" property="yield" jdbcType="VARCHAR" />
<result column="state" property="state" jdbcType="VARCHAR" />
<result column="audit" property="audit" jdbcType="VARCHAR" />
<result column="version" property="version" jdbcType="VARCHAR" />
<result column="drawnum" property="drawnum" jdbcType="VARCHAR" />
<result column="processlinecode" property="processlinecode" jdbcType="VARCHAR" />
<result column="processlinename" property="processlinename" jdbcType="VARCHAR" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
<result column="lastinsuser" property="lastinsuser" jdbcType="VARCHAR" />
<result column="lastinsdt" property="lastinsdt" jdbcType="TIMESTAMP" />
<result column="usepeople" property="usepeople" jdbcType="VARCHAR" />
<result column="userdt" property="userdt" jdbcType="TIMESTAMP" />
<result column="remark" property="remark" jdbcType="VARCHAR" />
<result column="jumplayer" property="jumplayer" jdbcType="VARCHAR" />
<result column="levels" property="levels" jdbcType="VARCHAR" />
<result column="unituse" property="unituse" jdbcType="VARCHAR" />
<result column="dosage" property="dosage" jdbcType="VARCHAR" />
<result column="usualuseunit" property="usualuseunit" jdbcType="VARCHAR" />
<result column="plannedpercentage" property="plannedpercentage" jdbcType="VARCHAR" />
<result column="wearrate" property="wearrate" jdbcType="VARCHAR" />
<result column="itemtype" property="itemtype" jdbcType="VARCHAR" />
<result column="operationnumber" property="operationnumber" jdbcType="VARCHAR" />
<result column="process" property="process" jdbcType="VARCHAR" />
<result column="station" property="station" jdbcType="VARCHAR" />
<result column="localnum" property="localnum" jdbcType="VARCHAR" />
<result column="billetsize" property="billetsize" jdbcType="VARCHAR" />
<result column="billetnum" property="billetnum" jdbcType="VARCHAR" />
<result column="warehouse" property="warehouse" jdbcType="VARCHAR" />
<result column="keysymbol" property="keysymbol" jdbcType="VARCHAR" />
<result column="usestate" property="usestate" jdbcType="VARCHAR" />
<result column="ifdown" property="ifdown" jdbcType="VARCHAR" />
<result column="remark1" property="remark1" jdbcType="VARCHAR" />
<result column="remark2" property="remark2" jdbcType="VARCHAR" />
<result column="inventory" property="inventory" jdbcType="VARCHAR" />
<result column="ifpour" property="ifpour" jdbcType="VARCHAR" />
<result column="havereplace" property="havereplace" jdbcType="VARCHAR" />
<result column="faildt" property="faildt" jdbcType="TIMESTAMP" />
<result column="effectdt" property="effectdt" jdbcType="TIMESTAMP" />
<result column="pid" property="pid" jdbcType="VARCHAR" />
<result column="usuallyunit" property="usuallyunit" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, materialcode, materialname, materialmodel, materialproperties, secondaryattribute,
unit, num, yield, state, audit, version, drawnum, processlinecode, processlinename,
insuser, insdt, lastinsuser, lastinsdt, usepeople, userdt, remark, jumplayer, levels,
unituse, dosage, usualuseunit, plannedpercentage, wearrate, itemtype, operationnumber,
process, station, localnum, billetsize, billetnum, warehouse, keysymbol, usestate,
ifdown, remark1, remark2, inventory, ifpour, havereplace, faildt, effectdt, pid, usuallyunit
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_material_allinfo
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from tb_material_allinfo
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.material.MaterialBOM" >
insert into tb_material_allinfo (id, materialcode, materialname,
materialmodel, materialproperties, secondaryattribute,
unit, num, yield, state,
audit, version, drawnum,
processlinecode, processlinename, insuser,
insdt, lastinsuser, lastinsdt,
usepeople, userdt, remark,
jumplayer, levels, unituse,
dosage, usualuseunit, plannedpercentage,
wearrate, itemtype, operationnumber,
process, station, localnum,
billetsize, billetnum, warehouse,
keysymbol, usestate, ifdown,
remark1, remark2, inventory,
ifpour, havereplace, faildt,
effectdt, pid, usuallyunit
)
values (#{id,jdbcType=VARCHAR}, #{materialcode,jdbcType=VARCHAR}, #{materialname,jdbcType=VARCHAR},
#{materialmodel,jdbcType=VARCHAR}, #{materialproperties,jdbcType=VARCHAR}, #{secondaryattribute,jdbcType=VARCHAR},
#{unit,jdbcType=VARCHAR}, #{num,jdbcType=VARCHAR}, #{yield,jdbcType=VARCHAR}, #{state,jdbcType=VARCHAR},
#{audit,jdbcType=VARCHAR}, #{version,jdbcType=VARCHAR}, #{drawnum,jdbcType=VARCHAR},
#{processlinecode,jdbcType=VARCHAR}, #{processlinename,jdbcType=VARCHAR}, #{insuser,jdbcType=VARCHAR},
#{insdt,jdbcType=TIMESTAMP}, #{lastinsuser,jdbcType=VARCHAR}, #{lastinsdt,jdbcType=TIMESTAMP},
#{usepeople,jdbcType=VARCHAR}, #{userdt,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR},
#{jumplayer,jdbcType=VARCHAR}, #{levels,jdbcType=VARCHAR}, #{unituse,jdbcType=VARCHAR},
#{dosage,jdbcType=VARCHAR}, #{usualuseunit,jdbcType=VARCHAR}, #{plannedpercentage,jdbcType=VARCHAR},
#{wearrate,jdbcType=VARCHAR}, #{itemtype,jdbcType=VARCHAR}, #{operationnumber,jdbcType=VARCHAR},
#{process,jdbcType=VARCHAR}, #{station,jdbcType=VARCHAR}, #{localnum,jdbcType=VARCHAR},
#{billetsize,jdbcType=VARCHAR}, #{billetnum,jdbcType=VARCHAR}, #{warehouse,jdbcType=VARCHAR},
#{keysymbol,jdbcType=VARCHAR}, #{usestate,jdbcType=VARCHAR}, #{ifdown,jdbcType=VARCHAR},
#{remark1,jdbcType=VARCHAR}, #{remark2,jdbcType=VARCHAR}, #{inventory,jdbcType=VARCHAR},
#{ifpour,jdbcType=VARCHAR}, #{havereplace,jdbcType=VARCHAR}, #{faildt,jdbcType=TIMESTAMP},
#{effectdt,jdbcType=TIMESTAMP}, #{pid,jdbcType=VARCHAR}, #{usuallyunit,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.material.MaterialBOM" >
insert into tb_material_allinfo
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="materialcode != null" >
materialcode,
</if>
<if test="materialname != null" >
materialname,
</if>
<if test="materialmodel != null" >
materialmodel,
</if>
<if test="materialproperties != null" >
materialproperties,
</if>
<if test="secondaryattribute != null" >
secondaryattribute,
</if>
<if test="unit != null" >
unit,
</if>
<if test="num != null" >
num,
</if>
<if test="yield != null" >
yield,
</if>
<if test="state != null" >
state,
</if>
<if test="audit != null" >
audit,
</if>
<if test="version != null" >
version,
</if>
<if test="drawnum != null" >
drawnum,
</if>
<if test="processlinecode != null" >
processlinecode,
</if>
<if test="processlinename != null" >
processlinename,
</if>
<if test="insuser != null" >
insuser,
</if>
<if test="insdt != null" >
insdt,
</if>
<if test="lastinsuser != null" >
lastinsuser,
</if>
<if test="lastinsdt != null" >
lastinsdt,
</if>
<if test="usepeople != null" >
usepeople,
</if>
<if test="userdt != null" >
userdt,
</if>
<if test="remark != null" >
remark,
</if>
<if test="jumplayer != null" >
jumplayer,
</if>
<if test="levels != null" >
levels,
</if>
<if test="unituse != null" >
unituse,
</if>
<if test="dosage != null" >
dosage,
</if>
<if test="usualuseunit != null" >
usualuseunit,
</if>
<if test="plannedpercentage != null" >
plannedpercentage,
</if>
<if test="wearrate != null" >
wearrate,
</if>
<if test="itemtype != null" >
itemtype,
</if>
<if test="operationnumber != null" >
operationnumber,
</if>
<if test="process != null" >
process,
</if>
<if test="station != null" >
station,
</if>
<if test="localnum != null" >
localnum,
</if>
<if test="billetsize != null" >
billetsize,
</if>
<if test="billetnum != null" >
billetnum,
</if>
<if test="warehouse != null" >
warehouse,
</if>
<if test="keysymbol != null" >
keysymbol,
</if>
<if test="usestate != null" >
usestate,
</if>
<if test="ifdown != null" >
ifdown,
</if>
<if test="remark1 != null" >
remark1,
</if>
<if test="remark2 != null" >
remark2,
</if>
<if test="inventory != null" >
inventory,
</if>
<if test="ifpour != null" >
ifpour,
</if>
<if test="havereplace != null" >
havereplace,
</if>
<if test="faildt != null" >
faildt,
</if>
<if test="effectdt != null" >
effectdt,
</if>
<if test="pid != null" >
pid,
</if>
<if test="usuallyunit != null" >
usuallyunit,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="materialcode != null" >
#{materialcode,jdbcType=VARCHAR},
</if>
<if test="materialname != null" >
#{materialname,jdbcType=VARCHAR},
</if>
<if test="materialmodel != null" >
#{materialmodel,jdbcType=VARCHAR},
</if>
<if test="materialproperties != null" >
#{materialproperties,jdbcType=VARCHAR},
</if>
<if test="secondaryattribute != null" >
#{secondaryattribute,jdbcType=VARCHAR},
</if>
<if test="unit != null" >
#{unit,jdbcType=VARCHAR},
</if>
<if test="num != null" >
#{num,jdbcType=VARCHAR},
</if>
<if test="yield != null" >
#{yield,jdbcType=VARCHAR},
</if>
<if test="state != null" >
#{state,jdbcType=VARCHAR},
</if>
<if test="audit != null" >
#{audit,jdbcType=VARCHAR},
</if>
<if test="version != null" >
#{version,jdbcType=VARCHAR},
</if>
<if test="drawnum != null" >
#{drawnum,jdbcType=VARCHAR},
</if>
<if test="processlinecode != null" >
#{processlinecode,jdbcType=VARCHAR},
</if>
<if test="processlinename != null" >
#{processlinename,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
#{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
#{insdt,jdbcType=TIMESTAMP},
</if>
<if test="lastinsuser != null" >
#{lastinsuser,jdbcType=VARCHAR},
</if>
<if test="lastinsdt != null" >
#{lastinsdt,jdbcType=TIMESTAMP},
</if>
<if test="usepeople != null" >
#{usepeople,jdbcType=VARCHAR},
</if>
<if test="userdt != null" >
#{userdt,jdbcType=TIMESTAMP},
</if>
<if test="remark != null" >
#{remark,jdbcType=VARCHAR},
</if>
<if test="jumplayer != null" >
#{jumplayer,jdbcType=VARCHAR},
</if>
<if test="levels != null" >
#{levels,jdbcType=VARCHAR},
</if>
<if test="unituse != null" >
#{unituse,jdbcType=VARCHAR},
</if>
<if test="dosage != null" >
#{dosage,jdbcType=VARCHAR},
</if>
<if test="usualuseunit != null" >
#{usualuseunit,jdbcType=VARCHAR},
</if>
<if test="plannedpercentage != null" >
#{plannedpercentage,jdbcType=VARCHAR},
</if>
<if test="wearrate != null" >
#{wearrate,jdbcType=VARCHAR},
</if>
<if test="itemtype != null" >
#{itemtype,jdbcType=VARCHAR},
</if>
<if test="operationnumber != null" >
#{operationnumber,jdbcType=VARCHAR},
</if>
<if test="process != null" >
#{process,jdbcType=VARCHAR},
</if>
<if test="station != null" >
#{station,jdbcType=VARCHAR},
</if>
<if test="localnum != null" >
#{localnum,jdbcType=VARCHAR},
</if>
<if test="billetsize != null" >
#{billetsize,jdbcType=VARCHAR},
</if>
<if test="billetnum != null" >
#{billetnum,jdbcType=VARCHAR},
</if>
<if test="warehouse != null" >
#{warehouse,jdbcType=VARCHAR},
</if>
<if test="keysymbol != null" >
#{keysymbol,jdbcType=VARCHAR},
</if>
<if test="usestate != null" >
#{usestate,jdbcType=VARCHAR},
</if>
<if test="ifdown != null" >
#{ifdown,jdbcType=VARCHAR},
</if>
<if test="remark1 != null" >
#{remark1,jdbcType=VARCHAR},
</if>
<if test="remark2 != null" >
#{remark2,jdbcType=VARCHAR},
</if>
<if test="inventory != null" >
#{inventory,jdbcType=VARCHAR},
</if>
<if test="ifpour != null" >
#{ifpour,jdbcType=VARCHAR},
</if>
<if test="havereplace != null" >
#{havereplace,jdbcType=VARCHAR},
</if>
<if test="faildt != null" >
#{faildt,jdbcType=TIMESTAMP},
</if>
<if test="effectdt != null" >
#{effectdt,jdbcType=TIMESTAMP},
</if>
<if test="pid != null" >
#{pid,jdbcType=VARCHAR},
</if>
<if test="usuallyunit != null" >
#{usuallyunit,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.material.MaterialBOM" >
update tb_material_allinfo
<set >
<if test="materialcode != null" >
materialcode = #{materialcode,jdbcType=VARCHAR},
</if>
<if test="materialname != null" >
materialname = #{materialname,jdbcType=VARCHAR},
</if>
<if test="materialmodel != null" >
materialmodel = #{materialmodel,jdbcType=VARCHAR},
</if>
<if test="materialproperties != null" >
materialproperties = #{materialproperties,jdbcType=VARCHAR},
</if>
<if test="secondaryattribute != null" >
secondaryattribute = #{secondaryattribute,jdbcType=VARCHAR},
</if>
<if test="unit != null" >
unit = #{unit,jdbcType=VARCHAR},
</if>
<if test="num != null" >
num = #{num,jdbcType=VARCHAR},
</if>
<if test="yield != null" >
yield = #{yield,jdbcType=VARCHAR},
</if>
<if test="state != null" >
state = #{state,jdbcType=VARCHAR},
</if>
<if test="audit != null" >
audit = #{audit,jdbcType=VARCHAR},
</if>
<if test="version != null" >
version = #{version,jdbcType=VARCHAR},
</if>
<if test="drawnum != null" >
drawnum = #{drawnum,jdbcType=VARCHAR},
</if>
<if test="processlinecode != null" >
processlinecode = #{processlinecode,jdbcType=VARCHAR},
</if>
<if test="processlinename != null" >
processlinename = #{processlinename,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
insdt = #{insdt,jdbcType=TIMESTAMP},
</if>
<if test="lastinsuser != null" >
lastinsuser = #{lastinsuser,jdbcType=VARCHAR},
</if>
<if test="lastinsdt != null" >
lastinsdt = #{lastinsdt,jdbcType=TIMESTAMP},
</if>
<if test="usepeople != null" >
usepeople = #{usepeople,jdbcType=VARCHAR},
</if>
<if test="userdt != null" >
userdt = #{userdt,jdbcType=TIMESTAMP},
</if>
<if test="remark != null" >
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="jumplayer != null" >
jumplayer = #{jumplayer,jdbcType=VARCHAR},
</if>
<if test="levels != null" >
levels = #{levels,jdbcType=VARCHAR},
</if>
<if test="unituse != null" >
unituse = #{unituse,jdbcType=VARCHAR},
</if>
<if test="dosage != null" >
dosage = #{dosage,jdbcType=VARCHAR},
</if>
<if test="usualuseunit != null" >
usualuseunit = #{usualuseunit,jdbcType=VARCHAR},
</if>
<if test="plannedpercentage != null" >
plannedpercentage = #{plannedpercentage,jdbcType=VARCHAR},
</if>
<if test="wearrate != null" >
wearrate = #{wearrate,jdbcType=VARCHAR},
</if>
<if test="itemtype != null" >
itemtype = #{itemtype,jdbcType=VARCHAR},
</if>
<if test="operationnumber != null" >
operationnumber = #{operationnumber,jdbcType=VARCHAR},
</if>
<if test="process != null" >
process = #{process,jdbcType=VARCHAR},
</if>
<if test="station != null" >
station = #{station,jdbcType=VARCHAR},
</if>
<if test="localnum != null" >
localnum = #{localnum,jdbcType=VARCHAR},
</if>
<if test="billetsize != null" >
billetsize = #{billetsize,jdbcType=VARCHAR},
</if>
<if test="billetnum != null" >
billetnum = #{billetnum,jdbcType=VARCHAR},
</if>
<if test="warehouse != null" >
warehouse = #{warehouse,jdbcType=VARCHAR},
</if>
<if test="keysymbol != null" >
keysymbol = #{keysymbol,jdbcType=VARCHAR},
</if>
<if test="usestate != null" >
usestate = #{usestate,jdbcType=VARCHAR},
</if>
<if test="ifdown != null" >
ifdown = #{ifdown,jdbcType=VARCHAR},
</if>
<if test="remark1 != null" >
remark1 = #{remark1,jdbcType=VARCHAR},
</if>
<if test="remark2 != null" >
remark2 = #{remark2,jdbcType=VARCHAR},
</if>
<if test="inventory != null" >
inventory = #{inventory,jdbcType=VARCHAR},
</if>
<if test="ifpour != null" >
ifpour = #{ifpour,jdbcType=VARCHAR},
</if>
<if test="havereplace != null" >
havereplace = #{havereplace,jdbcType=VARCHAR},
</if>
<if test="faildt != null" >
faildt = #{faildt,jdbcType=TIMESTAMP},
</if>
<if test="effectdt != null" >
effectdt = #{effectdt,jdbcType=TIMESTAMP},
</if>
<if test="pid != null" >
pid = #{pid,jdbcType=VARCHAR},
</if>
<if test="usuallyunit != null" >
usuallyunit = #{usuallyunit,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.material.MaterialBOM" >
update tb_material_allinfo
set materialcode = #{materialcode,jdbcType=VARCHAR},
materialname = #{materialname,jdbcType=VARCHAR},
materialmodel = #{materialmodel,jdbcType=VARCHAR},
materialproperties = #{materialproperties,jdbcType=VARCHAR},
secondaryattribute = #{secondaryattribute,jdbcType=VARCHAR},
unit = #{unit,jdbcType=VARCHAR},
num = #{num,jdbcType=VARCHAR},
yield = #{yield,jdbcType=VARCHAR},
state = #{state,jdbcType=VARCHAR},
audit = #{audit,jdbcType=VARCHAR},
version = #{version,jdbcType=VARCHAR},
drawnum = #{drawnum,jdbcType=VARCHAR},
processlinecode = #{processlinecode,jdbcType=VARCHAR},
processlinename = #{processlinename,jdbcType=VARCHAR},
insuser = #{insuser,jdbcType=VARCHAR},
insdt = #{insdt,jdbcType=TIMESTAMP},
lastinsuser = #{lastinsuser,jdbcType=VARCHAR},
lastinsdt = #{lastinsdt,jdbcType=TIMESTAMP},
usepeople = #{usepeople,jdbcType=VARCHAR},
userdt = #{userdt,jdbcType=TIMESTAMP},
remark = #{remark,jdbcType=VARCHAR},
jumplayer = #{jumplayer,jdbcType=VARCHAR},
levels = #{levels,jdbcType=VARCHAR},
unituse = #{unituse,jdbcType=VARCHAR},
dosage = #{dosage,jdbcType=VARCHAR},
usualuseunit = #{usualuseunit,jdbcType=VARCHAR},
plannedpercentage = #{plannedpercentage,jdbcType=VARCHAR},
wearrate = #{wearrate,jdbcType=VARCHAR},
itemtype = #{itemtype,jdbcType=VARCHAR},
operationnumber = #{operationnumber,jdbcType=VARCHAR},
process = #{process,jdbcType=VARCHAR},
station = #{station,jdbcType=VARCHAR},
localnum = #{localnum,jdbcType=VARCHAR},
billetsize = #{billetsize,jdbcType=VARCHAR},
billetnum = #{billetnum,jdbcType=VARCHAR},
warehouse = #{warehouse,jdbcType=VARCHAR},
keysymbol = #{keysymbol,jdbcType=VARCHAR},
usestate = #{usestate,jdbcType=VARCHAR},
ifdown = #{ifdown,jdbcType=VARCHAR},
remark1 = #{remark1,jdbcType=VARCHAR},
remark2 = #{remark2,jdbcType=VARCHAR},
inventory = #{inventory,jdbcType=VARCHAR},
ifpour = #{ifpour,jdbcType=VARCHAR},
havereplace = #{havereplace,jdbcType=VARCHAR},
faildt = #{faildt,jdbcType=TIMESTAMP},
effectdt = #{effectdt,jdbcType=TIMESTAMP},
pid = #{pid,jdbcType=VARCHAR},
usuallyunit = #{usuallyunit,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectListByWhere" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_material_allinfo
${where}
</select>
<select id="getListByMaterialCode" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_material_allinfo
where materialcode = #{materialcode,jdbcType=VARCHAR}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String" >
delete from tb_material_allinfo
${where}
</delete>
<select id="getRootByCodeAndVersion" resultMap="BaseResultMap" parameterType="com.sipai.entity.material.MaterialBOM" >
select
<include refid="Base_Column_List" />
from tb_material_allinfo
where pid = #{pid,jdbcType=VARCHAR} and materialcode = #{materialcode,jdbcType=VARCHAR}
</select>
<select id="getRootByMaterialcode" resultMap="BaseResultMap" parameterType="com.sipai.entity.material.MaterialBOM" >
select
<include refid="Base_Column_List" />
from tb_material_allinfo
where materialcode = #{materialcode,jdbcType=VARCHAR} order by materialcode
</select>
<update id="updateByCodeSelective" parameterType="com.sipai.entity.material.MaterialBOM" >
update tb_material_allinfo
<set >
<if test="id != null" >
id = #{id,jdbcType=VARCHAR},
</if>
</set>
where materialcode = #{materialcode,jdbcType=VARCHAR}
</update>
</mapper>

View File

@ -0,0 +1,180 @@
<?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="material.MaterialBoxMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.material.MaterialBox" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="boxnumber" property="boxnumber" jdbcType="VARCHAR" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="workstationid" property="workstationid" jdbcType="VARCHAR" />
<result column="typeid" property="typeid" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="VARCHAR" />
<result column="remark" property="remark" jdbcType="VARCHAR" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
<result column="modify" property="modify" jdbcType="VARCHAR" />
<result column="modifydt" property="modifydt" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Base_Column_List" >
id, boxnumber, name, workstationid, typeid, status, remark, insuser, insdt, modify,
modifydt
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_material_box
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from tb_material_box
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.material.MaterialBox" >
insert into tb_material_box (id, boxnumber, name,
workstationid, typeid, status,
remark, insuser, insdt,
modify, modifydt)
values (#{id,jdbcType=VARCHAR}, #{boxnumber,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{workstationid,jdbcType=VARCHAR}, #{typeid,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR}, #{insuser,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP},
#{modify,jdbcType=VARCHAR}, #{modifydt,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.material.MaterialBox" >
insert into tb_material_box
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="boxnumber != null" >
boxnumber,
</if>
<if test="name != null" >
name,
</if>
<if test="workstationid != null" >
workstationid,
</if>
<if test="typeid != null" >
typeid,
</if>
<if test="status != null" >
status,
</if>
<if test="remark != null" >
remark,
</if>
<if test="insuser != null" >
insuser,
</if>
<if test="insdt != null" >
insdt,
</if>
<if test="modify != null" >
modify,
</if>
<if test="modifydt != null" >
modifydt,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="boxnumber != null" >
#{boxnumber,jdbcType=VARCHAR},
</if>
<if test="name != null" >
#{name,jdbcType=VARCHAR},
</if>
<if test="workstationid != null" >
#{workstationid,jdbcType=VARCHAR},
</if>
<if test="typeid != null" >
#{typeid,jdbcType=VARCHAR},
</if>
<if test="status != null" >
#{status,jdbcType=VARCHAR},
</if>
<if test="remark != null" >
#{remark,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
#{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
#{insdt,jdbcType=TIMESTAMP},
</if>
<if test="modify != null" >
#{modify,jdbcType=VARCHAR},
</if>
<if test="modifydt != null" >
#{modifydt,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.material.MaterialBox" >
update tb_material_box
<set >
<if test="boxnumber != null" >
boxnumber = #{boxnumber,jdbcType=VARCHAR},
</if>
<if test="name != null" >
name = #{name,jdbcType=VARCHAR},
</if>
<if test="workstationid != null" >
workstationid = #{workstationid,jdbcType=VARCHAR},
</if>
<if test="typeid != null" >
typeid = #{typeid,jdbcType=VARCHAR},
</if>
<if test="status != null" >
status = #{status,jdbcType=VARCHAR},
</if>
<if test="remark != null" >
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
insdt = #{insdt,jdbcType=TIMESTAMP},
</if>
<if test="modify != null" >
modify = #{modify,jdbcType=VARCHAR},
</if>
<if test="modifydt != null" >
modifydt = #{modifydt,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.material.MaterialBox" >
update tb_material_box
set boxnumber = #{boxnumber,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
workstationid = #{workstationid,jdbcType=VARCHAR},
typeid = #{typeid,jdbcType=VARCHAR},
status = #{status,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
insuser = #{insuser,jdbcType=VARCHAR},
insdt = #{insdt,jdbcType=TIMESTAMP},
modify = #{modify,jdbcType=VARCHAR},
modifydt = #{modifydt,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectListByWhere" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_material_box
${where}
</select>
<select id="getMaterialBoxByNumber" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_material_box
where boxnumber = #{boxnumber,jdbcType=VARCHAR}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String" >
delete from tb_material_box
${where}
</delete>
</mapper>

View File

@ -0,0 +1,223 @@
<?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="material.MaterialDateScheduleMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.material.MaterialDateSchedule" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="inventoryFrontLine" property="inventoryfrontline" jdbcType="VARCHAR" />
<result column="pickingDay" property="pickingday" jdbcType="VARCHAR" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
<result column="plannedConsumption" property="plannedconsumption" jdbcType="VARCHAR" />
<result column="inventoryCountPostpartum" property="inventorycountpostpartum" jdbcType="VARCHAR" />
<result column="actualConsumptionDay" property="actualconsumptionday" jdbcType="VARCHAR" />
<result column="pid" property="pid" jdbcType="VARCHAR" />
<result column="exceedsPlannedPercentage" property="exceedsplannedpercentage" jdbcType="VARCHAR" />
<result column="remark" property="remark" jdbcType="VARCHAR" />
<result column="materialcode" property="materialcode" jdbcType="VARCHAR" />
<result column="unituse" property="unituse" jdbcType="VARCHAR" />
<result column="theDifferent" property="thedifferent" jdbcType="VARCHAR" />
<result column="bomprojects" property="bomprojects" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, inventoryFrontLine, pickingDay, insuser, insdt, plannedConsumption, inventoryCountPostpartum,
actualConsumptionDay, pid, exceedsPlannedPercentage, remark, materialcode, unituse,
theDifferent, bomprojects
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_material_dateschedule
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from tb_material_dateschedule
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.material.MaterialDateSchedule" >
insert into tb_material_dateschedule (id, inventoryFrontLine, pickingDay,
insuser, insdt, plannedConsumption,
inventoryCountPostpartum, actualConsumptionDay,
pid, exceedsPlannedPercentage, remark,
materialcode, unituse, theDifferent,
bomprojects)
values (#{id,jdbcType=VARCHAR}, #{inventoryfrontline,jdbcType=VARCHAR}, #{pickingday,jdbcType=VARCHAR},
#{insuser,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP}, #{plannedconsumption,jdbcType=VARCHAR},
#{inventorycountpostpartum,jdbcType=VARCHAR}, #{actualconsumptionday,jdbcType=VARCHAR},
#{pid,jdbcType=VARCHAR}, #{exceedsplannedpercentage,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
#{materialcode,jdbcType=VARCHAR}, #{unituse,jdbcType=VARCHAR}, #{thedifferent,jdbcType=VARCHAR},
#{bomprojects,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.material.MaterialDateSchedule" >
insert into tb_material_dateschedule
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="inventoryfrontline != null" >
inventoryFrontLine,
</if>
<if test="pickingday != null" >
pickingDay,
</if>
<if test="insuser != null" >
insuser,
</if>
<if test="insdt != null" >
insdt,
</if>
<if test="plannedconsumption != null" >
plannedConsumption,
</if>
<if test="inventorycountpostpartum != null" >
inventoryCountPostpartum,
</if>
<if test="actualconsumptionday != null" >
actualConsumptionDay,
</if>
<if test="pid != null" >
pid,
</if>
<if test="exceedsplannedpercentage != null" >
exceedsPlannedPercentage,
</if>
<if test="remark != null" >
remark,
</if>
<if test="materialcode != null" >
materialcode,
</if>
<if test="unituse != null" >
unituse,
</if>
<if test="thedifferent != null" >
theDifferent,
</if>
<if test="bomprojects != null" >
bomprojects,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="inventoryfrontline != null" >
#{inventoryfrontline,jdbcType=VARCHAR},
</if>
<if test="pickingday != null" >
#{pickingday,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
#{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
#{insdt,jdbcType=TIMESTAMP},
</if>
<if test="plannedconsumption != null" >
#{plannedconsumption,jdbcType=VARCHAR},
</if>
<if test="inventorycountpostpartum != null" >
#{inventorycountpostpartum,jdbcType=VARCHAR},
</if>
<if test="actualconsumptionday != null" >
#{actualconsumptionday,jdbcType=VARCHAR},
</if>
<if test="pid != null" >
#{pid,jdbcType=VARCHAR},
</if>
<if test="exceedsplannedpercentage != null" >
#{exceedsplannedpercentage,jdbcType=VARCHAR},
</if>
<if test="remark != null" >
#{remark,jdbcType=VARCHAR},
</if>
<if test="materialcode != null" >
#{materialcode,jdbcType=VARCHAR},
</if>
<if test="unituse != null" >
#{unituse,jdbcType=VARCHAR},
</if>
<if test="thedifferent != null" >
#{thedifferent,jdbcType=VARCHAR},
</if>
<if test="bomprojects != null" >
#{bomprojects,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.material.MaterialDateSchedule" >
update tb_material_dateschedule
<set >
<if test="inventoryfrontline != null" >
inventoryFrontLine = #{inventoryfrontline,jdbcType=VARCHAR},
</if>
<if test="pickingday != null" >
pickingDay = #{pickingday,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
insdt = #{insdt,jdbcType=TIMESTAMP},
</if>
<if test="plannedconsumption != null" >
plannedConsumption = #{plannedconsumption,jdbcType=VARCHAR},
</if>
<if test="inventorycountpostpartum != null" >
inventoryCountPostpartum = #{inventorycountpostpartum,jdbcType=VARCHAR},
</if>
<if test="actualconsumptionday != null" >
actualConsumptionDay = #{actualconsumptionday,jdbcType=VARCHAR},
</if>
<if test="pid != null" >
pid = #{pid,jdbcType=VARCHAR},
</if>
<if test="exceedsplannedpercentage != null" >
exceedsPlannedPercentage = #{exceedsplannedpercentage,jdbcType=VARCHAR},
</if>
<if test="remark != null" >
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="materialcode != null" >
materialcode = #{materialcode,jdbcType=VARCHAR},
</if>
<if test="unituse != null" >
unituse = #{unituse,jdbcType=VARCHAR},
</if>
<if test="thedifferent != null" >
theDifferent = #{thedifferent,jdbcType=VARCHAR},
</if>
<if test="bomprojects != null" >
bomprojects = #{bomprojects,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.material.MaterialDateSchedule" >
update tb_material_dateschedule
set inventoryFrontLine = #{inventoryfrontline,jdbcType=VARCHAR},
pickingDay = #{pickingday,jdbcType=VARCHAR},
insuser = #{insuser,jdbcType=VARCHAR},
insdt = #{insdt,jdbcType=TIMESTAMP},
plannedConsumption = #{plannedconsumption,jdbcType=VARCHAR},
inventoryCountPostpartum = #{inventorycountpostpartum,jdbcType=VARCHAR},
actualConsumptionDay = #{actualconsumptionday,jdbcType=VARCHAR},
pid = #{pid,jdbcType=VARCHAR},
exceedsPlannedPercentage = #{exceedsplannedpercentage,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
materialcode = #{materialcode,jdbcType=VARCHAR},
unituse = #{unituse,jdbcType=VARCHAR},
theDifferent = #{thedifferent,jdbcType=VARCHAR},
bomprojects = #{bomprojects,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectListByWhere" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_material_dateschedule
${where}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String">
delete from tb_material_dateschedule
${where}
</delete>
</mapper>

View File

@ -0,0 +1,636 @@
<?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="material.MaterialInfoMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.material.MaterialInfo" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="materialcode" property="materialcode" jdbcType="VARCHAR" />
<result column="materialname" property="materialname" jdbcType="VARCHAR" />
<result column="materialmodel" property="materialmodel" jdbcType="VARCHAR" />
<result column="materialproperties" property="materialproperties" jdbcType="VARCHAR" />
<result column="secondaryattribute" property="secondaryattribute" jdbcType="VARCHAR" />
<result column="unit" property="unit" jdbcType="VARCHAR" />
<result column="num" property="num" jdbcType="VARCHAR" />
<result column="yield" property="yield" jdbcType="VARCHAR" />
<result column="state" property="state" jdbcType="VARCHAR" />
<result column="audit" property="audit" jdbcType="VARCHAR" />
<result column="version" property="version" jdbcType="VARCHAR" />
<result column="drawnum" property="drawnum" jdbcType="VARCHAR" />
<result column="processlinecode" property="processlinecode" jdbcType="VARCHAR" />
<result column="processlinename" property="processlinename" jdbcType="VARCHAR" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
<result column="lastinsuser" property="lastinsuser" jdbcType="VARCHAR" />
<result column="lastinsdt" property="lastinsdt" jdbcType="TIMESTAMP" />
<result column="usepeople" property="usepeople" jdbcType="VARCHAR" />
<result column="userdt" property="userdt" jdbcType="TIMESTAMP" />
<result column="remark" property="remark" jdbcType="VARCHAR" />
<result column="jumplayer" property="jumplayer" jdbcType="VARCHAR" />
<result column="levels" property="levels" jdbcType="VARCHAR" />
<result column="unituse" property="unituse" jdbcType="VARCHAR" />
<result column="dosage" property="dosage" jdbcType="VARCHAR" />
<result column="usualuseunit" property="usualuseunit" jdbcType="VARCHAR" />
<result column="plannedpercentage" property="plannedpercentage" jdbcType="VARCHAR" />
<result column="wearrate" property="wearrate" jdbcType="VARCHAR" />
<result column="itemtype" property="itemtype" jdbcType="VARCHAR" />
<result column="operationnumber" property="operationnumber" jdbcType="VARCHAR" />
<result column="process" property="process" jdbcType="VARCHAR" />
<result column="station" property="station" jdbcType="VARCHAR" />
<result column="localnum" property="localnum" jdbcType="VARCHAR" />
<result column="billetsize" property="billetsize" jdbcType="VARCHAR" />
<result column="billetnum" property="billetnum" jdbcType="VARCHAR" />
<result column="warehouse" property="warehouse" jdbcType="VARCHAR" />
<result column="keysymbol" property="keysymbol" jdbcType="VARCHAR" />
<result column="usestate" property="usestate" jdbcType="VARCHAR" />
<result column="ifdown" property="ifdown" jdbcType="VARCHAR" />
<result column="remark1" property="remark1" jdbcType="VARCHAR" />
<result column="remark2" property="remark2" jdbcType="VARCHAR" />
<result column="inventory" property="inventory" jdbcType="VARCHAR" />
<result column="ifpour" property="ifpour" jdbcType="VARCHAR" />
<result column="havereplace" property="havereplace" jdbcType="VARCHAR" />
<result column="faildt" property="faildt" jdbcType="TIMESTAMP" />
<result column="effectdt" property="effectdt" jdbcType="TIMESTAMP" />
<result column="pid" property="pid" jdbcType="VARCHAR" />
<result column="usuallyunit" property="usuallyunit" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, materialcode, materialname, materialmodel, materialproperties, secondaryattribute,
unit, num, yield, state, audit, version, drawnum, processlinecode, processlinename,
insuser, insdt, lastinsuser, lastinsdt, usepeople, userdt, remark, jumplayer, levels,
unituse, dosage, usualuseunit, plannedpercentage, wearrate, itemtype, operationnumber,
process, station, localnum, billetsize, billetnum, warehouse, keysymbol, usestate,
ifdown, remark1, remark2, inventory, ifpour, havereplace, faildt, effectdt, pid, usuallyunit
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_material_allinfo
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from tb_material_allinfo
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.material.MaterialInfo" >
insert into tb_material_allinfo (id, materialcode, materialname,
materialmodel, materialproperties, secondaryattribute,
unit, num, yield, state,
audit, version, drawnum,
processlinecode, processlinename, insuser,
insdt, lastinsuser, lastinsdt,
usepeople, userdt, remark,
jumplayer, levels, unituse,
dosage, usualuseunit, plannedpercentage,
wearrate, itemtype, operationnumber,
process, station, localnum,
billetsize, billetnum, warehouse,
keysymbol, usestate, ifdown,
remark1, remark2, inventory,
ifpour, havereplace, faildt,
effectdt, pid, usuallyunit
)
values (#{id,jdbcType=VARCHAR}, #{materialcode,jdbcType=VARCHAR}, #{materialname,jdbcType=VARCHAR},
#{materialmodel,jdbcType=VARCHAR}, #{materialproperties,jdbcType=VARCHAR}, #{secondaryattribute,jdbcType=VARCHAR},
#{unit,jdbcType=VARCHAR}, #{num,jdbcType=VARCHAR}, #{yield,jdbcType=VARCHAR}, #{state,jdbcType=VARCHAR},
#{audit,jdbcType=VARCHAR}, #{version,jdbcType=VARCHAR}, #{drawnum,jdbcType=VARCHAR},
#{processlinecode,jdbcType=VARCHAR}, #{processlinename,jdbcType=VARCHAR}, #{insuser,jdbcType=VARCHAR},
#{insdt,jdbcType=TIMESTAMP}, #{lastinsuser,jdbcType=VARCHAR}, #{lastinsdt,jdbcType=TIMESTAMP},
#{usepeople,jdbcType=VARCHAR}, #{userdt,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR},
#{jumplayer,jdbcType=VARCHAR}, #{levels,jdbcType=VARCHAR}, #{unituse,jdbcType=VARCHAR},
#{dosage,jdbcType=VARCHAR}, #{usualuseunit,jdbcType=VARCHAR}, #{plannedpercentage,jdbcType=VARCHAR},
#{wearrate,jdbcType=VARCHAR}, #{itemtype,jdbcType=VARCHAR}, #{operationnumber,jdbcType=VARCHAR},
#{process,jdbcType=VARCHAR}, #{station,jdbcType=VARCHAR}, #{localnum,jdbcType=VARCHAR},
#{billetsize,jdbcType=VARCHAR}, #{billetnum,jdbcType=VARCHAR}, #{warehouse,jdbcType=VARCHAR},
#{keysymbol,jdbcType=VARCHAR}, #{usestate,jdbcType=VARCHAR}, #{ifdown,jdbcType=VARCHAR},
#{remark1,jdbcType=VARCHAR}, #{remark2,jdbcType=VARCHAR}, #{inventory,jdbcType=VARCHAR},
#{ifpour,jdbcType=VARCHAR}, #{havereplace,jdbcType=VARCHAR}, #{faildt,jdbcType=TIMESTAMP},
#{effectdt,jdbcType=TIMESTAMP}, #{pid,jdbcType=VARCHAR}, #{usuallyunit,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.material.MaterialInfo" >
insert into tb_material_allinfo
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="materialcode != null" >
materialcode,
</if>
<if test="materialname != null" >
materialname,
</if>
<if test="materialmodel != null" >
materialmodel,
</if>
<if test="materialproperties != null" >
materialproperties,
</if>
<if test="secondaryattribute != null" >
secondaryattribute,
</if>
<if test="unit != null" >
unit,
</if>
<if test="num != null" >
num,
</if>
<if test="yield != null" >
yield,
</if>
<if test="state != null" >
state,
</if>
<if test="audit != null" >
audit,
</if>
<if test="version != null" >
version,
</if>
<if test="drawnum != null" >
drawnum,
</if>
<if test="processlinecode != null" >
processlinecode,
</if>
<if test="processlinename != null" >
processlinename,
</if>
<if test="insuser != null" >
insuser,
</if>
<if test="insdt != null" >
insdt,
</if>
<if test="lastinsuser != null" >
lastinsuser,
</if>
<if test="lastinsdt != null" >
lastinsdt,
</if>
<if test="usepeople != null" >
usepeople,
</if>
<if test="userdt != null" >
userdt,
</if>
<if test="remark != null" >
remark,
</if>
<if test="jumplayer != null" >
jumplayer,
</if>
<if test="levels != null" >
levels,
</if>
<if test="unituse != null" >
unituse,
</if>
<if test="dosage != null" >
dosage,
</if>
<if test="usualuseunit != null" >
usualuseunit,
</if>
<if test="plannedpercentage != null" >
plannedpercentage,
</if>
<if test="wearrate != null" >
wearrate,
</if>
<if test="itemtype != null" >
itemtype,
</if>
<if test="operationnumber != null" >
operationnumber,
</if>
<if test="process != null" >
process,
</if>
<if test="station != null" >
station,
</if>
<if test="localnum != null" >
localnum,
</if>
<if test="billetsize != null" >
billetsize,
</if>
<if test="billetnum != null" >
billetnum,
</if>
<if test="warehouse != null" >
warehouse,
</if>
<if test="keysymbol != null" >
keysymbol,
</if>
<if test="usestate != null" >
usestate,
</if>
<if test="ifdown != null" >
ifdown,
</if>
<if test="remark1 != null" >
remark1,
</if>
<if test="remark2 != null" >
remark2,
</if>
<if test="inventory != null" >
inventory,
</if>
<if test="ifpour != null" >
ifpour,
</if>
<if test="havereplace != null" >
havereplace,
</if>
<if test="faildt != null" >
faildt,
</if>
<if test="effectdt != null" >
effectdt,
</if>
<if test="pid != null" >
pid,
</if>
<if test="usuallyunit != null" >
usuallyunit,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="materialcode != null" >
#{materialcode,jdbcType=VARCHAR},
</if>
<if test="materialname != null" >
#{materialname,jdbcType=VARCHAR},
</if>
<if test="materialmodel != null" >
#{materialmodel,jdbcType=VARCHAR},
</if>
<if test="materialproperties != null" >
#{materialproperties,jdbcType=VARCHAR},
</if>
<if test="secondaryattribute != null" >
#{secondaryattribute,jdbcType=VARCHAR},
</if>
<if test="unit != null" >
#{unit,jdbcType=VARCHAR},
</if>
<if test="num != null" >
#{num,jdbcType=VARCHAR},
</if>
<if test="yield != null" >
#{yield,jdbcType=VARCHAR},
</if>
<if test="state != null" >
#{state,jdbcType=VARCHAR},
</if>
<if test="audit != null" >
#{audit,jdbcType=VARCHAR},
</if>
<if test="version != null" >
#{version,jdbcType=VARCHAR},
</if>
<if test="drawnum != null" >
#{drawnum,jdbcType=VARCHAR},
</if>
<if test="processlinecode != null" >
#{processlinecode,jdbcType=VARCHAR},
</if>
<if test="processlinename != null" >
#{processlinename,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
#{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
#{insdt,jdbcType=TIMESTAMP},
</if>
<if test="lastinsuser != null" >
#{lastinsuser,jdbcType=VARCHAR},
</if>
<if test="lastinsdt != null" >
#{lastinsdt,jdbcType=TIMESTAMP},
</if>
<if test="usepeople != null" >
#{usepeople,jdbcType=VARCHAR},
</if>
<if test="userdt != null" >
#{userdt,jdbcType=TIMESTAMP},
</if>
<if test="remark != null" >
#{remark,jdbcType=VARCHAR},
</if>
<if test="jumplayer != null" >
#{jumplayer,jdbcType=VARCHAR},
</if>
<if test="levels != null" >
#{levels,jdbcType=VARCHAR},
</if>
<if test="unituse != null" >
#{unituse,jdbcType=VARCHAR},
</if>
<if test="dosage != null" >
#{dosage,jdbcType=VARCHAR},
</if>
<if test="usualuseunit != null" >
#{usualuseunit,jdbcType=VARCHAR},
</if>
<if test="plannedpercentage != null" >
#{plannedpercentage,jdbcType=VARCHAR},
</if>
<if test="wearrate != null" >
#{wearrate,jdbcType=VARCHAR},
</if>
<if test="itemtype != null" >
#{itemtype,jdbcType=VARCHAR},
</if>
<if test="operationnumber != null" >
#{operationnumber,jdbcType=VARCHAR},
</if>
<if test="process != null" >
#{process,jdbcType=VARCHAR},
</if>
<if test="station != null" >
#{station,jdbcType=VARCHAR},
</if>
<if test="localnum != null" >
#{localnum,jdbcType=VARCHAR},
</if>
<if test="billetsize != null" >
#{billetsize,jdbcType=VARCHAR},
</if>
<if test="billetnum != null" >
#{billetnum,jdbcType=VARCHAR},
</if>
<if test="warehouse != null" >
#{warehouse,jdbcType=VARCHAR},
</if>
<if test="keysymbol != null" >
#{keysymbol,jdbcType=VARCHAR},
</if>
<if test="usestate != null" >
#{usestate,jdbcType=VARCHAR},
</if>
<if test="ifdown != null" >
#{ifdown,jdbcType=VARCHAR},
</if>
<if test="remark1 != null" >
#{remark1,jdbcType=VARCHAR},
</if>
<if test="remark2 != null" >
#{remark2,jdbcType=VARCHAR},
</if>
<if test="inventory != null" >
#{inventory,jdbcType=VARCHAR},
</if>
<if test="ifpour != null" >
#{ifpour,jdbcType=VARCHAR},
</if>
<if test="havereplace != null" >
#{havereplace,jdbcType=VARCHAR},
</if>
<if test="faildt != null" >
#{faildt,jdbcType=TIMESTAMP},
</if>
<if test="effectdt != null" >
#{effectdt,jdbcType=TIMESTAMP},
</if>
<if test="pid != null" >
#{pid,jdbcType=VARCHAR},
</if>
<if test="usuallyunit != null" >
#{usuallyunit,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.material.MaterialInfo" >
update tb_material_allinfo
<set >
<if test="materialcode != null" >
materialcode = #{materialcode,jdbcType=VARCHAR},
</if>
<if test="materialname != null" >
materialname = #{materialname,jdbcType=VARCHAR},
</if>
<if test="materialmodel != null" >
materialmodel = #{materialmodel,jdbcType=VARCHAR},
</if>
<if test="materialproperties != null" >
materialproperties = #{materialproperties,jdbcType=VARCHAR},
</if>
<if test="secondaryattribute != null" >
secondaryattribute = #{secondaryattribute,jdbcType=VARCHAR},
</if>
<if test="unit != null" >
unit = #{unit,jdbcType=VARCHAR},
</if>
<if test="num != null" >
num = #{num,jdbcType=VARCHAR},
</if>
<if test="yield != null" >
yield = #{yield,jdbcType=VARCHAR},
</if>
<if test="state != null" >
state = #{state,jdbcType=VARCHAR},
</if>
<if test="audit != null" >
audit = #{audit,jdbcType=VARCHAR},
</if>
<if test="version != null" >
version = #{version,jdbcType=VARCHAR},
</if>
<if test="drawnum != null" >
drawnum = #{drawnum,jdbcType=VARCHAR},
</if>
<if test="processlinecode != null" >
processlinecode = #{processlinecode,jdbcType=VARCHAR},
</if>
<if test="processlinename != null" >
processlinename = #{processlinename,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
insdt = #{insdt,jdbcType=TIMESTAMP},
</if>
<if test="lastinsuser != null" >
lastinsuser = #{lastinsuser,jdbcType=VARCHAR},
</if>
<if test="lastinsdt != null" >
lastinsdt = #{lastinsdt,jdbcType=TIMESTAMP},
</if>
<if test="usepeople != null" >
usepeople = #{usepeople,jdbcType=VARCHAR},
</if>
<if test="userdt != null" >
userdt = #{userdt,jdbcType=TIMESTAMP},
</if>
<if test="remark != null" >
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="jumplayer != null" >
jumplayer = #{jumplayer,jdbcType=VARCHAR},
</if>
<if test="levels != null" >
levels = #{levels,jdbcType=VARCHAR},
</if>
<if test="unituse != null" >
unituse = #{unituse,jdbcType=VARCHAR},
</if>
<if test="dosage != null" >
dosage = #{dosage,jdbcType=VARCHAR},
</if>
<if test="usualuseunit != null" >
usualuseunit = #{usualuseunit,jdbcType=VARCHAR},
</if>
<if test="plannedpercentage != null" >
plannedpercentage = #{plannedpercentage,jdbcType=VARCHAR},
</if>
<if test="wearrate != null" >
wearrate = #{wearrate,jdbcType=VARCHAR},
</if>
<if test="itemtype != null" >
itemtype = #{itemtype,jdbcType=VARCHAR},
</if>
<if test="operationnumber != null" >
operationnumber = #{operationnumber,jdbcType=VARCHAR},
</if>
<if test="process != null" >
process = #{process,jdbcType=VARCHAR},
</if>
<if test="station != null" >
station = #{station,jdbcType=VARCHAR},
</if>
<if test="localnum != null" >
localnum = #{localnum,jdbcType=VARCHAR},
</if>
<if test="billetsize != null" >
billetsize = #{billetsize,jdbcType=VARCHAR},
</if>
<if test="billetnum != null" >
billetnum = #{billetnum,jdbcType=VARCHAR},
</if>
<if test="warehouse != null" >
warehouse = #{warehouse,jdbcType=VARCHAR},
</if>
<if test="keysymbol != null" >
keysymbol = #{keysymbol,jdbcType=VARCHAR},
</if>
<if test="usestate != null" >
usestate = #{usestate,jdbcType=VARCHAR},
</if>
<if test="ifdown != null" >
ifdown = #{ifdown,jdbcType=VARCHAR},
</if>
<if test="remark1 != null" >
remark1 = #{remark1,jdbcType=VARCHAR},
</if>
<if test="remark2 != null" >
remark2 = #{remark2,jdbcType=VARCHAR},
</if>
<if test="inventory != null" >
inventory = #{inventory,jdbcType=VARCHAR},
</if>
<if test="ifpour != null" >
ifpour = #{ifpour,jdbcType=VARCHAR},
</if>
<if test="havereplace != null" >
havereplace = #{havereplace,jdbcType=VARCHAR},
</if>
<if test="faildt != null" >
faildt = #{faildt,jdbcType=TIMESTAMP},
</if>
<if test="effectdt != null" >
effectdt = #{effectdt,jdbcType=TIMESTAMP},
</if>
<if test="pid != null" >
pid = #{pid,jdbcType=VARCHAR},
</if>
<if test="usuallyunit != null" >
usuallyunit = #{usuallyunit,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.material.MaterialInfo" >
update tb_material_allinfo
set materialcode = #{materialcode,jdbcType=VARCHAR},
materialname = #{materialname,jdbcType=VARCHAR},
materialmodel = #{materialmodel,jdbcType=VARCHAR},
materialproperties = #{materialproperties,jdbcType=VARCHAR},
secondaryattribute = #{secondaryattribute,jdbcType=VARCHAR},
unit = #{unit,jdbcType=VARCHAR},
num = #{num,jdbcType=VARCHAR},
yield = #{yield,jdbcType=VARCHAR},
state = #{state,jdbcType=VARCHAR},
audit = #{audit,jdbcType=VARCHAR},
version = #{version,jdbcType=VARCHAR},
drawnum = #{drawnum,jdbcType=VARCHAR},
processlinecode = #{processlinecode,jdbcType=VARCHAR},
processlinename = #{processlinename,jdbcType=VARCHAR},
insuser = #{insuser,jdbcType=VARCHAR},
insdt = #{insdt,jdbcType=TIMESTAMP},
lastinsuser = #{lastinsuser,jdbcType=VARCHAR},
lastinsdt = #{lastinsdt,jdbcType=TIMESTAMP},
usepeople = #{usepeople,jdbcType=VARCHAR},
userdt = #{userdt,jdbcType=TIMESTAMP},
remark = #{remark,jdbcType=VARCHAR},
jumplayer = #{jumplayer,jdbcType=VARCHAR},
levels = #{levels,jdbcType=VARCHAR},
unituse = #{unituse,jdbcType=VARCHAR},
dosage = #{dosage,jdbcType=VARCHAR},
usualuseunit = #{usualuseunit,jdbcType=VARCHAR},
plannedpercentage = #{plannedpercentage,jdbcType=VARCHAR},
wearrate = #{wearrate,jdbcType=VARCHAR},
itemtype = #{itemtype,jdbcType=VARCHAR},
operationnumber = #{operationnumber,jdbcType=VARCHAR},
process = #{process,jdbcType=VARCHAR},
station = #{station,jdbcType=VARCHAR},
localnum = #{localnum,jdbcType=VARCHAR},
billetsize = #{billetsize,jdbcType=VARCHAR},
billetnum = #{billetnum,jdbcType=VARCHAR},
warehouse = #{warehouse,jdbcType=VARCHAR},
keysymbol = #{keysymbol,jdbcType=VARCHAR},
usestate = #{usestate,jdbcType=VARCHAR},
ifdown = #{ifdown,jdbcType=VARCHAR},
remark1 = #{remark1,jdbcType=VARCHAR},
remark2 = #{remark2,jdbcType=VARCHAR},
inventory = #{inventory,jdbcType=VARCHAR},
ifpour = #{ifpour,jdbcType=VARCHAR},
havereplace = #{havereplace,jdbcType=VARCHAR},
faildt = #{faildt,jdbcType=TIMESTAMP},
effectdt = #{effectdt,jdbcType=TIMESTAMP},
pid = #{pid,jdbcType=VARCHAR},
usuallyunit = #{usuallyunit,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectListByWhere" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_material_allinfo
${where}
</select>
<select id="getListByMaterialCode" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_material_allinfo
where materialcode = #{materialcode,jdbcType=VARCHAR}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String" >
delete from tb_material_allinfo
${where}
</delete>
<select id="getRootByCodeAndVersion" resultMap="BaseResultMap" parameterType="com.sipai.entity.material.MaterialInfo" >
select
<include refid="Base_Column_List" />
from tb_material_allinfo
where pid = #{pid,jdbcType=VARCHAR} and materialcode = #{materialcode,jdbcType=VARCHAR}
</select>
</mapper>

View File

@ -0,0 +1,301 @@
<?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="material.MaterialInventoryMapper">
<resultMap id="BaseResultMap" type="com.sipai.entity.material.MaterialInventory">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="processid" jdbcType="VARCHAR" property="processid" />
<result column="materialid" jdbcType="VARCHAR" property="materialid" />
<result column="inventoryFrontLine" jdbcType="VARCHAR" property="inventoryfrontline" />
<result column="pickingDay" jdbcType="VARCHAR" property="pickingday" />
<result column="insuser" jdbcType="VARCHAR" property="insuser" />
<result column="insdt" jdbcType="TIMESTAMP" property="insdt" />
<result column="plannedConsumption" jdbcType="VARCHAR" property="plannedconsumption" />
<result column="inventoryCountPostpartum" jdbcType="VARCHAR" property="inventorycountpostpartum" />
<result column="actualConsumptionDay" jdbcType="VARCHAR" property="actualconsumptionday" />
<result column="exceedsPlannedPercentage" jdbcType="VARCHAR" property="exceedsplannedpercentage" />
<result column="theDifferent" jdbcType="VARCHAR" property="thedifferent" />
<result column="materialname" jdbcType="VARCHAR" property="materialname" />
<result column="thismatercodeplan" jdbcType="VARCHAR" property="thismatercodeplan" />
</resultMap>
<sql id="Base_Column_List">
id, processid, materialid, inventoryFrontLine, pickingDay, insuser, insdt, plannedConsumption,
inventoryCountPostpartum, actualConsumptionDay, exceedsPlannedPercentage, theDifferent,
materialname,thismatercodeplan
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_material_inventory
where id = #{id,jdbcType=VARCHAR} order by id
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from tb_material_inventory
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.material.MaterialInventory">
insert into tb_material_inventory (id, processid, materialid,
inventoryFrontLine, pickingDay, insuser,
insdt, plannedConsumption, inventoryCountPostpartum,
actualConsumptionDay, exceedsPlannedPercentage,
theDifferent, materialname,thismatercodeplan)
values (#{id,jdbcType=VARCHAR}, #{processid,jdbcType=VARCHAR}, #{materialid,jdbcType=VARCHAR},
#{inventoryfrontline,jdbcType=VARCHAR}, #{pickingday,jdbcType=VARCHAR}, #{insuser,jdbcType=VARCHAR},
#{insdt,jdbcType=TIMESTAMP}, #{plannedconsumption,jdbcType=VARCHAR}, #{inventorycountpostpartum,jdbcType=VARCHAR},
#{actualconsumptionday,jdbcType=VARCHAR}, #{exceedsplannedpercentage,jdbcType=VARCHAR},
#{thedifferent,jdbcType=VARCHAR}, #{materialname,jdbcType=VARCHAR},#{thismatercodeplan,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.material.MaterialInventory">
insert into tb_material_inventory
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="processid != null">
processid,
</if>
<if test="materialid != null">
materialid,
</if>
<if test="inventoryfrontline != null">
inventoryFrontLine,
</if>
<if test="pickingday != null">
pickingDay,
</if>
<if test="insuser != null">
insuser,
</if>
<if test="insdt != null">
insdt,
</if>
<if test="plannedconsumption != null">
plannedConsumption,
</if>
<if test="inventorycountpostpartum != null">
inventoryCountPostpartum,
</if>
<if test="actualconsumptionday != null">
actualConsumptionDay,
</if>
<if test="exceedsplannedpercentage != null">
exceedsPlannedPercentage,
</if>
<if test="thedifferent != null">
theDifferent,
</if>
<if test="materialname != null">
materialname,
</if>
<if test="thismatercodeplan != null">
thismatercodeplan,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="processid != null">
#{processid,jdbcType=VARCHAR},
</if>
<if test="materialid != null">
#{materialid,jdbcType=VARCHAR},
</if>
<if test="inventoryfrontline != null">
#{inventoryfrontline,jdbcType=VARCHAR},
</if>
<if test="pickingday != null">
#{pickingday,jdbcType=VARCHAR},
</if>
<if test="insuser != null">
#{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null">
#{insdt,jdbcType=TIMESTAMP},
</if>
<if test="plannedconsumption != null">
#{plannedconsumption,jdbcType=VARCHAR},
</if>
<if test="inventorycountpostpartum != null">
#{inventorycountpostpartum,jdbcType=VARCHAR},
</if>
<if test="actualconsumptionday != null">
#{actualconsumptionday,jdbcType=VARCHAR},
</if>
<if test="exceedsplannedpercentage != null">
#{exceedsplannedpercentage,jdbcType=VARCHAR},
</if>
<if test="thedifferent != null">
#{thedifferent,jdbcType=VARCHAR},
</if>
<if test="materialname != null">
#{materialname,jdbcType=VARCHAR},
</if>
<if test="thismatercodeplan != null">
#{thismatercodeplan,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.material.MaterialInventory">
update tb_material_inventory
<set>
<if test="processid != null">
processid = #{processid,jdbcType=VARCHAR},
</if>
<if test="materialid != null">
materialid = #{materialid,jdbcType=VARCHAR},
</if>
<if test="inventoryfrontline != null">
inventoryFrontLine = #{inventoryfrontline,jdbcType=VARCHAR},
</if>
<if test="pickingday != null">
pickingDay = #{pickingday,jdbcType=VARCHAR},
</if>
<if test="insuser != null">
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null">
insdt = #{insdt,jdbcType=TIMESTAMP},
</if>
<if test="plannedconsumption != null">
plannedConsumption = #{plannedconsumption,jdbcType=VARCHAR},
</if>
<if test="inventorycountpostpartum != null">
inventoryCountPostpartum = #{inventorycountpostpartum,jdbcType=VARCHAR},
</if>
<if test="actualconsumptionday != null">
actualConsumptionDay = #{actualconsumptionday,jdbcType=VARCHAR},
</if>
<if test="exceedsplannedpercentage != null">
exceedsPlannedPercentage = #{exceedsplannedpercentage,jdbcType=VARCHAR},
</if>
<if test="thedifferent != null">
theDifferent = #{thedifferent,jdbcType=VARCHAR},
</if>
<if test="materialname != null">
materialname = #{materialname,jdbcType=VARCHAR},
</if>
<if test="thismatercodeplan != null">
thismatercodeplan = #{thismatercodeplan,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.material.MaterialInventory">
update tb_material_inventory
set processid = #{processid,jdbcType=VARCHAR},
materialid = #{materialid,jdbcType=VARCHAR},
inventoryFrontLine = #{inventoryfrontline,jdbcType=VARCHAR},
pickingDay = #{pickingday,jdbcType=VARCHAR},
insuser = #{insuser,jdbcType=VARCHAR},
insdt = #{insdt,jdbcType=TIMESTAMP},
plannedConsumption = #{plannedconsumption,jdbcType=VARCHAR},
inventoryCountPostpartum = #{inventorycountpostpartum,jdbcType=VARCHAR},
actualConsumptionDay = #{actualconsumptionday,jdbcType=VARCHAR},
exceedsPlannedPercentage = #{exceedsplannedpercentage,jdbcType=VARCHAR},
theDifferent = #{thedifferent,jdbcType=VARCHAR},
materialname = #{materialname,jdbcType=VARCHAR},
thismatercodeplan = #{thismatercodeplan,jdbcType=VARCHAR},
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectListByWhere" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_material_inventory
${where}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String">
delete from tb_material_inventory
${where}
</delete>
<select id="getMaterialInventory" parameterType="java.lang.String" resultMap="ClassResultMapMaterialInventory">
SELECT
E.id as id,
E.processid,
E.inventoryFrontLine,
E.pickingDay,
E.plannedConsumption,
E.inventoryCountPostpartum,
E.actualConsumptionDay,
E.exceedsPlannedPercentage,
E.theDifferent,
E.thismatercodeplan,
G.materialname,
E.insdt as insdt,
E.materialid as materialid,
C.procedurename as processname,
G.materialcode as materialcode,
G.unit as unit
FROM tb_material_inventory E
LEFT OUTER JOIN tb_process_task_procedure C ON C.id = E.processid
LEFT OUTER JOIN tb_material_allinfo G ON G.id = E.materialid
${where}
</select>
<resultMap id="ClassResultMapMaterialInventory" type="com.sipai.entity.material.MaterialInventory">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="processid" jdbcType="VARCHAR" property="processid" />
<result column="insdt" jdbcType="TIMESTAMP" property="insdt" />
<result column="materialid" jdbcType="VARCHAR" property="materialid" />
<result column="inventoryFrontLine" jdbcType="VARCHAR" property="inventoryfrontline" />
<result column="pickingDay" jdbcType="VARCHAR" property="pickingday" />
<result column="plannedConsumption" jdbcType="VARCHAR" property="plannedconsumption" />
<result column="inventoryCountPostpartum" jdbcType="VARCHAR" property="inventorycountpostpartum" />
<result column="actualConsumptionDay" jdbcType="VARCHAR" property="actualconsumptionday" />
<result column="exceedsPlannedPercentage" jdbcType="VARCHAR" property="exceedsplannedpercentage" />
<result column="theDifferent" jdbcType="VARCHAR" property="thedifferent" />
<result column="processname" jdbcType="VARCHAR" property="processname" />
<result column="materialname" jdbcType="VARCHAR" property="materialname" />
<result column="thismatercodeplan" jdbcType="VARCHAR" property="thismatercodeplan" />
<result column="materialcode" jdbcType="VARCHAR" property="materialcode" />
<result column="unit" jdbcType="VARCHAR" property="unit" />
</resultMap>
<select id="getpreamount" parameterType="java.lang.String" resultMap="ClassResultMapgetpreamount">
SELECT
E.id as id,
E.procedurecode as procedurecode,
C.preamount as preamount,
G.stdt as stdt,
G.bomid as bomid
FROM tb_process_task_procedure E
LEFT OUTER JOIN tb_plan_taskdemand C ON C.taskcode = E.procedurecode
LEFT OUTER JOIN tb_plan_day G ON G.id = C.planid
${where}
</select>
<resultMap id="ClassResultMapgetpreamount" type="com.sipai.entity.material.MaterialInventory">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="procedurecode" jdbcType="VARCHAR" property="procedurecode" />
<result column="stdt" jdbcType="TIMESTAMP" property="stdt" />
<result column="preamount" jdbcType="VARCHAR" property="preamount" />
<result column="bomid" jdbcType="VARCHAR" property="bomid" />
</resultMap>
<select id="getfutureinfo" parameterType="java.lang.String" resultMap="ClassResultMapgetfutureinfo">
SELECT
t.id id,
p.procedurecode,
t.preamount,
c.stdt,
c.bomid,
I.materialid,
I.thedifferent,
I.inventoryfrontline,
I.thismatercodeplan
FROM [PlantEngine_RLD].[dbo].[tb_material_inventory] I
LEFT OUTER JOIN [PlantEngine_RLD].[dbo].[tb_process_task_procedure] p ON p.id = I.processid
LEFT OUTER JOIN [PlantEngine_RLD].[dbo].[tb_plan_taskdemand] t ON t.taskcode = p.procedurecode
LEFT OUTER JOIN [PlantEngine_RLD].[dbo].[tb_plan_day] C ON C.id = t.planid
${where}
</select>
<resultMap id="ClassResultMapgetfutureinfo" type="com.sipai.entity.material.MaterialInventory">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="procedurecode" jdbcType="VARCHAR" property="procedurecode" />
<result column="stdt" jdbcType="TIMESTAMP" property="stdt" />
<result column="preamount" jdbcType="VARCHAR" property="preamount" />
<result column="bomid" jdbcType="VARCHAR" property="bomid" />
<result column="materialid" jdbcType="VARCHAR" property="materialid" />
<result column="inventoryFrontLine" jdbcType="VARCHAR" property="inventoryfrontline" />
<result column="theDifferent" jdbcType="VARCHAR" property="thedifferent" />
<result column="thismatercodeplan" jdbcType="VARCHAR" property="thismatercodeplan" />
</resultMap>
</mapper>

View File

@ -0,0 +1,138 @@
<?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="material.MaterialOverneckMapper">
<resultMap id="BaseResultMap" type="com.sipai.entity.material.MaterialOverneck">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="insuser" jdbcType="VARCHAR" property="insuser" />
<result column="insdt" jdbcType="TIMESTAMP" property="insdt" />
<result column="materialcode" jdbcType="VARCHAR" property="materialcode" />
<result column="materialname" jdbcType="VARCHAR" property="materialname" />
<result column="num" jdbcType="VARCHAR" property="num" />
<result column="picktime" jdbcType="TIMESTAMP" property="picktime" />
<result column="unit" jdbcType="VARCHAR" property="unit" />
</resultMap>
<sql id="Base_Column_List">
id, insuser, insdt, materialcode, materialname, num, picktime, unit
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_material_overneck
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from tb_material_overneck
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.material.MaterialOverneck">
insert into tb_material_overneck (id, insuser, insdt,
materialcode, materialname, num,
picktime, unit)
values (#{id,jdbcType=VARCHAR}, #{insuser,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP},
#{materialcode,jdbcType=VARCHAR}, #{materialname,jdbcType=VARCHAR}, #{num,jdbcType=VARCHAR},
#{picktime,jdbcType=TIMESTAMP}, #{unit,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.material.MaterialOverneck">
insert into tb_material_overneck
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="insuser != null">
insuser,
</if>
<if test="insdt != null">
insdt,
</if>
<if test="materialcode != null">
materialcode,
</if>
<if test="materialname != null">
materialname,
</if>
<if test="num != null">
num,
</if>
<if test="picktime != null">
picktime,
</if>
<if test="unit != null">
unit,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="insuser != null">
#{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null">
#{insdt,jdbcType=TIMESTAMP},
</if>
<if test="materialcode != null">
#{materialcode,jdbcType=VARCHAR},
</if>
<if test="materialname != null">
#{materialname,jdbcType=VARCHAR},
</if>
<if test="num != null">
#{num,jdbcType=VARCHAR},
</if>
<if test="picktime != null">
#{picktime,jdbcType=TIMESTAMP},
</if>
<if test="unit != null">
#{unit,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.material.MaterialOverneck">
update tb_material_overneck
<set>
<if test="insuser != null">
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null">
insdt = #{insdt,jdbcType=TIMESTAMP},
</if>
<if test="materialcode != null">
materialcode = #{materialcode,jdbcType=VARCHAR},
</if>
<if test="materialname != null">
materialname = #{materialname,jdbcType=VARCHAR},
</if>
<if test="num != null">
num = #{num,jdbcType=VARCHAR},
</if>
<if test="picktime != null">
picktime = #{picktime,jdbcType=TIMESTAMP},
</if>
<if test="unit != null">
unit = #{unit,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.material.MaterialOverneck">
update tb_material_overneck
set insuser = #{insuser,jdbcType=VARCHAR},
insdt = #{insdt,jdbcType=TIMESTAMP},
materialcode = #{materialcode,jdbcType=VARCHAR},
materialname = #{materialname,jdbcType=VARCHAR},
num = #{num,jdbcType=VARCHAR},
picktime = #{picktime,jdbcType=TIMESTAMP},
unit = #{unit,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectListByWhere" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_material_overneck
${where}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String">
delete from tb_material_overneck
${where}
</delete>
</mapper>

View File

@ -0,0 +1,170 @@
<?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="material.MaterialPidMapper">
<resultMap id="BaseResultMap" type="com.sipai.entity.material.MaterialPid">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="pid" jdbcType="VARCHAR" property="pid" />
<result column="materialcode" jdbcType="VARCHAR" property="materialcode" />
<result column="insuser" jdbcType="VARCHAR" property="insuser" />
<result column="insdt" jdbcType="TIMESTAMP" property="insdt" />
<result column="num" jdbcType="VARCHAR" property="num" />
<result column="yield" jdbcType="VARCHAR" property="yield" />
<result column="unit" jdbcType="VARCHAR" property="unit" />
<result column="unituse" jdbcType="VARCHAR" property="unituse" />
<result column="dosage" jdbcType="VARCHAR" property="dosage" />
</resultMap>
<sql id="Base_Column_List">
id, pid, materialcode, insuser, insdt, num, yield, unit, unituse, dosage
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_material_pid
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from tb_material_pid
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.material.MaterialPid">
insert into tb_material_pid (id, pid, materialcode,
insuser, insdt, num,
yield, unit, unituse,
dosage)
values (#{id,jdbcType=VARCHAR}, #{pid,jdbcType=VARCHAR}, #{materialcode,jdbcType=VARCHAR},
#{insuser,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP}, #{num,jdbcType=VARCHAR},
#{yield,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR}, #{unituse,jdbcType=VARCHAR},
#{dosage,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.material.MaterialPid">
insert into tb_material_pid
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="pid != null">
pid,
</if>
<if test="materialcode != null">
materialcode,
</if>
<if test="insuser != null">
insuser,
</if>
<if test="insdt != null">
insdt,
</if>
<if test="num != null">
num,
</if>
<if test="yield != null">
yield,
</if>
<if test="unit != null">
unit,
</if>
<if test="unituse != null">
unituse,
</if>
<if test="dosage != null">
dosage,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="pid != null">
#{pid,jdbcType=VARCHAR},
</if>
<if test="materialcode != null">
#{materialcode,jdbcType=VARCHAR},
</if>
<if test="insuser != null">
#{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null">
#{insdt,jdbcType=TIMESTAMP},
</if>
<if test="num != null">
#{num,jdbcType=VARCHAR},
</if>
<if test="yield != null">
#{yield,jdbcType=VARCHAR},
</if>
<if test="unit != null">
#{unit,jdbcType=VARCHAR},
</if>
<if test="unituse != null">
#{unituse,jdbcType=VARCHAR},
</if>
<if test="dosage != null">
#{dosage,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.material.MaterialPid">
update tb_material_pid
<set>
<if test="pid != null">
pid = #{pid,jdbcType=VARCHAR},
</if>
<if test="materialcode != null">
materialcode = #{materialcode,jdbcType=VARCHAR},
</if>
<if test="insuser != null">
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null">
insdt = #{insdt,jdbcType=TIMESTAMP},
</if>
<if test="num != null">
num = #{num,jdbcType=VARCHAR},
</if>
<if test="yield != null">
yield = #{yield,jdbcType=VARCHAR},
</if>
<if test="unit != null">
unit = #{unit,jdbcType=VARCHAR},
</if>
<if test="unituse != null">
unituse = #{unituse,jdbcType=VARCHAR},
</if>
<if test="dosage != null">
dosage = #{dosage,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.material.MaterialPid">
update tb_material_pid
set pid = #{pid,jdbcType=VARCHAR},
materialcode = #{materialcode,jdbcType=VARCHAR},
insuser = #{insuser,jdbcType=VARCHAR},
insdt = #{insdt,jdbcType=TIMESTAMP},
num = #{num,jdbcType=VARCHAR},
yield = #{yield,jdbcType=VARCHAR},
unit = #{unit,jdbcType=VARCHAR},
unituse = #{unituse,jdbcType=VARCHAR},
dosage = #{dosage,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectListByWhere" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_material_pid
${where}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String">
delete from tb_material_pid
${where}
</delete>
<select id="getRootByCodeAndVersion" parameterType="com.sipai.entity.material.MaterialPid" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_material_pid
where pid = #{pid,jdbcType=VARCHAR} and materialcode = #{materialcode,jdbcType=VARCHAR}
</select>
</mapper>

View File

@ -0,0 +1,326 @@
<?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="material.MaterialRequisitionMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.material.MaterialRequisition" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="applyuserid" property="applyuserid" jdbcType="VARCHAR" />
<result column="workstationid" property="workstationid" jdbcType="VARCHAR" />
<result column="materialid" property="materialid" jdbcType="VARCHAR" />
<result column="quantity" property="quantity" jdbcType="VARCHAR" />
<result column="requestsenddate" property="requestsenddate" jdbcType="TIMESTAMP" />
<result column="orderno" property="orderno" jdbcType="VARCHAR" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="VARCHAR" />
<result column="modify" property="modify" jdbcType="VARCHAR" />
<result column="modifydt" property="modifydt" jdbcType="TIMESTAMP" />
<result column="workshopid" property="workshopid" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="VARCHAR" />
<result column="deliverquantity" property="deliverquantity" jdbcType="VARCHAR" />
<result column="deliverman" property="deliverman" jdbcType="VARCHAR" />
<result column="deliverdate" property="deliverdate" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Base_Column_List" >
id, applyuserid, workstationid, materialid, quantity, requestsenddate, orderno, insuser,
insdt, modify, modifydt, workshopid,status,deliverquantity,deliverman,deliverdate
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from TB_material_MaterialRequisition
where id = #{id,jdbcType=VARCHAR}
</select>
<select id="getListByOrderno" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from TB_material_MaterialRequisition
where orderno = #{orderno,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from TB_material_MaterialRequisition
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.material.MaterialRequisition" >
insert into TB_material_MaterialRequisition (id, applyuserid, workstationid,
materialid, quantity, requestsenddate,
orderno, insuser, insdt,
modify, modifydt, workshopid,status,deliverquantity,deliverman,deliverdate
)
values (#{id,jdbcType=VARCHAR}, #{applyuserid,jdbcType=VARCHAR}, #{workstationid,jdbcType=VARCHAR},
#{materialid,jdbcType=VARCHAR}, #{quantity,jdbcType=VARCHAR}, #{requestsenddate,jdbcType=TIMESTAMP},
#{orderno,jdbcType=VARCHAR}, #{insuser,jdbcType=VARCHAR}, #{insdt,jdbcType=VARCHAR},
#{modify,jdbcType=VARCHAR}, #{modifydt,jdbcType=TIMESTAMP}, #{workshopid,jdbcType=VARCHAR},
#{status,jdbcType=VARCHAR},#{deliverquantity,jdbcType=VARCHAR},#{deliverman,jdbcType=VARCHAR},#{deliverdate,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.material.MaterialRequisition" >
insert into TB_material_MaterialRequisition
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="applyuserid != null" >
applyuserid,
</if>
<if test="workstationid != null" >
workstationid,
</if>
<if test="materialid != null" >
materialid,
</if>
<if test="quantity != null" >
quantity,
</if>
<if test="requestsenddate != null" >
requestsenddate,
</if>
<if test="orderno != null" >
orderno,
</if>
<if test="insuser != null" >
insuser,
</if>
<if test="insdt != null" >
insdt,
</if>
<if test="modify != null" >
modify,
</if>
<if test="modifydt != null" >
modifydt,
</if>
<if test="workshopid != null" >
workshopid,
</if>
<if test="status != null" >
status,
</if>
<if test="deliverquantity != null" >
deliverquantity,
</if>
<if test="deliverman != null" >
deliverman,
</if>
<if test="deliverdate != null" >
deliverdate,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="applyuserid != null" >
#{applyuserid,jdbcType=VARCHAR},
</if>
<if test="workstationid != null" >
#{workstationid,jdbcType=VARCHAR},
</if>
<if test="materialid != null" >
#{materialid,jdbcType=VARCHAR},
</if>
<if test="quantity != null" >
#{quantity,jdbcType=VARCHAR},
</if>
<if test="requestsenddate != null" >
#{requestsenddate,jdbcType=TIMESTAMP},
</if>
<if test="orderno != null" >
#{orderno,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
#{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
#{insdt,jdbcType=VARCHAR},
</if>
<if test="modify != null" >
#{modify,jdbcType=VARCHAR},
</if>
<if test="modifydt != null" >
#{modifydt,jdbcType=TIMESTAMP},
</if>
<if test="workshopid != null" >
#{workshopid,jdbcType=VARCHAR},
</if>
<if test="status != null" >
#{status,jdbcType=VARCHAR},
</if>
<if test="deliverquantity != null" >
#{deliverquantity,jdbcType=VARCHAR},
</if>
<if test="deliverman != null" >
#{deliverman,jdbcType=VARCHAR},
</if>
<if test="deliverdate != null" >
#{deliverdate,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.material.MaterialRequisition" >
update TB_material_MaterialRequisition
<set >
<if test="applyuserid != null" >
applyuserid = #{applyuserid,jdbcType=VARCHAR},
</if>
<if test="workstationid != null" >
workstationid = #{workstationid,jdbcType=VARCHAR},
</if>
<if test="materialid != null" >
materialid = #{materialid,jdbcType=VARCHAR},
</if>
<if test="quantity != null" >
quantity = #{quantity,jdbcType=VARCHAR},
</if>
<if test="requestsenddate != null" >
requestsenddate = #{requestsenddate,jdbcType=TIMESTAMP},
</if>
<if test="orderno != null" >
orderno = #{orderno,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
insdt = #{insdt,jdbcType=VARCHAR},
</if>
<if test="modify != null" >
modify = #{modify,jdbcType=VARCHAR},
</if>
<if test="modifydt != null" >
modifydt = #{modifydt,jdbcType=TIMESTAMP},
</if>
<if test="workshopid != null" >
workshopid = #{workshopid,jdbcType=VARCHAR},
</if>
<if test="status != null" >
status = #{status,jdbcType=VARCHAR},
</if>
<if test="deliverquantity != null" >
deliverquantity = #{deliverquantity,jdbcType=VARCHAR},
</if>
<if test="deliverman != null" >
deliverman = #{deliverman,jdbcType=VARCHAR},
</if>
<if test="deliverdate != null" >
deliverdate = #{deliverdate,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.material.MaterialRequisition" >
update TB_material_MaterialRequisition
set applyuserid = #{applyuserid,jdbcType=VARCHAR},
workstationid = #{workstationid,jdbcType=VARCHAR},
materialid = #{materialid,jdbcType=VARCHAR},
quantity = #{quantity,jdbcType=VARCHAR},
requestsenddate = #{requestsenddate,jdbcType=TIMESTAMP},
orderno = #{orderno,jdbcType=VARCHAR},
insuser = #{insuser,jdbcType=VARCHAR},
insdt = #{insdt,jdbcType=VARCHAR},
modify = #{modify,jdbcType=VARCHAR},
modifydt = #{modifydt,jdbcType=TIMESTAMP},
workshopid = #{workshopid,jdbcType=VARCHAR},
status = #{status,jdbcType=VARCHAR},
deliverquantity = #{deliverquantity,jdbcType=VARCHAR},
deliverman = #{deliverman,jdbcType=VARCHAR},
deliverdate = #{deliverfate,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectList" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from TB_material_MaterialRequisition
order by insdt desc
</select>
<select id="selectListByWhere" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from TB_material_MaterialRequisition
${where}
</select>
<select id="selectByWhere" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from TB_material_MaterialRequisition
${where}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String" >
delete from TB_material_MaterialRequisition
${where}
</delete>
<select id="getMaterialRequisitionList" resultMap="ClassResultMapMRlist" parameterType="java.lang.String">
SELECT
R.id as r_id,
R.applyuserid,
R.workstationid as r_workstationid,
R.materialid as r_materialid,
R.quantity as r_quantity,
R.requestsenddate,
R.orderno as r_orderno,
R.insuser as r_insuser,
R.insdt as r_insdt,
R.modify as r_modify,
R.modifydt as r_modifydt,
R.workshopid as r_workshopid,
R.status as r_status,
R.deliverquantity as r_deliverquantity,
R.deliverman as r_deliverman,
R.deliverdate as r_deliverdate,
I.id as i_id,
I.materialname,
I.materialcode,
I.spec,
I.unit,
U.id as u_id,
U.caption as u_username,
U.name as u_name,
W.id as w_id,
W.serial,
W.name as w_name,
L.name as l_name,
T.name as t_name
FROM TB_material_MaterialRequisition R
LEFT OUTER JOIN tb_material_info I ON I.id = R.materialid
LEFT OUTER JOIN tb_user U ON U.id = R.applyuserid
LEFT OUTER JOIN tb_work_workstation W ON W.id = R.workstationid
LEFT OUTER JOIN tb_work_line L ON L.id = W.lineid
LEFT OUTER JOIN uv_unit T ON T.id = L.deptid
${where}
</select>
<resultMap id="ClassResultMapMRlist" type="com.sipai.entity.material.MaterialRequisition">
<id property="id" column="r_id" />
<result property="insuser" column="r_insuser"/>
<result property="insdt" column="r_insdt"/>
<result property="applyuserid" column="applyuserid"/>
<result property="workstationid" column="r_workstationid"/>
<result property="materialid" column="r_materialid"/>
<result property="quantity" column="r_quantity"/>
<result property="requestsenddate" column="requestsenddate"/>
<result property="orderno" column="r_orderno"/>
<result property="modify" column="r_modify"/>
<result property="modifydt" column="r_modifydt"/>
<result property="workshopid" column="r_workshopid"/>
<result property="status" column="r_status"/>
<result property="deliverquantity" column="r_deliverquantity"/>
<result property="deliverman" column="r_deliverman"/>
<result property="deliverdate" column="r_deliverdate"/>
<association property="materialinfo" javaType="com.sipai.entity.material.MaterialInfo" >
<id property="id" column="i_id"/>
<result property="materialname" column="materialname"/>
<result property="materialcode" column="materialcode"/>
<result property="spec" column="spec"/>
<result property="unit" column="unit"/>
</association>
<association property="applyuser" javaType="com.sipai.entity.user.User" >
<id property="id" column="u_id"/>
<result property="caption" column="u_username"/>
<result property="name" column="u_name"/>
</association>
<association property="workstation" javaType="com.sipai.entity.work.Workstation" >
<id property="id" column="w_id"/>
<result property="serial" column="serial"/>
<result property="name" column="w_name"/>
<result property="linename" column="l_name"/>
<result property="deptname" column="t_name"/>
</association>
</resultMap>
</mapper>

View File

@ -0,0 +1,139 @@
<?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="material.MaterialShortMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.material.MaterialShort" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="materialid" property="materialid" jdbcType="VARCHAR" />
<result column="productid" property="productid" jdbcType="VARCHAR" />
<result column="wftaskid" property="wftaskid" jdbcType="VARCHAR" />
<result column="workstationserial" property="workstationserial" jdbcType="VARCHAR" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
<result column="amount" property="amount" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, materialid, productid, wftaskid, workstationserial, insuser, insdt, amount
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_material_short
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from tb_material_short
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.material.MaterialShort" >
insert into tb_material_short (id, materialid, productid,
wftaskid, workstationserial, insuser,
insdt, amount)
values (#{id,jdbcType=VARCHAR}, #{materialid,jdbcType=VARCHAR}, #{productid,jdbcType=VARCHAR},
#{wftaskid,jdbcType=VARCHAR}, #{workstationserial,jdbcType=VARCHAR}, #{insuser,jdbcType=VARCHAR},
#{insdt,jdbcType=TIMESTAMP}, #{amount,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.material.MaterialShort" >
insert into tb_material_short
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="materialid != null" >
materialid,
</if>
<if test="productid != null" >
productid,
</if>
<if test="wftaskid != null" >
wftaskid,
</if>
<if test="workstationserial != null" >
workstationserial,
</if>
<if test="insuser != null" >
insuser,
</if>
<if test="insdt != null" >
insdt,
</if>
<if test="amount != null" >
amount,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="materialid != null" >
#{materialid,jdbcType=VARCHAR},
</if>
<if test="productid != null" >
#{productid,jdbcType=VARCHAR},
</if>
<if test="wftaskid != null" >
#{wftaskid,jdbcType=VARCHAR},
</if>
<if test="workstationserial != null" >
#{workstationserial,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
#{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
#{insdt,jdbcType=TIMESTAMP},
</if>
<if test="amount != null" >
#{amount,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.material.MaterialShort" >
update tb_material_short
<set >
<if test="materialid != null" >
materialid = #{materialid,jdbcType=VARCHAR},
</if>
<if test="productid != null" >
productid = #{productid,jdbcType=VARCHAR},
</if>
<if test="wftaskid != null" >
wftaskid = #{wftaskid,jdbcType=VARCHAR},
</if>
<if test="workstationserial != null" >
workstationserial = #{workstationserial,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
insdt = #{insdt,jdbcType=TIMESTAMP},
</if>
<if test="amount != null" >
amount = #{amount,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.material.MaterialShort" >
update tb_material_short
set materialid = #{materialid,jdbcType=VARCHAR},
productid = #{productid,jdbcType=VARCHAR},
wftaskid = #{wftaskid,jdbcType=VARCHAR},
workstationserial = #{workstationserial,jdbcType=VARCHAR},
insuser = #{insuser,jdbcType=VARCHAR},
insdt = #{insdt,jdbcType=TIMESTAMP},
amount = #{amount,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectListByWhere" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_material_short
${where}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String" >
delete from tb_material_short
${where}
</delete>
</mapper>

View File

@ -0,0 +1,174 @@
<?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="material.MaterialTypeMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.material.MaterialType" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="typecode" property="typecode" jdbcType="VARCHAR" />
<result column="typename" property="typename" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="VARCHAR" />
<result column="remark" property="remark" jdbcType="VARCHAR" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
<result column="modify" property="modify" jdbcType="VARCHAR" />
<result column="modifydt" property="modifydt" jdbcType="TIMESTAMP" />
<result column="parentid" property="parentid" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, typecode, typename, status, remark, insuser, insdt, modify, modifydt, parentid
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_material_type
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from tb_material_type
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.material.MaterialType" >
insert into tb_material_type (id, typecode, typename,
status, remark, insuser,
insdt, modify, modifydt,
parentid)
values (#{id,jdbcType=VARCHAR}, #{typecode,jdbcType=VARCHAR}, #{typename,jdbcType=VARCHAR},
#{status,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{insuser,jdbcType=VARCHAR},
#{insdt,jdbcType=TIMESTAMP}, #{modify,jdbcType=VARCHAR}, #{modifydt,jdbcType=TIMESTAMP},
#{parentid,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.material.MaterialType" >
insert into tb_material_type
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="typecode != null" >
typecode,
</if>
<if test="typename != null" >
typename,
</if>
<if test="status != null" >
status,
</if>
<if test="remark != null" >
remark,
</if>
<if test="insuser != null" >
insuser,
</if>
<if test="insdt != null" >
insdt,
</if>
<if test="modify != null" >
modify,
</if>
<if test="modifydt != null" >
modifydt,
</if>
<if test="parentid != null" >
parentid,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="typecode != null" >
#{typecode,jdbcType=VARCHAR},
</if>
<if test="typename != null" >
#{typename,jdbcType=VARCHAR},
</if>
<if test="status != null" >
#{status,jdbcType=VARCHAR},
</if>
<if test="remark != null" >
#{remark,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
#{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
#{insdt,jdbcType=TIMESTAMP},
</if>
<if test="modify != null" >
#{modify,jdbcType=VARCHAR},
</if>
<if test="modifydt != null" >
#{modifydt,jdbcType=TIMESTAMP},
</if>
<if test="parentid != null" >
#{parentid,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.material.MaterialType" >
update tb_material_type
<set >
<if test="typecode != null" >
typecode = #{typecode,jdbcType=VARCHAR},
</if>
<if test="typename != null" >
typename = #{typename,jdbcType=VARCHAR},
</if>
<if test="status != null" >
status = #{status,jdbcType=VARCHAR},
</if>
<if test="remark != null" >
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
insdt = #{insdt,jdbcType=TIMESTAMP},
</if>
<if test="modify != null" >
modify = #{modify,jdbcType=VARCHAR},
</if>
<if test="modifydt != null" >
modifydt = #{modifydt,jdbcType=TIMESTAMP},
</if>
<if test="parentid != null" >
parentid = #{parentid,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.material.MaterialType" >
update tb_material_type
set typecode = #{typecode,jdbcType=VARCHAR},
typename = #{typename,jdbcType=VARCHAR},
status = #{status,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
insuser = #{insuser,jdbcType=VARCHAR},
insdt = #{insdt,jdbcType=TIMESTAMP},
modify = #{modify,jdbcType=VARCHAR},
modifydt = #{modifydt,jdbcType=TIMESTAMP},
parentid = #{parentid,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectListByWhere" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_material_type
${where}
</select>
<select id="getListByTypename" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_material_type
where typename = #{typename,jdbcType=VARCHAR}
</select>
<select id="getListByTypecode" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_material_type
where typecode = #{typecode,jdbcType=VARCHAR}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String" >
delete from tb_material_type
${where}
</delete>
</mapper>

View File

@ -0,0 +1,144 @@
<?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="material.MaterialUnitMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.material.MaterialUnit" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="unit" property="unit" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="VARCHAR" />
<result column="remark" property="remark" jdbcType="VARCHAR" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
<result column="modify" property="modify" jdbcType="VARCHAR" />
<result column="modifydt" property="modifydt" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Base_Column_List" >
id, unit, status, remark, insuser, insdt, modify, modifydt
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_material_unit
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from tb_material_unit
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.material.MaterialUnit" >
insert into tb_material_unit (id, unit, status,
remark, insuser, insdt,
modify, modifydt)
values (#{id,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR}, #{insuser,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP},
#{modify,jdbcType=VARCHAR}, #{modifydt,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.material.MaterialUnit" >
insert into tb_material_unit
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="unit != null" >
unit,
</if>
<if test="status != null" >
status,
</if>
<if test="remark != null" >
remark,
</if>
<if test="insuser != null" >
insuser,
</if>
<if test="insdt != null" >
insdt,
</if>
<if test="modify != null" >
modify,
</if>
<if test="modifydt != null" >
modifydt,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="unit != null" >
#{unit,jdbcType=VARCHAR},
</if>
<if test="status != null" >
#{status,jdbcType=VARCHAR},
</if>
<if test="remark != null" >
#{remark,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
#{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
#{insdt,jdbcType=TIMESTAMP},
</if>
<if test="modify != null" >
#{modify,jdbcType=VARCHAR},
</if>
<if test="modifydt != null" >
#{modifydt,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.material.MaterialUnit" >
update tb_material_unit
<set >
<if test="unit != null" >
unit = #{unit,jdbcType=VARCHAR},
</if>
<if test="status != null" >
status = #{status,jdbcType=VARCHAR},
</if>
<if test="remark != null" >
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
insdt = #{insdt,jdbcType=TIMESTAMP},
</if>
<if test="modify != null" >
modify = #{modify,jdbcType=VARCHAR},
</if>
<if test="modifydt != null" >
modifydt = #{modifydt,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.material.MaterialUnit" >
update tb_material_unit
set unit = #{unit,jdbcType=VARCHAR},
status = #{status,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
insuser = #{insuser,jdbcType=VARCHAR},
insdt = #{insdt,jdbcType=TIMESTAMP},
modify = #{modify,jdbcType=VARCHAR},
modifydt = #{modifydt,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectListByWhere" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_material_unit
${where}
</select>
<select id="getListByUnit" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_material_unit
where unit = #{unit,jdbcType=VARCHAR}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String" >
delete from tb_material_unit
${where}
</delete>
</mapper>

View File

@ -0,0 +1,202 @@
<?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="material.NotBOMMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.material.NotBOM" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="pid" property="pid" jdbcType="VARCHAR" />
<result column="handletype" property="handletype" jdbcType="VARCHAR" />
<result column="materialcode" property="materialcode" jdbcType="VARCHAR" />
<result column="materialname" property="materialname" jdbcType="VARCHAR" />
<result column="materialid" property="materialid" jdbcType="VARCHAR" />
<result column="unit" property="unit" jdbcType="VARCHAR" />
<result column="linestocknum" property="linestocknum" jdbcType="VARCHAR" />
<result column="warehousestocknum" property="warehousestocknum" jdbcType="VARCHAR" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
<result column="handlenum" property="handlenum" jdbcType="VARCHAR" />
<result column="handledate" property="handledate" jdbcType="TIMESTAMP" />
<result column="materialmodel" property="materialmodel" jdbcType="VARCHAR" />
<result column="inventoryFrontLine" property="inventoryFrontLine" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, pid, handletype, materialname, materialid, unit, linestocknum, warehousestocknum,
insuser, insdt, handlenum, handledate
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_material_notbom
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from tb_material_notbom
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.material.NotBOM" >
insert into tb_material_notbom (id, pid, handletype,
materialname, materialid,
unit, linestocknum, warehousestocknum,
insuser, insdt, handlenum,
handledate)
values (#{id,jdbcType=VARCHAR}, #{pid,jdbcType=VARCHAR}, #{handletype,jdbcType=VARCHAR},
#{materialname,jdbcType=VARCHAR}, #{materialid,jdbcType=VARCHAR},
#{unit,jdbcType=VARCHAR}, #{linestocknum,jdbcType=VARCHAR}, #{warehousestocknum,jdbcType=VARCHAR},
#{insuser,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP}, #{handlenum,jdbcType=VARCHAR},
#{handledate,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.material.NotBOM" >
insert into tb_material_notbom
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="pid != null" >
pid,
</if>
<if test="handletype != null" >
handletype,
</if>
<if test="materialname != null" >
materialname,
</if>
<if test="materialid != null" >
materialid,
</if>
<if test="unit != null" >
unit,
</if>
<if test="linestocknum != null" >
linestocknum,
</if>
<if test="warehousestocknum != null" >
warehousestocknum,
</if>
<if test="insuser != null" >
insuser,
</if>
<if test="insdt != null" >
insdt,
</if>
<if test="handlenum != null" >
handlenum,
</if>
<if test="handledate != null" >
handledate,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="pid != null" >
#{pid,jdbcType=VARCHAR},
</if>
<if test="handletype != null" >
#{handletype,jdbcType=VARCHAR},
</if>
<if test="materialname != null" >
#{materialname,jdbcType=VARCHAR},
</if>
<if test="materialid != null" >
#{materialid,jdbcType=VARCHAR},
</if>
<if test="unit != null" >
#{unit,jdbcType=VARCHAR},
</if>
<if test="linestocknum != null" >
#{linestocknum,jdbcType=VARCHAR},
</if>
<if test="warehousestocknum != null" >
#{warehousestocknum,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
#{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
#{insdt,jdbcType=TIMESTAMP},
</if>
<if test="handlenum != null" >
#{handlenum,jdbcType=VARCHAR},
</if>
<if test="handledate != null" >
#{handledate,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.material.NotBOM" >
update tb_material_notbom
<set >
<if test="pid != null" >
pid = #{pid,jdbcType=VARCHAR},
</if>
<if test="handletype != null" >
handletype = #{handletype,jdbcType=VARCHAR},
</if>
<if test="materialname != null" >
materialname = #{materialname,jdbcType=VARCHAR},
</if>
<if test="materialid != null" >
materialid = #{materialid,jdbcType=VARCHAR},
</if>
<if test="unit != null" >
unit = #{unit,jdbcType=VARCHAR},
</if>
<if test="linestocknum != null" >
linestocknum = #{linestocknum,jdbcType=VARCHAR},
</if>
<if test="warehousestocknum != null" >
warehousestocknum = #{warehousestocknum,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
insdt = #{insdt,jdbcType=TIMESTAMP},
</if>
<if test="handlenum != null" >
handlenum = #{handlenum,jdbcType=VARCHAR},
</if>
<if test="handledate != null" >
handledate = #{handledate,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.material.NotBOM" >
update tb_material_notbom
set pid = #{pid,jdbcType=VARCHAR},
handletype = #{handletype,jdbcType=VARCHAR},
materialname = #{materialname,jdbcType=VARCHAR},
materialid = #{materialid,jdbcType=VARCHAR},
unit = #{unit,jdbcType=VARCHAR},
linestocknum = #{linestocknum,jdbcType=VARCHAR},
warehousestocknum = #{warehousestocknum,jdbcType=VARCHAR},
insuser = #{insuser,jdbcType=VARCHAR},
insdt = #{insdt,jdbcType=TIMESTAMP},
handlenum = #{handlenum,jdbcType=VARCHAR},
handledate = #{handledate,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectListByWhere" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_material_notbom
${where}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String" >
delete from tb_material_notbom
${where}
</delete>
<select id="selectListByMaterial" resultMap="BaseResultMap" parameterType="java.lang.String" >
select A.materialname,A.materialcode,A.unit,A.materialmodel,
I.inventoryFrontLine,
N.handledate,N.materialid,
N.id
from tb_material_notbom N
left outer join tb_material_allinfo A on A.id = N.materialid
left outer join tb_material_inventory I on I.materialid = N.materialid
${where}
</select>
</mapper>

View File

@ -0,0 +1,153 @@
<?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="material.NotBOMPickMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.material.NotBOMPick" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
<result column="handletype" property="handletype" jdbcType="VARCHAR" />
<result column="materialid" property="materialid" jdbcType="VARCHAR" />
<result column="allinfoid" property="allinfoid" jdbcType="VARCHAR" />
<result column="handlenum" property="handlenum" jdbcType="VARCHAR" />
<result column="handledate" property="handledate" jdbcType="TIMESTAMP" />
<result column="unit" property="unit" jdbcType="VARCHAR" />
<result column="materialname" property="materialname" jdbcType="VARCHAR" />
<result column="materialcode" property="materialcode" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, insuser, insdt, handletype, materialid, allinfoid, handlenum, handledate
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_material_notbompick
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from tb_material_notbompick
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.material.NotBOMPick" >
insert into tb_material_notbompick (id, insuser, insdt,
handletype, materialid, allinfoid,
handlenum, handledate
)
values (#{id,jdbcType=VARCHAR}, #{insuser,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP},
#{handletype,jdbcType=VARCHAR}, #{materialid,jdbcType=VARCHAR}, #{allinfoid,jdbcType=VARCHAR},
#{handlenum,jdbcType=VARCHAR}, #{handledate,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.material.NotBOMPick" >
insert into tb_material_notbompick
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="insuser != null" >
insuser,
</if>
<if test="insdt != null" >
insdt,
</if>
<if test="handletype != null" >
handletype,
</if>
<if test="materialid != null" >
materialid,
</if>
<if test="allinfoid != null" >
allinfoid,
</if>
<if test="handlenum != null" >
handlenum,
</if>
<if test="handledate != null" >
handledate,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
#{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
#{insdt,jdbcType=TIMESTAMP},
</if>
<if test="handletype != null" >
#{handletype,jdbcType=VARCHAR},
</if>
<if test="materialid != null" >
#{materialid,jdbcType=VARCHAR},
</if>
<if test="allinfoid != null" >
#{allinfoid,jdbcType=VARCHAR},
</if>
<if test="handlenum != null" >
#{handlenum,jdbcType=VARCHAR},
</if>
<if test="handledate != null" >
#{handledate,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.material.NotBOMPick" >
update tb_material_notbompick
<set >
<if test="insuser != null" >
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
insdt = #{insdt,jdbcType=TIMESTAMP},
</if>
<if test="handletype != null" >
handletype = #{handletype,jdbcType=VARCHAR},
</if>
<if test="materialid != null" >
materialid = #{materialid,jdbcType=VARCHAR},
</if>
<if test="allinfoid != null" >
allinfoid = #{allinfoid,jdbcType=VARCHAR},
</if>
<if test="handlenum != null" >
handlenum = #{handlenum,jdbcType=VARCHAR},
</if>
<if test="handledate != null" >
handledate = #{handledate,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.material.NotBOMPick" >
update tb_material_notbompick
set insuser = #{insuser,jdbcType=VARCHAR},
insdt = #{insdt,jdbcType=TIMESTAMP},
handletype = #{handletype,jdbcType=VARCHAR},
materialid = #{materialid,jdbcType=VARCHAR},
allinfoid = #{allinfoid,jdbcType=VARCHAR},
handlenum = #{handlenum,jdbcType=VARCHAR},
handledate = #{handledate,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectListByWhere" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_material_notbompick
${where}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String" >
delete from tb_material_notbompick
${where}
</delete>
<select id="selectListByMaterial" resultMap="BaseResultMap" parameterType="java.lang.String">
select P.handletype,P.handlenum,P.insuser,P.handledate,P.id,P.materialid,
A.materialname,A.materialcode,A.unit
from tb_material_notbompick P
left outer join tb_material_notbom N on N.id = P.materialid
left outer join tb_material_allinfo A on A.id = N.materialid
${where}
</select>
</mapper>

View File

@ -0,0 +1,135 @@
<?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="material.OrderProductDetailMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.material.OrderProductDetail" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
<result column="pid" property="pid" jdbcType="VARCHAR" />
<result column="productUId" property="productuid" jdbcType="VARCHAR" />
<result column="productionorderno" property="productionorderno" jdbcType="VARCHAR" />
<result column="workorderId" property="workorderid" jdbcType="VARCHAR" />
<result column="processrealid" property="processrealid" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, insuser, insdt, pid, productUId, productionorderno,workorderId,processrealid,status
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from TB_material_OrderProductDetail
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from TB_material_OrderProductDetail
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.material.OrderProductDetail" >
insert into TB_material_OrderProductDetail (id, insuser, insdt,
pid, productUId,productionorderno,workorderId,processrealid,status)
values (#{id,jdbcType=VARCHAR}, #{insuser,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP},
#{pid,jdbcType=VARCHAR}, #{productuid,jdbcType=VARCHAR}, #{productionorderno,jdbcType=VARCHAR}, #{workorderid,jdbcType=VARCHAR},
#{processrealid,jdbcType=VARCHAR},#{status,jdbcType=VARCHAR})
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.material.OrderProductDetail" >
update TB_material_OrderProductDetail
<set >
<if test="insuser != null" >
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
insdt = #{insdt,jdbcType=TIMESTAMP},
</if>
<if test="pid != null" >
pid = #{pid,jdbcType=VARCHAR},
</if>
<if test="productuid != null" >
productUId = #{productuid,jdbcType=VARCHAR},
</if>
<if test="productionorderno != null" >
productionorderno = #{productionorderno,jdbcType=VARCHAR},
</if>
<if test="workorderid != null" >
workorderId = #{workorderid,jdbcType=VARCHAR},
</if>
<if test="processrealid != null" >
processrealid = #{processrealid,jdbcType=VARCHAR},
</if>
<if test="status != null" >
status = #{status,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateBySetAndWhere" parameterType="com.sipai.entity.material.OrderProductDetail" >
update
${where}
</update>
<select id="selectListByWhere" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from TB_material_OrderProductDetail
${where}
</select>
<select id="selectByWhere" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from TB_material_OrderProductDetail
${where}
</select>
<select id="selectTopNByWhere" resultMap="BaseResultMap" parameterType="java.util.Map" >
select TOP ${numN}
<include refid="Base_Column_List" />
from TB_material_OrderProductDetail
${wherestr}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String" >
delete from TB_material_OrderProductDetail
${where}
</delete>
<select id="getOrderProductDetail" resultMap="ClassResultMapOPD" parameterType="java.lang.String">
SELECT
D.id as d_id,
D.insuser as d_insuser,
D.insdt as d_insdt,
D.pid as d_pid,
D.productUId as d_productUId,
D.productionorderno as d_productionorderno,
D.workorderId as d_workorderId,
D.processrealid as d_processrealid,
D.status as d_status,
O.id as o_id,
O.wfOrderid as o_wfOrderid,
O.productionOrderNo as o_productionOrderNo,
W.id as w_id,
W.order_State as w_orderstate,
P.id as p_id,
S.id as s_id,
S.plandt as s_plandt
from TB_material_OrderProductDetail D
LEFT OUTER JOIN tb_work_order O ON O.id = D.workorderid
LEFT OUTER JOIN wf_hist_order W ON W.id = O.wfOrderid
LEFT OUTER JOIN tb_plan_day P ON P.productionOrderNo = D.productionOrderNo
LEFT OUTER JOIN TB_plan_dailyplanSummary S ON S.id = P.pid
${where}
</select>
<resultMap id="ClassResultMapOPD" type="com.sipai.entity.material.OrderProductDetail">
<id property="id" column="d_id" />
<result property="insuser" column="d_insuser"/>
<result property="insdt" column="d_insdt"/>
<result property="pid" column="d_pid"/>
<result property="productuid" column="d_productUId"/>
<result property="productionorderno" column="d_productionorderno"/>
<result property="workorderid" column="d_workorderId"/>
<result property="processrealid" column="d_processrealid"/>
<result property="status" column="d_status"/>
<result property="finishflag_wfo" column="w_orderstate"/>
<result property="_planid" column="p_id"/>
<association property="workorder" javaType="com.sipai.entity.work.WorkOrder" >
<id property="id" column="o_id"/>
<result property="wforderid" column="o_wforderid"/>
<result property="productionorderno" column="o_productionorderno"/>
</association>
</resultMap>
</mapper>

View File

@ -0,0 +1,133 @@
<?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="material.OrderProductDetailconnectMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.material.OrderProductDetailconnect" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="planid" property="planid" jdbcType="VARCHAR" />
<result column="productdetailid" property="productdetailid" jdbcType="VARCHAR" />
<result column="workorderid" property="workorderid" jdbcType="VARCHAR" />
<result column="processrealid" property="processrealid" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, insdt, insuser, planid, productdetailid, workorderid, processrealid
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from TB_material_OrderProductDetail_connect
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from TB_material_OrderProductDetail_connect
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.material.OrderProductDetailconnect" >
insert into TB_material_OrderProductDetail_connect (id, insdt, insuser,
planid, productdetailid, workorderid,
processrealid)
values (#{id,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP}, #{insuser,jdbcType=VARCHAR},
#{planid,jdbcType=VARCHAR}, #{productdetailid,jdbcType=VARCHAR}, #{workorderid,jdbcType=VARCHAR},
#{processrealid,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.material.OrderProductDetailconnect" >
insert into TB_material_OrderProductDetail_connect
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="insdt != null" >
insdt,
</if>
<if test="insuser != null" >
insuser,
</if>
<if test="planid != null" >
planid,
</if>
<if test="productdetailid != null" >
productdetailid,
</if>
<if test="workorderid != null" >
workorderid,
</if>
<if test="processrealid != null" >
processrealid,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
#{insdt,jdbcType=TIMESTAMP},
</if>
<if test="insuser != null" >
#{insuser,jdbcType=VARCHAR},
</if>
<if test="planid != null" >
#{planid,jdbcType=VARCHAR},
</if>
<if test="productdetailid != null" >
#{productdetailid,jdbcType=VARCHAR},
</if>
<if test="workorderid != null" >
#{workorderid,jdbcType=VARCHAR},
</if>
<if test="processrealid != null" >
#{processrealid,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.material.OrderProductDetailconnect" >
update TB_material_OrderProductDetail_connect
<set >
<if test="insdt != null" >
insdt = #{insdt,jdbcType=TIMESTAMP},
</if>
<if test="insuser != null" >
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="planid != null" >
planid = #{planid,jdbcType=VARCHAR},
</if>
<if test="productdetailid != null" >
productdetailid = #{productdetailid,jdbcType=VARCHAR},
</if>
<if test="workorderid != null" >
workorderid = #{workorderid,jdbcType=VARCHAR},
</if>
<if test="processrealid != null" >
processrealid = #{processrealid,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.material.OrderProductDetailconnect" >
update TB_material_OrderProductDetail_connect
set insdt = #{insdt,jdbcType=TIMESTAMP},
insuser = #{insuser,jdbcType=VARCHAR},
planid = #{planid,jdbcType=VARCHAR},
productdetailid = #{productdetailid,jdbcType=VARCHAR},
workorderid = #{workorderid,jdbcType=VARCHAR},
processrealid = #{processrealid,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectListByWhere" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from TB_material_OrderProductDetail_connect
${where}
</select>
<select id="selectByWhere" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from TB_material_OrderProductDetail_connect
${where}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String" >
delete from TB_material_OrderProductDetail_connect
${where}
</delete>
</mapper>

View File

@ -0,0 +1,203 @@
<?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="material.SalesOrderProductMapper">
<resultMap id="BaseResultMap" type="com.sipai.entity.material.SalesOrderProduct">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="insuser" jdbcType="VARCHAR" property="insuser" />
<result column="insdt" jdbcType="TIMESTAMP" property="insdt" />
<result column="SalesOrderNo" jdbcType="VARCHAR" property="salesorderno" />
<result column="clientsid" jdbcType="VARCHAR" property="clientsid" />
<result column="productid" jdbcType="VARCHAR" property="productid" />
<result column="productNum" jdbcType="VARCHAR" property="productnum" />
<result column="OrderCreateDate" jdbcType="TIMESTAMP" property="ordercreatedate" />
<result column="OrderFinishDate" jdbcType="TIMESTAMP" property="orderfinishdate" />
<result column="deliverydate" jdbcType="TIMESTAMP" property="deliverydate" />
<result column="status" jdbcType="VARCHAR" property="status" />
</resultMap>
<sql id="Base_Column_List">
id, insuser, insdt, SalesOrderNo, clientsid, productid, productNum, OrderCreateDate,
OrderFinishDate, deliverydate, status
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from TB_material_SalesOrderProduct
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from TB_material_SalesOrderProduct
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.material.SalesOrderProduct">
insert into TB_material_SalesOrderProduct (id, insuser, insdt,
SalesOrderNo, clientsid, productid,
productNum, OrderCreateDate, OrderFinishDate,
deliverydate, status)
values (#{id,jdbcType=VARCHAR}, #{insuser,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP},
#{salesorderno,jdbcType=VARCHAR}, #{clientsid,jdbcType=VARCHAR}, #{productid,jdbcType=VARCHAR},
#{productnum,jdbcType=VARCHAR}, #{ordercreatedate,jdbcType=TIMESTAMP}, #{orderfinishdate,jdbcType=TIMESTAMP},
#{deliverydate,jdbcType=TIMESTAMP}, #{status,jdbcType=VARCHAR})
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.material.SalesOrderProduct">
update TB_material_SalesOrderProduct
<set>
<if test="insuser != null">
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null">
insdt = #{insdt,jdbcType=TIMESTAMP},
</if>
<if test="salesorderno != null">
SalesOrderNo = #{salesorderno,jdbcType=VARCHAR},
</if>
<if test="clientsid != null">
clientsid = #{clientsid,jdbcType=VARCHAR},
</if>
<if test="productid != null">
productid = #{productid,jdbcType=VARCHAR},
</if>
<if test="productnum != null">
productNum = #{productnum,jdbcType=VARCHAR},
</if>
<if test="ordercreatedate != null">
OrderCreateDate = #{ordercreatedate,jdbcType=TIMESTAMP},
</if>
<if test="orderfinishdate != null">
OrderFinishDate = #{orderfinishdate,jdbcType=TIMESTAMP},
</if>
<if test="deliverydate != null">
deliverydate = #{deliverydate,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
status = #{status,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectListByWhere" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from TB_material_SalesOrderProduct
${where}
</select>
<select id="selectByWhere" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from TB_material_SalesOrderProduct
${where}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String">
delete from TB_material_SalesOrderProduct
${where}
</delete>
<select id="getSalesOrderProductlist" parameterType="java.lang.String" resultMap="ClassResultMapSOPlist">
SELECT
P.id as p_id,
P.insuser as p_insuser,
P.insdt as P_insdt,
P.SalesOrderNo,
P.productid,
P.productNum,
P.OrderCreateDate,
P.OrderFinishDate,
P.deliverydate,
P.status,
I.id as i_id,
I.materialname,
I.materialcode,
I.spec,
C.name as clientname
FROM TB_material_SalesOrderProduct P
LEFT OUTER JOIN tb_material_info I ON I.id = P.productid
LEFT OUTER JOIN tb_clients C ON C.id = P.clientsid
${where}
</select>
<resultMap id="ClassResultMapSOPlist" type="com.sipai.entity.material.SalesOrderProduct">
<id column="p_id" property="id" />
<result column="p_insuser" property="insuser" />
<result column="p_insdt" property="insdt" />
<result column="salesorderno" property="salesorderno" />
<result column="productid" property="productid" />
<result column="productNum" property="productnum" />
<result column="OrderCreateDate" property="ordercreatedate" />
<result column="OrderFinishDate" property="orderfinishdate" />
<result column="deliverydate" property="deliverydate" />
<result column="status" property="status" />
<result column="clientname" property="clientname" />
<association javaType="com.sipai.entity.material.MaterialInfo" property="product">
<id column="i_id" property="id" />
<result column="materialname" property="materialname" />
<result column="materialcode" property="materialcode" />
<result column="spec" property="spec" />
</association>
</resultMap>
<select id="getSalesOrderProduct" parameterType="java.lang.String" resultMap="ClassResultMapSOP">
SELECT
P.id as p_id,
P.insuser as p_insuser,
P.insdt as P_insdt,
P.SalesOrderNo,
P.productid,
P.productNum,
P.OrderCreateDate,
P.OrderFinishDate,
P.deliverydate,
P.status,
D.id as d_id,
D.ProductUId,
D.productionorderno,
D.workorderId,
I.id as i_id,
I.materialname,
I.materialcode,
I.spec,
p.clientsid
FROM TB_material_SalesOrderProduct P
LEFT OUTER JOIN TB_material_OrderProductDetail D ON D.pid = P.id
LEFT OUTER JOIN tb_material_info I ON I.id = P.productid
LEFT OUTER JOIN tb_clients c ON c.id = P.clientsid
${where}
</select>
<resultMap id="ClassResultMapSOP" type="com.sipai.entity.material.SalesOrderProduct">
<id column="p_id" property="id" />
<result column="p_insuser" property="insuser" />
<result column="p_insdt" property="insdt" />
<result column="salesorderno" property="salesorderno" />
<result column="productid" property="productid" />
<result column="productNum" property="productnum" />
<result column="OrderCreateDate" property="ordercreatedate" />
<result column="OrderFinishDate" property="orderfinishdate" />
<result column="deliverydate" property="deliverydate" />
<result column="status" property="status" />
<result column="clientsid" property="clientsid" />
<association javaType="com.sipai.entity.material.MaterialInfo" property="product">
<id column="i_id" property="id" />
<result column="materialname" property="materialname" />
<result column="materialcode" property="materialcode" />
<result column="spec" property="spec" />
</association>
<collection column="clientsid" property="clients" ofType="com.sipai.entity.material.Clients" select="selectclients">
</collection>
<collection ofType="com.sipai.entity.material.OrderProductDetail" property="orderproductdetail">
<id column="d_id" property="id" />
<result column="ProductUId" property="productuid" />
<result column="productionorderno" property="productionorderno" />
<result column="workorderId" property="workorderid" />
</collection>
</resultMap>
<select id="selectclients" resultType="com.sipai.entity.material.Clients" parameterType="java.lang.String" >
select * from tb_clients where id = #{clientsid,jdbcType=VARCHAR}
</select>
<select id="selectDistinctOrderByWhere" parameterType="java.lang.String" resultMap="BaseResultMap">
select salesorderno,
SUM(case when productNum is not null then convert(int,productNum) else 0 end) as productnum
from TB_material_SalesOrderProduct
${where}
</select>
</mapper>