| | |
| | | #endregion |
| | | |
| | | #region å¨å
·éè´å
¥åºåå®¡æ ¸/åå®¡æ ¸ |
| | | [Route("Sc_MouldProdInHouseBill/AuditMouldProdInHouseBill")] |
| | | [Route("Sc_MouldProdInHouseBill/AuditMouldProdInHouseBills")] |
| | | [HttpGet] |
| | | public object AuditMouldProdInHouseBill(string HInterID, string user, int flag) |
| | | public object AuditMouldProdInHouseBills(string HInterID, string user, int flag) |
| | | { |
| | | //flag=1 å®¡æ ¸ï¼ flag=2 åå®¡æ ¸ |
| | | //ç¼è¾æé |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | DLL.ClsSc_MouldProdOutBill oBill = new DLL.ClsSc_MouldProdOutBill(); |
| | | DLL.ClsSc_MouldRepairChangeBill oBill = new DLL.ClsSc_MouldRepairChangeBill(); |
| | | if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) |
| | | { |
| | | if (flag == 1) |
| | |
| | | ds = oCN.RunProcReturn(string.Format(@"SELECT HMaterID,模å
·ä»£ç HMaterCode,模å
·åç§° HMaterName,è§æ ¼åå· HMaterSpec,HPropertyID,è¾
å©å±æ§ä»£ç HPropertyCode,è¾
å©å±æ§åç§° HPropertyName, |
| | | HSecUnitID, è¾
å©è®¡éåä½ä»£ç HSecUnitCode, è¾
å©è®¡éåä½åç§° HSecUnitName, HUnitID, 计éåä½ä»£ç HUnitCode, 计éåä½åç§° HUnitName, æ¹æ¬¡ HBatchNo, |
| | | è®¾è®¡å¯¿å½ HDesignLife, å©ä½å¯¿å½ HLeaveLife, 使ç¨å¯¿å½ HUseLife, 宿¶æ°é HQty, åä»· HPrice, éé¢ HMoney, HWHID, æ¶æä»åºä»£ç HWHCode, æ¶æä»åºåç§° HWHName, |
| | | HSPID, ä»ä½ä»£ç HSPCode, ä»ä½åç§° HSPName, 夿³¨ HRemark,HStockOrgID |
| | | HSPID, ä»ä½ä»£ç HSPCode, ä»ä½åç§° HSPName, å夿³¨ HRemark,HStockOrgID |
| | | FROM h_v_Sc_MouldScrapInHouseBillList"), "h_v_Sc_MouldScrapInHouseBillList"); |
| | | |
| | | } |
| | |
| | | string sql1 = string.Format(@"SELECT HMaterID,模å
·ä»£ç HMaterCode,模å
·åç§° HMaterName,è§æ ¼åå· HMaterSpec,HPropertyID,è¾
å©å±æ§ä»£ç HPropertyCode,è¾
å©å±æ§åç§° HPropertyName, |
| | | HSecUnitID, è¾
å©è®¡éåä½ä»£ç HSecUnitCode, è¾
å©è®¡éåä½åç§° HSecUnitName, HUnitID, 计éåä½ä»£ç HUnitCode, 计éåä½åç§° HUnitName, æ¹æ¬¡ HBatchNo, |
| | | è®¾è®¡å¯¿å½ HDesignLife, å©ä½å¯¿å½ HLeaveLife, 使ç¨å¯¿å½ HUseLife, 宿¶æ°é HQty, åä»· HPrice, éé¢ HMoney, HWHID, æ¶æä»åºä»£ç HWHCode, æ¶æä»åºåç§° HWHName, |
| | | HSPID, ä»ä½ä»£ç HSPCode, ä»ä½åç§° HSPName, 夿³¨ HRemark,HStockOrgID |
| | | HSPID, ä»ä½ä»£ç HSPCode, ä»ä½åç§° HSPName, å夿³¨ HRemark,HStockOrgID |
| | | FROM h_v_Sc_MouldScrapInHouseBillList where 1 = 1 "); |
| | | string sql = sql1 + sqlWhere; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldScrapInHouseBillList"); |
| | |
| | | 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 msg4 = sArray[4].ToString(); |
| | | int OperationType = int.Parse(sArray[2].ToString());//æ°æ®ç±»å 1æ·»å 3ä¿®æ¹ |
| | | string msg4 = sArray[3].ToString(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldRepairSendWorkBill_Edit", 1, false, msg4)) |
| | |
| | | " where HInterID=" + omodel.HInterID.ToString()); |
| | | |
| | | //å é¤å表 |
| | | oCN.RunProc("delete from Sc_MouldRepairSendWorkBillSub where HInterID='" + omodel.HInterID.ToString() + "' and HEntryID='" + hentryid + "'"); |
| | | oCN.RunProc("delete from Sc_MouldRepairSendWorkBillSub where HInterID='" + omodel.HInterID.ToString() + "'"); |
| | | } |
| | | //ä¿åå表 |
| | | objJsonResult = AddBillSub(msg3, hentryid); |
| | | objJsonResult = AddBillSub(msg3); |
| | | if (objJsonResult.code == "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | } |
| | | } |
| | | |
| | | public json AddBillSub(string msg3, int hentryid) |
| | | public json AddBillSub(string msg3) |
| | | { |
| | | DetailColl = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsSb_MouldRepairWorkBillSub>>(msg3); |
| | | int i = 1; |
| | |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HRepairID,HRepairExplanation,HManagerID,HMoney" + |
| | | ") values(" |
| | | + omodel.HInterID.ToString() + "," + (hentryid == -1 ? i : hentryid) + ",'" + oSub.HCloseMan + "','" + DateTime.Now + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" + |
| | | + omodel.HInterID.ToString() + "," + (i) + ",'" + oSub.HCloseMan + "','" + DateTime.Now + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" + |
| | | "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + |
| | | "," + oSub.HRepairID.ToString() + ",'" + oSub.HRepairExplanation + "'," + oSub.HManagerID.ToString() + "," + oSub.HMoney.ToString() + |
| | | ") "); |
| | |
| | | { |
| | | ds = StockCheckItemList(sWhere); |
| | | |
| | | //if (ds.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
| | | //{ |
| | | //objJsonResult.code = "0"; |
| | | //objJsonResult.count = 0; |
| | | //objJsonResult.Message = "æ æ°æ®"; |
| | | //objJsonResult.data = null; |
| | | //return objJsonResult; |
| | | //} |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | |
| | | public static DataSet StockCheckItemList(string sWhere) |
| | | { |
| | | string sql1 = string.Format(@"select * from h_v_Gy_StockCheckItemList"); |
| | | string sql1 = string.Format(@"select * from h_v_Gy_StockCheckItemList where 1=1 "); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql1 + sWhere + " order by hitemid desc", "h_v_Gy_StockCheckItemList"); |