| | |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.InsOrderMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.InsOrder"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="entrustCode" column="entrust_code" jdbcType="VARCHAR"/> |
| | | <result property="sampleCode" column="sample_code" jdbcType="VARCHAR"/> |
| | | <result property="custom" column="custom" jdbcType="VARCHAR"/> |
| | | <result property="company" column="company" jdbcType="VARCHAR"/> |
| | | <result property="code" column="code" jdbcType="VARCHAR"/> |
| | | <result property="type" column="type" jdbcType="INTEGER"/> |
| | | <result property="appointed" column="appointed" jdbcType="TIMESTAMP"/> |
| | | <result property="laboratory" column="laboratory" jdbcType="VARCHAR"/> |
| | | <result property="smapleType" column="smaple_type" jdbcType="VARCHAR"/> |
| | | <result property="model" column="model" jdbcType="VARCHAR"/> |
| | | <result property="sampleNum" column="sample_num" jdbcType="DOUBLE"/> |
| | | <result property="isLeave" column="is_leave" jdbcType="INTEGER"/> |
| | | <result property="leaveNum" column="leave_num" jdbcType="INTEGER"/> |
| | | <result property="insProgress" column="ins_progress" jdbcType="VARCHAR"/> |
| | | <result property="state" column="state" jdbcType="INTEGER"/> |
| | | <result property="remark" column="remark" jdbcType="VARCHAR"/> |
| | | <result property="otcCode" column="otc_code" jdbcType="VARCHAR"/> |
| | |
| | | otc_code,create_user,create_time, |
| | | update_user,update_time |
| | | </sql> |
| | | |
| | | <select id="addInsOrder"> |
| | | insert into ins_order |
| | | (entrust_code,sample_code,custom,company,code,type,laboratory,model,sample,sample_num,is_leave,leave_num,ins_progress,state,remark,otc_code,create_user,create_time,update_user,update_time) |
| | | values |
| | | (#{entrustCode},#{sampleCode},#{custom},#{company},#{code},#{type},#{appointedTime},#{laboratory},#{smapleType},#{model},#{sample},#{sampleNum},#{isLeave},#{leaveNum},#{insProgress},#{state},#{remark},#{otcCode},#{createUser},#{createTime},#{updateUser},#{updateTime}) |
| | | </select> |
| | | |
| | | <resultMap id="OrderThingDto" type="com.yuanchu.mom.dto.OrderThingDto"> |
| | | <result property="id" column="id"/> |
| | |
| | | from ( |
| | | select |
| | | id, |
| | | entrust_code, |
| | | sample_code, |
| | | custom, |
| | | company, |
| | | code, |
| | | type, |
| | | appointed, |
| | | laboratory, |
| | | sample_type, |
| | | model, |
| | | sample, |
| | | sample_num, |
| | | is_leave, |
| | | leave_num, |
| | | ins_progress, |
| | | state, |
| | | remark, |
| | | otc_code, |
| | | user_id, |
| | | create_user, |
| | | create_time, |
| | | otc_code, |
| | | code, |
| | | custom, |
| | | update_user, |
| | | update_time |
| | | update_time, |
| | | type, |
| | | entrust_code, |
| | | company, |
| | | remark, |
| | | create_time, |
| | | state |
| | | from ins_order |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | |
| | | <update id="upInsOrderParameter" parameterType="com.yuanchu.mom.pojo.InsOrder"> |
| | | UPDATE ins_order |
| | | <set> |
| | | <if test="entrustCode!=null and entrustCode!='' ">entrust_code=#{entrustCode},</if> |
| | | <if test="sample_Code!=null ">sample_code=#{sampleCode},</if> |
| | | <if test="custom!=null ">custom=#{custom},</if> |
| | | <if test="company!=null ">company=#{company}</if> |
| | | <if test="code!=null ">code=#{code}</if> |
| | | <if test="type!=null ">type=#{type}</if> |
| | | <if test="appointed!=null ">appointed=#{appointed}</if> |
| | | <if test="laboratory!=null ">laboratory=#{laboratory}</if> |
| | | <if test="smapleType!=null ">smaple_type=#{smapleType}</if> |
| | | <if test="model!=null ">model=#{model}</if> |
| | | <if test="sample!=null ">sample=#{sample}</if> |
| | | <if test="sampleNum!=null ">sample_num=#{sampleNum}</if> |
| | | <if test="isLeave!=null ">is_leave=#{isLeave}</if> |
| | | <if test="leaveNum!=null ">leave_num=#{leaveNum}</if> |
| | | <if test="insProgress!=null ">ins_progress=#{insProgress}</if> |
| | | <if test="state!=null ">state=#{state}</if> |
| | | <if test="remark!=null ">remark=#{remark}</if> |
| | | <if test="otcCode!=null ">otc_code=#{otcCode}</if> |
| | | <if test="appointed!=null and appointed!='' ">appointed=#{appointed},</if> |
| | | <if test="userId!=null ">user_id=#{userId},</if> |
| | | <if test="createUser!=null ">create_user=#{createUser}</if> |
| | | <if test="createTime!=null ">create_time=#{createTime}</if> |
| | | <if test="otcCode!=null ">otc_code=#{otcCode}</if> |
| | | <if test="code!=null ">code=#{code}</if> |
| | | <if test="custom!=null ">custom=#{custom}</if> |
| | | <if test="updateUser!=null ">update_user=#{updateUser}</if> |
| | | <if test="updateTime!=null ">update_time=#{updateTime}</if> |
| | | <if test="type!=null ">type=#{type}</if> |
| | | <if test="entrustCode!=null ">entrust_code=#{entrustCode}</if> |
| | | <if test="company!=null ">company=#{company}</if> |
| | | <if test="remark!=null ">remark=#{remark}</if> |
| | | <if test="createTime!=null ">create_time=#{createTime}</if> |
| | | <if test="state!=null ">state=#{state}</if> |
| | | </set> |
| | | <where> |
| | | id=#{id} |
| | | </where> |
| | | </where>--> |
| | | </update> |
| | | |
| | | </mapper> |