ch
2022-08-09 92809cc9640ebe60a8dda1ad7ad10229206c3894
Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
5个文件已添加
18个文件已修改
282 ■■■■■ 已修改文件
.gitignore 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Config/kdapi.config 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs 73 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepInBillListController .cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepOutBillController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/MJGL/Sc_MouldOtherOutBillController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/MJGL/Sc_MouldProdInBillController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/MJGL/Sc_MouldProdMoveBillListController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/MJGL/Sc_MouldRepairOutBillController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/POStockInBillController.cs 53 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/日计划管理/JIT_ICMOSortBillController.cs 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/Sc_CheckToolsRepairWorkBillListController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/Sc_MouldOtherInBillController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/WebAPIController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/基础资料/基础资料/Gy_DotCheckBillController.cs 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/基础资料/基础资料/Gy_RepairBillController.cs 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Sc_MouldProdInBill/Log/637953187497864324.log 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Sc_MouldProdInBill/Log/637953187498594383.log 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Sc_MouldProdInBill/Log/637953187498644386.log 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Vlog/webapi20220805.txt 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebAPI.csproj 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.gitignore
@@ -133,3 +133,5 @@
/NETERPNoWin/obj/Debug/.NETFramework,Version=v4.0.AssemblyAttributes.cs
/NETERPNoWin/bin/Debug
/NETERPNoWin/obj/Debug
/WebAPI/Sc_MouldProdInBill/Log
/WebAPI/Vlog
WebAPI/Config/kdapi.config
@@ -4,6 +4,7 @@
        <add key="DbId" value="6204a70eba35fc"></add>
        <add key="UserName" value="Administrator"></add>
        <add key="PassWord" value="qaz!@#123"></add>
        <add key="KDApiUrl" value="http://localhost/K3Cloud/"></add>
    </appSettings>
    <add key="KDApiUrl" value="http://47.96.97.237/K3Cloud/"></add>
    <add key="DataBaseName" value="AIS20210811135644"></add>
  </appSettings>
</configuration>
WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
@@ -181,14 +181,14 @@
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (HQCCheckID == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "检验员没有选择!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //if (HQCCheckID == 0)
                //{
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;
                //    objJsonResult.Message = "检验员没有选择!";
                //    objJsonResult.data = null;
                //    return objJsonResult;
                //}
                //if (HSourceID == 0)
                //{
                //    objJsonResult.code = "0";
WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs
@@ -119,9 +119,9 @@
            string msg2 = sArray[0].ToString();
            string msg3 = sArray[1].ToString();
            int hentryid = int.Parse(sArray[2].ToString());//子表的顺序id
            int OperationType = int.Parse(sArray[3].ToString());//数据类型 1添加 3修改
            string user = sArray[4].ToString();//用户名
            //int hentryid = int.Parse(sArray[2].ToString());//子表的顺序id
            int OperationType = int.Parse(sArray[2].ToString());//数据类型 1添加 3修改
            string user = sArray[3].ToString();//用户名
            try
            {
                //判断是否有编辑权限
@@ -170,7 +170,9 @@
                string HProductNum = mainList[0].HProductNum;//成品编号
                string HVerNum = mainList[0].HVerNum;//版本
                if (OperationType == 1)//新增
                ds = oCN.RunProcReturn("select * from h_v_Gy_RoutingBillList where hmainid=" + HInterID + " and å•据号='" + HBillNo + "'", "h_v_Gy_RoutingBillList");
                if (OperationType == 1 && ds.Tables[0].Rows.Count == 0)//新增
                {
                    //主表
                    oCN.RunProc("Insert Into Gy_RoutingBillMain   " +
@@ -184,9 +186,9 @@
                    "," + HRoutingGroupID + "," + HUnitID + ",'" + HMaterNumber + "','" + HUnitNumber + "'," + Convert.ToString(HStandard ? 1 : 0) +
                    "," + HMainGroupID + "," + HMainProcID + "," + HMainCenterID + ",'" + HMainTimeUnit + "'," + HMainUnitTime + "," + HMainWorkQty +
                    "," + HMainPrice + "," + HStdSourceQty + "," + HAddSourceRate + "," + HPRDORGID + "," + HDelSourceRate +
                    ",'"+ HPicNumVer + "','" + HPicNumAssemble + "','" + HMaterTexture + "','" + HProductNum + "','" + HVerNum + "',"+ HOrgID + ") ");
                    ",'" + HPicNumVer + "','" + HPicNumAssemble + "','" + HMaterTexture + "','" + HProductNum + "','" + HVerNum + "'," + HOrgID + ") ");
                }
                else if (OperationType == 3)
                else if (OperationType == 3 || ds.Tables[0].Rows.Count != 0)
                { //修改
                    oCN.RunProc("update Gy_RoutingBillMain  set " +
                       "HDate='" + HDate +
@@ -200,10 +202,10 @@
                        ",HProductNum='" + HProductNum + "',HVerNum='" + HVerNum + "' where HInterID='" + HInterID + "'");
                    //删除子表
                    oCN.RunProc("delete from Gy_RoutingBillSub where HInterID='" + HInterID + "' and HEntryID='" + hentryid + "'");
                    oCN.RunProc("delete from Gy_RoutingBillSub where HInterID='" + HInterID+ "' and HProcNo!='9999'");
                }
                //保存子表
                objJsonResult = AddBillSub(msg3, HInterID, hentryid);
                objJsonResult = AddBillSub(msg3, HInterID);
                if (objJsonResult.code == "0")
                {
                    objJsonResult.code = "0";
@@ -255,7 +257,7 @@
            }
        }
        public json AddBillSub(string msg3, long HInterID, int hentryid)
        public json AddBillSub(string msg3, long HInterID)
        {
            List<Gy_RoutingBillSub> DetailColl = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Gy_RoutingBillSub>>(msg3);
            int i = 0;
@@ -271,31 +273,34 @@
                    return objJsonResult;
                }
                oCN.RunProc("Insert into Gy_RoutingBillSub " +
                  "(HInterID,HEntryID,HProcID,HProcNO,HSupID,HSupFlag" +
                  ",HWorkQty,HCenterID,HTimeUnit,HUnitTime" +
                  ",HReadyTime,HQueueTime,HMoveTime" +
                  ",HCloseMan,HCloseType,HRemark,HProcType,HNextProcFlag,HFlowProc" +
                  ",HFixPrice,HProcPrice,HBadPrice,HWasterPrice,HStdFlag,HBeginDayQty,HBeginFixQty" +
                  ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HAutoTrunFlag" +
                  ",HFixWorkDays,HTrunWorkDays,HReadyTimes,HICMOReadyTimes,HSubStdEmpQty,HSubCanUseSourceQty" +
                  ",HProcID_S,HCenterID_S,HWorkQty_S,HSubStdEmpQty_S,HMouldNo,HChangeMould" +
                  ",HPackStd,HPack,HPutArea,HMyWorkDays,HMyFixWorkDays,HPassRate" +
                  ",HTechnologyParameter,HPicNum,HProcCheckNote" +
                  ",HOverRate,HProcWorkNum" +
                  ") values("
                  + HInterID + "," + (hentryid==-1?i: hentryid) + "," + oSub.HProcID.ToString() + ",'" + (hentryid == -1 ? i : hentryid) + "'," + oSub.HSupID.ToString() + "," + Convert.ToString(oSub.HSupFlag ? 1 : 0) + "" +
                  "," + oSub.HWorkQty.ToString() + "," + oSub.HCenterID.ToString() + ",'" + oSub.HTimeUnit.ToString() + "'," + oSub.HUnitTime.ToString() +
                  "," + oSub.HReadyTime.ToString() + "," + oSub.HQueueTime.ToString() + "," + oSub.HMoveTime.ToString() +
                  ",'" + oSub.HCloseMan + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "','" + oSub.HProcType + "'," + Convert.ToString(oSub.HNextProcFlag ? 1 : 0) + "," + Convert.ToString(oSub.HFlowProc ? 1 : 0) +
                  "," + oSub.HFixPrice.ToString() + "," + oSub.HProcPrice.ToString() + "," + oSub.HBadPrice.ToString() + "," + oSub.HWasterPrice.ToString() + "," + Convert.ToString(oSub.HStdFlag ? 1 : 0) + "," + oSub.HBeginDayQty.ToString() + "," + oSub.HBeginFixQty.ToString() +
                  "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + "," + Convert.ToString(oSub.HAutoTrunFlag ? 1 : 0) +
                 "," + oSub.HFixWorkDays.ToString() + "," + oSub.HTrunWorkDays.ToString() + "," + oSub.HReadyTimes.ToString() + "," + oSub.HICMOReadyTimes.ToString() + "," + oSub.HSubStdEmpQty.ToString() + "," + oSub.HSubCanUseSourceQty.ToString() +
                 "," + oSub.HProcID_S.ToString() + "," + oSub.HCenterID_S.ToString() + "," + oSub.HWorkQty_S.ToString() + ", " + oSub.HSubStdEmpQty_S.ToString() + ",'" + oSub.HMouldNo + "'," + oSub.HChangeMould.ToString() +
                 ",'" + oSub.HPackStd + "','" + oSub.HPack + "','" + oSub.HPutArea + "'," + oSub.HMyWorkDays.ToString() + "," + oSub.HMyFixWorkDays.ToString() + "," + oSub.HPassRate.ToString() +
                 ",'" + oSub.HTechnologyParameter.ToString() + "','" + oSub.HPicNum.ToString() + "','" + oSub.HProcCheckNote.ToString() +
                 "', " + oSub.HOverRate.ToString() + ",'" + oSub.HProcWorkNum.ToString() + "'" +
                  ") ");
                if (oSub.HProcNo!="9999")
                {
                    oCN.RunProc("Insert into Gy_RoutingBillSub " +
                    "(HInterID,HEntryID,HProcID,HProcNO,HSupID,HSupFlag" +
                    ",HWorkQty,HCenterID,HTimeUnit,HUnitTime" +
                    ",HReadyTime,HQueueTime,HMoveTime" +
                    ",HCloseMan,HCloseType,HRemark,HProcType,HNextProcFlag,HFlowProc" +
                    ",HFixPrice,HProcPrice,HBadPrice,HWasterPrice,HStdFlag,HBeginDayQty,HBeginFixQty" +
                    ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HAutoTrunFlag" +
                    ",HFixWorkDays,HTrunWorkDays,HReadyTimes,HICMOReadyTimes,HSubStdEmpQty,HSubCanUseSourceQty" +
                    ",HProcID_S,HCenterID_S,HWorkQty_S,HSubStdEmpQty_S,HMouldNo,HChangeMould" +
                    ",HPackStd,HPack,HPutArea,HMyWorkDays,HMyFixWorkDays,HPassRate" +
                    ",HTechnologyParameter,HPicNum,HProcCheckNote" +
                    ",HOverRate,HProcWorkNum" +
                    ") values("
                    + HInterID + "," + i + "," + oSub.HProcID.ToString() + ",'" + oSub.HProcNo + "'," + oSub.HSupID.ToString() + "," + Convert.ToString(oSub.HSupFlag ? 1 : 0) + "" +
                    "," + oSub.HWorkQty.ToString() + "," + oSub.HCenterID.ToString() + ",'" + oSub.HTimeUnit.ToString() + "'," + oSub.HUnitTime.ToString() +
                    "," + oSub.HReadyTime.ToString() + "," + oSub.HQueueTime.ToString() + "," + oSub.HMoveTime.ToString() +
                    ",'" + oSub.HCloseMan + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "','" + oSub.HProcType + "'," + Convert.ToString(oSub.HNextProcFlag ? 1 : 0) + "," + Convert.ToString(oSub.HFlowProc ? 1 : 0) +
                    "," + oSub.HFixPrice.ToString() + "," + oSub.HProcPrice.ToString() + "," + oSub.HBadPrice.ToString() + "," + oSub.HWasterPrice.ToString() + "," + Convert.ToString(oSub.HStdFlag ? 1 : 0) + "," + oSub.HBeginDayQty.ToString() + "," + oSub.HBeginFixQty.ToString() +
                    "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + "," + Convert.ToString(oSub.HAutoTrunFlag ? 1 : 0) +
                   "," + oSub.HFixWorkDays.ToString() + "," + oSub.HTrunWorkDays.ToString() + "," + oSub.HReadyTimes.ToString() + "," + oSub.HICMOReadyTimes.ToString() + "," + oSub.HSubStdEmpQty.ToString() + "," + oSub.HSubCanUseSourceQty.ToString() +
                   "," + oSub.HProcID_S.ToString() + "," + oSub.HCenterID_S.ToString() + "," + oSub.HWorkQty_S.ToString() + ", " + oSub.HSubStdEmpQty_S.ToString() + ",'" + oSub.HMouldNo + "'," + oSub.HChangeMould.ToString() +
                   ",'" + oSub.HPackStd + "','" + oSub.HPack + "','" + oSub.HPutArea + "'," + oSub.HMyWorkDays.ToString() + "," + oSub.HMyFixWorkDays.ToString() + "," + oSub.HPassRate.ToString() +
                   ",'" + oSub.HTechnologyParameter.ToString() + "','" + oSub.HPicNum.ToString() + "','" + oSub.HProcCheckNote.ToString() +
                   "', " + oSub.HOverRate.ToString() + ",'" + oSub.HProcWorkNum.ToString() + "'" +
                    ") ");
                }
            }
            objJsonResult.code = "1";
WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepInBillListController .cs
@@ -322,7 +322,7 @@
                }
                if (bResult)
                {
                    string sql = $"exec h_p_Sc_MouldChangeFileStatus  'in','{oBill.omodel.HInterID.ToString()}' ";
                    string sql =string.Format( $"exec h_p_Sc_MouldChangeFileStatus  'in','{oBill.omodel.HInterID.ToString()}' ");
                    oCn.RunProc(sql);
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepOutBillController.cs
@@ -323,7 +323,7 @@
                }
                if (bResult)
                {
                    string sql = $"exec h_p_Sc_MouldChangeFileStatus  'out','{oBill.omodel.HInterID.ToString()}' ";
                    string sql =string.Format($"exec h_p_Sc_MouldChangeFileStatus  'out','{oBill.omodel.HInterID.ToString()}' ") ;
                    oCn.RunProc(sql);
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
WebAPI/Controllers/MJGL/Sc_MouldOtherOutBillController.cs
@@ -321,7 +321,7 @@
                }
                if (bResult)
                {
                    string sql = $"exec h_p_Sc_MouldChangeFileStatus  'out','{oBill.omodel.HInterID.ToString()}' ";
                    string sql =string.Format($"exec h_p_Sc_MouldChangeFileStatus  'out','{oBill.omodel.HInterID.ToString()}' ");
                    oCn.RunProc(sql);
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
WebAPI/Controllers/MJGL/Sc_MouldProdInBillController.cs
@@ -634,7 +634,7 @@
                }
                if (bResult)
                {
                    string sql = $"exec h_p_Sc_MouldChangeFileStatus  'in','{oBill.omodel.HInterID.ToString()}' ";
                    string sql =string.Format($"exec h_p_Sc_MouldChangeFileStatus  'in','{oBill.omodel.HInterID.ToString()}' ");
                    DataSet db=oCn.RunProcReturn(sql, "h_p_Sc_MouldChangeFileStatus");
                    if (db.Tables[0].Rows[0]["issuccess"].ToString()=="0")
                    {
WebAPI/Controllers/MJGL/Sc_MouldProdMoveBillListController.cs
@@ -323,7 +323,7 @@
                }
                if (bResult)
                {
                    string sql = $"exec h_p_Sc_MouldChangeFileStatus  'in','{oBill.omodel.HInterID.ToString()}' ";
                    string sql =string.Format($"exec h_p_Sc_MouldChangeFileStatus  'in','{oBill.omodel.HInterID.ToString()}' ") ;
                    oCn.RunProc(sql);
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
WebAPI/Controllers/MJGL/Sc_MouldRepairOutBillController.cs
@@ -328,7 +328,7 @@
                }
                if (bResult)
                {
                    string sql = $"exec h_p_Sc_MouldChangeFileStatus  'out',{oBill.omodel.HInterID.ToString()} ";
                    string sql =string.Format($"exec h_p_Sc_MouldChangeFileStatus  'out',{oBill.omodel.HInterID.ToString()} ") ;
                    oCn.RunProc(sql);
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
WebAPI/Controllers/POStockInBillController.cs
@@ -1058,7 +1058,7 @@
                    string FCusName = oSystemParameter.GetSingleSystemParameter("WMS_CampanyName", ref DBUtility.ClsPub.sExeReturnInfo);
                    DataTable dt = new DataTable();
                    List<string> fidList = new List<string>();
                    if (FCusName == "瑞与祺")
                    if (FCusName == "瑞与祺" || FCusName == "")
                    {
                        sql = string.Format(@"
SELECT T3.FNAME AS FTYPENAME,M.HBILLNO,B.HINTERID,B.HENTRYID,C.FID,C.FENTRYID, D.FBILLNO,B.HQTY,CD.FRECEIVEORGID,CDOO.FNUMBER AS FRECEIVENUMBER
@@ -1076,7 +1076,7 @@
LEFT JOIN {0}..T_ORG_ORGANIZATIONS CROO ON CR.FSETTLEORGID = CROO.FORGID
LEFT JOIN {0}..T_PUR_POORDER D ON C.FID =D.FID
LEFT JOIN {0}..T_BAS_BILLTYPE T2 ON D.FBILLTYPEID = T2.FBILLTYPEID
LEFT JOIN {0}..T_BAS_BILLTYPE_L T3 ON T2.FBILLTYPEID = T3.FBILLTYPEID
LEFT JOIN {0}..T_BAS_BILLTYPE_L T3 ON T2.FBILLTYPEID = T3.FBILLTYPEID and FLOCALEID=2052
LEFT JOIN  {0}..V_BD_BUYER T4 ON D.FPURCHASERID =T4.FID
LEFT JOIN {0}..T_BD_SUPPLIER DS ON D.FSUPPLIERID = DS.FSUPPLIERID
LEFT JOIN {0}..T_ORG_ORGANIZATIONS DOO ON D.FPURCHASEORGID = DOO.FORGID
@@ -1118,10 +1118,8 @@
                                model.Add("FPurOrgId", new JObject() { ["Fnumber"] = dr["FPURCHASEORGNUMBER"].ToString() }); //采购组织
                                model.Add("FSupplierId", new JObject() { ["Fnumber"] = dr["FSUPPLIERNUMBER"].ToString() }); //供应商
                                model.Add("FPURCHASERID", new JObject() { ["Fnumber"] = dr["FPURCHASERNUMBER"].ToString() }); //采购员
                                                                                                                              //model.Add("F_xbkf_Base", new JObject() { ["Fnumber"] = dr["FRECEIVEMENNUMBER"].ToString() }); //收料员
                                model.Add("FOwnerTypeIdHead", "BD_Supplier");//  è´§ä¸»ç±»åž‹
                                model.Add("FOwnerIdHead", new JObject() { ["Fnumber"] = dr["FSUPPLIERNUMBER"].ToString() });//货主 ä¾›åº”商 
                                                                                                                            //model.Add("F_XBKF_COMBO", dr["F_xbkf_Combo1"].ToString());//是否有票
                                JArray Fentity = new JArray();
                                foreach (var item in drs)
                                {
@@ -1174,7 +1172,7 @@
                                };
                                var loginRet = InvokeHelper.Login();
                                var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>();
                                if (isSuccess == 0)
                                if (isSuccess <= 0)
                                {
                                    objjson.code = "0";
                                    objjson.count = 0;
@@ -1231,8 +1229,8 @@
JOIN {0}..T_PUR_POORDERENTRY_F CR ON    C.FENTRYID = CR.FENTRYID
LEFT JOIN {0}..T_ORG_ORGANIZATIONS CROO ON CR.FSETTLEORGID = CROO.FORGID
LEFT JOIN {0}..T_PUR_POORDER D ON C.FID =D.FID
LEFT JOIN {0}..T_BAS_BILLTYPE T2 ON D.FBILLTYPEID = T2.FBILLTYPEID
LEFT JOIN {0}..T_BAS_BILLTYPE_L T3 ON T2.FBILLTYPEID = T3.FBILLTYPEID
LEFT JOIN {0}..T_BAS_BILLTYPE T2 ON D.FBILLTYPEID = T2.FBILLTYPEID
LEFT JOIN {0}..T_BAS_BILLTYPE_L T3 ON T2.FBILLTYPEID = T3.FBILLTYPEID  and FLOCALEID=2052
LEFT JOIN  {0}..V_BD_BUYER T4 ON D.FPURCHASERID =T4.FID
LEFT JOIN  {0}..T_HR_EMPINFO T5 ON D.F_XBKF_BASE1 = T5.FID
LEFT JOIN {0}..T_BD_SUPPLIER DS ON D.FSUPPLIERID = DS.FSUPPLIERID
@@ -1371,7 +1369,7 @@
                        }
                    }
                }
                var check = Get_ReciveBillCheckDate(HBillNo);
                var check = Exec_ReciveBillCheck(HBillNo);
                if (check.code == "0")
                    return check;
                //if(check)
@@ -1438,7 +1436,7 @@
                    else
                    {
                        objjson.code = "0";
                        objjson.count = 0;
                        objjson.count = 0;
                        objjson.Message = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]);
                        objjson.data = null;
                        return objjson;
@@ -1452,15 +1450,16 @@
                objjson.Message = "没有返回任何记录!" + e.ToString();
                objjson.data = null;
                return objjson;
            }
        }
        //收料通知单审核 å®¡æ ¸æäº¤
        [Route("POStockInBillList/Exec_ReciveBillCheck")]
        [HttpGet]
        public object Exec_ReciveBillCheck(string HBarCode)
        public json Exec_ReciveBillCheck(string HBarCode)
        {
            json objjson = new json();
            try
            {
                //修改金蝶生产单的状态
@@ -1470,11 +1469,11 @@
                if (isSuccess == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "操作失败,金蝶账号登录异常。" + loginRet;
                    objJsonResult.data = null;
                    return objJsonResult;
                    objjson.code = "0";
                    objjson.count = 0;
                    objjson.Message = "操作失败,金蝶账号登录异常。" + loginRet;
                    objjson.data = null;
                    return objjson;
                }
                var json = new
                {
@@ -1499,25 +1498,25 @@
                //判断审核是否成功
                if (JObject.Parse(result2)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "审核收料通知单失败!单据号:" + HBarCode;
                    objJsonResult.data = null;
                    return objJsonResult;
                    objjson.code = "0";
                    objjson.count = 0;
                    objjson.Message = "审核收料通知单失败!单据号:" + HBarCode;
                    objjson.data = null;
                    return objjson;
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "审核成功!";
                objJsonResult.data = 1;
                return objJsonResult;
                return objjson;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
                objjson.code = "0";
                objjson.count = 0;
                objjson.Message = "没有返回任何记录!" + e.ToString();
                objjson.data = null;
                return objjson;
            }
        }
WebAPI/Controllers/SCGL/Èռƻ®¹ÜÀí/JIT_ICMOSortBillController.cs
New file
@@ -0,0 +1,56 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Http;
using WebAPI.Models;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System.Diagnostics;
namespace WebAPI.Controllers.SCGL.日计划管理
{
    public class JIT_ICMOSortBillController : ApiController
    {
        private json objJsonResult = new json();
        public DataSet ds = new DataSet();
        public WebServer webserver = new WebServer();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        #region ç”Ÿäº§æ—¥è®¡åˆ’ æŸ¥è¯¢
        [Route("JIT_ICMOSortBill/JIT_ICMOSortBillList")]
        [HttpGet]
        public object JIT_ICMOSortBillList(string sWhere, string user)
        {
            try
            {
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("Sc_WorkBillSortBill_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                ds = oCN.RunProcReturn("select * from h_v_Sc_ICMOSortBillList", "h_v_Sc_ICMOSortBillList");
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}
WebAPI/Controllers/Sc_CheckToolsRepairWorkBillListController.cs
@@ -4486,7 +4486,7 @@
                }
                if (bResult)
                {
                    string sql = $"exec h_p_Sc_MouldChangeFileStatus  'in','{oBill.omodel.HInterID.ToString()}' ";
                    string sql =string.Format($"exec h_p_Sc_MouldChangeFileStatus  'in','{oBill.omodel.HInterID.ToString()}' ");
                    oCn.RunProc(sql);
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
WebAPI/Controllers/Sc_MouldOtherInBillController.cs
@@ -320,7 +320,7 @@
                }
                if (bResult)
                {
                    string sql = $"exec h_p_Sc_MouldChangeFileStatus  'in','{oBill.omodel.HInterID.ToString()}' ";
                    string sql =string.Format($"exec h_p_Sc_MouldChangeFileStatus  'in','{oBill.omodel.HInterID.ToString()}' ") ;
                    oCn.RunProc(sql);
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -3804,7 +3804,7 @@
                }
                if (bResult)
                {
                    string sql = $"exec h_p_Sc_MouldChangeFileStatus  'in','{oBill.omodel.HInterID.ToString()}' ";
                    string sql =string.Format($"exec h_p_Sc_MouldChangeFileStatus  'in','{oBill.omodel.HInterID.ToString()}' ");
                    oCn.RunProc(sql);
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
@@ -4214,7 +4214,7 @@
                }
                if (bResult)
                {
                    string sql = $"exec h_p_Sc_MouldChangeFileStatus  'out','{oBill.omodel.HInterID.ToString()}' ";
                    string sql =string.Format($"exec h_p_Sc_MouldChangeFileStatus  'out','{oBill.omodel.HInterID.ToString()}' ");
                    oCn.RunProc(sql);
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
@@ -4791,9 +4791,9 @@
                }
                if (bResult)
                {
                    string sql = $"exec h_p_Sc_MouldProdBackBillList '{oBill.omodel.HBillNo}' ";
                    string sql =string.Format($"exec h_p_Sc_MouldProdBackBillList '{oBill.omodel.HBillNo}' ") ;
                    oCn.RunProc(sql);
                    string sql1 = $"exec h_p_Sc_MouldChangeFileStatus  'in','{oBill.omodel.HInterID.ToString()}' ";
                    string sql1 =string.Format($"exec h_p_Sc_MouldChangeFileStatus  'in','{oBill.omodel.HInterID.ToString()}' ");
                    oCn.RunProc(sql1);
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
@@ -5230,7 +5230,7 @@
                }
                if (bResult)
                {
                    string sql = $"exec h_p_Sc_MouldChangeFileStatus  'out','{oBill.omodel.HInterID.ToString()}' ";
                    string sql =string.Format($"exec h_p_Sc_MouldChangeFileStatus  'out','{oBill.omodel.HInterID.ToString()}' ");
                    oCn.RunProc(sql);
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
WebAPI/Controllers/WebAPIController.cs
@@ -3142,7 +3142,7 @@
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                string sql = string.Format(@"select b.HDotCheckItemID HDotCheckItemID,c.HNumber HDotCheckCode,b.HDotCheckItem,b.HDotCheckPart,b.HClaim,
                                    b.HManagerID,e.HNumber HManagerCode,e.HName HManagerName,b.HRemark from Sb_EquipDotCheckRuleBillMain  a
                                    b.HManagerID,e.HNumber HManagerCode,e.HName HManagerName,b.HRemark,a.HInterID,a.HBillNo from Sb_EquipDotCheckRuleBillMain  a
                                    left join Sb_EquipDotCheckRuleBillSub b on a.HInterID=b.HInterID 
                                    left join Gy_QCCheckItem c on c.HItemID=b.HDotCheckItemID
                                     left join Gy_Employee e on e.HItemID=b.HManagerID
WebAPI/Controllers/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/Gy_DotCheckBillController.cs
@@ -159,7 +159,7 @@
                msg2 = "[" + msg2.ToString() + "]";
                List<Models.ClsGy_DotCheck> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsGy_DotCheck>>(msg2);
                long HItemID = int.Parse(msg3);
                long HItemID = int.Parse(msg4);
                string HNumber = list[0].HNumber;
                string HName = list[0].HName;
                string HShortNumber = list[0].HNumber;
@@ -169,7 +169,7 @@
                string HUseFlag = list[0].HUseFlag;
                //判断权限
                if (!ClsPub.Security_Log("Gy_DotCheck_Edit", 1, false, msg4))
                if (!ClsPub.Security_Log("Gy_DotCheck_Edit", 1, false, msg3))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
@@ -188,14 +188,14 @@
                    return objJsonResult;
                }
                if (oDept.HavSameNumber(HItemID, HNumber))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "代码重复!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //if (oDept.HavSameNumber(HItemID, HNumber))
                //{
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;
                //    objJsonResult.Message = "代码重复!";
                //    objJsonResult.data = null;
                //    return objJsonResult;
                //}
                //若MAINDI重复则重新获取
@@ -284,9 +284,9 @@
                //主表
                oCN.RunProc("Insert into Gy_DotCheck " +
                   " (HNumber,HName,HHelpCode,HShortNumber" +
                   ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime) " +
                   ",HLevel,HEndFlag,HStopflag,HRemark,HParentID) " +
                   " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," +
                    +HLevel + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "',getdate())", ref DBUtility.ClsPub.sExeReturnInfo);
                    +HLevel + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "',0)", ref DBUtility.ClsPub.sExeReturnInfo);
                //修改上级为非末级代码
                //oCN.RunProc("Update Gy_MouldType set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
                oCN.Commit();
WebAPI/Controllers/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/Gy_RepairBillController.cs
@@ -186,15 +186,6 @@
                    return objJsonResult;
                }
                if (oDept.HavSameNumber(HItemID, HNumber))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "代码重复!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //若MAINDI重复则重新获取
                oCN.BeginTran();
@@ -282,9 +273,9 @@
                //主表
                oCN.RunProc("Insert into Gy_Repair " +
                   " (HNumber,HName,HHelpCode,HShortNumber" +
                   ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime) " +
                   ",HLevel,HEndFlag,HStopflag,HRemark,HParentID) " +
                   " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," +
                    +HLevel + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "',getdate())", ref DBUtility.ClsPub.sExeReturnInfo);
                    +HLevel + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "',0)", ref DBUtility.ClsPub.sExeReturnInfo);
                //修改上级为非末级代码
                //oCN.RunProc("Update Gy_MouldType set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
                oCN.Commit();
WebAPI/Sc_MouldProdInBill/Log/637953187497864324.log
New file
@@ -0,0 +1,3 @@
------------------------2022/8/5 17:52:29------------------------------
成功!
WebAPI/Sc_MouldProdInBill/Log/637953187498594383.log
New file
@@ -0,0 +1,3 @@
------------------------2022/8/5 17:52:29------------------------------
有权限
WebAPI/Sc_MouldProdInBill/Log/637953187498644386.log
New file
@@ -0,0 +1,3 @@
------------------------2022/8/5 17:52:29------------------------------
select * from h_v_Sc_MouldProdInHouseBillList where åº“存组织='手机事业部' and CONVERT(varchar(100),日期, 23) >= '2022-07-06' and CONVERT(varchar(100),日期, 23) <= '2022-08-05'order by hmainid desc
WebAPI/Vlog/webapi20220805.txt
New file
@@ -0,0 +1 @@
2022/8/5 17:52:29  and CONVERT(varchar(100),日期, 23) >= '2022-07-06' and CONVERT(varchar(100),日期, 23) <= '2022-08-05';手机事业部
WebAPI/WebAPI.csproj
@@ -386,6 +386,7 @@
    <Compile Include="Controllers\SCGL\Sc_ICBomBillController.cs" />
    <Compile Include="Controllers\SCGL\日计划管理\JIT_DayPlanPlatFormBillController.cs" />
    <Compile Include="Controllers\SCGL\日计划管理\JIT_DayPlanPlatFormImportController.cs" />
    <Compile Include="Controllers\SCGL\日计划管理\JIT_ICMOSortBillController.cs" />
    <Compile Include="Controllers\SCGL\日计划管理\NpoiHelper.cs" />
    <Compile Include="Controllers\SCGL\日计划管理\Sc_JIT_ComplementGoodBillController.cs" />
    <Compile Include="Controllers\SCGL\日计划管理\JIT_CompleteController..cs" />
@@ -836,6 +837,7 @@
    <Folder Include="Views\Gy_RoutingGroup\" />
    <Folder Include="Views\JIT_DayPlanPlatFormBill\" />
    <Folder Include="Views\JIT_DayPlanPlatFormImport\" />
    <Folder Include="Views\JIT_ICMOSortBillList\" />
    <Folder Include="Views\KF_ICInventoryList_WMSBill\" />
    <Folder Include="Views\Kf_ICStockBillMain\" />
    <Folder Include="Views\Kf_ICStockInOutBill\" />