Просмотр исходного кода

Merge remote-tracking branch 'origin/dev' into test

guq 7 лет назад
Родитель
Сommit
e50011889c

+ 17 - 19
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/ExcelServiceImpl.java

@@ -165,17 +165,13 @@ public class ExcelServiceImpl implements ExcelService{
                        for (TempletSet set : main) {
                            //取excel值
                            value = data.get(set.getDescription());
-                          /* if ("true".equals(set.getNecessary())) {
-                               value = data.get("*" + set.getDescription());
-                           } else {
-                               value = data.get(set.getDescription());
-                           }*/
                            //取编号字段
                            if (set.isCodefield() && !"".equals(value)) {
                                mainData = new JSONObject();
                                codeValue = value;
                                difference = true;
                                validateCode.add(codeValue);
+                               dd.setDd_codevalue(codeValue);
                            }
                            //检查是否是同一单
                            if (set.isCodefield() && "".equals(value)) {
@@ -184,7 +180,6 @@ public class ExcelServiceImpl implements ExcelService{
                            }
                            //检查主表必填字段是否完整
                            if (difference) {
-                               dd.setDd_codevalue(codeValue);
                                if ("true".equals(set.getNecessary()) && "".equals(value)) {
                                    err.append("第" + (i + 3) + "行 " + set.getDescription() + " 必填字段未填写!<br/> ");
                                    break;
@@ -227,11 +222,6 @@ public class ExcelServiceImpl implements ExcelService{
                        for (TempletSet set : detail) {
                            //取excel值
                            value = data.get(set.getDescription());
-                          /* if ("true".equals(set.getNecessary())) {
-                               value = data.get("*" + set.getDescription());
-                           } else {
-                               value = data.get(set.getDescription());
-                           }*/
                            if ("true".equals(set.getNecessary()) && value.equals("")) {
                                detailData = null;
                                //err.append("第" + (i + 3) + "行 " + set.getDescription() + " 必填字段未填写!<br/> ");
@@ -245,9 +235,17 @@ public class ExcelServiceImpl implements ExcelService{
                                    break;
                                }
                            }
-                           //如果为数字类型且为空默认赋值0
-                           if ("number".equals(set.getType()) && StringUtils.isEmpty(value)) {
-                               value = "0";
+                           //如果为数字类型且为空默认赋值0,检测是否为数字类型
+                           if ("number".equals(set.getType())) {
+                               if (StringUtils.isEmpty(value)) {
+                                   value = "0";
+                               } else {
+                                   Boolean numner = isNumner(value);
+                                   if (!numner) {
+                                       err.append("第" + (i + 3) + "行 " + set.getDescription() + " 数字格式不正确!<br/> ");
+                                       break;
+                                   }
+                               }
                            }
                            //拼从表数据
                            detailData.put(set.getField(), value);
@@ -258,8 +256,8 @@ public class ExcelServiceImpl implements ExcelService{
                        }
                    }
                 }
-                //排除编号未填写但是其他字段填写的情况
-                if (StringUtils.hasText(codeValue)) {
+                //排除编号未填写但是其他字段填写的情况 主表不为空且从表也不为空
+                if (StringUtils.hasText(codeValue) && StringUtils.hasText(dd.getDd_codevalue())) {
                     dataImportDetailMapper.insertSelective(dd);
                 }
             }
@@ -315,8 +313,8 @@ public class ExcelServiceImpl implements ExcelService{
         if (StringUtils.isEmpty(date)) {
             return false;
         }
-        String regEx1 = "[0-9]{4}/[0-9]{2}/[0-9]{2}";
-        String regEX2 = "[0-9]{4}-[0-9]{2}-[0-9]{2}";
+        String regEx1 = "[0-9]{4}/[0-1][0-9]/[0-3][0-9]";
+        String regEX2 = "[0-9]{4}-[0-1][0-9]-[0-3][0-9]";
         // 编译正则表达式
         Pattern pattern1 = Pattern.compile(regEx1);
         Pattern pattern2 = Pattern.compile(regEX2);
@@ -334,7 +332,7 @@ public class ExcelServiceImpl implements ExcelService{
             Integer days = Integer.valueOf(num);
             return DateUtils.plusDay(days, "1899-12-30");
         }catch (Exception e) {
-            return null;
+            return validateDateFormat(num) ? num : null;
         }
     }
 

+ 2 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/VendorkindMapper.java

@@ -28,4 +28,6 @@ public interface VendorkindMapper extends CommonBaseMapper<Vendorkind> {
     List<Vendorkind> selectAll(@Param("companyId") Long companyId);
 
     int getCountFromVendor(@Param("id") Long id, @Param("companyId") Long companyId);
+
+    Vendorkind getTypeByname(@Param("name") String name, @Param("companyId") Long companyId);
 }

+ 2 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/VendorkindService.java

@@ -15,4 +15,6 @@ public interface VendorkindService extends CommonBaseService<VendorkindMapper, V
     List<Vendorkind> selectAll();
 
     DocBaseDTO saveData(Vendorkind vendorkind);
+
+    Vendorkind getTypeByname(String name);
 }

+ 19 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/VendorServiceImpl.java

@@ -16,7 +16,6 @@ import com.usoftchina.saas.commons.po.DataImportDetail;
 import com.usoftchina.saas.commons.po.Operation;
 import com.usoftchina.saas.commons.po.Status;
 import com.usoftchina.saas.context.BaseContextHolder;
-import com.usoftchina.saas.document.dto.ProductListDTO;
 import com.usoftchina.saas.document.dto.VendorDTO;
 import com.usoftchina.saas.document.dto.VendorListDTO;
 import com.usoftchina.saas.document.entities.*;
@@ -25,6 +24,7 @@ import com.usoftchina.saas.document.mapper.SubledgerMapper;
 import com.usoftchina.saas.document.mapper.VendorMapper;
 import com.usoftchina.saas.document.mapper.VendorcontactMapper;
 import com.usoftchina.saas.document.service.VendorService;
+import com.usoftchina.saas.document.service.VendorkindService;
 import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.utils.CollectionUtils;
@@ -57,6 +57,8 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
     private VendorMapper vendorMapper;
     @Autowired
     private DataImportMapper dataImportMapper;
+    @Autowired
+    private VendorkindService vendorkindService;
 
     @Override
     public PageInfo<VendorDTO> getVendorsByCondition(PageRequest page, ListReqDTO listReqDTO) {
@@ -462,6 +464,12 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
                 Vendor vendor = JSONObject.parseObject(main.getDd_maindata(), Vendor.class);
                 vendor.setVe_status(Status.ENABLE.getDisplay());
                 vendor.setVe_statuscode(Status.ENABLE.name());
+                if (!StringUtils.isEmpty(vendor.getVe_type())) {
+                    Vendorkind type = vendorkindService.getTypeByname(vendor.getVe_type());
+                    if (null == type) {
+                        throw new BizException(70110581,"供应商: " + vendor.getVe_name() + " 类型: " + vendor.getVe_type() + " 在系统中不存在");
+                    }
+                }
                 //编号不存在
                 if (i == 0) {
                     vendor.setId(0l);
@@ -476,15 +484,25 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
                 //添加从表
                 if (data.size() > 0) {
                     detno = 1;
+                    int count = 0;
                     for (DataImportDetail productDetail : data) {
                         Vendorcontact detail = JSONObject.parseObject(productDetail.getDd_detaildata(), Vendorcontact.class);
                         if (null != detail) {
                             detail.setVc_veid(vendor.getId());
                             detail.setVc_detno(detno);
                             detno++;
+                            if ("是".equals(detail.getVc_default())) {
+                                detail.setVc_default("1");
+                                count++;
+                            } else {
+                                detail.setVc_default("0");
+                            }
                             details_.add(detail);
                         }
                     }
+                    if (count > 1) {
+                        throw new BizException(70110582,"供应商: " + vendor.getVe_name() + " 存在多个默认联系人");
+                    }
                 }
                 listDTO.setMain(vendor);
                 listDTO.setItems(details_);

+ 10 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/VendorkindServiceImpl.java

@@ -10,10 +10,10 @@ import com.usoftchina.saas.document.entities.Vendorkind;
 import com.usoftchina.saas.document.mapper.VendorkindMapper;
 import com.usoftchina.saas.document.service.VendorkindService;
 import com.usoftchina.saas.exception.BizException;
+import com.usoftchina.saas.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import javax.print.Doc;
 import java.util.Date;
 import java.util.List;
 
@@ -52,6 +52,15 @@ public class VendorkindServiceImpl extends CommonBaseServiceImpl<VendorkindMappe
         return docBaseDTO;
     }
 
+    @Override
+    public Vendorkind getTypeByname(String name) {
+        if (StringUtils.isEmpty(name)) {
+            return null;
+        }
+        Vendorkind kind = vendorkindMapper.getTypeByname(name, BaseContextHolder.getCompanyId());
+        return kind;
+    }
+
     @Override
     public boolean removeByPrimaryKey(Long id){
         if(id != null && id > 0){

+ 1 - 4
applications/document/document-server/src/main/resources/application.yml

@@ -88,7 +88,4 @@ hystrix:
                 enabled: true
               isolation:
                     thread:
-                        timeoutInMilliseconds: 4000
-logging:
-  level:
-     com.usoftchina.saas.document.mapper: debug
+                        timeoutInMilliseconds: 4000

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

@@ -93,7 +93,7 @@
 
   <select id="selectMainBycode" resultMap="DetailMap">
     select * from  data_importdetail
-    where dd_codevalue = #{code} and dd_diid=#{id} and ifnull(dd_success,0)=0 and dd_maindata is not null and companyid=#{companyid}
+    where dd_codevalue = #{code} and dd_diid=#{id} and ifnull(dd_success,0)=0 and ifnull(dd_maindata,'')!='' and companyid=#{companyid}
   </select>
 
   <update id="updateDataImport" parameterType="integer">

+ 3 - 0
applications/document/document-server/src/main/resources/mapper/VendorkindMapper.xml

@@ -133,4 +133,7 @@
     <select id="getCountFromVendor" resultType="int">
         SELECT COUNT(*) FROM VENDOR WHERE VE_TYPE = (SELECT VK_NAME FROM VENDORKIND WHERE VK_ID = #{id}) AND companyId = #{companyId}
     </select>
+  <select id="getTypeByname" resultMap="BaseResultMap">
+    select * from vendorkind where vk_name=#{name} and companyId=#{companyId}
+  </select>
 </mapper>

+ 36 - 76
applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutListMapper.xml

@@ -133,79 +133,40 @@
     <result column="pi_auditman" jdbcType="VARCHAR" property="pi_auditman" />
     <result column="pi_address" jdbcType="VARCHAR" property="pi_address" />
     <result column="pi_remark" jdbcType="VARCHAR" property="pi_remark" />
-    <result column="pd_piid" jdbcType="INTEGER" property="pd_piid" />
-    <result column="pd_inoutno" jdbcType="VARCHAR" property="pd_inoutno" />
-    <result column="pd_piclass" jdbcType="VARCHAR" property="pd_piclass" />
-    <result column="pd_pdno" jdbcType="INTEGER" property="pd_pdno" />
-    <result column="pd_ordercode" jdbcType="VARCHAR" property="pd_ordercode" />
-    <result column="pd_orderdetno" jdbcType="INTEGER" property="pd_orderdetno" />
-    <result column="pd_prodid" jdbcType="INTEGER" property="pd_prodid" />
-    <result column="pd_prodcode" jdbcType="VARCHAR" property="pd_prodcode" />
-    <result column="pd_unit" jdbcType="VARCHAR" property="pd_unit" />
-    <result column="pd_inqty" jdbcType="DOUBLE" property="pd_inqty" />
-    <result column="pd_outqty" jdbcType="DOUBLE" property="pd_outqty" />
-    <result column="pd_orderprice" jdbcType="DOUBLE" property="pd_orderprice" />
-    <result column="pd_sendprice" jdbcType="DOUBLE" property="pd_sendprice" />
-    <result column="pd_price" jdbcType="DOUBLE" property="pd_price" />
-    <result column="pd_total" jdbcType="DOUBLE" property="pd_total" />
-    <result column="pd_taxrate" jdbcType="DOUBLE" property="pd_taxrate" />
-    <result column="pd_netprice" jdbcType="DOUBLE" property="pd_netprice" />
-    <result column="pd_nettotal" jdbcType="DOUBLE" property="pd_nettotal" />
-    <!--<result column="pd_ordertotal" jdbcType="DOUBLE" property="pd_ordertotal" />-->
-    <result column="pd_whid" jdbcType="INTEGER" property="pd_whid" />
-    <result column="pd_whcode" jdbcType="VARCHAR" property="pd_whcode" />
-    <result column="pd_whname" jdbcType="VARCHAR" property="pd_whname" />
-    <result column="pd_inwhid" jdbcType="INTEGER" property="pd_inwhid" />
-    <result column="pd_inwhcode" jdbcType="VARCHAR" property="pd_inwhcode" />
-    <result column="pd_inwhname" jdbcType="VARCHAR" property="pd_inwhname" />
-    <result column="pd_orderid" jdbcType="INTEGER" property="pd_orderid" />
-    <result column="pd_sdid" jdbcType="INTEGER" property="pd_sdid" />
-    <result column="pd_status" jdbcType="INTEGER" property="pd_status" />
-    <result column="companyid" property="companyId" jdbcType="BIGINT" />
-    <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
-    <result column="updaterName" jdbcType="VARCHAR" property="updaterName" />
-    <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
-    <result column="creatorId" property="creatorId" jdbcType="INTEGER"/>
-    <result column="creatorName" jdbcType="VARCHAR" property="creatorName" />
-    <result column="createTime" property="createTime" jdbcType="TIMESTAMP" />
-    <result column="pd_text1" jdbcType="VARCHAR" property="pd_text1" />
-    <result column="pd_text2" jdbcType="VARCHAR" property="pd_text2" />
-    <result column="pd_text3" jdbcType="VARCHAR" property="pd_text3" />
-    <result column="pd_text4" jdbcType="VARCHAR" property="pd_text4" />
-    <result column="pd_text5" jdbcType="VARCHAR" property="pd_text5" />
-    <result column="pd_ym" jdbcType="INTEGER" property="pd_ym" />
-    <result column="pd_yqty" jdbcType="DOUBLE" property="pd_yqty" />
-    <result column="pd_ioid" jdbcType="INTEGER" property="pd_ioid" />
-    <result column="pi_iocode" jdbcType="VARCHAR" property="pi_iocode" />
-    <result column="pd_remark" jdbcType="VARCHAR" property="pd_remark" />
-    <result column="pr_id" property="pr_id"/>
-    <result column="pr_code" property="pr_code"/>
-    <result column="pr_detail" property="pr_detail"/>
-    <result column="pr_spec" property="pr_spec"/>
-    <result column="pr_unit" property="pr_unit"/>
-    <result column="pr_kind" property="pr_kind"/>
-    <result column="pr_orispeccode" property="pr_orispeccode"/>
-    <result column="pr_whid" property="pr_whid"/>
-    <result column="pr_whcode" property="pr_whcode"/>
-    <result column="pr_whname" property="pr_whname"/>
-    <result column="pr_zxbzs" property="pr_zxbzs"/>
-    <result column="pr_leadtime" property="pr_leadtime"/>
-    <result column="pr_brand" property="pr_brand"/>
-    <result column="pr_standardprice" property="pr_standardprice"/>
-    <result column="pr_purcprice" property="pr_purcprice"/>
-    <result column="pr_saleprice" property="pr_saleprice"/>
-    <result column="pr_vendid" property="pr_vendid"/>
-    <result column="pr_vendname" property="pr_vendname"/>
-    <result column="pr_vendcode" property="pr_vendcode"/>
-    <result column="pr_status" property="pr_status"/>
-    <result column="pr_statuscode" property="pr_statuscode"/>
-    <result column="pr_text1" property="pr_text1"/>
-    <result column="pr_text2" property="pr_text2"/>
-    <result column="pr_text3" property="pr_text3"/>
-    <result column="pr_text4" property="pr_text4"/>
-    <result column="qty" property="qty"/>
   </resultMap>
 
+  <resultMap id="homePageMainList" type="com.usoftchina.saas.purchase.po.ProdInOut">
+  <id column="pi_id" jdbcType="INTEGER" property="id" />
+  <result column="pi_inoutno" jdbcType="VARCHAR" property="pi_inoutno" />
+  <result column="pi_class" jdbcType="VARCHAR" property="pi_class" />
+  <result column="pi_date" jdbcType="TIMESTAMP" property="pi_date" />
+  <result column="pi_vendid" jdbcType="INTEGER" property="pi_vendid" />
+  <result column="pi_vendcode" jdbcType="VARCHAR" property="pi_vendcode" />
+  <result column="pi_vendname" jdbcType="VARCHAR" property="pi_vendname" />
+  <result column="pi_custid" jdbcType="INTEGER" property="pi_custid" />
+  <result column="pi_custcode" jdbcType="VARCHAR" property="pi_custcode" />
+  <result column="pi_custname" jdbcType="VARCHAR" property="pi_custname" />
+  <result column="pi_puid" jdbcType="INTEGER" property="pi_puid" />
+  <result column="pi_pucode" jdbcType="VARCHAR" property="pi_pucode" />
+  <result column="pi_said" jdbcType="INTEGER" property="pi_said" />
+  <result column="pi_sacode" jdbcType="VARCHAR" property="pi_sacode" />
+  <result column="pi_total" jdbcType="DOUBLE" property="pi_total" />
+  <result column="pi_status" jdbcType="VARCHAR" property="pi_status" />
+  <result column="pi_statuscode" jdbcType="VARCHAR" property="pi_statuscode" />
+  <result column="pi_printstatus" jdbcType="VARCHAR" property="pi_printstatus" />
+  <result column="pi_printstatuscode" jdbcType="VARCHAR" property="pi_printstatuscode" />
+  <result column="pi_text1" jdbcType="VARCHAR" property="pi_text1" />
+  <result column="pi_text2" jdbcType="VARCHAR" property="pi_text2" />
+  <result column="pi_text3" jdbcType="VARCHAR" property="pi_text3" />
+  <result column="pi_text4" jdbcType="VARCHAR" property="pi_text4" />
+  <result column="pi_text5" jdbcType="VARCHAR" property="pi_text5" />
+  <result column="pi_auditdate" jdbcType="TIMESTAMP" property="pi_auditdate" />
+  <result column="pi_auditman" jdbcType="VARCHAR" property="pi_auditman" />
+  <result column="pi_address" jdbcType="VARCHAR" property="pi_address" />
+  <result column="pi_remark" jdbcType="VARCHAR" property="pi_remark" />
+  </resultMap>
+
+
   <select id="selectProdInOutBycondition"  resultMap="BaseResultMap">
     select  *  from prodinout
     <where>
@@ -219,10 +180,8 @@
   </select>
 
   <select id="selectHomePageList" resultMap="homePageList">
-    select  *,
-    case WHEN pi_class='采购验收单' then ifnull(pd_inqty,0) when pi_class='采购验退单' then ifnull(pd_outqty,0) else 0 end qty
-    from prodinout left join prodiodetail on pi_id = pd_piid left join vendor on pi_vendid=ve_id
-    left join product on pd_prodid=pr_id
+    select  *
+    from prodinout left join vendor on pi_vendid=ve_id
     <where>
       <if test="con != null">
         ${con}
@@ -231,8 +190,9 @@
         and  prodinout.companyid = #{companyId}
       </if>
     </where>
-    order by pi_id desc,pd_pdno desc
+    order by pi_date desc
   </select>
+
   <sql id="Prodinout_Column_List" >
     prodinout.pi_id pi_id,prodinout.pi_inoutno pi_inoutno,prodinout.pi_class pi_class,prodinout.pi_date pi_date,prodinout.pi_vendid pi_vendid,prodinout.pi_vendcode pi_vendcode,prodinout.pi_vendname pi_vendname,prodinout.pi_custid pi_custid,prodinout.pi_custcode pi_custcode,prodinout.pi_custname pi_custname,prodinout.pi_puid pi_puid,prodinout.pi_pucode pi_pucode,prodinout.pi_said pi_said,prodinout.pi_sacode pi_sacode,prodinout.pi_total pi_total,prodinout.pi_address pi_address,prodinout.pi_ioid pi_ioid,prodinout.pi_status pi_status,prodinout.pi_statuscode pi_statuscode,prodinout.pi_printstatus pi_printstatus,prodinout.pi_printstatuscode pi_printstatuscode,prodinout.companyid companyid,prodinout.updaterId updaterId,prodinout.updatetime updatetime,prodinout.pi_text1 pi_text1,prodinout.pi_text2 pi_text2,prodinout.pi_text3 pi_text3,prodinout.pi_text4 pi_text4,prodinout.pi_text5 pi_text5,prodinout.pi_nettotal pi_nettotal,prodinout.pi_auditdate pi_auditdate,prodinout.pi_auditman pi_auditman,prodinout.pi_remark pi_remark,
 prodinout.creatorName creatorName,prodinout.creatorId creatorId,prodinout.createTime createTime,prodinout.updaterName updaterName,prodinout.pi_macode pi_macode,prodinout.pi_maid pi_maid,prodinout.pi_prstatuscode pi_prstatuscode,prodinout.pi_prstatus pi_prstatus,prodinout.pi_iocode pi_iocode,

+ 2 - 75
applications/sale/sale-server/src/main/resources/mapper/ProdInOutListMapper.xml

@@ -107,76 +107,6 @@
     <result column="pi_remark" jdbcType="VARCHAR" property="pi_remark" />
     <result column="pi_prstatus" jdbcType="VARCHAR" property="pi_prstatus" />
     <result column="pi_prstatuscode" jdbcType="VARCHAR" property="pi_prstatuscode" />
-    <result column="pd_piid" jdbcType="INTEGER" property="pd_piid" />
-    <result column="pd_inoutno" jdbcType="VARCHAR" property="pd_inoutno" />
-    <result column="pd_piclass" jdbcType="VARCHAR" property="pd_piclass" />
-    <result column="pd_pdno" jdbcType="INTEGER" property="pd_pdno" />
-    <result column="pd_ordercode" jdbcType="VARCHAR" property="pd_ordercode" />
-    <result column="pd_orderdetno" jdbcType="INTEGER" property="pd_orderdetno" />
-    <result column="pd_prodid" jdbcType="INTEGER" property="pd_prodid" />
-    <result column="pd_prodcode" jdbcType="VARCHAR" property="pd_prodcode" />
-    <result column="pd_unit" jdbcType="VARCHAR" property="pd_unit" />
-    <result column="pd_inqty" jdbcType="DOUBLE" property="pd_inqty" />
-    <result column="pd_outqty" jdbcType="DOUBLE" property="pd_outqty" />
-    <result column="pd_orderprice" jdbcType="DOUBLE" property="pd_orderprice" />
-    <result column="pd_sendprice" jdbcType="DOUBLE" property="pd_sendprice" />
-    <result column="pd_price" jdbcType="DOUBLE" property="pd_price" />
-    <result column="pd_total" jdbcType="DOUBLE" property="pd_total" />
-    <result column="pd_taxrate" jdbcType="DOUBLE" property="pd_taxrate" />
-    <result column="pd_netprice" jdbcType="DOUBLE" property="pd_netprice" />
-    <result column="pd_nettotal" jdbcType="DOUBLE" property="pd_nettotal" />
-    <result column="pd_whid" jdbcType="INTEGER" property="pd_whid" />
-    <result column="pd_whcode" jdbcType="VARCHAR" property="pd_whcode" />
-    <result column="pd_whname" jdbcType="VARCHAR" property="pd_whname" />
-    <result column="pd_inwhid" jdbcType="INTEGER" property="pd_inwhid" />
-    <result column="pd_inwhcode" jdbcType="VARCHAR" property="pd_inwhcode" />
-    <result column="pd_inwhname" jdbcType="VARCHAR" property="pd_inwhname" />
-    <result column="pd_orderid" jdbcType="INTEGER" property="pd_orderid" />
-    <result column="pd_sdid" jdbcType="INTEGER" property="pd_sdid" />
-    <result column="pd_status" jdbcType="INTEGER" property="pd_status" />
-    <result column="companyid" property="companyId" jdbcType="BIGINT" />
-    <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
-    <result column="updaterName" jdbcType="VARCHAR" property="updaterName" />
-    <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
-    <result column="creatorId" property="creatorId" jdbcType="INTEGER"/>
-    <result column="creatorName" jdbcType="VARCHAR" property="creatorName" />
-    <result column="createTime" property="createTime" jdbcType="TIMESTAMP" />
-    <result column="pd_text1" jdbcType="VARCHAR" property="pd_text1" />
-    <result column="pd_text2" jdbcType="VARCHAR" property="pd_text2" />
-    <result column="pd_text3" jdbcType="VARCHAR" property="pd_text3" />
-    <result column="pd_text4" jdbcType="VARCHAR" property="pd_text4" />
-    <result column="pd_text5" jdbcType="VARCHAR" property="pd_text5" />
-    <result column="pd_ym" jdbcType="INTEGER" property="pd_ym" />
-    <result column="pd_yqty" jdbcType="DOUBLE" property="pd_yqty" />
-    <result column="pd_ioid" jdbcType="INTEGER" property="pd_ioid" />
-    <result column="pi_iocode" jdbcType="VARCHAR" property="pi_iocode" />
-    <result column="pd_remark" jdbcType="VARCHAR" property="pd_remark" />
-    <result column="pr_id" property="pr_id"/>
-    <result column="pr_code" property="pr_code"/>
-    <result column="pr_detail" property="pr_detail"/>
-    <result column="pr_spec" property="pr_spec"/>
-    <result column="pr_unit" property="pr_unit"/>
-    <result column="pr_kind" property="pr_kind"/>
-    <result column="pr_orispeccode" property="pr_orispeccode"/>
-    <result column="pr_whid" property="pr_whid"/>
-    <result column="pr_whcode" property="pr_whcode"/>
-    <result column="pr_whname" property="pr_whname"/>
-    <result column="pr_zxbzs" property="pr_zxbzs"/>
-    <result column="pr_leadtime" property="pr_leadtime"/>
-    <result column="pr_brand" property="pr_brand"/>
-    <result column="pr_standardprice" property="pr_standardprice"/>
-    <result column="pr_purcprice" property="pr_purcprice"/>
-    <result column="pr_saleprice" property="pr_saleprice"/>
-    <result column="pr_vendid" property="pr_vendid"/>
-    <result column="pr_vendname" property="pr_vendname"/>
-    <result column="pr_vendcode" property="pr_vendcode"/>
-    <result column="pr_status" property="pr_status"/>
-    <result column="pr_statuscode" property="pr_statuscode"/>
-    <result column="pr_text1" property="pr_text1"/>
-    <result column="pr_text2" property="pr_text2"/>
-    <result column="pr_text3" property="pr_text3"/>
-    <result column="pr_text4" property="pr_text4"/>
-    <result column="qty" property="qty"/>
   </resultMap>
 
 
@@ -207,10 +137,7 @@
   </select>
 
   <select id="selectHomePageList" resultMap="homePageList">
-    select  *,
-    case WHEN pi_class='出货单' then ifnull(pd_outqty,0) when pi_class='销售退货单' then ifnull(pd_inqty,0) else 0 end qty
-    from prodinout left join prodiodetail on pi_id = pd_piid left join product on pr_id = pd_prodid
-    left join customer on pi_custid=cu_id
+    select  *   from prodinout left join customer on pi_custid=cu_id
     <where>
       <if test="con != null">
         ${con}
@@ -219,7 +146,7 @@
         and  prodinout.companyId = #{companyId}
       </if>
     </where>
-    order by pi_id desc
+    order by pi_date desc
   </select>
 
 </mapper>

+ 1 - 1
framework/core/src/main/java/com/usoftchina/saas/utils/RegexpUtils.java

@@ -78,7 +78,7 @@ public class RegexpUtils {
             return "";
         }
         Pattern p = Pattern.compile(SPECIALCHARACTER_EXP);
-        Matcher m = p.matcher(obj.toString());
+        Matcher m = p.matcher(obj.toString().trim());
         return m.replaceAll("");
     }
 }