瀏覽代碼

团费报表-老OA数据clientNum 0处理

jiangjc 1 年之前
父節點
當前提交
00ecef74ac
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      OASystem/OASystem.Api/Controllers/StatisticsController.cs

+ 2 - 1
OASystem/OASystem.Api/Controllers/StatisticsController.cs

@@ -636,7 +636,8 @@ namespace OASystem.API.Controllers
                     {
                         string clientPinYinName = "";
                         decimal unitCost = 0.00M;
-                        unitCost = (item.PayMoney / item.ClientNum).ConvertToDecimal1();
+                        int cNum = item.ClientNum == 0 ? 1 : item.ClientNum;
+                        unitCost = (item.PayMoney / cNum).ConvertToDecimal1();
 
                         Regex r = new Regex("[0-9]");
                         string name1 = item.ClientName;