yusijie
7 天以前 58494b52621037c5315cd0d91686a68bd170a779
客户标签
3个文件已修改
179 ■■■■■ 已修改文件
WebAPI/Controllers/生产管理/客户标签/Sc_CustomerTagController.cs 169 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Web.config 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebAPI.csproj 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/Éú²ú¹ÜÀí/¿Í»§±êÇ©/Sc_CustomerTagController.cs
@@ -622,6 +622,69 @@
        }
        #endregion
        #region [客户标签信息删除功能]
        [Route("Sc_CustomerTagInfo/Delete")]
        [HttpGet]
        public object Delete(string HItemSubIDs, string user)
        {
            try
            {
                DataSet Ds;
                DataSet Ds2;
                if (HItemSubIDs == "")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "[0000-1-009]选择客户标签信息为空!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                Ds = oCN.RunProcReturn("Select * from h_v_Sc_CustomerTagInfoList with(nolock) Where HItemSubID in (" + HItemSubIDs + ")", "h_v_Sc_CustomerTagInfoList");
                if (Ds.Tables[0].Rows.Count != 0)
                {
                    oCN.BeginTran();
                    //删除客户标签信息--子表
                    oCN.RunProc("Delete from Sc_CustomerTagInfoSub Where HItemSubID in (" + HItemSubIDs + ")");
                    //写入系统日志
                    for (int i = 0; i < Ds.Tables[0].Rows.Count; i++)
                    {
                        oCN.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + user + "','','" + "Sc_CustomerTagInfoList——Delete" + "','LMES-客户标签信息模块','" + DBUtility.ClsPub.IPAddress + "','" + user + "删除客户标签信息," + "客户名称:" + Ds.Tables[0].Rows[i]["客户名称"] + ",物料代码:" + Ds.Tables[0].Rows[i]["物料代码"] + ",单据号:" + Ds.Tables[0].Rows[i]["单据号"] + "'", ref DBUtility.ClsPub.sExeReturnInfo);
                    }
                    oCN.Commit();
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "[0000-1-008]删除成功";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "[0000-1-045]单据未找到";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "[0000-1-007]" + e.Message;
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å®¢æˆ·æ ‡ç­¾æ¡£æ¡ˆç”Ÿæˆ
        [Route("Sc_CustomerTagBarCode/Save")]
        [HttpGet]
@@ -672,5 +735,111 @@
        }
        #endregion
        #region å®¢æˆ·æ ‡ç­¾æ¡ç  æŸ¥è¯¢-分页
        [Route("Sc_CustomerTagBarCode/BarPageList")]
        [HttpGet]
        public object BarPageList(string sWhere, string user, string Organization, int page, int size)
        {
            try
            {
                List<object> columnNameList = new List<object>();  //定义声明变量 ï¼ŒæŠŠé€šè¿‡ new List<object>()创建的 å®žä¾‹ï¼Œèµ‹å€¼ç»™å˜é‡
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("exec h_p_Sc_CustomerTagBarCodeList " + page + "," + size + ",'" + Organization + "'," + "''", "h_p_Sc_CustomerTagBarCodeList");
                }
                else
                {
                    sWhere = sWhere.Replace("'", "''");
                    ds = oCN.RunProcReturn("exec h_p_Sc_CustomerTagBarCodeList " + page + "," + size + ",'" + Organization + "','" + sWhere + "'", "h_p_Sc_CustomerTagBarCodeList");
                }
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
                {
                    Type dataType = col.DataType;
                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                }
                objJsonResult.code = "1";
                objJsonResult.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
                objJsonResult.Message = "Sucess!";
                objJsonResult.list = columnNameList;
                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
        #region [客户标签条码删除功能]
        [Route("Sc_CustomerTagBarCode/DeleteBarCode")]
        [HttpGet]
        public object DeleteBarCode(string HItemIDs,string user)
        {
            try
            {
                DataSet Ds;
                if (HItemIDs == "")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "[0000-1-009]选择条码为空!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                Ds = oCN.RunProcReturn("Select * from h_v_Sc_CustomerTagBarCodeList with(nolock) Where HItemID in (" + HItemIDs + ")", "h_v_Sc_CustomerTagBarCodeList");
                if (Ds.Tables[0].Rows.Count != 0)
                {
                    oCN.BeginTran();
                    //删除客户标签条码
                    oCN.RunProc("Delete from Sc_CustomerTagBarCode Where HItemID in (" + HItemIDs + ")");
                    //写入系统日志
                    for (int i = 0; i < Ds.Tables[0].Rows.Count; i++)
                    {
                        oCN.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + user + "','','" + "Sc_CustomerTagBarCodeList——Delete" + "','LMES-客户标签条码模块','" + DBUtility.ClsPub.IPAddress + "','" + user + "删除客户标签条码," + "生产订单:" + Ds.Tables[0].Rows[i]["生产订单号"] + ",物料代码:" + Ds.Tables[0].Rows[i]["物料代码"] + ",流水号:" + Ds.Tables[0].Rows[i]["流水号"] + "'", ref DBUtility.ClsPub.sExeReturnInfo);
                    }
                    oCN.Commit();
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "[0000-1-008]删除成功";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "[0000-1-045]单据未找到";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "[0000-1-007]" + e.Message;
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}
WebAPI/Web.config
@@ -32,10 +32,10 @@
        <!--<add key="sUrl" value="http://192.168.80.90:9090/WEBS/WebService1.asmx"/>     å®‰ç‘žæœåС噍-->
        <!--<add key="sUrl" value="http://122.227.133.186:8090/WEBS/WebService1.asmx"/>    -->
        <!--<add key="sUrl" value="http://192.168.80.90:9090/WEBS-WMS/WebService1.asmx"/>     å®‰ç‘žæœåС噍-->
        <!--<add key="sUrl" value="http://47.96.97.237/WEBS-WMS/WebService1.asmx"/> --> <!--测试服务器-->
        <add key="sUrl" value="http://47.96.97.237/WEBS-WMS/WebService1.asmx"/>  <!--测试服务器-->
        <!--<add key="surl" value="http://localhost:8082/webs/webservice1.asmx"/>    æœ¬åœ°-->
        <!--<add key="sUrl" value="http://192.168.110.57:81/WEBS/WebService1.asmx"/>-->    <!--陈雯静本地配置-->
        <add key="surl" value="http://localhost/webs-web/webservice1.asmx" /> <!--翁涛涛本地配置-->
        <!--<add key="surl" value="http://localhost/webs-web/webservice1.asmx" /> --><!--翁涛涛本地配置-->
        <!--<add key="sUrl" value="http://192.168.1.57:8082/WEBS-WMS/WebService1.asmx"/>九菱-->
        <!--<add key="sUrl" value="http://61.130.182.102:18181/WEBSCS/WebService1.asmx"/>--><!--斯莫尔-->
        <!--<add key="surl" value="http://192.168.0.113/WEBS-WMS/Webservice1.asmx" />三升本地配置-->
@@ -107,13 +107,13 @@
            </basicHttpBinding>
        </bindings>
        <client>
            <endpoint address="http://192.168.0.113/WEBS-WMS/Webservice1.asmx" binding="basicHttpBinding" bindingConfiguration="WebService1Soap" contract="Webs1.WebService1Soap" name="WebService1Soap" />
            <endpoint address="http://47.96.97.237/WEBS-WMS/WebService1.asmx" binding="basicHttpBinding" bindingConfiguration="WebService1Soap" contract="Webs1.WebService1Soap" name="WebService1Soap" />
        </client>
    </system.serviceModel>
 <applicationSettings>
  <WebAPI.Properties.Settings>
   <setting name="WebAPI_WebS_WebService1" serializeAs="String">
    <value>http://192.168.0.113/WEBS-WMS/Webservice1.asmx</value>
    <value>http://47.96.97.237/WEBS-WMS/WebService1.asmx</value>
   </setting>
  </WebAPI.Properties.Settings>
 </applicationSettings>
WebAPI/WebAPI.csproj
@@ -449,6 +449,8 @@
    <Compile Include="Controllers\SBGL\Sb_EquipPatrolCheckRuleBillController.cs" />
    <Compile Include="Controllers\SBGL\Sb_EquipPatrolCheckPlanBillController.cs" />
    <Compile Include="Controllers\SBGL\Sb_EquipPatrolCheckBillController.cs" />
    <Compile Include="Controllers\SCGL\Sc_RepairCodeBindingController.cs" />
    <Compile Include="Controllers\SCGL\日计划管理\JIT_DayPlanPlatFormBill_TKController.cs" />
    <Compile Include="Controllers\XSGL\Crm_ComplainVisitBillController.cs" />
    <Compile Include="Controllers\XSGL\Xs_SellOutBillList_SecController.cs" />
    <Compile Include="Controllers\XSGL\Xs_SeQuotationBillController.cs" />