浏览代码

陪验开发11

zhoutao 5 年之前
父节点
当前提交
8e55dfff25
共有 1 个文件被更改,包括 66 次插入0 次删除
  1. 66 0
      pigx-inventory/pigx-inventory-biz/src/main/resources/mapper/InspectionApplyMapper.xml

+ 66 - 0
pigx-inventory/pigx-inventory-biz/src/main/resources/mapper/InspectionApplyMapper.xml

@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~
+  ~      Copyright (c) 2018-2025, zhoutao All rights reserved.
+  ~
+  ~  Redistribution and use in source and binary forms, with or without
+  ~  modification, are permitted provided that the following conditions are met:
+  ~
+  ~ Redistributions of source code must retain the above copyright notice,
+  ~  this list of conditions and the following disclaimer.
+  ~  Redistributions in binary form must reproduce the above copyright
+  ~  notice, this list of conditions and the following disclaimer in the
+  ~  documentation and/or other materials provided with the distribution.
+  ~  Neither the name of the pig4cloud.com developer nor the names of its
+  ~  contributors may be used to endorse or promote products derived from
+  ~  this software without specific prior written permission.
+  ~  Author: zhoutao (zhoutao9006@163.com)
+  ~
+  -->
+
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.pig4cloud.pigx.qa.mapper.InspectionApplyMapper">
+
+
+	<select id="getByParm"  resultType="com.pig4cloud.pigx.qa.entity.InspectionApply">
+
+		select  ia.* FROM Inspection_Apply ia
+		inner  join  SG_SUPPLIER sp on ia.s_id=sp.s_id
+
+		where 1=1
+
+		<if test="scCode != null and scCode !=''">
+			and ia.sc_code like '%'+#{scCode}+'%'
+		</if>
+		<if test="poCode != null and poCode !=''">
+			and ia.po_code like '%'+#{poCode}+'%'
+		</if>
+		<if test="sId != null and sId !=''">
+			and ia.s_id = #{sId}
+		</if>
+		<if test="eId != null and eId !=''">
+			and ia.e_id = #{eId}
+		</if>
+		<if test="createTime != null and createTime !=''">
+			and ia.create_time >= CONCAT(left(#{createTime},10),' 00:00:00')
+
+		</if>
+		<if test="dateStart != null and dateStart !=''">
+			and ia.date_start >= CONCAT(left(#{dateStart},10),' 00:00:00')
+
+		</if>
+		<if test="dateEnd != null and dateEnd !=''">
+			and ia.date_end &lt; CONCAT(left(#{dateEnd},10),' 23:59:59')
+
+		</if>
+		<if test="areaCode != null and areaCode !=''">
+			and sp.area_code like '%'+#{areaCode}+'%'
+		</if>
+
+		order by ia.date_start asc ,ia.sc_id desc
+
+	</select>
+
+</mapper>