From 852cd93a3e65988a2354a0b96b79d5e2d05bf646 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期五, 14 四月 2023 09:23:25 +0800
Subject: [PATCH] 工序流转卡 工艺参数 应该 可编辑; 1.生产资源 有异常; 删除有问题,删除后出来 异常数据( ); 其他信息 里的 几个字段 输入 字符时 报错,应提示; 2.工序 : 9999的 转工序 , 有个 转工序 字段,是否没显示出来; 其他信息 里的 几个字段 输入 字符时 报错,应提示; 3.工作中心: 其他信息 里的 几个字段 输入 字符时 报错,应提示; 4.生产班组: 刷新出来 异常数据; 其他信息 里的 几个字段 输入 字符时 报错,应提示; 5.基础资料的 一些 复选框 标题不对; 6. ADMIN 的账号 工艺路线 的模块 无法进行 新增 编辑; 7.工艺路线查询;工序号,工序代码,工序,工艺参数,表体备注, 其他的放后面 子表 的 委外标记 放到最后面去; 并且 把 供应商代码和供应商 放出来(也放在最后几个); 8.部门有 很多异常数据; 选择的时候 出来了; 9.流转卡维护, 表头 很多没有用的列,单据号 日期 都没有显示; 转工序 是否要打印(跟客户确认); 10. 流转卡拆分时,一些 列的 排序;
---
WebAPI/Controllers/SCGL/日计划管理/JIT_DayPlanPlatFormImportController.cs | 50 +++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 47 insertions(+), 3 deletions(-)
diff --git "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormImportController.cs" "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormImportController.cs"
index ef1f8d4..c905be2 100644
--- "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormImportController.cs"
+++ "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormImportController.cs"
@@ -59,6 +59,7 @@
tb2.Columns.Add("HSourceID", typeof(Int32));//鐢熶骇璧勬簮id
tb2.Columns.Add("ICMOBillHInterID", typeof(Int32));//鐢熶骇璁㈠崟涓籭d
tb2.Columns.Add("ICMOBillHEntryID", typeof(Int32));//鐢熶骇璁㈠崟瀛恑d
+ tb2.Columns.Add("HProdORGID", typeof(Int32));//缁勭粐id
//娣诲姞鏁版嵁
for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
@@ -151,18 +152,60 @@
{
//鍛樺伐
ds = oCN.RunProcReturn($"select * from Gy_Employee where HNumber='{tb2.Rows[i]["鍛樺伐缂栫爜"].ToString()}'", "Gy_Employee");
- if (ds.Tables[0].Rows.Count > 0)
+ if (ds.Tables[0].Rows.Count > 0) {
tb2.Rows[i]["鍛樺伐缂栫爜"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = $"绗瑊i + 1}琛�,鍛樺伐鏌ユ棤鏁版嵁!";
+ objJsonResult.data = tb2;
+ return objJsonResult;
+ }
//璁¢噺鍗曚綅
ds = oCN.RunProcReturn($"select * from Gy_Unit where HNumber='{tb2.Rows[i]["璁¢噺鍗曚綅"].ToString()}'", "Gy_Unit");
if (ds.Tables[0].Rows.Count > 0)
+ {
tb2.Rows[i]["HUnitID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = $"绗瑊i + 1}琛�,璁¢噺鍗曚綅鏌ユ棤鏁版嵁!";
+ objJsonResult.data = tb2;
+ return objJsonResult;
+ }
//鐢熶骇璧勬簮
ds = oCN.RunProcReturn($"select * from Gy_Source where HNumber='{tb2.Rows[i]["鐢熶骇璧勬簮缂栫爜*"].ToString()}'", "Gy_Source");
if (ds.Tables[0].Rows.Count > 0)
+ {
tb2.Rows[i]["HSourceID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+ }
+ else {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = $"绗瑊i+1}琛�,鐢熶骇璧勬簮鏌ユ棤鏁版嵁!";
+ objJsonResult.data = tb2;
+ return objJsonResult;
+ }
+ }
+ //缁勭粐
+ ds = oCN.RunProcReturn($"select * from Xt_ORGANIZATIONS where HNumber='{tb2.Rows[i]["缁勭粐缂栫爜*"].ToString()}'", "Xt_ORGANIZATIONS");
+ if (ds.Tables[0].Rows.Count > 0)
+ {
+ tb2.Rows[i]["HProdORGID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = $"绗瑊i + 1}琛�,缁勭粐鏌ユ棤鏁版嵁!";
+ objJsonResult.data = tb2;
+ return objJsonResult;
}
}
@@ -257,6 +300,7 @@
HInterID = DBUtility.ClsPub.CreateBillID_Prod(BillType, ref DBUtility.ClsPub.sExeReturnInfo);//鑾峰緱涓�涓柊鐨刬d
var HICMOBillNo = list[i]["鐢熶骇璁㈠崟鍙�*"].ToString();
var HICMOEntrySEQ = list[i]["鐢熶骇璁㈠崟鏄庣粏琛屽彿*"].ToString();
+ var HProdORGID = list[i]["HProdORGID"].ToString();
var HWorkShopID = list[i]["HWorkShopID"].ToString();
var HSourceID = list[i]["HSourceID"].ToString();
var HYX = list[i]["浼樺厛绾�"].ToString();
@@ -291,13 +335,13 @@
"HICMOEntrySEQ,HWorkShopID,HSourceID, HYX, HEmpID," +
" HMaterID, HMaterName, HMaterModel, HUnitID, HBatchNo," +
" HSeOrderBillQty, HPlanQty, HCompleteQty,HPreparatDate," +
- "HMainSourceInterID,HMainSourceEntryID)values" +
+ "HMainSourceInterID,HMainSourceEntryID,HProdORGID,HICMOInterID_Sec,HICMOEntryID_Sec)values" +
$"({HInterID},'{HBillNo}',{DateTime.Now.Year},{DateTime.Now.Month},'{BillType}'," +
$"'{BillType}',GETDATE(),1,'{user}','{HDate}','{HICMOBillNo}','{HOrderType}'," +
$"{(HICMOEntrySEQ == "" ? 0.ToString() : HICMOEntrySEQ)},{(HWorkShopID == "" ? 0.ToString() : HWorkShopID)},{(HSourceID == "" ? 0.ToString() : HSourceID)}, {(HYX == "" ? 0.ToString() : HYX)}, {(HEmpID == "" ? 0.ToString() : HEmpID)}," +
$" {(HMaterID == "" ? 0.ToString() : HMaterID)}, '{HMaterName}', '{HMaterModel}', {(HUnitID == "" ? 0.ToString() : HUnitID)}, '{HBatchNo}'," +
$" {(HSeOrderBillQty == "" ? 0.ToString() : HSeOrderBillQty)}, {(HPlanQty == "" ? 0.ToString() : HPlanQty)}, {(HCompleteQty == "" ? 0.ToString() : HCompleteQty)},getdate()," +
- $" {HMainSourceInterID},{HMainSourceEntryID})");
+ $" {HMainSourceInterID},{HMainSourceEntryID},{HProdORGID}, {HMainSourceInterID},{HMainSourceEntryID})");
}
int SumDay = 31; //鍔ㄦ�佷袱鏈堜箣宸� DateTime.Now.AddMonths(1).AddDays(-1).Subtract(DateTime.Now).Days;
--
Gitblit v1.9.1