Эх сурвалжийг харах

条件查询增加异常处理

chenw 7 жил өмнө
parent
commit
dffdfd2d6d

+ 38 - 34
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/dto/ListReqDTO.java

@@ -35,44 +35,48 @@ public class ListReqDTO implements Serializable {
     }
 
     public String getFinalCondition() {
-        JSONArray jsonArray = JSONArray.parseArray(this.condition);
-        if (null != jsonArray && jsonArray.size() > 0) {
-            StringBuffer finalCondition = new StringBuffer();
-            for (int i = 0; i < jsonArray.size(); i++) {
-                String con = null;
-                JSONObject jsonObject = (JSONObject)jsonArray.get(i);
-                Object type = jsonObject.get("type");
-                Object field = jsonObject.get("field");
-                Object operation = jsonObject.get("operation");
-                Object value = jsonObject.get("value");
-                //包含状态时,前台会自动加单引号
-                if (null != value && !"in".equals(operation) && !"not in".equals(operation)) {
-                    value = value.toString().replaceAll("'", "''");
-                }
-                if ("between".equals(operation)) {
-                    String[] vals = value.toString().split(",");
-                    con = " " + field + " " + operation + " '" + vals[0] + "' and '" + vals[1] + "' and";
-                } else if ("startsWith".equals(operation)) {
-                    con = " " + field + "  like '" + value +"%' and";
-                } else if ("endsWith".equals(operation)) {
-                    con = " " + field + " like '%" + value + "' and";
-                } else if ("in".equals(operation) || "not in".equals(operation)) {
-                    con = " " + field + " " + operation + " (" + value + ") and";
-                } else {
-                    //字符串默认是模糊查询
-                    if ("string".equals(type)) {
-                        con = " " + field + " like '%" + value + "%' and";
-                    } else if ("condition".equals(type)) {
-                        //type为condition为前端拼的条件
-                        con = " " + value + " and";
-                    }  else {
-                        con = " " + field + " " + operation + " '" + value + "' and";
+        try {
+            JSONArray jsonArray = JSONArray.parseArray(this.condition);
+            if (null != jsonArray && jsonArray.size() > 0) {
+                StringBuffer finalCondition = new StringBuffer();
+                for (int i = 0; i < jsonArray.size(); i++) {
+                    String con = null;
+                    JSONObject jsonObject = (JSONObject) jsonArray.get(i);
+                    Object type = jsonObject.get("type");
+                    Object field = jsonObject.get("field");
+                    Object operation = jsonObject.get("operation");
+                    Object value = jsonObject.get("value");
+                    //包含状态时,前台会自动加单引号
+                    if (null != value && !"in".equals(operation) && !"not in".equals(operation)) {
+                        value = value.toString().replaceAll("'", "''");
                     }
+                    if ("between".equals(operation)) {
+                        String[] vals = value.toString().split(",");
+                        con = " " + field + " " + operation + " '" + vals[0] + "' and '" + vals[1] + "' and";
+                    } else if ("startsWith".equals(operation)) {
+                        con = " " + field + "  like '" + value + "%' and";
+                    } else if ("endsWith".equals(operation)) {
+                        con = " " + field + " like '%" + value + "' and";
+                    } else if ("in".equals(operation) || "not in".equals(operation)) {
+                        con = " " + field + " " + operation + " (" + value + ") and";
+                    } else {
+                        //字符串默认是模糊查询
+                        if ("string".equals(type)) {
+                            con = " " + field + " like '%" + value + "%' and";
+                        } else if ("condition".equals(type)) {
+                            //type为condition为前端拼的条件
+                            con = " " + value + " and";
+                        } else {
+                            con = " " + field + " " + operation + " '" + value + "' and";
+                        }
 
+                    }
+                    finalCondition = finalCondition.append(con);
                 }
-                finalCondition = finalCondition.append(con);
+                return finalCondition.substring(0, finalCondition.length() - 3);
             }
-            return finalCondition.substring(0, finalCondition.length() - 3);
+        }catch (Exception e){
+            return null;
         }
         return null;
     }

+ 29 - 0
applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/VendorListDTO.java

@@ -0,0 +1,29 @@
+package com.usoftchina.saas.document.dto;
+
+import com.usoftchina.saas.document.entities.Vendor;
+import com.usoftchina.saas.document.entities.Vendorcontact;
+
+import java.io.Serializable;
+import java.util.List;
+
+public class VendorListDTO implements Serializable {
+
+    private Vendor main;
+    private List<Vendorcontact> items;
+
+    public Vendor getMain() {
+        return main;
+    }
+
+    public void setMain(Vendor main) {
+        this.main = main;
+    }
+
+    public List<Vendorcontact> getItems() {
+        return items;
+    }
+
+    public void setItems(List<Vendorcontact> items) {
+        this.items = items;
+    }
+}

+ 8 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/VendorController.java

@@ -6,6 +6,7 @@ import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.commons.dto.DocReqDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.document.dto.VendorDTO;
+import com.usoftchina.saas.document.dto.VendorListDTO;
 import com.usoftchina.saas.document.service.VendorService;
 import com.usoftchina.saas.page.PageRequest;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -25,4 +26,11 @@ public class VendorController {
         PageInfo<VendorDTO> vendorList = vendorService.getVendorsByCondition(page, listReqDTO);
         return Result.success(vendorList);
     }
+
+    @GetMapping("/getListById/{id}")
+    public Result<VendorListDTO> getDataById(@PathVariable("id") Long id){
+//        List<> vendorService.getListById(id);
+        return null;
+    }
+
 }

+ 1 - 2
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/VendorMapper.java

@@ -3,10 +3,9 @@ package com.usoftchina.saas.document.mapper;
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 
 
-import com.usoftchina.saas.commons.dto.DocReqDTO;
 import com.usoftchina.saas.document.dto.VendorDTO;
 import com.usoftchina.saas.document.entities.Vendor;
-import feign.Param;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 

+ 1 - 1
applications/document/document-server/src/main/resources/mapper/VendorMapper.xml

@@ -37,7 +37,7 @@
         <result column="ve_status" property="ve_status" jdbcType="VARCHAR" />
     </resultMap>
 
-    <select id="getVendorsByCondition" resultMap="VendorDTOResultMapper" parameterType="com.usoftchina.saas.commons.dto.DocReqDTO">
+    <select id="getVendorsByCondition" resultMap="VendorDTOResultMapper">
         SELECT * FROM VENDOR
         <where>
             <if test="condition!=null">

+ 7 - 324
applications/storage/storage-server/src/main/resources/mapper/ProdIODetailMapper.xml

@@ -72,67 +72,9 @@
       <result column="pr_text4" property="pr_text4"/>
     </association>
   </resultMap>
-  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.usoftchina.saas.purchase.po.ProdIODetail">
+  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.usoftchina.saas.storage.entities.ProdIODetail">
     <result column="pd_remark" jdbcType="LONGVARCHAR" property="pd_remark" />
   </resultMap>
-  <sql id="Example_Where_Clause">
-    <where>
-      <foreach collection="oredCriteria" item="criteria" separator="or">
-        <if test="criteria.valid">
-          <trim prefix="(" prefixOverrides="and" suffix=")">
-            <foreach collection="criteria.criteria" item="criterion">
-              <choose>
-                <when test="criterion.noValue">
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue">
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue">
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue">
-                  and ${criterion.condition}
-                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
-  <sql id="Update_By_Example_Where_Clause">
-    <where>
-      <foreach collection="example.oredCriteria" item="criteria" separator="or">
-        <if test="criteria.valid">
-          <trim prefix="(" prefixOverrides="and" suffix=")">
-            <foreach collection="criteria.criteria" item="criterion">
-              <choose>
-                <when test="criterion.noValue">
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue">
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue">
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue">
-                  and ${criterion.condition}
-                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
   <sql id="Base_Column_List">
     pd_id, pd_piid, pd_inoutno, pd_piclass, pd_pdno, pd_ordercode, pd_orderdetno, pd_prodid, 
     pd_prodcode, pd_unit, pd_inqty, pd_outqty, pd_orderprice, pd_sendprice, pd_price, 
@@ -143,33 +85,6 @@
   <sql id="Blob_Column_List">
     pd_remark
   </sql>
-  <select id="selectByExampleWithBLOBs" parameterType="com.usoftchina.saas.purchase.po.ProdIODetailExample" resultMap="ResultMapWithBLOBs">
-    select
-    <if test="distinct">
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    ,
-    <include refid="Blob_Column_List" />
-    from prodiodetail
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-    <if test="orderByClause != null">
-      order by ${orderByClause}
-    </if>
-  </select>
-  <select id="selectByExample" parameterType="com.usoftchina.saas.purchase.po.ProdIODetailExample" resultMap="BaseResultMap">
-    select
-        *
-    from prodiodetail a left join product b on a.pd_prodid = b.pr_id and a.companyid = b.companyid
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-    <if test="orderByClause != null">
-      order by ${orderByClause}
-    </if>
-  </select>
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
     select 
     <include refid="Base_Column_List" />
@@ -182,13 +97,7 @@
     delete from prodiodetail
     where pd_id = #{pd_id,jdbcType=INTEGER}
   </delete>
-  <delete id="deleteByExample" parameterType="com.usoftchina.saas.purchase.po.ProdIODetailExample">
-    delete from prodiodetail
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </delete>
-  <insert id="insert" parameterType="com.usoftchina.saas.purchase.po.ProdIODetail">
+  <insert id="insert" parameterType="com.usoftchina.saas.storage.entities.ProdIODetail">
     insert into prodiodetail (pd_id, pd_piid, pd_inoutno, 
       pd_piclass, pd_pdno, pd_ordercode, 
       pd_orderdetno, pd_prodid, pd_prodcode, 
@@ -219,7 +128,7 @@
       #{pd_ioid,jdbcType=INTEGER}
       )
   </insert>
-  <insert id="insertSelective" parameterType="com.usoftchina.saas.purchase.po.ProdIODetail">
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.storage.entities.ProdIODetail">
     <selectKey resultType="java.lang.Long" keyProperty="id">
       SELECT LAST_INSERT_ID() AS ID
     </selectKey>
@@ -463,233 +372,7 @@
       </if>
     </trim>
   </insert>
-  <select id="countByExample" parameterType="com.usoftchina.saas.purchase.po.ProdIODetailExample" resultType="java.lang.Long">
-    select count(*) from prodiodetail
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </select>
-  <update id="updateByExampleSelective" parameterType="map">
-    update prodiodetail
-    <set>
-      <if test="record.pd_id != null">
-        pd_id = #{record.pd_id,jdbcType=INTEGER},
-      </if>
-      <if test="record.pd_piid != null">
-        pd_piid = #{record.pd_piid,jdbcType=INTEGER},
-      </if>
-      <if test="record.pd_inoutno != null">
-        pd_inoutno = #{record.pd_inoutno,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pd_piclass != null">
-        pd_piclass = #{record.pd_piclass,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pd_pdno != null">
-        pd_pdno = #{record.pd_pdno,jdbcType=INTEGER},
-      </if>
-      <if test="record.pd_ordercode != null">
-        pd_ordercode = #{record.pd_ordercode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pd_orderdetno != null">
-        pd_orderdetno = #{record.pd_orderdetno,jdbcType=INTEGER},
-      </if>
-      <if test="record.pd_prodid != null">
-        pd_prodid = #{record.pd_prodid,jdbcType=INTEGER},
-      </if>
-      <if test="record.pd_prodcode != null">
-        pd_prodcode = #{record.pd_prodcode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pd_unit != null">
-        pd_unit = #{record.pd_unit,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pd_inqty != null">
-        pd_inqty = #{record.pd_inqty,jdbcType=DOUBLE},
-      </if>
-      <if test="record.pd_outqty != null">
-        pd_outqty = #{record.pd_outqty,jdbcType=DOUBLE},
-      </if>
-      <if test="record.pd_orderprice != null">
-        pd_orderprice = #{record.pd_orderprice,jdbcType=DOUBLE},
-      </if>
-      <if test="record.pd_sendprice != null">
-        pd_sendprice = #{record.pd_sendprice,jdbcType=DOUBLE},
-      </if>
-      <if test="record.pd_price != null">
-        pd_price = #{record.pd_price,jdbcType=DOUBLE},
-      </if>
-      <if test="record.pd_total != null">
-        pd_total = #{record.pd_total,jdbcType=DOUBLE},
-      </if>
-      <if test="record.pd_taxrate != null">
-        pd_taxrate = #{record.pd_taxrate,jdbcType=DOUBLE},
-      </if>
-      <if test="record.pd_netprice != null">
-        pd_netprice = #{record.pd_netprice,jdbcType=DOUBLE},
-      </if>
-      <if test="record.pd_nettotal != null">
-        pd_nettotal = #{record.pd_nettotal,jdbcType=DOUBLE},
-      </if>
-      <if test="record.pd_whid != null">
-        pd_whid = #{record.pd_whid,jdbcType=INTEGER},
-      </if>
-      <if test="record.pd_whcode != null">
-        pd_whcode = #{record.pd_whcode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pd_whname != null">
-        pd_whname = #{record.pd_whname,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pd_inwhid != null">
-        pd_inwhid = #{record.pd_inwhid,jdbcType=INTEGER},
-      </if>
-      <if test="record.pd_inwhcode != null">
-        pd_inwhcode = #{record.pd_inwhcode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pd_inwhname != null">
-        pd_inwhname = #{record.pd_inwhname,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pd_orderid != null">
-        pd_orderid = #{record.pd_orderid,jdbcType=INTEGER},
-      </if>
-      <if test="record.pd_sdid != null">
-        pd_sdid = #{record.pd_sdid,jdbcType=INTEGER},
-      </if>
-      <if test="record.pd_status != null">
-        pd_status = #{record.pd_status,jdbcType=INTEGER},
-      </if>
-      <if test="record.companyid != null">
-        companyid = #{record.companyid,jdbcType=INTEGER},
-      </if>
-      <if test="record.updaterid != null">
-        updaterid = #{record.updaterid,jdbcType=INTEGER},
-      </if>
-      <if test="record.updatetime != null">
-        updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.pd_text1 != null">
-        pd_text1 = #{record.pd_text1,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pd_text2 != null">
-        pd_text2 = #{record.pd_text2,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pd_text3 != null">
-        pd_text3 = #{record.pd_text3,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pd_text4 != null">
-        pd_text4 = #{record.pd_text4,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pd_text5 != null">
-        pd_text5 = #{record.pd_text5,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pd_ym != null">
-        pd_ym = #{record.pd_ym,jdbcType=INTEGER},
-      </if>
-      <if test="record.pd_yqty != null">
-        pd_yqty = #{record.pd_yqty,jdbcType=DOUBLE},
-      </if>
-      <if test="record.pd_remark != null">
-        pd_remark = #{record.pd_remark,jdbcType=LONGVARCHAR},
-      </if>
-      <if test="record.pd_ioid != null">
-        pd_ioid = #{record.pd_ioid,jdbcType=INTEGER},
-      </if>
-
-    </set>
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByExampleWithBLOBs" parameterType="map">
-    update prodiodetail
-    set pd_id = #{record.pd_id,jdbcType=INTEGER},
-      pd_piid = #{record.pd_piid,jdbcType=INTEGER},
-      pd_inoutno = #{record.pd_inoutno,jdbcType=VARCHAR},
-      pd_piclass = #{record.pd_piclass,jdbcType=VARCHAR},
-      pd_pdno = #{record.pd_pdno,jdbcType=INTEGER},
-      pd_ordercode = #{record.pd_ordercode,jdbcType=VARCHAR},
-      pd_orderdetno = #{record.pd_orderdetno,jdbcType=INTEGER},
-      pd_prodid = #{record.pd_prodid,jdbcType=INTEGER},
-      pd_prodcode = #{record.pd_prodcode,jdbcType=VARCHAR},
-      pd_unit = #{record.pd_unit,jdbcType=VARCHAR},
-      pd_inqty = #{record.pd_inqty,jdbcType=DOUBLE},
-      pd_outqty = #{record.pd_outqty,jdbcType=DOUBLE},
-      pd_orderprice = #{record.pd_orderprice,jdbcType=DOUBLE},
-      pd_sendprice = #{record.pd_sendprice,jdbcType=DOUBLE},
-      pd_price = #{record.pd_price,jdbcType=DOUBLE},
-      pd_total = #{record.pd_total,jdbcType=DOUBLE},
-      pd_taxrate = #{record.pd_taxrate,jdbcType=DOUBLE},
-      pd_netprice = #{record.pd_netprice,jdbcType=DOUBLE},
-      pd_nettotal = #{record.pd_nettotal,jdbcType=DOUBLE},
-      pd_whid = #{record.pd_whid,jdbcType=INTEGER},
-      pd_whcode = #{record.pd_whcode,jdbcType=VARCHAR},
-      pd_whname = #{record.pd_whname,jdbcType=VARCHAR},
-      pd_inwhid = #{record.pd_inwhid,jdbcType=INTEGER},
-      pd_inwhcode = #{record.pd_inwhcode,jdbcType=VARCHAR},
-      pd_inwhname = #{record.pd_inwhname,jdbcType=VARCHAR},
-      pd_orderid = #{record.pd_orderid,jdbcType=INTEGER},
-      pd_sdid = #{record.pd_sdid,jdbcType=INTEGER},
-      pd_status = #{record.pd_status,jdbcType=INTEGER},
-      companyid = #{record.companyid,jdbcType=INTEGER},
-      updaterid = #{record.updaterid,jdbcType=INTEGER},
-      updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
-      pd_text1 = #{record.pd_text1,jdbcType=VARCHAR},
-      pd_text2 = #{record.pd_text2,jdbcType=VARCHAR},
-      pd_text3 = #{record.pd_text3,jdbcType=VARCHAR},
-      pd_text4 = #{record.pd_text4,jdbcType=VARCHAR},
-      pd_text5 = #{record.pd_text5,jdbcType=VARCHAR},
-      pd_ym = #{record.pd_ym,jdbcType=INTEGER},
-      pd_yqty = #{record.pd_yqty,jdbcType=DOUBLE},
-      pd_remark = #{record.pd_remark,jdbcType=LONGVARCHAR},
-      pd_ioid = #{record.pd_ioid,jdbcType=INTEGER}
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByExample" parameterType="map">
-    update prodiodetail
-    set pd_id = #{record.pd_id,jdbcType=INTEGER},
-      pd_piid = #{record.pd_piid,jdbcType=INTEGER},
-      pd_inoutno = #{record.pd_inoutno,jdbcType=VARCHAR},
-      pd_piclass = #{record.pd_piclass,jdbcType=VARCHAR},
-      pd_pdno = #{record.pd_pdno,jdbcType=INTEGER},
-      pd_ordercode = #{record.pd_ordercode,jdbcType=VARCHAR},
-      pd_orderdetno = #{record.pd_orderdetno,jdbcType=INTEGER},
-      pd_prodid = #{record.pd_prodid,jdbcType=INTEGER},
-      pd_prodcode = #{record.pd_prodcode,jdbcType=VARCHAR},
-      pd_unit = #{record.pd_unit,jdbcType=VARCHAR},
-      pd_inqty = #{record.pd_inqty,jdbcType=DOUBLE},
-      pd_outqty = #{record.pd_outqty,jdbcType=DOUBLE},
-      pd_orderprice = #{record.pd_orderprice,jdbcType=DOUBLE},
-      pd_sendprice = #{record.pd_sendprice,jdbcType=DOUBLE},
-      pd_price = #{record.pd_price,jdbcType=DOUBLE},
-      pd_total = #{record.pd_total,jdbcType=DOUBLE},
-      pd_taxrate = #{record.pd_taxrate,jdbcType=DOUBLE},
-      pd_netprice = #{record.pd_netprice,jdbcType=DOUBLE},
-      pd_nettotal = #{record.pd_nettotal,jdbcType=DOUBLE},
-      pd_whid = #{record.pd_whid,jdbcType=INTEGER},
-      pd_whcode = #{record.pd_whcode,jdbcType=VARCHAR},
-      pd_whname = #{record.pd_whname,jdbcType=VARCHAR},
-      pd_inwhid = #{record.pd_inwhid,jdbcType=INTEGER},
-      pd_inwhcode = #{record.pd_inwhcode,jdbcType=VARCHAR},
-      pd_inwhname = #{record.pd_inwhname,jdbcType=VARCHAR},
-      pd_orderid = #{record.pd_orderid,jdbcType=INTEGER},
-      pd_sdid = #{record.pd_sdid,jdbcType=INTEGER},
-      pd_status = #{record.pd_status,jdbcType=INTEGER},
-      companyid = #{record.companyid,jdbcType=INTEGER},
-      updaterid = #{record.updaterid,jdbcType=INTEGER},
-      updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
-      pd_text1 = #{record.pd_text1,jdbcType=VARCHAR},
-      pd_text2 = #{record.pd_text2,jdbcType=VARCHAR},
-      pd_text3 = #{record.pd_text3,jdbcType=VARCHAR},
-      pd_text4 = #{record.pd_text4,jdbcType=VARCHAR},
-      pd_text5 = #{record.pd_text5,jdbcType=VARCHAR},
-      pd_ym = #{record.pd_ym,jdbcType=INTEGER},
-      pd_yqty = #{record.pd_yqty,jdbcType=DOUBLE},
-      pd_ioid = #{record.pd_ioid,jdbcType=INTEGER}
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.purchase.po.ProdIODetail">
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.storage.entities.ProdIODetail">
     update prodiodetail
     <set>
       <if test="pd_piid != null">
@@ -812,7 +495,7 @@
     </set>
     where pd_id = #{id,jdbcType=INTEGER}
   </update>
-  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.saas.purchase.po.ProdIODetail">
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.saas.storage.entities.ProdIODetail">
     update prodiodetail
     set pd_piid = #{pd_piid,jdbcType=INTEGER},
       pd_inoutno = #{pd_inoutno,jdbcType=VARCHAR},
@@ -855,7 +538,7 @@
       pd_ioid = #{pd_ioid,jdbcType=INTEGER}
     where pd_id = #{pd_id,jdbcType=INTEGER}
   </update>
-  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.purchase.po.ProdIODetail">
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.storage.entities.ProdIODetail">
     update prodiodetail
     set pd_piid = #{pd_piid,jdbcType=INTEGER},
       pd_inoutno = #{pd_inoutno,jdbcType=VARCHAR},
@@ -1178,7 +861,7 @@
 
 
 
-  <update id="batchUpdate" parameterType="com.usoftchina.saas.purchase.po.ProdIODetail" >
+  <update id="batchUpdate" parameterType="com.usoftchina.saas.storage.entities.ProdIODetail" >
     <foreach collection="list" item="item" index="index" open="" close="" separator=";">
       update prodiodetail <set>
       <if test="item.pd_piid !=null">

+ 10 - 10
applications/storage/storage-server/src/main/resources/mapper/ProdInOutMapper.xml

@@ -36,7 +36,7 @@
 
 
   </resultMap>
-  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.usoftchina.saas.purchase.po.ProdInOut">
+  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.usoftchina.saas.storage.entities.ProdInOut">
     <result column="pi_address" jdbcType="LONGVARCHAR" property="pi_address" />
   </resultMap>
   <sql id="Example_Where_Clause">
@@ -106,7 +106,7 @@
   <sql id="Blob_Column_List">
     pi_address
   </sql>
-  <select id="selectByExampleWithBLOBs" parameterType="com.usoftchina.saas.purchase.po.ProdInOutExample" resultMap="ResultMapWithBLOBs">
+  <select id="selectByExampleWithBLOBs" parameterType="com.usoftchina.saas.storage.entities.ProdInOut" resultMap="ResultMapWithBLOBs">
     select
     <if test="distinct">
       distinct
@@ -122,7 +122,7 @@
       order by ${orderByClause}
     </if>
   </select>
-  <select id="selectByExample" parameterType="com.usoftchina.saas.purchase.po.ProdInOutExample" resultMap="BaseResultMap">
+  <select id="selectByExample" parameterType="com.usoftchina.saas.storage.entities.ProdInOut" resultMap="BaseResultMap">
     select
     <if test="distinct">
       distinct
@@ -148,13 +148,13 @@
     delete from prodinout
     where pi_id = #{pi_id,jdbcType=INTEGER}
   </delete>
-  <delete id="deleteByExample" parameterType="com.usoftchina.saas.purchase.po.ProdInOutExample">
+  <delete id="deleteByExample" parameterType="com.usoftchina.saas.storage.entities.ProdInOut">
     delete from prodinout
     <if test="_parameter != null">
       <include refid="Example_Where_Clause" />
     </if>
   </delete>
-  <insert id="insert" parameterType="com.usoftchina.saas.purchase.po.ProdInOut">
+  <insert id="insert" parameterType="com.usoftchina.saas.storage.entities.ProdInOut">
     insert into prodinout (pi_id, pi_inoutno, pi_class, 
       pi_date, pi_vendid, pi_vendcode, 
       pi_vendname, pi_custid, pi_custcode, 
@@ -178,7 +178,7 @@
       #{pi_text3,jdbcType=VARCHAR}, #{pi_text4,jdbcType=VARCHAR}, #{pi_text5,jdbcType=VARCHAR}, 
       #{pi_address,jdbcType=LONGVARCHAR})
   </insert>
-  <insert id="insertSelective" parameterType="com.usoftchina.saas.purchase.po.ProdInOut">
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.storage.entities.ProdInOut">
     <selectKey resultType="java.lang.Long" keyProperty="id">
       SELECT LAST_INSERT_ID() AS ID
     </selectKey>
@@ -370,7 +370,7 @@
       </if>
     </trim>
   </insert>
-  <select id="countByExample" parameterType="com.usoftchina.saas.purchase.po.ProdInOutExample" resultType="java.lang.Long">
+  <select id="countByExample" parameterType="com.usoftchina.saas.storage.entities.ProdInOut" resultType="java.lang.Long">
     select count(*) from prodinout
     <if test="_parameter != null">
       <include refid="Example_Where_Clause" />
@@ -552,7 +552,7 @@
       <include refid="Update_By_Example_Where_Clause" />
     </if>
   </update>
-  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.purchase.po.ProdInOut">
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.storage.entities.ProdInOut">
     update prodinout
     <set>
       <if test="pi_inoutno != null">
@@ -649,7 +649,7 @@
     </set>
     where pi_id = #{id,jdbcType=INTEGER}
   </update>
-  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.saas.purchase.po.ProdInOut">
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.saas.storage.entities.ProdInOut">
     update prodinout
     set pi_inoutno = #{pi_inoutno,jdbcType=VARCHAR},
       pi_class = #{pi_class,jdbcType=VARCHAR},
@@ -684,7 +684,7 @@
 
     where pi_id = #{pi_id,jdbcType=INTEGER}
   </update>
-  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.purchase.po.ProdInOut">
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.storage.entities.ProdInOut">
     update prodinout
     set pi_inoutno = #{pi_inoutno,jdbcType=VARCHAR},
       pi_class = #{pi_class,jdbcType=VARCHAR},