Browse Source

BUG处理

guq 7 years ago
parent
commit
cf664afdaa

+ 1 - 1
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleServiceImpl.java

@@ -704,7 +704,7 @@ public class SaleServiceImpl implements SaleService{
         }
         Long companyId = BaseContextHolder.getCompanyId();
         List<HashMap<String, Object>> list = prodInOutMapper.getWareHouseByCode(code, companyId);
-        if (null != list) {
+        if (null != list && list.size() > 0) {
             return list.get(0);
         }
         return null;

+ 1 - 1
applications/sale/sale-server/src/main/resources/mapper/ProdInOutMapper.xml

@@ -536,7 +536,7 @@ update ProdInOut SET
   </update>
 
   <select id="getWareHouseByCode" resultType="java.util.HashMap">
-    select pr_whid,pr_whcode,pr_whname from product where pr_code=#{code} and companyid=#{companyId} and pr_statuscode='OPEN'
+    select pr_whid,pr_whcode,pr_whname from product where pr_code=#{code} and companyid=#{companyId} and pr_statuscode='ENABLE'
   </select>
   <update id="updateCreator">
     update ProdInOut set creatorId = #{userId} , createTime=now(), creatorName=#{userName} where pi_id=#{id}