|
|
@@ -7516,16 +7516,43 @@ namespace Dongke.IBOSS.PRD.Service.PDAModuleLogic
|
|
|
/// <param name="groutingBatchNo"></param>
|
|
|
/// <param name="sUser"></param>
|
|
|
/// <returns></returns>
|
|
|
- public static ServiceResultEntity GetGroutingMouldByBatchNo(string groutingLineCode, string groutingDay, string groutingBatchNo)
|
|
|
+ public static ServiceResultEntity GetGroutingMouldByBatchNo(string groutingMouldCode, string groutingLineCode, string groutingDay, string groutingBatchNo)
|
|
|
{
|
|
|
IDBConnection oracleConn = ClsDbFactory.CreateDBConnection(DataBaseType.ORACLE, DataManager.ConnectionString);
|
|
|
string sqlStr = "";
|
|
|
+ string sqlStr0 = "";
|
|
|
try
|
|
|
- {
|
|
|
+ {
|
|
|
ServiceResultEntity sre = new ServiceResultEntity();
|
|
|
oracleConn.Open();
|
|
|
- //模具注浆查询
|
|
|
- sqlStr = $@"
|
|
|
+ sqlStr0 = $@"
|
|
|
+ SELECT
|
|
|
+ count(BARCODE)
|
|
|
+ FROM
|
|
|
+ TP_PM_GROUTINGDAILYDETAIL
|
|
|
+ WHERE
|
|
|
+ GROUTINGFLAG = '1'
|
|
|
+ and VALUEFLAG = '1'
|
|
|
+ and GROUTINGBATCHNO = :groutingBatchNo
|
|
|
+ and GROUTINGLINECODE = :groutingLineCode
|
|
|
+ AND GROUTINGDATE = TO_DATE(:groutingDay , 'yyyy-MM-dd')
|
|
|
+ and BARCODE is not null
|
|
|
+ ";
|
|
|
+ OracleParameter[] paras0 = new OracleParameter[]
|
|
|
+ {
|
|
|
+ new OracleParameter(":groutingBatchNo", Convert.ToInt32(groutingBatchNo)),
|
|
|
+ new OracleParameter(":groutingLineCode", groutingLineCode),
|
|
|
+ new OracleParameter(":groutingDay", groutingDay)
|
|
|
+ };
|
|
|
+ string result0 = oracleConn.GetSqlResultToStr(sqlStr0, paras0);
|
|
|
+ if (Convert.ToInt32(result0) > 0) {
|
|
|
+ sre.Status = Constant.ServiceResultStatus.Success;
|
|
|
+ sre.Result = Convert.ToInt32(groutingMouldCode.Substring(groutingMouldCode.Length - 3, 3));
|
|
|
+ return sre;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ sqlStr = $@"
|
|
|
SELECT
|
|
|
substr(MIN(GROUTINGMOULDCODE),-3,3)
|
|
|
FROM
|