From c1cb663f4308ddf02ee6ea435c809c8162585b03 Mon Sep 17 00:00:00 2001 From: wangfei <3597712270@qq.com> Date: 星期四, 01 八月 2024 16:38:25 +0800 Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes --- hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/mapper/ShelfRackMapper.xml | 29 +++++++++++++++++++---------- 1 files changed, 19 insertions(+), 10 deletions(-) diff --git a/hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/mapper/ShelfRackMapper.xml b/hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/mapper/ShelfRackMapper.xml index 0e13316..576b9a9 100644 --- a/hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/mapper/ShelfRackMapper.xml +++ b/hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/mapper/ShelfRackMapper.xml @@ -2,15 +2,24 @@ <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.mes.shelfrack.mapper.ShelfRackMapper"> - - <select id="selectshelf_rack" resultType="java.util.Map"> - <![CDATA[ - SELECT a.number, b.raw_type, b.raw_width, b.raw_height, b.raw_thickness, b.left_pieces, a.mod_time, a.enable_state, b.pieces, - datediff(now(), b.create_time) as rukutime, - concat(if(ROUND(b.left_pieces / b.pieces * 100, 0) < 20, 20, ROUND(b.left_pieces / b.pieces * 100, 0)), '%') as bfb - FROM shelf_rack AS a - LEFT JOIN raw_usage AS b ON a.raw_package_id = b.id - ]]> - </select> + <resultMap id="ShelfRackResultMap" type="com.mes.shelfrack.entity.request.RawUsageAndShelfRack"> + <result property="number" column="number"/> + <result property="rawType" column="raw_type"/> + <result property="rawWidth" column="raw_width"/> + <result property="rawHeight" column="raw_height"/> + <result property="rawThickness" column="raw_thickness"/> + <result property="enableState" column="enable_state"/> + <result property="pieces" column="pieces"/> + <result property="createTime" column="createTime" /> + <result property="batchId" column="batch_id"/> + </resultMap> + <select id="selectshelf_rack" resultMap="ShelfRackResultMap"> + <![CDATA[ + SELECT a.number, b.raw_type, b.raw_width, b.raw_height, b.raw_thickness, a.enable_state, b.pieces, + b.batch_id,DATE_FORMAT(b.create_time, '%Y-%m-%d %H:%i:%s') as createTime + FROM shelf_rack AS a + LEFT JOIN raw_usage AS b ON a.raw_package_id = b.id + ]]> +</select> </mapper> -- Gitblit v1.8.0