|
@@ -17,5 +17,80 @@
|
|
ORDER BY dry_number DESC
|
|
ORDER BY dry_number DESC
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+ <!-- 获得烘干入库记录总数 -->
|
|
|
|
+ <select id="getCountByCondition" parameterType="Map" resultType="java.lang.Integer">
|
|
|
|
+ SELECT
|
|
|
|
+ COUNT(id)
|
|
|
|
+ FROM dry_warehouse
|
|
|
|
+ WHERE delete_flag = '0'
|
|
|
|
+ <if test="searchType != null and searchType != ''">
|
|
|
|
+ <if test="searchType == 1">
|
|
|
|
+ AND status_flag = '1'
|
|
|
|
+ </if>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="baseId != null and baseId != ''">
|
|
|
|
+ AND base_id = #{baseId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchKeyWord != null and searchKeyWord != ''">
|
|
|
|
+ AND (lower(car_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(weigher) like lower(CONCAT('%',#{searchKeyWord},'%')))
|
|
|
|
+ </if>
|
|
|
|
+ <if test="startDate != null">
|
|
|
|
+ AND (DATE_FORMAT(in_warehouse_date,"%Y%m%d") >=
|
|
|
|
+ DATE_FORMAT(#{startDate},"%Y%m%d"))
|
|
|
|
+ </if>
|
|
|
|
+ <if test="endDate != null">
|
|
|
|
+ AND (DATE_FORMAT(in_warehouse_date,"%Y%m%d") <=
|
|
|
|
+ DATE_FORMAT(#{endDate},"%Y%m%d"))
|
|
|
|
+ </if>
|
|
|
|
+ </select>
|
|
|
|
|
|
|
|
+ <!-- 获得烘干入库记录列表 -->
|
|
|
|
+ <select id="getListByCondition" parameterType="Map"
|
|
|
|
+ resultType="com.yh.saas.plugin.yiliangyiyun.entity.DryWarehouse">
|
|
|
|
+ SELECT
|
|
|
|
+ id,
|
|
|
|
+ comp_id as compId,
|
|
|
|
+ base_id as baseId,
|
|
|
|
+ warehouse_name as warehouseName,
|
|
|
|
+ dry_number as dryNumber,
|
|
|
|
+ car_no as carNo,
|
|
|
|
+ goods_name_key as goodsNameKey,
|
|
|
|
+ goods_name as goodsName,
|
|
|
|
+ gross_weight as grossWeight,
|
|
|
|
+ weigher,
|
|
|
|
+ tare,
|
|
|
|
+ net_weight as netWeight,
|
|
|
|
+ status_flag as statusFlag,
|
|
|
|
+ status,
|
|
|
|
+ in_warehouse_date as inWarehouseDate,
|
|
|
|
+ update_date as updateDate,
|
|
|
|
+ create_date as createDate
|
|
|
|
+ FROM dry_warehouse
|
|
|
|
+ WHERE delete_flag = '0'
|
|
|
|
+ <if test="searchType != null and searchType != ''">
|
|
|
|
+ <if test="searchType == 1">
|
|
|
|
+ AND status_flag = '1'
|
|
|
|
+ </if>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="baseId != null and baseId != ''">
|
|
|
|
+ AND base_id = #{baseId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchKeyWord != null and searchKeyWord != ''">
|
|
|
|
+ AND (lower(car_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(weigher) like lower(CONCAT('%',#{searchKeyWord},'%')))
|
|
|
|
+ </if>
|
|
|
|
+ <if test="startDate != null">
|
|
|
|
+ AND (DATE_FORMAT(in_warehouse_date,"%Y%m%d") >=
|
|
|
|
+ DATE_FORMAT(#{startDate},"%Y%m%d"))
|
|
|
|
+ </if>
|
|
|
|
+ <if test="endDate != null">
|
|
|
|
+ AND (DATE_FORMAT(in_warehouse_date,"%Y%m%d") <=
|
|
|
|
+ DATE_FORMAT(#{endDate},"%Y%m%d"))
|
|
|
|
+ </if>
|
|
|
|
+ ORDER BY in_warehouse_date DESC
|
|
|
|
+ <if test="currentPage != null and currentPage != ''">
|
|
|
|
+ LIMIT ${startRecord}, ${pageSize}
|
|
|
|
+ </if>
|
|
|
|
+ </select>
|
|
</mapper>
|
|
</mapper>
|