Browse Source

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

zhuth 7 years ago
parent
commit
8c4f135896

+ 2 - 2
applications/commons/commons-server/src/main/resources/mapper/HomePageMapper.xml

@@ -17,7 +17,7 @@
       (
 	  select concat('{"x":"其它","y":',ifnull(round((all_sum - five_sum)/10000,2),0),'}') other from (
 		(select sum(si_amount) all_sum from statsinfo  where companyid=#{componyId} and si_yearmonth=DATE_FORMAT(now(),'%Y%m') and si_type='PURC')a,
-        (select sum(si_amount) five_sum from statsinfo where companyid=#{componyId} and si_yearmonth=DATE_FORMAT(now(),'%Y%m') and si_type='PURC' ORDER BY si_amount desc limit 0,5) b)
+        (select sum(si_amount) five_sum from (select si_amount from  statsinfo where companyid=#{componyId} and si_yearmonth=DATE_FORMAT(now(),'%Y%m') and si_type='PURC' ORDER BY si_amount desc limit 0,5)e) b)
 	  ) b1
     </select>
 
@@ -72,7 +72,7 @@
     ) c)d,(
 
     select concat('{"x":"其它","y":',ifnull(round((all_sum - five_sum)/10000,2),0),'}') other from ( (select sum(si_amount) all_sum from statsinfo  where companyid=#{componyId} and si_yearmonth=DATE_FORMAT(now(),'%Y%m') and si_type='SALE')a,
-    (select sum(si_amount) five_sum from statsinfo where companyid=#{componyId} and si_yearmonth=DATE_FORMAT(now(),'%Y%m') and si_type='SALE' ORDER BY si_amount desc limit 0,5)b))e)
+    ( select sum(si_amount) five_sum from (select si_amount from statsinfo where companyid=#{componyId} and si_yearmonth=DATE_FORMAT(now(),'%Y%m') and si_type='SALE' ORDER BY si_amount desc limit 0,5)f)b))e)
     </select>
 
     <select id="getSaleFutureData" parameterType="long" resultType="string">

+ 13 - 2
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/ProdInOutController.java

@@ -9,6 +9,7 @@ import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.purchase.dto.ProdInOutFormDTO;
 import com.usoftchina.saas.purchase.po.ProdInOutList;
 import com.usoftchina.saas.purchase.service.ProdInOutService;
+import com.usoftchina.saas.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -130,7 +131,12 @@ public class ProdInOutController {
      */
     @PostMapping("/batchAudit")
     public Result batchAudit(@RequestBody BatchDealBaseDTO baseDTOs) {
-        return Result.success(prodInOutService.batchAudit(baseDTOs));
+        String mess = prodInOutService.batchAudit(baseDTOs);
+        if (StringUtils.hasLength(mess)){
+            return Result.error(mess);
+        }else {
+            return Result.success(mess);
+        }
     }
 
     /**
@@ -141,7 +147,12 @@ public class ProdInOutController {
      */
     @PostMapping("/batchUnAudit")
     public Result batchUnAudit(@RequestBody BatchDealBaseDTO baseDTOs) {
-        return Result.success(prodInOutService.batchUnAudit(baseDTOs));
+        String mess = prodInOutService.batchUnAudit(baseDTOs);
+        if (StringUtils.hasText(mess)){
+            return Result.error(mess);
+        }else {
+            return Result.success(mess);
+        }
     }
 
     /**

+ 13 - 4
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/controller/ProdInOutController.java

@@ -9,6 +9,7 @@ import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.storage.dto.ProdInOutFormDTO;
 import com.usoftchina.saas.storage.po.ProdInOutList;
 import com.usoftchina.saas.storage.service.ProdInOutService;
+import com.usoftchina.saas.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -131,8 +132,12 @@ public class ProdInOutController {
      */
     @PostMapping("/batchAudit")
     public Result batchAudit(@RequestBody BatchDealBaseDTO baseDTOs) {
-        String res = prodInOutService.batchAudit(baseDTOs);
-        return Result.success(res);
+        String mess = prodInOutService.batchAudit(baseDTOs);
+        if (StringUtils.hasLength(mess)){
+            return Result.error(mess);
+        }else {
+            return Result.success(mess);
+        }
     }
 
     /**
@@ -143,8 +148,12 @@ public class ProdInOutController {
      */
     @PostMapping("/batchUnAudit")
     public Result batchUnAudit(@RequestBody BatchDealBaseDTO baseDTOs) {
-        String res = prodInOutService.batchUnAudit(baseDTOs);
-        return Result.success(res);
+        String mess = prodInOutService.batchUnAudit(baseDTOs);
+        if (StringUtils.hasText(mess)){
+            return Result.error(mess);
+        }else {
+            return Result.success(mess);
+        }
     }
 
     /**