yusijie
2024-12-17 797c91a77f908359e6d6fadad3d1b07406260c73
排产保存按钮调用方法小时产能转换,计划导入校验信息视图替换
2个文件已修改
40 ■■■■ 已修改文件
WebAPI/Controllers/SCGL/日计划管理/JIT_DayPlanPlatFormBillController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/日计划管理/JIT_DayPlanPlatFormImportController.cs 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/Èռƻ®¹ÜÀí/JIT_DayPlanPlatFormBillController.cs
@@ -443,7 +443,7 @@
                oCN.RunProc("insert into Sc_WorkBillSortBillSub(HInterID,HSEQ," +
                    "HMasterDate,HQty,HUseTimes)" +
                            $"values({HInterID}, {(ds.Tables[0].Rows.Count + 1)}," +
                            $" '{date}', {HQTY},{ ( (dic["小时产能"] == "0.0000" ? 0 : HQTY / float.Parse(dic["小时产能"].ToString())).ToString()=="非数字" ? 0 : dic["小时产能"] == "0.0000" ? 0 : HQTY / float.Parse(dic["小时产能"].ToString())) })");
                            $" '{date}', {HQTY},{ ((dic["小时产能"] == "0.0000" ? 0 : dic["小时产能"] == "0" ? 0 : HQTY / float.Parse(dic["小时产能"].ToString())).ToString() == "非数字" ? 0 : dic["小时产能"] == "0.0000" ? 0 : dic["小时产能"] == "0" ? 0 : HQTY / float.Parse(dic["小时产能"].ToString())) })");
            }
            objJsonResult.code = "1";
WebAPI/Controllers/SCGL/Èռƻ®¹ÜÀí/JIT_DayPlanPlatFormImportController.cs
@@ -83,21 +83,21 @@
                    {
                        continue;
                    }                    
                    else if (oSystemParameter.omodel.JIT_DayPlan_TimeFrame != "0" && oSystemParameter.omodel.JIT_DayPlan_TimeFrame != "")
                    {
                        Int32 HDays = Convert.ToInt32(oSystemParameter.omodel.JIT_DayPlan_TimeFrame) * 7;
                    //else if (oSystemParameter.omodel.JIT_DayPlan_TimeFrame != "0" && oSystemParameter.omodel.JIT_DayPlan_TimeFrame != "")
                    //{
                    //    Int32 HDays = Convert.ToInt32(oSystemParameter.omodel.JIT_DayPlan_TimeFrame) * 7;
                        for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
                        {
                            if (Convert.ToInt32(ExcelDs.Tables[0].Rows[i][j].ToString()) > 0 )
                            {
                                continue;
                            }
                        }
                    }
                    //    for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
                    //    {
                    //        if (Convert.ToInt32(ExcelDs.Tables[0].Rows[i][j].ToString()) > 0 )
                    //        {
                    //            continue;
                    //        }
                    //    }
                    //}
                    else
                    {
                        tb2.Rows.Add(row);
@@ -132,9 +132,9 @@
                        return objJsonResult;
                    }
                    string sql1 = string.Format("select * from h_v_IF_ICMOBillList where å•据号='{0}' and ç”Ÿäº§è½¦é—´ä»£ç ='{1}' and äº§å“ä»£ç ='{2}' and æ˜Žç»†è¡Œå·={3} ",
                    string sql1 = string.Format("select * from h_v_JIT_ICMOBillList_DR where å•据号='{0}' and ç”Ÿäº§è½¦é—´ä»£ç ='{1}' and äº§å“ä»£ç ='{2}' and æ˜Žç»†è¡Œå·={3} ",
                        tb2.Rows[i]["生产订单号*"].ToString(), tb2.Rows[i]["生产车间编码*"].ToString(), tb2.Rows[i]["物料编码*"].ToString(), tb2.Rows[i]["生产订单明细行号*"].ToString());
                    ds = oCN.RunProcReturn(sql1, "h_v_IF_ICMOBillList");
                    ds = oCN.RunProcReturn(sql1, "h_v_JIT_ICMOBillList_DR");
                    if (ds.Tables[0].Rows.Count == 0)
                    {
@@ -162,10 +162,10 @@
                        tb2.Rows[i]["HSeOrderBillNo"] = ds.Tables[0].Rows[0]["销售订单号"].ToString();//销售订单号
                    }
                    ds = oCN.RunProcReturn("select * from h_v_JIT_Sc_WorkBillSortBillList " +
                    ds = oCN.RunProcReturn("select * from h_v_JIT_WorkBillSortBillList_DR " +
                        $"where  ç”Ÿäº§è®¢å•号='{tb2.Rows[i]["生产订单号*"].ToString()}'  and ç”Ÿäº§è®¢å•明细行号='{tb2.Rows[i]["生产订单明细行号*"].ToString()}' " +
                        $"and ç”Ÿäº§è½¦é—´ç¼–码='{tb2.Rows[i]["生产车间编码*"].ToString()}' and ç‰©æ–™ä»£ç ='{tb2.Rows[i]["物料编码*"].ToString()}' " +
                        $"and ç”Ÿäº§èµ„源编码='{tb2.Rows[i]["生产资源编码*"].ToString()}' ", "h_v_JIT_Sc_WorkBillSortBillList");
                        $"and ç”Ÿäº§èµ„源编码='{tb2.Rows[i]["生产资源编码*"].ToString()}' ", "h_v_JIT_WorkBillSortBillList_DR");
                    //组织编码='{tb2.Rows[i]["组织编码*"].ToString()}' and
                    //and ç”Ÿäº§èµ„源编码='{tb2.Rows[i]["生产资源编码*"].ToString()}'
@@ -187,7 +187,7 @@
                    else
                    {
                        //员工
                        ds = oCN.RunProcReturn($"select * from Gy_Employee  where HNumber='{tb2.Rows[i]["员工编码"].ToString()}'", "Gy_Employee");
                        ds = oCN.RunProcReturn($"select * from Gy_Employee with(nolock) where HNumber='{tb2.Rows[i]["员工编码"].ToString()}'", "Gy_Employee");
                        if (ds.Tables[0].Rows.Count > 0) {
                            tb2.Rows[i]["HEmpID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
                            tb2.Rows[i]["员工"] = ds.Tables[0].Rows[0]["HName"].ToString();
@@ -202,7 +202,7 @@
                        }
                        //计量单位
                        ds = oCN.RunProcReturn($"select * from Gy_Unit  where HNumber='{tb2.Rows[i]["计量单位"].ToString()}'", "Gy_Unit");
                        ds = oCN.RunProcReturn($"select * from Gy_Unit with(nolock) 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();
@@ -217,7 +217,7 @@
                        }
                        //生产资源
                        ds = oCN.RunProcReturn($"select * from Gy_Source  where HNumber='{tb2.Rows[i]["生产资源编码*"].ToString()}'", "Gy_Source");
                        ds = oCN.RunProcReturn($"select * from Gy_Source with(nolock) 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();
@@ -231,7 +231,7 @@
                        }
                    }
                    //组织
                    ds = oCN.RunProcReturn($"select * from Xt_ORGANIZATIONS  where HNumber='{tb2.Rows[i]["组织编码*"].ToString()}'", "Xt_ORGANIZATIONS");
                    ds = oCN.RunProcReturn($"select * from Xt_ORGANIZATIONS with(nolock) 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();