ÎļþÃû´Ó MES.Service/service/BasicData/SentLaboratoryTestingItemsManager.cs ÐÞ¸Ä |
| | |
| | | using MES.Service.DB; |
| | | using MES.Service.Dto.webApi.QcIssueResult; |
| | | using MES.Service.Modes; |
| | | using MES.Service.Modes.QcIssueResult; |
| | | using MES.Service.Modes.SentLaboratory; |
| | | using Microsoft.Data.SqlClient; |
| | | using Newtonsoft.Json; |
| | | using Oracle.ManagedDataAccess.Client; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Diagnostics; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | |
| | | .ExecuteCommand(); //转æDeleteableå®ç°å¤æçæä½ |
| | | } |
| | | |
| | | |
| | | public string GetBillCode(string param1, string param2, string param3) |
| | | { |
| | | string result = null; |
| | | // è¿æ¥å符串 |
| | | string connectionString = "User Id=yc_dev;Password=ycdev;Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.100)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL)))"; |
| | | |
| | | // SQL æ¥è¯¢ |
| | | string sql = "SELECT getbillcode1(:param1, :param2, :param3) FROM dual"; |
| | | |
| | | using (OracleConnection connection = new OracleConnection(connectionString)) |
| | | { |
| | | using (OracleCommand command = new OracleCommand(sql, connection)) |
| | | { |
| | | // æ·»å åæ° |
| | | command.Parameters.Add("param1", OracleDbType.Varchar2).Value = param1; |
| | | command.Parameters.Add("param2", OracleDbType.Varchar2).Value = param2; |
| | | command.Parameters.Add("param3", OracleDbType.Varchar2).Value = param3; |
| | | |
| | | // æå¼è¿æ¥ |
| | | connection.Open(); |
| | | |
| | | // æ§è¡æ¥è¯¢ |
| | | result = command.ExecuteScalar()?.ToString(); |
| | | } |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | |
| | | } |