Browse Source

Merge branch 'dev' of ssh://10.10.100.21/source/saas-platform into dev

zhuth 7 years ago
parent
commit
01283cfdf4

+ 2 - 0
applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/VendorDTO.java

@@ -27,4 +27,6 @@ public class VendorDTO extends CommonBaseDTO implements Serializable{
 
     private String ve_buyername;
 
+    private String ve_address;
+
 }

+ 2 - 0
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Vendor.java

@@ -113,4 +113,6 @@ public class Vendor extends CommonBaseEntity implements Serializable{
 
     private String ve_buyername;
 
+    private String ve_address;
+
 }

+ 2 - 0
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/VendorList.java

@@ -104,6 +104,8 @@ public class VendorList implements Serializable {
 
     private String ve_buyername;
 
+    private String ve_address;
+
     /* 从表字段 */
 
     private Integer vc_veid;

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

@@ -11,7 +11,7 @@
     <result column="ad_text3" jdbcType="VARCHAR" property="ad_text3" />
     <result column="ad_text4" jdbcType="VARCHAR" property="ad_text4" />
     <result column="ad_text5" jdbcType="VARCHAR" property="ad_text5" />
-    <result column="ad_default" jdbcType="INTEGER" property="ad_address" />
+    <result column="ad_default" jdbcType="INTEGER" property="ad_default" />
   </resultMap>
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.usoftchina.saas.document.entities.Address">
     <result column="ad_address" jdbcType="LONGVARCHAR" property="ad_address" />

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

@@ -31,6 +31,7 @@
         <result column="ve_beginym" property="ve_beginym" jdbcType="INTEGER" />
         <result column="ve_preamount" property="ve_preamount" jdbcType="DOUBLE" />
         <result column="ve_remark" property="ve_remark" jdbcType="VARCHAR" />
+        <result column="ve_address" property="ve_address" jdbcType="VARCHAR" />
     </resultMap>
     <resultMap id="VendorDTOResultMapper" type="com.usoftchina.saas.document.dto.VendorDTO">
         <id column="ve_id" property="id" jdbcType="INTEGER" />
@@ -40,6 +41,7 @@
         <result column="ve_type" property="ve_type" jdbcType="VARCHAR" />
         <result column="ve_status" property="ve_status" jdbcType="VARCHAR" />
         <result column="ve_remark" property="ve_remark" jdbcType="VARCHAR" />
+        <result column="ve_address" property="ve_address" jdbcType="VARCHAR" />
     </resultMap>
 
     <select id="getVendorsByCondition" resultMap="VendorDTOResultMapper">
@@ -73,6 +75,7 @@
         <result column="ve_status" property="ve_status" jdbcType="VARCHAR" />
         <result column="ve_statuscode" property="ve_statuscode" jdbcType="VARCHAR" />
         <result column="ve_leftamount" property="ve_leftamount" jdbcType="INTEGER" />
+        <result column="ve_address" property="ve_address" jdbcType="VARCHAR" />
         <result column="ve_text1" property="ve_text1" jdbcType="VARCHAR" />
         <result column="ve_text2" property="ve_text2" jdbcType="VARCHAR" />
         <result column="ve_text3" property="ve_text3" jdbcType="VARCHAR" />
@@ -112,7 +115,7 @@
         ve_promisedays, ve_taxrate, ve_nsrzh, ve_bankaccount, ve_bankcode, ve_status, ve_statuscode,
         companyId, updaterId, updateTime, ve_text1,
         ve_text2, ve_text3, ve_text4, ve_text5, ve_payamount, ve_leftamount, ve_beginym, ve_preamount,ve_remark,
-        ve_buyerid,ve_buyercode,ve_buyername
+        ve_buyerid,ve_buyercode,ve_buyername,ve_address
     </sql>
     <select id="selectByPrimaryKey" resultMap="VendorResultMapper" parameterType="java.lang.Long" >
         select
@@ -230,7 +233,10 @@
                 ve_buyercode,
             </if>
             <if test="ve_buyername!=null">
-                ve_buyername
+                ve_buyername,
+            </if>
+            <if test="ve_address!=null">
+                ve_address
             </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides="," >
@@ -334,7 +340,10 @@
                 #{ve_buyercode,jdbcType=VARCHAR},
             </if>
             <if test="ve_buyername != null">
-                #{ve_buyername,jdbcType=VARCHAR}
+                #{ve_buyername,jdbcType=VARCHAR},
+            </if>
+            <if test="ve_address != null">
+                #{ve_address,jdbcType=VARCHAR}
             </if>
         </trim>
     </insert>
@@ -432,7 +441,10 @@
                 ve_buyercode = #{ve_buyercode,jdbcType=VARCHAR},
             </if>
             <if test="ve_buyername != null" >
-                ve_buyername = #{ve_buyername,jdbcType=VARCHAR}
+                ve_buyername = #{ve_buyername,jdbcType=VARCHAR},
+            </if>
+            <if test="ve_address != null">
+                ve_address = #{ve_address,jdbcType=VARCHAR}
             </if>
         </set>
         where ve_id = #{id}

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

@@ -73,4 +73,7 @@ logging:
   level:
      com.usoftchina.saas.money.mapper : debug
 auth:
-  public-key: auth/pub.key
+  public-key: auth/pub.key
+ribbon:
+  ReadTimeout: 6000
+  ConnectTimeout: 6000

+ 28 - 25
applications/money/money-server/src/main/resources/mapper/ProfitdetailMapper.xml

@@ -25,11 +25,11 @@
 	a.pi_custname,
 	a.cu_type,
 	a.cu_sellername,
-	a.saamount,
-	a.netamount,
-	a.costamount,
-SUM(a.netamount - a.costamount) as profit,
-(SUM(a.netamount - a.costamount)/IFNULL(netamount,SUM(netamount - costamount))) as profitpresent
+	  IFNULL(a.saamount,0) as saamount,
+	  IFNULL(a.netamount,0) as netamount,
+	  IFNULL(a.costamount,0) as costamount,
+	  IFNULL(SUM(a.netamount - a.costamount),0) as profit,
+	  IFNULL((SUM(a.netamount - a.costamount)/IFNULL(a.netamount,SUM(a.netamount - a.costamount))),0) as profitpresent
 
 FROM
 	(
@@ -38,15 +38,15 @@ FROM
 			pi_custname,
 	        cu_type,
 			cu_sellername,
-			SUM(
-				pd_sendprice * (pd_outqty - pd_inqty)
-			) AS saamount,
-			SUM(
-				pd_netprice * (pd_outqty - pd_inqty)
-			) AS netamount,
-			SUM(
-				pd_price * (pd_outqty - pd_inqty)
-			) AS costamount
+	  SUM(
+	  IFNULL(pd_sendprice,0) * (IFNULL(pd_outqty,0) - IFNULL(pd_inqty,0))
+	  ) AS saamount,
+	  SUM(
+	  IFNULL(pd_netprice,0) * (IFNULL(pd_outqty,0) - IFNULL(pd_inqty,0))
+	  ) AS netamount,
+	  SUM(
+	  IFNULL(pd_price,0) * (IFNULL(pd_outqty,0) - IFNULL(pd_inqty,0))
+	  ) AS costamount
 		FROM
 			prodinout,
 			prodiodetail,
@@ -61,13 +61,15 @@ FROM
     </where>
 		and	pi_id = pd_piid
 		AND pi_custid = cu_id and pi_status = '已审核' and
-prodinout.companyid= prodiodetail.companyid and prodiodetail.companyid = prodinout.companyid
+prodinout.companyid= prodiodetail.companyid
 		GROUP BY
 			pi_custcode,
 			pi_custname,
 	        cu_type,
 			cu_sellername
-	) a GROUP BY
+	) a
+	  where saamount + netamount + costamount != 0
+	  GROUP BY
 			a.pi_custcode,
 			a.pi_custname,
 	        a.cu_type,
@@ -84,11 +86,11 @@ prodinout.companyid= prodiodetail.companyid and prodiodetail.companyid = prodino
 		a.pi_custname,
 		a.cu_type,
 		a.cu_sellername,
-		a.saamount,
-		a.netamount,
-		a.costamount,
-		SUM(a.netamount - a.costamount) as profit,
-		(SUM(a.netamount - a.costamount)/IFNULL(netamount,SUM(netamount - costamount))) as profitpresent
+		IFNULL(a.saamount,0) as saamount,
+		IFNULL(a.netamount,0) as netamount,
+		IFNULL(a.costamount,0) as costamount,
+		IFNULL(SUM(a.netamount - a.costamount),0) as profit,
+		IFNULL((SUM(a.netamount - a.costamount)/IFNULL(a.netamount,SUM(a.netamount - a.costamount))),0) as profitpresent
 
 		FROM
 		(
@@ -98,13 +100,13 @@ prodinout.companyid= prodiodetail.companyid and prodiodetail.companyid = prodino
 		cu_type,
 		cu_sellername,
 		SUM(
-		pd_sendprice * (pd_outqty - pd_inqty)
+		IFNULL(pd_sendprice,0) * (IFNULL(pd_outqty,0) - IFNULL(pd_inqty,0))
 		) AS saamount,
 		SUM(
-		pd_netprice * (pd_outqty - pd_inqty)
+		IFNULL(pd_netprice,0) * (IFNULL(pd_outqty,0) - IFNULL(pd_inqty,0))
 		) AS netamount,
 		SUM(
-		pd_price * (pd_outqty - pd_inqty)
+		IFNULL(pd_price,0) * (IFNULL(pd_outqty,0) - IFNULL(pd_inqty,0))
 		) AS costamount
 		FROM
 		prodinout,
@@ -126,7 +128,8 @@ prodinout.companyid= prodiodetail.companyid and prodiodetail.companyid = prodino
 		pi_custname,
 		cu_type,
 		cu_sellername
-		) a GROUP BY
+		) a
+		GROUP BY
 		a.pi_custcode,
 		a.pi_custname,
 		a.cu_type,

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

@@ -73,4 +73,4 @@ auth:
   public-key: auth/pub.key
 ribbon:
   ReadTimeout: 6000
-  ConnectTimeout: 2000
+  ConnectTimeout: 6000

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

@@ -68,4 +68,7 @@ mybatis:
   type-aliases-package: com.usoftchina.saas.commons.po
   mapper-locations: classpath:mapper/*.xml
 auth:
-  public-key: auth/pub.key
+  public-key: auth/pub.key
+ribbon:
+  ReadTimeout: 6000
+  ConnectTimeout: 6000

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

@@ -73,4 +73,4 @@ auth:
   public-key: auth/pub.key
 ribbon:
   ReadTimeout: 6000
-  ConnectTimeout: 2000
+  ConnectTimeout: 6000