yangle
2022-10-12 bfec4da315abe8013a1683325bcf434c492dba0f
问题处理
7个文件已修改
243 ■■■■■ 已修改文件
WebAPI/Controllers/CJGL/Cj_CallGoodsBillBackController.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/CJGL/Cj_SendGoodsBillController.cs 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/Sc_CallGoodsBackRequestBillController.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/Sc_ComplementGoodBillController.cs 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/Sc_ComplementGoodsController.cs 57 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/日计划管理/JIT_DayPlanPlatFormBillController.cs 61 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/日计划管理/JIT_ICMOSortBillController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/CJGL/Cj_CallGoodsBillBackController.cs
@@ -58,25 +58,8 @@
                }
                CallGoodsBill ca = JsonConvert.DeserializeObject<CallGoodsBill>(sWhere);
                oCN.RunProc($"exec h_p_JIT_BackGoodsBillList_Query '{ca.HBillNo}','{ca.MaterialNumber}','{ca.MaterialName}','{ca.MaterialModel}'," +
                    $"'{ca.ProcMul}','{ca.HDeptName}',{ca.HOrgID},'{ca.Hmaker}','{ca.HPZStatus}','{ca.HCKStatus}','{ca.HBeginDate}','{ca.HEndDate.AddDays(1).AddSeconds(-1)}'");
                if (ca.HPZStatus == "全部" && ca.HCKStatus == "全部")
                {
                    ds = oCN.RunProcReturn("select * from ##h_p_JIT_BackGoodsBillList_Query1 where 1=1 " + ca.Arbitrarily + "", "##h_p_JIT_BackGoodsBillList_Query1");
                }
                else if (ca.HPZStatus != "全部" && ca.HCKStatus == "全部")
                {
                    ds = oCN.RunProcReturn("select * from ##h_p_JIT_BackGoodsBillList_Query2 where 1=1 " + ca.Arbitrarily + "", "##h_p_JIT_BackGoodsBillList_Query2");
                }
                else if (ca.HPZStatus == "全部" && ca.HCKStatus != "全部")
                {
                    ds = oCN.RunProcReturn("select * from ##h_p_JIT_BackGoodsBillList_Query3 where 1=1 " + ca.Arbitrarily + "", "##h_p_JIT_BackGoodsBillList_Query3");
                }
                else if (ca.HPZStatus != "全部" && ca.HCKStatus != "全部")
                {
                    ds = oCN.RunProcReturn("select * from ##h_p_JIT_BackGoodsBillList_Query4 where 1=1 " + ca.Arbitrarily + "", "##h_p_JIT_BackGoodsBillList_Query4");
                }
                ds = oCN.RunProcReturn($"exec h_p_JIT_BackGoodsBillList_Query '{ca.HBillNo}','{ca.MaterialNumber}','{ca.MaterialName}','{ca.MaterialModel}'," +
                    $"'{ca.ProcMul}','{ca.HDeptName}',{ca.HOrgID},'{ca.Hmaker}','{ca.HPZStatus}','{ca.HCKStatus}','{ca.HBeginDate}','{ca.HEndDate.AddDays(1).AddSeconds(-1)}'", "h_p_JIT_BackGoodsBillList_Query");
                objJsonResult.code = "1";
                objJsonResult.count = 1;
WebAPI/Controllers/CJGL/Cj_SendGoodsBillController.cs
@@ -30,6 +30,7 @@
            public string MaterialName { get; set; }
            public string MaterialModel { get; set; }
            public string Arbitrarily { get; set; }
            public string HBillStatus { get; set; }
            public int? HOrgID;
        }
@@ -61,10 +62,8 @@
                //反序列化传递的值
                JIT_SendGoodsBill com = JsonConvert.DeserializeObject<JIT_SendGoodsBill>(sWhere.ToString());
               oCN.RunProc($"exec h_p_JIT_DeptCheckGoodsBillList_Query '{com.HBeginDate}','{com.HEndDate.AddDays(1).AddSeconds(-1)}','{com.HBillNo}','{com.HDeptName}'," +
                   $"'{com.MaterialCode}','{com.MaterialName}','{com.MaterialModel}','{com.HOrgID}'");
                ds = oCN.RunProcReturn("select * from ##h_p_JIT_DeptCheckGoodsBillList_Query where 1=1 " + com.Arbitrarily + "", "##h_p_JIT_DeptCheckGoodsBillList_Query");
                ds = oCN.RunProcReturn($"exec h_p_JIT_DeptCheckGoodsBillList_Query '{com.HBeginDate}','{com.HEndDate.AddDays(1).AddSeconds(-1)}','{com.HBillNo}','{com.HDeptName}'," +
                   $"'{com.MaterialCode}','{com.MaterialName}','{com.MaterialModel}','{com.HOrgID}','{com.HBillStatus}'", "h_p_JIT_DeptCheckGoodsBillList_Query");
                objJsonResult.code = "1";
                objJsonResult.count = 1;
@@ -118,5 +117,77 @@
            }
        }
        #endregion
        #region è½¦é—´æ”¶æ–™åˆ—表 æ’¤é”€ç¡®è®¤æ”¶æ–™
        [Route("Cj_SendGoodsBill/DeptCheckGoodsBillList_revoke")]
        [HttpGet]
        public object DeptCheckGoodsBillList_revoke(string HInterID, string User)
        {
            try
            {
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("JIT_SendGoodsBill_Check", 1, false, User))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无审核权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
              oCN.RunProc($"update JIT_SendGoodsBillMain set HChecker='' ,HCheckDate=null,HBillStatus=1  where HInterID='{HInterID}'");
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "已完成撤销";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region è½¦é—´æ”¶æ–™åˆ—表 åˆ é™¤
        [Route("Cj_SendGoodsBill/DeleteBill")]
        [HttpGet]
        public object DeleteBill(string HInterID,string HEntryID, string User)
        {
            try
            {
                //获取车间配送单据数据
                ds = oCN.RunProcReturn($"select * from JIT_SendGoodsBillMain a inner join JIT_SendGoodsBillSub b on a.HInterID = b.HInterID where  a.HInterID={HInterID} and HEntryID={HEntryID}  ", "JIT_SendGoodsBillMain");
                //获取拣料配送单的数据
                ds = oCN.RunProcReturn($"select * from JIT_ComplementGoodsBillMain a inner join JIT_ComplementGoodsBillSub b on a.HInterID = b.HInterID where  a.HInterID={(ds.Tables[0].Rows[0]["HMainSourceInterID"].ToString())} and  b.HMaterID={(ds.Tables[0].Rows[0]["HMaterID"].ToString())} and  b.HWHID={(ds.Tables[0].Rows[0]["HWHID"].ToString())} ", "JIT_ComplementGoodsBillMain");
                //获取拣料配送单_LK表 æ•°æ®
                ds = oCN.RunProcReturn($"select * from from JIT_ComplementGoodsBillSub_LK where  HInterID={(ds.Tables[0].Rows[0]["HInterID"].ToString())} ", "JIT_SendGoodsBillMain");
                //oCN.RunProc($"delete from  JIT_SendGoodsBillMain  where HInterID='{HInterID}'");
                //oCN.RunProc($"delete from  JIT_SendGoodsBillSub  where HInterID='{HInterID}' and HEntryID={HEntryID} ");
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "已完成删除";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}
WebAPI/Controllers/SCGL/Sc_CallGoodsBackRequestBillController.cs
@@ -59,10 +59,8 @@
                //反序列化传递的值
                CallGoodsBackRequest com = JsonConvert.DeserializeObject<CallGoodsBackRequest>(sWhere.ToString());
                oCN.RunProc($"exec h_p_JIT_BackGoodsRequestBillList_Query '{com.HBeginDate}','{com.HEndDate.AddDays(1).AddSeconds(-1)}','{com.HBillNo}','{com.MaterialNumber}'," +
                        $"'{com.MaterialName}','{com.MaterialModel}','{com.HDeptName}','{com.ProcMul}','{com.Hmaker}','{com.HOrgID}'");
                ds = oCN.RunProcReturn("select * from ##h_p_JIT_BackGoodsRequestBillList_Query where 1=1 " + com.Arbitrarily + "", "##h_p_JIT_BackGoodsRequestBillList_Query");
                ds = oCN.RunProcReturn($"exec h_p_JIT_BackGoodsRequestBillList_Query '{com.HBeginDate}','{com.HEndDate.AddDays(1).AddSeconds(-1)}','{com.HBillNo}','{com.MaterialNumber}'," +
                        $"'{com.MaterialName}','{com.MaterialModel}','{com.HDeptName}','{com.ProcMul}','{com.Hmaker}','{com.HOrgID}'", "h_p_JIT_BackGoodsRequestBillList_Query");
                objJsonResult.code = "1";
                objJsonResult.count = 1;
WebAPI/Controllers/SCGL/Sc_ComplementGoodBillController.cs
@@ -69,13 +69,11 @@
                //反序列化传递的值
                ComplementGoodBill com = JsonConvert.DeserializeObject<ComplementGoodBill>(sWhere.ToString());
                   oCN.RunProc($"exec h_p_JIT_CallGoodsPlatForm_Query '{com.HSeOrderBillNo}','{com.DepartmentName}','{com.MaterialNumber}','{com.MaterialName}'," +
                ds = oCN.RunProcReturn($"exec h_p_JIT_CallGoodsPlatForm_Query '{com.HSeOrderBillNo}','{com.DepartmentName}','{com.MaterialNumber}','{com.MaterialName}'," +
                    $"'{com.MaterialModel}','{com.HICMOBillNo}','{com.CPNumber}','{com.CPName}','{com.CPModel}'," +
                    $"{com.ps},{com.Organization},'{com.user}' ");
                    $"{com.ps},{com.Organization},'{com.user}' ", "h_p_JIT_CallGoodsPlatForm_Query");
                ds = oCN.RunProcReturn("select * from ##h_p_JIT_CallGoodsPlatForm_Query where 1=1 " + com.Arbitrarily + "", "##h_p_JIT_CallGoodsPlatForm_Query");
               objJsonResult.code = "1";
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
@@ -235,6 +233,15 @@
                            return objJsonResult;
                        }
                        if (listCa[i].调出仓库id == listCa[i].调入仓库id)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "调出仓库和调入仓库不能一样!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //if (listCa[i].调出仓库可用库存数量 == 0)
                        //{
                        //    objJsonResult.code = "0";
WebAPI/Controllers/SCGL/Sc_ComplementGoodsController.cs
@@ -61,21 +61,8 @@
                //反序列化传递的值
                ComplementGoods com = JsonConvert.DeserializeObject<ComplementGoods>(sWhere.ToString());
                oCN.RunProc($"exec h_p_JIT_ComplementGoodsBillList_Query '{com.MaterialNumber}','{com.MaterialName}','{com.MaterialModel}','{com.HGD}'," +
                       $"'{com.HWHName}','{com.HDeptName}','{com.Organization}','{com.user}','{com.HJLStatus}','{com.HBeginDate}','{com.HEndDate}'");
                if (com.HJLStatus == "未拣料")
                {
                    ds = oCN.RunProcReturn("select * from ##ComplementGoodsBillList_Query1 where 1=1 " + com.Arbitrarily + "", "##ComplementGoodsBillList_Query1");
                }
                else if (com.HJLStatus == "已拣料")
                {
                    ds = oCN.RunProcReturn("select * from ##ComplementGoodsBillList_Query2 where 1=1 " + com.Arbitrarily + "", "##ComplementGoodsBillList_Query2");
                }
                else
                {
                    ds = oCN.RunProcReturn("select * from ##ComplementGoodsBillList_Query3 where 1=1 " + com.Arbitrarily + "", "##ComplementGoodsBillList_Query3");
                }
                ds = oCN.RunProcReturn($"exec h_p_JIT_ComplementGoodsBillList_Query '{com.MaterialNumber}','{com.MaterialName}','{com.MaterialModel}','{com.HGD}'," +
                       $"'{com.HWHName}','{com.HDeptName}','{com.Organization}','{com.user}','{com.HJLStatus}','{com.HBeginDate}','{com.HEndDate}'", "h_p_JIT_ComplementGoodsBillList_Query");
                objJsonResult.code = "1";
                objJsonResult.count = 1;
@@ -332,36 +319,27 @@
                    DataSet dsTable = new DataSet();
                    //查询JIT_ComplementGoodsBillSub_LK
                    dsTable = oCN.RunProcReturn($"select  * from JIT_ComplementGoodsBillSub_LK where HMaterID={listCa[i].HMaterID}  and HInterID={SourceInterID} order by HSourceInterID ", "JIT_ComplementGoodsBillSub_LK");
                    dsTable = oCN.RunProcReturn($"select  * from JIT_ComplementGoodsBillSub_LK where HMaterID={listCa[i].HMaterID}  and HInterID={SourceInterID} and HCallQTY<>HSendQTY  order by HSourceInterID ", "JIT_ComplementGoodsBillSub_LK");
                    var HqtyCount = double.Parse(listCa[i].本次拣料数量.ToString());
                    for (int j = 0; j < dsTable.Tables[0].Rows.Count; j++)
                    {
                        if (double.Parse(dsTable.Tables[0].Rows[j]["HCallQTY"].ToString()) != double.Parse(dsTable.Tables[0].Rows[j]["HSendQTY"].ToString()))
                        {
                            if (double.Parse(dsTable.Tables[0].Rows[j]["HSendQTY"].ToString()) + listCa[i].本次拣料数量 > double.Parse(dsTable.Tables[0].Rows[j]["HCallQTY"].ToString()))
                            {
                                var HCallQTY = double.Parse(dsTable.Tables[0].Rows[j]["HCallQTY"].ToString()) - double.Parse(dsTable.Tables[0].Rows[j]["HSendQTY"].ToString());
                                //修改调拨数量 è¶…出部分给予下一列数据
                                oCN.RunProc($"update JIT_ComplementGoodsBillSub_LK set HSendQTY=HSendQTY+{HCallQTY} where HMaterID={listCa[i].HMaterID} " +
                                    $" and HSourceInterID={double.Parse(dsTable.Tables[0].Rows[j]["HSourceInterID"].ToString())} and HInterID={SourceInterID} ");
                        var HCallQTY = double.Parse(dsTable.Tables[0].Rows[j]["HCallQTY"].ToString()) - double.Parse(dsTable.Tables[0].Rows[j]["HSendQTY"].ToString());
                                oCN.RunProc($"update JIT_ComplementGoodsBillSub_LK set HSendQTY=HSendQTY+{(listCa[i].本次拣料数量 - HCallQTY)} where HMaterID={listCa[i].HMaterID} " +
                                   $" and HSourceInterID={dsTable.Tables[0].Rows[j + 1]["HSourceInterID"].ToString()} and HInterID={SourceInterID} ");
                                break;
                            }
                            else
                            {
                                //修改调拨数量
                                oCN.RunProc($"update JIT_ComplementGoodsBillSub_LK set HSendQTY=HSendQTY+{listCa[i].本次拣料数量} where HMaterID={listCa[i].HMaterID} " +
                                    $" and HSourceInterID={dsTable.Tables[0].Rows[j]["HSourceInterID"].ToString()} and HInterID={SourceInterID} ");
                                break;
                            }
                        //修改调拨数量
                        oCN.RunProc($"update JIT_ComplementGoodsBillSub_LK set HSendQTY=HSendQTY+{(HCallQTY < HqtyCount ? HCallQTY : HqtyCount)} where HMaterID={listCa[i].HMaterID} " +
                            $" and HSourceInterID={double.Parse(dsTable.Tables[0].Rows[j]["HSourceInterID"].ToString())} and HInterID={SourceInterID} ");
                        HqtyCount -= HCallQTY;
                        if (HqtyCount <= 0)
                        {
                            break;
                        }
                    }
                }
                //同步金蝶直接调拨单
                objJsonResult = AddSendGoodsBillSynChronizAtion(HBillNo);
                ////同步金蝶直接调拨单
                //objJsonResult = AddSendGoodsBillSynChronizAtion(HBillNo);
                oCN.Commit();
@@ -384,11 +362,9 @@
            }
            catch (Exception e)
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = e.Message;
                objJsonResult.Message = objJsonResult.Message;
                return objJsonResult;
                throw (e);
            }
@@ -468,6 +444,7 @@
                    }
                    else
                    {
                        oCN.RollBack();
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = result;
WebAPI/Controllers/SCGL/Èռƻ®¹ÜÀí/JIT_DayPlanPlatFormBillController.cs
@@ -73,7 +73,7 @@
            {
                if (num == 1)
                {
                    ds = oCN.RunProcReturn($"select isnull(DATEDIFF(DAY,GETDATE(),CONVERT(varchar(10),max(HMasterDate),20)),0) DayNum from  Sc_WorkBillSortBillSub where HInterID in ({sWhere}) and  HMasterDate>=CONVERT(varchar(10),GETDATE(),20) and HLockedSub=1", "Sc_WorkBillSortBillSub");
                    ds = oCN.RunProcReturn($"select isnull(DATEDIFF(DAY,GETDATE(),CONVERT(varchar(10),max(HMasterDate),20))+1,0) DayNum from  Sc_WorkBillSortBillSub where HInterID in ({sWhere}) and  HMasterDate>=CONVERT(varchar(10),GETDATE(),20) and HLockedSub=1", "Sc_WorkBillSortBillSub");
                }
                else if (num == 2)
                {
@@ -189,7 +189,7 @@
                        var HMainSourceEntryID = list[i]["源单子内码"].ToString();
                        var HPlanQty = list[i]["计划数量"].ToString();
                        if (HSourceID == "")
                        if (HSourceID == ""|| HSourceID == "0")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
@@ -198,7 +198,7 @@
                            return objJsonResult;
                        }
                        ds = oCN.RunProcReturn($"select * from  Sc_WorkBillSortBillMain where HMainSourceEntryID={HMainSourceEntryID}" +
                        ds = oCN.RunProcReturn($"select * from  Sc_WorkBillSortBillMain where HMainSourceInterID={HMainSourceInterID}" +
                            $" and HMainSourceEntryID={HMainSourceEntryID} and HICMOBillNo='{HICMOBillNo}' and HICMOEntrySEQ={HICMOEntrySEQ} and HSourceID={HSourceID}", "Sc_WorkBillSortBillMain");
                        if (ds.Tables[0].Rows.Count > 0)
                        {
@@ -228,6 +228,37 @@
                            $" 0, {(HSplitQty == "" ? 0.ToString() : HSplitQty)}, {(HDayPlanSumQty == "" ? 0.ToString() : HDayPlanSumQty)},'{HPlanBeginDate}'," +
                            $"'{HSeOrderBillNo}','{HICMOBillType}',{(HSourceStockInQty == "" ? 0.ToString() : HSourceStockInQty)},{(HLeftPlanQty == "" ? 0.ToString() : HLeftPlanQty)},'{HOrderLev}',getdate()," +
                            $"{HMainSourceInterID},{HMainSourceEntryID},{HMainSourceInterID},{HMainSourceEntryID},{HPlanQty})");
                    }
                    else
                    {
                        var HMainSourceInterID = list[i]["源单主内码"].ToString();
                        var HMainSourceEntryID = list[i]["源单子内码"].ToString();
                        var HICMOBillNo = list[i]["生产订单号"].ToString();
                        var HICMOEntrySEQ = list[i]["生产订单明细行号"].ToString();
                        var HSourceID = list[i]["HSourceID"].ToString();
                        if (HSourceID == "" || HSourceID == "0")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = $"第{i + 1}行生产资源不能为空!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        ds = oCN.RunProcReturn($"select * from  Sc_WorkBillSortBillMain where HMainSourceInterID={HMainSourceInterID}" +
                              $" and HMainSourceEntryID={HMainSourceEntryID} and HICMOBillNo='{HICMOBillNo}' and HICMOEntrySEQ={HICMOEntrySEQ} and HSourceID={HSourceID}", "Sc_WorkBillSortBillMain");
                        if (ds.Tables[0].Rows.Count > 1)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = $"第{i + 1}行生产资源有重复,请修改!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        oCN.RunProc($"update Sc_WorkBillSortBillMain set HSourceID={(HSourceID == "" ? 0.ToString() : HSourceID)} where HInterID={list[i]["hmainid"].ToString()} and HBillNo='{list[i]["单据号"].ToString()}'");
                    }
                    oCN.RunProc($"update Sc_WorkBillSortBillMain set HDayPlanSumQty={list[i]["日计划数量总量"].ToString()} where HInterID={(HInterID==0?int.Parse(list[i]["hmainid"].ToString()):HInterID)} and HBillNo='{(HBillNo==""?list[i]["单据号"].ToString(): HBillNo)}'");
@@ -1098,15 +1129,17 @@
        #region ç”Ÿäº§æ—¥è®¡åˆ’平台 é”å®š
        [Route("JIT_DayPlanPlatFormBill/JIT_DayPlanPlatFormBillHLockedDay")]
        [HttpGet]
        public object JIT_DayPlanPlatFormBillHLockedDay(string sWhere, int HLockedDay)
        public object JIT_DayPlanPlatFormBillHLockedDay(int HLockedDay,int HWorkShopID)
        {
            try
            {
                if (sWhere != null && sWhere != "")
                {
                    oCN.RunProc("update Sc_WorkBillSortBillSub set HLockedSub=1" +
                    $" where HInterID in ({sWhere}) and HMasterDate between  DATEADD(day, -1, getdate()) and DATEADD(day,{(HLockedDay - 1)},getdate()) ");
                }
                oCN.RunProc("update b set HLockedSub=0 from Sc_WorkBillSortBillMain a join Sc_WorkBillSortBillSub b on a.HInterID = b.HInterID " +
              $" where a.HWorkShopID={HWorkShopID}");
                oCN.RunProc("update b set HLockedSub=1 from Sc_WorkBillSortBillMain a join Sc_WorkBillSortBillSub b on a.HInterID = b.HInterID " +
                $" where  HMasterDate between  DATEADD(day, -1, getdate()) " +
                $"and DATEADD(day,{(HLockedDay - 1)},getdate())  and a.HWorkShopID={HWorkShopID}");
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
@@ -1127,15 +1160,13 @@
        #region ç”Ÿäº§æ—¥è®¡åˆ’平台 è§£é”
        [Route("JIT_DayPlanPlatFormBill/JIT_DayPlanPlatFormBillHUnlockDay")]
        [HttpGet]
        public object JIT_DayPlanPlatFormBillHUnlockDay(string sWhere, int HLockedDay)
        public object JIT_DayPlanPlatFormBillHUnlockDay(int HWorkShopID)
        {
            try
            {
                if (sWhere != null && sWhere != "")
                {
                    oCN.RunProc("update Sc_WorkBillSortBillSub set HLockedSub=0" +
                    $" where HInterID in ({sWhere}) and HMasterDate between  DATEADD(day, -1, getdate()) and DATEADD(day,{(HLockedDay - 1)},getdate()) ");
                }
                oCN.RunProc("update b set HLockedSub=0 from Sc_WorkBillSortBillMain a join Sc_WorkBillSortBillSub b on a.HInterID = b.HInterID " +
              $" where a.HWorkShopID={HWorkShopID}");
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
WebAPI/Controllers/SCGL/Èռƻ®¹ÜÀí/JIT_ICMOSortBillController.cs
@@ -60,7 +60,7 @@
        {
            try
            {
                oCN.RunProc("exec h_p_Sc_SetICMOStatus_ReadyMater " + HSourceID.ToString() + "," + HICMOInterID.ToString() + ",'" + HDate.ToShortDateString() + "'," + HStatus.ToString() + ",'" + user + "'");
                oCN.RunProc("exec h_p_Sc_SetICMOStatus_ReadyMater " + HSourceID.ToString() + "," + HICMOInterID.ToString() + ",'" + HDate.ToString("yyyy-MM-dd HH:mm:ss.fff") + "'," + HStatus.ToString() + ",'" + user + "'");
                objJsonResult.code = "1";
                objJsonResult.count = 1;