From 26f357e815683a453e84beda235adae31eece223 Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期日, 08 十月 2023 17:54:03 +0800
Subject: [PATCH] 1.人员基础资料、班组基础资料接口 2.报工调整查询接口、报工调整获取不良记录接口、报工调整提交接口
---
VueWebCoreApi/Tools/AppLableBarCode.cs | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/VueWebCoreApi/Tools/AppLableBarCode.cs b/VueWebCoreApi/Tools/AppLableBarCode.cs
index c13021a..8c2e403 100644
--- a/VueWebCoreApi/Tools/AppLableBarCode.cs
+++ b/VueWebCoreApi/Tools/AppLableBarCode.cs
@@ -24,17 +24,25 @@
{
string sql, year = "", month = "", day = "", fdate = "", q = "", cunm2 = "", Encode = "", cunm = "";
int digit2 = 0, value2 = 0, digit3 = 0, digitdiff = 0;
+ decimal labcum = 0;
bool stf;
List<object> list = new List<object>();
List<string> listdt = new List<string>();
List<AppLabCode> lab = new List<AppLabCode>();
var dynamicParams = new DynamicParameters();
//鑾峰彇鏍囩涓暟:杩涗竴娉�
- decimal labcum = Math.Ceiling(decimal.Parse(qty) / decimal.Parse(onelabqty));
+ if (qty == "0" && onelabqty == "0")
+ {
+ labcum = 1;
+ }
+ else
+ {
+ labcum = Math.Ceiling(decimal.Parse(qty) / decimal.Parse(onelabqty));
+ }
try
{
- sql = @"select prefix,filingdate,incbit,value from TCodeRules where rightcode=@rightcode";
- dynamicParams.Add("@rightcode", rightcode);
+ sql = @"select prefix,filingdate,incbit,value from TCodeRules where menucode=@menucode";
+ dynamicParams.Add("@menucode", rightcode);
var data = DapperHelper.selectdata(sql, dynamicParams);
if (data.Rows.Count > 0)
{
@@ -60,10 +68,10 @@
break;
}
//鏇存柊瑙勫垯琛ㄤ綅鏁板強娴佹按鍙�
- sql = @"update TCodeRules set incbit=@incbit,value=@cunm2 where rightcode=@rightcode";
+ sql = @"update TCodeRules set incbit=@incbit,value=@cunm2 where menucode=@menucode";
dynamicParams.Add("@incbit", cunm.Length);
dynamicParams.Add("@cunm2", cunm);
- dynamicParams.Add("@rightcode", rightcode);
+ dynamicParams.Add("@menucode", rightcode);
list.Add(new { str = sql, parm = dynamicParams });
stf = DapperHelper.DoTransaction(list);
if (stf)
--
Gitblit v1.9.3