| | |
| | | <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="orderingCustomers" column="ordering_customers" jdbcType="VARCHAR"/> |
| | | <result property="orderingUnit" column="ordering_unit" jdbcType="VARCHAR"/> |
| | | <result property="urgency" column="urgency" jdbcType="VARCHAR"/> |
| | | <result property="appointedTime" column="appointed_time" jdbcType="TIMESTAMP"/> |
| | | <result property="laboratoryName" column="laboratory_name" jdbcType="VARCHAR"/> |
| | | <result property="sampleClassification" column="sample_classification" jdbcType="VARCHAR"/> |
| | | <result property="model" column="model" jdbcType="VARCHAR"/> |
| | | <result property="sample" column="sample" jdbcType="VARCHAR"/> |
| | | <result property="numberSamples" column="number_samples" jdbcType="INTEGER"/> |
| | | <result property="leaveSample" column="leave_sample" jdbcType="VARCHAR"/> |
| | | <result property="retainedSamples" column="retained_samples" jdbcType="INTEGER"/> |
| | | <result property="smapleType" column="smaple_type" jdbcType="VARCHAR"/> |
| | | <result property="entrustCompany" column="entrust_company" jdbcType="VARCHAR"/> |
| | | <result property="entrustName" column="entrust_name" jdbcType="VARCHAR"/> |
| | | <result property="documentTime" column="document_time" jdbcType="TIMESTAMP"/> |
| | | <result property="entrustmentTime" column="entrustment_time" jdbcType="TIMESTAMP"/> |
| | | <result property="inspectionProgress" column="inspection_progress" jdbcType="VARCHAR"/> |
| | | <result property="inspectionResult" column="inspection_result" jdbcType="VARCHAR"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | <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="appointedTime" column="appointed_time" 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="sample" column="sample" 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"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,entrust_code,sample_code, |
| | | ordering_customers,ordering_unit,urgency, |
| | | appointed_time,laboratory_name,sample_classification, |
| | | model,sample,number_samples, |
| | | leave_sample,retained_samples,smaple_type, |
| | | entrust_company,entrust_name,document_time, |
| | | entrustment_time,inspection_progress,inspection_result, |
| | | create_user,create_time,update_user, |
| | | update_time |
| | | custom,company,code, |
| | | type,appointed_time,laboratory, |
| | | smaple_type,model,sample, |
| | | sample_num,is_leave,leave_num, |
| | | ins_progress,state,remark, |
| | | otc_code,create_user,create_time, |
| | | update_user,update_time |
| | | </sql> |
| | | |
| | | <resultMap id="OrderThingDto" type="com.yuanchu.mom.dto.OrderThingDto"> |
| | | <result property="id" column="id"/> |
| | | <result property="company" column="company"/> |
| | | <result property="entrustCode" column="entrust_code"/> |
| | | <result property="sampleCode" column="sample_code"/> |
| | | <result property="custom" column="custom"/> |
| | | <result property="sample" column="sample"/> |
| | | <result property="model" column="model"/> |
| | | <result property="sampleNum" column="sample_num"/> |
| | | <result property="remark" column="remark"/> |
| | | <result property="insResult" column="ins_result"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <collection property="products" resultMap="ProductThingDto"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="ProductThingDto" type="com.yuanchu.mom.dto.ProductThingDto"> |
| | | <result property="productId" column="id"/> |
| | | <result property="inspectionItem" column="inspection_item"/> |
| | | <result property="lastValue" column="last_value"/> |
| | | <result property="insResult" column="ins_result"/> |
| | | <collection property="productResults" resultMap="productResultDto"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="productResultDto" type="com.yuanchu.mom.dto.productResultDto"> |
| | | <result property="id" column="id"/> |
| | | <result property="insValue" column="ins_value"/> |
| | | <result property="insResult" column="ins_result"/> |
| | | <result property="remark" column="remark"/> |
| | | </resultMap> |
| | | |
| | | <select id="getOrderThing" resultMap="OrderThingDto"> |
| | | select * |
| | | from ins_order io |
| | | left join ins_product ip on ip.ins_order_id = io.id |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | </select> |
| | | |
| | | <select id="selectInsOrderParameter" resultType="com.yuanchu.mom.pojo.InsOrder"> |
| | | select * |
| | | from ( |
| | | select |
| | | id, |
| | | entrust_code, |
| | | sample_code, |
| | | custom, |
| | | company, |
| | | code, |
| | | type, |
| | | appointed_time, |
| | | laboratory, |
| | | smaple_type, |
| | | model, |
| | | sample, |
| | | sample_num, |
| | | is_leave, |
| | | leave_num, |
| | | ins_progress, |
| | | state, |
| | | remark, |
| | | otc_code, |
| | | create_user, |
| | | create_time, |
| | | update_user, |
| | | update_time, |
| | | entrust_Company, |
| | | client, |
| | | document_Preparation, |
| | | entrustment_Time, |
| | | detection_Result |
| | | from ins_order |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |