first commit
This commit is contained in:
570
bin/target/classes/com/sipai/mapper/plan/DailyPlanMapper.xml
Normal file
570
bin/target/classes/com/sipai/mapper/plan/DailyPlanMapper.xml
Normal file
@ -0,0 +1,570 @@
|
||||
<?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="plan.DailyPlanMapper">
|
||||
<resultMap id="BaseResultMap" type="com.sipai.entity.plan.DailyPlan">
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="stdt" jdbcType="TIMESTAMP" property="stdt" />
|
||||
<result column="eddt" jdbcType="TIMESTAMP" property="eddt" />
|
||||
<result column="productNo" jdbcType="VARCHAR" property="productno" />
|
||||
<result column="productName" jdbcType="VARCHAR" property="productname" />
|
||||
<result column="lineid" jdbcType="VARCHAR" property="lineid" />
|
||||
<result column="bomid" jdbcType="VARCHAR" property="bomid" />
|
||||
<result column="dwgid" jdbcType="VARCHAR" property="dwgid" />
|
||||
<result column="insuser" jdbcType="VARCHAR" property="insuser" />
|
||||
<result column="insdt" jdbcType="TIMESTAMP" property="insdt" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
<result column="type" jdbcType="VARCHAR" property="type" />
|
||||
<result column="taskOrderID" jdbcType="VARCHAR" property="taskorderid" />
|
||||
<result column="productionOrderNo" jdbcType="VARCHAR" property="productionorderno" />
|
||||
<result column="productQuantity" jdbcType="VARCHAR" property="productquantity" />
|
||||
<result column="finishedQuantity" jdbcType="VARCHAR" property="finishedquantity" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="suspended" jdbcType="VARCHAR" property="suspended" />
|
||||
<result column="taskchangedstatus" jdbcType="VARCHAR" property="taskchangedstatus" />
|
||||
<result column="processrealid" jdbcType="VARCHAR" property="processrealid" />
|
||||
<result column="plandt" jdbcType="TIMESTAMP" property="plandt" />
|
||||
<result column="pid" jdbcType="VARCHAR" property="pid" />
|
||||
<result column="porder" jdbcType="INTEGER" property="porder" />
|
||||
<result column="workorderid" jdbcType="VARCHAR" property="workorderid" />
|
||||
<result column="wfOrderId" jdbcType="VARCHAR" property="wforderid" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, stdt, eddt, productNo, productName, lineid, bomid, dwgid, insuser, insdt, remark,
|
||||
type, taskOrderID, productionOrderNo, productQuantity, finishedQuantity, status,
|
||||
suspended, taskchangedstatus, processrealid, plandt, pid, porder, workorderid, wfOrderId
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from tb_plan_day
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from tb_plan_day
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.sipai.entity.plan.DailyPlan">
|
||||
insert into tb_plan_day (id, stdt, eddt,
|
||||
productNo, productName, lineid,
|
||||
bomid, dwgid, insuser,
|
||||
insdt, remark, type,
|
||||
taskOrderID, productionOrderNo, productQuantity,
|
||||
finishedQuantity, status, suspended,
|
||||
taskchangedstatus, processrealid, plandt,
|
||||
pid, porder, workorderid,
|
||||
wfOrderId)
|
||||
values (#{id,jdbcType=VARCHAR}, #{stdt,jdbcType=TIMESTAMP}, #{eddt,jdbcType=TIMESTAMP},
|
||||
#{productno,jdbcType=VARCHAR}, #{productname,jdbcType=VARCHAR}, #{lineid,jdbcType=VARCHAR},
|
||||
#{bomid,jdbcType=VARCHAR}, #{dwgid,jdbcType=VARCHAR}, #{insuser,jdbcType=VARCHAR},
|
||||
#{insdt,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
|
||||
#{taskorderid,jdbcType=VARCHAR}, #{productionorderno,jdbcType=VARCHAR}, #{productquantity,jdbcType=VARCHAR},
|
||||
#{finishedquantity,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{suspended,jdbcType=VARCHAR},
|
||||
#{taskchangedstatus,jdbcType=VARCHAR}, #{processrealid,jdbcType=VARCHAR}, #{plandt,jdbcType=TIMESTAMP},
|
||||
#{pid,jdbcType=VARCHAR}, #{porder,jdbcType=INTEGER}, #{workorderid,jdbcType=VARCHAR},
|
||||
#{wforderid,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.sipai.entity.plan.DailyPlan">
|
||||
insert into tb_plan_day
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="stdt != null">
|
||||
stdt,
|
||||
</if>
|
||||
<if test="eddt != null">
|
||||
eddt,
|
||||
</if>
|
||||
<if test="productno != null">
|
||||
productNo,
|
||||
</if>
|
||||
<if test="productname != null">
|
||||
productName,
|
||||
</if>
|
||||
<if test="lineid != null">
|
||||
lineid,
|
||||
</if>
|
||||
<if test="bomid != null">
|
||||
bomid,
|
||||
</if>
|
||||
<if test="dwgid != null">
|
||||
dwgid,
|
||||
</if>
|
||||
<if test="insuser != null">
|
||||
insuser,
|
||||
</if>
|
||||
<if test="insdt != null">
|
||||
insdt,
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark,
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type,
|
||||
</if>
|
||||
<if test="taskorderid != null">
|
||||
taskOrderID,
|
||||
</if>
|
||||
<if test="productionorderno != null">
|
||||
productionOrderNo,
|
||||
</if>
|
||||
<if test="productquantity != null">
|
||||
productQuantity,
|
||||
</if>
|
||||
<if test="finishedquantity != null">
|
||||
finishedQuantity,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="suspended != null">
|
||||
suspended,
|
||||
</if>
|
||||
<if test="taskchangedstatus != null">
|
||||
taskchangedstatus,
|
||||
</if>
|
||||
<if test="processrealid != null">
|
||||
processrealid,
|
||||
</if>
|
||||
<if test="plandt != null">
|
||||
plandt,
|
||||
</if>
|
||||
<if test="pid != null">
|
||||
pid,
|
||||
</if>
|
||||
<if test="porder != null">
|
||||
porder,
|
||||
</if>
|
||||
<if test="workorderid != null">
|
||||
workorderid,
|
||||
</if>
|
||||
<if test="wforderid != null">
|
||||
wfOrderId,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="stdt != null">
|
||||
#{stdt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="eddt != null">
|
||||
#{eddt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="productno != null">
|
||||
#{productno,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="productname != null">
|
||||
#{productname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lineid != null">
|
||||
#{lineid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bomid != null">
|
||||
#{bomid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="dwgid != null">
|
||||
#{dwgid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="insuser != null">
|
||||
#{insuser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="insdt != null">
|
||||
#{insdt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
#{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
#{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="taskorderid != null">
|
||||
#{taskorderid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="productionorderno != null">
|
||||
#{productionorderno,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="productquantity != null">
|
||||
#{productquantity,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="finishedquantity != null">
|
||||
#{finishedquantity,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="suspended != null">
|
||||
#{suspended,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="taskchangedstatus != null">
|
||||
#{taskchangedstatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="processrealid != null">
|
||||
#{processrealid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="plandt != null">
|
||||
#{plandt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="pid != null">
|
||||
#{pid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="porder != null">
|
||||
#{porder,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="workorderid != null">
|
||||
#{workorderid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="wforderid != null">
|
||||
#{wforderid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.plan.DailyPlan">
|
||||
update tb_plan_day
|
||||
<set>
|
||||
<if test="stdt != null">
|
||||
stdt = #{stdt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="eddt != null">
|
||||
eddt = #{eddt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="productno != null">
|
||||
productNo = #{productno,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="productname != null">
|
||||
productName = #{productname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lineid != null">
|
||||
lineid = #{lineid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bomid != null">
|
||||
bomid = #{bomid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="dwgid != null">
|
||||
dwgid = #{dwgid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="insuser != null">
|
||||
insuser = #{insuser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="insdt != null">
|
||||
insdt = #{insdt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="taskorderid != null">
|
||||
taskOrderID = #{taskorderid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="productionorderno != null">
|
||||
productionOrderNo = #{productionorderno,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="productquantity != null">
|
||||
productQuantity = #{productquantity,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="finishedquantity != null">
|
||||
finishedQuantity = #{finishedquantity,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="suspended != null">
|
||||
suspended = #{suspended,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="taskchangedstatus != null">
|
||||
taskchangedstatus = #{taskchangedstatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="processrealid != null">
|
||||
processrealid = #{processrealid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="plandt != null">
|
||||
plandt = #{plandt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="pid != null">
|
||||
pid = #{pid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="porder != null">
|
||||
porder = #{porder,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="workorderid != null">
|
||||
workorderid = #{workorderid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="wforderid != null">
|
||||
wfOrderId = #{wforderid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.plan.DailyPlan">
|
||||
update tb_plan_day
|
||||
set stdt = #{stdt,jdbcType=TIMESTAMP},
|
||||
eddt = #{eddt,jdbcType=TIMESTAMP},
|
||||
productNo = #{productno,jdbcType=VARCHAR},
|
||||
productName = #{productname,jdbcType=VARCHAR},
|
||||
lineid = #{lineid,jdbcType=VARCHAR},
|
||||
bomid = #{bomid,jdbcType=VARCHAR},
|
||||
dwgid = #{dwgid,jdbcType=VARCHAR},
|
||||
insuser = #{insuser,jdbcType=VARCHAR},
|
||||
insdt = #{insdt,jdbcType=TIMESTAMP},
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
taskOrderID = #{taskorderid,jdbcType=VARCHAR},
|
||||
productionOrderNo = #{productionorderno,jdbcType=VARCHAR},
|
||||
productQuantity = #{productquantity,jdbcType=VARCHAR},
|
||||
finishedQuantity = #{finishedquantity,jdbcType=VARCHAR},
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
suspended = #{suspended,jdbcType=VARCHAR},
|
||||
taskchangedstatus = #{taskchangedstatus,jdbcType=VARCHAR},
|
||||
processrealid = #{processrealid,jdbcType=VARCHAR},
|
||||
plandt = #{plandt,jdbcType=TIMESTAMP},
|
||||
pid = #{pid,jdbcType=VARCHAR},
|
||||
porder = #{porder,jdbcType=INTEGER},
|
||||
workorderid = #{workorderid,jdbcType=VARCHAR},
|
||||
wfOrderId = #{wforderid,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_plan_day
|
||||
${where}
|
||||
</select>
|
||||
<select id="selectByWhere" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from tb_plan_day
|
||||
${where}
|
||||
</select>
|
||||
<select id="selectValueBySql" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
${sql}
|
||||
</select>
|
||||
<delete id="deleteByWhere" parameterType="java.lang.String">
|
||||
delete from tb_plan_day
|
||||
${where}
|
||||
</delete>
|
||||
<select id="getDailyPlanlist" parameterType="java.lang.String" resultMap="ClassResultMapDailyPlanlist">
|
||||
SELECT
|
||||
P.id as p_id,
|
||||
P.stdt,
|
||||
P.eddt,
|
||||
P.productNo,
|
||||
P.productName,
|
||||
P.lineid,
|
||||
P.bomid,
|
||||
P.dwgid,
|
||||
P.insuser as p_insuser,
|
||||
P.insdt as p_insdt,
|
||||
P.remark as p_remark,
|
||||
P.type as p_type,
|
||||
P.taskOrderID as p_taskOrderID,
|
||||
P.productionOrderNo,
|
||||
P.productQuantity,
|
||||
P.finishedQuantity,
|
||||
P.status as p_status,
|
||||
P.suspended as p_delflag,
|
||||
P.taskchangedstatus,
|
||||
P.processrealid,
|
||||
P.pid as p_pid,
|
||||
P.porder as p_porder,
|
||||
S.id as s_id,
|
||||
S.insuser as s_insuser,
|
||||
S.insdt as s_insdt,
|
||||
S.SalesOrderNo,
|
||||
S.productid,
|
||||
S.productNum,
|
||||
s.OrderCreateDate,
|
||||
S.OrderFinishDate,
|
||||
I.id as i_id,
|
||||
I.materialname,
|
||||
R.name as r_name
|
||||
FROM tb_plan_day P
|
||||
LEFT OUTER JOIN TB_material_SalesOrderProduct S ON S.id = P.taskOrderID
|
||||
LEFT OUTER JOIN tb_material_info I ON I.id = S.productid
|
||||
LEFT OUTER JOIN tb_process_real R ON R.id = P.processrealid
|
||||
${where}
|
||||
</select>
|
||||
<resultMap id="ClassResultMapDailyPlanlist" type="com.sipai.entity.plan.DailyPlan">
|
||||
<id column="p_id" property="id" />
|
||||
<result column="stdt" property="stdt" />
|
||||
<result column="eddt" property="eddt" />
|
||||
<result column="productNo" property="productno" />
|
||||
<result column="productName" property="productname" />
|
||||
<result column="lineid" property="lineid" />
|
||||
<result column="bomid" property="bomid" />
|
||||
<result column="dwgid" property="dwgid" />
|
||||
<result column="p_insuser" property="insuser" />
|
||||
<result column="p_insdt" property="insdt" />
|
||||
<result column="p_remark" property="remark" />
|
||||
<result column="p_type" property="type" />
|
||||
<result column="p_taskOrderID" property="taskorderid" />
|
||||
<result column="productionOrderNo" property="productionorderno" />
|
||||
<result column="productQuantity" property="productquantity" />
|
||||
<result column="finishedQuantity" property="finishedquantity" />
|
||||
<result column="p_status" property="status" />
|
||||
<result column="p_delflag" property="suspended" />
|
||||
<result column="taskchangedstatus" property="taskchangedstatus" />
|
||||
<result column="processrealid" property="processrealid" />
|
||||
<result column="p_pid" property="pid" />
|
||||
<result column="p_porder" property="porder" />
|
||||
<result column="r_name" property="processrealname" />
|
||||
|
||||
<association property="salesorderproduct" resultMap="sopResult" />
|
||||
<association javaType="com.sipai.entity.material.MaterialInfo" property="product">
|
||||
<id column="i_id" property="id" />
|
||||
<result column="materialname" property="materialname" />
|
||||
</association>
|
||||
</resultMap>
|
||||
<select id="getDailyPlan" parameterType="java.lang.String" resultMap="ClassResultMapDailyPlan">
|
||||
SELECT
|
||||
P.id as p_id,
|
||||
P.stdt,
|
||||
P.eddt,
|
||||
P.productNo,
|
||||
P.productName,
|
||||
P.lineid,
|
||||
P.bomid,
|
||||
P.dwgid,
|
||||
P.insuser as p_insuser,
|
||||
P.insdt as p_insdt,
|
||||
P.remark as p_remark,
|
||||
P.type as p_type,
|
||||
P.taskOrderID as p_taskOrderID,
|
||||
P.productionOrderNo,
|
||||
P.productQuantity,
|
||||
P.finishedQuantity,
|
||||
P.status as p_status,
|
||||
P.suspended as p_delflag,
|
||||
P.taskchangedstatus,
|
||||
P.processrealid,
|
||||
P.pid as p_pid,
|
||||
P.porder as p_porder,
|
||||
S.id as s_id,
|
||||
S.insuser as s_insuser,
|
||||
S.insdt as s_insdt,
|
||||
S.SalesOrderNo,
|
||||
S.productid,
|
||||
S.productNum,
|
||||
s.OrderCreateDate,
|
||||
S.OrderFinishDate,
|
||||
D.id as d_id,
|
||||
D.ProductUId,
|
||||
D.productionorderno as d_productionorderno,
|
||||
D.workorderid as d_workorderid,
|
||||
O.id as o_id,
|
||||
O.wfOrderid as o_wfOrderid,
|
||||
I.id as i_id,
|
||||
I.materialname,
|
||||
R.name as r_name
|
||||
FROM tb_plan_day P
|
||||
LEFT OUTER JOIN TB_material_SalesOrderProduct S ON S.id = P.taskOrderID
|
||||
LEFT OUTER JOIN tb_material_info I ON I.id = S.productid
|
||||
LEFT OUTER JOIN TB_material_OrderProductDetail_connect C ON C.planid =P.id
|
||||
LEFT OUTER JOIN TB_material_OrderProductDetail D ON D.id = C.productdetailid
|
||||
LEFT OUTER JOIN tb_work_order O ON (O.id = D.workorderid and O.status!='0')
|
||||
LEFT OUTER JOIN tb_process_real R ON R.id = P.processrealid
|
||||
${where}
|
||||
</select>
|
||||
<select id="selectLine" parameterType="String" resultType="com.sipai.entity.work.Line">
|
||||
select tb_work_line.* from tb_work_line
|
||||
where tb_work_line.id = #{lineid}
|
||||
</select>
|
||||
<resultMap id="ClassResultMapDailyPlan" type="com.sipai.entity.plan.DailyPlan">
|
||||
<id column="p_id" property="id" />
|
||||
<result column="stdt" property="stdt" />
|
||||
<result column="eddt" property="eddt" />
|
||||
<result column="productNo" property="productno" />
|
||||
<result column="productName" property="productname" />
|
||||
<result column="lineid" property="lineid" />
|
||||
<result column="bomid" property="bomid" />
|
||||
<result column="dwgid" property="dwgid" />
|
||||
<result column="p_insuser" property="insuser" />
|
||||
<result column="p_insdt" property="insdt" />
|
||||
<result column="p_remark" property="remark" />
|
||||
<result column="p_type" property="type" />
|
||||
<result column="p_taskOrderID" property="taskorderid" />
|
||||
<result column="productionOrderNo" property="productionorderno" />
|
||||
<result column="productQuantity" property="productquantity" />
|
||||
<result column="finishedQuantity" property="finishedquantity" />
|
||||
<result column="p_status" property="status" />
|
||||
<result column="p_delflag" property="suspended" />
|
||||
<result column="taskchangedstatus" property="taskchangedstatus" />
|
||||
<result column="processrealid" property="processrealid" />
|
||||
<result column="p_pid" property="pid" />
|
||||
<result column="p_porder" property="porder" />
|
||||
<result column="r_name" property="processrealname" />
|
||||
<association property="salesorderproduct" resultMap="sopResult" />
|
||||
<association javaType="com.sipai.entity.material.MaterialInfo" property="product">
|
||||
<id column="i_id" property="id" />
|
||||
<result column="materialname" property="materialname" />
|
||||
</association>
|
||||
<association column="lineid" jdbcType="VARCHAR" property="line" select="selectLine" />
|
||||
<collection ofType="com.sipai.entity.material.OrderProductDetail" property="orderproductdetail">
|
||||
<id column="d_id" property="id" />
|
||||
<result column="ProductUId" property="productuid" />
|
||||
<result column="d_productionorderno" property="productionorderno" />
|
||||
<result column="d_workorderid" property="workorderid" />
|
||||
<association javaType="com.sipai.entity.work.WorkOrder" property="workorder">
|
||||
<id column="o_id" property="id" />
|
||||
<result column="o_wfOrderid" property="wforderid" />
|
||||
</association>
|
||||
</collection>
|
||||
</resultMap>
|
||||
<resultMap id="sopResult" type="com.sipai.entity.material.SalesOrderProduct">
|
||||
<id column="s_id" property="id" />
|
||||
<result column="s_insuser" property="insuser" />
|
||||
<result column="s_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" />
|
||||
</resultMap>
|
||||
<update id="updateBySetAndWhere" parameterType="com.sipai.entity.plan.DailyPlan">
|
||||
update tb_plan_day
|
||||
${where}
|
||||
</update>
|
||||
<select id="getSOPByPlan" parameterType="java.lang.String" resultMap="ResultMapSOPByPlan">
|
||||
SELECT
|
||||
S.id as s_id,
|
||||
S.insuser as s_insuser,
|
||||
S.insdt as s_insdt,
|
||||
S.SalesOrderNo,
|
||||
S.productid,
|
||||
S.productNum,
|
||||
s.OrderCreateDate,
|
||||
S.OrderFinishDate,
|
||||
|
||||
I.id as i_id,
|
||||
I.materialname
|
||||
FROM TB_material_SalesOrderProduct S
|
||||
LEFT OUTER JOIN tb_material_info I ON I.id = S.productid
|
||||
${where}
|
||||
</select>
|
||||
<resultMap id="ResultMapSOPByPlan" type="com.sipai.entity.material.SalesOrderProduct">
|
||||
<id column="s_id" property="id" />
|
||||
<result column="s_insuser" property="insuser" />
|
||||
<result column="s_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" />
|
||||
<association javaType="com.sipai.entity.material.MaterialInfo" property="product">
|
||||
<id column="i_id" property="id" />
|
||||
<result column="materialname" property="materialname" />
|
||||
</association>
|
||||
|
||||
</resultMap>
|
||||
|
||||
<select id="getProcessIds4ComboByTaskOrderId" parameterType="java.lang.String" resultType="hashmap">
|
||||
SELECT processrealid processid
|
||||
FROM tb_plan_day
|
||||
where id in
|
||||
(select MAX(id) from tb_plan_day
|
||||
where taskOrderID= #{taskorderid}
|
||||
group by processrealid )
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,200 @@
|
||||
<?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="plan.DailyPlanSummaryMapper">
|
||||
<resultMap id="BaseResultMap" type="com.sipai.entity.plan.DailyPlanSummary">
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="insuser" jdbcType="VARCHAR" property="insuser" />
|
||||
<result column="insdt" jdbcType="TIMESTAMP" property="insdt" />
|
||||
<result column="plandt" jdbcType="TIMESTAMP" property="plandt" />
|
||||
<result column="auditor" jdbcType="VARCHAR" property="auditor" />
|
||||
<result column="auditdate" jdbcType="TIMESTAMP" property="auditdate" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
<result column="modifier" jdbcType="VARCHAR" property="modifier" />
|
||||
<result column="modifydt" jdbcType="TIMESTAMP" property="modifydt" />
|
||||
<result column="insertpid" jdbcType="VARCHAR" property="insertpid" />
|
||||
<association column="modifier" property="_modifiername" jdbcType="VARCHAR" select="selectModifier"/>
|
||||
</resultMap>
|
||||
<select id="selectModifier" parameterType="String" resultType="String">
|
||||
select caption from tb_user where id = #{modifier}
|
||||
</select>
|
||||
<sql id="Base_Column_List">
|
||||
id, insuser, insdt, plandt, auditor, auditdate, status, name, remark, modifier, modifydt,insertpid
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from TB_plan_dailyplanSummary
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from TB_plan_dailyplanSummary
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.sipai.entity.plan.DailyPlanSummary">
|
||||
insert into TB_plan_dailyplanSummary (id, insuser, insdt,
|
||||
plandt, auditor, auditdate,
|
||||
status, name, remark,
|
||||
modifier, modifydt,insertpid)
|
||||
values (#{id,jdbcType=VARCHAR}, #{insuser,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP},
|
||||
#{plandt,jdbcType=TIMESTAMP}, #{auditor,jdbcType=VARCHAR}, #{auditdate,jdbcType=TIMESTAMP},
|
||||
#{status,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
|
||||
#{modifier,jdbcType=VARCHAR}, #{modifydt,jdbcType=TIMESTAMP}, #{insertpid,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.sipai.entity.plan.DailyPlanSummary">
|
||||
insert into TB_plan_dailyplanSummary
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="insuser != null">
|
||||
insuser,
|
||||
</if>
|
||||
<if test="insdt != null">
|
||||
insdt,
|
||||
</if>
|
||||
<if test="plandt != null">
|
||||
plandt,
|
||||
</if>
|
||||
<if test="auditor != null">
|
||||
auditor,
|
||||
</if>
|
||||
<if test="auditdate != null">
|
||||
auditdate,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark,
|
||||
</if>
|
||||
<if test="modifier != null">
|
||||
modifier,
|
||||
</if>
|
||||
<if test="modifydt != null">
|
||||
modifydt,
|
||||
</if>
|
||||
<if test="insertpid != null">
|
||||
insertpid,
|
||||
</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="plandt != null">
|
||||
#{plandt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="auditor != null">
|
||||
#{auditor,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="auditdate != null">
|
||||
#{auditdate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
#{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="modifier != null">
|
||||
#{modifier,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="modifydt != null">
|
||||
#{modifydt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="insertpid != null">
|
||||
#{insertpid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.plan.DailyPlanSummary">
|
||||
update TB_plan_dailyplanSummary
|
||||
<set>
|
||||
<if test="insuser != null">
|
||||
insuser = #{insuser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="insdt != null">
|
||||
insdt = #{insdt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="plandt != null">
|
||||
plandt = #{plandt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="auditor != null">
|
||||
auditor = #{auditor,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="auditdate != null">
|
||||
auditdate = #{auditdate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="modifier != null">
|
||||
modifier = #{modifier,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="modifydt != null">
|
||||
modifydt = #{modifydt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="insertpid != null">
|
||||
insertpid = #{insertpid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.plan.DailyPlanSummary">
|
||||
update TB_plan_dailyplanSummary
|
||||
set insuser = #{insuser,jdbcType=VARCHAR},
|
||||
insdt = #{insdt,jdbcType=TIMESTAMP},
|
||||
plandt = #{plandt,jdbcType=TIMESTAMP},
|
||||
auditor = #{auditor,jdbcType=VARCHAR},
|
||||
auditdate = #{auditdate,jdbcType=TIMESTAMP},
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
modifier = #{modifier,jdbcType=VARCHAR},
|
||||
modifydt = #{modifydt,jdbcType=TIMESTAMP},
|
||||
insertpid = #{insertpid,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_plan_dailyplanSummary
|
||||
${where}
|
||||
</select>
|
||||
<select id="selectByWhere" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from TB_plan_dailyplanSummary
|
||||
${where}
|
||||
</select>
|
||||
<select id="selectValueBySql" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
${sql}
|
||||
</select>
|
||||
<delete id="deleteByWhere" parameterType="java.lang.String">
|
||||
delete from TB_plan_dailyplanSummary
|
||||
${where}
|
||||
</delete>
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,214 @@
|
||||
<?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="plan.DailyPlanSummaryMaterialMapper" >
|
||||
<resultMap id="BaseResultMap" type="com.sipai.entity.plan.DailyPlanSummaryMaterial" >
|
||||
<id column="id" property="id" jdbcType="VARCHAR" />
|
||||
<result column="planid" property="planid" jdbcType="VARCHAR" />
|
||||
<result column="workstationid" property="workstationid" jdbcType="VARCHAR" />
|
||||
<result column="materialid" property="materialid" jdbcType="VARCHAR" />
|
||||
<result column="amount" property="amount" jdbcType="DOUBLE" />
|
||||
<result column="revokeamount" property="revokeamount" jdbcType="DOUBLE" />
|
||||
<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, planid, workstationid, materialid, amount, revokeamount, remark, insuser, insdt,
|
||||
modify, modifydt
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from tb_plan_material
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
|
||||
delete from tb_plan_material
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.sipai.entity.plan.DailyPlanSummaryMaterial" >
|
||||
insert into tb_plan_material (id, planid, workstationid,
|
||||
materialid, amount, revokeamount,
|
||||
remark, insuser, insdt,
|
||||
modify, modifydt)
|
||||
values (#{id,jdbcType=VARCHAR}, #{planid,jdbcType=VARCHAR}, #{workstationid,jdbcType=VARCHAR},
|
||||
#{materialid,jdbcType=VARCHAR}, #{amount,jdbcType=DOUBLE}, #{revokeamount,jdbcType=DOUBLE},
|
||||
#{remark,jdbcType=VARCHAR}, #{insuser,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP},
|
||||
#{modify,jdbcType=VARCHAR}, #{modifydt,jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.sipai.entity.plan.DailyPlanSummaryMaterial" >
|
||||
insert into tb_plan_material
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
id,
|
||||
</if>
|
||||
<if test="planid != null" >
|
||||
planid,
|
||||
</if>
|
||||
<if test="workstationid != null" >
|
||||
workstationid,
|
||||
</if>
|
||||
<if test="materialid != null" >
|
||||
materialid,
|
||||
</if>
|
||||
<if test="amount != null" >
|
||||
amount,
|
||||
</if>
|
||||
<if test="revokeamount != null" >
|
||||
revokeamount,
|
||||
</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="planid != null" >
|
||||
#{planid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="workstationid != null" >
|
||||
#{workstationid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="materialid != null" >
|
||||
#{materialid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="amount != null" >
|
||||
#{amount,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="revokeamount != null" >
|
||||
#{revokeamount,jdbcType=DOUBLE},
|
||||
</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.plan.DailyPlanSummaryMaterial" >
|
||||
update tb_plan_material
|
||||
<set >
|
||||
<if test="planid != null" >
|
||||
planid = #{planid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="workstationid != null" >
|
||||
workstationid = #{workstationid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="materialid != null" >
|
||||
materialid = #{materialid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="amount != null" >
|
||||
amount = #{amount,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="revokeamount != null" >
|
||||
revokeamount = #{revokeamount,jdbcType=DOUBLE},
|
||||
</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.plan.DailyPlanSummaryMaterial" >
|
||||
update tb_plan_material
|
||||
set planid = #{planid,jdbcType=VARCHAR},
|
||||
workstationid = #{workstationid,jdbcType=VARCHAR},
|
||||
materialid = #{materialid,jdbcType=VARCHAR},
|
||||
amount = #{amount,jdbcType=DOUBLE},
|
||||
revokeamount = #{revokeamount,jdbcType=DOUBLE},
|
||||
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="getDPSMaterial" resultMap="ClassResultMapDPSM" parameterType="java.lang.String">
|
||||
SELECT
|
||||
M.id as m_id,
|
||||
M.planid,
|
||||
M.workstationid as m_workstationid,
|
||||
M.materialid as m_materialid,
|
||||
M.amount as m_amount,
|
||||
M.revokeamount as m_revokeamount,
|
||||
M.remark as m_remark,
|
||||
M.insuser as m_insuser,
|
||||
M.insdt as m_insdt,
|
||||
M.modify as m_modify,
|
||||
M.modifydt as m_modifydt,
|
||||
I.id as i_id,
|
||||
I.materialcode as i_materialcode,
|
||||
I.materialname as i_materialname,
|
||||
I.unit as i_unit,
|
||||
S.id as s_id,
|
||||
S.serial as s_serial,
|
||||
S.name as s_name
|
||||
FROM tb_plan_material M
|
||||
LEFT OUTER JOIN tb_material_info I ON I.id = M.materialid
|
||||
LEFT OUTER JOIN tb_work_workstation S ON S.id = M.workstationid
|
||||
${where}
|
||||
</select>
|
||||
<resultMap id="ClassResultMapDPSM" type="com.sipai.entity.plan.DailyPlanSummaryMaterial">
|
||||
<id property="id" column="m_id" />
|
||||
<result property="planid" column="planid"/>
|
||||
<result property="workstationid" column="m_workstationid"/>
|
||||
<result property="materialid" column="m_materialid"/>
|
||||
<result property="amount" column="m_amount"/>
|
||||
<result property="revokeamount" column="m_revokeamount"/>
|
||||
<result property="remark" column="m_remark"/>
|
||||
<result property="insuser" column="m_insuser"/>
|
||||
<result property="insdt" column="m_insdt"/>
|
||||
<result property="modify" column="m_modify"/>
|
||||
<result property="modifydt" column="m_modifydt"/>
|
||||
<association property="materialinfo" javaType="com.sipai.entity.material.MaterialInfo" >
|
||||
<id property="id" column="i_id"/>
|
||||
<result property="materialname" column="i_materialname"/>
|
||||
<result property="materialcode" column="i_materialcode"/>
|
||||
<result property="unit" column="i_unit"/>
|
||||
</association>
|
||||
<association property="workstation" javaType="com.sipai.entity.work.Workstation" >
|
||||
<id property="id" column="s_id"/>
|
||||
<result property="serial" column="s_serial"/>
|
||||
<result property="name" column="s_name"/>
|
||||
</association>
|
||||
</resultMap>
|
||||
</mapper>
|
||||
@ -0,0 +1,275 @@
|
||||
<?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="plan.DailyPlanTaskDemandMapper">
|
||||
<resultMap id="BaseResultMap" type="com.sipai.entity.plan.DailyPlanTaskDemand">
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="planid" jdbcType="VARCHAR" property="planid" />
|
||||
<result column="processid" jdbcType="VARCHAR" property="processid" />
|
||||
<result column="taskcode" jdbcType="VARCHAR" property="taskcode" />
|
||||
<result column="insuser" jdbcType="VARCHAR" property="insuser" />
|
||||
<result column="insdt" jdbcType="TIMESTAMP" property="insdt" />
|
||||
<result column="preyield" jdbcType="DOUBLE" property="preyield" />
|
||||
<result column="actyield" jdbcType="DOUBLE" property="actyield" />
|
||||
<result column="preamount" jdbcType="DOUBLE" property="preamount" />
|
||||
<result column="actamount" jdbcType="DOUBLE" property="actamount" />
|
||||
<result column="unit" jdbcType="VARCHAR" property="unit" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
<result column="prodtaskid" jdbcType="VARCHAR" property="prodtaskid" />
|
||||
<result column="yieldreason" jdbcType="VARCHAR" property="yieldreason" />
|
||||
<result column="amountreason" jdbcType="VARCHAR" property="amountreason" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="_taskName" jdbcType="VARCHAR" property="_taskName" />
|
||||
<result column="reportuser" jdbcType="VARCHAR" property="reportuser" />
|
||||
<result column="handleuser" jdbcType="VARCHAR" property="handleuser" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, planid, processid, taskcode, insuser, insdt, preyield, actyield, preamount, actamount,
|
||||
unit, remark, prodtaskid, yieldreason, amountreason, status,reportuser,handleuser
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from tb_plan_taskdemand
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from tb_plan_taskdemand
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.sipai.entity.plan.DailyPlanTaskDemand">
|
||||
insert into tb_plan_taskdemand (id, planid, processid,
|
||||
taskcode, insuser, insdt,
|
||||
preyield, actyield, preamount,
|
||||
actamount, unit, remark,
|
||||
prodtaskid, yieldreason, amountreason,reportuser,handleuser,
|
||||
status)
|
||||
values (#{id,jdbcType=VARCHAR}, #{planid,jdbcType=VARCHAR}, #{processid,jdbcType=VARCHAR},
|
||||
#{taskcode,jdbcType=VARCHAR}, #{insuser,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP},
|
||||
#{preyield,jdbcType=DOUBLE}, #{actyield,jdbcType=DOUBLE}, #{preamount,jdbcType=DOUBLE},
|
||||
#{actamount,jdbcType=DOUBLE}, #{unit,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
|
||||
#{prodtaskid,jdbcType=VARCHAR}, #{yieldreason,jdbcType=VARCHAR}, #{amountreason,jdbcType=VARCHAR},#{reportuser,jdbcType=VARCHAR},#{handleuser,jdbcType=VARCHAR},
|
||||
#{status,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.sipai.entity.plan.DailyPlanTaskDemand">
|
||||
insert into tb_plan_taskdemand
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="planid != null">
|
||||
planid,
|
||||
</if>
|
||||
<if test="processid != null">
|
||||
processid,
|
||||
</if>
|
||||
<if test="taskcode != null">
|
||||
taskcode,
|
||||
</if>
|
||||
<if test="insuser != null">
|
||||
insuser,
|
||||
</if>
|
||||
<if test="insdt != null">
|
||||
insdt,
|
||||
</if>
|
||||
<if test="preyield != null">
|
||||
preyield,
|
||||
</if>
|
||||
<if test="actyield != null">
|
||||
actyield,
|
||||
</if>
|
||||
<if test="preamount != null">
|
||||
preamount,
|
||||
</if>
|
||||
<if test="actamount != null">
|
||||
actamount,
|
||||
</if>
|
||||
<if test="unit != null">
|
||||
unit,
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark,
|
||||
</if>
|
||||
<if test="prodtaskid != null">
|
||||
prodtaskid,
|
||||
</if>
|
||||
<if test="yieldreason != null">
|
||||
yieldreason,
|
||||
</if>
|
||||
<if test="amountreason != null">
|
||||
amountreason,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="reportuser != null">
|
||||
reportuser,
|
||||
</if>
|
||||
<if test="handleuser != null">
|
||||
handleuser,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="planid != null">
|
||||
#{planid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="processid != null">
|
||||
#{processid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="taskcode != null">
|
||||
#{taskcode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="insuser != null">
|
||||
#{insuser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="insdt != null">
|
||||
#{insdt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="preyield != null">
|
||||
#{preyield,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="actyield != null">
|
||||
#{actyield,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="preamount != null">
|
||||
#{preamount,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="actamount != null">
|
||||
#{actamount,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="unit != null">
|
||||
#{unit,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
#{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="prodtaskid != null">
|
||||
#{prodtaskid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="yieldreason != null">
|
||||
#{yieldreason,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="amountreason != null">
|
||||
#{amountreason,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="reportuser != null">
|
||||
#{reportuser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="handleuser != null">
|
||||
#{handleuser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.plan.DailyPlanTaskDemand">
|
||||
update tb_plan_taskdemand
|
||||
<set>
|
||||
<if test="planid != null">
|
||||
planid = #{planid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="processid != null">
|
||||
processid = #{processid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="taskcode != null">
|
||||
taskcode = #{taskcode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="insuser != null">
|
||||
insuser = #{insuser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="insdt != null">
|
||||
insdt = #{insdt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="preyield != null">
|
||||
preyield = #{preyield,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="actyield != null">
|
||||
actyield = #{actyield,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="preamount != null">
|
||||
preamount = #{preamount,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="actamount != null">
|
||||
actamount = #{actamount,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="unit != null">
|
||||
unit = #{unit,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="prodtaskid != null">
|
||||
prodtaskid = #{prodtaskid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="yieldreason != null">
|
||||
yieldreason = #{yieldreason,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="amountreason != null">
|
||||
amountreason = #{amountreason,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="reportuser != null">
|
||||
reportuser = #{reportuser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="handleuser != null">
|
||||
handleuser = #{handleuser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.plan.DailyPlanTaskDemand">
|
||||
update tb_plan_taskdemand
|
||||
set planid = #{planid,jdbcType=VARCHAR},
|
||||
processid = #{processid,jdbcType=VARCHAR},
|
||||
taskcode = #{taskcode,jdbcType=VARCHAR},
|
||||
insuser = #{insuser,jdbcType=VARCHAR},
|
||||
insdt = #{insdt,jdbcType=TIMESTAMP},
|
||||
preyield = #{preyield,jdbcType=DOUBLE},
|
||||
actyield = #{actyield,jdbcType=DOUBLE},
|
||||
preamount = #{preamount,jdbcType=DOUBLE},
|
||||
actamount = #{actamount,jdbcType=DOUBLE},
|
||||
unit = #{unit,jdbcType=VARCHAR},
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
prodtaskid = #{prodtaskid,jdbcType=VARCHAR},
|
||||
yieldreason = #{yieldreason,jdbcType=VARCHAR},
|
||||
amountreason = #{amountreason,jdbcType=VARCHAR},
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
handleuser = #{handleuser,jdbcType=VARCHAR},
|
||||
reportuser = #{reportuser,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_plan_taskdemand
|
||||
${where}
|
||||
</select>
|
||||
<delete id="deleteByWhere" parameterType="java.lang.String">
|
||||
delete from
|
||||
tb_plan_taskdemand
|
||||
${where}
|
||||
</delete>
|
||||
|
||||
<select id="sumAmountByProdTaskId" parameterType="java.lang.String" resultType="java.lang.String">
|
||||
select sum(case when actamount is not null then actamount else preamount end) as preamounts
|
||||
from tb_plan_taskdemand
|
||||
where prodtaskid=
|
||||
'${where}'
|
||||
</select>
|
||||
|
||||
<!-- 获取日计划工序对比结果 -->
|
||||
<select id="getDailyPLanAnalysis" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select td.*,tp.procedurename as _taskName FROM(SELECT
|
||||
taskcode,SUM(preamount) as preamount
|
||||
FROM tb_plan_taskdemand
|
||||
${where}
|
||||
group by taskcode) td
|
||||
left join tb_process_task_procedure tp on td.taskcode=tp.procedurecode
|
||||
</select>
|
||||
</mapper>
|
||||
252
bin/target/classes/com/sipai/mapper/plan/DeliverDetailMapper.xml
Normal file
252
bin/target/classes/com/sipai/mapper/plan/DeliverDetailMapper.xml
Normal file
@ -0,0 +1,252 @@
|
||||
<?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="plan.DeliverDetailMapper" >
|
||||
<resultMap id="BaseResultMap" type="com.sipai.entity.plan.DeliverDetail" >
|
||||
<id column="id" property="id" jdbcType="VARCHAR" />
|
||||
<result column="pid" property="pid" jdbcType="VARCHAR" />
|
||||
<result column="materialid" property="materialid" jdbcType="VARCHAR" />
|
||||
<result column="planamount" property="planamount" jdbcType="DOUBLE" />
|
||||
<result column="deliveramount" property="deliveramount" jdbcType="DOUBLE" />
|
||||
<result column="boxnumber" property="boxnumber" jdbcType="VARCHAR" />
|
||||
<result column="boxname" property="boxname" jdbcType="VARCHAR" />
|
||||
<result column="deliverst" property="deliverst" jdbcType="INTEGER" />
|
||||
<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="materialid" property="materialInfo" jdbcType="VARCHAR" select="selectMaterialInfo"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List" >
|
||||
id, pid, materialid, planamount, deliveramount, boxnumber, boxname, deliverst, remark,
|
||||
insuser, insdt, modify, modifydt
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from tb_plan_material_deliver_detail
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<select id="selectMaterialInfo" parameterType="String" resultType="com.sipai.entity.material.MaterialInfo">
|
||||
select * from tb_material_info where id = #{materialid}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
|
||||
delete from tb_plan_material_deliver_detail
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.sipai.entity.plan.DeliverDetail" >
|
||||
insert into tb_plan_material_deliver_detail (id, pid, materialid,
|
||||
planamount, deliveramount, boxnumber,
|
||||
boxname, deliverst, remark,
|
||||
insuser, insdt, modify,
|
||||
modifydt)
|
||||
values (#{id,jdbcType=VARCHAR}, #{pid,jdbcType=VARCHAR}, #{materialid,jdbcType=VARCHAR},
|
||||
#{planamount,jdbcType=DOUBLE}, #{deliveramount,jdbcType=DOUBLE}, #{boxnumber,jdbcType=VARCHAR},
|
||||
#{boxname,jdbcType=VARCHAR}, #{deliverst,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR},
|
||||
#{insuser,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP}, #{modify,jdbcType=VARCHAR},
|
||||
#{modifydt,jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.sipai.entity.plan.DeliverDetail" >
|
||||
insert into tb_plan_material_deliver_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
id,
|
||||
</if>
|
||||
<if test="pid != null" >
|
||||
pid,
|
||||
</if>
|
||||
<if test="materialid != null" >
|
||||
materialid,
|
||||
</if>
|
||||
<if test="planamount != null" >
|
||||
planamount,
|
||||
</if>
|
||||
<if test="deliveramount != null" >
|
||||
deliveramount,
|
||||
</if>
|
||||
<if test="boxnumber != null" >
|
||||
boxnumber,
|
||||
</if>
|
||||
<if test="boxname != null" >
|
||||
boxname,
|
||||
</if>
|
||||
<if test="deliverst != null" >
|
||||
deliverst,
|
||||
</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="pid != null" >
|
||||
#{pid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="materialid != null" >
|
||||
#{materialid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="planamount != null" >
|
||||
#{planamount,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="deliveramount != null" >
|
||||
#{deliveramount,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="boxnumber != null" >
|
||||
#{boxnumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="boxname != null" >
|
||||
#{boxname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="deliverst != null" >
|
||||
#{deliverst,jdbcType=INTEGER},
|
||||
</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.plan.DeliverDetail" >
|
||||
update tb_plan_material_deliver_detail
|
||||
<set >
|
||||
<if test="pid != null" >
|
||||
pid = #{pid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="materialid != null" >
|
||||
materialid = #{materialid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="planamount != null" >
|
||||
planamount = #{planamount,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="deliveramount != null" >
|
||||
deliveramount = #{deliveramount,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="boxnumber != null" >
|
||||
boxnumber = #{boxnumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="boxname != null" >
|
||||
boxname = #{boxname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="deliverst != null" >
|
||||
deliverst = #{deliverst,jdbcType=INTEGER},
|
||||
</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.plan.DeliverDetail" >
|
||||
update tb_plan_material_deliver_detail
|
||||
set pid = #{pid,jdbcType=VARCHAR},
|
||||
materialid = #{materialid,jdbcType=VARCHAR},
|
||||
planamount = #{planamount,jdbcType=DOUBLE},
|
||||
deliveramount = #{deliveramount,jdbcType=DOUBLE},
|
||||
boxnumber = #{boxnumber,jdbcType=VARCHAR},
|
||||
boxname = #{boxname,jdbcType=VARCHAR},
|
||||
deliverst = #{deliverst,jdbcType=INTEGER},
|
||||
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_plan_material_deliver_detail
|
||||
${where}
|
||||
</select>
|
||||
<delete id="deleteByWhere" parameterType="java.lang.String" >
|
||||
delete from tb_plan_material_deliver_detail
|
||||
${where}
|
||||
</delete>
|
||||
<select id="getDeliverDetail" resultMap="DeliverDetailMap" parameterType="java.lang.String">
|
||||
select d.*,
|
||||
m.id as m_id,
|
||||
m.materialcode as m_materialcode,
|
||||
m.materialname as m_materialname,
|
||||
m.unit as m_unit
|
||||
from tb_plan_material_deliver_detail d
|
||||
left join tb_material_info m on m.id=d.materialid
|
||||
${where}
|
||||
</select>
|
||||
<resultMap id="DeliverDetailMap" type="com.sipai.entity.plan.DeliverDetail">
|
||||
<id column="id" property="id" jdbcType="VARCHAR" />
|
||||
<result column="pid" property="pid" jdbcType="VARCHAR" />
|
||||
<result column="materialid" property="materialid" jdbcType="VARCHAR" />
|
||||
<result column="planamount" property="planamount" jdbcType="DOUBLE" />
|
||||
<result column="deliveramount" property="deliveramount" jdbcType="DOUBLE" />
|
||||
<result column="boxnumber" property="boxnumber" jdbcType="VARCHAR" />
|
||||
<result column="boxname" property="boxname" jdbcType="VARCHAR" />
|
||||
<result column="deliverst" property="deliverst" jdbcType="INTEGER" />
|
||||
<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="materialInfo" resultMap="materialInfoResult"/>
|
||||
</resultMap>
|
||||
<resultMap id="materialInfoResult" type="com.sipai.entity.material.MaterialInfo">
|
||||
<id property="id" column="m_id"/>
|
||||
<result property="materialcode" column="m_materialcode"/>
|
||||
<result property="materialname" column="m_materialname"/>
|
||||
<result property="unit" column="m_unit"/>
|
||||
</resultMap>
|
||||
<select id="getPlanedAmount" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
||||
select detail.materialid,SUM(case when detail.planamount is null then 0 else detail.planamount end) as planamount
|
||||
from tb_plan_material_deliver_detail detail
|
||||
left join tb_plan_material_deliver deliver on deliver.id=detail.pid
|
||||
${where}
|
||||
group by materialid
|
||||
</select>
|
||||
<select id="getMaterialDeliverStatus" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
||||
select (case
|
||||
when SUM(case when deliverst is null then 0 else deliverst end)=0 then 0
|
||||
when SUM(case when deliverst is null then 0 else deliverst end)=COUNT(id) then 1
|
||||
else 2 end) as deliverst
|
||||
from tb_plan_material_deliver_detail
|
||||
${where}
|
||||
group by pid
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,131 @@
|
||||
<?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="plan.DeliverProcessorMapper" >
|
||||
<resultMap id="BaseResultMap" type="com.sipai.entity.plan.DeliverProcessor" >
|
||||
<id column="id" property="id" jdbcType="VARCHAR" />
|
||||
<result column="pid" property="pid" jdbcType="VARCHAR" />
|
||||
<result column="processorid" property="processorid" jdbcType="VARCHAR" />
|
||||
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
|
||||
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
|
||||
|
||||
<association column="processorid" property="processor" jdbcType="VARCHAR" select="selectProcessor"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List" >
|
||||
id, pid, processorid, insuser, insdt
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from tb_plan_material_deliver_processor
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<select id="selectProcessor" parameterType="String" resultType="com.sipai.entity.user.User">
|
||||
select * from tb_user where id = #{processorid}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
|
||||
delete from tb_plan_material_deliver_processor
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.sipai.entity.plan.DeliverProcessor" >
|
||||
insert into tb_plan_material_deliver_processor (id, pid, processorid,
|
||||
insuser, insdt)
|
||||
values (#{id,jdbcType=VARCHAR}, #{pid,jdbcType=VARCHAR}, #{processorid,jdbcType=VARCHAR},
|
||||
#{insuser,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.sipai.entity.plan.DeliverProcessor" >
|
||||
insert into tb_plan_material_deliver_processor
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
id,
|
||||
</if>
|
||||
<if test="pid != null" >
|
||||
pid,
|
||||
</if>
|
||||
<if test="processorid != null" >
|
||||
processorid,
|
||||
</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="pid != null" >
|
||||
#{pid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="processorid != null" >
|
||||
#{processorid,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.plan.DeliverProcessor" >
|
||||
update tb_plan_material_deliver_processor
|
||||
<set >
|
||||
<if test="pid != null" >
|
||||
pid = #{pid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="processorid != null" >
|
||||
processorid = #{processorid,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.plan.DeliverProcessor" >
|
||||
update tb_plan_material_deliver_processor
|
||||
set pid = #{pid,jdbcType=VARCHAR},
|
||||
processorid = #{processorid,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_plan_material_deliver_processor
|
||||
${where}
|
||||
</select>
|
||||
<delete id="deleteByWhere" parameterType="java.lang.String" >
|
||||
delete from tb_plan_material_deliver_processor
|
||||
${where}
|
||||
</delete>
|
||||
<select id="getDeliverProcessor" resultMap="DeliverProcessorMap" parameterType="java.lang.String">
|
||||
select p.*,
|
||||
u.id as u_id,
|
||||
u.name as u_name,
|
||||
u.serial as u_serial
|
||||
from tb_plan_material_deliver_processor p
|
||||
left join tb_user u on u.id=p.processorid
|
||||
${where}
|
||||
</select>
|
||||
<resultMap id="DeliverProcessorMap" type="com.sipai.entity.plan.DeliverProcessor" >
|
||||
<id column="id" property="id" jdbcType="VARCHAR" />
|
||||
<result column="pid" property="pid" jdbcType="VARCHAR" />
|
||||
<result column="processorid" property="processorid" jdbcType="VARCHAR" />
|
||||
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
|
||||
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
|
||||
|
||||
<association property="processor" resultMap="processorResult"/>
|
||||
</resultMap>
|
||||
<resultMap id="processorResult" type="com.sipai.entity.user.User">
|
||||
<id property="id" column="u_id"/>
|
||||
<result property="name" column="u_name"/>
|
||||
<result property="serial" column="u_serial"/>
|
||||
</resultMap>
|
||||
</mapper>
|
||||
@ -0,0 +1,234 @@
|
||||
<?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="plan.MaterialDeliverMapper" >
|
||||
<resultMap id="BaseResultMap" type="com.sipai.entity.plan.MaterialDeliver" >
|
||||
<id column="id" property="id" jdbcType="VARCHAR" />
|
||||
<result column="dailyplanid" property="dailyplanid" jdbcType="VARCHAR" />
|
||||
<result column="workstationid" property="workstationid" jdbcType="VARCHAR" />
|
||||
<result column="starttime" property="starttime" jdbcType="TIMESTAMP" />
|
||||
<result column="endtime" property="endtime" jdbcType="TIMESTAMP" />
|
||||
<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="dailyplanid" property="dailyPlanSummary" jdbcType="VARCHAR" select="selectDailyPlanSummary"/>
|
||||
<association column="workstationid" property="workstation" jdbcType="VARCHAR" select="selectWorkstation"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List" >
|
||||
id, dailyplanid, workstationid, starttime, endtime, status, remark,insuser, insdt, modify, modifydt
|
||||
</sql>
|
||||
<select id="selectDailyPlanSummary" parameterType="String" resultType="com.sipai.entity.plan.DailyPlanSummary">
|
||||
select * from TB_plan_dailyplanSummary where id = #{dailyplanid}
|
||||
</select>
|
||||
<select id="selectWorkstation" parameterType="String" resultType="com.sipai.entity.work.Workstation">
|
||||
select * from tb_work_workstation where id = #{workstationid}
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from tb_plan_material_deliver
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
|
||||
delete from tb_plan_material_deliver
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.sipai.entity.plan.MaterialDeliver" >
|
||||
insert into tb_plan_material_deliver (id, dailyplanid ,
|
||||
workstationid, starttime, endtime, status, remark, insuser, insdt, modify,
|
||||
modifydt)
|
||||
values (#{id,jdbcType=VARCHAR}, #{dailyplanid,jdbcType=VARCHAR},#{workstationid,jdbcType=VARCHAR},
|
||||
#{starttime,jdbcType=TIMESTAMP}, #{endtime,jdbcType=TIMESTAMP}, #{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.plan.MaterialDeliver" >
|
||||
insert into tb_plan_material_deliver
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
id,
|
||||
</if>
|
||||
<if test="dailyplanid != null" >
|
||||
dailyplanid,
|
||||
</if>
|
||||
<if test="workstationid != null" >
|
||||
workstationid,
|
||||
</if>
|
||||
<if test="starttime != null" >
|
||||
starttime,
|
||||
</if>
|
||||
<if test="endtime != null" >
|
||||
endtime,
|
||||
</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="dailyplanid != null" >
|
||||
#{dailyplanid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="workstationid != null" >
|
||||
#{workstationid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="starttime != null" >
|
||||
#{starttime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="endtime != null" >
|
||||
#{endtime,jdbcType=TIMESTAMP},
|
||||
</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.plan.MaterialDeliver" >
|
||||
update tb_plan_material_deliver
|
||||
<set >
|
||||
<if test="dailyplanid != null" >
|
||||
dailyplanid = #{dailyplanid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="workstationid != null" >
|
||||
workstationid = #{workstationid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="starttime != null" >
|
||||
starttime = #{starttime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="endtime != null" >
|
||||
endtime = #{endtime,jdbcType=TIMESTAMP},
|
||||
</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.plan.MaterialDeliver" >
|
||||
update tb_plan_material_deliver
|
||||
set dailyplanid = #{dailyplanid,jdbcType=VARCHAR},
|
||||
workstationid = #{workstationid,jdbcType=VARCHAR},
|
||||
starttime = #{starttime,jdbcType=TIMESTAMP},
|
||||
endtime = #{endtime,jdbcType=TIMESTAMP},
|
||||
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_plan_material_deliver
|
||||
${where}
|
||||
</select>
|
||||
<delete id="deleteByWhere" parameterType="java.lang.String" >
|
||||
delete from tb_plan_material_deliver
|
||||
${where}
|
||||
</delete>
|
||||
<select id="getMaterialDeliver" resultMap="MaterialDeliverMap" parameterType="java.lang.String">
|
||||
select deliver.*,
|
||||
dailyplanSummary.id as d_id,
|
||||
dailyplanSummary.name as d_name,
|
||||
dailyplanSummary.plandt as d_plandt,
|
||||
workstation.id as w_id,
|
||||
workstation.name as w_name,
|
||||
workstation.serial as w_serial
|
||||
from tb_plan_material_deliver deliver
|
||||
left join TB_plan_dailyplanSummary dailyplanSummary on dailyplanSummary.id=deliver.dailyplanid
|
||||
left join tb_work_workstation workstation on workstation.id=deliver.workstationid
|
||||
${where}
|
||||
</select>
|
||||
<select id="getProcessorDeliver" resultMap="MaterialDeliverMap" parameterType="java.lang.String">
|
||||
select deliver.*,
|
||||
dailyplanSummary.id as d_id,
|
||||
dailyplanSummary.name as d_name,
|
||||
dailyplanSummary.plandt as d_plandt,
|
||||
workstation.id as w_id,
|
||||
workstation.name as w_name,
|
||||
workstation.serial as w_serial
|
||||
from tb_plan_material_deliver deliver
|
||||
left join TB_plan_dailyplanSummary dailyplanSummary on dailyplanSummary.id=deliver.dailyplanid
|
||||
left join tb_work_workstation workstation on workstation.id=deliver.workstationid
|
||||
left join tb_plan_material_deliver_processor processor on processor.pid=deliver.id
|
||||
${where}
|
||||
</select>
|
||||
<resultMap id="MaterialDeliverMap" type="com.sipai.entity.plan.MaterialDeliver" >
|
||||
<id column="id" property="id" jdbcType="VARCHAR" />
|
||||
<result column="dailyplanid" property="dailyplanid" jdbcType="VARCHAR" />
|
||||
<result column="workstationid" property="workstationid" jdbcType="VARCHAR" />
|
||||
<result column="starttime" property="starttime" jdbcType="TIMESTAMP" />
|
||||
<result column="endtime" property="endtime" jdbcType="TIMESTAMP" />
|
||||
<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="dailyPlanSummary" resultMap="dailyPlanSummaryResult"/>
|
||||
<association property="workstation" resultMap="workstationResult"/>
|
||||
</resultMap>
|
||||
<resultMap id="dailyPlanSummaryResult" type="com.sipai.entity.plan.DailyPlanSummary">
|
||||
<id property="id" column="d_id"/>
|
||||
<result property="name" column="d_name"/>
|
||||
<result property="plandt" column="d_plandt"/>
|
||||
</resultMap>
|
||||
<resultMap id="workstationResult" type="com.sipai.entity.work.Workstation">
|
||||
<id property="id" column="w_id"/>
|
||||
<result property="name" column="w_name"/>
|
||||
<result property="serial" column="w_serial"/>
|
||||
</resultMap>
|
||||
</mapper>
|
||||
@ -0,0 +1,41 @@
|
||||
<?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="plan.MaterialPlanMapper">
|
||||
<resultMap id="BaseResultMap" type="com.sipai.entity.plan.MaterialPlan">
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="plandt" jdbcType="TIMESTAMP" property="plandt" />
|
||||
<result column="workstationid" jdbcType="VARCHAR" property="workstationid" />
|
||||
<result column="workstationname" jdbcType="VARCHAR" property="workstationname" />
|
||||
<result column="workstationserial" jdbcType="VARCHAR" property="workstationserial" />
|
||||
<result column="materialid" jdbcType="VARCHAR" property="materialid" />
|
||||
<result column="materialcode" jdbcType="VARCHAR" property="materialcode" />
|
||||
<result column="materialname" jdbcType="VARCHAR" property="materialname" />
|
||||
<result column="amount" property="amount" jdbcType="DOUBLE" />
|
||||
<result column="unit" jdbcType="VARCHAR" property="unit" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, name, plandt, workstationid, workstationname,workstationserial, materialid, materialcode, materialname, CAST((case when amount is null then '' else amount end )as float) as amount,unit
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from uv_material_plan
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<select id="selectStatisticListByWhere" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select id, name, plandt, workstationid, workstationname,workstationserial, materialid, materialcode, materialname,
|
||||
Sum(CAST((case when amount is null then '' else amount end )as float)) as amount,unit
|
||||
from uv_material_plan
|
||||
${where}
|
||||
</select>
|
||||
<select id="selectListByWhere" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from uv_material_plan
|
||||
${where}
|
||||
</select>
|
||||
<select id="selectValueBySql" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
${sql}
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,214 @@
|
||||
<?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="plan.MaterialRecoverMapper" >
|
||||
<resultMap id="BaseResultMap" type="com.sipai.entity.plan.MaterialRecover" >
|
||||
<id column="id" property="id" jdbcType="VARCHAR" />
|
||||
<result column="dailyplanid" property="dailyplanid" jdbcType="VARCHAR" />
|
||||
<result column="materialid" property="materialid" jdbcType="VARCHAR" />
|
||||
<result column="workstationid" property="workstationid" jdbcType="VARCHAR" />
|
||||
<result column="recoverid" property="recoverid" jdbcType="VARCHAR" />
|
||||
<result column="recovertime" property="recovertime" jdbcType="TIMESTAMP" />
|
||||
<result column="recovernum" property="recovernum" jdbcType="DOUBLE" />
|
||||
<result column="memo" property="memo" jdbcType="VARCHAR" />
|
||||
|
||||
<association column="dailyplanid" property="dailyPlanSummary" jdbcType="VARCHAR" select="selectDailyPlanSummary"/>
|
||||
<association column="materialid" property="materialInfo" jdbcType="VARCHAR" select="selectMaterialInfo"/>
|
||||
<association column="workstationid" property="workstation" jdbcType="VARCHAR" select="selectWorkstation"/>
|
||||
<association column="recoverid" property="recover" jdbcType="VARCHAR" select="selectRecover"/>
|
||||
</resultMap>
|
||||
<select id="selectDailyPlanSummary" parameterType="String" resultType="com.sipai.entity.plan.DailyPlanSummary">
|
||||
select * from TB_plan_dailyplanSummary where id = #{dailyplanid}
|
||||
</select>
|
||||
<select id="selectMaterialInfo" parameterType="String" resultType="com.sipai.entity.material.MaterialInfo">
|
||||
select * from tb_material_info where id = #{materialid}
|
||||
</select>
|
||||
<select id="selectWorkstation" parameterType="String" resultType="com.sipai.entity.work.Workstation">
|
||||
select * from tb_work_workstation where id = #{workstationid}
|
||||
</select>
|
||||
<select id="selectRecover" parameterType="String" resultType="com.sipai.entity.user.User">
|
||||
select * from tb_user where id = #{recoverid}
|
||||
</select>
|
||||
<sql id="Base_Column_List" >
|
||||
id, dailyplanid, materialid, workstationid, recoverid, recovertime, recovernum, memo
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from tb_plan_material_recover
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
|
||||
delete from tb_plan_material_recover
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.sipai.entity.plan.MaterialRecover" >
|
||||
insert into tb_plan_material_recover (id, dailyplanid, materialid,
|
||||
workstationid, recoverid, recovertime,
|
||||
recovernum, memo)
|
||||
values (#{id,jdbcType=VARCHAR}, #{dailyplanid,jdbcType=VARCHAR}, #{materialid,jdbcType=VARCHAR},
|
||||
#{workstationid,jdbcType=VARCHAR}, #{recoverid,jdbcType=VARCHAR}, #{recovertime,jdbcType=TIMESTAMP},
|
||||
#{recovernum,jdbcType=DOUBLE}, #{memo,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.sipai.entity.plan.MaterialRecover" >
|
||||
insert into tb_plan_material_recover
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
id,
|
||||
</if>
|
||||
<if test="dailyplanid != null" >
|
||||
dailyplanid,
|
||||
</if>
|
||||
<if test="materialid != null" >
|
||||
materialid,
|
||||
</if>
|
||||
<if test="workstationid != null" >
|
||||
workstationid,
|
||||
</if>
|
||||
<if test="recoverid != null" >
|
||||
recoverid,
|
||||
</if>
|
||||
<if test="recovertime != null" >
|
||||
recovertime,
|
||||
</if>
|
||||
<if test="recovernum != null" >
|
||||
recovernum,
|
||||
</if>
|
||||
<if test="memo != null" >
|
||||
memo,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
#{id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="dailyplanid != null" >
|
||||
#{dailyplanid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="materialid != null" >
|
||||
#{materialid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="workstationid != null" >
|
||||
#{workstationid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="recoverid != null" >
|
||||
#{recoverid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="recovertime != null" >
|
||||
#{recovertime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="recovernum != null" >
|
||||
#{recovernum,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="memo != null" >
|
||||
#{memo,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.plan.MaterialRecover" >
|
||||
update tb_plan_material_recover
|
||||
<set >
|
||||
<if test="dailyplanid != null" >
|
||||
dailyplanid = #{dailyplanid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="materialid != null" >
|
||||
materialid = #{materialid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="workstationid != null" >
|
||||
workstationid = #{workstationid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="recoverid != null" >
|
||||
recoverid = #{recoverid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="recovertime != null" >
|
||||
recovertime = #{recovertime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="recovernum != null" >
|
||||
recovernum = #{recovernum,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="memo != null" >
|
||||
memo = #{memo,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.plan.MaterialRecover" >
|
||||
update tb_plan_material_recover
|
||||
set dailyplanid = #{dailyplanid,jdbcType=VARCHAR},
|
||||
materialid = #{materialid,jdbcType=VARCHAR},
|
||||
workstationid = #{workstationid,jdbcType=VARCHAR},
|
||||
recoverid = #{recoverid,jdbcType=VARCHAR},
|
||||
recovertime = #{recovertime,jdbcType=TIMESTAMP},
|
||||
recovernum = #{recovernum,jdbcType=DOUBLE},
|
||||
memo = #{memo,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_plan_material_recover
|
||||
${where}
|
||||
</select>
|
||||
<delete id="deleteByWhere" parameterType="java.lang.String" >
|
||||
delete from tb_plan_material_recover
|
||||
${where}
|
||||
</delete>
|
||||
|
||||
|
||||
<select id="getMaterialRecover" resultMap="MaterialRecoverMap" parameterType="java.lang.String">
|
||||
select r.*,
|
||||
d.id as d_id,
|
||||
d.name as d_name,
|
||||
d.plandt as d_plandt,
|
||||
m.id as m_id,
|
||||
m.materialcode as m_materialcode,
|
||||
m.materialname as m_materialname,
|
||||
m.unit as m_unit,
|
||||
w.id as w_id,
|
||||
w.name as w_name,
|
||||
w.serial as w_serial,
|
||||
u.id as u_id,
|
||||
u.name as u_name
|
||||
from tb_plan_material_recover r
|
||||
left join TB_plan_dailyplanSummary d on r.dailyplanid=d.id
|
||||
left join tb_material_info m on r.materialid=m.id
|
||||
left join tb_work_workstation w on r.workstationid=w.id
|
||||
left join tb_user u on r.recoverid=u.id
|
||||
${where}
|
||||
</select>
|
||||
<resultMap id="MaterialRecoverMap" type="com.sipai.entity.plan.MaterialRecover">
|
||||
<id column="id" property="id" jdbcType="VARCHAR" />
|
||||
<result column="dailyplanid" property="dailyplanid" jdbcType="VARCHAR" />
|
||||
<result column="materialid" property="materialid" jdbcType="VARCHAR" />
|
||||
<result column="workstationid" property="workstationid" jdbcType="VARCHAR" />
|
||||
<result column="recoverid" property="recoverid" jdbcType="VARCHAR" />
|
||||
<result column="recovertime" property="recovertime" jdbcType="TIMESTAMP" />
|
||||
<result column="recovernum" property="recovernum" jdbcType="DOUBLE" />
|
||||
<result column="memo" property="memo" jdbcType="VARCHAR" />
|
||||
|
||||
<association property="dailyPlanSummary" resultMap="dailyPlanSummaryResult"/>
|
||||
<association property="materialInfo" resultMap="materialInfoResult"/>
|
||||
<association property="workstation" resultMap="workstationResult"/>
|
||||
<association property="recover" resultMap="recoverResult"/>
|
||||
</resultMap>
|
||||
<resultMap id="dailyPlanSummaryResult" type="com.sipai.entity.plan.DailyPlanSummary">
|
||||
<id property="id" column="d_id"/>
|
||||
<result property="name" column="d_name"/>
|
||||
<result property="plandt" column="d_plandt"/>
|
||||
</resultMap>
|
||||
<resultMap id="materialInfoResult" type="com.sipai.entity.material.MaterialInfo">
|
||||
<id property="id" column="m_id"/>
|
||||
<result property="materialcode" column="m_materialcode"/>
|
||||
<result property="materialname" column="m_materialname"/>
|
||||
<result property="unit" column="m_unit"/>
|
||||
</resultMap>
|
||||
<resultMap id="workstationResult" type="com.sipai.entity.work.Workstation">
|
||||
<id property="id" column="w_id"/>
|
||||
<result property="name" column="w_name"/>
|
||||
<result property="serial" column="w_serial"/>
|
||||
</resultMap>
|
||||
<resultMap id="recoverResult" type="com.sipai.entity.user.User">
|
||||
<id property="id" column="u_id"/>
|
||||
<result property="name" column="u_name"/>
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
472
bin/target/classes/com/sipai/mapper/plan/ProdtaskMapper.xml
Normal file
472
bin/target/classes/com/sipai/mapper/plan/ProdtaskMapper.xml
Normal file
@ -0,0 +1,472 @@
|
||||
<?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="plan.ProdtaskMapper" >
|
||||
<resultMap id="BaseResultMap" type="com.sipai.entity.plan.Prodtask" >
|
||||
<id column="id" property="id" jdbcType="VARCHAR" />
|
||||
<result column="taskcode" property="taskcode" jdbcType="VARCHAR" />
|
||||
<result column="billstatus" property="billstatus" jdbcType="VARCHAR" />
|
||||
<result column="workshop" property="workshop" jdbcType="VARCHAR" />
|
||||
<result column="materialcode" property="materialcode" jdbcType="VARCHAR" />
|
||||
<result column="materialname" property="materialname" jdbcType="VARCHAR" />
|
||||
<result column="model" property="model" jdbcType="VARCHAR" />
|
||||
<result column="batch" property="batch" jdbcType="VARCHAR" />
|
||||
<result column="unit" property="unit" jdbcType="VARCHAR" />
|
||||
<result column="planamount" property="planamount" jdbcType="DOUBLE" />
|
||||
<result column="pstdate" property="pstdate" jdbcType="TIMESTAMP" />
|
||||
<result column="pendate" property="pendate" jdbcType="TIMESTAMP" />
|
||||
<result column="type" property="type" jdbcType="VARCHAR" />
|
||||
<result column="bomno" property="bomno" jdbcType="VARCHAR" />
|
||||
<result column="costobject" property="costobject" jdbcType="VARCHAR" />
|
||||
<result column="source" property="source" jdbcType="VARCHAR" />
|
||||
<result column="planno" property="planno" jdbcType="VARCHAR" />
|
||||
<result column="salesno" property="salesno" jdbcType="VARCHAR" />
|
||||
<result column="procompany" property="procompany" jdbcType="VARCHAR" />
|
||||
<result column="commonunit" property="commonunit" jdbcType="VARCHAR" />
|
||||
<result column="qualitypart" property="qualitypart" jdbcType="VARCHAR" />
|
||||
<result column="astdate" property="astdate" jdbcType="TIMESTAMP" />
|
||||
<result column="aendate" property="aendate" jdbcType="TIMESTAMP" />
|
||||
<result column="midentification" property="midentification" jdbcType="VARCHAR" />
|
||||
<result column="runstatus" property="runstatus" jdbcType="VARCHAR" />
|
||||
<result column="plantype" property="plantype" jdbcType="VARCHAR" />
|
||||
<result column="bomtype" property="bomtype" 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="relation" property="relation" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List" >
|
||||
id, taskcode, billstatus, workshop, materialcode, materialname, model, batch, unit,
|
||||
planamount, pstdate, pendate, type, bomno, costobject, source, planno, salesno, procompany,
|
||||
commonunit, qualitypart, astdate, aendate, midentification, runstatus, plantype,
|
||||
bomtype, insuser, insdt, pid, relation
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from tb_plan_prodtask
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
|
||||
delete from tb_plan_prodtask
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.sipai.entity.plan.Prodtask" >
|
||||
insert into tb_plan_prodtask (id, taskcode, billstatus,
|
||||
workshop, materialcode, materialname,
|
||||
model, batch, unit,
|
||||
planamount, pstdate, pendate,
|
||||
type, bomno, costobject,
|
||||
source, planno, salesno,
|
||||
procompany, commonunit, qualitypart,
|
||||
astdate, aendate, midentification,
|
||||
runstatus, plantype, bomtype,
|
||||
insuser, insdt, pid,
|
||||
relation)
|
||||
values (#{id,jdbcType=VARCHAR}, #{taskcode,jdbcType=VARCHAR}, #{billstatus,jdbcType=VARCHAR},
|
||||
#{workshop,jdbcType=VARCHAR}, #{materialcode,jdbcType=VARCHAR}, #{materialname,jdbcType=VARCHAR},
|
||||
#{model,jdbcType=VARCHAR}, #{batch,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR},
|
||||
#{planamount,jdbcType=DOUBLE}, #{pstdate,jdbcType=TIMESTAMP}, #{pendate,jdbcType=TIMESTAMP},
|
||||
#{type,jdbcType=VARCHAR}, #{bomno,jdbcType=VARCHAR}, #{costobject,jdbcType=VARCHAR},
|
||||
#{source,jdbcType=VARCHAR}, #{planno,jdbcType=VARCHAR}, #{salesno,jdbcType=VARCHAR},
|
||||
#{procompany,jdbcType=VARCHAR}, #{commonunit,jdbcType=VARCHAR}, #{qualitypart,jdbcType=VARCHAR},
|
||||
#{astdate,jdbcType=TIMESTAMP}, #{aendate,jdbcType=TIMESTAMP}, #{midentification,jdbcType=VARCHAR},
|
||||
#{runstatus,jdbcType=VARCHAR}, #{plantype,jdbcType=VARCHAR}, #{bomtype,jdbcType=VARCHAR},
|
||||
#{insuser,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP}, #{pid,jdbcType=VARCHAR},
|
||||
#{relation,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.sipai.entity.plan.Prodtask" >
|
||||
insert into tb_plan_prodtask
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
id,
|
||||
</if>
|
||||
<if test="taskcode != null" >
|
||||
taskcode,
|
||||
</if>
|
||||
<if test="billstatus != null" >
|
||||
billstatus,
|
||||
</if>
|
||||
<if test="workshop != null" >
|
||||
workshop,
|
||||
</if>
|
||||
<if test="materialcode != null" >
|
||||
materialcode,
|
||||
</if>
|
||||
<if test="materialname != null" >
|
||||
materialname,
|
||||
</if>
|
||||
<if test="model != null" >
|
||||
model,
|
||||
</if>
|
||||
<if test="batch != null" >
|
||||
batch,
|
||||
</if>
|
||||
<if test="unit != null" >
|
||||
unit,
|
||||
</if>
|
||||
<if test="planamount != null" >
|
||||
planamount,
|
||||
</if>
|
||||
<if test="pstdate != null" >
|
||||
pstdate,
|
||||
</if>
|
||||
<if test="pendate != null" >
|
||||
pendate,
|
||||
</if>
|
||||
<if test="type != null" >
|
||||
type,
|
||||
</if>
|
||||
<if test="bomno != null" >
|
||||
bomno,
|
||||
</if>
|
||||
<if test="costobject != null" >
|
||||
costobject,
|
||||
</if>
|
||||
<if test="source != null" >
|
||||
source,
|
||||
</if>
|
||||
<if test="planno != null" >
|
||||
planno,
|
||||
</if>
|
||||
<if test="salesno != null" >
|
||||
salesno,
|
||||
</if>
|
||||
<if test="procompany != null" >
|
||||
procompany,
|
||||
</if>
|
||||
<if test="commonunit != null" >
|
||||
commonunit,
|
||||
</if>
|
||||
<if test="qualitypart != null" >
|
||||
qualitypart,
|
||||
</if>
|
||||
<if test="astdate != null" >
|
||||
astdate,
|
||||
</if>
|
||||
<if test="aendate != null" >
|
||||
aendate,
|
||||
</if>
|
||||
<if test="midentification != null" >
|
||||
midentification,
|
||||
</if>
|
||||
<if test="runstatus != null" >
|
||||
runstatus,
|
||||
</if>
|
||||
<if test="plantype != null" >
|
||||
plantype,
|
||||
</if>
|
||||
<if test="bomtype != null" >
|
||||
bomtype,
|
||||
</if>
|
||||
<if test="insuser != null" >
|
||||
insuser,
|
||||
</if>
|
||||
<if test="insdt != null" >
|
||||
insdt,
|
||||
</if>
|
||||
<if test="pid != null" >
|
||||
pid,
|
||||
</if>
|
||||
<if test="relation != null" >
|
||||
relation,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
#{id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="taskcode != null" >
|
||||
#{taskcode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="billstatus != null" >
|
||||
#{billstatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="workshop != null" >
|
||||
#{workshop,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="materialcode != null" >
|
||||
#{materialcode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="materialname != null" >
|
||||
#{materialname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="model != null" >
|
||||
#{model,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="batch != null" >
|
||||
#{batch,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="unit != null" >
|
||||
#{unit,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="planamount != null" >
|
||||
#{planamount,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="pstdate != null" >
|
||||
#{pstdate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="pendate != null" >
|
||||
#{pendate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="type != null" >
|
||||
#{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bomno != null" >
|
||||
#{bomno,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="costobject != null" >
|
||||
#{costobject,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="source != null" >
|
||||
#{source,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="planno != null" >
|
||||
#{planno,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="salesno != null" >
|
||||
#{salesno,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="procompany != null" >
|
||||
#{procompany,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="commonunit != null" >
|
||||
#{commonunit,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="qualitypart != null" >
|
||||
#{qualitypart,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="astdate != null" >
|
||||
#{astdate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="aendate != null" >
|
||||
#{aendate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="midentification != null" >
|
||||
#{midentification,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="runstatus != null" >
|
||||
#{runstatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="plantype != null" >
|
||||
#{plantype,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bomtype != null" >
|
||||
#{bomtype,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="relation != null" >
|
||||
#{relation,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.plan.Prodtask" >
|
||||
update tb_plan_prodtask
|
||||
<set >
|
||||
<if test="taskcode != null" >
|
||||
taskcode = #{taskcode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="billstatus != null" >
|
||||
billstatus = #{billstatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="workshop != null" >
|
||||
workshop = #{workshop,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="materialcode != null" >
|
||||
materialcode = #{materialcode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="materialname != null" >
|
||||
materialname = #{materialname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="model != null" >
|
||||
model = #{model,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="batch != null" >
|
||||
batch = #{batch,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="unit != null" >
|
||||
unit = #{unit,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="planamount != null" >
|
||||
planamount = #{planamount,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="pstdate != null" >
|
||||
pstdate = #{pstdate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="pendate != null" >
|
||||
pendate = #{pendate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="type != null" >
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bomno != null" >
|
||||
bomno = #{bomno,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="costobject != null" >
|
||||
costobject = #{costobject,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="source != null" >
|
||||
source = #{source,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="planno != null" >
|
||||
planno = #{planno,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="salesno != null" >
|
||||
salesno = #{salesno,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="procompany != null" >
|
||||
procompany = #{procompany,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="commonunit != null" >
|
||||
commonunit = #{commonunit,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="qualitypart != null" >
|
||||
qualitypart = #{qualitypart,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="astdate != null" >
|
||||
astdate = #{astdate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="aendate != null" >
|
||||
aendate = #{aendate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="midentification != null" >
|
||||
midentification = #{midentification,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="runstatus != null" >
|
||||
runstatus = #{runstatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="plantype != null" >
|
||||
plantype = #{plantype,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bomtype != null" >
|
||||
bomtype = #{bomtype,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<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="relation != null" >
|
||||
relation = #{relation,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.plan.Prodtask" >
|
||||
update tb_plan_prodtask
|
||||
set taskcode = #{taskcode,jdbcType=VARCHAR},
|
||||
billstatus = #{billstatus,jdbcType=VARCHAR},
|
||||
workshop = #{workshop,jdbcType=VARCHAR},
|
||||
materialcode = #{materialcode,jdbcType=VARCHAR},
|
||||
materialname = #{materialname,jdbcType=VARCHAR},
|
||||
model = #{model,jdbcType=VARCHAR},
|
||||
batch = #{batch,jdbcType=VARCHAR},
|
||||
unit = #{unit,jdbcType=VARCHAR},
|
||||
planamount = #{planamount,jdbcType=DOUBLE},
|
||||
pstdate = #{pstdate,jdbcType=TIMESTAMP},
|
||||
pendate = #{pendate,jdbcType=TIMESTAMP},
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
bomno = #{bomno,jdbcType=VARCHAR},
|
||||
costobject = #{costobject,jdbcType=VARCHAR},
|
||||
source = #{source,jdbcType=VARCHAR},
|
||||
planno = #{planno,jdbcType=VARCHAR},
|
||||
salesno = #{salesno,jdbcType=VARCHAR},
|
||||
procompany = #{procompany,jdbcType=VARCHAR},
|
||||
commonunit = #{commonunit,jdbcType=VARCHAR},
|
||||
qualitypart = #{qualitypart,jdbcType=VARCHAR},
|
||||
astdate = #{astdate,jdbcType=TIMESTAMP},
|
||||
aendate = #{aendate,jdbcType=TIMESTAMP},
|
||||
midentification = #{midentification,jdbcType=VARCHAR},
|
||||
runstatus = #{runstatus,jdbcType=VARCHAR},
|
||||
plantype = #{plantype,jdbcType=VARCHAR},
|
||||
bomtype = #{bomtype,jdbcType=VARCHAR},
|
||||
insuser = #{insuser,jdbcType=VARCHAR},
|
||||
insdt = #{insdt,jdbcType=TIMESTAMP},
|
||||
pid = #{pid,jdbcType=VARCHAR},
|
||||
relation = #{relation,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_plan_prodtask
|
||||
${where}
|
||||
</select>
|
||||
<delete id="deleteByWhere" parameterType="java.lang.String" >
|
||||
delete from tb_plan_prodtask
|
||||
${where}
|
||||
</delete>
|
||||
<select id="getListByTaskCode" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from tb_plan_prodtask
|
||||
where taskcode = #{taskcode,jdbcType=VARCHAR}
|
||||
</select>
|
||||
|
||||
<resultMap id="BaseResultMapForSelect" type="com.sipai.entity.plan.Prodtask" >
|
||||
<id column="id" property="id" jdbcType="VARCHAR" />
|
||||
<result column="taskcode" property="taskcode" jdbcType="VARCHAR" />
|
||||
<result column="billstatus" property="billstatus" jdbcType="VARCHAR" />
|
||||
<result column="workshop" property="workshop" jdbcType="VARCHAR" />
|
||||
<result column="materialcode" property="materialcode" jdbcType="VARCHAR" />
|
||||
<result column="materialname" property="materialname" jdbcType="VARCHAR" />
|
||||
<result column="model" property="model" jdbcType="VARCHAR" />
|
||||
<result column="batch" property="batch" jdbcType="VARCHAR" />
|
||||
<result column="unit" property="unit" jdbcType="VARCHAR" />
|
||||
<result column="planamount" property="planamount" jdbcType="DOUBLE" />
|
||||
<result column="pstdate" property="pstdate" jdbcType="TIMESTAMP" />
|
||||
<result column="pendate" property="pendate" jdbcType="TIMESTAMP" />
|
||||
<result column="type" property="type" jdbcType="VARCHAR" />
|
||||
<result column="bomno" property="bomno" jdbcType="VARCHAR" />
|
||||
<result column="costobject" property="costobject" jdbcType="VARCHAR" />
|
||||
<result column="source" property="source" jdbcType="VARCHAR" />
|
||||
<result column="planno" property="planno" jdbcType="VARCHAR" />
|
||||
<result column="salesno" property="salesno" jdbcType="VARCHAR" />
|
||||
<result column="procompany" property="procompany" jdbcType="VARCHAR" />
|
||||
<result column="commonunit" property="commonunit" jdbcType="VARCHAR" />
|
||||
<result column="qualitypart" property="qualitypart" jdbcType="VARCHAR" />
|
||||
<result column="astdate" property="astdate" jdbcType="TIMESTAMP" />
|
||||
<result column="aendate" property="aendate" jdbcType="TIMESTAMP" />
|
||||
<result column="midentification" property="midentification" jdbcType="VARCHAR" />
|
||||
<result column="runstatus" property="runstatus" jdbcType="VARCHAR" />
|
||||
<result column="plantype" property="plantype" jdbcType="VARCHAR" />
|
||||
<result column="bomtype" property="bomtype" 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="relation" property="relation" jdbcType="VARCHAR" />
|
||||
<result column="tasklistcode" property="tasklistcode" jdbcType="VARCHAR" />
|
||||
<result column="productno" property="productno" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
|
||||
<select id="getListForSelect" resultMap="BaseResultMapForSelect" parameterType="java.lang.String" >
|
||||
select
|
||||
P.id, taskcode, P.billstatus,
|
||||
workshop, materialcode, materialname,
|
||||
model, batch, unit,
|
||||
planamount, P.pstdate, P.pendate,
|
||||
type, bomno, costobject,
|
||||
source, planno, P.salesno,
|
||||
procompany, commonunit, qualitypart,
|
||||
astdate, aendate, midentification,
|
||||
runstatus, plantype, bomtype,
|
||||
P.insuser, P.insdt, pid,
|
||||
relation, T.tasklistcode ,T.productno
|
||||
from tb_plan_prodtask P
|
||||
left outer join tb_plan_taskorder T on P.pid = T.id
|
||||
${where}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
271
bin/target/classes/com/sipai/mapper/plan/TaskorderMapper.xml
Normal file
271
bin/target/classes/com/sipai/mapper/plan/TaskorderMapper.xml
Normal file
@ -0,0 +1,271 @@
|
||||
<?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="plan.taskorderMapper" >
|
||||
<resultMap id="BaseResultMap" type="com.sipai.entity.plan.Taskorder" >
|
||||
<id column="id" property="id" jdbcType="VARCHAR" />
|
||||
<result column="tasklistcode" property="tasklistcode" jdbcType="VARCHAR" />
|
||||
<result column="salesno" property="salesno" jdbcType="VARCHAR" />
|
||||
<result column="productno" property="productno" jdbcType="VARCHAR" />
|
||||
<result column="productname" property="productname" jdbcType="VARCHAR" />
|
||||
<result column="prodamount" property="prodamount" jdbcType="DOUBLE" />
|
||||
<result column="pstdate" property="pstdate" jdbcType="TIMESTAMP" />
|
||||
<result column="pendate" property="pendate" jdbcType="TIMESTAMP" />
|
||||
<result column="billstatus" property="billstatus" jdbcType="VARCHAR" />
|
||||
<result column="billruntime" property="billruntime" jdbcType="TIMESTAMP" />
|
||||
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
|
||||
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
|
||||
<result column="stdt" property="stdt" jdbcType="TIMESTAMP" />
|
||||
<result column="taskcode" property="taskcode" jdbcType="VARCHAR" />
|
||||
<result column="planid" property="planid" jdbcType="VARCHAR" />
|
||||
<result column="preamount" property="preamount" jdbcType="DOUBLE" />
|
||||
<result column="actamount" property="actamount" jdbcType="DOUBLE" />
|
||||
<result column="totalpreamount" property="preamount" jdbcType="DOUBLE" />
|
||||
<result column="totalactamount" property="actamount" jdbcType="DOUBLE" />
|
||||
<result column="processrealid" property="processrealid" jdbcType="VARCHAR" />
|
||||
<result column="checknewstatus" property="checknewstatus" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List" >
|
||||
id, tasklistcode, salesno, productno, productname, prodamount, pstdate, pendate,
|
||||
billstatus, billruntime, insuser, insdt, checknewstatus
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from tb_plan_taskorder
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
|
||||
delete from tb_plan_taskorder
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.sipai.entity.plan.Taskorder" >
|
||||
insert into tb_plan_taskorder (id, tasklistcode, salesno,
|
||||
productno, productname, prodamount,
|
||||
pstdate, pendate, billstatus,
|
||||
billruntime, insuser, insdt,
|
||||
checknewstatus)
|
||||
values (#{id,jdbcType=VARCHAR}, #{tasklistcode,jdbcType=VARCHAR}, #{salesno,jdbcType=VARCHAR},
|
||||
#{productno,jdbcType=VARCHAR}, #{productname,jdbcType=VARCHAR}, #{prodamount,jdbcType=DOUBLE},
|
||||
#{pstdate,jdbcType=TIMESTAMP}, #{pendate,jdbcType=TIMESTAMP}, #{billstatus,jdbcType=VARCHAR},
|
||||
#{billruntime,jdbcType=TIMESTAMP}, #{insuser,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP},
|
||||
#{checknewstatus,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.sipai.entity.plan.Taskorder" >
|
||||
insert into tb_plan_taskorder
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
id,
|
||||
</if>
|
||||
<if test="tasklistcode != null" >
|
||||
tasklistcode,
|
||||
</if>
|
||||
<if test="salesno != null" >
|
||||
salesno,
|
||||
</if>
|
||||
<if test="productno != null" >
|
||||
productno,
|
||||
</if>
|
||||
<if test="productname != null" >
|
||||
productname,
|
||||
</if>
|
||||
<if test="prodamount != null" >
|
||||
prodamount,
|
||||
</if>
|
||||
<if test="pstdate != null" >
|
||||
pstdate,
|
||||
</if>
|
||||
<if test="pendate != null" >
|
||||
pendate,
|
||||
</if>
|
||||
<if test="billstatus != null" >
|
||||
billstatus,
|
||||
</if>
|
||||
<if test="billruntime != null" >
|
||||
billruntime,
|
||||
</if>
|
||||
<if test="insuser != null" >
|
||||
insuser,
|
||||
</if>
|
||||
<if test="insdt != null" >
|
||||
insdt,
|
||||
</if>
|
||||
<if test="checknewstatus != null" >
|
||||
checknewstatus,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
#{id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="tasklistcode != null" >
|
||||
#{tasklistcode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="salesno != null" >
|
||||
#{salesno,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="productno != null" >
|
||||
#{productno,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="productname != null" >
|
||||
#{productname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="prodamount != null" >
|
||||
#{prodamount,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="pstdate != null" >
|
||||
#{pstdate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="pendate != null" >
|
||||
#{pendate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="billstatus != null" >
|
||||
#{billstatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="billruntime != null" >
|
||||
#{billruntime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="insuser != null" >
|
||||
#{insuser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="insdt != null" >
|
||||
#{insdt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="checknewstatus != null" >
|
||||
#{checknewstatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.plan.Taskorder" >
|
||||
update tb_plan_taskorder
|
||||
<set >
|
||||
<if test="tasklistcode != null" >
|
||||
tasklistcode = #{tasklistcode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="salesno != null" >
|
||||
salesno = #{salesno,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="productno != null" >
|
||||
productno = #{productno,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="productname != null" >
|
||||
productname = #{productname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="prodamount != null" >
|
||||
prodamount = #{prodamount,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="pstdate != null" >
|
||||
pstdate = #{pstdate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="pendate != null" >
|
||||
pendate = #{pendate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="billstatus != null" >
|
||||
billstatus = #{billstatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="billruntime != null" >
|
||||
billruntime = #{billruntime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="insuser != null" >
|
||||
insuser = #{insuser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="insdt != null" >
|
||||
insdt = #{insdt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="checknewstatus != null" >
|
||||
checknewstatus = #{checknewstatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.plan.Taskorder" >
|
||||
update tb_plan_taskorder
|
||||
set tasklistcode = #{tasklistcode,jdbcType=VARCHAR},
|
||||
salesno = #{salesno,jdbcType=VARCHAR},
|
||||
productno = #{productno,jdbcType=VARCHAR},
|
||||
productname = #{productname,jdbcType=VARCHAR},
|
||||
prodamount = #{prodamount,jdbcType=DOUBLE},
|
||||
pstdate = #{pstdate,jdbcType=TIMESTAMP},
|
||||
pendate = #{pendate,jdbcType=TIMESTAMP},
|
||||
billstatus = #{billstatus,jdbcType=VARCHAR},
|
||||
billruntime = #{billruntime,jdbcType=TIMESTAMP},
|
||||
insuser = #{insuser,jdbcType=VARCHAR},
|
||||
insdt = #{insdt,jdbcType=TIMESTAMP},
|
||||
checknewstatus = #{checknewstatus,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_plan_taskorder
|
||||
${where}
|
||||
</select>
|
||||
<delete id="deleteByWhere" parameterType="java.lang.String" >
|
||||
delete from tb_plan_taskorder
|
||||
${where}
|
||||
</delete>
|
||||
<select id="selectByWhere" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from tb_plan_taskorder
|
||||
${where}
|
||||
</select>
|
||||
|
||||
<select id="getDayPlanAmount" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select T.[id] AS id,
|
||||
P.[stdt] AS stdt,
|
||||
T.tasklistcode,
|
||||
D.taskcode AS taskcode,
|
||||
D.[preamount] AS preamount,
|
||||
D.[actamount] AS actamount,
|
||||
C.procedurename AS procedurename
|
||||
from tb_plan_taskorder T
|
||||
LEFT OUTER JOIN tb_plan_day P ON P.taskOrderID = T.id
|
||||
LEFT OUTER JOIN tb_plan_taskdemand D ON D.[planid] = P.id
|
||||
LEFT OUTER JOIN tb_process_task_procedure C on C.procedurecode = D.taskcode
|
||||
${where}
|
||||
</select>
|
||||
|
||||
<select id="getTaskcodelist" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select P.stdt,D.taskcode,D.preamount,D.actamount
|
||||
from tb_plan_taskorder T
|
||||
left outer join tb_plan_day P on T.id = P.taskOrderID
|
||||
left outer join tb_plan_taskdemand D on D.planid = P.id
|
||||
${where}
|
||||
</select>
|
||||
|
||||
<select id="getProcessrealid" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select T.id AS id,
|
||||
P.id AS planid,
|
||||
T.billstatus AS billstatus,
|
||||
T.tasklistcode AS tasklistcode,
|
||||
P.processrealid AS processrealid,
|
||||
T.salesno AS salesno,
|
||||
T.productno AS productno,
|
||||
T.prodamount AS prodamount,
|
||||
T.pstdate AS pstdate,
|
||||
T.pendate AS pendate
|
||||
from tb_plan_taskorder T
|
||||
left outer join tb_plan_day P ON P.taskOrderID = T.id
|
||||
${where}
|
||||
</select>
|
||||
|
||||
<select id="getDistinctStdt" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select distinct P.stdt AS stdt,T.id,T.tasklistcode from tb_plan_taskorder T
|
||||
left outer join tb_plan_day P On P.taskOrderID = T.id
|
||||
${where}
|
||||
</select>
|
||||
|
||||
<!-- 测试存储过程 -->
|
||||
<select id="updateTasks" parameterMap="updateTasksMap" statementType="CALLABLE" resultMap="resultNextSeqMap">
|
||||
exec updateTasks(#{type},#{resp})
|
||||
</select>
|
||||
<parameterMap type="java.util.Map" id="updateTasksMap">
|
||||
<parameter property="type" mode="IN" jdbcType="VARCHAR"/>
|
||||
<parameter property="resp" mode="OUT" jdbcType="VARCHAR"/>
|
||||
</parameterMap>
|
||||
<resultMap type="java.util.Map" id="resultNextSeqMap">
|
||||
<result column="resp" property="resp" javaType="String" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
</mapper>
|
||||
@ -0,0 +1,122 @@
|
||||
<?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="plan.TaskorderReProdtaskMapper" >
|
||||
<resultMap id="BaseResultMap" type="com.sipai.entity.plan.TaskorderReProdtask" >
|
||||
<id column="id" property="id" jdbcType="VARCHAR" />
|
||||
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
|
||||
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
|
||||
<result column="taskorderid" property="taskorderid" jdbcType="VARCHAR" />
|
||||
<result column="prodtaskid" property="prodtaskid" jdbcType="VARCHAR" />
|
||||
<result column="amount" property="amount" jdbcType="DOUBLE" />
|
||||
|
||||
<association column="prodtaskid" property="taskcode" jdbcType="VARCHAR" select="selectTaskcode"></association>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectTaskcode" resultType="String" parameterType="java.lang.String" >
|
||||
select taskcode from tb_plan_prodtask where id = #{prodtaskid,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<sql id="Base_Column_List" >
|
||||
id, insuser, insdt, taskorderid, prodtaskid, amount
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from tb_plan_taskorder_relation_prodtask
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
|
||||
delete from tb_plan_taskorder_relation_prodtask
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.sipai.entity.plan.TaskorderReProdtask" >
|
||||
insert into tb_plan_taskorder_relation_prodtask (id, insuser, insdt,
|
||||
taskorderid, prodtaskid, amount
|
||||
)
|
||||
values (#{id,jdbcType=VARCHAR}, #{insuser,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP},
|
||||
#{taskorderid,jdbcType=VARCHAR}, #{prodtaskid,jdbcType=VARCHAR}, #{amount,jdbcType=DOUBLE}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.sipai.entity.plan.TaskorderReProdtask" >
|
||||
insert into tb_plan_taskorder_relation_prodtask
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
id,
|
||||
</if>
|
||||
<if test="insuser != null" >
|
||||
insuser,
|
||||
</if>
|
||||
<if test="insdt != null" >
|
||||
insdt,
|
||||
</if>
|
||||
<if test="taskorderid != null" >
|
||||
taskorderid,
|
||||
</if>
|
||||
<if test="prodtaskid != null" >
|
||||
prodtaskid,
|
||||
</if>
|
||||
<if test="amount != null" >
|
||||
amount,
|
||||
</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="taskorderid != null" >
|
||||
#{taskorderid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="prodtaskid != null" >
|
||||
#{prodtaskid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="amount != null" >
|
||||
#{amount,jdbcType=DOUBLE},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.plan.TaskorderReProdtask" >
|
||||
update tb_plan_taskorder_relation_prodtask
|
||||
<set >
|
||||
<if test="insuser != null" >
|
||||
insuser = #{insuser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="insdt != null" >
|
||||
insdt = #{insdt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="taskorderid != null" >
|
||||
taskorderid = #{taskorderid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="prodtaskid != null" >
|
||||
prodtaskid = #{prodtaskid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="amount != null" >
|
||||
amount = #{amount,jdbcType=DOUBLE},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.plan.TaskorderReProdtask" >
|
||||
update tb_plan_taskorder_relation_prodtask
|
||||
set insuser = #{insuser,jdbcType=VARCHAR},
|
||||
insdt = #{insdt,jdbcType=TIMESTAMP},
|
||||
taskorderid = #{taskorderid,jdbcType=VARCHAR},
|
||||
prodtaskid = #{prodtaskid,jdbcType=VARCHAR},
|
||||
amount = #{amount,jdbcType=DOUBLE}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<select id="selectListByWhere" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from tb_plan_taskorder_relation_prodtask
|
||||
${where}
|
||||
</select>
|
||||
<delete id="deleteByWhere" parameterType="java.lang.String" >
|
||||
delete from tb_plan_taskorder_relation_prodtask
|
||||
${where}
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user