王 垚
2021-03-19 2a2e3fbbef29bbc568b10f2bd45bd6e658443d6e
src/BLL/Demo.BillView/PRD/Pro_WorkBillPlatform.cs
@@ -1,7 +1,7 @@
using Demo.Model.Model;
using Demo.Model.Model.PODemandPlan;
using Demo.Utility;
using K3Cloud.Extend.Utils;
using Kingdee.BOS.App.Data;
using Kingdee.BOS.Core;
using Kingdee.BOS.Core.Bill.PlugIn;
using Kingdee.BOS.Core.Const;
@@ -39,7 +39,6 @@
using System.Web;
using System.Windows.Documents;
using ZD.Cloud.Logger;
using ZD.Cloud.WebApi;
using ZD.Share.Common;
namespace Demo.DynamicForm.PRD
@@ -268,7 +267,7 @@
            jObject.Put("desc", "请点击打开附件:");
            jObject.Put("urltitle", "这是文件名");
            this.View.AddAction(JSAction.openUrlWindow, new JSONArray { jObject });
        }
        }
        /// <summary>
        /// 锁定
        /// </summary>
@@ -279,16 +278,16 @@
            string sql = $"/*dialect*/update t1 set t1.FHLockedSub=1 from Sc_WorkBillSortBillSub t1  join Sc_WorkBillSortBillMain t2 on  t1.FID = t2.FID  where  FHMASTERDATE between  DATEADD(day,-1,getdate()) and DATEADD(day,{day - 1},getdate())";
            sqlList.Add(sql);
            int result = DBServiceHelper.ExecuteBatch(Context, sqlList);
            if (result > 0)
            {
                //锁定后生成日计划用料清单 及 提料计划
                DayPlanPPBomBillBatch();
                Extraction();
                SearchList();
                this.View.ShowMessage("操作成功");
            }
            else
                this.View.ShowMessage("操作失败,联系管理员!");
            //if (result > 0)
            //{
            //锁定后生成日计划用料清单 及 提料计划
            DayPlanPPBomBillBatch();
            Extraction();
            SearchList();
            this.View.ShowMessage("操作成功");
            //}
            //else
            //    this.View.ShowMessage("操作失败,联系管理员!");
        }
        /// <summary>
        /// 解锁
@@ -646,7 +645,7 @@
                    if (item.FOwnerId != null)
                        jsonModel.Add("FOwnerId", new JObject() { ["FNUMBER"] = item.FOwnerId });
                    jsonRoot.Add("Model", jsonModel);
                    CloudClient cloudClient = new CloudClient("http://localhost/K3Cloud/");
                    CloudClient cloudClient = new CloudClient("http://localhost//k3cloud/");
                    var result = cloudClient.Save("paez_CompleteAnalysisTemp", jsonRoot.ToString());
                    JObject saveObj = JObject.Parse(result);
                    string saveIsSuc = saveObj["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper();
@@ -897,7 +896,7 @@
                            ["IsVerifyBaseDataField"] = "false",
                            ["Model"] = Fentity
                        };
                        CloudClient cloudClient = new CloudClient("http://localhost/K3Cloud/");
                        CloudClient cloudClient = new CloudClient("http://localhost//k3cloud/");
                        var result = cloudClient.BatchSave("paez_CompleteAnalysisTemp", jsonRoot.ToString());
                        JObject saveObj = JObject.Parse(result);
                        string saveIsSuc = saveObj["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper();
@@ -1490,7 +1489,7 @@
                            ["Model"] = model
                        };
                        CloudClient cloudClient = new CloudClient("http://localhost/K3Cloud/");
                        CloudClient cloudClient = new CloudClient("http://localhost//k3cloud/");
                        var result = cloudClient.Save("Paez_Sc_DayPlanPPBomBill", jsonRoot.ToString());
                        JObject saveObj = JObject.Parse(result);
                        string saveIsSuc = saveObj["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper();
@@ -1624,7 +1623,7 @@
                            ModelEnty.Add("FMOID", _item.FMOID);//  
                            ModelEnty.Add("FISSUETYPE", _item.FIssueType);//  
                            ModelEnty.Add("FMaterialType", _item.FMaterialType);//  
                                                                          // ModelEnty.Add("FSEQ", FSEQ);//
                                                                                // ModelEnty.Add("FSEQ", FSEQ);//
                            Entry.Add(ModelEnty);
                            FSEQ++;
@@ -1645,13 +1644,13 @@
                                ["IsVerifyBaseDataField"] = "false",
                                ["Model"] = Fentity
                            };
                            CloudClient cloudClient = new CloudClient("http://localhost/K3Cloud/");
                            CloudClient cloudClient = new CloudClient("http://localhost//k3cloud/");
                            var result = cloudClient.BatchSave("Paez_Sc_DayPlanPPBomBill", jsonRoot.ToString());
                            JObject saveObj = JObject.Parse(result);
                            string saveIsSuc = saveObj["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper();
                            if (saveIsSuc != "TRUE")
                            {
                                LogHelper.Error(jsonRoot.ToString());
                                LogHelper.Error(saveObj.ToString());
                            }
                            Fentity = new JArray();
                        }
@@ -2074,7 +2073,7 @@
                            ["IsVerifyBaseDataField"] = "false",
                            ["Model"] = FinalyResult
                        };
                        CloudClient cloudClient = new CloudClient("http://localhost/K3Cloud/");
                        CloudClient cloudClient = new CloudClient("http://localhost//k3cloud/");
                        var result = cloudClient.BatchSave("paez_PODemandPlan", jsonRoot.ToString());
                        JObject saveObj = JObject.Parse(result);
                        string saveIsSuc = saveObj["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper();