Forráskód Böngészése

Merge branch 'master' of http://47.100.37.243:10080/wutt/lsappBms

sunyadv 5 éve
szülő
commit
27be6da567

+ 9 - 0
pcbms/src/main/java/com/hssx/pcbms/entity/GoodsNo.java

@@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.annotation.TableId;
 import java.time.LocalDateTime;
 import com.baomidou.mybatisplus.annotation.TableField;
 import java.io.Serializable;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
@@ -59,6 +61,7 @@ public class GoodsNo extends Model<GoodsNo> {
      * 创建日期
      */
     @TableField("indate")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private LocalDateTime indate;
 
     /**
@@ -77,6 +80,7 @@ public class GoodsNo extends Model<GoodsNo> {
      * 最后更新日期
      */
     @TableField("update_indate")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private LocalDateTime updateIndate;
 
     /**
@@ -221,30 +225,35 @@ public class GoodsNo extends Model<GoodsNo> {
      * 上次更新时间
      */
     @TableField("last_update_time")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private LocalDateTime lastUpdateTime;
 
     /**
      * 下次更新时间
      */
     @TableField("next_update_time")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private LocalDateTime nextUpdateTime;
 
     /**
      * 上架时间
      */
     @TableField("grounding_time")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private LocalDateTime groundingTime;
 
     /**
      * 下架时间
      */
     @TableField("undercarriage_time")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private LocalDateTime undercarriageTime;
 
     /**
      * 首次使用时间
      */
     @TableField("first_use_time")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private LocalDateTime firstUseTime;
 
     /**

+ 2 - 0
pcbms/src/main/java/com/hssx/pcbms/service/impl/GoodsServiceImpl.java

@@ -283,6 +283,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
                 GoodsPrefix goodsPrefix = goodsPrefixMapper.selectOne(new QueryWrapper<GoodsPrefix>().orderByDesc("id").last("limit 1"));
                 if (lastGoodsNo == null) {
                     for (int i = 1; i <= count; i++) {
+                        goodsNo = new GoodsNo();
                         goodsNo.setGoodsId(goods.getId());
                         goodsNo.setModelNo(goodsPrefix.getPrefixStr() +"-"+ String.format("%07d", i));
                         goodsNoList.add(goodsNo);
@@ -293,6 +294,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
                 } else {
                     Integer start = Integer.parseInt(lastGoodsNo.getModelNo().substring(goodsPrefix.getPrefixStr().length()+1));
                     for (int i = 1; i <= count; i++) {
+                        goodsNo = new GoodsNo();
                         goodsNo.setGoodsId(goods.getId());
                         goodsNo.setModelNo(goodsPrefix.getPrefixStr() +"-"+ String.format("%07d", start + i));
                         goodsNoList.add(goodsNo);

+ 243 - 239
pcbms/src/main/resources/mapper/GoodsMapper.xml

@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.hssx.pcbms.mapper.GoodsMapper">
-
     <!-- 通用查询映射结果 -->
     <resultMap id="BaseResultMap" type="com.hssx.pcbms.entity.Goods">
         <id column="id" property="id" />
@@ -36,90 +35,157 @@
         id, name, tag_id, model_number, unit, address, factory, pic, service_life, next_indate, is_delete, creator_id, division_code, suffix_code, good_type, rack_id, rack_ip, rack_port, indate, project_no, project_name, purchase_date, warranty_period, price, content
     </sql>
 
-    <resultMap id="BaseResultMapVO" type="com.hssx.pcbms.entity.vo.GoodsVO">
-        <id column="id" property="id"/>
-        <result column="name" property="name"/>
-        <result column="temp" property="temp"/>
-        <result column="hum" property="hum"/>
-        <result column="door_status" property="doorStatus"/>
-        <result column="tag_id" property="tagId"/>
-        <result column="model_number" property="modelNumber"/>
-        <result column="unit" property="unit"/>
-        <result column="address" property="address"/>
-        <result column="factory" property="factory"/>
-        <result column="pic" property="pic"/>
-        <result column="service_life" property="serviceLife"/>
-        <result column="next_indate" property="nextIndate"/>
-        <result column="project_no" property="projectNo" />
-        <result column="project_name" property="projectName" />
-        <result column="purchase_date" property="purchaseDate" />
-        <result column="warranty_period" property="warrantyPeriod" />
-        <result column="price" property="price" />
-        <result column="content" property="content" />
-        <collection property="goodsNos" select="selectGoodsNoByGoodsId" javaType="java.util.List" column="{goodId = id}"
-                    ofType="com.hssx.pcbms.entity.GoodsNo">
-        </collection>
-    </resultMap>
-    <!-- 我的资产查询映射结果 -->
-    <resultMap id="BaseResultMapMyList" type="com.hssx.pcbms.entity.vo.GoodsVO">
-        <id column="id" property="id"/>
-        <result column="name" property="name"/>
-        <result column="tag_id" property="tagId"/>
-        <result column="model_number" property="modelNumber"/>
-        <result column="unit" property="unit"/>
-        <result column="address" property="address"/>
-        <result column="factory" property="factory"/>
-        <result column="pic" property="pic"/>
-        <result column="service_life" property="serviceLife"/>
-        <result column="next_indate" property="nextIndate"/>
-        <result column="divisioncode" property="divisionCode"/>
-        <result column="suffixcode" property="suffixCode"/>
-        <result column="project_no" property="projectNo" />
-        <result column="project_name" property="projectName" />
-        <result column="purchase_date" property="purchaseDate" />
-        <result column="warranty_period" property="warrantyPeriod" />
-        <result column="price" property="price" />
-        <result column="content" property="content" />
-        <collection property="goodsNos" ofType="com.hssx.pcbms.entity.GoodsNo">
-            <id column="nid" property="id"/>
-            <result column="model_no" property="modelNo"/>
-            <result column="division_code" property="divisionCode"/>
-            <result column="suffix_code" property="suffixCode"/>
-            <result column="state" property="state"/>
-            <result column="indate" property="indate"/>
-            <result column="goods_id" property="goodsId"/>
-            <result column="user_id" property="userId"/>
-            <result column="is_maintain" property="isMaintain" />
-        </collection>
-    </resultMap>
+        <resultMap id="BaseResultMapVO" type="com.hssx.pcbms.entity.vo.GoodsVO">
+            <id column="id" property="id"/>
+            <result column="name" property="name"/>
+            <result column="temp" property="temp"/>
+            <result column="hum" property="hum"/>
+            <result column="door_status" property="doorStatus"/>
+            <result column="tag_id" property="tagId"/>
+            <result column="model_number" property="modelNumber"/>
+            <result column="unit" property="unit"/>
+            <result column="address" property="address"/>
+            <result column="factory" property="factory"/>
+            <result column="pic" property="pic"/>
+            <result column="service_life" property="serviceLife"/>
+            <result column="next_indate" property="nextIndate"/>
+            <result column="project_no" property="projectNo" />
+            <result column="project_name" property="projectName" />
+            <result column="purchase_date" property="purchaseDate" />
+            <result column="warranty_period" property="warrantyPeriod" />
+            <result column="price" property="price" />
+            <result column="content" property="content" />
+            <collection property="goodsNosVO" select="selectGoodsNoByGoodsId" javaType="java.util.List" column="{goodId = id}"
+                        ofType="com.hssx.pcbms.entity.vo.GoodsNoVO">
+            </collection>
+        </resultMap>
+        <!-- 我的资产查询映射结果 -->
+        <resultMap id="BaseResultMapMyList" type="com.hssx.pcbms.entity.vo.GoodsVO">
+            <id column="id" property="id"/>
+            <result column="name" property="name"/>
+            <result column="tag_id" property="tagId"/>
+            <result column="model_number" property="modelNumber"/>
+            <result column="unit" property="unit"/>
+            <result column="address" property="address"/>
+            <result column="factory" property="factory"/>
+            <result column="pic" property="pic"/>
+            <result column="service_life" property="serviceLife"/>
+            <result column="next_indate" property="nextIndate"/>
+            <result column="divisioncode" property="divisionCode"/>
+            <result column="suffixcode" property="suffixCode"/>
+            <result column="project_no" property="projectNo" />
+            <result column="project_name" property="projectName" />
+            <result column="purchase_date" property="purchaseDate" />
+            <result column="warranty_period" property="warrantyPeriod" />
+            <result column="price" property="price" />
+            <result column="content" property="content" />
+            <collection property="goodsNos" ofType="com.hssx.pcbms.entity.GoodsNo">
+                <id column="nid" property="id"/>
+                <result column="model_no" property="modelNo"/>
+                <result column="division_code" property="divisionCode"/>
+                <result column="suffix_code" property="suffixCode"/>
+                <result column="state" property="state"/>
+                <result column="indate" property="indate"/>
+                <result column="goods_id" property="goodsId"/>
+                <result column="user_id" property="userId"/>
+                <result column="is_maintain" property="isMaintain" />
+            </collection>
+        </resultMap>
 
-    <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMapDetail" type="com.hssx.pcbms.entity.vo.GoodsVO">
-        <id column="id" property="id"/>
-        <result column="name" property="name"/>
-        <result column="temp" property="temp"/>
-        <result column="hum" property="hum"/>
-        <result column="door_status" property="doorStatus"/>
-        <result column="tag_id" property="tagId"/>
-        <result column="model_number" property="modelNumber"/>
-        <result column="unit" property="unit"/>
-        <result column="address" property="address"/>
-        <result column="factory" property="factory"/>
-        <result column="pic" property="pic"/>
-        <result column="service_life" property="serviceLife"/>
-        <result column="next_indate" property="nextIndate"/>
-        <result column="divisioncode" property="divisionCode"/>
-        <result column="suffixcode" property="suffixCode"/>
-        <result column="good_type" property="goodType" />
-        <result column="rack_id" property="rackId" />
-        <result column="tag_name" property="tagName" />
-        <result column="project_no" property="projectNo" />
-        <result column="project_name" property="projectName" />
-        <result column="purchase_date" property="purchaseDate" />
-        <result column="warranty_period" property="warrantyPeriod" />
-        <result column="price" property="price" />
-        <result column="content" property="content" />
-        <collection property="goodsNosVO" ofType="com.hssx.pcbms.entity.vo.GoodsNoVO">
+        <!-- 通用查询映射结果 -->
+        <resultMap id="BaseResultMapDetail" type="com.hssx.pcbms.entity.vo.GoodsVO">
+            <id column="id" property="id"/>
+            <result column="name" property="name"/>
+            <result column="temp" property="temp"/>
+            <result column="hum" property="hum"/>
+            <result column="door_status" property="doorStatus"/>
+            <result column="tag_id" property="tagId"/>
+            <result column="model_number" property="modelNumber"/>
+            <result column="unit" property="unit"/>
+            <result column="address" property="address"/>
+            <result column="factory" property="factory"/>
+            <result column="pic" property="pic"/>
+            <result column="service_life" property="serviceLife"/>
+            <result column="next_indate" property="nextIndate"/>
+            <result column="divisioncode" property="divisionCode"/>
+            <result column="suffixcode" property="suffixCode"/>
+            <result column="good_type" property="goodType" />
+            <result column="rack_id" property="rackId" />
+            <result column="tag_name" property="tagName" />
+            <result column="project_no" property="projectNo" />
+            <result column="project_name" property="projectName" />
+            <result column="purchase_date" property="purchaseDate" />
+            <result column="warranty_period" property="warrantyPeriod" />
+            <result column="price" property="price" />
+            <result column="content" property="content" />
+            <collection property="goodsNosVO" ofType="com.hssx.pcbms.entity.vo.GoodsNoVO">
+                <id column="nid" property="id"/>
+                <result column="model_no" property="modelNo" />
+                <result column="division_code" property="divisionCode" />
+                <result column="suffix_code" property="suffixCode" />
+                <result column="state" property="state" />
+                <result column="indate" property="indate" />
+                <result column="goods_id" property="goodsId" />
+                <result column="user_id" property="userId" />
+                <result column="update_indate" property="updateIndate" />
+                <result column="is_maintain" property="isMaintain" />
+                <result column="good_sn_no" property="goodSnNo" />
+                <result column="label_id" property="labelId" />
+                <result column="model_id" property="modelId" />
+                <result column="u_bit_num" property="uBitNum" />
+                <result column="power" property="power" />
+                <result column="rated_current" property="ratedCurrent" />
+                <result column="rated_voltage" property="ratedVoltage" />
+                <result column="serial_number" property="serialNumber" />
+                <result column="affiliate" property="affiliate" />
+                <result column="device_category" property="deviceCategory" />
+                <result column="stock" property="stock" />
+                <result column="server_weight" property="serverWeight" />
+                <result column="manufacturer" property="manufacturer" />
+                <result column="supplier" property="supplier" />
+                <result column="charger_id" property="chargerId" />
+                <result column="charger_name" property="chargerName" />
+                <result column="maintain_clc" property="maintainClc" />
+                <result column="maintenance_phone" property="maintenancePhone" />
+                <result column="last_maintainer_id" property="lastMaintainerId" />
+                <result column="last_maintainer_name" property="lastMaintainerName" />
+                <result column="next_maintainer_id" property="nextMaintainerId" />
+                <result column="next_maintainer_name" property="nextMaintainerName" />
+                <result column="last_update_time" property="lastUpdateTime" />
+                <result column="next_update_time" property="nextUpdateTime" />
+                <result column="grounding_time" property="groundingTime" />
+                <result column="undercarriage_time" property="undercarriageTime" />
+                <result column="first_use_time" property="firstUseTime" />
+                <result column="current_state" property="currentState" />
+                <result column="alarm_level" property="alarmLevel" />
+                <result column="subordinate_user_id" property="subordinateUserId" />
+                <result column="subordinate_user" property="subordinateUser" />
+                <result column="floor" property="floor" />
+                <result column="room" property="room" />
+                <result column="column_place" property="columnPlace" />
+                <result column="region" property="region" />
+                <result column="is_rack" property="isRack" />
+            </collection>
+        </resultMap>
+        <select id="getListBycondition" resultMap="BaseResultMapVO">
+            select
+            id, name, tag_id, model_number, unit, address,
+            factory, pic, service_life, next_indate,project_no,
+            project_name, purchase_date, warranty_period, price
+            from
+            goods
+            <where>
+                is_delete = 0 and good_type = 0
+                <if test="keyName != null and keyName != ''">
+                    and name like concat('%',#{keyName},'%')
+                </if>
+                <if test="tagId != null">
+                    and tag_id = #{tagId}
+                </if>
+            </where>
+            order by id desc
+        </select>
+        <resultMap id="GoodsNoMap" type="com.hssx.pcbms.entity.vo.GoodsNoVO">
             <id column="nid" property="id"/>
             <result column="model_no" property="modelNo" />
             <result column="division_code" property="divisionCode" />
@@ -166,168 +232,106 @@
             <result column="column_place" property="columnPlace" />
             <result column="region" property="region" />
             <result column="is_rack" property="isRack" />
-        </collection>
-    </resultMap>
-    <select id="getListBycondition" resultMap="BaseResultMapVO">
+            <result column="username" property="username" />
+            <result column="phone" property="phone" />
+        </resultMap>
+        <select id="selectGoodsNoByGoodsId" resultMap="GoodsNoMap">
         select
-        id, name, tag_id, model_number, unit, address,
-        factory, pic, service_life, next_indate,project_no, project_name, purchase_date, warranty_period, price
+            gn.id, gn.model_no, gn.state,gn.indate, gn.goods_id,gn.user_id, gn.update_indate,
+            gn.is_maintain, gn.good_sn_no,gn.user_id,u.name username,gn.is_maintain,u.phone,
+            gn.label_id,gn.model_id, gn.u_bit_num, gn.current_state, gn.alarm_level,gn.is_rack
         from
-        goods
-        <where>
-            is_delete = 0 and good_type = 0
-            <if test="keyName != null and keyName != ''">
-                and name like concat('%',#{keyName},'%')
-            </if>
-            <if test="tagId != null">
-                and tag_id = #{tagId}
-            </if>
-        </where>
-        order by id desc
-    </select>
-    <resultMap id="GoodsNoMap" type="com.hssx.pcbms.entity.GoodsNo">
-        <id column="id" property="id" />
-        <result column="model_no" property="modelNo" />
-        <result column="division_code" property="divisionCode" />
-        <result column="suffix_code" property="suffixCode" />
-        <result column="state" property="state" />
-        <result column="indate" property="indate" />
-        <result column="goods_id" property="goodsId" />
-        <result column="user_id" property="userId" />
-        <result column="update_indate" property="updateIndate" />
-        <result column="is_maintain" property="isMaintain" />
-        <result column="good_sn_no" property="goodSnNo" />
-        <result column="label_id" property="labelId" />
-        <result column="model_id" property="modelId" />
-        <result column="u_bit_num" property="uBitNum" />
-        <result column="power" property="power" />
-        <result column="rated_current" property="ratedCurrent" />
-        <result column="rated_voltage" property="ratedVoltage" />
-        <result column="serial_number" property="serialNumber" />
-        <result column="affiliate" property="affiliate" />
-        <result column="device_category" property="deviceCategory" />
-        <result column="stock" property="stock" />
-        <result column="server_weight" property="serverWeight" />
-        <result column="manufacturer" property="manufacturer" />
-        <result column="supplier" property="supplier" />
-        <result column="charger_id" property="chargerId" />
-        <result column="charger_name" property="chargerName" />
-        <result column="maintain_clc" property="maintainClc" />
-        <result column="maintenance_phone" property="maintenancePhone" />
-        <result column="last_maintainer_id" property="lastMaintainerId" />
-        <result column="last_maintainer_name" property="lastMaintainerName" />
-        <result column="next_maintainer_id" property="nextMaintainerId" />
-        <result column="next_maintainer_name" property="nextMaintainerName" />
-        <result column="last_update_time" property="lastUpdateTime" />
-        <result column="next_update_time" property="nextUpdateTime" />
-        <result column="grounding_time" property="groundingTime" />
-        <result column="undercarriage_time" property="undercarriageTime" />
-        <result column="first_use_time" property="firstUseTime" />
-        <result column="current_state" property="currentState" />
-        <result column="alarm_level" property="alarmLevel" />
-        <result column="subordinate_user_id" property="subordinateUserId" />
-        <result column="subordinate_user" property="subordinateUser" />
-        <result column="floor" property="floor" />
-        <result column="room" property="room" />
-        <result column="column_place" property="columnPlace" />
-        <result column="region" property="region" />
-        <result column="is_rack" property="isRack" />
-    </resultMap>
-    <select id="selectGoodsNoByGoodsId" resultMap="GoodsNoMap">
-        select
-            id, model_no, state,indate, goods_id,user_id, update_indate,
-            is_maintain, good_sn_no,
-            label_id,model_id, u_bit_num, current_state, alarm_level,is_rack
-        from
-            goods_no
-        where
-            goods_id = #{goodId}
-    </select>
-    <select id="getDetail" resultMap="BaseResultMapDetail">
-        select
-        g.id, g.name, g.tag_id,gt.name tag_name, g.model_number, g.unit,g.address, g.factory, g.pic, g.service_life, g.next_indate,g.division_code divisioncode,g.suffix_code suffixcode,
-        g.is_delete,gn.id nid,g.good_type,rd.hum,rd.door_status,rd.temp,g.project_no, g.project_name, g.purchase_date, g.warranty_period, g.price,g.content,
-        gn.model_no, gn.division_code, gn.suffix_code, gn.state, gn.indate, gn.goods_id, gn.user_id,u.name username,gn.is_maintain,u.phone
-        from
-        goods g
-        left join
-        goods_no gn
-        on g.id = gn.goods_id
-        left join user u
-        on u.id = gn.user_id
-        left join rack_data rd
-        on g.id = rd.goods_id
-        left join goods_tags gt
-        on gt.id = g.tag_id
-        <where>
-            g.id = #{id}
-        </where>
-    </select>
-    <select id="getEuipmentList" resultMap="BaseResultMapDetail">
-        select
-        g.id, g.name, g.tag_id,gt.name tag_name, g.model_number, g.unit,g.address, g.factory, g.pic, g.service_life, g.next_indate,g.division_code divisioncode,g.suffix_code suffixcode,
-        g.is_delete,gn.id nid,g.good_type,rd.hum,rd.door_status,rd.temp,gn.is_rack,
-        gn.model_no, gn.division_code, gn.suffix_code, gn.state, gn.indate, gn.goods_id, gn.user_id,u.name username,gn.is_maintain,u.phone
-        from
-        goods g
-        left join
         goods_no gn
-        on g.id = gn.goods_id
         left join user u
         on u.id = gn.user_id
-        left join rack_data rd
-        on g.id = rd.goods_id
-        left join goods_tags gt
-        on gt.id = g.tag_id
-        <where>
-            g.id in <foreach collection="ids" index="index" open="(" item="item" close=")" separator=",">
-            #{item}
-        </foreach>
-        </where>
-    </select>
-
-    <select id="selectMyList" resultMap="BaseResultMapMyList">
-        select
-        g.id, g.name, g.tag_id, g.model_number, g.unit,g.address,g.project_no, g.project_name, g.purchase_date, g.warranty_period, g.price,
-        g.factory, g.pic, g.service_life, g.next_indate,g.division_code divisioncode,
-        g.suffix_code suffixcode,g.is_delete,gn.id nid,g.indate,gn.model_no,
-        gn.division_code, gn.suffix_code, gn.state, gn.indate, gn.goods_id,
-        gn.user_id,u.name username,gn.is_maintain,u.phone
-        from
-        goods g
-        left join
-        goods_no gn
-        on g.id = gn.goods_id
-        left join user u
-        on u.id = gn.user_id
-        <where>
-            AND gn.user_id = #{uid,jdbcType=INTEGER}
-        </where>
-        order by g.indate desc
-        <if test="start != null and pageSize != null">
-            limit #{start,jdbcType=INTEGER} ,#{pageSize,jdbcType=INTEGER}
-        </if>
+        where
+            goods_id = #{goodId}
     </select>
+        <select id="getDetail" resultMap="BaseResultMapDetail">
+            select
+            g.id, g.name, g.tag_id,gt.name tag_name, g.model_number, g.unit,g.address, g.factory, g.pic, g.service_life, g.next_indate,g.division_code divisioncode,g.suffix_code suffixcode,
+            g.is_delete,gn.id nid,g.good_type,rd.hum,rd.door_status,rd.temp,g.project_no, g.project_name, g.purchase_date, g.warranty_period, g.price,g.content,
+            gn.model_no, gn.division_code, gn.suffix_code, gn.state, gn.indate, gn.goods_id, gn.user_id,u.name username,gn.is_maintain,u.phone
+            from
+            goods g
+            left join
+            goods_no gn
+            on g.id = gn.goods_id
+            left join user u
+            on u.id = gn.user_id
+            left join rack_data rd
+            on g.id = rd.goods_id
+            left join goods_tags gt
+            on gt.id = g.tag_id
+            <where>
+                g.id = #{id}
+            </where>
+        </select>
+        <select id="getEuipmentList" resultMap="BaseResultMapDetail">
+            select
+            g.id, g.name, g.tag_id,gt.name tag_name, g.model_number, g.unit,g.address, g.factory, g.pic, g.service_life, g.next_indate,g.division_code divisioncode,g.suffix_code suffixcode,
+            g.is_delete,gn.id nid,g.good_type,rd.hum,rd.door_status,rd.temp,gn.is_rack,
+            gn.model_no, gn.division_code, gn.suffix_code, gn.state, gn.indate, gn.goods_id, gn.user_id,u.name username,gn.is_maintain,u.phone
+            from
+            goods g
+            left join
+            goods_no gn
+            on g.id = gn.goods_id
+            left join user u
+            on u.id = gn.user_id
+            left join rack_data rd
+            on g.id = rd.goods_id
+            left join goods_tags gt
+            on gt.id = g.tag_id
+            <where>
+                g.id in <foreach collection="ids" index="index" open="(" item="item" close=")" separator=",">
+                #{item}
+            </foreach>
+            </where>
+        </select>
 
-    <select id="getRackListBycondition" resultMap="BaseResultMapVO">
-        select
-        g.id, g.name, g.tag_id,rd.hum,rd.door_status,rd.temp,g.indate,
-        g.model_number, g.unit, g.address, g.factory, g.pic,
-        g.service_life, g.next_indate
-        from
-        goods g
-        left join rack_data rd
-        on g.id = rd.goods_id
-        <where>
-            is_delete = 0 and good_type = #{goodType}
-            <if test="keyName != null and keyName != ''">
-                and g.name like concat('%',#{keyName},'%')
-            </if>
-            <if test="tagId != null">
-                and g.tag_id = #{tagId}
+        <select id="selectMyList" resultMap="BaseResultMapMyList">
+            select
+            g.id, g.name, g.tag_id, g.model_number, g.unit,g.address,
+            g.factory, g.pic, g.service_life, g.next_indate,g.division_code divisioncode,
+            g.suffix_code suffixcode,g.is_delete,gn.id nid,g.indate,gn.model_no,
+            gn.division_code, gn.suffix_code, gn.state, gn.indate, gn.goods_id,
+            gn.user_id,u.name username,gn.is_maintain,u.phone,g.project_no,
+            g.project_name, g.purchase_date, g.warranty_period, g.price
+            from
+            goods g
+            left join
+            goods_no gn
+            on g.id = gn.goods_id
+            left join user u
+            on u.id = gn.user_id
+            <where>
+                AND gn.user_id = #{uid,jdbcType=INTEGER}
+            </where>
+            order by g.indate desc
+            <if test="start != null and pageSize != null">
+                limit #{start,jdbcType=INTEGER} ,#{pageSize,jdbcType=INTEGER}
             </if>
-        </where>
-        order by g.indate desc
-    </select>
+        </select>
 
+        <select id="getRackListBycondition" resultMap="BaseResultMapVO">
+            select
+            g.id, g.name, g.tag_id,rd.hum,rd.door_status,rd.temp,g.indate,
+            g.model_number, g.unit, g.address, g.factory, g.pic,
+            g.service_life, g.next_indate
+            from
+            goods g
+            left join rack_data rd
+            on g.id = rd.goods_id
+            <where>
+                is_delete = 0 and good_type = #{goodType}
+                <if test="keyName != null and keyName != ''">
+                    and g.name like concat('%',#{keyName},'%')
+                </if>
+                <if test="tagId != null">
+                    and g.tag_id = #{tagId}
+                </if>
+            </where>
+            order by g.indate desc
+        </select>
 </mapper>