| | |
| | | public Model.ClsSc_MouldMaintainPlanBillMain omodel = new Model.ClsSc_MouldMaintainPlanBillMain(); |
| | | public List<Model.ClsSc_MouldMaintainPlanBillSub> DetailColl = new List<Model.ClsSc_MouldMaintainPlanBillSub>(); |
| | | public List<Model.ClsSc_MouldMaintainPlanBillSub_Item> DetailCol = new List<Model.ClsSc_MouldMaintainPlanBillSub_Item>(); |
| | | public List<Model.ClsSc_MouldMaintainPlanBillSub_Plan> DetailCol2 = new List<Model.ClsSc_MouldMaintainPlanBillSub_Plan>(); |
| | | |
| | | public ClsSc_MouldMaintainPlanBill() |
| | | { |
| | | base.MvarItemKeySub = "Sc_MouldMaintainPlanBillSub"; |
| | | base.MvarItemKeySub2 = ""; |
| | | base.MvarItemKeySub2 = "Sc_MouldMaintainPlanBillSub_Plan"; |
| | | base.MvarItemKeySub3 = ""; |
| | | base.MvarItemKeySub4 = ""; |
| | | base.MvarItemKey="Sc_MouldMaintainPlanBillMain"; |
| | |
| | | DeleteRelation(ref sReturn, lngBillKey); |
| | | //å é¤å表 |
| | | DeleteBillSub(lngBillKey); |
| | | DeleteBillSub2(lngBillKey); |
| | | oCn.RunProc("delete from Sc_MouldMaintainPlanBillSub_Item where HInterID=" + lngBillKey); |
| | | |
| | | omodel.HInterID = lngBillKey; |
| | |
| | | "," + Item.HSourceInterID.ToString() + "," + Item.HSourceEntryID.ToString() + ",'" + Item.HSourceBillNo + "','" + Item.HSourceBillType + "'," + Item.HRelationQty.ToString() + "," + Item.HRelationMoney.ToString() + ",'" + Item.HMaintainItem.ToString() + |
| | | "') "); |
| | | } |
| | | |
| | | //æå
¥ç¹æ£è®¡å |
| | | foreach (Model.ClsSc_MouldMaintainPlanBillSub_Plan Items in DetailCol2) |
| | | { |
| | | oCn.RunProc("Insert into Sc_MouldMaintainPlanBillSub_Plan " + |
| | | " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HPlanDate,HPlanBeginTime,HPlanEndTime,HSafeEndTime,HErrBeginTime," + |
| | | "HRelationFlag,HSendFlag,HErrBeginQty,HUseNowQty,HUseEndQty" + |
| | | |
| | | ") values(" |
| | | + omodel.HInterID.ToString() + "," + Items.HEntryID.ToString() + ",'" + Items.HCloseMan + "','" + Items.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(Items.HCloseType ? 1 : 0) + ",'" + Items.HRemark + "'" + |
| | | "," + Items.HSourceInterID.ToString() + "," + Items.HSourceEntryID.ToString() + ",'" + Items.HSourceBillNo + "','" + Items.HSourceBillType + "'," + Items.HRelationQty.ToString() + "," + Items.HRelationMoney.ToString() + |
| | | ",'" + Items.HPlanDate.ToString() + "','" + Items.HPlanBeginTime.ToString() + "','" + Items.HPlanEndTime.ToString() + "','" + Items.HSafeEndTime.ToString() + "','" + Items.HErrBeginTime.ToString() + "'," + |
| | | "'" + DBUtility.ClsPub.BoolToString(Items.HRelationFlag) + "','" + DBUtility.ClsPub.BoolToString(Items.HSendFlag) + "','" + Items.HErrBeginQty.ToString() + "','" + Items.HUseNowQty.ToString() + "','" + Items.HUseEndQty.ToString() + |
| | | "') "); |
| | | } |
| | | // |
| | | //foreach (Model.ClsSc_MouldMaintainPlanBillSub oSub in DetailColl) |
| | | //{ |
| | |
| | | { |
| | | //æ¥è¯¢ä¸»è¡¨ |
| | | DataSet Ds ; |
| | | Ds = oCn.RunProcReturn("Select * from Gy_RoutingBillMain Where HInterID=" + lngBillKey.ToString()+" and HPRDORGID='"+DBUtility.ClsPub.HOrgID.ToString()+"'", "Gy_RoutingBillMain"); |
| | | Ds = oCn.RunProcReturn("Select * from Gy_RoutingBillMain Where HInterID=" + lngBillKey.ToString(), "Gy_RoutingBillMain"); |
| | | if(Ds.Tables[0].Rows.Count==0) |
| | | { |
| | | sReturn = "åæ®æªæ¾å°ï¼"; |
| | |
| | | } |
| | | //èµå¼ |
| | | omodel.HInterID =DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"].ToString()); |
| | | omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"].ToString()); |
| | | |
| | | omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim(); |
| | | omodel.HName = Ds.Tables[0].Rows[0]["HName"].ToString().Trim(); |
| | | omodel.HDate = Convert.ToDateTime(Ds.Tables[0].Rows[0]["HDate"].ToString().Trim()); |
| | |
| | | "',HProdWeight2='" + omodel.HProdWeight2.ToString() + |
| | | "',HProdWeight3='" + omodel.HProdWeight3.ToString() + |
| | | "',HBadNote='" + omodel.HBadNote.ToString() + |
| | | "',TestType='" + omodel.TestType.ToString() + |
| | | "' where HInterID=" + lngBillKey.ToString()); |
| | | //å é¤å
³è |
| | | DeleteRelation(ref sReturn, lngBillKey); |
| | |
| | | ",HYear,HPeriod,HRemark" + |
| | | ",HSourceID,HICMOInterID,HICMOEntryID,HICMOBillNo,HICMOQty,HProcExchInterID,HProcExchEntryID" + |
| | | ",HProcExchBillNo,HProcExchQty,HDeptID,HMaterID,HUnitID,HBatchNo,HCheckEmp,HProcID" + |
| | | ",HGroupID,HShiftsID,HQty,HSourceOrgID,HInspectOrgID,HSampleDamageQty,HBadNote,HProdWeight1,HProdWeight2,HProdWeight3" + |
| | | ",HGroupID,HShiftsID,HQty,HSourceOrgID,HInspectOrgID,HSampleDamageQty,HBadNote,HProdWeight1,HProdWeight2,HProdWeight3,TestType" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'," + omodel.HBillStatus.ToString() + ",getdate(),'" + DBUtility.ClsPub.CurUserName + "',getdate()" + |
| | | "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'" + |
| | | ",'" + omodel.HSourceID.ToString() + "','" + omodel.HICMOInterID.ToString() + "','" + omodel.HICMOEntryID.ToString() + "','" + omodel.HICMOBillNo.ToString() + "','" + omodel.HICMOQty.ToString() + "','" + omodel.HProcExchInterID.ToString() + "','" + omodel.HProcExchEntryID.ToString() + |
| | | "','" + omodel.HProcExchBillNo + "','" + omodel.HProcExchQty.ToString() + "','" + omodel.HDeptID.ToString() + "','" + omodel.HMaterID.ToString() + "','" + omodel.HUnitID.ToString() + "','" + omodel.HBatchNo.ToString() + |
| | | "','" + omodel.HCheckEmp.ToString() + "','" + omodel.HProcID.ToString() + "','" + omodel.HGroupID.ToString() + "','" + omodel.HShiftsID.ToString() + "','" + omodel.HQty.ToString() + "','" + omodel.HSourceOrgID.ToString() + "','" +omodel.HInspectOrgID.ToString()+ |
| | | "','" + omodel.HSampleDamageQty.ToString() + "','" + omodel.HBadNote + "','" + omodel.HProdWeight1.ToString() + "','" + omodel.HProdWeight2.ToString() + "','" + omodel.HProdWeight3.ToString() + "') "); |
| | | "','" + omodel.HSampleDamageQty.ToString() + "','" + omodel.HBadNote + "','" + omodel.HProdWeight1.ToString() + "','" + omodel.HProdWeight2.ToString() + "','" + omodel.HProdWeight3.ToString() + "','" + omodel.TestType.ToString() + "') "); |
| | | sReturn = "æ°å¢åæ®æåï¼"; |
| | | oCn.Commit(); |
| | | return true; |
| | |
| | | <Compile Include="WMS\ClsWMS_CusBarCodeCheckBillMain.cs" /> |
| | | <Compile Include="åºç¡èµæ\åºç¡èµæ\ClsGy_TechnologyParameterType_Model .cs" /> |
| | | <Compile Include="åºç¡èµæ\åºç¡èµæ\ClsGy_RestDay_Model.cs" /> |
| | | <Compile Include="ç产管ç\模å
·ç®¡ç\ClsSc_MouldMaintainPlanBillSub_Plan.cs" /> |
| | | <Compile Include="è´¨æ£ç®¡ç\ClsQC_MonthTarGetBillMain.cs" /> |
| | | <Compile Include="è´¨æ£ç®¡ç\ClsQC_MonthTarGetBillSub.cs" /> |
| | | <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSb_EquipRepairSignBillMain.cs" /> |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | |
| | | namespace Model |
| | | { |
| | | public class ClsSc_MouldMaintainPlanBillSub_Plan : DBUtility.ClsXt_BaseBillSub |
| | | { |
| | | //============ |
| | | |
| | | public string HPlanDate; // --è®¡åæ¥æ |
| | | public string HPlanBeginTime; //--计åå¼å§æ¶é´ç¹ï¼é»è®¤00ï¼00ï¼00ï¼ |
| | | public string HPlanEndTime; //--计åç»ææ¶é´ç¹ï¼é»è®¤23ï¼59ï¼59ï¼ |
| | | public string HSafeEndTime; //--å®å
¨ç»ææ¶é´ç¹ |
| | | public string HErrBeginTime; //--é¢è¦å¼å§æ¶é´ç¹ |
| | | public bool HRelationFlag; // --å
³èæ è®°ï¼æ¯å¦å·²çæä¿å
»è®°å½ï¼ |
| | | public bool HSendFlag; //æ¯å¦åéä¿¡æ¯ ï¼åéééï¼ |
| | | public int HErrBeginQty; //é¢è¦å¼å§æ¬¡æ° |
| | | public int HUseNowQty; //å½åä½¿ç¨æ¬¡æ° |
| | | public int HUseEndQty; //ç»æä½¿ç¨æ¬¡æ° |
| | | } |
| | | } |
| | |
| | | public Double HProdWeight1; //dec(18,8) --产ååé1(çé¢é»è®¤ä¸º0) |
| | | public Double HProdWeight2; //dec(18,8) --产ååé2(çé¢é»è®¤ä¸º0) |
| | | public Double HProdWeight3; //dec(18,8) --产ååé3(çé¢é»è®¤ä¸º0) |
| | | public string TestType; //dec(18,8) --产ååé3(çé¢é»è®¤ä¸º0) |
| | | |
| | | } |
| | | } |
| | |
| | | { |
| | | omodel.MES_StationOutBill_MustBeginWorkCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | |
| | | //=========åºç«æ±æ¥å |
| | | //èªå¨å®¡æ ¸ |
| | | if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "MES_StationOutBill_AutoCheck") |
| | | { |
| | | omodel.MES_StationOutBill_AutoCheck = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | //=========设å¤å·¥èºåæ°ç¹æ£ |
| | | if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "SB_EquipICMOTechParamBill_MustBeginWorkCtl") |
| | | { |
| | |
| | | { |
| | | omodel.YS_ReceiveBill_AutoCheck = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | |
| | | //=========è夿±æ¥å |
| | | //èªå¨å®¡æ ¸ |
| | | if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Pay_WorkTimesBill_AutoCheck") |
| | | { |
| | | omodel.Pay_WorkTimesBill_AutoCheck = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | |
| | | ////=========å·¥åºè¿ç«å |
| | | ////èªå¨å¹é
æµæ°´å· |
| | | //if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "MES_StationBill_ProcNo") |
| | |
| | | //æ¶æ¬¾å |
| | | public string YS_ReceiveBill_AutoCheck; //ä¿å忝å¦èªå¨å®¡æ ¸ |
| | | |
| | | //è夿±æ¥å |
| | | public string Pay_WorkTimesBill_AutoCheck; //ä¿å忝å¦èªå¨å®¡æ ¸ |
| | | |
| | | //䏿¨¡å |
| | | public string Sc_MouldLowerBill_MouldUpper; //å¿
é¡»å䏿¨¡åæè½çæä¸æ¨¡å |
| | | |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace SyntacticSugar.constant |
| | | { |
| | | public static class EmptyConstant |
| | | { |
| | | /// <summary> |
| | | /// 空 |
| | | /// </summary> |
| | | public static int EMPTY = 0; |
| | | } |
| | | } |
| | |
| | | D:\vs\项ç®ä»£ç \MES-WEB-API\MES-WEB-API\SyntacticSugar\bin\Debug\SyntacticSugar.dll |
| | | D:\vs\项ç®ä»£ç \MES-WEB-API\MES-WEB-API\SyntacticSugar\bin\Debug\SyntacticSugar.pdb |
| | | D:\vs\项ç®ä»£ç \MES-WEB-API\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.csproj.CoreCompileInputs.cache |
| | | D:\vs\项ç®ä»£ç \MES-WEB-API\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.dll |
| | | D:\vs\项ç®ä»£ç \MES-WEB-API\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.pdb |
| | | D:\vs\项ç®ä»£ç \MES-WEB-API\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.csproj.AssemblyReference.cache |
| | | E:\æºäºmes\mes\MES-WEB-API\SyntacticSugar\bin\Debug\SyntacticSugar.dll |
| | | E:\æºäºmes\mes\MES-WEB-API\SyntacticSugar\bin\Debug\SyntacticSugar.pdb |
| | | E:\æºäºmes\mes\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.csproj.CoreCompileInputs.cache |
| | | E:\æºäºmes\mes\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.dll |
| | | E:\æºäºmes\mes\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.pdb |
| | | <<<<<<< HEAD |
| | | E:\æºäºmes\mes\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.csproj.AssemblyReference.cache |
| | | ======= |
| | | C:\Users\86130\Desktop\æºäºè¿æ\MES-WEB-API\SyntacticSugar\bin\Debug\SyntacticSugar.dll |
| | | C:\Users\86130\Desktop\æºäºè¿æ\MES-WEB-API\SyntacticSugar\bin\Debug\SyntacticSugar.pdb |
| | | C:\Users\86130\Desktop\æºäºè¿æ\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.csproj.CoreCompileInputs.cache |
| | | C:\Users\86130\Desktop\æºäºè¿æ\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.dll |
| | | C:\Users\86130\Desktop\æºäºè¿æ\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.pdb |
| | | C:\Users\86130\Desktop\æºäºè¿æ\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.csproj.AssemblyReference.cache |
| | | >>>>>>> 9ebf0d1329b78732aa2f8d0ae0ebaf03d13ccb26 |
| | |
| | | Int64 HBadReasonID = 0; //ä¸è¯åå ID |
| | | string HCusMaterName = ""; //客æ·ç©æåç§° |
| | | string HCusModel = ""; //客æ·è§æ ¼åå· |
| | | string HBarCode_Pack = ""; //æçæ¡ç |
| | | |
| | | HBarCode = TM; |
| | | HBarCodeType = DBUtility.ClsPub.isStrNull(cmbHBarCodeType.Text); |
| | |
| | | HBadReasonID = DBUtility.ClsPub.isLong(txtHRemark.Tag); |
| | | HCusMaterName = DBUtility.ClsPub.isStrNull(txtHCusMaterName.Text); |
| | | HCusModel = DBUtility.ClsPub.isStrNull(txtHCusModel.Text); |
| | | HBarCode_Pack = DBUtility.ClsPub.isStrNull(txtHBarCode_Pack.Text); |
| | | |
| | | try |
| | | { |
| | |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HEndQty " + |
| | | ",HBarcodeQtys,HBarcodeNo,HDeptID,HWhID,HSPID,HRemark " + |
| | | ",HCusID,HCusType,HEndDate,HWorkLineName,HBarCodeDate,HMaterialJQty,HMaterialMQty,HNowQty " + |
| | | ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HGiveAwayFlag " + |
| | | ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HGiveAwayFlag,HBarCode_Pack " + |
| | | ",HOrderInterID,HOrderEntryID,HOrderBillNo,HCustomQty1,HMaterialModel,HCusModel " + |
| | | ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo,HLogo " + |
| | | ") Values (" |
| | |
| | | + ", " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "','" + HSourceBillType + "',''" |
| | | + ", 1," + HBarcodeNo.ToString() + "," + HDeptID.ToString() + "," + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HRemark + "'" |
| | | + ", 0,'',getdate(),'','" + sDate + "'," + HMaterialJQty.ToString() + "," + HMaterialMQty.ToString() + "," + HNowQty.ToString() |
| | | + ", " + HStockOrgID.ToString() + "," + HStockOrgID.ToString() + ",''," + HInterID.ToString() + ",0" |
| | | + ", " + HStockOrgID.ToString() + "," + HStockOrgID.ToString() + ",''," + HInterID.ToString() + ",0,'" + HBarCode_Pack + "'" |
| | | + ", " + HProcessExchangeInterID.ToString() + ",0,'" + HProcessExchangeBillNo + "'," + HBadReasonID.ToString() + ",'" + HCusMaterName + "','" + HCusModel + "'" |
| | | + ",'" + HMaterName + "','" + HMaterModel + "',''," + HAuxPropID.ToString() + ",'','','1')"); |
| | | |
| | |
| | | " Values(" |
| | | + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "'," + HMaterID.ToString() + "," + HAuxPropID.ToString() + ",0" |
| | | + "," + HWhID.ToString() + ",0," + HSPID.ToString() + ",0,0,''" |
| | | +",0," + HQty.ToString() + ",1,'" + HBatchNo + "','" + HBarCode + "',''" |
| | | +",'" + HMaker + "',getdate()," + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillType + "','" + HSourceBillNo + "'" |
| | | +",0," + HQty.ToString() + ",1,'" + HBatchNo + "','" + HBarCode + "','" + HBarCode_Pack + "'" |
| | | + ",'" + HMaker + "',getdate()," + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillType + "','" + HSourceBillNo + "'" |
| | | +",0,0,'',0,'',0" |
| | | +"," + HStockOrgID.ToString() + "," + HStockOrgID.ToString() + "," + HStockOrgID.ToString() + ",'','ç§°éå
¥åºçæ','2'" |
| | | +",0,0,'',0)"); |
| | |
| | | { |
| | | HRemark = HRemark + "ã" + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("æ¡ç ç¼å·")].Value); |
| | | } |
| | | if (DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("æ¡ç ç±»å")].Value) == "æçæ¡ç ") |
| | | { |
| | | MessageBox.Show("æéæ¡ç ç¼å·ï¼" + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("æ¡ç ç¼å·")].Value) + " 为æçæ¡ç ï¼ä¸å
许ä½åºï¼", "æç¤º"); |
| | | return; |
| | | } |
| | | } |
| | | if (HRemark != "") |
| | | { |
| | |
| | | string HItemID = ""; |
| | | string HBarCode = ""; |
| | | string HBarCode2 = ""; |
| | | string HBarCode_Pack = DBUtility.ClsPub.isStrNull(txtHBarCode_Pack.Text); |
| | | for (int i = 0; i <= grdMain.SelectedRows.Count - 1; i++) |
| | | { |
| | | HItemID = HItemID + "," + DBUtility.ClsPub.isLong(grdMain.SelectedRows[i].Cells[Fun_GetCol("hmainid")].Value.ToString()); |
| | |
| | | if (DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("ä½åºæ è®°")].Value) == "") |
| | | { |
| | | HRemark = HRemark + "ã" + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("æ¡ç ç¼å·")].Value); |
| | | } |
| | | if (DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("æ¡ç ç±»å")].Value) == "æçæ¡ç ") |
| | | { |
| | | MessageBox.Show("æéæ¡ç ç¼å·ï¼" + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("æ¡ç ç¼å·")].Value) + " 为æçæ¡ç ï¼ä¸å
许åä½åºï¼", "æç¤º"); |
| | | return; |
| | | } |
| | | if (DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("HBarCode_Pack")].Value) != "" |
| | | && DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("HBarCode_Pack")].Value) != HBarCode_Pack) |
| | | { |
| | | MessageBox.Show("æéæ¡ç ç¼å·ï¼" + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("æ¡ç ç¼å·")].Value) + " å·²çæå¯¹åºç»æåï¼ä¸å
许åä½åºï¼", "æç¤º"); |
| | | return; |
| | | } |
| | | } |
| | | if (HRemark != "") |
| | |
| | | ",HCusID,HDeptID,HCusBarCode,HMulSourceBill) " + |
| | | " select " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "',HMaterID,HAuxPropID,0" + |
| | | ",HWhID,0,HSPID,0,0,''" + |
| | | ",0,HQty,1,HBatchNo,HBarCode,''" + |
| | | ",0,HQty,1,HBatchNo,HBarCode,HBarCode_Pack" + |
| | | ",'" + HMaker + "',getdate(),HSourceInterID,HSourceEntryID,HSourceBillType,HSourceBillNo" + |
| | | ",0,0,'',0,'',0" + |
| | | ",HSTOCKORGID,HSTOCKORGID,HSTOCKORGID,'','ç§°éå
¥åºçæ-åä½åº','2'" + |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region //å¼å§ç»æ |
| | | private void cmdHBPack_Click(object sender, EventArgs e) |
| | | { |
| | | if (!PackSub_AllowSave()) |
| | | { |
| | | return; |
| | | } |
| | | SavePackBarCode(); |
| | | BarCode_Display(); |
| | | grdMain.Rows[0].Selected = true; |
| | | |
| | | txtHBarCode_Pack.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[grdMain.SelectedRows[0].Index].Cells[Fun_GetCol("æ¡ç ç¼å·")].Value); |
| | | cmdHBPack.Enabled = false; |
| | | |
| | | sBarCodeItemID = DBUtility.ClsPub.isLong(grdMain.Rows[grdMain.SelectedRows[0].Index].Cells[Fun_GetCol("HItemID")].Value).ToString(); |
| | | //èªå¨æå° |
| | | if (chkHDYFlag.Checked == true) |
| | | { |
| | | //æå°æ¡ç |
| | | Sub_SetReport("æçæ¡ç "); |
| | | Report.Print(false); |
| | | Thread.Sleep(1000); |
| | | } |
| | | else |
| | | { |
| | | //éæ©æå°æ¨¡æ¿ |
| | | BLL.Gy_OpenTmp oFrm = new BLL.Gy_OpenTmp(); |
| | | oFrm.sBillName = ModName; |
| | | oFrm.sBillModel = ModCaption; |
| | | oFrm.ShowDialog(); |
| | | if (oFrm.OKTag == Pub_Class.ClsPub.Enum_OKTag.OKTag_OK) |
| | | { |
| | | Sub_SetReport(oFrm.sOpenTmp); |
| | | Report.Print(false); |
| | | Thread.Sleep(1000); |
| | | } |
| | | } |
| | | } |
| | | |
| | | //æ¡ç çæå夿 |
| | | private bool PackSub_AllowSave() |
| | | { |
| | | //夿å½ååæ®IDæ¯å¦å·²ä¸ä¼ çæåæ® |
| | | DataSet Ds = oCn.RunProcReturn("select top 1 1 from KF_WeighSource_Temp with(nolock) where HInterID=" + HInterID.ToString() + " and HRelationInterID=1 ", "KF_WeighSource_Temp", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | } |
| | | else |
| | | { |
| | | MessageBox.Show("å½åæ¡ç è®°å½å·²æ¢çä¸ä¼ çæåæ®ï¼è¯·éåºåéæ°è¿å
¥è¯¥æ¨¡åè¿è¡æ¡ç çææä½ï¼", "æç¤º"); |
| | | return false; |
| | | } |
| | | |
| | | if (HInterID == 0 || HBillNo == "") |
| | | { |
| | | MessageBox.Show("è·åæ¡ç 对åºåæ®IDæåæ®å·å¤±è´¥ï¼è¯·éæ°å·æ°çé¢ï¼", "æç¤º"); |
| | | return false; |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | //çææçæ¡ç |
| | | private void SavePackBarCode() |
| | | { |
| | | int LSHlen = 6; //æµæ°´å·é¿åº¦ |
| | | Int64 LSH = 0; //æµæ°´å· |
| | | string LSH2 = ""; //æµæ°´å·è½¬æ¢æå符 |
| | | string sDate = ""; //æ¥æ |
| | | string sYear = ""; //å¹´ |
| | | string sPeriod = ""; //æ |
| | | string sDay = ""; //æ¥ |
| | | string sTMNumber = ""; //æ¡ç èªå®ä¹åç¼ |
| | | string TM = ""; //æ¡ç ç¼å· |
| | | DataSet Ds; |
| | | |
| | | //æ¥æè·åæ¹å¼ |
| | | sDate = dtpHDate.Value.ToShortDateString(); |
| | | sYear = DBUtility.ClsPub.isDate(sDate).Year.ToString().Substring(2, 2); |
| | | sPeriod = "0" + DBUtility.ClsPub.isDate(sDate).Month.ToString(); |
| | | sPeriod = sPeriod.Substring(sPeriod.Length - 2, 2); |
| | | sDay = "0" + DBUtility.ClsPub.isDate(sDate).Day.ToString(); |
| | | sDay = sDay.Substring(sDay.Length - 2, 2); |
| | | //================================== |
| | | //æ¡ç åç¼ = 'TP' + ç»ç»ä»£ç + å¹´ + æ + æ¥ |
| | | sTMNumber = "TP" + DBUtility.ClsPub.HOrgNumber + sYear + sPeriod + sDay; |
| | | Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· |
| | | LSH = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]); |
| | | LSH = LSH + 1; |
| | | LSH2 = LSH.ToString(); |
| | | while (LSH2.Length < LSHlen) //å¦ææµæ°´å·å°äº6使°åé¢è¡¥0 |
| | | { |
| | | LSH2 = "0" + LSH2; |
| | | } |
| | | TM = sTMNumber + LSH2; |
| | | |
| | | string HBarCode = ""; |
| | | string HBarCodeType = "æçæ¡ç "; |
| | | |
| | | HBarCode = TM; |
| | | HBarCodeType = ""; |
| | | |
| | | try |
| | | { |
| | | oCn.BeginTran(); |
| | | //åå
¥æ¡ç æ¡£æ¡ |
| | | oCn.RunProc("Insert into Gy_BarCodeBill " + |
| | | "(HBarCode,HBarCodeType,HMaterID,HUnitID,HQty,HBarCode_Pack" + |
| | | ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HinitQty" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HEndQty " + |
| | | ",HBarcodeQtys,HBarcodeNo,HDeptID,HWhID,HSPID,HRemark " + |
| | | ",HCusID,HCusType,HEndDate,HWorkLineName,HBarCodeDate,HMaterialJQty,HMaterialMQty,HNowQty " + |
| | | ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HGiveAwayFlag " + |
| | | ",HOrderInterID,HOrderEntryID,HOrderBillNo,HCustomQty1,HMaterialModel,HCusModel " + |
| | | ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo,HLogo " + |
| | | ") Values (" |
| | | + "'" + HBarCode + "','" + HBarCodeType + "',0,0,1,'" + HBarCode + "'" |
| | | + ",'',0,0,'" + HMaker + "',getdate(),0,1" |
| | | + ",0,0,'','',''" |
| | | + ",1,0,0,0,0,''" |
| | | + ", 0,'',getdate(),'','" + sDate + "',0,0,0" |
| | | + ", " + HStockOrgID.ToString() + "," + HStockOrgID.ToString() + ",''," + HInterID.ToString() + ",0" |
| | | + ", " + HProcessExchangeInterID.ToString() + ",0,'',0,'',''" |
| | | + ",'','','',0,'','','1')"); |
| | | |
| | | //åå¡«æå¤§æµæ°´å· |
| | | oCn.RunProc("exec h_p_WMS_SetMaxNo_QTY '" + sTMNumber + "',1 "); |
| | | oCn.Commit(); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCn.RollBack(); |
| | | MessageBox.Show("æçæ¡ç çæå¤±è´¥ï¼" + e.Message); |
| | | } |
| | | } |
| | | |
| | | |
| | | #endregion |
| | | |
| | | #region //ç»æç»æ |
| | | private void cmdHEPack_Click(object sender, EventArgs e) |
| | | { |
| | | string HBarCode_Pack = DBUtility.ClsPub.isStrNull(txtHBarCode_Pack.Text); |
| | | |
| | | //çæç»æåå夿 |
| | | if(HBarCode_Pack=="") |
| | | { |
| | | MessageBox.Show("请å
ç¹å»å¼å§ç»æï¼è¿è¡æ¡ç ç»ææä½ï¼", "æç¤º"); |
| | | return; |
| | | } |
| | | bool b = false; |
| | | for (int i = 0; i < grdMain.RowCount; i++) |
| | | { |
| | | if (DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[Fun_GetCol("æ¡ç ç±»å")].Value) == "å¯ä¸æ¡ç " |
| | | && DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[Fun_GetCol("HBarCode_Pack")].Value) == HBarCode_Pack) |
| | | { |
| | | b = true; |
| | | break; |
| | | } |
| | | } |
| | | if (b == false) |
| | | { |
| | | MessageBox.Show("å½åæçæ¡ç ä¸è¿æ²¡çæå¯¹åºæ¡ç ï¼ä¸å
许çæç»æåï¼", "æç¤º"); |
| | | return; |
| | | } |
| | | |
| | | //夿ä¼è®¡ææ¯å¦åç |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | MessageBox.Show(s, "æç¤º"); |
| | | return; |
| | | } |
| | | |
| | | try |
| | | { |
| | | oCn.BeginTran(); |
| | | //çæçäº§ç»æå |
| | | Int64 HPUInterID = DBUtility.ClsPub.CreateBillID_Prod("3783", ref DBUtility.ClsPub.sExeReturnInfo); //å¾å°ææ°çäº§ç»æåID |
| | | string HPUBillNo = DBUtility.ClsPub.CreateBillCode_Prod("3783", ref DBUtility.ClsPub.sExeReturnInfo, true); //å¾å°ææ°çäº§ç»æåå· |
| | | |
| | | //åå
¥çäº§ç»æå主表 |
| | | oCn.RunProc("Insert Into Sc_PackUnionBillMain " + |
| | | "(HInterID,HBillNo,HBillType,HBillSubType,HDate,HRemark" + |
| | | ",HYear,HPeriod,HChecker,HCheckDate,HMaker,HMakeDate" + |
| | | ",HICMOInterID,HICMOBillNo,HBarCode_Pack,HMaterID,HUnitID,HProdOrgID" + |
| | | ") Values (" |
| | | + " " + HPUInterID.ToString() + ",'" + HPUBillNo + "','3783','3783',convert(varchar(10),getdate(),120),''" |
| | | + "," + sYear.ToString() + "," + sPeriod.ToString() + ",'" + HMaker + "',getdate(),'" + HMaker + "',getdate()" |
| | | + ",0,'','" + HBarCode_Pack + "',0,0," + HStockOrgID.ToString() + ") "); |
| | | |
| | | //åå
¥ç产è£
ç®±åå表 |
| | | oCn.RunProc("Insert into Sc_PackUnionBillSub " + |
| | | "(HInterID,HEntryID,HRelationQty,HRelationMoney,HRemark" + |
| | | ",HMaterID,HUnitID,HQty,HBarCode,HBarCode_Pack,HScanDate" + |
| | | ",HAuxPropID,HBatchNo,HMTONo" + |
| | | ",HSourceID,HEquipID,HGroupID,HWorkerID,HStatus" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType) " + |
| | | " select " + HPUInterID.ToString() + ",HItemID,'0,0,''" + |
| | | ",HMaterID,HUnitID,HQty,HBarCode,HBarCode_Pack,getdate()" + |
| | | ",HAuxPropID,HBatchNo,HMTONo" + |
| | | ",0,0,0,0,0" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" + |
| | | "from Gy_BarCodeBill with(nolock) where HInterID=" + HInterID.ToString() + " and HBarCode_Pack='" + HBarCode_Pack + "' and HStopflag=0" |
| | | ); |
| | | |
| | | MessageBox.Show("çæçäº§ç»æåï¼" + HPUBillNo + " æåï¼", "æç¤º"); |
| | | |
| | | txtHBarCode_Pack.Text = ""; |
| | | cmdHBPack.Enabled = true; |
| | | oCn.Commit(); |
| | | return; |
| | | } |
| | | catch (Exception e2) |
| | | { |
| | | oCn.RollBack(); |
| | | MessageBox.Show("çæçäº§ç»æå失败ï¼" + e2.Message); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | |
| | | |
| | |
| | | fs.Close(); |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | { |
| | | this.components = new System.ComponentModel.Container(); |
| | | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Kf_WeighToBarCode)); |
| | | System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); |
| | | System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); |
| | | System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); |
| | | System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); |
| | | this.Tool = new System.Windows.Forms.ToolStrip(); |
| | | this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator(); |
| | | this.mrlk = new System.Windows.Forms.ToolStripButton(); |
| | |
| | | this.label4 = new System.Windows.Forms.Label(); |
| | | this.txtHMaterNumber = new System.Windows.Forms.TextBox(); |
| | | this.gbUp = new System.Windows.Forms.GroupBox(); |
| | | this.textBox_COM = new System.Windows.Forms.TextBox(); |
| | | this.label_COM = new System.Windows.Forms.Label(); |
| | | this.button_OpenCom = new System.Windows.Forms.Button(); |
| | | this.button_getHWeight = new System.Windows.Forms.Button(); |
| | | this.label17 = new System.Windows.Forms.Label(); |
| | | this.txtHOrderPickRemark = new System.Windows.Forms.TextBox(); |
| | | this.label15 = new System.Windows.Forms.Label(); |
| | |
| | | this.å³ä¾§ = new System.Windows.Forms.Panel(); |
| | | this.timer2 = new System.Windows.Forms.Timer(this.components); |
| | | this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker(); |
| | | this.button_getHWeight = new System.Windows.Forms.Button(); |
| | | this.button_OpenCom = new System.Windows.Forms.Button(); |
| | | this.label_COM = new System.Windows.Forms.Label(); |
| | | this.textBox_COM = new System.Windows.Forms.TextBox(); |
| | | this.cmdHBPack = new System.Windows.Forms.Button(); |
| | | this.cmdHEPack = new System.Windows.Forms.Button(); |
| | | this.label18 = new System.Windows.Forms.Label(); |
| | | this.txtHBarCode_Pack = new System.Windows.Forms.TextBox(); |
| | | this.Tool.SuspendLayout(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.grdMain)).BeginInit(); |
| | | this.gbUp.SuspendLayout(); |
| | |
| | | this.Tool.Location = new System.Drawing.Point(0, 0); |
| | | this.Tool.Name = "Tool"; |
| | | this.Tool.Padding = new System.Windows.Forms.Padding(0); |
| | | this.Tool.Size = new System.Drawing.Size(1924, 75); |
| | | this.Tool.Size = new System.Drawing.Size(1283, 50); |
| | | this.Tool.Stretch = true; |
| | | this.Tool.TabIndex = 16; |
| | | this.Tool.Text = "toolStrip1"; |
| | |
| | | // |
| | | this.toolStripSeparator9.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; |
| | | this.toolStripSeparator9.Name = "toolStripSeparator9"; |
| | | this.toolStripSeparator9.Size = new System.Drawing.Size(6, 75); |
| | | this.toolStripSeparator9.Size = new System.Drawing.Size(6, 50); |
| | | // |
| | | // mrlk |
| | | // |
| | |
| | | this.mrlk.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; |
| | | this.mrlk.ImageTransparentColor = System.Drawing.Color.White; |
| | | this.mrlk.Name = "mrlk"; |
| | | this.mrlk.Size = new System.Drawing.Size(86, 70); |
| | | this.mrlk.Size = new System.Drawing.Size(60, 47); |
| | | this.mrlk.Text = "é»è®¤å宽"; |
| | | this.mrlk.TextAlign = System.Drawing.ContentAlignment.BottomCenter; |
| | | this.mrlk.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; |
| | |
| | | // |
| | | this.toolStripSeparator7.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; |
| | | this.toolStripSeparator7.Name = "toolStripSeparator7"; |
| | | this.toolStripSeparator7.Size = new System.Drawing.Size(6, 75); |
| | | this.toolStripSeparator7.Size = new System.Drawing.Size(6, 50); |
| | | // |
| | | // bclk |
| | | // |
| | |
| | | this.bclk.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; |
| | | this.bclk.ImageTransparentColor = System.Drawing.Color.White; |
| | | this.bclk.Name = "bclk"; |
| | | this.bclk.Size = new System.Drawing.Size(86, 70); |
| | | this.bclk.Size = new System.Drawing.Size(60, 47); |
| | | this.bclk.Text = "ä¿åå宽"; |
| | | this.bclk.TextAlign = System.Drawing.ContentAlignment.BottomCenter; |
| | | this.bclk.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; |
| | |
| | | // |
| | | this.toolStripSeparator8.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; |
| | | this.toolStripSeparator8.Name = "toolStripSeparator8"; |
| | | this.toolStripSeparator8.Size = new System.Drawing.Size(6, 75); |
| | | this.toolStripSeparator8.Size = new System.Drawing.Size(6, 50); |
| | | // |
| | | // sx |
| | | // |
| | |
| | | // toolStripSeparator1 |
| | | // |
| | | this.toolStripSeparator1.Name = "toolStripSeparator1"; |
| | | this.toolStripSeparator1.Size = new System.Drawing.Size(6, 75); |
| | | this.toolStripSeparator1.Size = new System.Drawing.Size(6, 50); |
| | | // |
| | | // dy |
| | | // |
| | |
| | | // toolStripSeparator2 |
| | | // |
| | | this.toolStripSeparator2.Name = "toolStripSeparator2"; |
| | | this.toolStripSeparator2.Size = new System.Drawing.Size(6, 75); |
| | | this.toolStripSeparator2.Size = new System.Drawing.Size(6, 50); |
| | | // |
| | | // hb |
| | | // |
| | |
| | | // toolStripSeparator3 |
| | | // |
| | | this.toolStripSeparator3.Name = "toolStripSeparator3"; |
| | | this.toolStripSeparator3.Size = new System.Drawing.Size(6, 75); |
| | | this.toolStripSeparator3.Size = new System.Drawing.Size(6, 50); |
| | | // |
| | | // tc |
| | | // |
| | |
| | | // toolStripSeparator4 |
| | | // |
| | | this.toolStripSeparator4.Name = "toolStripSeparator4"; |
| | | this.toolStripSeparator4.Size = new System.Drawing.Size(6, 75); |
| | | this.toolStripSeparator4.Size = new System.Drawing.Size(6, 50); |
| | | // |
| | | // timer1 |
| | | // |
| | |
| | | this.grdMain.AllowUserToDeleteRows = false; |
| | | this.grdMain.BackgroundColor = System.Drawing.SystemColors.ControlLightLight; |
| | | this.grdMain.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; |
| | | dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; |
| | | dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; |
| | | dataGridViewCellStyle1.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; |
| | | dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; |
| | | dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; |
| | | dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; |
| | | this.grdMain.DefaultCellStyle = dataGridViewCellStyle1; |
| | | dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; |
| | | dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window; |
| | | dataGridViewCellStyle3.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText; |
| | | dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; |
| | | dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText; |
| | | dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False; |
| | | this.grdMain.DefaultCellStyle = dataGridViewCellStyle3; |
| | | this.grdMain.Dock = System.Windows.Forms.DockStyle.Fill; |
| | | this.grdMain.Location = new System.Drawing.Point(4, 4); |
| | | this.grdMain.Location = new System.Drawing.Point(3, 3); |
| | | this.grdMain.Margin = new System.Windows.Forms.Padding(0); |
| | | this.grdMain.Name = "grdMain"; |
| | | this.grdMain.ReadOnly = true; |
| | | this.grdMain.RowHeadersWidth = 51; |
| | | this.grdMain.RowTemplate.Height = 23; |
| | | this.grdMain.Size = new System.Drawing.Size(1472, 508); |
| | | this.grdMain.Size = new System.Drawing.Size(978, 334); |
| | | this.grdMain.TabIndex = 19; |
| | | this.grdMain.Paint += new System.Windows.Forms.PaintEventHandler(this.grdMain_Paint); |
| | | // |
| | |
| | | this.label2.AutoSize = true; |
| | | this.label2.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.label2.ForeColor = System.Drawing.Color.Black; |
| | | this.label2.Location = new System.Drawing.Point(663, 90); |
| | | this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); |
| | | this.label2.Location = new System.Drawing.Point(442, 60); |
| | | this.label2.Name = "label2"; |
| | | this.label2.Size = new System.Drawing.Size(80, 18); |
| | | this.label2.Size = new System.Drawing.Size(53, 12); |
| | | this.label2.TabIndex = 49; |
| | | this.label2.Text = "è§æ ¼åå·"; |
| | | // |
| | |
| | | // |
| | | this.txtHMaterModel.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.txtHMaterModel.ImeMode = System.Windows.Forms.ImeMode.NoControl; |
| | | this.txtHMaterModel.Location = new System.Drawing.Point(747, 84); |
| | | this.txtHMaterModel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); |
| | | this.txtHMaterModel.Location = new System.Drawing.Point(498, 56); |
| | | this.txtHMaterModel.Name = "txtHMaterModel"; |
| | | this.txtHMaterModel.ReadOnly = true; |
| | | this.txtHMaterModel.Size = new System.Drawing.Size(190, 28); |
| | | this.txtHMaterModel.Size = new System.Drawing.Size(128, 21); |
| | | this.txtHMaterModel.TabIndex = 50; |
| | | // |
| | | // label3 |
| | |
| | | this.label3.AutoSize = true; |
| | | this.label3.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.label3.ForeColor = System.Drawing.Color.Black; |
| | | this.label3.Location = new System.Drawing.Point(94, 222); |
| | | this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); |
| | | this.label3.Location = new System.Drawing.Point(63, 148); |
| | | this.label3.Name = "label3"; |
| | | this.label3.Size = new System.Drawing.Size(44, 18); |
| | | this.label3.Size = new System.Drawing.Size(29, 12); |
| | | this.label3.TabIndex = 52; |
| | | this.label3.Text = "夿³¨"; |
| | | // |
| | |
| | | // |
| | | this.txtHRemark.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.txtHRemark.ImeMode = System.Windows.Forms.ImeMode.NoControl; |
| | | this.txtHRemark.Location = new System.Drawing.Point(142, 216); |
| | | this.txtHRemark.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); |
| | | this.txtHRemark.Location = new System.Drawing.Point(95, 144); |
| | | this.txtHRemark.Name = "txtHRemark"; |
| | | this.txtHRemark.Size = new System.Drawing.Size(1056, 28); |
| | | this.txtHRemark.Size = new System.Drawing.Size(705, 21); |
| | | this.txtHRemark.TabIndex = 53; |
| | | // |
| | | // label4 |
| | |
| | | this.label4.AutoSize = true; |
| | | this.label4.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.label4.ForeColor = System.Drawing.Color.Black; |
| | | this.label4.Location = new System.Drawing.Point(58, 90); |
| | | this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); |
| | | this.label4.Location = new System.Drawing.Point(39, 60); |
| | | this.label4.Name = "label4"; |
| | | this.label4.Size = new System.Drawing.Size(80, 18); |
| | | this.label4.Size = new System.Drawing.Size(53, 12); |
| | | this.label4.TabIndex = 55; |
| | | this.label4.Text = "ç©æä»£ç "; |
| | | // |
| | |
| | | // |
| | | this.txtHMaterNumber.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.txtHMaterNumber.ImeMode = System.Windows.Forms.ImeMode.NoControl; |
| | | this.txtHMaterNumber.Location = new System.Drawing.Point(142, 84); |
| | | this.txtHMaterNumber.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); |
| | | this.txtHMaterNumber.Location = new System.Drawing.Point(95, 56); |
| | | this.txtHMaterNumber.Name = "txtHMaterNumber"; |
| | | this.txtHMaterNumber.ReadOnly = true; |
| | | this.txtHMaterNumber.Size = new System.Drawing.Size(190, 28); |
| | | this.txtHMaterNumber.Size = new System.Drawing.Size(128, 21); |
| | | this.txtHMaterNumber.TabIndex = 56; |
| | | // |
| | | // gbUp |
| | | // |
| | | this.gbUp.BackColor = System.Drawing.Color.Transparent; |
| | | this.gbUp.Controls.Add(this.label18); |
| | | this.gbUp.Controls.Add(this.txtHBarCode_Pack); |
| | | this.gbUp.Controls.Add(this.cmdHEPack); |
| | | this.gbUp.Controls.Add(this.cmdHBPack); |
| | | this.gbUp.Controls.Add(this.textBox_COM); |
| | | this.gbUp.Controls.Add(this.label_COM); |
| | | this.gbUp.Controls.Add(this.button_OpenCom); |
| | |
| | | this.gbUp.Controls.Add(this.label2); |
| | | this.gbUp.Dock = System.Windows.Forms.DockStyle.Top; |
| | | this.gbUp.Location = new System.Drawing.Point(0, 0); |
| | | this.gbUp.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); |
| | | this.gbUp.Name = "gbUp"; |
| | | this.gbUp.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4); |
| | | this.gbUp.Size = new System.Drawing.Size(1488, 392); |
| | | this.gbUp.Size = new System.Drawing.Size(992, 261); |
| | | this.gbUp.TabIndex = 58; |
| | | this.gbUp.TabStop = false; |
| | | // |
| | | // textBox_COM |
| | | // |
| | | this.textBox_COM.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.textBox_COM.ImeMode = System.Windows.Forms.ImeMode.NoControl; |
| | | this.textBox_COM.Location = new System.Drawing.Point(498, 112); |
| | | this.textBox_COM.Name = "textBox_COM"; |
| | | this.textBox_COM.Size = new System.Drawing.Size(128, 21); |
| | | this.textBox_COM.TabIndex = 329; |
| | | // |
| | | // label_COM |
| | | // |
| | | this.label_COM.AutoSize = true; |
| | | this.label_COM.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.label_COM.ForeColor = System.Drawing.Color.Black; |
| | | this.label_COM.Location = new System.Drawing.Point(472, 116); |
| | | this.label_COM.Name = "label_COM"; |
| | | this.label_COM.Size = new System.Drawing.Size(23, 12); |
| | | this.label_COM.TabIndex = 328; |
| | | this.label_COM.Text = "COM"; |
| | | // |
| | | // button_OpenCom |
| | | // |
| | | this.button_OpenCom.BackColor = System.Drawing.Color.White; |
| | | this.button_OpenCom.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.button_OpenCom.Location = new System.Drawing.Point(429, 222); |
| | | this.button_OpenCom.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); |
| | | this.button_OpenCom.Name = "button_OpenCom"; |
| | | this.button_OpenCom.Size = new System.Drawing.Size(86, 32); |
| | | this.button_OpenCom.TabIndex = 327; |
| | | this.button_OpenCom.Text = "æå¼ä¸²å£"; |
| | | this.button_OpenCom.UseVisualStyleBackColor = false; |
| | | this.button_OpenCom.Click += new System.EventHandler(this.button_OpenCom_Click); |
| | | // |
| | | // button_getHWeight |
| | | // |
| | | this.button_getHWeight.BackColor = System.Drawing.Color.White; |
| | | this.button_getHWeight.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.button_getHWeight.Location = new System.Drawing.Point(322, 222); |
| | | this.button_getHWeight.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); |
| | | this.button_getHWeight.Name = "button_getHWeight"; |
| | | this.button_getHWeight.Size = new System.Drawing.Size(86, 32); |
| | | this.button_getHWeight.TabIndex = 326; |
| | | this.button_getHWeight.Text = "ç§°é"; |
| | | this.button_getHWeight.UseVisualStyleBackColor = false; |
| | | this.button_getHWeight.Click += new System.EventHandler(this.button_getHWeight_Click); |
| | | // |
| | | // label17 |
| | | // |
| | | this.label17.AutoSize = true; |
| | | this.label17.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.label17.ForeColor = System.Drawing.Color.Black; |
| | | this.label17.Location = new System.Drawing.Point(22, 266); |
| | | this.label17.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); |
| | | this.label17.Location = new System.Drawing.Point(15, 177); |
| | | this.label17.Name = "label17"; |
| | | this.label17.Size = new System.Drawing.Size(116, 18); |
| | | this.label17.Size = new System.Drawing.Size(77, 12); |
| | | this.label17.TabIndex = 324; |
| | | this.label17.Text = "订åå
è£
夿³¨"; |
| | | // |
| | |
| | | this.txtHOrderPickRemark.Font = new System.Drawing.Font("å®ä½", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.txtHOrderPickRemark.ForeColor = System.Drawing.Color.Red; |
| | | this.txtHOrderPickRemark.ImeMode = System.Windows.Forms.ImeMode.NoControl; |
| | | this.txtHOrderPickRemark.Location = new System.Drawing.Point(142, 260); |
| | | this.txtHOrderPickRemark.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); |
| | | this.txtHOrderPickRemark.Location = new System.Drawing.Point(95, 173); |
| | | this.txtHOrderPickRemark.Multiline = true; |
| | | this.txtHOrderPickRemark.Name = "txtHOrderPickRemark"; |
| | | this.txtHOrderPickRemark.ReadOnly = true; |
| | | this.txtHOrderPickRemark.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; |
| | | this.txtHOrderPickRemark.Size = new System.Drawing.Size(1087, 64); |
| | | this.txtHOrderPickRemark.Size = new System.Drawing.Size(726, 44); |
| | | this.txtHOrderPickRemark.TabIndex = 325; |
| | | // |
| | | // label15 |
| | |
| | | this.label15.AutoSize = true; |
| | | this.label15.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.label15.ForeColor = System.Drawing.Color.Black; |
| | | this.label15.Location = new System.Drawing.Point(336, 174); |
| | | this.label15.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); |
| | | this.label15.Location = new System.Drawing.Point(224, 116); |
| | | this.label15.Name = "label15"; |
| | | this.label15.Size = new System.Drawing.Size(116, 18); |
| | | this.label15.Size = new System.Drawing.Size(77, 12); |
| | | this.label15.TabIndex = 322; |
| | | this.label15.Text = "客æ·è§æ ¼åå·"; |
| | | // |
| | |
| | | // |
| | | this.txtHCusModel.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.txtHCusModel.ImeMode = System.Windows.Forms.ImeMode.NoControl; |
| | | this.txtHCusModel.Location = new System.Drawing.Point(454, 168); |
| | | this.txtHCusModel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); |
| | | this.txtHCusModel.Location = new System.Drawing.Point(303, 112); |
| | | this.txtHCusModel.Name = "txtHCusModel"; |
| | | this.txtHCusModel.ReadOnly = true; |
| | | this.txtHCusModel.Size = new System.Drawing.Size(190, 28); |
| | | this.txtHCusModel.Size = new System.Drawing.Size(128, 21); |
| | | this.txtHCusModel.TabIndex = 323; |
| | | // |
| | | // label16 |
| | |
| | | this.label16.AutoSize = true; |
| | | this.label16.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.label16.ForeColor = System.Drawing.Color.Black; |
| | | this.label16.Location = new System.Drawing.Point(22, 174); |
| | | this.label16.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); |
| | | this.label16.Location = new System.Drawing.Point(15, 116); |
| | | this.label16.Name = "label16"; |
| | | this.label16.Size = new System.Drawing.Size(116, 18); |
| | | this.label16.Size = new System.Drawing.Size(77, 12); |
| | | this.label16.TabIndex = 320; |
| | | this.label16.Text = "客æ·ç©æåç§°"; |
| | | // |
| | |
| | | // |
| | | this.txtHCusMaterName.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.txtHCusMaterName.ImeMode = System.Windows.Forms.ImeMode.NoControl; |
| | | this.txtHCusMaterName.Location = new System.Drawing.Point(142, 168); |
| | | this.txtHCusMaterName.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); |
| | | this.txtHCusMaterName.Location = new System.Drawing.Point(95, 112); |
| | | this.txtHCusMaterName.Name = "txtHCusMaterName"; |
| | | this.txtHCusMaterName.ReadOnly = true; |
| | | this.txtHCusMaterName.Size = new System.Drawing.Size(190, 28); |
| | | this.txtHCusMaterName.Size = new System.Drawing.Size(128, 21); |
| | | this.txtHCusMaterName.TabIndex = 321; |
| | | // |
| | | // label13 |
| | |
| | | this.label13.AutoSize = true; |
| | | this.label13.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.label13.ForeColor = System.Drawing.Color.Black; |
| | | this.label13.Location = new System.Drawing.Point(993, 132); |
| | | this.label13.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); |
| | | this.label13.Location = new System.Drawing.Point(662, 88); |
| | | this.label13.Name = "label13"; |
| | | this.label13.Size = new System.Drawing.Size(44, 18); |
| | | this.label13.Size = new System.Drawing.Size(29, 12); |
| | | this.label13.TabIndex = 318; |
| | | this.label13.Text = "å
å·"; |
| | | // |
| | |
| | | // |
| | | this.txtHBarcodeNo.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.txtHBarcodeNo.ImeMode = System.Windows.Forms.ImeMode.NoControl; |
| | | this.txtHBarcodeNo.Location = new System.Drawing.Point(1040, 126); |
| | | this.txtHBarcodeNo.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); |
| | | this.txtHBarcodeNo.Location = new System.Drawing.Point(693, 84); |
| | | this.txtHBarcodeNo.Name = "txtHBarcodeNo"; |
| | | this.txtHBarcodeNo.Size = new System.Drawing.Size(190, 28); |
| | | this.txtHBarcodeNo.Size = new System.Drawing.Size(128, 21); |
| | | this.txtHBarcodeNo.TabIndex = 319; |
| | | // |
| | | // cmdHBadReasonID |
| | |
| | | this.cmdHBadReasonID.BackColor = System.Drawing.Color.Transparent; |
| | | this.cmdHBadReasonID.Image = ((System.Drawing.Image)(resources.GetObject("cmdHBadReasonID.Image"))); |
| | | this.cmdHBadReasonID.ImageAlign = System.Drawing.ContentAlignment.TopRight; |
| | | this.cmdHBadReasonID.Location = new System.Drawing.Point(1198, 214); |
| | | this.cmdHBadReasonID.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); |
| | | this.cmdHBadReasonID.Location = new System.Drawing.Point(799, 143); |
| | | this.cmdHBadReasonID.Name = "cmdHBadReasonID"; |
| | | this.cmdHBadReasonID.Size = new System.Drawing.Size(33, 33); |
| | | this.cmdHBadReasonID.Size = new System.Drawing.Size(22, 22); |
| | | this.cmdHBadReasonID.TabIndex = 317; |
| | | this.cmdHBadReasonID.UseVisualStyleBackColor = false; |
| | | this.cmdHBadReasonID.Click += new System.EventHandler(this.cmdHBadReasonID_Click); |
| | |
| | | // chkHDYFlag |
| | | // |
| | | this.chkHDYFlag.AutoSize = true; |
| | | this.chkHDYFlag.Location = new System.Drawing.Point(837, 354); |
| | | this.chkHDYFlag.Location = new System.Drawing.Point(558, 236); |
| | | this.chkHDYFlag.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); |
| | | this.chkHDYFlag.Name = "chkHDYFlag"; |
| | | this.chkHDYFlag.Size = new System.Drawing.Size(106, 22); |
| | | this.chkHDYFlag.Size = new System.Drawing.Size(72, 16); |
| | | this.chkHDYFlag.TabIndex = 316; |
| | | this.chkHDYFlag.Text = "èªå¨æå°"; |
| | | this.chkHDYFlag.UseVisualStyleBackColor = true; |
| | |
| | | // |
| | | this.cmdFZF.BackColor = System.Drawing.Color.White; |
| | | this.cmdFZF.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.cmdFZF.Location = new System.Drawing.Point(1094, 333); |
| | | this.cmdFZF.Location = new System.Drawing.Point(729, 222); |
| | | this.cmdFZF.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); |
| | | this.cmdFZF.Name = "cmdFZF"; |
| | | this.cmdFZF.Size = new System.Drawing.Size(129, 48); |
| | | this.cmdFZF.Size = new System.Drawing.Size(86, 32); |
| | | this.cmdFZF.TabIndex = 157; |
| | | this.cmdFZF.Text = "åä½åº"; |
| | | this.cmdFZF.UseVisualStyleBackColor = false; |
| | |
| | | // |
| | | this.cmdZF.BackColor = System.Drawing.Color.White; |
| | | this.cmdZF.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.cmdZF.Location = new System.Drawing.Point(952, 333); |
| | | this.cmdZF.Location = new System.Drawing.Point(635, 222); |
| | | this.cmdZF.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); |
| | | this.cmdZF.Name = "cmdZF"; |
| | | this.cmdZF.Size = new System.Drawing.Size(129, 48); |
| | | this.cmdZF.Size = new System.Drawing.Size(86, 32); |
| | | this.cmdZF.TabIndex = 156; |
| | | this.cmdZF.Text = "ä½åº"; |
| | | this.cmdZF.UseVisualStyleBackColor = false; |
| | |
| | | // |
| | | this.txtHDeptName.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.txtHDeptName.ImeMode = System.Windows.Forms.ImeMode.NoControl; |
| | | this.txtHDeptName.Location = new System.Drawing.Point(747, 42); |
| | | this.txtHDeptName.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); |
| | | this.txtHDeptName.Location = new System.Drawing.Point(498, 28); |
| | | this.txtHDeptName.Name = "txtHDeptName"; |
| | | this.txtHDeptName.ReadOnly = true; |
| | | this.txtHDeptName.Size = new System.Drawing.Size(190, 28); |
| | | this.txtHDeptName.Size = new System.Drawing.Size(128, 21); |
| | | this.txtHDeptName.TabIndex = 155; |
| | | // |
| | | // label12 |
| | |
| | | this.label12.AutoSize = true; |
| | | this.label12.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.label12.ForeColor = System.Drawing.Color.Black; |
| | | this.label12.Location = new System.Drawing.Point(699, 48); |
| | | this.label12.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); |
| | | this.label12.Location = new System.Drawing.Point(466, 32); |
| | | this.label12.Name = "label12"; |
| | | this.label12.Size = new System.Drawing.Size(44, 18); |
| | | this.label12.Size = new System.Drawing.Size(29, 12); |
| | | this.label12.TabIndex = 154; |
| | | this.label12.Text = "车é´"; |
| | | // |
| | |
| | | // |
| | | this.txtHBatchNo.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.txtHBatchNo.ImeMode = System.Windows.Forms.ImeMode.NoControl; |
| | | this.txtHBatchNo.Location = new System.Drawing.Point(1040, 84); |
| | | this.txtHBatchNo.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); |
| | | this.txtHBatchNo.Location = new System.Drawing.Point(693, 56); |
| | | this.txtHBatchNo.Name = "txtHBatchNo"; |
| | | this.txtHBatchNo.ReadOnly = true; |
| | | this.txtHBatchNo.Size = new System.Drawing.Size(190, 28); |
| | | this.txtHBatchNo.Size = new System.Drawing.Size(128, 21); |
| | | this.txtHBatchNo.TabIndex = 153; |
| | | // |
| | | // label11 |
| | |
| | | this.label11.AutoSize = true; |
| | | this.label11.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.label11.ForeColor = System.Drawing.Color.Black; |
| | | this.label11.Location = new System.Drawing.Point(993, 90); |
| | | this.label11.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); |
| | | this.label11.Location = new System.Drawing.Point(662, 60); |
| | | this.label11.Name = "label11"; |
| | | this.label11.Size = new System.Drawing.Size(44, 18); |
| | | this.label11.Size = new System.Drawing.Size(29, 12); |
| | | this.label11.TabIndex = 152; |
| | | this.label11.Text = "æ¹å·"; |
| | | // |
| | |
| | | this.label10.AutoSize = true; |
| | | this.label10.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.label10.ForeColor = System.Drawing.Color.Black; |
| | | this.label10.Location = new System.Drawing.Point(681, 132); |
| | | this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); |
| | | this.label10.Location = new System.Drawing.Point(454, 88); |
| | | this.label10.Name = "label10"; |
| | | this.label10.Size = new System.Drawing.Size(62, 18); |
| | | this.label10.Size = new System.Drawing.Size(41, 12); |
| | | this.label10.TabIndex = 150; |
| | | this.label10.Text = "æ£ç¹æ°"; |
| | | // |
| | |
| | | // |
| | | this.txtHKDQty.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.txtHKDQty.ImeMode = System.Windows.Forms.ImeMode.NoControl; |
| | | this.txtHKDQty.Location = new System.Drawing.Point(747, 126); |
| | | this.txtHKDQty.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); |
| | | this.txtHKDQty.Location = new System.Drawing.Point(498, 84); |
| | | this.txtHKDQty.Name = "txtHKDQty"; |
| | | this.txtHKDQty.Size = new System.Drawing.Size(190, 28); |
| | | this.txtHKDQty.Size = new System.Drawing.Size(128, 21); |
| | | this.txtHKDQty.TabIndex = 151; |
| | | // |
| | | // label9 |
| | |
| | | this.label9.AutoSize = true; |
| | | this.label9.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.label9.ForeColor = System.Drawing.Color.Black; |
| | | this.label9.Location = new System.Drawing.Point(408, 132); |
| | | this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); |
| | | this.label9.Location = new System.Drawing.Point(272, 88); |
| | | this.label9.Name = "label9"; |
| | | this.label9.Size = new System.Drawing.Size(44, 18); |
| | | this.label9.Size = new System.Drawing.Size(29, 12); |
| | | this.label9.TabIndex = 148; |
| | | this.label9.Text = "éé"; |
| | | // |
| | |
| | | // |
| | | this.txtHWeightQyt.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.txtHWeightQyt.ImeMode = System.Windows.Forms.ImeMode.NoControl; |
| | | this.txtHWeightQyt.Location = new System.Drawing.Point(454, 126); |
| | | this.txtHWeightQyt.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); |
| | | this.txtHWeightQyt.Location = new System.Drawing.Point(303, 84); |
| | | this.txtHWeightQyt.Name = "txtHWeightQyt"; |
| | | this.txtHWeightQyt.Size = new System.Drawing.Size(190, 28); |
| | | this.txtHWeightQyt.Size = new System.Drawing.Size(128, 21); |
| | | this.txtHWeightQyt.TabIndex = 149; |
| | | // |
| | | // label7 |
| | |
| | | this.label7.AutoSize = true; |
| | | this.label7.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.label7.ForeColor = System.Drawing.Color.Black; |
| | | this.label7.Location = new System.Drawing.Point(94, 132); |
| | | this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); |
| | | this.label7.Location = new System.Drawing.Point(63, 88); |
| | | this.label7.Name = "label7"; |
| | | this.label7.Size = new System.Drawing.Size(44, 18); |
| | | this.label7.Size = new System.Drawing.Size(29, 12); |
| | | this.label7.TabIndex = 146; |
| | | this.label7.Text = "ç±³æ°"; |
| | | // |
| | |
| | | // |
| | | this.txtHQty.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.txtHQty.ImeMode = System.Windows.Forms.ImeMode.NoControl; |
| | | this.txtHQty.Location = new System.Drawing.Point(142, 126); |
| | | this.txtHQty.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); |
| | | this.txtHQty.Location = new System.Drawing.Point(95, 84); |
| | | this.txtHQty.Name = "txtHQty"; |
| | | this.txtHQty.Size = new System.Drawing.Size(190, 28); |
| | | this.txtHQty.Size = new System.Drawing.Size(128, 21); |
| | | this.txtHQty.TabIndex = 147; |
| | | // |
| | | // label14 |
| | |
| | | this.label14.AutoSize = true; |
| | | this.label14.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.label14.ForeColor = System.Drawing.Color.Black; |
| | | this.label14.Location = new System.Drawing.Point(372, 90); |
| | | this.label14.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); |
| | | this.label14.Location = new System.Drawing.Point(248, 60); |
| | | this.label14.Name = "label14"; |
| | | this.label14.Size = new System.Drawing.Size(80, 18); |
| | | this.label14.Size = new System.Drawing.Size(53, 12); |
| | | this.label14.TabIndex = 144; |
| | | this.label14.Text = "ç©æåç§°"; |
| | | // |
| | |
| | | // |
| | | this.txtHMaterName.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.txtHMaterName.ImeMode = System.Windows.Forms.ImeMode.NoControl; |
| | | this.txtHMaterName.Location = new System.Drawing.Point(454, 84); |
| | | this.txtHMaterName.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); |
| | | this.txtHMaterName.Location = new System.Drawing.Point(303, 56); |
| | | this.txtHMaterName.Name = "txtHMaterName"; |
| | | this.txtHMaterName.ReadOnly = true; |
| | | this.txtHMaterName.Size = new System.Drawing.Size(190, 28); |
| | | this.txtHMaterName.Size = new System.Drawing.Size(128, 21); |
| | | this.txtHMaterName.TabIndex = 145; |
| | | // |
| | | // cmdSave |
| | | // |
| | | this.cmdSave.BackColor = System.Drawing.Color.White; |
| | | this.cmdSave.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.cmdSave.Location = new System.Drawing.Point(314, 333); |
| | | this.cmdSave.Location = new System.Drawing.Point(209, 222); |
| | | this.cmdSave.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); |
| | | this.cmdSave.Name = "cmdSave"; |
| | | this.cmdSave.Size = new System.Drawing.Size(129, 48); |
| | | this.cmdSave.Size = new System.Drawing.Size(86, 32); |
| | | this.cmdSave.TabIndex = 139; |
| | | this.cmdSave.Text = "ä¿å"; |
| | | this.cmdSave.UseVisualStyleBackColor = false; |
| | |
| | | this.label5.AutoSize = true; |
| | | this.label5.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.label5.ForeColor = System.Drawing.Color.Black; |
| | | this.label5.Location = new System.Drawing.Point(76, 48); |
| | | this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); |
| | | this.label5.Location = new System.Drawing.Point(51, 32); |
| | | this.label5.Name = "label5"; |
| | | this.label5.Size = new System.Drawing.Size(62, 18); |
| | | this.label5.Size = new System.Drawing.Size(41, 12); |
| | | this.label5.TabIndex = 142; |
| | | this.label5.Text = "åæ®å·"; |
| | | // |
| | |
| | | // |
| | | this.cmdSourceBillNo.BackColor = System.Drawing.Color.White; |
| | | this.cmdSourceBillNo.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.cmdSourceBillNo.Location = new System.Drawing.Point(153, 333); |
| | | this.cmdSourceBillNo.Location = new System.Drawing.Point(102, 222); |
| | | this.cmdSourceBillNo.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); |
| | | this.cmdSourceBillNo.Name = "cmdSourceBillNo"; |
| | | this.cmdSourceBillNo.Size = new System.Drawing.Size(129, 48); |
| | | this.cmdSourceBillNo.Size = new System.Drawing.Size(86, 32); |
| | | this.cmdSourceBillNo.TabIndex = 138; |
| | | this.cmdSourceBillNo.Text = "éå"; |
| | | this.cmdSourceBillNo.UseVisualStyleBackColor = false; |
| | |
| | | // |
| | | this.txtHBillNo.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.txtHBillNo.ImeMode = System.Windows.Forms.ImeMode.NoControl; |
| | | this.txtHBillNo.Location = new System.Drawing.Point(142, 42); |
| | | this.txtHBillNo.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); |
| | | this.txtHBillNo.Location = new System.Drawing.Point(95, 28); |
| | | this.txtHBillNo.Name = "txtHBillNo"; |
| | | this.txtHBillNo.ReadOnly = true; |
| | | this.txtHBillNo.Size = new System.Drawing.Size(190, 28); |
| | | this.txtHBillNo.Size = new System.Drawing.Size(128, 21); |
| | | this.txtHBillNo.TabIndex = 143; |
| | | // |
| | | // cmbHBarCodeType |
| | |
| | | this.cmbHBarCodeType.FormattingEnabled = true; |
| | | this.cmbHBarCodeType.Items.AddRange(new object[] { |
| | | "å¯ä¸æ¡ç "}); |
| | | this.cmbHBarCodeType.Location = new System.Drawing.Point(1040, 42); |
| | | this.cmbHBarCodeType.Location = new System.Drawing.Point(693, 28); |
| | | this.cmbHBarCodeType.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); |
| | | this.cmbHBarCodeType.Name = "cmbHBarCodeType"; |
| | | this.cmbHBarCodeType.Size = new System.Drawing.Size(190, 26); |
| | | this.cmbHBarCodeType.Size = new System.Drawing.Size(128, 20); |
| | | this.cmbHBarCodeType.TabIndex = 139; |
| | | // |
| | | // label8 |
| | |
| | | this.label8.AutoSize = true; |
| | | this.label8.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.label8.ForeColor = System.Drawing.Color.Black; |
| | | this.label8.Location = new System.Drawing.Point(957, 48); |
| | | this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); |
| | | this.label8.Location = new System.Drawing.Point(638, 32); |
| | | this.label8.Name = "label8"; |
| | | this.label8.Size = new System.Drawing.Size(80, 18); |
| | | this.label8.Size = new System.Drawing.Size(53, 12); |
| | | this.label8.TabIndex = 138; |
| | | this.label8.Text = "æ¡ç ç±»å"; |
| | | // |
| | |
| | | // |
| | | this.dtpHDate.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.dtpHDate.Format = System.Windows.Forms.DateTimePickerFormat.Short; |
| | | this.dtpHDate.Location = new System.Drawing.Point(454, 42); |
| | | this.dtpHDate.Location = new System.Drawing.Point(303, 28); |
| | | this.dtpHDate.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); |
| | | this.dtpHDate.Name = "dtpHDate"; |
| | | this.dtpHDate.Size = new System.Drawing.Size(190, 28); |
| | | this.dtpHDate.Size = new System.Drawing.Size(128, 21); |
| | | this.dtpHDate.TabIndex = 100; |
| | | // |
| | | // label6 |
| | |
| | | this.label6.AutoSize = true; |
| | | this.label6.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.label6.ForeColor = System.Drawing.Color.Black; |
| | | this.label6.Location = new System.Drawing.Point(408, 48); |
| | | this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); |
| | | this.label6.Location = new System.Drawing.Point(272, 32); |
| | | this.label6.Name = "label6"; |
| | | this.label6.Size = new System.Drawing.Size(44, 18); |
| | | this.label6.Size = new System.Drawing.Size(29, 12); |
| | | this.label6.TabIndex = 99; |
| | | this.label6.Text = "æ¥æ"; |
| | | // |
| | |
| | | this.grdSub.AllowUserToDeleteRows = false; |
| | | this.grdSub.BackgroundColor = System.Drawing.SystemColors.ControlLightLight; |
| | | this.grdSub.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; |
| | | dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; |
| | | dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window; |
| | | dataGridViewCellStyle2.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText; |
| | | dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; |
| | | dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; |
| | | dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; |
| | | this.grdSub.DefaultCellStyle = dataGridViewCellStyle2; |
| | | dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; |
| | | dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Window; |
| | | dataGridViewCellStyle4.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.ControlText; |
| | | dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; |
| | | dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; |
| | | dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; |
| | | this.grdSub.DefaultCellStyle = dataGridViewCellStyle4; |
| | | this.grdSub.Dock = System.Windows.Forms.DockStyle.Fill; |
| | | this.grdSub.Location = new System.Drawing.Point(0, 110); |
| | | this.grdSub.Location = new System.Drawing.Point(0, 73); |
| | | this.grdSub.Margin = new System.Windows.Forms.Padding(0); |
| | | this.grdSub.Name = "grdSub"; |
| | | this.grdSub.ReadOnly = true; |
| | | this.grdSub.RowHeadersWidth = 51; |
| | | this.grdSub.RowTemplate.Height = 23; |
| | | this.grdSub.Size = new System.Drawing.Size(386, 830); |
| | | this.grdSub.Size = new System.Drawing.Size(257, 554); |
| | | this.grdSub.TabIndex = 18; |
| | | this.grdSub.Paint += new System.Windows.Forms.PaintEventHandler(this.grdSub_Paint); |
| | | // |
| | |
| | | // |
| | | this.tabControl1.Controls.Add(this.tabPage1); |
| | | this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; |
| | | this.tabControl1.Location = new System.Drawing.Point(0, 392); |
| | | this.tabControl1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); |
| | | this.tabControl1.Location = new System.Drawing.Point(0, 261); |
| | | this.tabControl1.Name = "tabControl1"; |
| | | this.tabControl1.SelectedIndex = 0; |
| | | this.tabControl1.Size = new System.Drawing.Size(1488, 548); |
| | | this.tabControl1.Size = new System.Drawing.Size(992, 366); |
| | | this.tabControl1.TabIndex = 149; |
| | | // |
| | | // tabPage1 |
| | | // |
| | | this.tabPage1.Controls.Add(this.grdMain); |
| | | this.tabPage1.Location = new System.Drawing.Point(4, 28); |
| | | this.tabPage1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); |
| | | this.tabPage1.Location = new System.Drawing.Point(4, 22); |
| | | this.tabPage1.Name = "tabPage1"; |
| | | this.tabPage1.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4); |
| | | this.tabPage1.Size = new System.Drawing.Size(1480, 516); |
| | | this.tabPage1.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); |
| | | this.tabPage1.Size = new System.Drawing.Size(984, 340); |
| | | this.tabPage1.TabIndex = 0; |
| | | this.tabPage1.Text = "ç§°éè®°å½"; |
| | | this.tabPage1.UseVisualStyleBackColor = true; |
| | |
| | | this.panel1.Controls.Add(this.grdSub); |
| | | this.panel1.Controls.Add(this.groupBox1); |
| | | this.panel1.Dock = System.Windows.Forms.DockStyle.Left; |
| | | this.panel1.Location = new System.Drawing.Point(16, 75); |
| | | this.panel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); |
| | | this.panel1.Location = new System.Drawing.Point(11, 50); |
| | | this.panel1.Name = "panel1"; |
| | | this.panel1.Size = new System.Drawing.Size(386, 940); |
| | | this.panel1.Size = new System.Drawing.Size(257, 627); |
| | | this.panel1.TabIndex = 59; |
| | | // |
| | | // groupBox1 |
| | |
| | | this.groupBox1.Controls.Add(this.cmdOK); |
| | | this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top; |
| | | this.groupBox1.Location = new System.Drawing.Point(0, 0); |
| | | this.groupBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); |
| | | this.groupBox1.Name = "groupBox1"; |
| | | this.groupBox1.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4); |
| | | this.groupBox1.Size = new System.Drawing.Size(386, 110); |
| | | this.groupBox1.Size = new System.Drawing.Size(257, 73); |
| | | this.groupBox1.TabIndex = 146; |
| | | this.groupBox1.TabStop = false; |
| | | // |
| | |
| | | this.label1.AutoSize = true; |
| | | this.label1.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.label1.ForeColor = System.Drawing.Color.Black; |
| | | this.label1.Location = new System.Drawing.Point(16, 60); |
| | | this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); |
| | | this.label1.Location = new System.Drawing.Point(11, 40); |
| | | this.label1.Name = "label1"; |
| | | this.label1.Size = new System.Drawing.Size(62, 18); |
| | | this.label1.Size = new System.Drawing.Size(41, 12); |
| | | this.label1.TabIndex = 151; |
| | | this.label1.Text = "æ¡å½¢ç "; |
| | | // |
| | |
| | | // |
| | | this.txtHBarCode.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.txtHBarCode.ImeMode = System.Windows.Forms.ImeMode.NoControl; |
| | | this.txtHBarCode.Location = new System.Drawing.Point(86, 54); |
| | | this.txtHBarCode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); |
| | | this.txtHBarCode.Location = new System.Drawing.Point(57, 36); |
| | | this.txtHBarCode.Name = "txtHBarCode"; |
| | | this.txtHBarCode.Size = new System.Drawing.Size(188, 28); |
| | | this.txtHBarCode.Size = new System.Drawing.Size(127, 21); |
| | | this.txtHBarCode.TabIndex = 152; |
| | | this.txtHBarCode.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtHBarCode_KeyPress); |
| | | // |
| | |
| | | this.cmdOK.BackColor = System.Drawing.Color.White; |
| | | this.cmdOK.Cursor = System.Windows.Forms.Cursors.Default; |
| | | this.cmdOK.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.cmdOK.Location = new System.Drawing.Point(284, 50); |
| | | this.cmdOK.Location = new System.Drawing.Point(189, 33); |
| | | this.cmdOK.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); |
| | | this.cmdOK.Name = "cmdOK"; |
| | | this.cmdOK.Size = new System.Drawing.Size(82, 40); |
| | | this.cmdOK.Size = new System.Drawing.Size(55, 27); |
| | | this.cmdOK.TabIndex = 150; |
| | | this.cmdOK.Text = "确认"; |
| | | this.cmdOK.UseVisualStyleBackColor = false; |
| | |
| | | this.panel2.Controls.Add(this.tabControl1); |
| | | this.panel2.Controls.Add(this.gbUp); |
| | | this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; |
| | | this.panel2.Location = new System.Drawing.Point(418, 75); |
| | | this.panel2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); |
| | | this.panel2.Location = new System.Drawing.Point(279, 50); |
| | | this.panel2.Name = "panel2"; |
| | | this.panel2.Size = new System.Drawing.Size(1488, 940); |
| | | this.panel2.Size = new System.Drawing.Size(992, 627); |
| | | this.panel2.TabIndex = 60; |
| | | // |
| | | // 左侧 |
| | | // |
| | | this.左侧.Dock = System.Windows.Forms.DockStyle.Left; |
| | | this.左侧.Location = new System.Drawing.Point(0, 75); |
| | | this.左侧.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); |
| | | this.左侧.Location = new System.Drawing.Point(0, 50); |
| | | this.左侧.Name = "左侧"; |
| | | this.左侧.Size = new System.Drawing.Size(16, 940); |
| | | this.左侧.Size = new System.Drawing.Size(11, 627); |
| | | this.左侧.TabIndex = 61; |
| | | // |
| | | // ä¸é´ |
| | | // |
| | | this.ä¸é´.Dock = System.Windows.Forms.DockStyle.Left; |
| | | this.ä¸é´.Location = new System.Drawing.Point(402, 75); |
| | | this.ä¸é´.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); |
| | | this.ä¸é´.Location = new System.Drawing.Point(268, 50); |
| | | this.ä¸é´.Name = "ä¸é´"; |
| | | this.ä¸é´.Size = new System.Drawing.Size(16, 940); |
| | | this.ä¸é´.Size = new System.Drawing.Size(11, 627); |
| | | this.ä¸é´.TabIndex = 62; |
| | | // |
| | | // åºé¨ |
| | | // |
| | | this.åºé¨.Dock = System.Windows.Forms.DockStyle.Bottom; |
| | | this.åºé¨.Location = new System.Drawing.Point(0, 1015); |
| | | this.åºé¨.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); |
| | | this.åºé¨.Location = new System.Drawing.Point(0, 677); |
| | | this.åºé¨.Name = "åºé¨"; |
| | | this.åºé¨.Size = new System.Drawing.Size(1924, 15); |
| | | this.åºé¨.Size = new System.Drawing.Size(1283, 10); |
| | | this.åºé¨.TabIndex = 63; |
| | | // |
| | | // å³ä¾§ |
| | | // |
| | | this.å³ä¾§.Dock = System.Windows.Forms.DockStyle.Right; |
| | | this.å³ä¾§.Location = new System.Drawing.Point(1906, 75); |
| | | this.å³ä¾§.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); |
| | | this.å³ä¾§.Location = new System.Drawing.Point(1271, 50); |
| | | this.å³ä¾§.Name = "å³ä¾§"; |
| | | this.å³ä¾§.Size = new System.Drawing.Size(18, 940); |
| | | this.å³ä¾§.Size = new System.Drawing.Size(12, 627); |
| | | this.å³ä¾§.TabIndex = 64; |
| | | // |
| | | // timer2 |
| | | // |
| | | this.timer2.Tick += new System.EventHandler(this.timer2_Tick); |
| | | // |
| | | // button_getHWeight |
| | | // cmdHBPack |
| | | // |
| | | this.button_getHWeight.BackColor = System.Drawing.Color.White; |
| | | this.button_getHWeight.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.button_getHWeight.Location = new System.Drawing.Point(483, 333); |
| | | this.button_getHWeight.Name = "button_getHWeight"; |
| | | this.button_getHWeight.Size = new System.Drawing.Size(129, 48); |
| | | this.button_getHWeight.TabIndex = 326; |
| | | this.button_getHWeight.Text = "ç§°é"; |
| | | this.button_getHWeight.UseVisualStyleBackColor = false; |
| | | this.button_getHWeight.Click += new System.EventHandler(this.button_getHWeight_Click); |
| | | this.cmdHBPack.BackColor = System.Drawing.Color.White; |
| | | this.cmdHBPack.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.cmdHBPack.Location = new System.Drawing.Point(847, 40); |
| | | this.cmdHBPack.Margin = new System.Windows.Forms.Padding(2); |
| | | this.cmdHBPack.Name = "cmdHBPack"; |
| | | this.cmdHBPack.Size = new System.Drawing.Size(86, 32); |
| | | this.cmdHBPack.TabIndex = 330; |
| | | this.cmdHBPack.Text = "å¼å§ç»æ"; |
| | | this.cmdHBPack.UseVisualStyleBackColor = false; |
| | | this.cmdHBPack.Click += new System.EventHandler(this.cmdHBPack_Click); |
| | | // |
| | | // button_OpenCom |
| | | // cmdHEPack |
| | | // |
| | | this.button_OpenCom.BackColor = System.Drawing.Color.White; |
| | | this.button_OpenCom.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.button_OpenCom.Location = new System.Drawing.Point(644, 333); |
| | | this.button_OpenCom.Name = "button_OpenCom"; |
| | | this.button_OpenCom.Size = new System.Drawing.Size(129, 48); |
| | | this.button_OpenCom.TabIndex = 327; |
| | | this.button_OpenCom.Text = "æå¼ä¸²å£"; |
| | | this.button_OpenCom.UseVisualStyleBackColor = false; |
| | | this.button_OpenCom.Click += new System.EventHandler(this.button_OpenCom_Click); |
| | | this.cmdHEPack.BackColor = System.Drawing.Color.White; |
| | | this.cmdHEPack.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.cmdHEPack.Location = new System.Drawing.Point(847, 94); |
| | | this.cmdHEPack.Margin = new System.Windows.Forms.Padding(2); |
| | | this.cmdHEPack.Name = "cmdHEPack"; |
| | | this.cmdHEPack.Size = new System.Drawing.Size(86, 32); |
| | | this.cmdHEPack.TabIndex = 331; |
| | | this.cmdHEPack.Text = "ç»æç»æ"; |
| | | this.cmdHEPack.UseVisualStyleBackColor = false; |
| | | this.cmdHEPack.Click += new System.EventHandler(this.cmdHEPack_Click); |
| | | // |
| | | // label_COM |
| | | // label18 |
| | | // |
| | | this.label_COM.AutoSize = true; |
| | | this.label_COM.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.label_COM.ForeColor = System.Drawing.Color.Black; |
| | | this.label_COM.Location = new System.Drawing.Point(708, 171); |
| | | this.label_COM.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); |
| | | this.label_COM.Name = "label_COM"; |
| | | this.label_COM.Size = new System.Drawing.Size(35, 18); |
| | | this.label_COM.TabIndex = 328; |
| | | this.label_COM.Text = "COM"; |
| | | this.label18.AutoSize = true; |
| | | this.label18.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.label18.ForeColor = System.Drawing.Color.Black; |
| | | this.label18.Location = new System.Drawing.Point(638, 116); |
| | | this.label18.Name = "label18"; |
| | | this.label18.Size = new System.Drawing.Size(53, 12); |
| | | this.label18.TabIndex = 332; |
| | | this.label18.Text = "æçæ¡ç "; |
| | | // |
| | | // textBox_COM |
| | | // txtHBarCode_Pack |
| | | // |
| | | this.textBox_COM.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.textBox_COM.ImeMode = System.Windows.Forms.ImeMode.NoControl; |
| | | this.textBox_COM.Location = new System.Drawing.Point(747, 168); |
| | | this.textBox_COM.Margin = new System.Windows.Forms.Padding(4); |
| | | this.textBox_COM.Name = "textBox_COM"; |
| | | this.textBox_COM.Size = new System.Drawing.Size(190, 28); |
| | | this.textBox_COM.TabIndex = 329; |
| | | this.txtHBarCode_Pack.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.txtHBarCode_Pack.ImeMode = System.Windows.Forms.ImeMode.NoControl; |
| | | this.txtHBarCode_Pack.Location = new System.Drawing.Point(693, 112); |
| | | this.txtHBarCode_Pack.Name = "txtHBarCode_Pack"; |
| | | this.txtHBarCode_Pack.ReadOnly = true; |
| | | this.txtHBarCode_Pack.Size = new System.Drawing.Size(128, 21); |
| | | this.txtHBarCode_Pack.TabIndex = 333; |
| | | // |
| | | // Kf_WeighToBarCode |
| | | // |
| | | this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F); |
| | | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); |
| | | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
| | | this.AutoSize = true; |
| | | this.BackColor = System.Drawing.SystemColors.ActiveCaption; |
| | | this.ClientSize = new System.Drawing.Size(1924, 1030); |
| | | this.ClientSize = new System.Drawing.Size(1283, 687); |
| | | this.Controls.Add(this.panel2); |
| | | this.Controls.Add(this.ä¸é´); |
| | | this.Controls.Add(this.panel1); |
| | |
| | | this.Controls.Add(this.å³ä¾§); |
| | | this.Controls.Add(this.åºé¨); |
| | | this.Controls.Add(this.Tool); |
| | | this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); |
| | | this.Name = "Kf_WeighToBarCode"; |
| | | this.Text = "ç§°éå
¥åº"; |
| | | this.WindowState = System.Windows.Forms.FormWindowState.Maximized; |
| | |
| | | private System.Windows.Forms.Button button_OpenCom; |
| | | private System.Windows.Forms.TextBox textBox_COM; |
| | | private System.Windows.Forms.Label label_COM; |
| | | private System.Windows.Forms.Button cmdHEPack; |
| | | private System.Windows.Forms.Button cmdHBPack; |
| | | private System.Windows.Forms.Label label18; |
| | | private System.Windows.Forms.TextBox txtHBarCode_Pack; |
| | | } |
| | | } |
| | |
| | | <data name="mrlk.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
| | | <value> |
| | | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 |
| | | YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAH/SURBVDhPfZHfS1NhGMefkCLQu/A/6MK6SbMQFlg3dudN |
| | | YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAH/SURBVDhPfZHfS1NhGMefkCLQu/A/6MK6SbMQFlg3dudN |
| | | oBFDY9BF05XMMAoLL3bhxGB4zjzoVCKim4iCgkCMSam1cqP9aO4YJlpIDmqh00IRv73Pe87OWuV54Mt7 |
| | | znm/n895z0aF8Stj6FdGoARDUAf/H97jTp96FyZmjC8QwuRUBB0zACkiwT0i9rxvgBcvX4MZEye65Vex |
| | | vp6HJ7yJ+1nYpmNyE3nRZcbEiW74AljL5UB3gOk84J8HnFPA0UfirZqIaoZPMQDZZcbEibp6+vE9mwUF |
| | |
| | | <data name="bclk.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
| | | <value> |
| | | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 |
| | | YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAH4SURBVDhPjZPNS1RRGMZfI2jRLlqUEKLUQgsl3EauEoRW |
| | | YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAH4SURBVDhPjZPNS1RRGMZfI2jRLlqUEKLUQgsl3EauEoRW |
| | | /QN+phG4CQXTNrPLbzFrpZAuBIfEqChctFRndHI0YzKnxkHFYQgH50NH5+o8Pm/HwQ/s4oGHc++5z/O7 |
| | | 77nnvSKPPZDyKYSfA8tN55N6NfMvK1XT+LIBxAH8PqfUqxnNitR+g1x/yQuRlJWCZVm2Uo965RozmpXq |
| | | aRR/Io1jYgJwTdlLPeqt92QqqHLj7phZTCST2Nqxl3rUWzrOTKX7JGBykm9x2Us96r3p1ApOAf5G49iI |
| | |
| | | <data name="sx.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
| | | <value> |
| | | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 |
| | | YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAFtSURBVDhPtVPLTsJAFOUj+kV+gWv9CaAWBApoITzER6UJ |
| | | YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAFtSURBVDhPtVPLTsJAFOUj+kV+gWv9CaAWBApoITzER6UJ |
| | | EYMuNLIiigkaCKAGEhWN78ToQqMLTTS60I3GzXHu2CpxCsGFJ5l0eu8959y50zr+DcrYAPoH+4RFcbOk |
| | | M6jQaIXReDFQf9JRuptA4SqJhfMYAqUhSJLUWYTIe28ZHHzM8GeTiVQedRRvUli6iCN3rCHNxG1FqD1y |
| | | JvIZZvmeCq1F7nMnER6nvXAccm+8Gmi9Z77JZorDEknvhhDfCohdkED9eZqfXUiaoBp9O4jYhs9eoHQ/ |
| | |
| | | <data name="dy.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
| | | <value> |
| | | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 |
| | | YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAADmSURBVDhPlY6xDYMwFES9U3bKCmzACEh0FJmACRiAnoqK |
| | | YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADmSURBVDhPlY6xDYMwFES9U3bKCmzACEh0FJmACRiAnoqK |
| | | jo6OzvH7yVk/OFHg0MnC/vfuhzOq6zrK76vzIrRtm3nf92sgBpdlieu6ZgCe5xmAXEot0zTZMABBXLiU |
| | | grRUVRWHYTATYpOfYR9kiGbMnQelUTu5wzmsoDWk796GOI6jGRDDzH0BxAyQ1Z5e4xhuGUSQWbkAaE2B |
| | | FMRN05h9uAD4JoHato1d9yjCOjOAH9Y+QggDOW5gwZdfEgR7iAf4YG53yq0eBADzjlWk/+QP2WXf9xmk |
| | |
| | | <data name="hb.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
| | | <value> |
| | | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 |
| | | YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAGgSURBVDhPlZPPK8NhHMc/5T7tRM0cOCAHJXGbxQ7c/AEc |
| | | YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGgSURBVDhPlZPPK8NhHMc/5T7tRM0cOCAHJXGbxQ7c/AEc |
| | | d1EcjEwytSiH4SZcRHLQ7FemtlJDOPiZml8XSzMWMz9mK7Xevs/z7DvDzLzr9X2253k+r8+nvn0pM10t |
| | | hGykjnMndRE1ZWJlVKvF+qdErytIF/1G6k72sMPTBULIRcCF4H2bcOMknC8SNsb/IXheJ8R8hAfPPwUH |
| | | M4Qz6fKVlXBtJwRWxP99aX/NnKfgcJZwMkfwS9OwdW86TwFLc6MGmxPE2Zok+CwCzwjB5XDkLpbDJHYj |
| | |
| | | <data name="tc.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
| | | <value> |
| | | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 |
| | | YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAADCSURBVDhPpZJdCoMwEIRzpxxJ6Ak2z/ZZnysIBXuUHMA7 |
| | | YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADCSURBVDhPpZJdCoMwEIRzpxxJ6Ak2z/ZZnysIBXuUHMA7 |
| | | bXeWrGBMYkoHh+gk8xl/XEneP7jXqXIWJkIgHscnT/PEy2vhz7ZhMQ/Dm5l3ObRcB1ACzAKQ6FTcV69G |
| | | rgWTbUl3QFQtFgGpfAAoAVDOi2ZbrwW5hwY4N+P6FmDlkrsBq6zOy3AXIEkhGHMbIMaorgGgI8Cu7CsY |
| | | wOZbAEgDBch/gOveRzgJAKLwH0CGJsDmxU1dAMiSu3R5iZr+oJuic1+SJ5jRbOqnmgAAAABJRU5ErkJg |
| | |
| | | } |
| | | |
| | | string sql1 = "select * from h_v_Gy_CusType where 1 = 1"; |
| | | string sql = sql1 + sWhere + " order by HNumber "; |
| | | string sql = sql1 + sWhere; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_CusType"); |
| | | |
| | | //æ·»å åå |
| | |
| | | #endregion |
| | | |
| | | #region æ ¡éªé¡¹ç®å表 æä»¶ä¸ä¼ |
| | | [Route("Gy_CheckItem/Gy_Process_Excel")] |
| | | [Route("Gy_CheckItem/Gy_CheckItem_Excel")] |
| | | [HttpPost] |
| | | public json Gy_Process_Excel() |
| | | public json Gy_CheckItem_Excel() |
| | | { |
| | | json res = new json(); |
| | | try |
| | |
| | | |
| | | //模æ¿ç¼ºå°å ä½éè¦ä»æ°æ®åºä¸æ¥è¯¢åºæ¥æ¾ç¤ºå¨é¡µé¢çåæ®µ |
| | | provisional.Columns.Add("HOrgID", typeof(Int32));//ç»ç»ID |
| | | provisional.Columns.Add("HDeptID", typeof(Int32));//é¨é¨ID |
| | | provisional.Columns.Add("HQCCheckClassID", typeof(Int32));//æ£éªé¡¹ç®åç±»ID |
| | | |
| | | //æ·»å æ°æ® |
| | | for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++) |
| | |
| | | |
| | | for (int i = 0; i <= provisional.Rows.Count - 1; i++) |
| | | { |
| | | string HNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["代ç "].ToString()); |
| | | string HUSEORGID = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["ç»ç»ä»£ç "].ToString()); |
| | | string HQCCheckClassID = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["æ£éªé¡¹ç®ç±»å«ä»£ç "].ToString()); |
| | | string HQCCheckClassName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["æ£éªé¡¹ç®ç±»å«åç§°"].ToString()); |
| | | string HName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["åç§°"].ToString()); |
| | | string HCheckItemName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["æ£éªé¡¹ç®"].ToString()); |
| | | string HCheckItemNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["æ£éªé¡¹ç®ä»£ç "].ToString()); |
| | | string HQCCheckClassName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["æ£éªé¡¹ç®åç±»"].ToString()); |
| | | string HQCCheckClassNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["æ£éªé¡¹ç®å类代ç "].ToString()); |
| | | string HORGNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["ç»ç»ä»£ç "].ToString()); |
| | | string HORGName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["ç»ç»åç§°"].ToString()); |
| | | string HHelpCode = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["å©è®°ç "]); |
| | | string HRemark = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["夿³¨"].ToString()); |
| | | |
| | | //è·åçå®è¡æ° |
| | | int line = i + 1; |
| | | |
| | | if (HUSEORGID != "") |
| | | if (HORGNumber != "") |
| | | { |
| | | //æ¥è¯¢ç»ç» |
| | | ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where HNumber='" + HUSEORGID + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS"); |
| | | ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | |
| | | } |
| | | string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | |
| | | //æ¥è¯¢æ£éªé¡¹ç®æ¯å¦åå¨ |
| | | DataSet checkClass = oCN.RunProcReturn("select * from Gy_QCCheckClass where HNumber = '" + HQCCheckClassID + "' and HName = '" + HQCCheckClassName + "'", "Gy_QCCheckClass"); |
| | | //æ¥è¯¢æ£éªé¡¹ç®åç±»æ¯å¦åå¨ |
| | | DataSet checkClass = oCN.RunProcReturn("select * from Gy_QCCheckClass where HNumber = '" + HQCCheckClassNumber + "' and HName = '" + HQCCheckClassName + "'", "Gy_QCCheckClass"); |
| | | if (checkClass.Tables[0].Rows.Count == 0) |
| | | { |
| | | res.code = CodeConstant.FAIL; |
| | |
| | | res.Message = "第" + line + "è¡,æ£éªé¡¹ç®ä¸åå¨ï¼"; |
| | | res.data = null; |
| | | return res; |
| | | } |
| | | else |
| | | { |
| | | provisional.Rows[i]["HQCCheckClassID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | } |
| | | else |
| | |
| | | if (!provisional.Columns.Contains("ç»ç»ä»£ç ")) |
| | | error += "æ²¡ææ¾å°ãç»ç»ä»£ç ãçæ é¢,"; |
| | | |
| | | if(!provisional.Columns.Contains("æ£éªé¡¹ç®ç±»å«åç§°")) |
| | | error += "æ²¡ææ¾å°ãæ£éªé¡¹ç®ç±»å«åç§°ãçæ é¢,"; |
| | | if(!provisional.Columns.Contains("æ£éªé¡¹ç®å类代ç ")) |
| | | error += "æ²¡ææ¾å°ãæ£éªé¡¹ç®å类代ç ãçæ é¢,"; |
| | | |
| | | if (!provisional.Columns.Contains("ç»ç»åç§°")) |
| | | error += "æ²¡ææ¾å°ãç»ç»åç§°ãçæ é¢,"; |
| | | |
| | | if (!provisional.Columns.Contains("æ£éªé¡¹ç®åç±»")) |
| | | error += "æ²¡ææ¾å°ãæ£éªé¡¹ç®åç±»ãçæ é¢,"; |
| | | |
| | | if (!provisional.Columns.Contains("æ£éªé¡¹ç®")) |
| | | error += "æ²¡ææ¾å°ãæ£éªé¡¹ç®ãçæ é¢,"; |
| | | |
| | | if (!provisional.Columns.Contains("æ£éªé¡¹ç®ä»£ç ")) |
| | | error += "æ²¡ææ¾å°ãæ£éªé¡¹ç®ä»£ç ãçæ é¢,"; |
| | | |
| | | if (!provisional.Columns.Contains("å©è®°ç ")) |
| | | error += "æ²¡ææ¾å°ãå©è®°ç ãçæ é¢,"; |
| | | |
| | | if (!provisional.Columns.Contains("夿³¨")) |
| | | error += "æ²¡ææ¾å°ã夿³¨ãçæ é¢,"; |
| | | return error; |
| | | } |
| | | #endregion |
| | | |
| | | #region æ ¡éªé¡¹ç®å表 导å
¥(ä¿å) |
| | | [Route("Gy_CheckItem/Gy_Process_btnSave")] |
| | | [Route("Gy_CheckItem/Gy_CheckItem_btnSave")] |
| | | [HttpPost] |
| | | public object Gy_Group_btnSave([FromBody] JObject sMainSub) |
| | | { |
| | |
| | | string user = sArray[1].ToString(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_Group_Edit", 1, false, user)) |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_QCCheckItem_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | int i = 1; |
| | | foreach (Dictionary<string, string> item in list) |
| | | { |
| | | string HNumber = item["代ç "].ToString(); |
| | | string HUSEORGID = item["ç»ç»ä»£ç "].ToString(); |
| | | string HName = item["åç§°"].ToString(); |
| | | string HORGName = item["ç»ç»åç§°"].ToString(); |
| | | string HNumber = item["æ£éªé¡¹ç®ä»£ç "].ToString(); |
| | | string HUSEORGID = item["HOrgID"].ToString(); |
| | | string HName = item["æ£éªé¡¹ç®"].ToString(); |
| | | string HHelpCode = item["å©è®°ç "]; |
| | | string HQCCheckClassID = item["æ£éªé¡¹ç®ç±»å«ä»£ç "]; |
| | | string HQCCheckClassID = item["HQCCheckClassID"]; |
| | | string HRemark = item["夿³¨"].ToString(); |
| | | |
| | | string sShortNumber; |
| | |
| | | using System.Web.Http; |
| | | using WebAPI.Models; |
| | | using System.Text.RegularExpressions; |
| | | using SyntacticSugar.constant; |
| | | using System.Web; |
| | | using WebAPI.Controllers.SCGL.æ¥è®¡å管ç; |
| | | //using WebAPI.WebBLL.JCJM.GYZL; |
| | | //using WebAPI.WebBLL.JCJM.IMPL; |
| | | using System.IO; |
| | | namespace WebAPI.Controllers |
| | | { |
| | | public class Gy_CustomerController : ApiController |
| | |
| | | |
| | | private json objJsonResult = new json(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | //private Gy_CustomerService customerService = new Gy_CustomerImpl(); |
| | | DataSet ds; |
| | | |
| | | |
| | | #region è¿å客æ·å表 |
| | | /// <summary> |
| | | /// è¿å客æ·å表 |
| | | ///åæ°ï¼string sqlã |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 客æ·å表[å
³èç¨æ·] æ¥è¯¢ |
| | | /// <summary> |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 客æ·åè¡¨ä¿®æ¹æé®æ¹æ³ |
| | | /// <summary> |
| | | /// 客æ·åè¡¨ä¿®æ¹æé®æ¹æ³ |
| | | ///åæ°ï¼string sqlã |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region è·åå½åæå¤§ç客æ·ä»£ç |
| | | [Route("Gy_Customer/getMaxCusNumber")] |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region è·åæå¤§èµæIDåæ° |
| | | /// <summary> |
| | | /// è·åæå¤§åºç¡èµæID |
| | | ///åæ°ï¼string sqlã |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å®¢æ·æ ¹æ®åç±»è·åæå¤§å®¢æ·ç¼ç |
| | | [Route("Gy_Customer/getMaxNum")] |
| | |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region 客æ·å表æ å½¢ç»æ |
| | | /// <summary> |
| | | /// 客æ·å表æ å½¢ç»æ |
| | | ///åæ°ï¼string sqlã |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region æ°å¢åæ® |
| | | /// <summary> |
| | | /// æ°å¢åæ®-ä¿åæé® |
| | | ///åæ°ï¼string sqlã |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region ä¿å客æ·å表 |
| | | /// <summary> |
| | | /// ä¿å客æ·å表 |
| | | /// </summary> |
| | | /// <param name="oMain"></param> |
| | | /// <returns></returns> |
| | | [Route("Gy_Customer/SaveGy_CustomerListApi")] |
| | | [HttpPost] |
| | | public object SaveGy_CustomerListApi([FromBody] JObject oMain) |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region ä¿®æ¹åæ®-ä¿åæé® |
| | | /// <summary> |
| | | /// ä¿®æ¹åæ®-ä¿åæé® |
| | | ///åæ°ï¼string sqlã |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | # region 客æ·å表å é¤æé® |
| | | /// <summary> |
| | | /// 客æ·å表å é¤æé® |
| | | ///åæ°ï¼string sqlã |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 客æ·å®¡æ ¸ãåå®¡æ ¸ |
| | | /// <summary> |
| | |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region [忥åºç¡èµæ] |
| | | [Route("Gy_Customer/Gy_CustomerViewApi")] |
| | | [HttpGet] |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 客æ·åç±» æ å½¢å¾(æ ¹æ®ä»£ç å±å¼æ ç¶å¾) |
| | | #region 客æ·åç±» æ å½¢å¾(æ ¹æ®ä»£ç å±å¼æ ç¶å¾) |
| | | |
| | | [Route("Gy_BadReason/Gy_CusrTypeTreeList")] |
| | | [HttpGet] |
| | |
| | | { |
| | | try |
| | | { |
| | | string sql1 = string.Format("select hitemid,hnumber,hname,hparentid,hlevel from Gy_CusType order by hnumber"); |
| | | string sql1 = string.Format("select hitemid,hnumber,hname,hparentid,hlevel from Gy_CusType order by hnumber "); |
| | | |
| | | ds = oCN.RunProcReturn(sql1, "Gy_CusType"); |
| | | |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 客æ·å表 æä»¶ä¸ä¼ |
| | | //[Route("Gy_Customer/Gy_Process_Excel")] |
| | | //[HttpPost] |
| | | //public json Gy_Department_Excel() |
| | | //{ |
| | | // json res = new json(); |
| | | // try |
| | | // { |
| | | // //è·åæä»¶åç§° |
| | | // var file = HttpContext.Current.Request.Files[0]; |
| | | // //è·åæä»¶ç©çè·¯å¾ |
| | | // string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName); |
| | | // //ä¿åæä»¶ |
| | | // file.SaveAs(ExcelPath); |
| | | |
| | | // NpoiHelper np = new NpoiHelper(); |
| | | // DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0"); |
| | | // //å 餿件 |
| | | // File.Delete(ExcelPath); |
| | | // DataTable provisional = customerService.UploadExcel(ExcelDs); |
| | | |
| | | // res.code = CodeConstant.SUCCEED; |
| | | // res.count = CountConstant.SUCCEED; |
| | | // res.Message = "ä¸ä¼ æå"; |
| | | // res.data = provisional; |
| | | // return res; |
| | | // } |
| | | // catch (Exception e) |
| | | // { |
| | | // res.code = "0"; |
| | | // res.count = 0; |
| | | // res.Message = "Exceptionï¼" + e.ToString(); |
| | | // res.data = null; |
| | | // return res; |
| | | // } |
| | | //} |
| | | |
| | | /// <summary> |
| | | /// 夿å½åè忝å¦åå¨ |
| | | /// </summary> |
| | | /// <param name="HEmpNumber"></param> |
| | | /// <param name="HEmpName"></param> |
| | | /// <returns></returns> |
| | | //private bool JudgeEmp(string HEmpNumber, string HEmpName) |
| | | //{ |
| | | // if (!String.IsNullOrEmpty(HEmpNumber) && !String.IsNullOrEmpty(HEmpName)) |
| | | // { |
| | | // DataSet emp = oCN.RunProcReturn("select * from Gy_Employee where HNumber = '" + HEmpNumber + "' and HName = '" + HEmpName + "'", "Gy_Employee"); |
| | | // return emp.Tables[0].Rows.Count <= EmptyConstant.EMPTY ? true : false; |
| | | // } |
| | | // return false; |
| | | //} |
| | | |
| | | /// <summary> |
| | | /// 夿å |
| | | /// </summary> |
| | | /// <param name="provisional"></param> |
| | | /// <returns></returns> |
| | | private static string JudgmentColumns(DataTable provisional) |
| | | { |
| | | var error = ""; |
| | | |
| | | //æ¥è¯¢æ²¡æçå |
| | | if (!provisional.Columns.Contains("é¨é¨ä»£ç ")) |
| | | error += "æ²¡ææ¾å°ãé¨é¨ä»£ç ãçæ é¢,"; |
| | | |
| | | if (!provisional.Columns.Contains("é¨é¨åç§°")) |
| | | error += "æ²¡ææ¾å°ãé¨é¨åç§°ãçæ é¢,"; |
| | | return error; |
| | | } |
| | | #endregion |
| | | |
| | | #region ç©æåç±» æ å½¢å¾(æ ¹æ®ä»£ç å±å¼æ ç¶å¾) |
| | | |
| | |
| | | getTreeByLevel(dt, tree[m].children, num + 1);//忬¡ç¨åéå»å¾ªç¯ï¼æ¿åºåéçåé |
| | | } |
| | | } |
| | | |
| | | } |
| | | public class TreeModel |
| | | { |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region éå½å½æ° |
| | | /// <summary> |
| | | /// éå½å½æ° |
| | | /// </summary> |
| | |
| | | } |
| | | |
| | | } |
| | | #endregion |
| | | } |
| | |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using SyntacticSugar.constant; |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Data.SqlClient; |
| | | using System.IO; |
| | | using System.Web; |
| | | using System.Web.Http; |
| | | using WebAPI.Controllers.SCGL.æ¥è®¡å管ç; |
| | | using WebAPI.Models; |
| | | namespace WebAPI.Controllers |
| | | { |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region é¨é¨å表 æä»¶ä¸ä¼ |
| | | //[Route("Gy_Department/Gy_Process_Excel")] |
| | | //[HttpPost] |
| | | //public json Gy_Department_Excel() |
| | | //{ |
| | | // json res = new json(); |
| | | // try |
| | | // { |
| | | // //è·åæä»¶åç§° |
| | | // var file = HttpContext.Current.Request.Files[0]; |
| | | // //è·åæä»¶ç©çè·¯å¾ |
| | | // string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName); |
| | | // //ä¿åæä»¶ |
| | | // file.SaveAs(ExcelPath); |
| | | |
| | | // NpoiHelper np = new NpoiHelper(); |
| | | // DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0"); |
| | | |
| | | // //å 餿件 |
| | | // File.Delete(ExcelPath); |
| | | |
| | | // //å建临æ¶è¡¨ |
| | | // DataTable provisional = new DataTable("dt2"); |
| | | |
| | | // //æ·»å åå |
| | | // for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++) |
| | | // { |
| | | // provisional.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString()); |
| | | // } |
| | | |
| | | // //æ·»å æ°æ® |
| | | // for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++) |
| | | // { |
| | | // DataRow row = provisional.NewRow(); |
| | | // for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++) |
| | | // { |
| | | // row[j] = ExcelDs.Tables[0].Rows[i][j].ToString(); |
| | | // } |
| | | // provisional.Rows.Add(row); |
| | | // } |
| | | |
| | | // //夿å |
| | | // string error = JudgmentColumns(provisional); |
| | | // if (error.Length > 0) |
| | | // { |
| | | // res.code = "0"; |
| | | // res.count = 0; |
| | | // res.Message = $"Excel模æ¿åå¨é误,{error}\r\n"; |
| | | // res.data = null; |
| | | // return res; |
| | | // } |
| | | |
| | | // for (int i = 0; i <= provisional.Rows.Count - 1; i++) |
| | | // { |
| | | // string HNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["é¨é¨ä»£ç "].ToString()); |
| | | // string HName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["é¨é¨åç§°"].ToString()); |
| | | // string HEmpNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["è´è´£äººä»£ç "].ToString()); |
| | | // string HEmpName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["è´è´£äººåç§°"].ToString()); |
| | | // string HBarCode = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["æ¡å½¢ç "].ToString()); |
| | | // string HHelpCode = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["å©è®°ç "]); |
| | | // string HRemark = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["夿³¨"].ToString()); |
| | | |
| | | // //夿è´è´£äººæ¯å¦åå¨ |
| | | // if (JudgeEmp(HEmpNumber, HEmpName)) |
| | | // { |
| | | // res.code = CodeConstant.FAIL; |
| | | // res.count = CountConstant.FAIL; |
| | | // res.Message = "å½åèåä¸åå¨"; |
| | | // res.data = null; |
| | | // return res; |
| | | // } |
| | | // //è·åçå®è¡æ° |
| | | // int line = i + 1; |
| | | // } |
| | | |
| | | // res.code = "1"; |
| | | // res.count = 1; |
| | | // res.Message = error; |
| | | // res.data = provisional; |
| | | // return res; |
| | | // } |
| | | // catch (Exception e) |
| | | // { |
| | | // res.code = "0"; |
| | | // res.count = 0; |
| | | // res.Message = "Exceptionï¼" + e.ToString(); |
| | | // res.data = null; |
| | | // return res; |
| | | // } |
| | | //} |
| | | |
| | | /// <summary> |
| | | /// 夿å½åè忝å¦åå¨ |
| | | /// </summary> |
| | | /// <param name="HEmpNumber"></param> |
| | | /// <param name="HEmpName"></param> |
| | | /// <returns></returns> |
| | | //private bool JudgeEmp(string HEmpNumber, string HEmpName) |
| | | //{ |
| | | // if (!String.IsNullOrEmpty(HEmpNumber) && !String.IsNullOrEmpty(HEmpName)) |
| | | // { |
| | | // DataSet emp = oCN.RunProcReturn("select * from Gy_Employee where HNumber = '" + HEmpNumber + "' and HName = '" + HEmpName + "'", "Gy_Employee"); |
| | | // return emp.Tables[0].Rows.Count <= EmptyConstant.EMPTY ? true : false; |
| | | // } |
| | | // return false; |
| | | //} |
| | | |
| | | /// <summary> |
| | | /// 夿å |
| | | /// </summary> |
| | | /// <param name="provisional"></param> |
| | | /// <returns></returns> |
| | | private static string JudgmentColumns(DataTable provisional) |
| | | { |
| | | var error = ""; |
| | | |
| | | //æ¥è¯¢æ²¡æçå |
| | | if (!provisional.Columns.Contains("é¨é¨ä»£ç ")) |
| | | error += "æ²¡ææ¾å°ãé¨é¨ä»£ç ãçæ é¢,"; |
| | | |
| | | if (!provisional.Columns.Contains("é¨é¨åç§°")) |
| | | error += "æ²¡ææ¾å°ãé¨é¨åç§°ãçæ é¢,"; |
| | | return error; |
| | | } |
| | | #endregion |
| | | |
| | | #region é¨é¨å表 导å
¥(ä¿å) |
| | | [Route("Gy_Department/Gy_Process_btnSave")] |
| | | [HttpPost] |
| | | public object Gy_InspectBasis_btnSave([FromBody] JObject sMainSub) |
| | | { |
| | | var _value = sMainSub["sMainSub"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { "&å" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string user = sArray[1].ToString(); |
| | | string organ = sArray[2].ToString(); |
| | | json res = new json(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_Group_Edit", 1, false, user)) |
| | | { |
| | | res.code = "0"; |
| | | res.count = 0; |
| | | res.Message = "æ ä¿åæéï¼"; |
| | | res.data = null; |
| | | return res; |
| | | } |
| | | |
| | | List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2); |
| | | List<Dictionary<string, string>> list = new List<Dictionary<string, string>>(); |
| | | |
| | | foreach (JObject item in Excel) |
| | | { |
| | | Dictionary<string, string> dic = new Dictionary<string, string>(); |
| | | foreach (var itm in item.Properties()) |
| | | { |
| | | dic.Add(itm.Name, itm.Value.ToString()); |
| | | } |
| | | list.Add(dic); |
| | | } |
| | | |
| | | oCN.BeginTran(); |
| | | int i = 1; |
| | | foreach (Dictionary<string, string> item in list) |
| | | { |
| | | string HNumber = item["é¨é¨ä»£ç "].ToString(); |
| | | string HName = item["é¨é¨åç§°"].ToString(); |
| | | string HEmpNumber = item["è´è´£äººä»£ç "].ToString(); |
| | | string HEmpName = item["è´è´£äººåç§°"].ToString(); |
| | | string HBarCode = item["æ¡å½¢ç "].ToString(); |
| | | string HHelpCode = item["å©è®°ç "].ToString(); |
| | | string HRemark = item["夿³¨"].ToString(); |
| | | int HEmpID = 0; |
| | | if (!String.IsNullOrEmpty(HEmpName) && !String.IsNullOrEmpty(HEmpNumber)) |
| | | { |
| | | DataSet emp = oCN.RunProcReturn("select HItemID from Gy_Employee where HNumber = '" + HEmpNumber + "' and HName = '" + HEmpName + "'", "Gy_Employee"); |
| | | HEmpID = (int)emp.Tables[0].Rows[0]["HItemID"]; |
| | | } |
| | | string sShortNumber; |
| | | sShortNumber = DBUtility.ClsPub.GetShortNumber(HNumber);//ç代ç |
| | | if (sShortNumber.Trim() == "") |
| | | { |
| | | res.code = "0"; |
| | | res.count = 0; |
| | | res.Message = "ä¿å失败ï¼ç代ç 为空ï¼"; |
| | | res.data = 1; |
| | | return res; |
| | | } |
| | | int HEndFlag = 1;//æ«çº§æ å¿ |
| | | int HLevel = DBUtility.ClsPub.GetLevel(HNumber); //ç级 |
| | | |
| | | |
| | | if (!DBUtility.ClsPub.AllowNumber(HNumber.Trim())) |
| | | { |
| | | res.code = "0"; |
| | | res.count = 0; |
| | | res.Message = "ä¿å失败ï¼ä»£ç ä¸ä¸è½åºç°è¿ç»â.âå¹¶ä¸é¦ä½æ«ä½ä¸è½ä¸ºâ.âï¼"; |
| | | res.data = 1; |
| | | return res; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select * from Gy_Department where HNumber='" + HNumber + "'", "Gy_InspectInstruMent"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | |
| | | string sql = "insert into Gy_Department (HName,HNumber,HShortNumber,HLevel,HHelpCode,HParentID,HStopflag,HEndFlag,HRemark,HUseFlag, HUSEORGID, HCREATEORGID, HEmpID, HBarCodeForBase)" + |
| | | $"values('{HName}', '{HNumber}', '{sShortNumber}',{HLevel},'',0,'0','0','{HRemark}', 'æªä½¿ç¨', '{organ}', '{organ}', '{HEmpID}', '{HBarCode}')"; |
| | | oCN.RunProc(sql); |
| | | } |
| | | else |
| | | { |
| | | oCN.RunProc("update Gy_Department set HName ='" + HName + "' , HHelpCode = '" + HHelpCode + " ', HBarCodeForBase = '" + HBarCode + "', HEmpID = '" + HEmpID + "', HModifyEmp = '" + user + "', HModifyTime = '" + System.DateTime.Now.ToString("G") + "' where HNumber= '" + HNumber + "'"); |
| | | } |
| | | |
| | | i++; |
| | | } |
| | | |
| | | oCN.Commit(); |
| | | |
| | | res.code = "1"; |
| | | res.count = 1; |
| | | res.Message = "导å
¥æå!"; |
| | | res.data = null; |
| | | return res; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogService.Write(e); |
| | | res.code = "0"; |
| | | res.count = 0; |
| | | res.Message = "Exceptionï¼" + e.ToString(); |
| | | res.data = null; |
| | | return res; |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | try |
| | | { |
| | | //è¿ååè¡¨ä¿¡æ¯ |
| | | ds = oCN.RunProcReturn("select * from h_v_IF_EmployeeList where ç¦ç¨æ è®°='' and HGroupID=" + HGroupID + " order by èå代ç ", "h_v_IF_EmployeeList"); |
| | | ds = oCN.RunProcReturn("exec h_p_Pay_GetEmployeeByGroup " + HGroupID.ToString(), "h_p_Pay_GetEmployeeByGroup"); |
| | | //ds = oCN.RunProcReturn("select * from h_v_IF_EmployeeList where ç¦ç¨æ è®°='' and HGroupID=" + HGroupID + " order by èå代ç ", "h_v_IF_EmployeeList"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | long HProcID = list[0].HProcID; |
| | | int HUSEORGID = list[0].HUSEORGID; |
| | | string HCompName = list[0].HCompName; |
| | | string HPayMentType = list[0].HPayMentType; |
| | | var HDeptNumber = ""; |
| | | //var HEndFlag = 0; |
| | | long HLevel = 1; |
| | |
| | | oCN.RunProc("Insert into Gy_Group " + |
| | | " (HNumber,HName,HHelpCode,HShortNumber,HParentID" + |
| | | ",HEmpQty,HDeptID,HDeptNumber,HProcID" + |
| | | ",HLevel,HEndFlag,HStopflag,HRemark,HBarCodeForBase,HUSEORGID,HCompName) " + |
| | | ",HLevel,HEndFlag,HStopflag,HRemark,HBarCodeForBase,HUSEORGID,HCompName,HPayMentType) " + |
| | | " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + HParentID.ToString() + |
| | | "," + HEmpQty.ToString() + "," + HDeptID.ToString() + ",'" + HDeptNumber + "'," + HProcID.ToString() + |
| | | "," + HLevel.ToString() + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "','" + HBarCodeForBase + "',"+ HUSEORGID + ",'" + HCompName + "')", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | "," + HLevel.ToString() + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "','" + HBarCodeForBase + "',"+ HUSEORGID + ",'" + HCompName +"','"+ HPayMentType + "')", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //ä¿®æ¹ä¸çº§ä¸ºéæ«çº§ä»£ç |
| | | oCN.RunProc("Update Gy_Group set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCN.Commit(); |
| | |
| | | ",HRemark= '" + HRemark + "'" + |
| | | ",HDeptID=" + HDeptID + |
| | | ",HEmpQty=" + HEmpQty + |
| | | ",HCompName='"+ HCompName+ |
| | | ",HCompName='"+ HCompName+"'"+ |
| | | ",HPayMentType='" + HPayMentType + |
| | | "',HBarCodeForBase='" + HBarCodeForBase + "' " + |
| | | ", HProcID = '" + HProcID + "' Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCN.RunProc("Update Gy_Group set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | |
| | | string HMouldClass = mainList[0].HMouldClass; |
| | | int HNowWHID = mainList[0].HNowWHID; |
| | | int HNowSPID = mainList[0].HNowSPID; |
| | | string HMouldUseStatus = mainList[0].HMouldUseStatus; |
| | | |
| | | //ä¿ååæ§å¶========================================= |
| | | string HBillNote = ""; |
| | | ds = oCN.RunProcReturn("Exec h_p_Gy_MouldFileMain_BeforeSaveCtrl " + HInterID.ToString() + ", '" + HBillNo + "','" + HBillNote + "',1 ", "h_p_Gy_MouldFileMain_BeforeSaveCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¿å失败!åå :ä¿ååå¤æå¤±è´¥ï¼è¯·ä¸ç½ç»ç®¡ç人åèç³»"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¿å失败!åå :" + ds.Tables[0].Rows[0]["HBackRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //========================================================= |
| | | |
| | | |
| | | //主表 |
| | | oCN.RunProc("Insert Into Gy_MouldFileMain " + |
| | |
| | | ",HPrintQty,HMouldStatus,HWhID,HRoutingID,HCaveQty" + |
| | | ",HBomID,HVersion,HSPGroupID,HSPID,HDesignLife,HNowSupID,HNowSupTypeID" + |
| | | ",HUseLife,HLeaveLife,HProdQty,HProdWeight,HMouldOWNER,HSaveLife,HMouldDotCheckRuleInterID,HMouldMaintainRuleInterID,HBarCode,HMadeSupID" + |
| | | ",HMouldClass,HNowWHID,HNowSPID,HInitLife) " + |
| | | ",HMouldClass,HNowWHID,HNowSPID,HInitLife,HMouldUseStatus) " + |
| | | " values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" + |
| | | "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HMaker + "',getdate()" + |
| | | ",'" + HMouldNo + "','" + HName + "','" + HModel + "','" + HModel2 + "','" + HDiameter + "'" + |
| | |
| | | "," + HPrintQty + ",'" + HMouldStatus + "'," + HWHID + "," + HRoutingID + "," + HCaveQty + |
| | | "," + HBOMID + ",'" + HVersion + "'," + HSPGroupID + "," + HSPID + ",'" + HDesignLife + "','" + HNowSupID + "','" + HNowSupTypeID + "'" + |
| | | ",'" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "','" + HMouldOWNER + "','" + HSaveLife + "','" + HMouldDotCheckRuleInterID + "','" + HMouldMaintainRuleInterID + "','" + HBarCode + "'," + HMadeSupID + |
| | | ",'"+ HMouldClass + "'," + HNowWHID + "," + HNowSPID + ",'" + HInitLife + "') "); |
| | | ",'"+ HMouldClass + "'," + HNowWHID + "," + HNowSPID + ",'" + HInitLife + "','" + HMouldUseStatus + "') "); |
| | | |
| | | //å表 |
| | | oCN.RunProc("Insert into Gy_MouldFileSub " + |
| | |
| | | ") "); |
| | | |
| | | objJsonResult = AddBillSub(msg5,msg6,msg7,HInterID, HBillNo); |
| | | |
| | | //ä¿ååæ§å¶========================================= |
| | | ds = oCN.RunProcReturn("Exec h_p_Gy_MouldFileMain_AfterSaveCtrl " + HInterID.ToString() + ", '" + HBillNo + "','" + HBillNote + "',1 ", "h_p_Gy_MouldFileMain_AfterSaveCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¿å失败!åå :ä¿ååå¤æå¤±è´¥ï¼è¯·ä¸ç½ç»ç®¡ç人åèç³»"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¿å失败!åå :" + ds.Tables[0].Rows[0]["HBackRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | //========================================================= |
| | | |
| | | |
| | | if (objJsonResult.code == "0") |
| | | { |
| | |
| | | string HMouldClass = mainList[0].HMouldClass; |
| | | int HNowWHID = mainList[0].HNowWHID; |
| | | int HNowSPID = mainList[0].HNowSPID; |
| | | |
| | | string HMouldUseStatus = mainList[0].HMouldUseStatus; |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | | oCN.BeginTran(); |
| | | //主表 |
| | |
| | | ",HNowWHID=" + HNowWHID + |
| | | ",HNowSPID=" + HNowSPID + |
| | | ",HInitLife='" + HInitLife + |
| | | "',HMouldUseStatus='" + HMouldUseStatus + |
| | | "' where HInterID=" + HInterID.ToString()); |
| | | |
| | | //ä¿®æ¹å项ç®ä»£ç |
| | |
| | | int HQCSchemeID_Proc = list[0].HQCSchemeID_Proc; |
| | | int HQCSchemeID_Patrol = list[0].HQCSchemeID_Patrol; |
| | | |
| | | |
| | | |
| | | |
| | | long HWorkCenterID = list[0].HWorkCenterID; //å·¥ä½ä¸å¿ |
| | | |
| | | long HBadWHID = list[0].HBadWHID; //ä¸è¯ä»åº |
| | |
| | | long HWWBadWHID = list[0].HWWBadWHID; //å§å¤ä¸è¯ä»åº |
| | | long HWWWasterWHID = list[0].HWWWasterWHID; //å§å¤æ¥åºä»åº |
| | | long HWHID = list[0].HWHID; //è¯åä»åº |
| | | |
| | | string HPayMentType = list[0].HPayMentType; //计件工èµç±»å |
| | | |
| | | |
| | | //夿æé |
| | |
| | | ",HLevel,HEndFlag,HStopflag,HRemark,HDeptID,HBarCodeForBase,HProcessID_K3,HBillSubType,HAutoTrunFlag" + |
| | | ",HFixPrice,HOverFixPrice,HProcMulID,HProcCheckNote" + |
| | | ",HUSEORGID,HWorkCenterID,HBadWHID,HWasterWHID,HBadCountDevelopWHID,HWWBadWHID,HWWWasterWHID,HWHID,HTProcessFlag" + |
| | | ",HQCSchemeID_Fst,HQCSchemeID_Proc,HQCSchemeID_Patrol) " + |
| | | ",HQCSchemeID_Fst,HQCSchemeID_Proc,HQCSchemeID_Patrol,HPayMentType) " + |
| | | " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + HParentID.ToString() + |
| | | "," + Convert.ToString(HTypeFlow ? 1 : 0) + "," + Convert.ToString(HTypeCount ? 1 : 0) + ",'" + HDeptNumber + "','" + HSNo.ToString() + |
| | | "'," + HLevel.ToString() + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "'," + HDeptID + |
| | | ",'" + HBarCode + "'," + HProcessID_K3 + ",'" + HBillSubType + "'," + Convert.ToString(HAutoTrunFlag ? 1 : 0) + |
| | | ",'" + HFixPrice.ToString() + "'," + HOverFixPrice.ToString() + "," + HProcMulID.ToString() + ",'" + HProcCheckNote.ToString() + "'" + |
| | | "," + HUSEORGID + "," + HWorkCenterID + "," + HBadWHID + "," + HWasterWHID + "," + HBadCountDevelopWHID + "," + HWWBadWHID + "," + HWWWasterWHID + "," + HWHID + "," + Convert.ToString(HTProcessFlag ? 1 : 0) + "," + HQCSchemeID_Fst + "," + HQCSchemeID_Proc + "," + HQCSchemeID_Patrol + ")", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | "," + HUSEORGID + "," + HWorkCenterID + "," + HBadWHID + "," + HWasterWHID + "," + HBadCountDevelopWHID + "," + HWWBadWHID + "," + HWWWasterWHID + "," + HWHID + "," + Convert.ToString(HTProcessFlag ? 1 : 0) + "," + HQCSchemeID_Fst + "," + HQCSchemeID_Proc + "," + HQCSchemeID_Patrol |
| | | + ",'" + HPayMentType + "'" + ")", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //ä¿®æ¹ä¸çº§ä¸ºéæ«çº§ä»£ç |
| | | oCN.RunProc("Update Gy_Process set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCN.Commit(); |
| | |
| | | ",HQCSchemeID_Fst= " + HQCSchemeID_Fst + |
| | | ",HQCSchemeID_Proc= " + HQCSchemeID_Proc + |
| | | ",HQCSchemeID_Patrol= " + HQCSchemeID_Patrol + |
| | | ",HPayMentType= '" + HPayMentType + "'" + |
| | | ",HProcCheckNote='" + HProcCheckNote + "' Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //ä¿®æ¹ä¸çº§ä¸ºéæ«çº§ä»£ç |
| | | oCN.RunProc("Update Gy_Process set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region æ ¡éªé¡¹ç®å表 æä»¶ä¸ä¼ |
| | | [Route("Gy_QCCheckClass/Gy_Process_Excel")] |
| | | #region æ ¡éªé¡¹ç®åç±»å表 æä»¶ä¸ä¼ |
| | | [Route("Gy_QCCheckClass/Gy_QCCheckClass_Excel")] |
| | | [HttpPost] |
| | | public json Gy_Process_Excel() |
| | | public json Gy_QCCheckClass_Excel() |
| | | { |
| | | json res = new json(); |
| | | try |
| | |
| | | { |
| | | provisional.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString()); |
| | | } |
| | | |
| | | //模æ¿ç¼ºå°å ä½éè¦ä»æ°æ®åºä¸æ¥è¯¢åºæ¥æ¾ç¤ºå¨é¡µé¢çåæ®µ |
| | | provisional.Columns.Add("HOrgID", typeof(Int32));//ç»ç»ID |
| | | //æ·»å æ°æ® |
| | | for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++) |
| | | { |
| | |
| | | |
| | | for (int i = 0; i <= provisional.Rows.Count - 1; i++) |
| | | { |
| | | string HNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["代ç "].ToString()); |
| | | string HName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["åç§°"].ToString()); |
| | | string HHelpCode = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["å©è®°ç "]); |
| | | string HRemark = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["夿³¨"].ToString()); |
| | | string HQCCheckClassName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["æ£éªé¡¹ç®åç±»"].ToString()); |
| | | string HQCCheckClassNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["æ£éªé¡¹ç®å类代ç "].ToString()); |
| | | string HORGNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["ç»ç»ä»£ç "].ToString()); |
| | | string HORGName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["ç»ç»åç§°"].ToString()); |
| | | //è·åçå®è¡æ° |
| | | int line = i + 1; |
| | | if (HORGNumber != "") |
| | | { |
| | | //æ¥è¯¢ç»ç» |
| | | ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | res.code = "0"; |
| | | res.count = 0; |
| | | res.Message = "第" + line + "è¡,ç»ç»ä¸åå¨ï¼"; |
| | | res.data = null; |
| | | return res; |
| | | } |
| | | else |
| | | { |
| | | provisional.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | else |
| | | { |
| | | res.code = CodeConstant.FAIL; |
| | | res.count = CountConstant.FAIL; |
| | | res.Message = "第" + line + "è¡,ç»ç»ä»£ç 为空"; |
| | | res.data = null; |
| | | return res; |
| | | } |
| | | } |
| | | |
| | | res.code = "1"; |
| | |
| | | var error = ""; |
| | | |
| | | //æ¥è¯¢æ²¡æçå |
| | | if (!provisional.Columns.Contains("代ç ")) |
| | | error += "æ²¡ææ¾å°ã代ç ãçæ é¢,"; |
| | | if (!provisional.Columns.Contains("ç»ç»ä»£ç ")) |
| | | error += "æ²¡ææ¾å°ãç»ç»ä»£ç ãçæ é¢,"; |
| | | |
| | | if (!provisional.Columns.Contains("åç§°")) |
| | | error += "æ²¡ææ¾å°ãåç§°ãçæ é¢,"; |
| | | if(!provisional.Columns.Contains("æ£éªé¡¹ç®å类代ç ")) |
| | | error += "æ²¡ææ¾å°ãæ£éªé¡¹ç®å类代ç ãçæ é¢,"; |
| | | |
| | | if (!provisional.Columns.Contains("ç»ç»åç§°")) |
| | | error += "æ²¡ææ¾å°ãç»ç»åç§°ãçæ é¢,"; |
| | | |
| | | if (!provisional.Columns.Contains("æ£éªé¡¹ç®åç±»")) |
| | | error += "æ²¡ææ¾å°ãæ£éªé¡¹ç®åç±»ãçæ é¢,"; |
| | | |
| | | if (!provisional.Columns.Contains("å©è®°ç ")) |
| | | error += "æ²¡ææ¾å°ãå©è®°ç ãçæ é¢,"; |
| | | |
| | | if (!provisional.Columns.Contains("夿³¨")) |
| | | error += "æ²¡ææ¾å°ã夿³¨ãçæ é¢,"; |
| | | return error; |
| | | } |
| | | #endregion |
| | | |
| | | #region æ ¡éªé¡¹ç®å表 导å
¥(ä¿å) |
| | | [Route("Gy_QCCheckClass/Gy_Process_btnSave")] |
| | | #region æ ¡éªé¡¹ç®åç±»å表 导å
¥(ä¿å) |
| | | [Route("Gy_QCCheckClass/Gy_QCCheckClass_btnSave")] |
| | | [HttpPost] |
| | | public object Gy_Group_btnSave([FromBody] JObject sMainSub) |
| | | { |
| | |
| | | string organ = sArray[2].ToString(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_Group_Edit", 1, false, user)) |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_QCCheckClass_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | int i = 1; |
| | | foreach (Dictionary<string, string> item in list) |
| | | { |
| | | string HNumber = item["代ç "].ToString(); |
| | | string HName = item["åç§°"].ToString(); |
| | | string HNumber = item["æ£éªé¡¹ç®å类代ç "].ToString(); |
| | | string HUSEORGID = item["HOrgID"].ToString(); |
| | | string HName = item["æ£éªé¡¹ç®åç±»"].ToString(); |
| | | string HHelpCode = item["å©è®°ç "]; |
| | | string HRemark = item["夿³¨"].ToString(); |
| | | |
| | |
| | | { |
| | | |
| | | string sql = "insert into Gy_QCCheckClass (HName,HNumber,HShortNumber,HLevel,HHelpCode,HParentID,HStopflag,HEndFlag,HRemark,HUseFlag, HUSEORGID, HCREATEORGID, HMakeTime,HMakeEmp)" + |
| | | $"values('{HName}', '{HNumber}', '{sShortNumber}',{HLevel},'',0,'0','0','{HRemark}', 'æªä½¿ç¨', '{organ}', '{organ}', '{System.DateTime.Now.ToString("G")}', '{user}')"; |
| | | $"values('{HName}', '{HNumber}', '{sShortNumber}',{HLevel},'',0,'0','0','{HRemark}', 'æªä½¿ç¨', '{HUSEORGID}', '{HUSEORGID}', '{System.DateTime.Now.ToString("G")}', '{user}')"; |
| | | oCN.RunProc(sql); |
| | | } |
| | | else |
| | | { |
| | | oCN.RunProc("update Gy_QCCheckClass set HName='" + HName + "', HHelpCode='" + HHelpCode + "', HModifyEmp = '" + user + "', HModifyTime = '" + System.DateTime.Now.ToString("G") + "'where HNumber='" + HNumber + "'"); |
| | | oCN.RunProc("update Gy_QCCheckClass set HName='" + HName + "', HHelpCode='" + HHelpCode + "', HModifyEmp = '" + user + "', HModifyTime = '" + System.DateTime.Now.ToString("G") + "',HUSEORGID="+ HUSEORGID + ",HRemark='"+HRemark+"' where HNumber='" + HNumber + "'"); |
| | | } |
| | | |
| | | i++; |
| | |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using SyntacticSugar.constant; |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Data.SqlClient; |
| | | using System.IO; |
| | | using System.Web; |
| | | using System.Web.Http; |
| | | using WebAPI.Controllers.SCGL.æ¥è®¡å管ç; |
| | | using WebAPI.Models; |
| | |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region ç©æåç±»å®¡æ ¸ãåå®¡æ ¸ |
| | | /// <summary> |
| | | /// |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region æ£éªä¾æ®å表 æä»¶ä¸ä¼ |
| | | //[Route("Gy_Warehouse/Gy_Process_Excel")] |
| | | //[HttpPost] |
| | | //public json Gy_InspectBasis_Excel() |
| | | //{ |
| | | // json res = new json(); |
| | | // try |
| | | // { |
| | | // //è·åæä»¶åç§° |
| | | // var file = HttpContext.Current.Request.Files[0]; |
| | | // //è·åæä»¶ç©çè·¯å¾ |
| | | // string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName); |
| | | // //ä¿åæä»¶ |
| | | // file.SaveAs(ExcelPath); |
| | | |
| | | // NpoiHelper np = new NpoiHelper(); |
| | | // DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0"); |
| | | |
| | | // //å 餿件 |
| | | // File.Delete(ExcelPath); |
| | | |
| | | // //å建临æ¶è¡¨ |
| | | // DataTable provisional = new DataTable("dt2"); |
| | | |
| | | // //æ·»å åå |
| | | // for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++) |
| | | // { |
| | | // provisional.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString()); |
| | | // } |
| | | |
| | | // //æ·»å æ°æ® |
| | | // for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++) |
| | | // { |
| | | // DataRow row = provisional.NewRow(); |
| | | // for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++) |
| | | // { |
| | | // row[j] = ExcelDs.Tables[0].Rows[i][j].ToString(); |
| | | // } |
| | | // provisional.Rows.Add(row); |
| | | // } |
| | | |
| | | // //夿å |
| | | // string error = JudgmentColumns(provisional); |
| | | // if (error.Length > 0) |
| | | // { |
| | | // res.code = "0"; |
| | | // res.count = 0; |
| | | // res.Message = $"Excel模æ¿åå¨é误,{error}\r\n"; |
| | | // res.data = null; |
| | | // return res; |
| | | // } |
| | | |
| | | // for (int i = 0; i <= provisional.Rows.Count - 1; i++) |
| | | // { |
| | | // string HNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["ä»åºä»£ç "].ToString()); |
| | | // string HName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["ä»åºåç§°"].ToString()); |
| | | // string phone = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["èç³»çµè¯"].ToString()); |
| | | // string HEmpNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["èå代ç "].ToString()); |
| | | // string HEmpName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["èååç§°"].ToString()); |
| | | // string HHelpCode = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["å©è®°ç "]); |
| | | // string HRemark = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["夿³¨"].ToString()); |
| | | // if(JudgeEmp(HEmpNumber, HEmpName)) |
| | | // { |
| | | // res.code = CodeConstant.FAIL; |
| | | // res.count = CountConstant.FAIL; |
| | | // res.Message = "å½åèåä¸åå¨"; |
| | | // res.data = null; |
| | | // return res; |
| | | // } |
| | | // //è·åçå®è¡æ° |
| | | // int line = i + 1; |
| | | // } |
| | | |
| | | // res.code = "1"; |
| | | // res.count = 1; |
| | | // res.Message = error; |
| | | // res.data = provisional; |
| | | // return res; |
| | | // } |
| | | // catch (Exception e) |
| | | // { |
| | | // res.code = "0"; |
| | | // res.count = 0; |
| | | // res.Message = "Exceptionï¼" + e.ToString(); |
| | | // res.data = null; |
| | | // return res; |
| | | // } |
| | | //} |
| | | |
| | | ///// <summary> |
| | | ///// 夿å½åè忝å¦åå¨ |
| | | ///// </summary> |
| | | ///// <param name="HEmpNumber"></param> |
| | | ///// <param name="HEmpName"></param> |
| | | ///// <returns></returns> |
| | | //private bool JudgeEmp(string HEmpNumber, string HEmpName) |
| | | //{ |
| | | // if (!String.IsNullOrEmpty(HEmpNumber) && !String.IsNullOrEmpty(HEmpName)) |
| | | // { |
| | | // DataSet emp = oCN.RunProcReturn("select * from Gy_Employee where HNumber = '" + HEmpNumber + "' and HName = '" + HEmpName + "'", "Gy_Employee"); |
| | | // return emp.Tables[0].Rows.Count <= EmptyConstant.EMPTY ? true : false; |
| | | // } |
| | | // return false; |
| | | //} |
| | | |
| | | /// <summary> |
| | | /// 夿å |
| | | /// </summary> |
| | | /// <param name="provisional"></param> |
| | | /// <returns></returns> |
| | | private static string JudgmentColumns(DataTable provisional) |
| | | { |
| | | var error = ""; |
| | | |
| | | //æ¥è¯¢æ²¡æçå |
| | | if (!provisional.Columns.Contains("ä»åºä»£ç ")) |
| | | error += "æ²¡ææ¾å°ãä»åºä»£ç ãçæ é¢,"; |
| | | |
| | | if (!provisional.Columns.Contains("ä»åºåç§°")) |
| | | error += "æ²¡ææ¾å°ãä»åºåç§°ãçæ é¢,"; |
| | | return error; |
| | | } |
| | | #endregion |
| | | |
| | | #region æ£éªä¾æ®å表 导å
¥(ä¿å) |
| | | [Route("Gy_Warehouse/Gy_Process_btnSave")] |
| | | [HttpPost] |
| | | public object Gy_InspectBasis_btnSave([FromBody] JObject sMainSub) |
| | | { |
| | | var _value = sMainSub["sMainSub"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { "&å" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string user = sArray[1].ToString(); |
| | | string organ = sArray[2].ToString(); |
| | | json res = new json(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_Group_Edit", 1, false, user)) |
| | | { |
| | | res.code = "0"; |
| | | res.count = 0; |
| | | res.Message = "æ ä¿åæéï¼"; |
| | | res.data = null; |
| | | return res; |
| | | } |
| | | |
| | | List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2); |
| | | List<Dictionary<string, string>> list = new List<Dictionary<string, string>>(); |
| | | |
| | | foreach (JObject item in Excel) |
| | | { |
| | | Dictionary<string, string> dic = new Dictionary<string, string>(); |
| | | foreach (var itm in item.Properties()) |
| | | { |
| | | dic.Add(itm.Name, itm.Value.ToString()); |
| | | } |
| | | list.Add(dic); |
| | | } |
| | | |
| | | oCN.BeginTran(); |
| | | int i = 1; |
| | | foreach (Dictionary<string, string> item in list) |
| | | { |
| | | string HNumber = item["ä»åºä»£ç "].ToString(); |
| | | string HName = item["ä»åºåç§°"].ToString(); |
| | | string phone = item["èç³»çµè¯"].ToString(); |
| | | string HEmpNumber = item["èå代ç "].ToString(); |
| | | string HEmpName = item["èååç§°"].ToString(); |
| | | string HHelpCode = item["å©è®°ç "].ToString(); |
| | | string HRemark = item["夿³¨"].ToString(); |
| | | int HEmpID = 0; |
| | | if (!String.IsNullOrEmpty(HEmpName) && !String.IsNullOrEmpty(HEmpNumber)) |
| | | { |
| | | DataSet emp = oCN.RunProcReturn("select HItemID from Gy_Employee where HNumber = '" + HEmpNumber + "' and HName = '" + HEmpName + "'", "Gy_Employee"); |
| | | HEmpID = (int)emp.Tables[0].Rows[0]["HItemID"]; |
| | | } |
| | | string sShortNumber; |
| | | sShortNumber = DBUtility.ClsPub.GetShortNumber(HNumber);//ç代ç |
| | | if (sShortNumber.Trim() == "") |
| | | { |
| | | res.code = "0"; |
| | | res.count = 0; |
| | | res.Message = "ä¿å失败ï¼ç代ç 为空ï¼"; |
| | | res.data = 1; |
| | | return res; |
| | | } |
| | | int HEndFlag = 1;//æ«çº§æ å¿ |
| | | int HLevel = DBUtility.ClsPub.GetLevel(HNumber); //ç级 |
| | | |
| | | |
| | | if (!DBUtility.ClsPub.AllowNumber(HNumber.Trim())) |
| | | { |
| | | res.code = "0"; |
| | | res.count = 0; |
| | | res.Message = "ä¿å失败ï¼ä»£ç ä¸ä¸è½åºç°è¿ç»â.âå¹¶ä¸é¦ä½æ«ä½ä¸è½ä¸ºâ.âï¼"; |
| | | res.data = 1; |
| | | return res; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select * from Gy_Warehouse where HNumber='" + HNumber + "'", "Gy_InspectInstruMent"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | |
| | | string sql = "insert into Gy_Warehouse (HName,HNumber,HShortNumber,HLevel,HHelpCode,HParentID,HStopflag,HEndFlag,HRemark,HUseFlag, HUSEORGID, HCREATEORGID, HEmpID, HPhone)" + |
| | | $"values('{HName}', '{HNumber}', '{sShortNumber}',{HLevel},'',0,'0','0','{HRemark}', 'æªä½¿ç¨', '{organ}', '{organ}', '{HEmpID}', '{phone}')"; |
| | | oCN.RunProc(sql); |
| | | } |
| | | else |
| | | { |
| | | oCN.RunProc("update Gy_Warehouse set HName ='" + HName + "' , HHelpCode = '" + HHelpCode + " ', HPhone= '" + phone + "', HEmpID = '" + HEmpID + "', HModifyEmp = '" + user + "', HModifyTime = '" + System.DateTime.Now.ToString("G") + "' where HNumber= '" + HNumber + "'"); |
| | | } |
| | | |
| | | i++; |
| | | } |
| | | |
| | | oCN.Commit(); |
| | | |
| | | res.code = "1"; |
| | | res.count = 1; |
| | | res.Message = "导å
¥æå!"; |
| | | res.data = null; |
| | | return res; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogService.Write(e); |
| | | res.code = "0"; |
| | | res.count = 0; |
| | | res.Message = "Exceptionï¼" + e.ToString(); |
| | | res.data = null; |
| | | return res; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | break; |
| | | case "P202"://æµè½¬å¡ |
| | | case "P203"://æµè½¬å¡ |
| | | case "P204"://æµè½¬å¡ |
| | | case "P205"://æµè½¬å¡ |
| | | case "P201"://æµè½¬å¡ |
| | | ds = oCN.RunProcReturn("select top 1 * from h_v_Sc_ProcessExchangeBillList where åæ®å·= '" + BillNo_PGD + "'", "h_v_Sc_ProcessExchangeBillList"); |
| | | break; |
| | | } |
| | | switch (BillNoType) |
| | | //å¾å°ä¿¡æ¯ |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region å·¥åºåºç«æ±æ¥åPDAæ«æä½å |
| | | [Route("Cj_StationBill/txtHBarCode_KeyDown_Operator")] |
| | | [HttpGet] |
| | | public object txtHBarCode_KeyDown_Operator(string HBarCode, string HInterID, string UserID, string HBillType) |
| | | { |
| | | try |
| | | { |
| | | if (HBarCode == null || HBarCode.Equals("")) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "空ç½ç ,æ¡å½¢ç ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select * from h_v_Gy_EmployeeList_New where èå代ç = '" + HBarCode + "'", "h_v_Gy_EmployeeList_New"); |
| | | |
| | | //åå
¥ä¿¡æ¯ |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æªæ¥è¯¢å°æ¡ç ä¿¡æ¯ï¼"; |
| | | objJsonResult.data = null; |
| | | |
| | | return objJsonResult; |
| | | } |
| | | 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 |
| | | |
| | | #region å·¥åºè¿ç«æ«é
ä»¶ç |
| | | [Route("Cj_StationBill/txtHBarCode_Mater_KeyDown")] |
| | | [HttpGet] |
| | |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using SyntacticSugar.constant; |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | |
| | | long HMainInterID = 0; |
| | | HMainInterID = list[0].HMainInterID; |
| | | string eventType = list[0].eventType; |
| | | string HDate = list[0].HDate; |
| | | string BillType = "3791"; |
| | | string HBillSubType = "3791"; |
| | | long HInterID = list[0].HInterID;//éå
¥typeå¾å°çåæ®ID |
| | |
| | | if (oSystemParameter.ShowBill(ref Ret)) |
| | | { |
| | | //夿客æ·ä¸ä¸ºé¾å±±æ±½é
|
| | | if (oSystemParameter.omodel.WMS_CampanyName != "é¾å±±æ±½é
" && oSystemParameter.omodel.WMS_CampanyName != "çä¸ç¥º") //ç³»ç»åæ° |
| | | if (oSystemParameter.omodel.WMS_CampanyName != "é¾å±±æ±½é
" && oSystemParameter.omodel.WMS_CampanyName != "çä¸ç¥º" && oSystemParameter.omodel.WMS_CampanyName != "æ·»åº·ç§æ") //ç³»ç»åæ° |
| | | { |
| | | if (HSourceID == 0) |
| | | { |
| | |
| | | ",HmaterOutqty,HProcPriceRate,HTemporaryAreaID,HWasterQty_Work,HWasterQty_Mater,HBackWorkQty,HShiftsID" + |
| | | ",HToCheckQty,HLossQty,HBackWorkByMaterQty,HMouldID" + |
| | | ") " + |
| | | " values('" + BillType + "','" + (OperationType == "5" ? "SUB" : HBillSubType) + "'," + HInterID + ",'" + HBillNo + "'," + HBillStatus + ",getdate(),'" + HMaker + "',getdate(),'" + HMouldNum + "'" + |
| | | " values('" + BillType + "','" + (OperationType == "5" ? "SUB" : HBillSubType) + "'," + HInterID + ",'" + HBillNo + "'," + HBillStatus + ",'"+ HDate + "','" + HMaker + "',getdate(),'" + HMouldNum + "'" + |
| | | "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HSourceName + "'," + HPieceQty + "," + HWasterQty + "," + HPlanPieceQty + "," + HBadPNL + |
| | | "," + HICMOInterID + ",'" + HICMOBillNo + "'," + HProcPlanInterID + "," + HProcPlanEntryID + ",'" + HProcPlanBillNo + "'," + HProcExchInterID + "," + HProcExchEntryID + |
| | | ",'" + HProcExchBillNo + "'," + HMaterID + "," + HProcID + "," + HICMOQty + "," + HPlanQty + ",getdate()," + HSourceID + "," + HPayProcID + |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region å·¥åºåºç«æ±æ¥åå表 |
| | | [Route("Cj_StationOutBill/page")] |
| | | [HttpGet] |
| | | public json page(string sWhere, string user, int page, int size) |
| | | { |
| | | json res = new json(); |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //夿æ¯å¦ææ¥è¯¢æé |
| | | if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Query", 1, false, user)) |
| | | { |
| | | res.code = "0"; |
| | | res.count = 0; |
| | | res.Message = "åºç«åæ æ¥è¯¢æé!"; |
| | | res.data = null; |
| | | return res; |
| | | } |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_MES_StationOutBillList " + page + "," + size + ",''", "h_p_MES_StationOutBillList"); |
| | | } |
| | | else |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_MES_StationOutBillList " + page + "," + size + ",'" + sWhere + "'", "h_p_MES_StationOutBillList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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å对象çåå |
| | | } |
| | | |
| | | res.code = CodeConstant.SUCCEED; |
| | | res.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString()); |
| | | res.Message = "Sucessï¼"; |
| | | res.list = columnNameList; |
| | | res.data = ds.Tables[0]; |
| | | return res; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | res.code = CodeConstant.FAIL; |
| | | res.count = CountConstant.FAIL; |
| | | res.Message = "Exceptionï¼" + e.ToString(); |
| | | res.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | #region å·¥åºåºç«æ±æ¥å å表æ¥è¯¢ |
| | | [Route("Cj_StationOutBill/get_SubDisplay")] |
| | | [HttpGet] |
| | |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using SyntacticSugar.constant; |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region å·¥åºæµè½¬å¡å页å表 |
| | | [Route("Sc_ProcessExchangeBillList/page")] |
| | | [HttpGet] |
| | | public json page(string sWhere, string user, int page, int size) |
| | | { |
| | | json res = new json(); |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Sc_ProcessExchangeBill_SubQuery", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æ¥çæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_ProcessExchangeBillList_Query " + page + "," + size + ",''", "h_p_Sc_ProcessExchangeBillList_Query"); |
| | | } |
| | | else |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_ProcessExchangeBillList_Query " + page + "," + size + ",'" + sWhere + "'", "h_p_Sc_ProcessExchangeBillList_Query"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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å对象çåå |
| | | } |
| | | |
| | | res.code = CodeConstant.SUCCEED; |
| | | res.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString()); |
| | | res.Message = "Sucessï¼"; |
| | | res.list = columnNameList; |
| | | res.data = ds.Tables[0]; |
| | | return res; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | res.code = CodeConstant.FAIL; |
| | | res.count = CountConstant.FAIL; |
| | | res.Message = "Exceptionï¼" + e.ToString(); |
| | | res.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å·¥åºæµè½¬å¡å表 |
| | | /// <summary> |
| | | /// è·åå·¥åºæµè½¬å¡åè¡¨ä¿¡æ¯ |
New file |
| | |
| | | using Newtonsoft.Json; |
| | | using SyntacticSugar.constant; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Linq; |
| | | using System.Net; |
| | | using System.Net.Http; |
| | | using System.Web.Http; |
| | | using WebAPI.Models; |
| | | |
| | | namespace WebAPI.Controllers.CKGL.TMZD |
| | | { |
| | | public class Gy_BarCodeBillListController : ApiController |
| | | { |
| | | //è·åç³»ç»åæ° |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | public DBUtility.ClsPub.Enum_BillStatus BillStatus; |
| | | public string sWhere = ""; |
| | | private json objJsonResult = new json(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | DataSet ds; |
| | | |
| | | #region æ¡ç 主档å页å表 |
| | | [Route("Gy_BarCodeBillList/page")] |
| | | [HttpGet] |
| | | public json page(string sWhere, string user, int page, int size) |
| | | { |
| | | json res = new json(); |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Gy_Material", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æ¥çæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_IF_BarCodeBillList " + page + "," + size + ",''", "h_p_IF_BarCodeBillList"); |
| | | } |
| | | else |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_IF_BarCodeBillList " + page + "," + size + ",'" + sWhere + "'", "h_p_IF_BarCodeBillList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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å对象çåå |
| | | } |
| | | |
| | | res.code = CodeConstant.SUCCEED; |
| | | res.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString()); |
| | | res.Message = "Sucessï¼"; |
| | | res.list = columnNameList; |
| | | res.data = ds.Tables[0]; |
| | | return res; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | res.code = CodeConstant.FAIL; |
| | | res.count = CountConstant.FAIL; |
| | | res.Message = "Exceptionï¼" + e.ToString(); |
| | | res.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | using System.Windows.Forms; |
| | | using WebAPI.Controllers.SCGL.æ¥è®¡å管ç; |
| | | using WebAPI.Models; |
| | | |
| | | using SyntacticSugar.constant; |
| | | namespace WebAPI.Controllers |
| | | { |
| | | //å·¥èºè·¯çº¿Controller |
| | |
| | | int IsProNo = mainList[0].IsProNo;//æ¯å¦è½¬å·¥åº |
| | | HName_LongShan = mainList[0].HName;//å·¥èºè·¯çº¿åç§° |
| | | string HProcPriceType = mainList[0].HProcPriceType;//å®é¢ç±»åï¼ä¸´æ¶å®é¢ï¼æ°¸ä¹
å®é¢ï¼ |
| | | |
| | | DateTime HBeginDate = mainList[0].HBeginDate;//å¼å§æ¥æ |
| | | DateTime HEndDate = mainList[0].HEndDate;//å¤±ææ¥æ |
| | | |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "å¯è´å¥ç¹") |
| | | { |
| | |
| | | ",HRoutingGroupID,HUnitID,HMaterNumber,HUnitNumber,HStandard" + |
| | | ",HMainGroupID,HMainProcID,HMainCenterID,HMainTimeUnit,HMainUnitTime,HMainWorkQty" + |
| | | ",HMainPrice,HStdSourceQty,HAddSourceRate,HPRDORGID,HDelSourceRate" + |
| | | ",HPicNumVer,HPicNumAssemble,HMaterTexture,HProductNum,HVerNum,HOrgID,HProcPriceType) " + |
| | | ",HPicNumVer,HPicNumAssemble,HMaterTexture,HProductNum,HVerNum,HOrgID,HProcPriceType,HBeginDate,HEndDate) " + |
| | | " values('" + BillType + "','"+ HBillSubType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" + |
| | | "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HMaker + "',getdate()," + HMaterID + ",'" + HName + "'," + HMaterTypeID + |
| | | "," + 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 + ",'"+ HProcPriceType + "') "); |
| | | ",'" + HPicNumVer + "','" + HPicNumAssemble + "','" + HMaterTexture + "','" + HProductNum + "','" + HVerNum + "'," + HOrgID + ",'"+ HProcPriceType + "','" + HBeginDate + "','" + HEndDate + "') "); |
| | | |
| | | LogService.Write("ç¨æ·:" + user + ",æ¥æ:" + DateTime.Now + ",æ°å¢å·¥èºè·¯çº¿åæ®:" + HBillNo); |
| | | oCN.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + user + "','" + HComputerName + "','" + "æ°å¢å·¥èºè·¯çº¿åæ®ï¼" + HBillNo + "','LMES-å·¥èºè·¯çº¿æ¨¡å','" + DBUtility.ClsPub.IPAddress + "','æ°å¢åæ®'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | |
| | | "',HMainTimeUnit='" + HMainTimeUnit + "',HMainUnitTime='" + HMainUnitTime + "',HMainWorkQty='" + HMainWorkQty + "',HMainPrice='" + HMainPrice + |
| | | "',HStdSourceQty='" + HStdSourceQty + "',HAddSourceRate='" + HAddSourceRate + "',HDelSourceRate='" + HDelSourceRate + |
| | | "',HPicNumVer='" + HPicNumVer + "',HPicNumAssemble='" + HPicNumAssemble + "',HMaterTexture='" + HMaterTexture + "'" + |
| | | ",HProductNum='" + HProductNum + "',HVerNum='" + HVerNum + "',HProcPriceType = '" + HProcPriceType + "' where HInterID='" + HInterID + "'"); |
| | | ",HProductNum='" + HProductNum + "',HVerNum='" + HVerNum + "',HProcPriceType = '" + HProcPriceType + "',HBeginDate = '" + HBeginDate + "',HEndDate = '" + HEndDate + "' where HInterID='" + HInterID + "'"); |
| | | |
| | | //å é¤å表 |
| | | oCN.RunProc("delete from Gy_RoutingBillSub where HInterID='" + HInterID + "'"); |
| | |
| | | foreach (Gy_RoutingBillSub oSub in DetailColl) |
| | | { |
| | | i++; |
| | | if (oSystemParameter.omodel.WMS_CampanyName != "é¾å±±æ±½é
") |
| | | if (oSystemParameter.omodel.WMS_CampanyName != "é¾å±±æ±½é
" && oSystemParameter.omodel.WMS_CampanyName != "æ·»åº·ç§æ") |
| | | { |
| | | if (oSub.HWorkQty <= 0) |
| | | { |
| | |
| | | |
| | | oCN.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + user_LongShan + "','" + HComputerName + "','" + "Gy_RoutingBill_Edit,å·¥èºè·¯çº¿_ç¼è¾" + "','LMESç³»ç»-å·¥èºè·¯çº¿ç¼è¾æ¨¡å','" + DBUtility.ClsPub.IPAddress + "','" + "ä¿®æ¹äºå·¥èºè·¯çº¿ï¼" + HName_LongShan + " å·¥åºå·ï¼" + oSub.HProcNo + " 工价为ï¼" + oSub.HProcPrice.ToString() + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | } |
| | | } |
| | | |
| | | //ä¿ååæ§å¶========================================= æ·»å å®¡æ¹æµ |
| | | ds = oCN.RunProcReturn("exec h_p_Gy_RoutingBill_AfterSaveCtrl " + HInterID, "h_p_Gy_RoutingBill_AfterSaveCtrl"); |
| | | |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿ååå¤æå¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //========================================================= |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region å·¥èºè·¯çº¿éè¦æå®¡æ¹æµå®¡æ¹ç |
| | | [Route("Gy_Routing/NeedChecklist")] |
| | | [HttpGet] |
| | | public object NeedChecklist(string user, string userid) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //夿æ¯å¦ææ¥è¯¢æé |
| | | |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "æ æéæ¥ç!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //æç´¢éè¦å®¡æ ¸ç |
| | | string sql = " select a.*,c.HItemID as HCheckFlowStatusID,m.HName as å®¡æ¹æµ,c.HCheckFlowID,i.HName as 审æ¹é¡¹ç®åç§°,c.HCheckItemID,c.HChecker as 项ç®å®¡æ ¸äºº,c.HCheckNote as å®¡æ¹æµå®¡æ ¸å»ºè®®,c.HCheckDate å®¡æ¹æµå®¡æ ¸æ¥æ from h_v_Gy_RoutingBillList AS a LEFT JOIN Xt_BillCheckFlowStatus AS c ON a.hmainid = c.HBillInterID and a.åæ®ç±»å = c.HBillTypeID" + |
| | | " LEFT JOIN Xt_CheckFlowMain as m ON m.HInterID = c.HCheckFlowID" + |
| | | " LEFT JOIN Gy_RoutingBillMain as po ON a.hmainid = po.HInterID" + |
| | | " LEFT JOIN Xt_CheckItem as i ON i.HItemID = c.HCheckItemID" + |
| | | " LEFT JOIN Xt_CheckUserRight as cr ON cr.HCheckItemID = i.HItemID and cr.HCheckFlowInterID = m.HInterID" + |
| | | " where po.HBillStatus = 6 and po.HCheckItemNowID = i.HItemID and cr.HUserID = '" + userid + "'"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_RoutingBillList"); |
| | | 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 = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region å·¥èºè·¯çº¿å·²ç»å®¡æ¹æµå®¡æ¹ç |
| | | [Route("Gy_Routing/Checkedlist")] |
| | | [HttpGet] |
| | | public object Checkedlist(string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //夿æ¯å¦ææ¥è¯¢æé |
| | | |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "æ æéæ¥ç!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //æç´¢éè¦å®¡æ ¸ç |
| | | string sql = " select DISTINCT a.*,c.HItemID as HCheckFlowStatusID,m.HName as å®¡æ¹æµ,c.HCheckFlowID,i.HName as 审æ¹é¡¹ç®åç§°,c.HCheckItemID,c.HChecker as 项ç®å®¡æ ¸äºº,c.HCheckNote as å®¡æ¹æµå®¡æ ¸å»ºè®®,c.HCheckDate å®¡æ¹æµå®¡æ ¸æ¥æ from h_v_Gy_RoutingBillList AS a LEFT JOIN Xt_BillCheckFlowStatus AS c ON a.hmainid = c.HBillInterID and a.åæ®ç±»å = c.HBillTypeID" + |
| | | " LEFT JOIN Xt_CheckFlowMain as m ON m.HInterID = c.HCheckFlowID" + |
| | | " LEFT JOIN Xt_CheckItem as i ON i.HItemID = c.HCheckItemID" + |
| | | " where c.HCheckDate is not NUll and c.HChecker = '" + user + "'"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_RoutingBillList"); |
| | | 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 = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region å·¥èºè·¯çº¿é©³å |
| | | [Route("Gy_Routing/RejectCheckFlow")] |
| | | [HttpGet] |
| | | public object RejectCheckFlow(string HInterID, string CurUserID) |
| | | { |
| | | try |
| | | { |
| | | Int64 lngBillKey = 0; |
| | | lngBillKey = DBUtility.ClsPub.isLong(HInterID); //对HInterIDè¿è¡ç±»åçè½¬æ¢ |
| | | DAL.ClsGy_RoutingBill oBill = new DAL.ClsGy_RoutingBill(); //å®ä¾ååæ®æä½ç±»ï¼ç¨äºè¿è¡ç¸å
³æä½ |
| | | if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) //æ ¹æ®HInterIDè·åè¯¥åæ®çæ°æ® |
| | | { |
| | | if (oBill.omodel.HBillStatus != 6) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "åæ®æªå¨å®¡æ ¸ä¸ä¸è½é©³å"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //å起驳å |
| | | if (oBill.RejectCheckFlowProgress(lngBillKey, oBill.omodel.HBillNo, CurUserID, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = "驳åæå"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "驳å失败失败!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "åæ®ä¸åå¨!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å·¥èºè·¯çº¿ åèµ·å®¡æ¹ |
| | | [Route("Gy_Routing/StartCheckFlow")] |
| | | [HttpGet] |
| | | public object StartCheckFlow(int HInterID, string CurUserName) |
| | | { |
| | | DBUtility.ClsPub.CurUserName = CurUserName; |
| | | try |
| | | { |
| | | ////å®¡æ ¸æé |
| | | //if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼æ æéï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | //HInterIDæ°æ®å¤æ |
| | | if (HInterID <= 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "HInterIDå°äº0ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | Int64 lngBillKey = 0; |
| | | lngBillKey = DBUtility.ClsPub.isLong(HInterID); //对HInterIDè¿è¡ç±»åçè½¬æ¢ |
| | | DAL.ClsGy_RoutingBill oBill = new DAL.ClsGy_RoutingBill(); //å®ä¾ååæ®æä½ç±»ï¼ç¨äºè¿è¡ç¸å
³æä½ |
| | | |
| | | //åèµ·å®¡æ¹ |
| | | if (oBill.startCheckFlow(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = "åèµ·å®¡æ¹æå"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "å起审æ¹å¤±è´¥!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "å起审æ¹å¤±è´¥å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å·¥èºè·¯çº¿ å¤çº§ å®¡æ ¸/åå®¡æ ¸ |
| | | /// <summary> |
| | | /// </summary> |
| | | /// <param name="HInterID">忮ID</param> |
| | | /// <param name="IsAudit">å®¡æ ¸(0),åå®¡æ ¸(1)</param> |
| | | /// <param name="CurUserName">å®¡æ ¸äºº</param> |
| | | /// <returns></returns> |
| | | [Route("Gy_Routing/AuditFlow")] |
| | | [HttpGet] |
| | | public object AuditGy_Routing_Flow(int HInterID, int IsAudit, string CurUserName, string CurUserID) |
| | | { |
| | | //string ModRightNameCheck = "Gy_Routing_Check"; |
| | | DBUtility.ClsPub.CurUserName = CurUserName; |
| | | try |
| | | { |
| | | ////å®¡æ ¸æé |
| | | //if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼æ æéï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | |
| | | //HInterIDæ°æ®å¤æ |
| | | if (HInterID <= 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "HInterIDå°äº0ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | Int64 lngBillKey = 0; |
| | | lngBillKey = DBUtility.ClsPub.isLong(HInterID); //对HInterIDè¿è¡ç±»åçè½¬æ¢ |
| | | DAL.ClsGy_RoutingBill oBill = new DAL.ClsGy_RoutingBill(); //å®ä¾ååæ®æä½ç±»ï¼ç¨äºè¿è¡ç¸å
³æä½ |
| | | |
| | | //é对éè¦è¿è¡çæä½ï¼æ£éªå½ååæ®çç¶ææ¯å¦æ¯æéè¦è¿è¡çæä½ |
| | | if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) //æ ¹æ®HInterIDè·åè¯¥åæ®çæ°æ® |
| | | { |
| | | if (oBill.omodel.HCloseMan.Trim() != "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "忮已å
³é!ä¸è½åæ¬¡å®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (oBill.omodel.HDeleteMan.Trim() != "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "忮已ä½åº!ä¸è½åæ¬¡å®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (IsAudit == TypeConstant.AUDIT) //å®¡æ ¸å¤æ |
| | | { |
| | | //夿æ¯å¦å·²ç»åèµ·å®¡æ¹ |
| | | string sql0 = "select * from Xt_BillCheckFlowStatus where HBillInterID = " + lngBillKey + " and HBillTypeID = '" + oBill.BillType + "'"; |
| | | DataSet ds0 = oCN.RunProcReturn(sql0, "Xt_BillCheckFlowStatus"); |
| | | if (ds0 != null && ds0.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥!åå :åæ®æªå起审æ¹ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //夿忮å½åç¶æ |
| | | if (oBill.omodel.HChecker.Trim() != "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥!åå :åæ®å·²å®æå®¡æ ¸!ä¸è½ç»§ç»å®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | if (IsAudit == TypeConstant.REVERSE_AUDIT) //åå®¡æ ¸å¤æ |
| | | { |
| | | //夿æ¯å¦åå¨å®¡æ ¸è¿çé¡¹ç® |
| | | string sql0 = "select * from Xt_BillCheckFlowStatus where HBillInterID = " + lngBillKey + " and HBillTypeID = '" + oBill.BillType + "' and ISNULL(HChecker,'') <> ''"; |
| | | DataSet ds0 = oCN.RunProcReturn(sql0, "Xt_BillCheckFlowStatus"); |
| | | if (ds0 != null && ds0.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "åå®¡æ ¸å¤±è´¥!åå :åæ®ä¸åå¨å·²ç»å®¡æ ¸ç项ç®ï¼ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "åæ®ä¸åå¨!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | oCN.BeginTran(); |
| | | //è¿è¡éè¦è¿è¡çå®¡æ ¸/åå®¡æ ¸æä½ |
| | | if (IsAudit == TypeConstant.AUDIT) //å®¡æ ¸æäº¤ |
| | | { |
| | | #region å®¡æ ¸åçç¸å
³å¤æ |
| | | //å®¡æ ¸åæ§å¶========================================= |
| | | //string sql1 = "exec h_p_Gy_Routing_BeforeCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'"; |
| | | //ds = oCN.RunProcReturn(sql1, "h_p_Gy_Routing_BeforeCheckCtrl"); |
| | | //if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "å®¡æ ¸å¤±è´¥!åå :å®¡æ ¸åå¤æå¤±è´¥ï¼è¯·ä¸ç½ç»ç®¡ç人åèç³»"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | //if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "å®¡æ ¸å¤±è´¥!åå :" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | //================================================================================== |
| | | |
| | | //è¿è¡ ä¼è®¡æé´ ç»è´¦ çå¤æåæ§å¶ |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | DateTime HDate = DateTime.Now; |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | objJsonResult.Message = s; |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | //è·åå½åå®¡æ ¸é¡¹ç® |
| | | string sql0 = "select * from " + oBill.MvarItemKey + " where HInterID = " + lngBillKey; |
| | | DataSet ds0 = oCN.RunProcReturn(sql0, oBill.MvarItemKey); |
| | | string HCheckFlowID = ds0.Tables[0].Rows[0]["HCheckFlowID"].ToString(); //å®¡æ¹æµå
ç |
| | | string HCheckItemNowID = ds0.Tables[0].Rows[0]["HCheckItemNowID"].ToString(); //å½å审æ¹é¡¹ç®å
ç |
| | | string HCheckItemNextID = ds0.Tables[0].Rows[0]["HCheckItemNextID"].ToString(); //å¾
审æ¹é¡¹ç®å
ç |
| | | |
| | | //å¤æç¨æ·æ¯å¦ææé å®¡æ¹ å½åå®¡æ¹æµç审æ¹é¡¹ç® |
| | | //string sql01 = "select * from Xt_CheckUserRight where HUserID = '" + CurUserID + "' and HCheckFlowInterID = " + HCheckFlowID + " and HCheckItemID = " + HCheckItemNowID + " and HValue = 1"; |
| | | string sql01 = "select * from Xt_CheckUserRight where HUserID = '" + CurUserID + "' and HCheckFlowInterID = " + HCheckFlowID + " and HCheckItemID = " + HCheckItemNowID + ""; |
| | | DataSet ds01 = oCN.RunProcReturn(sql01, "Xt_CheckUserRight"); |
| | | if (ds01.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥!åå :ç¨æ·æ å½åå®¡æ ¸é¡¹ç®çå®¡æ ¸æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //æ´æ° 忮审æ¹ç¶æè¡¨ ä¸å¯¹åºå®¡æ ¸é¡¹ç®çå®¡æ ¸ç¶æ |
| | | string sql02 = "update Xt_BillCheckFlowStatus set HChecker='" + CurUserName + "',HCheckDate=getdate() where HBillTypeID = '" + oBill.BillType + "' and HBillInterID=" + lngBillKey + " and HCheckFlowID=" + HCheckFlowID + " and HCheckItemID=" + HCheckItemNowID; |
| | | oCN.RunProc(sql02); |
| | | |
| | | //夿å½åå®¡æ ¸é¡¹ç®æ¯å¦æ¯æåä¸ä¸ªé¡¹ç®ï¼å¦ææ¯ï¼å®¡æ ¸ååååæ®çåæ®ç¶æã妿䏿¯ï¼è·åä¸ä¸ä¸ªå®¡æ ¸é¡¹ç®å¹¶æ´æ°å°éå®è®¢å主表 |
| | | if (HCheckItemNextID != "0") //ååå®¡æ ¸çå®¡æ ¸é¡¹ç®ä¸æ¯æåä¸ä¸ªå®¡æ ¸é¡¹ç® |
| | | { |
| | | string sql03 = "select b.HInterID,b.HCheckItemID from Xt_CheckFlowMain as a " + |
| | | "inner join Xt_CheckFlowSub as b on a.HInterID = b.HInterID " + |
| | | "where a.HBillTypeID = '" + oBill.BillType + "' " + |
| | | "and a.HInterID = " + HCheckFlowID + " " + |
| | | "order by b.HFlowNo asc"; |
| | | DataSet ds03 = oCN.RunProcReturn(sql03, "Xt_CheckFlowMain"); |
| | | |
| | | //è·åæ°çå½åå®¡æ ¸é¡¹ç®åå¾
å®¡æ ¸é¡¹ç® |
| | | for (int i = 0; i < ds03.Tables[0].Rows.Count; i++) |
| | | { |
| | | if (ds03.Tables[0].Rows[i]["HCheckItemID"].ToString() == HCheckItemNextID) |
| | | { |
| | | HCheckItemNowID = HCheckItemNextID; |
| | | } |
| | | else if (HCheckItemNowID == HCheckItemNextID) |
| | | { |
| | | HCheckItemNextID = ds03.Tables[0].Rows[i]["HCheckItemID"].ToString(); |
| | | break; |
| | | } |
| | | } |
| | | //æ°çå½åå®¡æ ¸é¡¹ç®ä¸ºæåä¸ä¸ªå®¡æ ¸é¡¹ç®ï¼å¾
å®¡æ ¸é¡¹ç®ä¸åå¨ï¼è®¾ä¸ºé»è®¤å¼"0" |
| | | if (HCheckItemNowID == HCheckItemNextID) |
| | | { |
| | | HCheckItemNextID = "0"; |
| | | } |
| | | |
| | | //æ´æ°åæ®ä¸»è¡¨çå®¡æ¹æµæ°æ® |
| | | string sql04 = "update " + oBill.MvarItemKey + " set HCheckItemNowID=" + HCheckItemNowID + ",HCheckItemNextID=" + HCheckItemNextID + " where HInterID = " + lngBillKey; |
| | | oCN.RunProc(sql04); |
| | | |
| | | |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = "å®¡æ ¸æå"; |
| | | objJsonResult.data = null; |
| | | } |
| | | else //ååå®¡æ ¸çå®¡æ ¸é¡¹ç®æ¯æåä¸ä¸ªå®¡æ ¸é¡¹ç® |
| | | { |
| | | //æ´æ°åæ®ä¸»è¡¨çå®¡æ¹æµæ°æ® |
| | | HCheckItemNowID = "0"; |
| | | HCheckItemNextID = "0"; |
| | | |
| | | string sql04 = "update " + oBill.MvarItemKey + " set HCheckItemNowID=" + HCheckItemNowID + ",HCheckItemNextID=" + HCheckItemNextID + " where HInterID = " + lngBillKey; |
| | | oCN.RunProc(sql04); |
| | | |
| | | //æ´æ°åæ®çåæ®ç¶æ |
| | | if (oBill.CheckBill(oCN, oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Gy_RoutingBill_AfterCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = "å®¡æ ¸æå"; |
| | | objJsonResult.data = null; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | if (IsAudit == TypeConstant.REVERSE_AUDIT) //åå®¡æ ¸æäº¤ |
| | | { |
| | | #region åå®¡æ ¸åçç¸å
³å¤æ |
| | | //åå®¡æ ¸åæ§å¶========================================= |
| | | DataSet ds = oCN.RunProcReturn("Exec h_p_Gy_Routing_BeforeUnCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'", "h_p_Gy_Routing_BeforeUnCheckCtrl"); |
| | | if (ds == null) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "åå®¡æ ¸å¤±è´¥!åå :" + "åå®¡æ ¸åå¤æå¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "åå®¡æ ¸å¤±è´¥!åå :" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //========================================================= |
| | | |
| | | //è¿è¡ ä¼è®¡æé´ ç»è´¦ çå¤æåæ§å¶ |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | DateTime HDate = DateTime.Now; |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | objJsonResult.Message = s; |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | //è·åéè¦åå®¡æ ¸çå®¡æ ¸é¡¹ç® |
| | | string sql0 = "select c.* from Xt_CheckFlowMain as a " + |
| | | "inner join Xt_CheckFlowSub as b on a.HInterID = b.HInterID " + |
| | | "inner join Xt_BillCheckFlowStatus as c on a.HBillTypeID = c.HBillTypeID and b.HCheckItemID = c.HCheckItemID " + |
| | | "where c.HBillTypeID = '" + oBill.BillType + "' and c.HBillInterID = " + lngBillKey + " " + |
| | | "order by b.HFlowNo asc"; |
| | | DataSet ds0 = oCN.RunProcReturn(sql0, "Xt_BillCheckFlowStatus"); |
| | | if (ds0 == null || ds0.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "åå®¡æ ¸å¤±è´¥!åå :æªå起审æ¹ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | string HCheckFlowID = ds0.Tables[0].Rows[0]["HCheckFlowID"].ToString(); //å®¡æ¹æµå
ç |
| | | string HCheckItemNowID = "0"; //å½å审æ¹é¡¹ç®å
ç |
| | | string HCheckItemNextID = "0"; //å¾
审æ¹é¡¹ç®å
ç |
| | | if (oBill.omodel.HBillStatus == 6) |
| | | { |
| | | for (int i = 0; i < ds0.Tables[0].Rows.Count; i++) |
| | | { |
| | | if (ds0.Tables[0].Rows[i]["HChecker"].ToString() != "") |
| | | { |
| | | HCheckItemNowID = ds0.Tables[0].Rows[i]["HCheckItemID"].ToString(); |
| | | HCheckItemNextID = ds0.Tables[0].Rows[i]["HCheckItemID"].ToString(); |
| | | } |
| | | else |
| | | { |
| | | HCheckItemNextID = ds0.Tables[0].Rows[i]["HCheckItemID"].ToString(); |
| | | break; |
| | | } |
| | | } |
| | | if (HCheckItemNowID == HCheckItemNextID) |
| | | { |
| | | HCheckItemNextID = "0"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | HCheckItemNowID = ds0.Tables[0].Rows[ds0.Tables[0].Rows.Count - 1]["HCheckItemID"].ToString(); |
| | | HCheckItemNextID = "0"; |
| | | } |
| | | |
| | | //å¤æç¨æ·æ¯å¦ææé å®¡æ¹ å½åå®¡æ¹æµç审æ¹é¡¹ç® |
| | | //string sql01 = "select * from Xt_CheckUserRight where HUserID = '" + CurUserID + "' and HCheckFlowInterID = " + HCheckFlowID + " and HCheckItemID = " + HCheckItemNowID + " and HValue = 1"; |
| | | string sql01 = "select * from Xt_CheckUserRight where HUserID = '" + CurUserID + "' and HCheckFlowInterID = " + HCheckFlowID + " and HCheckItemID = " + HCheckItemNowID + ""; |
| | | DataSet ds01 = oCN.RunProcReturn(sql01, "Xt_CheckUserRight"); |
| | | if (ds01.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "åå®¡æ ¸å¤±è´¥!åå :ç¨æ·æ å½åå®¡æ ¸é¡¹ç®çå®¡æ ¸æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | //æ´æ° 忮审æ¹ç¶æè¡¨ ä¸å¯¹åºå®¡æ ¸é¡¹ç®çå®¡æ ¸ç¶æ |
| | | string sql02 = "update Xt_BillCheckFlowStatus set HChecker='',HCheckDate='' where HBillTypeID = '" + oBill.BillType + "' and HBillInterID=" + lngBillKey + " and HCheckFlowID=" + HCheckFlowID + " and HCheckItemID=" + HCheckItemNowID; |
| | | oCN.RunProc(sql02); |
| | | |
| | | //夿åå®¡æ ¸çåæ®æ¯å¦å·²ç»å®¡æ ¸å®æï¼è¥å®¡æ ¸å®æï¼åå®¡æ ¸éè¦åæ´åæ®ç¶æã |
| | | if (oBill.omodel.HBillStatus == 6) |
| | | { |
| | | //æ´æ°åæ®ä¸»è¡¨çå®¡æ¹æµæ°æ® |
| | | string sql04 = "update " + oBill.MvarItemKey + " set HCheckItemNowID=" + HCheckItemNowID + ",HCheckItemNextID=" + HCheckItemNextID + " where HInterID = " + lngBillKey; |
| | | oCN.RunProc(sql04); |
| | | |
| | | |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = "å®¡æ ¸æå"; |
| | | objJsonResult.data = null; |
| | | } |
| | | else |
| | | { |
| | | |
| | | //åå®¡æ ¸æäº¤AbandonCheck |
| | | if (oBill.AbandonCheck(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | | //æ´æ°åæ®ä¸»è¡¨çå®¡æ¹æµæ°æ® |
| | | string sql04 = "update " + oBill.MvarItemKey + " set HCheckItemNowID=" + HCheckItemNowID + ",HCheckItemNextID=" + HCheckItemNextID + ",HBillStatus=6 " + " where HInterID = " + lngBillKey; |
| | | oCN.RunProc(sql04); |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = "åå®¡æ ¸æå"; |
| | | objJsonResult.data = null; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "åå®¡æ ¸å¤±è´¥!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | |
| | | oCN.Commit(); |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥æè
åå®¡æ ¸å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | } |
| | | } |
| | |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using SyntacticSugar.constant; |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | #region å·¥èºè·¯çº¿ |
| | | |
| | | #region å·¥èºè·¯çº¿å页å表 |
| | | [Route("Gy_RoutingBill/page")] |
| | | [HttpGet] |
| | | public json Gy_RoutingBillPage(string sWhere, string user, int page, int size) |
| | | { |
| | | DataSet ds; |
| | | json res = new json(); |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Gy_RoutingBill_Query", 1, false, user)) |
| | | { |
| | | res.code = "0"; |
| | | res.count = 0; |
| | | res.Message = "æ æ¥çæéï¼"; |
| | | res.data = null; |
| | | return res; |
| | | } |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_Gy_RoutingBillList " + page + "," + size + ",''", "h_p_Gy_RoutingBillList"); |
| | | } |
| | | else |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_Gy_RoutingBillList " + page + "," + size + ",'" + sWhere + "'", "h_p_Gy_RoutingBillList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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å对象çåå |
| | | } |
| | | |
| | | res.code = CodeConstant.SUCCEED; |
| | | res.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString()); |
| | | res.Message = "Sucessï¼"; |
| | | res.list = columnNameList; |
| | | res.data = ds.Tables[0]; |
| | | return res; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | res.code = CodeConstant.FAIL; |
| | | res.count = CountConstant.FAIL; |
| | | res.Message = "Exceptionï¼" + e.ToString(); |
| | | res.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å·¥èºè·¯çº¿å表 |
| | | /// <summary> |
| | | /// è¿åå·¥èºè·¯çº¿å表 |
| | |
| | | return GetObjectJson(ds); |
| | | } |
| | | |
| | | #region ç产订åå页å表 |
| | | [Route("LEMS/MES_IF_ICMOBillListPage")] |
| | | [HttpGet] |
| | | public object MES_IF_ICMOBillListPage(string sWhere, string user, int page, int size) |
| | | { |
| | | DataSet ds; |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Sc_ICMOBillQuery", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æ¥çæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_IF_ICMOBillList " + page + "," + size + ",''", "h_p_IF_ICMOBillList"); |
| | | } |
| | | else |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_IF_ICMOBillList " + page + "," + size + ",'" + sWhere + "'", "h_p_IF_ICMOBillList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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("LEMS/MES_IF_ProcessBillList_Json")] |
| | | [HttpGet] |
| | |
| | | } |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | | oCN.BeginTran(); |
| | | //ä¿ååæ§å¶========================================= |
| | | string HBillNote = ""; |
| | | ds = oCN.RunProcReturn("Exec h_p_Gy_EquipFileBillMain_BeforeSaveCtrl " + HInterID.ToString() + ", '" + hbillno + "','" + HBillNote + "',1 ", "h_p_Gy_EquipFileBillMain_BeforeSaveCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¿å失败!åå :ä¿ååå¤æå¤±è´¥ï¼è¯·ä¸ç½ç»ç®¡ç人åèç³»"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¿å失败!åå :" + ds.Tables[0].Rows[0]["HBackRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //========================================================= |
| | | //主表 |
| | | oCN.RunProc("Insert into Gy_EquipFileBillMain " + |
| | | " (HInterID,hbillno,HEquipFileNumber,HEquipFileNo,HName,HModel,HModel2,HMaterID,HUnitID,HOutComDate" + |
| | |
| | | "','" + HBarCode + "','" + HWorkArea + "','" + HLogo + "'," + HSellSupID + "," + HMakeSupID + ",'3308','" + HDate + "','" + HYear + "','" + HMaker + "','" + HMakeDate + "','" + HEquipMaintainRuleInterID + "','" + HEquipDotCheckRuleInterID +"'," + HSourceID + ",'" + HMainSourceFlag + "','" + HMacAddress + "','" + HMainSourceID + "')", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //ä¿®æ¹ä¸çº§ä¸ºéæ«çº§ä»£ç |
| | | objJsonResult = AddBillSub(msg3, msg4, HInterID, hbillno, 1); |
| | | |
| | | //ä¿ååæ§å¶========================================= |
| | | ds = oCN.RunProcReturn("Exec h_p_Gy_EquipFileBillMain_AfterSaveCtrl " + HInterID.ToString() + ", '" + hbillno + "','" + HBillNote + "',1 ", "h_p_Gy_EquipFileBillMain_AfterSaveCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¿å失败!åå :ä¿ååå¤æå¤±è´¥ï¼è¯·ä¸ç½ç»ç®¡ç人åèç³»"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¿å失败!åå :" + ds.Tables[0].Rows[0]["HBackRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | //========================================================= |
| | | |
| | | oCN.Commit(); |
| | | //objJsonResult.data = null; |
| | | return objJsonResult; |
| | |
| | | using Newtonsoft.Json; |
| | | using Model; |
| | | using Newtonsoft.Json; |
| | | using SyntacticSugar.constant; |
| | | using System; |
| | | using System.Collections.Generic; |
| | |
| | | string sql = "select * from h_v_Sb_EquipMentCollectionTechParam_TempList where 1 = 1" + sWhere; |
| | | DataSet ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipMentCollectionTechParam_TempList"); |
| | | |
| | | |
| | | |
| | | //æ°æ®éå, è·ååå |
| | | List<object> columnNameList = new List<object>(); |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | |
| | | string msg3 = sArray[1].ToString(); |
| | | string msg4 = sArray[2].ToString(); |
| | | string msg5 = sArray[3].ToString(); |
| | | |
| | | string msg6 = sArray[4].ToString(); |
| | | |
| | | string UserName = ""; |
| | | ListModels oListModels = new ListModels(); |
| | |
| | | oBill.DetailColl.Add(oItemSub); |
| | | |
| | | } |
| | | |
| | | //è¡¨ä½æ°æ® |
| | | //æ },{æ¥æåæ°ç» //廿ãåã |
| | | //妿æ¯ç¼è¾å°±å
许ä¿å,å¦åä¸å
许 |
| | | if (oBill.omodel.HInterID != 0) |
| | | { |
| | | msg6 = msg6.Substring(1, msg6.Length - 2); |
| | | msg6 = msg6.Replace("\\", ""); |
| | | msg6 = msg6.Replace("\n", ""); |
| | | List<Model.ClsSc_MouldMaintainPlanBillSub_Plan> lss = new List<Model.ClsSc_MouldMaintainPlanBillSub_Plan>(); |
| | | lss = oListModels.getObjectByJson_Sc_MouldMaintainPlanBillSub_Plan(msg6); |
| | | int l = 0; |
| | | foreach (Model.ClsSc_MouldMaintainPlanBillSub_Plan oItem in lss) |
| | | { |
| | | |
| | | l++; |
| | | oItem.HEntryID = l; |
| | | oItem.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now); |
| | | oItem.HCloseType = false; //å
³éç±»å |
| | | oItem.HSourceInterID = 0; // æºå主å
ç |
| | | oItem.HSourceEntryID = 0; //æºååå
ç |
| | | oItem.HRelationQty = 0; //å
³èæ°é |
| | | oBill.DetailCol2.Add(oItem); |
| | | } |
| | | } |
| | | |
| | | //ä¿å |
| | | //ä¿å宿¯åå¤ç |
| | | bool bResult; |
| | |
| | | } |
| | | } |
| | | |
| | | [Route("Web/GetMAXNum_ProcExchange")] |
| | | [HttpGet] |
| | | public object GetMAXNum_ProcExchange(string HBillType) |
| | | { |
| | | try |
| | | { |
| | | string HBillNo = ""; |
| | | string sErrMsg = ""; |
| | | Int64 HInterID = 0;//æ¾ç¤ºçåæ®µ |
| | | HInterID = DBUtility.ClsPub.CreateBillID_Prod(HBillType, ref sErrMsg); |
| | | //HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(HBillType, ref sErrMsg, true); |
| | | |
| | | DataSet ds; |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | ds = oCN.RunProcReturn("exec h_p_IF_CheckBillIDExists_WMS " + HInterID + ",'" + HBillNo + "'", "h_p_IF_CheckBillIDExists_WMS"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "åå¨éå¤åæ®å
ç æåæ®å·çåæ®ï¼ä¸å
许æ°å¢ï¼è¯·éåºåéæ°ç»å½ï¼"; |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = sErrMsg; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0][0]) == "1") |
| | | { |
| | | sErrMsg = "åå¨éå¤åæ®å
ç æåæ®å·çåæ®ï¼ä¸å
许æ°å¢ï¼è¯·éåºåéæ°ç»å½ï¼"; |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = sErrMsg; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | //----------å建è表------------------------ |
| | | DataTable dt_Main = new DataTable("Json"); |
| | | dt_Main.Columns.Add("HBillNo", typeof(string)); |
| | | dt_Main.Columns.Add("HInterID", typeof(Int64)); |
| | | //---------å建æ°è¡------------------------ |
| | | DataRow dr_main = dt_Main.NewRow();//å建æ°è¡ |
| | | dt_Main.Rows.Add(dr_main);//å°æ°è¡å å
¥å°è¡¨ä¸ |
| | | dr_main["HBillNo"] = DBUtility.ClsPub.isStrNull(HBillNo); |
| | | dr_main["HInterID"] = DBUtility.ClsPub.isLong(HInterID); |
| | | //è¿åæ°æ® |
| | | objjson.code = "0"; |
| | | objjson.count = 1; |
| | | objjson.Message = "è·åæå"; |
| | | objjson.data = dt_Main; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + e.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// èªå¨è·ååºç¡èµæ æµæ°´å· å°±æ¯ä»£ç |
| | | /// </summary> |
| | |
| | | /// <returns></returns> |
| | | [Route("Web/GetXGPassword")] |
| | | [HttpGet] |
| | | public object GetXGPassword(string UserName, string oldPassword, string PassWord, string Repassword) |
| | | public object GetXGPassword(string UserName, string oldPassword, string PassWord, string Repassword,string HCloudUserName,string HCloudUserPsd) |
| | | { |
| | | try |
| | | { |
| | | ClsCN oCn = new ClsCN(); |
| | | DataSet oDs = new DataSet(); |
| | | //========== |
| | | oDs = oCn.RunProcReturn("select Czmm from Gy_Czygl where Czybm='" + UserName + "'", "Gy_Czygl"); |
| | | if (PassWord.Trim() != Repassword.Trim()) |
| | | |
| | | if(PassWord!=null) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "2次å¯ç ä¸ä¸è´ï¼"; |
| | | objjson.data = oDs.Tables[0]; |
| | | return objjson; ; |
| | | } |
| | | //=========== |
| | | if (oDs == null || oDs.Tables[0].Rows.Count == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "没æè¿ä¸ªç¨æ·ï¼ä¸è½ä¿®æ¹å¯ç ï¼"; |
| | | objjson.data = null; |
| | | return objjson; ; |
| | | } |
| | | else |
| | | { |
| | | oCn.RunProc("update Gy_Czygl set Czmm='" + ClsPub.StrToPsd(PassWord.Trim()) + "' where Czybm='" + UserName.Trim() + "'"); |
| | | oDs = oCn.RunProcReturn("select Czmm from Gy_Czygl where Czybm='" + UserName + "'", "Gy_Czygl"); |
| | | if (PassWord.Trim() != Repassword.Trim()) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "2次å¯ç ä¸ä¸è´ï¼"; |
| | | objjson.data = oDs.Tables[0]; |
| | | return objjson; ; |
| | | } |
| | | //=========== |
| | | if (oDs == null || oDs.Tables[0].Rows.Count == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "没æè¿ä¸ªç¨æ·ï¼ä¸è½ä¿®æ¹å¯ç ï¼"; |
| | | objjson.data = null; |
| | | return objjson; ; |
| | | } |
| | | oCn.RunProc("update Gy_Czygl set Czmm='" + ClsPub.StrToPsd(PassWord.Trim()) + "',HCloudUserName = '" + HCloudUserName+ "',HCloudUserPsd = '" + HCloudUserPsd+ "' where Czybm='" + UserName.Trim() + "'"); |
| | | objjson.code = "0"; |
| | | objjson.count = 1; |
| | | objjson.Message = "* å¯ç ä¿®æ¹æåï¼"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | oCn.RunProc("update Gy_Czygl set HCloudUserName = '" + HCloudUserName + "',HCloudUserPsd = '" + HCloudUserPsd + "' where Czybm='" + UserName.Trim() + "'"); |
| | | objjson.code = "0"; |
| | | objjson.count = 1; |
| | | objjson.Message = "* éè¶äºè´¦å·ä¿®æ¹æåï¼"; |
| | | objjson.data = null; |
| | | return objjson; ; |
| | | } |
| | | } |
| | | catch (Exception) |
| | | catch (Exception e) |
| | | { |
| | | |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "ä¿®æ¹å¯ç å¼å¸¸ï¼"; |
| | | objjson.Message = "ä¿®æ¹å¯ç å¼å¸¸ï¼" + e.ToString(); |
| | | objjson.data = null; |
| | | return objjson; ; |
| | | } |
| | |
| | | #endregion |
| | | |
| | | |
| | | #region å²ä½æè½ æä»¶å¯¼å
¥ä¿å |
| | | #region å²ä½æè½ æä»¶ä¸ä¼ |
| | | [Route("Gy_PostSkill/Gy_PostSkill_Excel")] |
| | | [HttpPost] |
| | | public object Gy_PostSkill_Excel() |
| | | { |
| | | try |
| | | { |
| | | //è·åæä»¶åç§° |
| | | var file = HttpContext.Current.Request.Files[0]; |
| | | //è·åæä»¶ç©çè·¯å¾ |
| | | string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName); |
| | | //ä¿åæä»¶ |
| | | file.SaveAs(ExcelPath); |
| | | |
| | | NpoiHelper np = new NpoiHelper(); |
| | | DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0"); |
| | | |
| | | //å 餿件 |
| | | File.Delete(ExcelPath); |
| | | |
| | | //å建临æ¶è¡¨ |
| | | DataTable tb2 = new DataTable("dt2"); |
| | | |
| | | //æ·»å åå |
| | | for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++) |
| | | { |
| | | tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString()); |
| | | } |
| | | |
| | | //模æ¿ç¼ºå°å ä½éè¦ä»æ°æ®åºä¸æ¥è¯¢åºæ¥æ¾ç¤ºå¨é¡µé¢çåæ®µ |
| | | tb2.Columns.Add("HOrgID", typeof(Int32));//ç»ç»ID |
| | | tb2.Columns.Add("HPostID", typeof(Int32));//å²ä½id |
| | | |
| | | //æ·»å æ°æ® |
| | | for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++) |
| | | { |
| | | DataRow row = tb2.NewRow(); |
| | | for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++) |
| | | { |
| | | row[j] = ExcelDs.Tables[0].Rows[i][j].ToString(); |
| | | } |
| | | tb2.Rows.Add(row); |
| | | } |
| | | |
| | | |
| | | var error = ""; |
| | | |
| | | //æ¥è¯¢æ²¡æçå |
| | | if (!tb2.Columns.Contains("ç»ç»ä»£ç ")) |
| | | error += "æ²¡ææ¾å°ãç»ç»ä»£ç ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("ç»ç»åç§°")) |
| | | error += "æ²¡ææ¾å°ãç»ç»åç§°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å²ä½æè½")) |
| | | error += "æ²¡ææ¾å°ãå²ä½æè½ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å²ä½æè½ä»£ç ")) |
| | | error += "æ²¡ææ¾å°ãå²ä½æè½ä»£ç ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å²ä½")) |
| | | error += "æ²¡ææ¾å°ãå²ä½ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å²ä½ä»£ç ")) |
| | | error += "æ²¡ææ¾å°ãå²ä½ä»£ç ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("夿³¨")) |
| | | error += "æ²¡ææ¾å°ã夿³¨ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å©è®°ç ")) |
| | | error += "æ²¡ææ¾å°ãå©è®°ç ãçæ é¢,"; |
| | | |
| | | if (error.Length > 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = $"Excel模æ¿åå¨é误,{error}\r\n"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | for (int i = 0; i <= tb2.Rows.Count - 1; i++) |
| | | { |
| | | string HProcessName = ""; |
| | | string HProcessNum = ""; |
| | | string HORGNumber = ""; |
| | | string HORGName = ""; |
| | | string HPostName = ""; |
| | | string HPostNumber = ""; |
| | | |
| | | |
| | | HProcessName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["å²ä½æè½"].ToString()); |
| | | HProcessNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["å²ä½æè½ä»£ç "].ToString()); |
| | | HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç»ç»ä»£ç "].ToString()); |
| | | HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç»ç»åç§°"].ToString()); |
| | | HPostName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["å²ä½"].ToString()); |
| | | HPostNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["å²ä½ä»£ç "].ToString()); |
| | | |
| | | //æ£æ¥ç©æ |
| | | int index = i + 1; |
| | | |
| | | if (HORGNumber != "") |
| | | { |
| | | |
| | | //æ¥è¯¢ç»ç» |
| | | ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç»ç»ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | //æ¥è¯¢å²ä½ |
| | | ds = oCN.RunProcReturn("select * from Gy_Post where HNumber='" + HPostNumber + "' and Hname='" + HPostName + "' and HUSEORGID = "+ HORGid, "Gy_Post"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,å²ä½ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HPostID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | |
| | | |
| | | |
| | | //å²ä½æè½åç§° |
| | | if (HProcessName == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,å²ä½æè½ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //å²ä½æè½ä»£ç |
| | | if (HProcessNum == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,å²ä½æè½ä»£ç ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç»ç»ä»£ç 为空"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = error; |
| | | objJsonResult.data = tb2; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å²ä½æè½é¡¹ç® 导å
¥(ä¿å) |
| | | [Route("Gy_PostSkill/Gy_PostSkill_btnSave")] |
| | | [HttpPost] |
| | | public object Gy_PostSkill_btnSave([FromBody] JObject sMainSub) |
| | | { |
| | | var _value = sMainSub["sMainSub"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { "&å" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string user = sArray[1].ToString(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_PostSkill_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "æ ä¿åæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2); |
| | | List<Dictionary<string, string>> list = new List<Dictionary<string, string>>(); |
| | | |
| | | foreach (JObject item in Excel) |
| | | { |
| | | Dictionary<string, string> dic = new Dictionary<string, string>(); |
| | | foreach (var itm in item.Properties()) |
| | | { |
| | | dic.Add(itm.Name, itm.Value.ToString()); |
| | | } |
| | | list.Add(dic); |
| | | } |
| | | |
| | | oCN.BeginTran(); |
| | | int i = 1; |
| | | foreach (Dictionary<string, string> item in list) |
| | | { |
| | | string HOrgID = item["HOrgID"].ToString();//ç»ç»ID |
| | | string HPostID = item["HPostID"].ToString();//ç»ç»ID |
| | | string HName = item["å²ä½æè½"].ToString(); |
| | | string HNumber = item["å²ä½æè½ä»£ç "].ToString(); |
| | | string HRemark = item["夿³¨"].ToString(); |
| | | string HHelpCode = item["å©è®°ç "].ToString(); |
| | | string HUseFlag = "æªæ£æµ"; |
| | | string HShortNumber; |
| | | HShortNumber = DBUtility.ClsPub.GetShortNumber(HNumber);//ç代ç |
| | | if (HShortNumber.Trim() == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "ä¿å失败ï¼ç代ç 为空ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | int HEndFlag = 1;//æ«çº§æ å¿ |
| | | int HLevel = DBUtility.ClsPub.GetLevel(HNumber); //ç级 |
| | | |
| | | |
| | | if (!DBUtility.ClsPub.AllowNumber(HNumber.Trim())) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "ä¿å失败ï¼ä»£ç ä¸ä¸è½åºç°è¿ç»â.âå¹¶ä¸é¦ä½æ«ä½ä¸è½ä¸ºâ.âï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select * from Gy_PostSkill where HNumber='" + HNumber + "'", "Gy_PostSkill"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | oCN.RunProc("Insert into " + "Gy_PostSkill" + |
| | | " (HNumber,HName,HHelpCode,HShortNumber,HParentID" + |
| | | ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime,HUSEORGID,HUseFlag,HMakeEmp,HCREATEORGID,HPostID,HProcID) " + |
| | | " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + 0 + |
| | | "," + HLevel + "," + HEndFlag + "," + 0 + ",'" + HRemark + "','" + DateTime.Now + "','" + HOrgID + "','" + HUseFlag + "','" + user + "','" + HOrgID + "','" + HPostID + "','" + 0 + "')"); |
| | | |
| | | |
| | | } |
| | | else |
| | | { |
| | | oCN.RunProc("Update " + "Gy_PostSkill" + " set " + |
| | | "HName='" + HName + "'" + |
| | | ",HShortNumber='" + HShortNumber + "'" + |
| | | ",HHelpCode='" + HHelpCode + "'" + |
| | | ",HModifyTime='" + DateTime.Now + "'" + |
| | | ",HUSEORGID='" + HOrgID + "'" + |
| | | ",HModifyEmp ='" + user + "'" + |
| | | ",HPostID ='" + HPostID + "'" + |
| | | ",HRemark= '" + HRemark + "' Where HNumber='" + HNumber + "'"); |
| | | } |
| | | |
| | | i++; |
| | | } |
| | | |
| | | oCN.Commit(); |
| | | |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = "导å
¥æå!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogService.Write(e); |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region å²ä½ 设置å表/ä¿å/ç¼è¾/å 餿¹æ³ |
| | | /// <summary> |
| | | /// ä¿åå²ä½ |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å²ä½ æä»¶å¯¼å
¥ä¿å |
| | | #region å²ä½ æä»¶ä¸ä¼ |
| | | [Route("Gy_Post/Gy_Post_Excel")] |
| | | [HttpPost] |
| | | public object Gy_Post_Excel() |
| | | { |
| | | try |
| | | { |
| | | //è·åæä»¶åç§° |
| | | var file = HttpContext.Current.Request.Files[0]; |
| | | //è·åæä»¶ç©çè·¯å¾ |
| | | string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName); |
| | | //ä¿åæä»¶ |
| | | file.SaveAs(ExcelPath); |
| | | |
| | | NpoiHelper np = new NpoiHelper(); |
| | | DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0"); |
| | | |
| | | //å 餿件 |
| | | File.Delete(ExcelPath); |
| | | |
| | | //å建临æ¶è¡¨ |
| | | DataTable tb2 = new DataTable("dt2"); |
| | | |
| | | //æ·»å åå |
| | | for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++) |
| | | { |
| | | tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString()); |
| | | } |
| | | |
| | | //模æ¿ç¼ºå°å ä½éè¦ä»æ°æ®åºä¸æ¥è¯¢åºæ¥æ¾ç¤ºå¨é¡µé¢çåæ®µ |
| | | tb2.Columns.Add("HOrgID", typeof(Int32));//ç»ç»ID |
| | | |
| | | //æ·»å æ°æ® |
| | | for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++) |
| | | { |
| | | DataRow row = tb2.NewRow(); |
| | | for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++) |
| | | { |
| | | row[j] = ExcelDs.Tables[0].Rows[i][j].ToString(); |
| | | } |
| | | tb2.Rows.Add(row); |
| | | } |
| | | |
| | | |
| | | var error = ""; |
| | | |
| | | //æ¥è¯¢æ²¡æçå |
| | | if (!tb2.Columns.Contains("ç»ç»ä»£ç ")) |
| | | error += "æ²¡ææ¾å°ãç»ç»ä»£ç ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("ç»ç»åç§°")) |
| | | error += "æ²¡ææ¾å°ãç»ç»åç§°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å²ä½")) |
| | | error += "æ²¡ææ¾å°ãå²ä½åç§°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å²ä½ä»£ç ")) |
| | | error += "æ²¡ææ¾å°ãå²ä½ä»£ç ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("夿³¨")) |
| | | error += "æ²¡ææ¾å°ã夿³¨ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å©è®°ç ")) |
| | | error += "æ²¡ææ¾å°ãå©è®°ç ãçæ é¢,"; |
| | | |
| | | if (error.Length > 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = $"Excel模æ¿åå¨é误,{error}\r\n"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | for (int i = 0; i <= tb2.Rows.Count - 1; i++) |
| | | { |
| | | string HProcessName = ""; |
| | | string HProcessNum = ""; |
| | | string HORGNumber = ""; |
| | | string HORGName = ""; |
| | | |
| | | |
| | | HProcessName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["å²ä½"].ToString()); |
| | | HProcessNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["å²ä½ä»£ç "].ToString()); |
| | | HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç»ç»ä»£ç "].ToString()); |
| | | HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç»ç»åç§°"].ToString()); |
| | | |
| | | //æ£æ¥ç©æ |
| | | int index = i + 1; |
| | | |
| | | if (HORGNumber != "") |
| | | { |
| | | |
| | | //æ¥è¯¢ç»ç» |
| | | ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç»ç»ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | |
| | | //å²ä½åç§° |
| | | if (HProcessName == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,å²ä½åç§°ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //å²ä½ä»£ç |
| | | if (HProcessNum == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,å²ä½ä»£ç ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç»ç»ä»£ç 为空"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = error; |
| | | objJsonResult.data = tb2; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å²ä½é¡¹ç® 导å
¥(ä¿å) |
| | | [Route("Gy_Post/Gy_Post_btnSave")] |
| | | [HttpPost] |
| | | public object Gy_Post_btnSave([FromBody] JObject sMainSub) |
| | | { |
| | | var _value = sMainSub["sMainSub"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { "&å" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string user = sArray[1].ToString(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_Post_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "æ ä¿åæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2); |
| | | List<Dictionary<string, string>> list = new List<Dictionary<string, string>>(); |
| | | |
| | | foreach (JObject item in Excel) |
| | | { |
| | | Dictionary<string, string> dic = new Dictionary<string, string>(); |
| | | foreach (var itm in item.Properties()) |
| | | { |
| | | dic.Add(itm.Name, itm.Value.ToString()); |
| | | } |
| | | list.Add(dic); |
| | | } |
| | | |
| | | oCN.BeginTran(); |
| | | int i = 1; |
| | | foreach (Dictionary<string, string> item in list) |
| | | { |
| | | string HOrgID = item["HOrgID"].ToString();//ç»ç»ID |
| | | string HName = item["å²ä½"].ToString(); |
| | | string HNumber = item["å²ä½ä»£ç "].ToString(); |
| | | string HRemark = item["夿³¨"].ToString(); |
| | | string HHelpCode = item["å©è®°ç "].ToString(); |
| | | string HUseFlag = "æªæ£æµ"; |
| | | string HShortNumber; |
| | | HShortNumber = DBUtility.ClsPub.GetShortNumber(HNumber);//ç代ç |
| | | if (HShortNumber.Trim() == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "ä¿å失败ï¼ç代ç 为空ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | int HEndFlag = 1;//æ«çº§æ å¿ |
| | | int HLevel = DBUtility.ClsPub.GetLevel(HNumber); //ç级 |
| | | |
| | | |
| | | if (!DBUtility.ClsPub.AllowNumber(HNumber.Trim())) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "ä¿å失败ï¼ä»£ç ä¸ä¸è½åºç°è¿ç»â.âå¹¶ä¸é¦ä½æ«ä½ä¸è½ä¸ºâ.âï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select * from Gy_Post where HNumber='" + HNumber + "'", "Gy_Post"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | oCN.RunProc("Insert into " + "Gy_Post" + |
| | | " (HNumber,HName,HHelpCode,HShortNumber,HParentID" + |
| | | ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime,HUSEORGID,HUseFlag,HMakeEmp,HCREATEORGID) " + |
| | | " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + 0 + |
| | | "," + HLevel + "," + HEndFlag + "," + 0 + ",'" + HRemark + "','" + DateTime.Now + "','" + HOrgID + "','" + HUseFlag + "','" + user + "','" + HOrgID + "')"); |
| | | |
| | | |
| | | } |
| | | else |
| | | { |
| | | oCN.RunProc("Update " + "Gy_Post" + " set " + |
| | | "HName='" + HName + "'" + |
| | | ",HShortNumber='" + HShortNumber + "'" + |
| | | ",HHelpCode='" + HHelpCode + "'" + |
| | | ",HModifyTime='" + DateTime.Now + "'" + |
| | | ",HUSEORGID='" + HOrgID + "'" + |
| | | ",HModifyEmp ='" + user + "'" + |
| | | ",HRemark= '" + HRemark + "' Where HNumber='" + HNumber + "'"); |
| | | } |
| | | |
| | | i++; |
| | | } |
| | | |
| | | oCN.Commit(); |
| | | |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = "导å
¥æå!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogService.Write(e); |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region è°æ¨ç±»å 设置å表/ä¿å/ç¼è¾/å 餿¹æ³ |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region é²éè£
ç½® æä»¶å¯¼å
¥ä¿å |
| | | #region é²éè£
ç½® æä»¶ä¸ä¼ |
| | | [Route("Gy_PreventErrMould/Gy_PreventErrMould_Excel")] |
| | | [HttpPost] |
| | | public object Gy_PreventErrMould_Excel() |
| | | { |
| | | try |
| | | { |
| | | //è·åæä»¶åç§° |
| | | var file = HttpContext.Current.Request.Files[0]; |
| | | //è·åæä»¶ç©çè·¯å¾ |
| | | string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName); |
| | | //ä¿åæä»¶ |
| | | file.SaveAs(ExcelPath); |
| | | |
| | | NpoiHelper np = new NpoiHelper(); |
| | | DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0"); |
| | | |
| | | //å 餿件 |
| | | File.Delete(ExcelPath); |
| | | |
| | | //å建临æ¶è¡¨ |
| | | DataTable tb2 = new DataTable("dt2"); |
| | | |
| | | //æ·»å åå |
| | | for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++) |
| | | { |
| | | tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString()); |
| | | } |
| | | |
| | | //模æ¿ç¼ºå°å ä½éè¦ä»æ°æ®åºä¸æ¥è¯¢åºæ¥æ¾ç¤ºå¨é¡µé¢çåæ®µ |
| | | tb2.Columns.Add("HOrgID", typeof(Int32));//ç»ç»ID |
| | | |
| | | //æ·»å æ°æ® |
| | | for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++) |
| | | { |
| | | DataRow row = tb2.NewRow(); |
| | | for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++) |
| | | { |
| | | row[j] = ExcelDs.Tables[0].Rows[i][j].ToString(); |
| | | } |
| | | tb2.Rows.Add(row); |
| | | } |
| | | |
| | | |
| | | var error = ""; |
| | | |
| | | //æ¥è¯¢æ²¡æçå |
| | | if (!tb2.Columns.Contains("ç»ç»ä»£ç ")) |
| | | error += "æ²¡ææ¾å°ãç»ç»ä»£ç ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("ç»ç»åç§°")) |
| | | error += "æ²¡ææ¾å°ãç»ç»åç§°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("é²éè£
ç½®åç§°")) |
| | | error += "æ²¡ææ¾å°ãé²éè£
ç½®åç§°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("é²éè£
置代ç ")) |
| | | error += "æ²¡ææ¾å°ãé²éè£
置代ç ãçæ é¢,"; |
| | | if (!tb2.Columns.Contains("夿³¨")) |
| | | error += "æ²¡ææ¾å°ã夿³¨ãçæ é¢,"; |
| | | if (!tb2.Columns.Contains("å©è®°ç ")) |
| | | error += "æ²¡ææ¾å°ãå©è®°ç ãçæ é¢,"; |
| | | |
| | | if (error.Length > 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = $"Excel模æ¿åå¨é误,{error}\r\n"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | for (int i = 0; i <= tb2.Rows.Count - 1; i++) |
| | | { |
| | | string HProcessName = ""; |
| | | string HProcessNum = ""; |
| | | string HORGNumber = ""; |
| | | string HORGName = ""; |
| | | |
| | | |
| | | HProcessName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["é²éè£
ç½®åç§°"].ToString()); |
| | | HProcessNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["é²éè£
置代ç "].ToString()); |
| | | HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç»ç»ä»£ç "].ToString()); |
| | | HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç»ç»åç§°"].ToString()); |
| | | |
| | | //æ£æ¥ç©æ |
| | | int index = i + 1; |
| | | |
| | | if (HORGNumber != "") |
| | | { |
| | | |
| | | //æ¥è¯¢ç»ç» |
| | | ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç»ç»ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | |
| | | //é²éè£
ç½®åç§° |
| | | if (HProcessName == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,é²éè£
ç½®åç§°ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //é²éè£
置代ç |
| | | if (HProcessNum == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,é²éè£
置代ç ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç»ç»ä»£ç 为空"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = error; |
| | | objJsonResult.data = tb2; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region é²éè£
ç½®é¡¹ç® å¯¼å
¥(ä¿å) |
| | | [Route("Gy_PreventErrMould/Gy_PreventErrMould_btnSave")] |
| | | [HttpPost] |
| | | public object Gy_PreventErrMould_btnSave([FromBody] JObject sMainSub) |
| | | { |
| | | var _value = sMainSub["sMainSub"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { "&å" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string user = sArray[1].ToString(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_PreventErrMould_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "æ ä¿åæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2); |
| | | List<Dictionary<string, string>> list = new List<Dictionary<string, string>>(); |
| | | |
| | | foreach (JObject item in Excel) |
| | | { |
| | | Dictionary<string, string> dic = new Dictionary<string, string>(); |
| | | foreach (var itm in item.Properties()) |
| | | { |
| | | dic.Add(itm.Name, itm.Value.ToString()); |
| | | } |
| | | list.Add(dic); |
| | | } |
| | | |
| | | oCN.BeginTran(); |
| | | int i = 1; |
| | | foreach (Dictionary<string, string> item in list) |
| | | { |
| | | string HOrgID = item["HOrgID"].ToString();//ç»ç»ID |
| | | string HName = item["é²éè£
ç½®åç§°"].ToString(); |
| | | string HNumber = item["é²éè£
置代ç "].ToString(); |
| | | string HRemark = item["夿³¨"].ToString(); |
| | | string HHelpCode = item["å©è®°ç "].ToString(); |
| | | string HShortNumber; |
| | | HShortNumber = DBUtility.ClsPub.GetShortNumber(HNumber);//ç代ç |
| | | if (HShortNumber.Trim() == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "ä¿å失败ï¼ç代ç 为空ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | int HEndFlag = 1;//æ«çº§æ å¿ |
| | | int HLevel = DBUtility.ClsPub.GetLevel(HNumber); //ç级 |
| | | |
| | | |
| | | if (!DBUtility.ClsPub.AllowNumber(HNumber.Trim())) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "ä¿å失败ï¼ä»£ç ä¸ä¸è½åºç°è¿ç»â.âå¹¶ä¸é¦ä½æ«ä½ä¸è½ä¸ºâ.âï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select * from Gy_PreventErrMould where HNumber='" + HNumber + "'", "Gy_PreventErrMould"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | oCN.RunProc("Insert into " + "Gy_PreventErrMould" + |
| | | " (HNumber,HName,HHelpCode,HShortNumber,HParentID" + |
| | | ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime,HUSEORGID,HUseFlag,HMakeEmp,HCREATEORGID) " + |
| | | " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + 0 + |
| | | "," + HLevel + "," + HEndFlag + "," + 0 + ",'" + HRemark + "','" + DateTime.Now + "','" + HOrgID + "','" + "æªæ£æµ" + "','" + user + "','" + HOrgID + "')"); |
| | | } |
| | | else |
| | | { |
| | | oCN.RunProc("Update " + "Gy_PreventErrMould" + " set " + |
| | | "HName='" + HName + "'" + |
| | | ",HShortNumber='" + HShortNumber + "'" + |
| | | ",HHelpCode='" + HHelpCode + "'" + |
| | | ",HModifyTime='" + DateTime.Now + "'" + |
| | | ",HUSEORGID='" + HOrgID + "'" + |
| | | ",HModifyEmp ='" + user + "'" + |
| | | ",HRemark= '" + HRemark + "' Where HNumber='" + HNumber + "'"); |
| | | } |
| | | |
| | | i++; |
| | | } |
| | | |
| | | oCN.Commit(); |
| | | |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = "导å
¥æå!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogService.Write(e); |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region é²éè£
ç½® 设置å表/ä¿å/ç¼è¾/å 餿¹æ³ |
| | | /// <summary> |
| | | /// é²éè£
ç½® ä¿å |
| | |
| | | try |
| | | { |
| | | //å 餿é |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_CheckNoteItem_Drop", 1, false, user)) |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_CheckNoteItem_Delete", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å¯å¨æ£æ¥é¡¹ç® æä»¶å¯¼å
¥ä¿å |
| | | #region å¯å¨æ£æ¥é¡¹ç® æä»¶ä¸ä¼ |
| | | [Route("Gy_CheckNoteItem/Gy_CheckNoteItem_Excel")] |
| | | [HttpPost] |
| | | public object Gy_CheckNoteItem_Excel() |
| | | { |
| | | try |
| | | { |
| | | //è·åæä»¶åç§° |
| | | var file = HttpContext.Current.Request.Files[0]; |
| | | //è·åæä»¶ç©çè·¯å¾ |
| | | string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName); |
| | | //ä¿åæä»¶ |
| | | file.SaveAs(ExcelPath); |
| | | |
| | | NpoiHelper np = new NpoiHelper(); |
| | | DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0"); |
| | | |
| | | //å 餿件 |
| | | File.Delete(ExcelPath); |
| | | |
| | | //å建临æ¶è¡¨ |
| | | DataTable tb2 = new DataTable("dt2"); |
| | | |
| | | //æ·»å åå |
| | | for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++) |
| | | { |
| | | tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString()); |
| | | } |
| | | |
| | | //模æ¿ç¼ºå°å ä½éè¦ä»æ°æ®åºä¸æ¥è¯¢åºæ¥æ¾ç¤ºå¨é¡µé¢çåæ®µ |
| | | tb2.Columns.Add("HOrgID", typeof(Int32));//ç»ç»ID |
| | | |
| | | //æ·»å æ°æ® |
| | | for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++) |
| | | { |
| | | DataRow row = tb2.NewRow(); |
| | | for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++) |
| | | { |
| | | row[j] = ExcelDs.Tables[0].Rows[i][j].ToString(); |
| | | } |
| | | tb2.Rows.Add(row); |
| | | } |
| | | |
| | | |
| | | var error = ""; |
| | | |
| | | //æ¥è¯¢æ²¡æçå |
| | | if (!tb2.Columns.Contains("ç»ç»ä»£ç ")) |
| | | error += "æ²¡ææ¾å°ãç»ç»ä»£ç ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("ç»ç»åç§°")) |
| | | error += "æ²¡ææ¾å°ãç»ç»åç§°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å¯å¨æ£æ¥é¡¹ç®åç§°")) |
| | | error += "æ²¡ææ¾å°ãå¯å¨æ£æ¥é¡¹ç®åç§°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å¯å¨æ£æ¥é¡¹ç®ä»£ç ")) |
| | | error += "æ²¡ææ¾å°ãå¯å¨æ£æ¥é¡¹ç®ä»£ç ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("夿³¨")) |
| | | error += "æ²¡ææ¾å°ã夿³¨ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å©è®°ç ")) |
| | | error += "æ²¡ææ¾å°ãå©è®°ç ãçæ é¢,"; |
| | | |
| | | if (error.Length > 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = $"Excel模æ¿åå¨é误,{error}\r\n"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | for (int i = 0; i <= tb2.Rows.Count - 1; i++) |
| | | { |
| | | string HProcessName = ""; |
| | | string HProcessNum = ""; |
| | | string HORGNumber = ""; |
| | | string HORGName = ""; |
| | | |
| | | |
| | | HProcessName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["å¯å¨æ£æ¥é¡¹ç®åç§°"].ToString()); |
| | | HProcessNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["å¯å¨æ£æ¥é¡¹ç®ä»£ç "].ToString()); |
| | | HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç»ç»ä»£ç "].ToString()); |
| | | HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç»ç»åç§°"].ToString()); |
| | | |
| | | //æ£æ¥ç©æ |
| | | int index = i + 1; |
| | | |
| | | if (HORGNumber != "") |
| | | { |
| | | |
| | | //æ¥è¯¢ç»ç» |
| | | ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç»ç»ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | |
| | | //å¯å¨æ£æ¥é¡¹ç®åç§° |
| | | if (HProcessName == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,å¯å¨æ£æ¥é¡¹ç®åç§°ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //å¯å¨æ£æ¥é¡¹ç®ä»£ç |
| | | if (HProcessNum == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,å¯å¨æ£æ¥é¡¹ç®ä»£ç ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç»ç»ä»£ç 为空"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = error; |
| | | objJsonResult.data = tb2; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å¯å¨æ£æ¥é¡¹ç®é¡¹ç® 导å
¥(ä¿å) |
| | | [Route("Gy_CheckNoteItem/Gy_CheckNoteItem_btnSave")] |
| | | [HttpPost] |
| | | public object Gy_CheckNoteItem_btnSave([FromBody] JObject sMainSub) |
| | | { |
| | | var _value = sMainSub["sMainSub"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { "&å" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string user = sArray[1].ToString(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_CheckNoteItem_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "æ ä¿åæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2); |
| | | List<Dictionary<string, string>> list = new List<Dictionary<string, string>>(); |
| | | |
| | | foreach (JObject item in Excel) |
| | | { |
| | | Dictionary<string, string> dic = new Dictionary<string, string>(); |
| | | foreach (var itm in item.Properties()) |
| | | { |
| | | dic.Add(itm.Name, itm.Value.ToString()); |
| | | } |
| | | list.Add(dic); |
| | | } |
| | | |
| | | oCN.BeginTran(); |
| | | int i = 1; |
| | | foreach (Dictionary<string, string> item in list) |
| | | { |
| | | string HOrgID = item["HOrgID"].ToString();//ç»ç»ID |
| | | string HName = item["å¯å¨æ£æ¥é¡¹ç®åç§°"].ToString(); |
| | | string HNumber = item["å¯å¨æ£æ¥é¡¹ç®ä»£ç "].ToString(); |
| | | string HRemark = item["夿³¨"].ToString(); |
| | | string HHelpCode = item["å©è®°ç "].ToString(); |
| | | string HShortNumber; |
| | | HShortNumber = DBUtility.ClsPub.GetShortNumber(HNumber);//ç代ç |
| | | if (HShortNumber.Trim() == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "ä¿å失败ï¼ç代ç 为空ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | int HEndFlag = 1;//æ«çº§æ å¿ |
| | | int HLevel = DBUtility.ClsPub.GetLevel(HNumber); //ç级 |
| | | string HUseFlag = "æªæ£æµ"; |
| | | |
| | | if (!DBUtility.ClsPub.AllowNumber(HNumber.Trim())) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "ä¿å失败ï¼ä»£ç ä¸ä¸è½åºç°è¿ç»â.âå¹¶ä¸é¦ä½æ«ä½ä¸è½ä¸ºâ.âï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select * from Gy_CheckNoteItem where HNumber='" + HNumber + "'", "Gy_CheckNoteItem"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | oCN.RunProc("Insert into " + "Gy_CheckNoteItem" + |
| | | " (HNumber,HName,HHelpCode,HShortNumber,HParentID" + |
| | | ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime,HUSEORGID,HUseFlag,HMakeEmp,HCREATEORGID,HCheckPostID) " + |
| | | " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + 0 + |
| | | "," + HLevel + "," + HEndFlag + "," + 0 + ",'" + HRemark + "','" + DateTime.Now + "','" + HOrgID + "','" + HUseFlag + "','" + user + "','" + HOrgID + "','" + 0 + "')"); |
| | | |
| | | |
| | | } |
| | | else |
| | | { |
| | | oCN.RunProc("Update " + "Gy_CheckNoteItem" + " set " + |
| | | |
| | | "HName='" + HName + "'" + |
| | | ",HShortNumber='" + HShortNumber + "'" + |
| | | ",HHelpCode='" + HHelpCode + "'" + |
| | | ",HModifyTime='" + DateTime.Now + "'" + |
| | | ",HUSEORGID='" + HOrgID + "'" + |
| | | ",HModifyEmp ='" + user + "'" + |
| | | ",HRemark= '" + HRemark + "' Where HNumber='" + HNumber + "'"); |
| | | } |
| | | |
| | | i++; |
| | | } |
| | | |
| | | oCN.Commit(); |
| | | |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = "导å
¥æå!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogService.Write(e); |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region 伿¯æ¥ 设置å表/ä¿å/ç¼è¾/å 餿¹æ³ |
| | |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | #region æ¡ç 主档å页å表 |
| | | [Route("Gy_BarCodeBillList/page")] |
| | | [HttpGet] |
| | | public json Gy_BarCodeBillListPage(string sWhere, string user, int page, int size) |
| | | { |
| | | DataSet ds; |
| | | json res = new json(); |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //夿æ¯å¦ææ¥è¯¢æé |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_BarCodeBill_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æéæ¥è¯¢!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_IF_BarCodeBillList " + page + "," + size + ",''", "h_p_IF_BarCodeBillList"); |
| | | } |
| | | else |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_IF_BarCodeBillList " + page + "," + size + ",'" + sWhere + "'", "h_p_IF_BarCodeBillList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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å对象çåå |
| | | } |
| | | |
| | | res.code = CodeConstant.SUCCEED; |
| | | res.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString()); |
| | | res.Message = "Sucessï¼"; |
| | | res.list = columnNameList; |
| | | res.data = ds.Tables[0]; |
| | | return res; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | res.code = CodeConstant.FAIL; |
| | | res.count = CountConstant.FAIL; |
| | | res.Message = "Exceptionï¼" + e.ToString(); |
| | | res.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®è®¾å¤ä¿å
»è§ç¨æ¾ç¤ºè®¾å¤ä¿å
»è§ç¨é¡¹ç® |
| | | /// </summary> |
| | |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_Sb_EquipMentCollectionTechParam order by é鿥æ desc", "h_v_Sb_EquipMentCollectionTechParam"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_Sb_EquipMentCollectionTechParam where 1 = 1 "; |
| | | string sql = sql1 + sWhere + " order by é鿥æ "; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipMentCollectionTechParam"); |
| | | } |
| | | Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere); |
| | | |
| | | string HEquipNumber = dic["HEquipNumber"].ToString();//设å¤ç¼ç |
| | | string HTechParamName = dic["HTechParamName"].ToString();//å·¥èºäº§æ° |
| | | string HDate = dic["HDate"].ToString();//é鿥æ |
| | | string HDate1 = dic["HDate1"].ToString();//é鿥æ |
| | | string HEquipType = dic["HEquipType"].ToString();//æ¥è¯¢ç±»å |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_Sb_EquipMentCollectionTechParam '"+ HEquipNumber + "','"+ HTechParamName + "','"+ HDate + "','"+ HDate1 + "','"+ HEquipType + "'", "h_p_Sb_EquipMentCollectionTechParam"); |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | |
| | | using System.Net.Http; |
| | | using System.Web.Http; |
| | | using WebAPI.Models; |
| | | |
| | | using System.Web; |
| | | using WebAPI.Controllers.SCGL.æ¥è®¡å管ç; |
| | | using System.IO; |
| | | using SyntacticSugar.constant; |
| | | namespace WebAPI.Controllers.åºç¡èµæ.åºç¡èµæ |
| | | { |
| | | public class Gy_ConkReasonBillController : ApiController |
| | |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region [æ
éåå å é¤åè½] |
| | | [Route("Gy_ConkReasonBill/set_DeleteBill")] |
| | | [HttpGet] |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region æ
éåå æä»¶å¯¼å
¥ä¿å |
| | | #region æ
éåå æä»¶ä¸ä¼ |
| | | [Route("Gy_ConkReason/Gy_ConkReason_Excel")] |
| | | [HttpPost] |
| | | public object Gy_ConkReason_Excel() |
| | | { |
| | | try |
| | | { |
| | | //è·åæä»¶åç§° |
| | | var file = HttpContext.Current.Request.Files[0]; |
| | | //è·åæä»¶ç©çè·¯å¾ |
| | | string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName); |
| | | //ä¿åæä»¶ |
| | | file.SaveAs(ExcelPath); |
| | | |
| | | NpoiHelper np = new NpoiHelper(); |
| | | DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0"); |
| | | |
| | | //å 餿件 |
| | | File.Delete(ExcelPath); |
| | | |
| | | //å建临æ¶è¡¨ |
| | | DataTable tb2 = new DataTable("dt2"); |
| | | |
| | | //æ·»å åå |
| | | for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++) |
| | | { |
| | | tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString()); |
| | | } |
| | | |
| | | //模æ¿ç¼ºå°å ä½éè¦ä»æ°æ®åºä¸æ¥è¯¢åºæ¥æ¾ç¤ºå¨é¡µé¢çåæ®µ |
| | | tb2.Columns.Add("HOrgID", typeof(Int32));//ç»ç»ID |
| | | |
| | | //æ·»å æ°æ® |
| | | for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++) |
| | | { |
| | | DataRow row = tb2.NewRow(); |
| | | for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++) |
| | | { |
| | | row[j] = ExcelDs.Tables[0].Rows[i][j].ToString(); |
| | | } |
| | | tb2.Rows.Add(row); |
| | | } |
| | | |
| | | |
| | | var error = ""; |
| | | |
| | | //æ¥è¯¢æ²¡æçå |
| | | if (!tb2.Columns.Contains("ç»ç»ä»£ç ")) |
| | | error += "æ²¡ææ¾å°ãç»ç»ä»£ç ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("ç»ç»åç§°")) |
| | | error += "æ²¡ææ¾å°ãç»ç»åç§°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("æ
éåå ")) |
| | | error += "æ²¡ææ¾å°ãæ
éåå åç§°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("æ
éåå 代ç ")) |
| | | error += "æ²¡ææ¾å°ãæ
éåå 代ç ãçæ é¢,"; |
| | | if (!tb2.Columns.Contains("夿³¨")) |
| | | error += "æ²¡ææ¾å°ã夿³¨ãçæ é¢,"; |
| | | if (!tb2.Columns.Contains("å©è®°ç ")) |
| | | error += "æ²¡ææ¾å°ãå©è®°ç ãçæ é¢,"; |
| | | |
| | | if (error.Length > 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = $"Excel模æ¿åå¨é误,{error}\r\n"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | for (int i = 0; i <= tb2.Rows.Count - 1; i++) |
| | | { |
| | | string HProcessName = ""; |
| | | string HProcessNum = ""; |
| | | string HORGNumber = ""; |
| | | string HORGName = ""; |
| | | |
| | | |
| | | HProcessName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["æ
éåå "].ToString()); |
| | | HProcessNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["æ
éåå 代ç "].ToString()); |
| | | HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç»ç»ä»£ç "].ToString()); |
| | | HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç»ç»åç§°"].ToString()); |
| | | |
| | | //æ£æ¥ç©æ |
| | | int index = i + 1; |
| | | |
| | | if (HORGNumber != "") |
| | | { |
| | | |
| | | //æ¥è¯¢ç»ç» |
| | | ds = oCn.RunProcReturn("select * from Xt_ORGANIZATIONS where HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç»ç»ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | |
| | | //æ
éåå åç§° |
| | | if (HProcessName == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,æ
éåå åç§°ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //æ
éåå 代ç |
| | | if (HProcessNum == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,æ
éåå 代ç ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç»ç»ä»£ç 为空"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = error; |
| | | objJsonResult.data = tb2; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region æ
éåå é¡¹ç® å¯¼å
¥(ä¿å) |
| | | [Route("Gy_ConkReason/Gy_ConkReason_btnSave")] |
| | | [HttpPost] |
| | | public object Gy_ConkReason_btnSave([FromBody] JObject sMainSub) |
| | | { |
| | | var _value = sMainSub["sMainSub"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { "&å" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string user = sArray[1].ToString(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_ConkReason_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "æ ä¿åæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2); |
| | | List<Dictionary<string, string>> list = new List<Dictionary<string, string>>(); |
| | | |
| | | foreach (JObject item in Excel) |
| | | { |
| | | Dictionary<string, string> dic = new Dictionary<string, string>(); |
| | | foreach (var itm in item.Properties()) |
| | | { |
| | | dic.Add(itm.Name, itm.Value.ToString()); |
| | | } |
| | | list.Add(dic); |
| | | } |
| | | |
| | | oCn.BeginTran(); |
| | | int i = 1; |
| | | foreach (Dictionary<string, string> item in list) |
| | | { |
| | | string HOrgID = item["HOrgID"].ToString();//ç»ç»ID |
| | | string HName = item["æ
éåå "].ToString(); |
| | | string HNumber = item["æ
éåå 代ç "].ToString(); |
| | | string HRemark = item["夿³¨"].ToString(); |
| | | string HHelpCode = item["å©è®°ç "].ToString(); |
| | | string HUseFlag = "æªæ£æµ"; |
| | | string HShortNumber; |
| | | HShortNumber = DBUtility.ClsPub.GetShortNumber(HNumber);//ç代ç |
| | | if (HShortNumber.Trim() == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "ä¿å失败ï¼ç代ç 为空ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | int HEndFlag = 1;//æ«çº§æ å¿ |
| | | int HLevel = DBUtility.ClsPub.GetLevel(HNumber); //ç级 |
| | | |
| | | |
| | | if (!DBUtility.ClsPub.AllowNumber(HNumber.Trim())) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "ä¿å失败ï¼ä»£ç ä¸ä¸è½åºç°è¿ç»â.âå¹¶ä¸é¦ä½æ«ä½ä¸è½ä¸ºâ.âï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCn.RunProcReturn("select * from Gy_ConkReason where HNumber='" + HNumber + "'", "Gy_ConkReason"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | oCn.RunProc("Insert into Gy_ConkReason " + |
| | | " (HNumber,HName,HHelpCode,HShortNumber,HParentID" + |
| | | ",HLevel,HEndFlag,HStopflag,HRemark,HUseFlag,HMakeTime,HMakeEmp,HExplanation,HConkTypeID) " + |
| | | " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + 0 + |
| | | "," + HLevel + "," + HEndFlag + "," + 0 + ",'" + HRemark + |
| | | "','" + HUseFlag + "',getdate(),'" + user + "','" + "" + "',0" + |
| | | ")", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | |
| | | |
| | | } |
| | | else |
| | | { |
| | | oCn.RunProc("UpDate Gy_ConkReason set " + |
| | | //åºå®èµå¼=============== |
| | | "HName='" + HName + "'" + |
| | | ",HShortNumber='" + HShortNumber + "'" + |
| | | ",HHelpCode='" + HHelpCode + "'" + |
| | | ",HRemark='" + HRemark + "'" + |
| | | ",HModifyTime=getdate()" + |
| | | ",HModifyEmp='" + user + "'" + |
| | | " where HNumber='" + HNumber + "'"); |
| | | } |
| | | |
| | | i++; |
| | | } |
| | | |
| | | oCn.Commit(); |
| | | |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = "导å
¥æå!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogService.Write(e); |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | using System.Web.Http; |
| | | using System.Windows.Forms; |
| | | using WebAPI.Models; |
| | | |
| | | using System.Web; |
| | | using WebAPI.Controllers.SCGL.æ¥è®¡å管ç; |
| | | using System.IO; |
| | | using SyntacticSugar.constant; |
| | | namespace WebAPI.Controllers |
| | | { |
| | | public class Gy_DisposeWayController : ApiController |
| | |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region å¤çæ¹æ¡ æä»¶å¯¼å
¥ä¿å |
| | | #region å¤çæ¹æ¡ æä»¶ä¸ä¼ |
| | | [Route("Gy_DisposeWay/Gy_DisposeWay_Excel")] |
| | | [HttpPost] |
| | | public object Gy_DisposeWay_Excel() |
| | | { |
| | | try |
| | | { |
| | | //è·åæä»¶åç§° |
| | | var file = HttpContext.Current.Request.Files[0]; |
| | | //è·åæä»¶ç©çè·¯å¾ |
| | | string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName); |
| | | //ä¿åæä»¶ |
| | | file.SaveAs(ExcelPath); |
| | | |
| | | NpoiHelper np = new NpoiHelper(); |
| | | DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0"); |
| | | |
| | | //å 餿件 |
| | | File.Delete(ExcelPath); |
| | | |
| | | //å建临æ¶è¡¨ |
| | | DataTable tb2 = new DataTable("dt2"); |
| | | |
| | | //æ·»å åå |
| | | for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++) |
| | | { |
| | | tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString()); |
| | | } |
| | | |
| | | //模æ¿ç¼ºå°å ä½éè¦ä»æ°æ®åºä¸æ¥è¯¢åºæ¥æ¾ç¤ºå¨é¡µé¢çåæ®µ |
| | | tb2.Columns.Add("HOrgID", typeof(Int32));//ç»ç»ID |
| | | |
| | | //æ·»å æ°æ® |
| | | for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++) |
| | | { |
| | | DataRow row = tb2.NewRow(); |
| | | for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++) |
| | | { |
| | | row[j] = ExcelDs.Tables[0].Rows[i][j].ToString(); |
| | | } |
| | | tb2.Rows.Add(row); |
| | | } |
| | | |
| | | |
| | | var error = ""; |
| | | |
| | | //æ¥è¯¢æ²¡æçå |
| | | if (!tb2.Columns.Contains("ç»ç»ä»£ç ")) |
| | | error += "æ²¡ææ¾å°ãç»ç»ä»£ç ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("ç»ç»åç§°")) |
| | | error += "æ²¡ææ¾å°ãç»ç»åç§°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å¤çæ¹æ¡")) |
| | | error += "æ²¡ææ¾å°ãå¤çæ¹æ¡åç§°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å¤çæ¹æ¡ä»£ç ")) |
| | | error += "æ²¡ææ¾å°ãå¤çæ¹æ¡ä»£ç ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("夿³¨")) |
| | | error += "æ²¡ææ¾å°ã夿³¨ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å©è®°ç ")) |
| | | error += "æ²¡ææ¾å°ãå©è®°ç ãçæ é¢,"; |
| | | |
| | | if (error.Length > 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = $"Excel模æ¿åå¨é误,{error}\r\n"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | for (int i = 0; i <= tb2.Rows.Count - 1; i++) |
| | | { |
| | | string HProcessName = ""; |
| | | string HProcessNum = ""; |
| | | string HORGNumber = ""; |
| | | string HORGName = ""; |
| | | |
| | | |
| | | HProcessName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["å¤çæ¹æ¡"].ToString()); |
| | | HProcessNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["å¤çæ¹æ¡ä»£ç "].ToString()); |
| | | HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç»ç»ä»£ç "].ToString()); |
| | | HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç»ç»åç§°"].ToString()); |
| | | |
| | | //æ£æ¥ç©æ |
| | | int index = i + 1; |
| | | |
| | | if (HORGNumber != "") |
| | | { |
| | | |
| | | //æ¥è¯¢ç»ç» |
| | | ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç»ç»ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | |
| | | //å¤çæ¹æ¡åç§° |
| | | if (HProcessName == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,å¤çæ¹æ¡åç§°ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //å¤çæ¹æ¡ä»£ç |
| | | if (HProcessNum == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,å¤çæ¹æ¡ä»£ç ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç»ç»ä»£ç 为空"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = error; |
| | | objJsonResult.data = tb2; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å¤çæ¹æ¡é¡¹ç® 导å
¥(ä¿å) |
| | | [Route("Gy_DisposeWay/Gy_DisposeWay_btnSave")] |
| | | [HttpPost] |
| | | public object Gy_DisposeWay_btnSave([FromBody] JObject sMainSub) |
| | | { |
| | | var _value = sMainSub["sMainSub"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { "&å" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string user = sArray[1].ToString(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_DisposeWay_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "æ ä¿åæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2); |
| | | List<Dictionary<string, string>> list = new List<Dictionary<string, string>>(); |
| | | |
| | | foreach (JObject item in Excel) |
| | | { |
| | | Dictionary<string, string> dic = new Dictionary<string, string>(); |
| | | foreach (var itm in item.Properties()) |
| | | { |
| | | dic.Add(itm.Name, itm.Value.ToString()); |
| | | } |
| | | list.Add(dic); |
| | | } |
| | | |
| | | oCN.BeginTran(); |
| | | int i = 1; |
| | | foreach (Dictionary<string, string> item in list) |
| | | { |
| | | string HOrgID = item["HOrgID"].ToString();//ç»ç»ID |
| | | string HName = item["å¤çæ¹æ¡"].ToString(); |
| | | string HNumber = item["å¤çæ¹æ¡ä»£ç "].ToString(); |
| | | string HRemark = item["夿³¨"].ToString(); |
| | | string HHelpCode = item["å©è®°ç "].ToString(); |
| | | string HUseFlag = "æªæ£æµ"; |
| | | string HShortNumber; |
| | | HShortNumber = DBUtility.ClsPub.GetShortNumber(HNumber);//ç代ç |
| | | if (HShortNumber.Trim() == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "ä¿å失败ï¼ç代ç 为空ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | int HEndFlag = 1;//æ«çº§æ å¿ |
| | | int HLevel = DBUtility.ClsPub.GetLevel(HNumber); //ç级 |
| | | |
| | | |
| | | if (!DBUtility.ClsPub.AllowNumber(HNumber.Trim())) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "ä¿å失败ï¼ä»£ç ä¸ä¸è½åºç°è¿ç»â.âå¹¶ä¸é¦ä½æ«ä½ä¸è½ä¸ºâ.âï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select * from Gy_DisposeWay where HNumber='" + HNumber + "'", "Gy_DisposeWay"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | oCN.RunProc("Insert into " + "Gy_DisposeWay" + |
| | | " (HNumber,HName,HHelpCode,HShortNumber,HParentID" + |
| | | ",HLevel,HEndFlag,HStopflag,HRemark,HUseFlag,HUSEORGID,HCREATEORGID,HMakeEmp,HMakeTime) " + |
| | | " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + 0 + |
| | | "," + HLevel + "," + HEndFlag + "," + 0 + ",'" + HRemark + "','" + HUseFlag + "'," + HOrgID + "," + HOrgID + ",'" + user + "',GETDATE()" + ")"); |
| | | |
| | | |
| | | } |
| | | else |
| | | { |
| | | oCN.RunProc("Update " + "Gy_DisposeWay" + " set " + |
| | | "HName='" + HName + "'" + |
| | | ",HShortNumber='" + HShortNumber + "'" + |
| | | ",HHelpCode='" + HHelpCode + "'" + |
| | | ",HLevel=" + HLevel + |
| | | ",HModifyEmp='" + user + "'" + |
| | | ",HModifyTime=GETDATE()" + |
| | | ",HRemark= '" + HRemark + "' Where HNumber='" + HNumber + "'"); |
| | | } |
| | | |
| | | i++; |
| | | } |
| | | |
| | | oCN.Commit(); |
| | | |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = "导å
¥æå!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogService.Write(e); |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | #endregion |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | [Route("Gy_MaterType/Gy_MaterTypeTreeListByLevel")] |
| | | [HttpGet] |
| | | public object Gy_MaterTypeTreeListByLevel() |
| | | public object Gy_MaterTypeTreeListByLevel(string HOrgID) |
| | | { |
| | | try |
| | | { |
| | | string sql1 = string.Format("select hitemid,hnumber,hname,hparentid,hlevel from Gy_MaterType order by hnumber"); |
| | | string sql1 = string.Format("select hitemid,hnumber,hname,hparentid,hlevel from Gy_MaterType where HUSEORGID = '" + HOrgID + "' order by hnumber"); |
| | | |
| | | ds = oCN.RunProcReturn(sql1, "Gy_MaterType"); |
| | | |
New file |
| | |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Linq; |
| | | using System.Net; |
| | | using System.Net.Http; |
| | | using System.Web.Http; |
| | | using WebAPI.Models; |
| | | using SyntacticSugar.constant; |
| | | namespace WebAPI.Controllers.åºç¡èµæ.åºç¡èµæ |
| | | { |
| | | public class Gy_ProcMulController : ApiController |
| | | { |
| | | private json objJsonResult = new json(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | DataSet ds; |
| | | |
| | | #region 工段 æ¥è¯¢ |
| | | [Route("Gy_ProcMul/Gy_ProcMulList")] |
| | | [HttpGet] |
| | | public object Gy_ProcMulList(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_ProcMul_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æ¥çæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | string sql1 = "select * from h_v_Gy_ProcMulList where 1 = 1"; |
| | | string sql = sql1 + sWhere + " order by 工段代ç "; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_ProcMulList"); |
| | | |
| | | //æ·»å åå |
| | | 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 = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 工段 å®¡æ ¸ï¼åå®¡æ ¸ |
| | | [Route("Gy_ProcMul/AuditGy_ProcMul")] |
| | | [HttpGet] |
| | | public object AuditGy_ProcMul(int HInterID, int IsAudit, string CurUserName) |
| | | { |
| | | try |
| | | { |
| | | //å®¡æ ¸æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Gy_ProcMul_Check", 1, false, CurUserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼æ æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | var ds = oCN.RunProcReturn("select * from Gy_ProcMul where HItemID=" + HInterID, "Gy_ProcMul"); |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | if (IsAudit == 0) //å®¡æ ¸å¤æ |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®å·²å®¡æ ¸!ä¸è½åæ¬¡å®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | if (IsAudit == 1) //åå®¡æ ¸å¤æ |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®æªå®¡æ ¸!ä¸éè¦åå®¡æ ¸!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®ä¸åå¨!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.BeginTran(); |
| | | |
| | | if (IsAudit == 0) //å®¡æ ¸å¤æ |
| | | { |
| | | oCN.RunProc("update Gy_ProcMul set HCheckEmp='" + CurUserName + "',HCheckTime=getdate() where HItemID=" + HInterID); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å®¡æ ¸æå"; |
| | | objJsonResult.data = null; |
| | | } |
| | | if (IsAudit == 1) //åå®¡æ ¸å¤æ |
| | | { |
| | | oCN.RunProc("update Gy_ProcMul set HCheckEmp='',HCheckTime=null where HItemID=" + HInterID); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åå®¡æ ¸æå"; |
| | | objJsonResult.data = null; |
| | | } |
| | | oCN.Commit(); |
| | | |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥æè
åå®¡æ ¸å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 工段 ç¦ç¨ï¼åç¦ç¨ |
| | | [Route("Gy_ProcMul/StopGy_ProcMul")] |
| | | [HttpGet] |
| | | public object StopGy_ProcMul(int HInterID, int IsStop, string CurUserName) |
| | | { |
| | | try |
| | | { |
| | | //å®¡æ ¸æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Gy_ProcMul_Close", 1, false, CurUserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ç¦ç¨å¤±è´¥ï¼æ æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | var ds = oCN.RunProcReturn("select * from Gy_ProcMul where HItemID=" + HInterID, "Gy_ProcMul"); |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | if (IsStop == 0) //ç¦ç¨å¤æ |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已ç¦ç¨!ä¸è½å次ç¦ç¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | if (IsStop == 1) //åç¦ç¨å¤æ |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®æªç¦ç¨!ä¸éè¦åç¦ç¨!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®ä¸åå¨!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.BeginTran(); |
| | | |
| | | if (IsStop == 0) //ç¦ç¨å¤æ |
| | | { |
| | | oCN.RunProc("update Gy_ProcMul set HStopEmp='" + CurUserName + "',HStopTime=getdate(),HStopflag=1 where HItemID=" + HInterID); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ç¦ç¨æå"; |
| | | objJsonResult.data = null; |
| | | } |
| | | if (IsStop == 1) //åç¦ç¨å¤æ |
| | | { |
| | | oCN.RunProc("update Gy_ProcMul set HStopEmp='',HStopTime=null,HStopflag=0 where HItemID=" + HInterID); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åç¦ç¨æå"; |
| | | objJsonResult.data = null; |
| | | } |
| | | oCN.Commit(); |
| | | |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ç¦ç¨å¤±è´¥æè
åç¦ç¨å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 工段 ä¿å |
| | | [Route("Gy_ProcMul/SaveGy_ProcMulList")] |
| | | [HttpPost] |
| | | public object SaveGy_ProcMulList([FromBody] JObject msg) |
| | | { |
| | | DataSet ds; |
| | | var _value = msg["msg"].ToString(); |
| | | string msg3 = _value.ToString(); |
| | | string[] sArray = msg3.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg1 = sArray[0].ToString(); |
| | | string msg2 = sArray[1].ToString(); |
| | | |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_ProcMul_Edit", 1, false, msg2)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ ä¿åæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | Int64 HItemID = 0; |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | //è·åæå¤§IDå¼èµå¼ |
| | | DataSet Maxds = oCN.RunProcReturn("select isNull(MAX(HItemID),0) HItemID from Gy_ProcMul ", "Gy_ProcMul"); |
| | | if (Maxds != null || Maxds.Tables[0].Rows.Count > 0) |
| | | { |
| | | //HItemID= Maxds.Tables[0].Rows[0]["HItemID"] |
| | | var maxid = Convert.ToInt32(Maxds.Tables[0].Rows[0]["HItemID"]); |
| | | maxid += 1; |
| | | HItemID = maxid; |
| | | } |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | WebAPI.DLL.ClsGy_ProcMul_Ctl oBill = new WebAPI.DLL.ClsGy_ProcMul_Ctl(); |
| | | List<Model.ClsGy_ProcMul_Model> lsmain = new List<Model.ClsGy_ProcMul_Model>(); |
| | | msg1 = msg1.Replace("\\", ""); |
| | | msg1 = msg1.Replace("\n", ""); //\n |
| | | string jsonString = "[" + msg1.ToString() + "]"; |
| | | List<Model.ClsGy_ProcMul_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_ProcMul_Model>>(jsonString); |
| | | lsmain = list; |
| | | foreach (Model.ClsGy_ProcMul_Model oItem in lsmain) |
| | | { |
| | | if (oItem.HNumber.Trim() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼ä»£ç ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | if (oItem.HName.Trim() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼åç§°ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | if (!DBUtility.ClsPub.AllowNumber(oItem.HNumber.Trim())) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼ä»£ç ä¸ä¸è½åºç°è¿ç»â.âå¹¶ä¸é¦ä½æ«ä½ä¸è½ä¸ºâ.âï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | //æ¥è¯¢æ°æ®ä¸æ¯å¦åå¨éå¤ä»£ç |
| | | |
| | | ds = oCN.RunProcReturn("select * from Gy_ProcMul where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_ProcMul"); |
| | | if (oItem.HNumber.Trim() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼ä»£ç 为空ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | //æ°å¢æ¶å¤æ |
| | | if (oItem.HItemID == 0) |
| | | { |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼ä»£ç éå¤ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | //æ£æ¥ç¶çº§æ¯å¦åå¨ |
| | | string sParent; |
| | | sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim()); |
| | | if (sParent.Trim() == "") |
| | | { |
| | | oBill.oModel.HParentID = 0; |
| | | } |
| | | else |
| | | { |
| | | if (oBill.HavParentCode(sParent.Trim(), HItemID)) |
| | | { |
| | | oBill.oModel.HParentID = oBill.oModel.HItemID; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼ä¸çº§ä»£ç ä¸åå¨æè¢«ç¦ç¨ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | else//ç¼è¾æ¶å¤æ |
| | | { |
| | | //æ£æ¥ç¶çº§æ¯å¦åå¨ |
| | | string sParent; |
| | | sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim()); |
| | | if (sParent.Trim() == "") |
| | | { |
| | | oBill.oModel.HParentID = 0; |
| | | } |
| | | else |
| | | { |
| | | if (oBill.HavParentCode(sParent.Trim(), oItem.HItemID)) |
| | | { |
| | | oBill.oModel.HParentID = oBill.oModel.HItemID; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼ä¸çº§ä»£ç ä¸åå¨æè¢«ç¦ç¨ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | //å¾å°ç代ç |
| | | string sShortNumber; |
| | | sShortNumber = DBUtility.ClsPub.GetShortNumber(oItem.HNumber.Trim()); |
| | | if (sShortNumber.Trim() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼ç代ç 为空ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | oItem.HShortNumber = sShortNumber;//ç代ç |
| | | oItem.HEndFlag = true;//æ«çº§æ å¿ |
| | | oItem.HLevel = DBUtility.ClsPub.GetLevel(oItem.HNumber.Trim()); //ç级 |
| | | oItem.HMakeEmp = msg2; //å建人 |
| | | |
| | | oBill.oModel = oItem; |
| | | } |
| | | |
| | | //ä¿å |
| | | //ä¿å宿¯åå¤ç |
| | | bool bResult; |
| | | if (oBill.oModel.HItemID == 0) |
| | | { |
| | | // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | bResult = oBill.AddNew(); |
| | | } |
| | | else |
| | | { |
| | | bResult = oBill.ModifyByID(oBill.oModel.HItemID); |
| | | } |
| | | if (bResult) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¿åæåï¼"; |
| | | //WebAPIController.Add_Log("éè´§å䏿¨", UserName, "çæéè´§å"); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + e.ToString(); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 工段 å é¤ |
| | | [Route("Gy_ProcMul/DeltetGy_ProcMul")] |
| | | [HttpGet] |
| | | public object DeltetGy_ProcMul(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | | //string ModRightNameCheck = "Sc_ProcessReport_check"; |
| | | try |
| | | { |
| | | //å 餿é |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_ProcMul_Delete", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ å 餿éï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (string.IsNullOrWhiteSpace(HItemID)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "HItemID为空ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | oCN.BeginTran();//å¼å§äºå¡ |
| | | ds = oCN.RunProcReturn("select * from Gy_ProcMul where HItemID=" + HItemID, "Gy_ProcMul"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ²¡ææ°æ®ï¼æ æ³å é¤ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | } |
| | | |
| | | |
| | | oCN.RunProc("delete Gy_ProcMul where HItemID=" + HItemID); |
| | | oCN.Commit();//æäº¤äºå¡ |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æ°æ®å 餿åï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å é¤å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 工段 ç¼è¾è·åç»è |
| | | [Route("Gy_ProcMul/GetGy_ProcMulDetail")] |
| | | [HttpGet] |
| | | public object GetGy_ProcMulDetail(string HID) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | string sql1 = "select * from h_v_Gy_ProcMulList where HItemID= " + HID + " "; |
| | | ds = oCN.RunProcReturn(sql1, "h_v_Gy_ProcMulList"); |
| | | |
| | | 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 |
| | | |
| | | } |
| | | } |
| | |
| | | using System.Net.Http; |
| | | using System.Web.Http; |
| | | using WebAPI.Models; |
| | | |
| | | using System.Web; |
| | | using WebAPI.Controllers.SCGL.æ¥è®¡å管ç; |
| | | using System.IO; |
| | | using SyntacticSugar.constant; |
| | | namespace WebAPI.Controllers |
| | | { |
| | | public class Gy_WorkTypeController : ApiController |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region å·¥ç§ æä»¶å¯¼å
¥ä¿å |
| | | #region å·¥ç§ æä»¶ä¸ä¼ |
| | | [Route("Gy_WorkTypeController/Gy_WorkTypeController_Excel")] |
| | | [HttpPost] |
| | | public object Gy_WorkTypeController_Excel() |
| | | { |
| | | try |
| | | { |
| | | //è·åæä»¶åç§° |
| | | var file = HttpContext.Current.Request.Files[0]; |
| | | //è·åæä»¶ç©çè·¯å¾ |
| | | string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName); |
| | | //ä¿åæä»¶ |
| | | file.SaveAs(ExcelPath); |
| | | |
| | | NpoiHelper np = new NpoiHelper(); |
| | | DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0"); |
| | | |
| | | //å 餿件 |
| | | File.Delete(ExcelPath); |
| | | |
| | | //å建临æ¶è¡¨ |
| | | DataTable tb2 = new DataTable("dt2"); |
| | | |
| | | //æ·»å åå |
| | | for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++) |
| | | { |
| | | tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString()); |
| | | } |
| | | |
| | | //模æ¿ç¼ºå°å ä½éè¦ä»æ°æ®åºä¸æ¥è¯¢åºæ¥æ¾ç¤ºå¨é¡µé¢çåæ®µ |
| | | tb2.Columns.Add("HOrgID", typeof(Int32));//ç»ç»ID |
| | | |
| | | //æ·»å æ°æ® |
| | | for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++) |
| | | { |
| | | DataRow row = tb2.NewRow(); |
| | | for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++) |
| | | { |
| | | row[j] = ExcelDs.Tables[0].Rows[i][j].ToString(); |
| | | } |
| | | tb2.Rows.Add(row); |
| | | } |
| | | |
| | | |
| | | var error = ""; |
| | | |
| | | //æ¥è¯¢æ²¡æçå |
| | | if (!tb2.Columns.Contains("ç»ç»ä»£ç ")) |
| | | error += "æ²¡ææ¾å°ãç»ç»ä»£ç ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("ç»ç»åç§°")) |
| | | error += "æ²¡ææ¾å°ãç»ç»åç§°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å·¥ç§åç§°")) |
| | | error += "æ²¡ææ¾å°ãå·¥ç§åç§°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å·¥ç§ä»£ç ")) |
| | | error += "æ²¡ææ¾å°ãå·¥ç§ä»£ç ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("æ¥å·¥èµ")) |
| | | error += "æ²¡ææ¾å°ãæ¥å·¥èµãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å°æ¶å·¥èµ")) |
| | | error += "æ²¡ææ¾å°ãå°æ¶å·¥èµãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("èè人æ°")) |
| | | error += "æ²¡ææ¾å°ãèè人æ°ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("夿³¨")) |
| | | error += "æ²¡ææ¾å°ã夿³¨ãçæ é¢,"; |
| | | |
| | | if (!tb2.Columns.Contains("å©è®°ç ")) |
| | | error += "æ²¡ææ¾å°ãå©è®°ç ãçæ é¢,"; |
| | | |
| | | if (error.Length > 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = $"Excel模æ¿åå¨é误,{error}\r\n"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | for (int i = 0; i <= tb2.Rows.Count - 1; i++) |
| | | { |
| | | string HProcessName = ""; |
| | | string HProcessNum = ""; |
| | | string HORGNumber = ""; |
| | | string HORGName = ""; |
| | | |
| | | |
| | | HProcessName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["å·¥ç§åç§°"].ToString()); |
| | | HProcessNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["å·¥ç§ä»£ç "].ToString()); |
| | | HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç»ç»ä»£ç "].ToString()); |
| | | HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["ç»ç»åç§°"].ToString()); |
| | | |
| | | //æ£æ¥ç©æ |
| | | int index = i + 1; |
| | | |
| | | if (HORGNumber != "") |
| | | { |
| | | |
| | | //æ¥è¯¢ç»ç» |
| | | ds = oCn.RunProcReturn("select * from Xt_ORGANIZATIONS where HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç»ç»ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | |
| | | //å·¥ç§åç§° |
| | | if (HProcessName == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,å·¥ç§åç§°ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //å·¥ç§ä»£ç |
| | | if (HProcessNum == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,å·¥ç§ä»£ç ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "第" + index + "è¡,ç»ç»ä»£ç 为空"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = error; |
| | | objJsonResult.data = tb2; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å·¥ç§é¡¹ç® 导å
¥(ä¿å) |
| | | [Route("Gy_WorkTypeController/Gy_WorkTypeController_btnSave")] |
| | | [HttpPost] |
| | | public object Gy_WorkTypeController_btnSave([FromBody] JObject sMainSub) |
| | | { |
| | | var _value = sMainSub["sMainSub"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { "&å" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string user = sArray[1].ToString(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_ErrType_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "æ ä¿åæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2); |
| | | List<Dictionary<string, string>> list = new List<Dictionary<string, string>>(); |
| | | |
| | | foreach (JObject item in Excel) |
| | | { |
| | | Dictionary<string, string> dic = new Dictionary<string, string>(); |
| | | foreach (var itm in item.Properties()) |
| | | { |
| | | dic.Add(itm.Name, itm.Value.ToString()); |
| | | } |
| | | list.Add(dic); |
| | | } |
| | | |
| | | oCn.BeginTran(); |
| | | int i = 1; |
| | | foreach (Dictionary<string, string> item in list) |
| | | { |
| | | string HOrgID = item["HOrgID"].ToString();//ç»ç»ID |
| | | string HName = item["å·¥ç§åç§°"].ToString(); |
| | | string HNumber = item["å·¥ç§ä»£ç "].ToString(); |
| | | string HRemark = item["夿³¨"].ToString(); |
| | | string HHelpCode = item["å©è®°ç "].ToString(); |
| | | string HPayMoney = item["å°æ¶å·¥èµ"].ToString(); |
| | | string HDayMoney = item["æ¥å·¥èµ"].ToString(); |
| | | string HForEmp = item["èè人æ°"].ToString(); |
| | | string sShortNumber; |
| | | sShortNumber = DBUtility.ClsPub.GetShortNumber(HNumber);//ç代ç |
| | | if (sShortNumber.Trim() == "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "ä¿å失败ï¼ç代ç 为空ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | int HEndFlag = 1;//æ«çº§æ å¿ |
| | | int HLevel = DBUtility.ClsPub.GetLevel(HNumber); //ç级 |
| | | |
| | | |
| | | if (!DBUtility.ClsPub.AllowNumber(HNumber.Trim())) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "ä¿å失败ï¼ä»£ç ä¸ä¸è½åºç°è¿ç»â.âå¹¶ä¸é¦ä½æ«ä½ä¸è½ä¸ºâ.âï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCn.RunProcReturn("select * from Gy_WorkType where HNumber='" + HNumber + "'", "Gy_WorkTypeController"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | oCn.RunProc("Insert into " + "Gy_WorkType" + |
| | | " (HNumber,HName,HHelpCode,HShortNumber,HParentID" + |
| | | ",HLevel,HEndFlag,HStopflag,HRemark" + |
| | | ",HMakeEmp,HMakeTime,HUSEORGID,HCREATEORGID" + |
| | | ",HPayMoney,HDayMoney,HForEmp) " + |
| | | " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + sShortNumber + "'," + 0 + |
| | | "," + HLevel + "," + HEndFlag + "," + 0 + ",'" + HRemark + "'" + |
| | | ",'" + user + "',getdate()" + "," + HOrgID + "," + HOrgID + |
| | | "," + HPayMoney + "," + HDayMoney + ",'" + HForEmp + "'" + |
| | | ")"); |
| | | } |
| | | else |
| | | { |
| | | oCn.RunProc("Update " + "Gy_WorkType " + " set " + |
| | | "HName='" + HName + "'" + |
| | | ",HShortNumber='" + sShortNumber + "'" + |
| | | ",HRemark= '" + HRemark + "'" + |
| | | ",HModifyEmp= '" + user + "'" + |
| | | ",HModifyTime=getdate()" + |
| | | ",HUSEORGID=" + HOrgID + |
| | | ",HPayMoney=" + HPayMoney + |
| | | ",HDayMoney=" + HDayMoney + |
| | | ",HForEmp='" + HForEmp + "'" + |
| | | " where HNumber='" + HNumber + "'"); |
| | | } |
| | | |
| | | i++; |
| | | } |
| | | |
| | | oCn.Commit(); |
| | | |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = "导å
¥æå!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogService.Write(e); |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | #endregion |
| | | |
| | | } |
| | | } |
| | |
| | | using System.Web.Http; |
| | | using WebAPI.Models; |
| | | using System.Windows.Forms; |
| | | |
| | | using SyntacticSugar.constant; |
| | | namespace WebAPI.Controllers |
| | | { |
| | | //çç»Controller |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region å®é¢ç³è¯·åéè¦æå®¡æ¹æµå®¡æ¹ç |
| | | [Route("Pay_ProcPriceRequestBill/NeedChecklist")] |
| | | [HttpGet] |
| | | public object NeedChecklist(string user, string userid) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //夿æ¯å¦ææ¥è¯¢æé |
| | | |
| | | if (!DBUtility.ClsPub.Security_Log(ModRightNameList, 1, false, user)) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "æ æéæ¥ç!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //æç´¢éè¦å®¡æ ¸ç |
| | | string sql = " select a.*,c.HItemID as HCheckFlowStatusID,m.HName as å®¡æ¹æµ,c.HCheckFlowID,i.HName as 审æ¹é¡¹ç®åç§°,c.HCheckItemID,c.HChecker as 项ç®å®¡æ ¸äºº,c.HCheckNote as å®¡æ¹æµå®¡æ ¸å»ºè®®,c.HCheckDate å®¡æ¹æµå®¡æ ¸æ¥æ from h_v_Pay_ProcPriceRequestBillList AS a LEFT JOIN Xt_BillCheckFlowStatus AS c ON a.hmainid = c.HBillInterID and a.HBillType = c.HBillTypeID" + |
| | | " LEFT JOIN Xt_CheckFlowMain as m ON m.HInterID = c.HCheckFlowID" + |
| | | " LEFT JOIN Pay_ProcPriceRequestBillMain as po ON a.hmainid = po.HInterID" + |
| | | " LEFT JOIN Xt_CheckItem as i ON i.HItemID = c.HCheckItemID" + |
| | | " LEFT JOIN Xt_CheckUserRight as cr ON cr.HCheckItemID = i.HItemID and cr.HCheckFlowInterID = m.HInterID" + |
| | | " where po.HBillStatus = 6 and po.HCheckItemNowID = i.HItemID and cr.HUserID = '" + userid + "'"; |
| | | ds = oCn.RunProcReturn(sql, "h_v_Pay_ProcPriceRequestBillList"); |
| | | 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 = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region å®é¢ç³è¯·åå·²ç»å®¡æ¹æµå®¡æ¹ç |
| | | [Route("Pay_ProcPriceRequestBill/Checkedlist")] |
| | | [HttpGet] |
| | | public object Checkedlist(string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //夿æ¯å¦ææ¥è¯¢æé |
| | | |
| | | if (!DBUtility.ClsPub.Security_Log(ModRightNameList, 1, false, user)) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "æ æéæ¥ç!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //æç´¢éè¦å®¡æ ¸ç |
| | | string sql = " select DISTINCT a.*,c.HItemID as HCheckFlowStatusID,m.HName as å®¡æ¹æµ,c.HCheckFlowID,i.HName as 审æ¹é¡¹ç®åç§°,c.HCheckItemID,c.HChecker as 项ç®å®¡æ ¸äºº,c.HCheckNote as å®¡æ¹æµå®¡æ ¸å»ºè®®,c.HCheckDate å®¡æ¹æµå®¡æ ¸æ¥æ from h_v_Pay_ProcPriceRequestBillList AS a LEFT JOIN Xt_BillCheckFlowStatus AS c ON a.hmainid = c.HBillInterID and a.HBillType = c.HBillTypeID" + |
| | | " LEFT JOIN Xt_CheckFlowMain as m ON m.HInterID = c.HCheckFlowID" + |
| | | " LEFT JOIN Xt_CheckItem as i ON i.HItemID = c.HCheckItemID" + |
| | | " where c.HCheckDate is not NUll and c.HChecker = '" + user + "'"; |
| | | ds = oCn.RunProcReturn(sql, "h_v_Pay_ProcPriceRequestBillList"); |
| | | 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 = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region å®é¢ç³è¯·å驳å |
| | | [Route("Pay_ProcPriceRequestBill/RejectCheckFlow")] |
| | | [HttpGet] |
| | | public object RejectCheckFlow(string HInterID, string CurUserID) |
| | | { |
| | | try |
| | | { |
| | | Int64 lngBillKey = 0; |
| | | lngBillKey = DBUtility.ClsPub.isLong(HInterID); //对HInterIDè¿è¡ç±»åçè½¬æ¢ |
| | | DAL.ClsPay_ProcPriceRequestBill oBill = new DAL.ClsPay_ProcPriceRequestBill(); //å®ä¾ååæ®æä½ç±»ï¼ç¨äºè¿è¡ç¸å
³æä½ |
| | | if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) //æ ¹æ®HInterIDè·åè¯¥åæ®çæ°æ® |
| | | { |
| | | if (oBill.omodel.HBillStatus != 6) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "åæ®æªå¨å®¡æ ¸ä¸ä¸è½é©³å"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //å起驳å |
| | | if (oBill.RejectCheckFlowProgress(lngBillKey, oBill.omodel.HBillNo, CurUserID, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = "驳åæå"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "驳å失败失败!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "åæ®ä¸åå¨!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCn.RollBack(); |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å®é¢ç³è¯·å åèµ·å®¡æ¹ |
| | | [Route("Pay_ProcPriceRequestBill/StartCheckFlow")] |
| | | [HttpGet] |
| | | public object StartCheckFlow(int HInterID, string CurUserName) |
| | | { |
| | | DBUtility.ClsPub.CurUserName = CurUserName; |
| | | try |
| | | { |
| | | ////å®¡æ ¸æé |
| | | //if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼æ æéï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | //HInterIDæ°æ®å¤æ |
| | | if (HInterID <= 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "HInterIDå°äº0ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | Int64 lngBillKey = 0; |
| | | lngBillKey = DBUtility.ClsPub.isLong(HInterID); //对HInterIDè¿è¡ç±»åçè½¬æ¢ |
| | | DAL.ClsPay_ProcPriceRequestBill oBill = new DAL.ClsPay_ProcPriceRequestBill(); //å®ä¾ååæ®æä½ç±»ï¼ç¨äºè¿è¡ç¸å
³æä½ |
| | | |
| | | //åèµ·å®¡æ¹ |
| | | if (oBill.startCheckFlow(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = "åèµ·å®¡æ¹æå"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "å起审æ¹å¤±è´¥!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "å起审æ¹å¤±è´¥å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å®é¢ç³è¯·å å¤çº§ å®¡æ ¸/åå®¡æ ¸ |
| | | /// <summary> |
| | | /// </summary> |
| | | /// <param name="HInterID">忮ID</param> |
| | | /// <param name="IsAudit">å®¡æ ¸(0),åå®¡æ ¸(1)</param> |
| | | /// <param name="CurUserName">å®¡æ ¸äºº</param> |
| | | /// <returns></returns> |
| | | [Route("Pay_ProcPriceRequestBill/AuditFlow")] |
| | | [HttpGet] |
| | | public object AuditPay_ProcPriceRequestBill_Flow(int HInterID, int IsAudit, string CurUserName, string CurUserID) |
| | | { |
| | | //string ModRightNameCheck = "Pay_ProcPriceRequestBill_Check"; |
| | | DBUtility.ClsPub.CurUserName = CurUserName; |
| | | try |
| | | { |
| | | ////å®¡æ ¸æé |
| | | //if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼æ æéï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | |
| | | //HInterIDæ°æ®å¤æ |
| | | if (HInterID <= 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "HInterIDå°äº0ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | Int64 lngBillKey = 0; |
| | | lngBillKey = DBUtility.ClsPub.isLong(HInterID); //对HInterIDè¿è¡ç±»åçè½¬æ¢ |
| | | DAL.ClsPay_ProcPriceRequestBill oBill = new DAL.ClsPay_ProcPriceRequestBill(); //å®ä¾ååæ®æä½ç±»ï¼ç¨äºè¿è¡ç¸å
³æä½ |
| | | |
| | | //é对éè¦è¿è¡çæä½ï¼æ£éªå½ååæ®çç¶ææ¯å¦æ¯æéè¦è¿è¡çæä½ |
| | | if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) //æ ¹æ®HInterIDè·åè¯¥åæ®çæ°æ® |
| | | { |
| | | if (oBill.omodel.HCloseMan.Trim() != "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "忮已å
³é!ä¸è½åæ¬¡å®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (oBill.omodel.HDeleteMan.Trim() != "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "忮已ä½åº!ä¸è½åæ¬¡å®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (IsAudit == TypeConstant.AUDIT) //å®¡æ ¸å¤æ |
| | | { |
| | | //夿æ¯å¦å·²ç»åèµ·å®¡æ¹ |
| | | string sql0 = "select * from Xt_BillCheckFlowStatus where HBillInterID = " + lngBillKey + " and HBillTypeID = '" + oBill.BillType + "'"; |
| | | DataSet ds0 = oCn.RunProcReturn(sql0, "Xt_BillCheckFlowStatus"); |
| | | if (ds0 != null && ds0.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥!åå :åæ®æªå起审æ¹ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //夿忮å½åç¶æ |
| | | if (oBill.omodel.HChecker.Trim() != "") |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥!åå :åæ®å·²å®æå®¡æ ¸!ä¸è½ç»§ç»å®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | if (IsAudit == TypeConstant.REVERSE_AUDIT) //åå®¡æ ¸å¤æ |
| | | { |
| | | //夿æ¯å¦åå¨å®¡æ ¸è¿çé¡¹ç® |
| | | string sql0 = "select * from Xt_BillCheckFlowStatus where HBillInterID = " + lngBillKey + " and HBillTypeID = '" + oBill.BillType + "' and ISNULL(HChecker,'') <> ''"; |
| | | DataSet ds0 = oCn.RunProcReturn(sql0, "Xt_BillCheckFlowStatus"); |
| | | if (ds0 != null && ds0.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "åå®¡æ ¸å¤±è´¥!åå :åæ®ä¸åå¨å·²ç»å®¡æ ¸ç项ç®ï¼ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "åæ®ä¸åå¨!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | oCn.BeginTran(); |
| | | //è¿è¡éè¦è¿è¡çå®¡æ ¸/åå®¡æ ¸æä½ |
| | | if (IsAudit == TypeConstant.AUDIT) //å®¡æ ¸æäº¤ |
| | | { |
| | | #region å®¡æ ¸åçç¸å
³å¤æ |
| | | //å®¡æ ¸åæ§å¶========================================= |
| | | DataSet BeforeDs = oCn.RunProcReturn("Exec h_p_Pay_ProcPriceRequestBill_BeforeCheckCtrl " + HInterID.ToString() + ",'" + CurUserName + "'", "h_p_Pay_ProcPriceRequestBill_BeforeCheckCtrl"); |
| | | if (BeforeDs == null || BeforeDs.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "å®¡æ ¸åå¤æå¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(BeforeDs.Tables[0].Rows[0]["HBack"]) == 1) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼" + DBUtility.ClsPub.isStrNull(BeforeDs.Tables[0].Rows[0]["HRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | //================================================================================== |
| | | |
| | | //è¿è¡ ä¼è®¡æé´ ç»è´¦ çå¤æåæ§å¶ |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | DateTime HDate = DateTime.Now; |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | objJsonResult.Message = s; |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | //è·åå½åå®¡æ ¸é¡¹ç® |
| | | string sql0 = "select * from " + oBill.MvarItemKey + " where HInterID = " + lngBillKey; |
| | | DataSet ds0 = oCn.RunProcReturn(sql0, oBill.MvarItemKey); |
| | | string HCheckFlowID = ds0.Tables[0].Rows[0]["HCheckFlowID"].ToString(); //å®¡æ¹æµå
ç |
| | | string HCheckItemNowID = ds0.Tables[0].Rows[0]["HCheckItemNowID"].ToString(); //å½å审æ¹é¡¹ç®å
ç |
| | | string HCheckItemNextID = ds0.Tables[0].Rows[0]["HCheckItemNextID"].ToString(); //å¾
审æ¹é¡¹ç®å
ç |
| | | |
| | | //å¤æç¨æ·æ¯å¦ææé å®¡æ¹ å½åå®¡æ¹æµç审æ¹é¡¹ç® |
| | | //string sql01 = "select * from Xt_CheckUserRight where HUserID = '" + CurUserID + "' and HCheckFlowInterID = " + HCheckFlowID + " and HCheckItemID = " + HCheckItemNowID + " and HValue = 1"; |
| | | string sql01 = "select * from Xt_CheckUserRight where HUserID = '" + CurUserID + "' and HCheckFlowInterID = " + HCheckFlowID + " and HCheckItemID = " + HCheckItemNowID + ""; |
| | | DataSet ds01 = oCn.RunProcReturn(sql01, "Xt_CheckUserRight"); |
| | | if (ds01.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥!åå :ç¨æ·æ å½åå®¡æ ¸é¡¹ç®çå®¡æ ¸æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //æ´æ° 忮审æ¹ç¶æè¡¨ ä¸å¯¹åºå®¡æ ¸é¡¹ç®çå®¡æ ¸ç¶æ |
| | | string sql02 = "update Xt_BillCheckFlowStatus set HChecker='" + CurUserName + "',HCheckDate=getdate() where HBillTypeID = '" + oBill.BillType + "' and HBillInterID=" + lngBillKey + " and HCheckFlowID=" + HCheckFlowID + " and HCheckItemID=" + HCheckItemNowID; |
| | | oCn.RunProc(sql02); |
| | | |
| | | //夿å½åå®¡æ ¸é¡¹ç®æ¯å¦æ¯æåä¸ä¸ªé¡¹ç®ï¼å¦ææ¯ï¼å®¡æ ¸ååååæ®çåæ®ç¶æã妿䏿¯ï¼è·åä¸ä¸ä¸ªå®¡æ ¸é¡¹ç®å¹¶æ´æ°å°éå®è®¢å主表 |
| | | if (HCheckItemNextID != "0") //ååå®¡æ ¸çå®¡æ ¸é¡¹ç®ä¸æ¯æåä¸ä¸ªå®¡æ ¸é¡¹ç® |
| | | { |
| | | string sql03 = "select b.HInterID,b.HCheckItemID from Xt_CheckFlowMain as a " + |
| | | "inner join Xt_CheckFlowSub as b on a.HInterID = b.HInterID " + |
| | | "where a.HBillTypeID = '" + oBill.BillType + "' " + |
| | | "and a.HInterID = " + HCheckFlowID + " " + |
| | | "order by b.HFlowNo asc"; |
| | | DataSet ds03 = oCn.RunProcReturn(sql03, "Xt_CheckFlowMain"); |
| | | |
| | | //è·åæ°çå½åå®¡æ ¸é¡¹ç®åå¾
å®¡æ ¸é¡¹ç® |
| | | for (int i = 0; i < ds03.Tables[0].Rows.Count; i++) |
| | | { |
| | | if (ds03.Tables[0].Rows[i]["HCheckItemID"].ToString() == HCheckItemNextID) |
| | | { |
| | | HCheckItemNowID = HCheckItemNextID; |
| | | } |
| | | else if (HCheckItemNowID == HCheckItemNextID) |
| | | { |
| | | HCheckItemNextID = ds03.Tables[0].Rows[i]["HCheckItemID"].ToString(); |
| | | break; |
| | | } |
| | | } |
| | | //æ°çå½åå®¡æ ¸é¡¹ç®ä¸ºæåä¸ä¸ªå®¡æ ¸é¡¹ç®ï¼å¾
å®¡æ ¸é¡¹ç®ä¸åå¨ï¼è®¾ä¸ºé»è®¤å¼"0" |
| | | if (HCheckItemNowID == HCheckItemNextID) |
| | | { |
| | | HCheckItemNextID = "0"; |
| | | } |
| | | |
| | | //æ´æ°åæ®ä¸»è¡¨çå®¡æ¹æµæ°æ® |
| | | string sql04 = "update " + oBill.MvarItemKey + " set HCheckItemNowID=" + HCheckItemNowID + ",HCheckItemNextID=" + HCheckItemNextID + " where HInterID = " + lngBillKey; |
| | | oCn.RunProc(sql04); |
| | | |
| | | |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = "å®¡æ ¸æå"; |
| | | objJsonResult.data = null; |
| | | } |
| | | else //ååå®¡æ ¸çå®¡æ ¸é¡¹ç®æ¯æåä¸ä¸ªå®¡æ ¸é¡¹ç® |
| | | { |
| | | //æ´æ°åæ®ä¸»è¡¨çå®¡æ¹æµæ°æ® |
| | | HCheckItemNowID = "0"; |
| | | HCheckItemNextID = "0"; |
| | | |
| | | string sql04 = "update " + oBill.MvarItemKey + " set HCheckItemNowID=" + HCheckItemNowID + ",HCheckItemNextID=" + HCheckItemNextID + " where HInterID = " + lngBillKey; |
| | | oCn.RunProc(sql04); |
| | | |
| | | //æ´æ°åæ®çåæ®ç¶æ |
| | | if (oBill.CheckBill(oCn, oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Pay_ProcPriceRequestBill_AfterCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = "å®¡æ ¸æå"; |
| | | objJsonResult.data = null; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | |
| | | oCn.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | if (IsAudit == TypeConstant.REVERSE_AUDIT) //åå®¡æ ¸æäº¤ |
| | | { |
| | | #region åå®¡æ ¸åçç¸å
³å¤æ |
| | | //åå®¡æ ¸åæ§å¶========================================= |
| | | DataSet BeforeDs = oCn.RunProcReturn("Exec h_p_Pay_ProcPriceRequestBill_BeforeUnCheckCtrl " + HInterID.ToString() + ",'" + CurUserName + "'", "h_p_Pay_ProcPriceRequestBill_BeforeUnCheckCtrl"); |
| | | if (BeforeDs == null || BeforeDs.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "åå®¡æ ¸åå¤æå¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(BeforeDs.Tables[0].Rows[0]["HBack"]) == 1) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "åå®¡æ ¸å¤±è´¥ï¼" + DBUtility.ClsPub.isStrNull(BeforeDs.Tables[0].Rows[0]["HRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | //========================================================= |
| | | |
| | | //è¿è¡ ä¼è®¡æé´ ç»è´¦ çå¤æåæ§å¶ |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | DateTime HDate = DateTime.Now; |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | objJsonResult.Message = s; |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | //è·åéè¦åå®¡æ ¸çå®¡æ ¸é¡¹ç® |
| | | string sql0 = "select c.* from Xt_CheckFlowMain as a " + |
| | | "inner join Xt_CheckFlowSub as b on a.HInterID = b.HInterID " + |
| | | "inner join Xt_BillCheckFlowStatus as c on a.HBillTypeID = c.HBillTypeID and b.HCheckItemID = c.HCheckItemID " + |
| | | "where c.HBillTypeID = '" + oBill.BillType + "' and c.HBillInterID = " + lngBillKey + " " + |
| | | "order by b.HFlowNo asc"; |
| | | DataSet ds0 = oCn.RunProcReturn(sql0, "Xt_BillCheckFlowStatus"); |
| | | if (ds0 == null || ds0.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "åå®¡æ ¸å¤±è´¥!åå :æªå起审æ¹ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | string HCheckFlowID = ds0.Tables[0].Rows[0]["HCheckFlowID"].ToString(); //å®¡æ¹æµå
ç |
| | | string HCheckItemNowID = "0"; //å½å审æ¹é¡¹ç®å
ç |
| | | string HCheckItemNextID = "0"; //å¾
审æ¹é¡¹ç®å
ç |
| | | if (oBill.omodel.HBillStatus == 6) |
| | | { |
| | | for (int i = 0; i < ds0.Tables[0].Rows.Count; i++) |
| | | { |
| | | if (ds0.Tables[0].Rows[i]["HChecker"].ToString() != "") |
| | | { |
| | | HCheckItemNowID = ds0.Tables[0].Rows[i]["HCheckItemID"].ToString(); |
| | | HCheckItemNextID = ds0.Tables[0].Rows[i]["HCheckItemID"].ToString(); |
| | | } |
| | | else |
| | | { |
| | | HCheckItemNextID = ds0.Tables[0].Rows[i]["HCheckItemID"].ToString(); |
| | | break; |
| | | } |
| | | } |
| | | if (HCheckItemNowID == HCheckItemNextID) |
| | | { |
| | | HCheckItemNextID = "0"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | HCheckItemNowID = ds0.Tables[0].Rows[ds0.Tables[0].Rows.Count - 1]["HCheckItemID"].ToString(); |
| | | HCheckItemNextID = "0"; |
| | | } |
| | | |
| | | //å¤æç¨æ·æ¯å¦ææé å®¡æ¹ å½åå®¡æ¹æµç审æ¹é¡¹ç® |
| | | //string sql01 = "select * from Xt_CheckUserRight where HUserID = '" + CurUserID + "' and HCheckFlowInterID = " + HCheckFlowID + " and HCheckItemID = " + HCheckItemNowID + " and HValue = 1"; |
| | | string sql01 = "select * from Xt_CheckUserRight where HUserID = '" + CurUserID + "' and HCheckFlowInterID = " + HCheckFlowID + " and HCheckItemID = " + HCheckItemNowID + ""; |
| | | DataSet ds01 = oCn.RunProcReturn(sql01, "Xt_CheckUserRight"); |
| | | if (ds01.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "åå®¡æ ¸å¤±è´¥!åå :ç¨æ·æ å½åå®¡æ ¸é¡¹ç®çå®¡æ ¸æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | //æ´æ° 忮审æ¹ç¶æè¡¨ ä¸å¯¹åºå®¡æ ¸é¡¹ç®çå®¡æ ¸ç¶æ |
| | | string sql02 = "update Xt_BillCheckFlowStatus set HChecker='',HCheckDate='' where HBillTypeID = '" + oBill.BillType + "' and HBillInterID=" + lngBillKey + " and HCheckFlowID=" + HCheckFlowID + " and HCheckItemID=" + HCheckItemNowID; |
| | | oCn.RunProc(sql02); |
| | | |
| | | //夿åå®¡æ ¸çåæ®æ¯å¦å·²ç»å®¡æ ¸å®æï¼è¥å®¡æ ¸å®æï¼åå®¡æ ¸éè¦åæ´åæ®ç¶æã |
| | | if (oBill.omodel.HBillStatus == 6) |
| | | { |
| | | //æ´æ°åæ®ä¸»è¡¨çå®¡æ¹æµæ°æ® |
| | | string sql04 = "update " + oBill.MvarItemKey + " set HCheckItemNowID=" + HCheckItemNowID + ",HCheckItemNextID=" + HCheckItemNextID + " where HInterID = " + lngBillKey; |
| | | oCn.RunProc(sql04); |
| | | |
| | | |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = "å®¡æ ¸æå"; |
| | | objJsonResult.data = null; |
| | | } |
| | | else |
| | | { |
| | | |
| | | //åå®¡æ ¸æäº¤AbandonCheck |
| | | if (oBill.AbandonCheck(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Pay_ProcPriceRequestBill_AfterUnCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | | //æ´æ°åæ®ä¸»è¡¨çå®¡æ¹æµæ°æ® |
| | | string sql04 = "update " + oBill.MvarItemKey + " set HCheckItemNowID=" + HCheckItemNowID + ",HCheckItemNextID=" + HCheckItemNextID + ",HBillStatus=6 " + " where HInterID = " + lngBillKey; |
| | | oCn.RunProc(sql04); |
| | | objJsonResult.code = CodeConstant.SUCCEED; |
| | | objJsonResult.count = CountConstant.SUCCEED; |
| | | objJsonResult.Message = "åå®¡æ ¸æå"; |
| | | objJsonResult.data = null; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "åå®¡æ ¸å¤±è´¥!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | |
| | | oCn.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | |
| | | oCn.Commit(); |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥æè
åå®¡æ ¸å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | |
| | | oCn.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | } |
| | | } |
| | |
| | | string user_LongShan = ""; |
| | | string HName_LongShan = ""; |
| | | |
| | | |
| | | #region å·¥èµè¿ç® |
| | | /// <summary> |
| | | /// æ ¹æ®å¼å§æ¥æãç»ææ¥æãçç»è¿è¡å·¥èµè¿ç® |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Pay_SalaryCulateController/GetSalaryCalculate_Json")] |
| | | [HttpGet] |
| | | public object GetSalaryCalculate_Json(DateTime HBeginDate, DateTime HEndDate, Int64 HGroupID, string HSourceBillType, string HMaker, Int64 HStockOrgID) |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_Pay_SalaryCalculate '" + HBeginDate + "','" + HEndDate + "'," + HGroupID.ToString() + ",'" + HSourceBillType + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_Pay_SalaryCalculate"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å·¥èµè¿ç®æ¶åºç°é误ï¼è¯·éæ°è¿ç®ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) == 1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å·¥èµè¿ç®å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | |
| | | #region å·¥èµè®¡ç®-æ°æ®æ¥è¯¢ |
| | | /// <summary> |
| | | /// è¿å项ç®é¶æ®µå表 |
| | |
| | | { |
| | | try |
| | | { |
| | | DAL.ClsGy_ProcPrice_Ctl oProcPrice = new DAL.ClsGy_ProcPrice_Ctl(); |
| | | double HPrice = oProcPrice.LoadProcPrice(HMaterID, HProcID, HSourceID, true); |
| | | double HPrice=0; |
| | | ds = oCn.RunProcReturn("exec h_p_Pay_GetPriceByMaterHProcHSource " + HMaterID.ToString() + "," + HProcID.ToString() + "," + HSourceID.ToString(), "h_p_Pay_GetPriceByMaterHProcHSource"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | HPrice = 0; |
| | | } |
| | | else |
| | | { |
| | | HPrice = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[0]["HPrice"]); |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.Message = "æåï¼"; |
| | | objJsonResult.data = HPrice; |
| | | return objJsonResult; |
| | | } |
| | |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetSourceBillList_Json")] |
| | | [HttpGet] |
| | | public object GetSourceBillList_Json(string HBillType, string HSourceBillType, Int64 HStockOrgID, string HSourceBillNo, string HMater) |
| | | public object GetSourceBillList_Json(string HBillType, string HSourceBillType, Int64 HStockOrgID, string HSourceBillNo, string HMater, string HCustom) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_WMS_GetSourceBillList '" + HBillType + "','" + HSourceBillType + "'," + HStockOrgID.ToString() + ",'" + HSourceBillNo + "', '" + HMater + "'", "h_p_WMS_GetSourceBillList"); |
| | | ds = oCn.RunProcReturn("exec h_p_WMS_GetSourceBillList '" + HBillType + "','" + HSourceBillType + "'," + HStockOrgID.ToString() + ",'" + HSourceBillNo + "','" + HMater + "','" + HCustom + "'", "h_p_WMS_GetSourceBillList"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | using System.Data; |
| | | |
| | | namespace WebAPI.DLL |
| | | { |
| | | public class ClsGy_ProcMul_Ctl : DBUtility.ClsGy_Base_Ctl |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | //å代ç ç¨äº æ¿æ¢åé¡¹ç® |
| | | public string HOldNumber; |
| | | public Model.ClsGy_ProcMul_Model oModel = new Model.ClsGy_ProcMul_Model(); |
| | | //æ°å¢ |
| | | public override bool AddNew() |
| | | { |
| | | // |
| | | try |
| | | { |
| | | oCn.BeginTran(); |
| | | oCn.RunProc("Insert into " + MvarItemKey + " " + |
| | | " (HNumber,HName,HHelpCode,HShortNumber,HParentID" + |
| | | ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime,HUSEORGID,HUseFlag,HMakeEmp,HCREATEORGID,HDeptID) " + |
| | | " Values('" + oModel.HNumber + "','" + oModel.HName + "','" + oModel.HHelpCode + "','" + oModel.HShortNumber + "'," + oModel.HParentID.ToString() + |
| | | "," + oModel.HLevel.ToString() + "," + Convert.ToString(oModel.HEndFlag ? 1 : 0) + "," + Convert.ToString(oModel.HStopflag ? 1 : 0) + ",'" + oModel.HRemark + "','" +DateTime.Now+ "','" + oModel.HUSEORGID + "','" + oModel.HUseFlag + "','" + oModel.HMakeEmp+ "','" + oModel.HUSEORGID +"'," + oModel.HDeptID+")", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //ä¿®æ¹ä¸çº§ä¸ºéæ«çº§ä»£ç |
| | | oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCn.RollBack(); |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | //ä¿®æ¹ |
| | | public override bool ModifyByID(Int64 sItemID) |
| | | { |
| | | try |
| | | { |
| | | |
| | | oCn.BeginTran(); |
| | | oCn.RunProc("Update " + MvarItemKey + " set " + |
| | | " HNumber='" + oModel.HNumber + "'" + |
| | | ",HName='" + oModel.HName + "'" + |
| | | ",HShortNumber='" + oModel.HShortNumber + "'" + |
| | | ",HHelpCode='" + oModel.HHelpCode + "'" + |
| | | ",HModifyTime='" + DateTime.Now + "'" + |
| | | ",HUSEORGID='" + oModel.HUSEORGID + "'" + |
| | | ",HModifyEmp ='" + oModel.HMakeEmp + "'" + |
| | | ",HUseFlag='" + oModel.HUseFlag + "'" + |
| | | ",HStopflag=" + Convert.ToString(oModel.HStopflag ? 1 : 0) + |
| | | ",HRemark= '" + oModel.HRemark + "',"+ |
| | | "HDeptID = "+ oModel.HDeptID + " Where HItemID=" + sItemID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //ä¿®æ¹å项ç®ä»£ç |
| | | oCn.RunProc("exec h_p_Gy_UpdateNumber '" + MvarItemKey + "','" + oModel.HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //å°ä¸çº§ ä¸ºéæ«çº§ |
| | | oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | // |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCn.RollBack(); |
| | | throw (e); |
| | | } |
| | | } |
| | | //æ ¹æ®ä»£ç å¤æä¿¡æ¯ |
| | | public override bool HavParentCode(string sCode, Int64 sItemID) |
| | | { |
| | | DataSet DS; |
| | | try |
| | | { |
| | | DS = oCn.RunProcReturn("Select * from " + MvarItemKey + " Where HStopflag=0 and HNumber='" + sCode + "' and HItemID<>" + sItemID, MvarItemKey, ref Pub_Class.ClsPub.sExeReturnInfo); |
| | | if (DS.Tables[0].Rows.Count == 0) |
| | | return false; |
| | | else |
| | | { |
| | | oModel.HItemID = Convert.ToInt64(DS.Tables[0].Rows[0]["HItemID"]); |
| | | return true; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | throw (e); |
| | | } |
| | | } |
| | | //æé 彿° |
| | | public ClsGy_ProcMul_Ctl() |
| | | { |
| | | MvarItemKey = "Gy_ProcMul"; |
| | | MvarReportTitle = "工段设置"; |
| | | oModel = new Model.ClsGy_ProcMul_Model(); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | namespace WebAPI.Exceptions |
| | | { |
| | | /// <summary> |
| | | /// ç©ºæ°æ®å¼å¸¸ |
| | | /// </summary> |
| | | public class EmptyException : Exception |
| | | { |
| | | public EmptyException(string message): base(message) |
| | | { |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | namespace WebAPI.Exceptions |
| | | { |
| | | /// <summary> |
| | | /// EXCELå¼å¸¸æ¥éç±» |
| | | /// </summary> |
| | | public class ExcelException : Exception |
| | | { |
| | | public ExcelException(string message) : base(message) |
| | | { |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å¤çæ°å¢æ¨¡å
·ä¿å
»è®¡ååå表_计åçjson |
| | | /// </summary> |
| | | /// <param name="jsonString"></param> |
| | | /// <returns></returns> |
| | | public List<Model.ClsSc_MouldMaintainPlanBillSub_Plan> getObjectByJson_Sc_MouldMaintainPlanBillSub_Plan(string jsonString) |
| | | { |
| | | jsonString = "[" + jsonString.ToString() + "]"; |
| | | List<Model.ClsSc_MouldMaintainPlanBillSub_Plan> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSc_MouldMaintainPlanBillSub_Plan>>(jsonString); |
| | | return list; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// å¤çæ°å¢æ¨¡å
·ä¿å
»è®¡ååå表ä¿å
»ä¿¡æ¯çjson |
| | | /// </summary> |
| | | /// <param name="jsonString"></param> |
| | |
| | | |
| | | public string HCompName { get; set; }//å³å¡åä½ |
| | | |
| | | public string HPayMentType { get; set; }//è®°ä»¶ç±»å |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | public int HNowSPID { get; set; } |
| | | |
| | | public double HInitLife { get; set; } |
| | | public string HMouldUseStatus { get; set; } |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | namespace WebAPI.Models.Query |
| | | { |
| | | /// <summary> |
| | | /// æ¥è¯¢ç±» |
| | | /// </summary> |
| | | public class QueryModel |
| | | { |
| | | /// <summary> |
| | | /// sqlæ¥è¯¢è¯å¥ |
| | | /// </summary> |
| | | public string sWhere { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¥è¯¢ç¨æ· |
| | | /// </summary> |
| | | public string user { get; set; } |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace Model |
| | | { |
| | | public class QueryModel |
| | | { |
| | | /// <summary> |
| | | /// sqlæ¥è¯¢è¯å¥ |
| | | /// </summary> |
| | | public string sWhere { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¥è¯¢ç¨æ· |
| | | /// </summary> |
| | | public string user { get; set; } |
| | | } |
| | | } |
| | |
| | | public long HMaterToSourceInterID { get; set; } |
| | | public string HMaterToSourceBillNo { get; set; } |
| | | public int HMouldID { get; set; } |
| | | public string HDate { get; set; } |
| | | } |
| | | } |
| | |
| | | public int HQCSchemeID_Fst { get; set; } |
| | | public int HQCSchemeID_Proc { get; set; } |
| | | public int HQCSchemeID_Patrol { get; set; } |
| | | public string HPayMentType { get; set; } |
| | | |
| | | } |
| | | } |
| | |
| | | --> |
| | | <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| | | <PropertyGroup> |
| | | <History>True|2024-09-23T02:58:34.6129284Z;True|2024-09-23T10:58:28.2863739+08:00;True|2024-09-23T10:46:39.8062504+08:00;False|2024-09-23T10:46:28.2127212+08:00;True|2024-09-23T10:41:36.7887633+08:00;False|2024-09-23T10:41:31.1693720+08:00;True|2024-09-20T14:36:35.1508292+08:00;True|2024-09-20T14:23:14.7828767+08:00;True|2024-09-20T10:20:42.4614808+08:00;False|2024-09-20T10:20:30.9842799+08:00;True|2024-09-19T14:20:56.6643781+08:00;True|2024-09-19T09:54:32.7563188+08:00;False|2024-09-19T09:54:16.5345071+08:00;True|2024-09-19T09:07:11.2182586+08:00;False|2024-09-19T09:07:00.2356340+08:00;True|2024-09-18T16:52:00.1148169+08:00;True|2024-09-18T15:38:57.9090829+08:00;True|2024-09-18T14:31:35.3097924+08:00;True|2024-09-18T14:14:45.1332631+08:00;True|2024-09-18T10:03:32.4149929+08:00;True|2024-09-18T09:59:34.6584259+08:00;False|2024-09-18T09:59:28.1320018+08:00;True|2024-09-16T09:25:02.1321635+08:00;False|2024-09-16T09:24:52.9179557+08:00;True|2024-09-14T16:00:39.9413222+08:00;True|2024-09-14T15:57:04.7663346+08:00;True|2024-09-14T15:53:17.2804503+08:00;False|2024-09-14T15:53:10.3529010+08:00;True|2024-09-14T11:12:47.6871531+08:00;True|2024-09-14T11:09:14.5541471+08:00;True|2024-09-14T11:04:01.8286675+08:00;False|2024-09-14T11:03:52.5770773+08:00;True|2024-09-13T14:33:50.5043085+08:00;False|2024-09-13T14:33:44.9903004+08:00;True|2024-09-13T13:37:51.1937510+08:00;True|2024-09-13T10:20:53.2644847+08:00;False|2024-09-13T10:19:33.7686753+08:00;True|2024-09-12T19:15:21.9135805+08:00;False|2024-09-12T19:15:07.2717017+08:00;True|2024-09-12T17:25:26.5527019+08:00;True|2024-09-12T17:20:42.2498355+08:00;True|2024-09-12T17:16:44.8817635+08:00;True|2024-09-12T17:16:02.4132675+08:00;True|2024-09-12T17:08:14.2819047+08:00;True|2024-09-12T16:07:15.3675281+08:00;True|2024-09-12T16:06:23.8568906+08:00;True|2024-09-12T15:48:45.1455315+08:00;True|2024-09-12T14:59:30.0679595+08:00;True|2024-09-12T14:18:21.9534092+08:00;True|2024-09-12T14:07:35.2885035+08:00;False|2024-09-12T14:06:30.5732168+08:00;False|2024-09-12T14:06:17.1404767+08:00;True|2024-09-12T14:03:12.8150228+08:00;True|2024-09-12T13:53:20.7537798+08:00;True|2024-09-12T13:48:43.2408012+08:00;False|2024-09-12T13:48:36.5217018+08:00;True|2024-09-11T20:20:57.7845361+08:00;False|2024-09-11T20:20:38.9732855+08:00;True|2024-09-10T15:15:04.6204983+08:00;True|2024-09-10T11:33:55.3963324+08:00;True|2024-09-10T11:10:10.3836571+08:00;True|2024-09-10T10:39:06.5850395+08:00;True|2024-09-10T10:27:33.2463582+08:00;False|2024-09-10T10:26:05.4608008+08:00;True|2024-09-09T19:14:08.0718627+08:00;True|2024-09-09T19:08:42.5709780+08:00;False|2024-09-09T19:08:33.7817129+08:00;True|2024-09-06T17:00:13.2484828+08:00;False|2024-09-06T17:00:06.1281061+08:00;True|2024-09-05T11:39:53.4537518+08:00;False|2024-09-05T11:39:04.6111418+08:00;True|2024-09-04T12:39:24.8111127+08:00;True|2024-09-04T12:12:57.9411095+08:00;False|2024-09-04T12:12:28.6748628+08:00;True|2024-09-03T14:45:30.8259459+08:00;False|2024-09-03T14:45:19.1997455+08:00;True|2024-08-30T16:08:31.2415230+08:00;True|2024-08-30T15:18:36.6727666+08:00;True|2024-08-28T09:49:18.1543721+08:00;False|2024-08-28T09:49:11.7260337+08:00;True|2024-08-27T13:18:40.6234335+08:00;False|2024-08-27T13:18:33.9730040+08:00;True|2024-08-26T17:40:29.9158973+08:00;True|2024-08-26T17:21:30.8800173+08:00;True|2024-08-26T17:19:23.9260010+08:00;True|2024-08-26T14:27:20.8154004+08:00;True|2024-08-26T14:16:14.4482284+08:00;True|2024-08-26T13:12:42.9574127+08:00;True|2024-08-26T12:48:31.2107630+08:00;True|2024-08-26T11:07:15.1181342+08:00;False|2024-08-26T11:07:09.9429791+08:00;True|2024-08-26T10:49:20.8494484+08:00;True|2024-08-26T10:13:11.5222607+08:00;False|2024-08-26T10:12:59.1146882+08:00;True|2024-08-23T15:39:39.9842990+08:00;False|2024-08-23T15:39:33.9824708+08:00;True|2024-08-22T16:55:46.4689463+08:00;True|2024-08-22T16:44:25.0981764+08:00;True|2024-08-22T16:19:29.9801909+08:00;True|2024-08-22T14:25:13.5120259+08:00;True|2024-08-22T09:48:50.0760398+08:00;True|2024-08-21T16:09:41.0487181+08:00;True|2024-08-21T15:42:13.7474317+08:00;True|2024-08-21T15:10:24.6912112+08:00;True|2024-08-21T14:56:51.3255866+08:00;True|2024-08-21T14:50:12.3359730+08:00;True|2024-08-19T15:43:16.1549663+08:00;True|2024-08-19T15:27:26.4219971+08:00;True|2024-08-19T09:41:45.7449029+08:00;True|2024-06-08T12:38:30.4153773+08:00;True|2024-06-07T21:22:19.4545597+08:00;True|2024-06-07T21:05:53.1963741+08:00;True|2024-06-07T21:00:57.2568708+08:00;True|2024-06-07T14:39:19.6618679+08:00;True|2024-06-07T14:21:51.5169962+08:00;True|2024-06-07T11:29:08.0690999+08:00;True|2024-06-07T11:26:29.1494329+08:00;True|2024-06-07T11:20:41.2024309+08:00;True|2024-06-07T10:12:26.5905597+08:00;False|2024-06-07T10:11:35.3679434+08:00;</History> |
| | | <History>True|2024-09-27T07:00:21.0482043Z;True|2024-09-27T14:57:07.0747471+08:00;True|2024-09-27T14:53:52.8423718+08:00;True|2024-09-27T13:29:58.8925618+08:00;False|2024-09-27T13:29:52.7163123+08:00;True|2024-09-26T20:27:04.5201970+08:00;True|2024-09-26T19:16:26.6734751+08:00;True|2024-09-26T19:13:46.3429211+08:00;True|2024-09-26T18:50:55.3033341+08:00;True|2024-09-26T18:35:44.3607797+08:00;True|2024-09-26T18:33:11.2986890+08:00;True|2024-09-26T18:08:00.5018121+08:00;True|2024-09-26T17:57:04.3987105+08:00;False|2024-09-26T17:55:37.3316215+08:00;True|2024-09-26T17:53:52.1377436+08:00;False|2024-09-26T17:53:46.2067050+08:00;True|2024-09-25T17:21:24.1078881+08:00;True|2024-09-25T17:04:17.9619045+08:00;True|2024-09-23T10:58:34.6129284+08:00;True|2024-09-23T10:58:28.2863739+08:00;True|2024-09-23T10:46:39.8062504+08:00;False|2024-09-23T10:46:28.2127212+08:00;True|2024-09-23T10:41:36.7887633+08:00;False|2024-09-23T10:41:31.1693720+08:00;True|2024-09-20T14:36:35.1508292+08:00;True|2024-09-20T14:23:14.7828767+08:00;True|2024-09-20T10:20:42.4614808+08:00;False|2024-09-20T10:20:30.9842799+08:00;True|2024-09-19T14:20:56.6643781+08:00;True|2024-09-19T09:54:32.7563188+08:00;False|2024-09-19T09:54:16.5345071+08:00;True|2024-09-19T09:07:11.2182586+08:00;False|2024-09-19T09:07:00.2356340+08:00;True|2024-09-18T16:52:00.1148169+08:00;True|2024-09-18T15:38:57.9090829+08:00;True|2024-09-18T14:31:35.3097924+08:00;True|2024-09-18T14:14:45.1332631+08:00;True|2024-09-18T10:03:32.4149929+08:00;True|2024-09-18T09:59:34.6584259+08:00;False|2024-09-18T09:59:28.1320018+08:00;True|2024-09-16T09:25:02.1321635+08:00;False|2024-09-16T09:24:52.9179557+08:00;True|2024-09-14T16:00:39.9413222+08:00;True|2024-09-14T15:57:04.7663346+08:00;True|2024-09-14T15:53:17.2804503+08:00;False|2024-09-14T15:53:10.3529010+08:00;True|2024-09-14T11:12:47.6871531+08:00;True|2024-09-14T11:09:14.5541471+08:00;True|2024-09-14T11:04:01.8286675+08:00;False|2024-09-14T11:03:52.5770773+08:00;True|2024-09-13T14:33:50.5043085+08:00;False|2024-09-13T14:33:44.9903004+08:00;True|2024-09-13T13:37:51.1937510+08:00;True|2024-09-13T10:20:53.2644847+08:00;False|2024-09-13T10:19:33.7686753+08:00;True|2024-09-12T19:15:21.9135805+08:00;False|2024-09-12T19:15:07.2717017+08:00;True|2024-09-12T17:25:26.5527019+08:00;True|2024-09-12T17:20:42.2498355+08:00;True|2024-09-12T17:16:44.8817635+08:00;True|2024-09-12T17:16:02.4132675+08:00;True|2024-09-12T17:08:14.2819047+08:00;True|2024-09-12T16:07:15.3675281+08:00;True|2024-09-12T16:06:23.8568906+08:00;True|2024-09-12T15:48:45.1455315+08:00;True|2024-09-12T14:59:30.0679595+08:00;True|2024-09-12T14:18:21.9534092+08:00;True|2024-09-12T14:07:35.2885035+08:00;False|2024-09-12T14:06:30.5732168+08:00;False|2024-09-12T14:06:17.1404767+08:00;True|2024-09-12T14:03:12.8150228+08:00;True|2024-09-12T13:53:20.7537798+08:00;True|2024-09-12T13:48:43.2408012+08:00;False|2024-09-12T13:48:36.5217018+08:00;True|2024-09-11T20:20:57.7845361+08:00;False|2024-09-11T20:20:38.9732855+08:00;True|2024-09-10T15:15:04.6204983+08:00;True|2024-09-10T11:33:55.3963324+08:00;True|2024-09-10T11:10:10.3836571+08:00;True|2024-09-10T10:39:06.5850395+08:00;True|2024-09-10T10:27:33.2463582+08:00;False|2024-09-10T10:26:05.4608008+08:00;True|2024-09-09T19:14:08.0718627+08:00;True|2024-09-09T19:08:42.5709780+08:00;False|2024-09-09T19:08:33.7817129+08:00;True|2024-09-06T17:00:13.2484828+08:00;False|2024-09-06T17:00:06.1281061+08:00;True|2024-09-05T11:39:53.4537518+08:00;False|2024-09-05T11:39:04.6111418+08:00;True|2024-09-04T12:39:24.8111127+08:00;True|2024-09-04T12:12:57.9411095+08:00;False|2024-09-04T12:12:28.6748628+08:00;True|2024-09-03T14:45:30.8259459+08:00;False|2024-09-03T14:45:19.1997455+08:00;True|2024-08-30T16:08:31.2415230+08:00;True|2024-08-30T15:18:36.6727666+08:00;True|2024-08-28T09:49:18.1543721+08:00;False|2024-08-28T09:49:11.7260337+08:00;True|2024-08-27T13:18:40.6234335+08:00;False|2024-08-27T13:18:33.9730040+08:00;True|2024-08-26T17:40:29.9158973+08:00;True|2024-08-26T17:21:30.8800173+08:00;True|2024-08-26T17:19:23.9260010+08:00;True|2024-08-26T14:27:20.8154004+08:00;True|2024-08-26T14:16:14.4482284+08:00;True|2024-08-26T13:12:42.9574127+08:00;True|2024-08-26T12:48:31.2107630+08:00;True|2024-08-26T11:07:15.1181342+08:00;False|2024-08-26T11:07:09.9429791+08:00;True|2024-08-26T10:49:20.8494484+08:00;True|2024-08-26T10:13:11.5222607+08:00;False|2024-08-26T10:12:59.1146882+08:00;True|2024-08-23T15:39:39.9842990+08:00;False|2024-08-23T15:39:33.9824708+08:00;True|2024-08-22T16:55:46.4689463+08:00;True|2024-08-22T16:44:25.0981764+08:00;True|2024-08-22T16:19:29.9801909+08:00;True|2024-08-22T14:25:13.5120259+08:00;True|2024-08-22T09:48:50.0760398+08:00;True|2024-08-21T16:09:41.0487181+08:00;True|2024-08-21T15:42:13.7474317+08:00;True|2024-08-21T15:10:24.6912112+08:00;True|2024-08-21T14:56:51.3255866+08:00;True|2024-08-21T14:50:12.3359730+08:00;True|2024-08-19T15:43:16.1549663+08:00;True|2024-08-19T15:27:26.4219971+08:00;True|2024-08-19T09:41:45.7449029+08:00;True|2024-06-08T12:38:30.4153773+08:00;True|2024-06-07T21:22:19.4545597+08:00;True|2024-06-07T21:05:53.1963741+08:00;True|2024-06-07T21:00:57.2568708+08:00;True|2024-06-07T14:39:19.6618679+08:00;True|2024-06-07T14:21:51.5169962+08:00;True|2024-06-07T11:29:08.0690999+08:00;True|2024-06-07T11:26:29.1494329+08:00;True|2024-06-07T11:20:41.2024309+08:00;True|2024-06-07T10:12:26.5905597+08:00;False|2024-06-07T10:11:35.3679434+08:00;</History> |
| | | <_PublishTargetUrl>D:\ç½ç«åå¸\æºäºMESWMS\API</_PublishTargetUrl> |
| | | </PropertyGroup> |
| | | <ItemGroup> |
| | |
| | | <publishTime>02/22/2013 16:43:40</publishTime> |
| | | </File> |
| | | <File Include="bin/BLL.dll"> |
| | | <publishTime>09/23/2024 10:58:03</publishTime> |
| | | <publishTime>09/27/2024 14:59:57</publishTime> |
| | | </File> |
| | | <File Include="bin/BLL.pdb"> |
| | | <publishTime>09/23/2024 10:58:03</publishTime> |
| | | <publishTime>09/27/2024 14:59:57</publishTime> |
| | | </File> |
| | | <File Include="bin/BouncyCastle.Crypto.dll"> |
| | | <publishTime>12/18/2020 05:32:28</publishTime> |
| | | </File> |
| | | <File Include="bin/DAL.dll"> |
| | | <publishTime>09/23/2024 10:58:02</publishTime> |
| | | <publishTime>09/27/2024 14:59:56</publishTime> |
| | | </File> |
| | | <File Include="bin/DAL.pdb"> |
| | | <publishTime>09/23/2024 10:58:02</publishTime> |
| | | <publishTime>09/27/2024 14:59:56</publishTime> |
| | | </File> |
| | | <File Include="bin/Dapper.dll"> |
| | | <publishTime>07/22/2016 22:52:40</publishTime> |
| | | </File> |
| | | <File Include="bin/DBUtility.dll"> |
| | | <publishTime>09/23/2024 10:57:59</publishTime> |
| | | <publishTime>09/27/2024 14:59:53</publishTime> |
| | | </File> |
| | | <File Include="bin/DBUtility.pdb"> |
| | | <publishTime>09/23/2024 10:57:59</publishTime> |
| | | <publishTime>09/27/2024 14:59:53</publishTime> |
| | | </File> |
| | | <File Include="bin/Grpc.Core.Api.dll"> |
| | | <publishTime>03/22/2022 13:17:26</publishTime> |
| | |
| | | <publishTime>07/25/2012 19:48:56</publishTime> |
| | | </File> |
| | | <File Include="bin/Model.dll"> |
| | | <publishTime>09/23/2024 10:58:00</publishTime> |
| | | <publishTime>09/27/2024 14:59:53</publishTime> |
| | | </File> |
| | | <File Include="bin/Model.pdb"> |
| | | <publishTime>09/23/2024 10:58:00</publishTime> |
| | | <publishTime>09/27/2024 14:59:53</publishTime> |
| | | </File> |
| | | <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs"> |
| | | <publishTime>05/25/2024 09:46:41</publishTime> |
| | |
| | | <publishTime>10/23/2021 17:07:54</publishTime> |
| | | </File> |
| | | <File Include="bin/Pub_Class.dll"> |
| | | <publishTime>09/23/2024 10:57:58</publishTime> |
| | | <publishTime>09/27/2024 14:59:51</publishTime> |
| | | </File> |
| | | <File Include="bin/Pub_Class.pdb"> |
| | | <publishTime>09/23/2024 10:57:58</publishTime> |
| | | <publishTime>09/27/2024 14:59:51</publishTime> |
| | | </File> |
| | | <File Include="bin/Pub_Control.dll"> |
| | | <publishTime>09/23/2024 10:57:59</publishTime> |
| | | <publishTime>09/27/2024 14:59:52</publishTime> |
| | | </File> |
| | | <File Include="bin/Pub_Control.pdb"> |
| | | <publishTime>09/23/2024 10:57:59</publishTime> |
| | | <publishTime>09/27/2024 14:59:52</publishTime> |
| | | </File> |
| | | <File Include="bin/RestSharp.dll"> |
| | | <publishTime>08/31/2012 06:22:50</publishTime> |
| | | </File> |
| | | <File Include="bin/SQLHelper.dll"> |
| | | <publishTime>09/23/2024 10:57:59</publishTime> |
| | | <publishTime>09/27/2024 14:59:52</publishTime> |
| | | </File> |
| | | <File Include="bin/SQLHelper.pdb"> |
| | | <publishTime>09/23/2024 10:57:59</publishTime> |
| | | <publishTime>09/27/2024 14:59:52</publishTime> |
| | | </File> |
| | | <File Include="bin/Swashbuckle.Core.dll"> |
| | | <publishTime>02/16/2015 01:57:08</publishTime> |
| | | </File> |
| | | <File Include="bin/SyntacticSugar.dll"> |
| | | <publishTime>09/23/2024 10:57:57</publishTime> |
| | | <publishTime>09/27/2024 14:59:51</publishTime> |
| | | </File> |
| | | <File Include="bin/SyntacticSugar.pdb"> |
| | | <publishTime>09/23/2024 10:57:57</publishTime> |
| | | <publishTime>09/27/2024 14:59:51</publishTime> |
| | | </File> |
| | | <File Include="bin/System.Buffers.dll"> |
| | | <publishTime>07/19/2017 18:01:28</publishTime> |
| | |
| | | <publishTime>05/09/2023 10:43:40</publishTime> |
| | | </File> |
| | | <File Include="bin/TopSdk.dll"> |
| | | <publishTime>09/23/2024 10:58:00</publishTime> |
| | | <publishTime>09/27/2024 14:59:53</publishTime> |
| | | </File> |
| | | <File Include="bin/TopSdk.pdb"> |
| | | <publishTime>09/23/2024 10:58:00</publishTime> |
| | | <publishTime>09/27/2024 14:59:53</publishTime> |
| | | </File> |
| | | <File Include="bin/WebActivatorEx.dll"> |
| | | <publishTime>11/24/2014 19:18:48</publishTime> |
| | | </File> |
| | | <File Include="bin/WebAPI.dll"> |
| | | <publishTime>09/23/2024 10:58:21</publishTime> |
| | | <publishTime>09/27/2024 15:00:14</publishTime> |
| | | </File> |
| | | <File Include="bin/WebAPI.pdb"> |
| | | <publishTime>09/23/2024 10:58:21</publishTime> |
| | | <publishTime>09/27/2024 15:00:14</publishTime> |
| | | </File> |
| | | <File Include="bin/WebGrease.dll"> |
| | | <publishTime>07/18/2013 01:03:52</publishTime> |
| | |
| | | <publishTime>05/25/2024 09:46:41</publishTime> |
| | | </File> |
| | | <File Include="Web.config"> |
| | | <publishTime>09/23/2024 10:58:27</publishTime> |
| | | <publishTime>09/27/2024 15:00:20</publishTime> |
| | | </File> |
| | | </ItemGroup> |
| | | </Project> |
| | |
| | | --> |
| | | <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| | | <PropertyGroup> |
| | | <History>True|2024-09-20T01:59:12.9943442Z;False|2024-09-20T09:58:18.6945854+08:00;True|2024-09-12T20:40:58.7161451+08:00;False|2024-09-12T20:40:00.0672966+08:00;True|2024-09-12T16:47:22.7671323+08:00;True|2024-09-12T16:34:18.5850144+08:00;True|2024-09-12T16:13:32.1929032+08:00;True|2024-09-12T09:12:54.4456999+08:00;False|2024-09-12T09:12:06.1002866+08:00;False|2024-09-11T21:06:15.4423786+08:00;True|2024-09-10T15:26:48.7055081+08:00;True|2024-09-10T09:26:36.8509916+08:00;True|2024-09-09T19:51:32.6059511+08:00;True|2024-09-09T19:05:47.5349922+08:00;True|2024-09-09T09:26:23.2022383+08:00;False|2024-09-09T09:25:27.3736749+08:00;True|2024-09-06T15:32:52.1865278+08:00;True|2024-09-06T15:16:01.1405794+08:00;True|2024-09-06T14:21:05.7482343+08:00;True|2024-09-06T14:09:17.1494566+08:00;True|2024-09-06T13:49:56.4128481+08:00;True|2024-09-06T13:11:53.0863947+08:00;True|2024-09-06T09:34:54.5934463+08:00;True|2024-09-06T08:47:19.9744092+08:00;True|2024-09-05T15:01:38.6968629+08:00;True|2024-09-05T14:56:09.3505818+08:00;True|2024-09-05T14:49:56.8774757+08:00;True|2024-09-05T08:14:13.2359921+08:00;False|2024-09-05T08:13:11.8797534+08:00;True|2024-09-03T16:52:02.8227375+08:00;False|2024-09-03T16:51:32.4250926+08:00;True|2024-09-03T16:33:05.7269609+08:00;True|2024-09-03T16:00:15.0288548+08:00;True|2024-08-29T08:06:32.4732067+08:00;False|2024-08-29T08:06:02.4801886+08:00;True|2024-08-26T10:17:08.7733750+08:00;False|2024-08-26T10:11:05.1864217+08:00;False|2024-08-26T09:50:31.1539306+08:00;False|2024-08-26T09:47:37.4351309+08:00;True|2024-08-16T16:55:32.0918962+08:00;True|2024-08-16T16:53:23.3505641+08:00;False|2024-08-16T16:49:30.4579212+08:00;False|2024-08-16T16:47:01.9799743+08:00;</History> |
| | | <History>True|2024-10-03T02:57:02.9299524Z;True|2024-10-03T10:02:10.1156720+08:00;True|2024-09-30T11:07:22.5376794+08:00;True|2024-09-30T10:15:40.3990343+08:00;True|2024-09-30T10:04:38.1942221+08:00;True|2024-09-29T19:22:01.5340857+08:00;False|2024-09-29T19:21:12.2387012+08:00;True|2024-09-26T09:50:22.2637977+08:00;True|2024-09-25T20:44:33.3994634+08:00;True|2024-09-25T16:07:23.2747063+08:00;True|2024-09-25T14:55:37.9194143+08:00;True|2024-09-24T20:03:43.9841995+08:00;True|2024-09-24T19:42:48.7479102+08:00;True|2024-09-24T19:38:31.5777012+08:00;True|2024-09-24T16:26:58.5969765+08:00;True|2024-09-24T15:31:00.7140362+08:00;True|2024-09-24T10:17:46.7830753+08:00;True|2024-09-24T09:40:19.5788062+08:00;False|2024-09-24T09:39:27.4521802+08:00;True|2024-09-23T19:35:55.3572583+08:00;True|2024-09-23T18:53:15.4480118+08:00;False|2024-09-23T18:52:22.0135173+08:00;True|2024-09-20T09:59:12.9943442+08:00;False|2024-09-20T09:58:18.6945854+08:00;True|2024-09-12T20:40:58.7161451+08:00;False|2024-09-12T20:40:00.0672966+08:00;True|2024-09-12T16:47:22.7671323+08:00;True|2024-09-12T16:34:18.5850144+08:00;True|2024-09-12T16:13:32.1929032+08:00;True|2024-09-12T09:12:54.4456999+08:00;False|2024-09-12T09:12:06.1002866+08:00;False|2024-09-11T21:06:15.4423786+08:00;True|2024-09-10T15:26:48.7055081+08:00;True|2024-09-10T09:26:36.8509916+08:00;True|2024-09-09T19:51:32.6059511+08:00;True|2024-09-09T19:05:47.5349922+08:00;True|2024-09-09T09:26:23.2022383+08:00;False|2024-09-09T09:25:27.3736749+08:00;True|2024-09-06T15:32:52.1865278+08:00;True|2024-09-06T15:16:01.1405794+08:00;True|2024-09-06T14:21:05.7482343+08:00;True|2024-09-06T14:09:17.1494566+08:00;True|2024-09-06T13:49:56.4128481+08:00;True|2024-09-06T13:11:53.0863947+08:00;True|2024-09-06T09:34:54.5934463+08:00;True|2024-09-06T08:47:19.9744092+08:00;True|2024-09-05T15:01:38.6968629+08:00;True|2024-09-05T14:56:09.3505818+08:00;True|2024-09-05T14:49:56.8774757+08:00;True|2024-09-05T08:14:13.2359921+08:00;False|2024-09-05T08:13:11.8797534+08:00;True|2024-09-03T16:52:02.8227375+08:00;False|2024-09-03T16:51:32.4250926+08:00;True|2024-09-03T16:33:05.7269609+08:00;True|2024-09-03T16:00:15.0288548+08:00;True|2024-08-29T08:06:32.4732067+08:00;False|2024-08-29T08:06:02.4801886+08:00;True|2024-08-26T10:17:08.7733750+08:00;False|2024-08-26T10:11:05.1864217+08:00;False|2024-08-26T09:50:31.1539306+08:00;False|2024-08-26T09:47:37.4351309+08:00;True|2024-08-16T16:55:32.0918962+08:00;True|2024-08-16T16:53:23.3505641+08:00;False|2024-08-16T16:49:30.4579212+08:00;False|2024-08-16T16:47:01.9799743+08:00;</History> |
| | | <_PublishTargetUrl>G:\issWeb\ç½ç«åå¸\API</_PublishTargetUrl> |
| | | </PropertyGroup> |
| | | <ItemGroup> |
| | |
| | | <publishTime>02/22/2013 16:43:40</publishTime> |
| | | </File> |
| | | <File Include="bin/BLL.dll"> |
| | | <publishTime>09/20/2024 16:18:49</publishTime> |
| | | <publishTime>10/08/2024 10:34:50</publishTime> |
| | | </File> |
| | | <File Include="bin/BLL.pdb"> |
| | | <publishTime>09/20/2024 16:18:49</publishTime> |
| | | <publishTime>10/08/2024 10:34:50</publishTime> |
| | | </File> |
| | | <File Include="bin/BouncyCastle.Crypto.dll"> |
| | | <publishTime>12/18/2020 05:32:28</publishTime> |
| | | </File> |
| | | <File Include="bin/DAL.dll"> |
| | | <publishTime>09/20/2024 16:18:47</publishTime> |
| | | <publishTime>10/08/2024 10:34:48</publishTime> |
| | | </File> |
| | | <File Include="bin/DAL.pdb"> |
| | | <publishTime>09/20/2024 16:18:47</publishTime> |
| | | <publishTime>10/08/2024 10:34:48</publishTime> |
| | | </File> |
| | | <File Include="bin/Dapper.dll"> |
| | | <publishTime>07/22/2016 22:52:40</publishTime> |
| | | </File> |
| | | <File Include="bin/DBUtility.dll"> |
| | | <publishTime>09/20/2024 16:18:41</publishTime> |
| | | <publishTime>10/08/2024 10:34:40</publishTime> |
| | | </File> |
| | | <File Include="bin/DBUtility.pdb"> |
| | | <publishTime>09/20/2024 16:18:41</publishTime> |
| | | <publishTime>10/08/2024 10:34:40</publishTime> |
| | | </File> |
| | | <File Include="bin/Grpc.Core.Api.dll"> |
| | | <publishTime>03/22/2022 13:17:26</publishTime> |
| | |
| | | <publishTime>07/25/2012 19:48:56</publishTime> |
| | | </File> |
| | | <File Include="bin/Model.dll"> |
| | | <publishTime>09/20/2024 16:18:42</publishTime> |
| | | <publishTime>10/08/2024 10:34:41</publishTime> |
| | | </File> |
| | | <File Include="bin/Model.pdb"> |
| | | <publishTime>09/20/2024 16:18:42</publishTime> |
| | | <publishTime>10/08/2024 10:34:41</publishTime> |
| | | </File> |
| | | <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs"> |
| | | <publishTime>04/15/2024 12:55:45</publishTime> |
| | |
| | | <publishTime>10/23/2021 17:07:54</publishTime> |
| | | </File> |
| | | <File Include="bin/Pub_Class.dll"> |
| | | <publishTime>09/20/2024 16:18:39</publishTime> |
| | | <publishTime>10/08/2024 10:34:37</publishTime> |
| | | </File> |
| | | <File Include="bin/Pub_Class.pdb"> |
| | | <publishTime>09/20/2024 16:18:39</publishTime> |
| | | <publishTime>10/08/2024 10:34:37</publishTime> |
| | | </File> |
| | | <File Include="bin/Pub_Control.dll"> |
| | | <publishTime>09/20/2024 16:18:40</publishTime> |
| | | <publishTime>10/08/2024 10:34:39</publishTime> |
| | | </File> |
| | | <File Include="bin/Pub_Control.pdb"> |
| | | <publishTime>09/20/2024 16:18:40</publishTime> |
| | | <publishTime>10/08/2024 10:34:39</publishTime> |
| | | </File> |
| | | <File Include="bin/RestSharp.dll"> |
| | | <publishTime>08/31/2012 06:22:50</publishTime> |
| | | </File> |
| | | <File Include="bin/SQLHelper.dll"> |
| | | <publishTime>09/20/2024 16:18:40</publishTime> |
| | | <publishTime>10/08/2024 10:34:39</publishTime> |
| | | </File> |
| | | <File Include="bin/SQLHelper.pdb"> |
| | | <publishTime>09/20/2024 16:18:40</publishTime> |
| | | <publishTime>10/08/2024 10:34:39</publishTime> |
| | | </File> |
| | | <File Include="bin/Swashbuckle.Core.dll"> |
| | | <publishTime>02/16/2015 01:57:08</publishTime> |
| | | </File> |
| | | <File Include="bin/SyntacticSugar.dll"> |
| | | <publishTime>09/20/2024 16:14:46</publishTime> |
| | | <publishTime>10/08/2024 10:32:31</publishTime> |
| | | </File> |
| | | <File Include="bin/SyntacticSugar.pdb"> |
| | | <publishTime>09/20/2024 16:14:46</publishTime> |
| | | <publishTime>10/08/2024 10:32:31</publishTime> |
| | | </File> |
| | | <File Include="bin/System.Buffers.dll"> |
| | | <publishTime>07/19/2017 18:01:28</publishTime> |
| | |
| | | <publishTime>05/09/2023 10:43:40</publishTime> |
| | | </File> |
| | | <File Include="bin/TopSdk.dll"> |
| | | <publishTime>09/20/2024 16:14:52</publishTime> |
| | | <publishTime>10/08/2024 10:32:36</publishTime> |
| | | </File> |
| | | <File Include="bin/TopSdk.pdb"> |
| | | <publishTime>09/20/2024 16:14:52</publishTime> |
| | | <publishTime>10/08/2024 10:32:36</publishTime> |
| | | </File> |
| | | <File Include="bin/WebActivatorEx.dll"> |
| | | <publishTime>11/24/2014 19:18:48</publishTime> |
| | | </File> |
| | | <File Include="bin/WebAPI.dll"> |
| | | <publishTime>09/20/2024 16:19:21</publishTime> |
| | | <publishTime>10/08/2024 10:35:31</publishTime> |
| | | </File> |
| | | <File Include="bin/WebAPI.pdb"> |
| | | <publishTime>09/20/2024 16:19:21</publishTime> |
| | | <publishTime>10/08/2024 10:35:31</publishTime> |
| | | </File> |
| | | <File Include="bin/WebAPI.XmlSerializers.dll"> |
| | | <publishTime>08/16/2024 16:55:28</publishTime> |
| | |
| | | <publishTime>04/29/2024 08:30:03</publishTime> |
| | | </File> |
| | | <File Include="Web.config"> |
| | | <publishTime>09/20/2024 09:59:09</publishTime> |
| | | <publishTime>10/03/2024 10:57:02</publishTime> |
| | | </File> |
| | | </ItemGroup> |
| | | </Project> |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | namespace WebAPI.Utility |
| | | { |
| | | public class TreeUtil |
| | | { |
| | | public class TreeModel |
| | | { |
| | | public string id { get; set; } |
| | | public string title { get; set; } |
| | | public List<TreeModel> children = new List<TreeModel>(); |
| | | } |
| | | |
| | | #region éå½å½æ° |
| | | /// <summary> |
| | | /// éå½å½æ° |
| | | /// </summary> |
| | | public void digui(DataTable dt, List<TreeModel> tree, int num) |
| | | { |
| | | for (int m = 0; m < tree.Count; m++) |
| | | { |
| | | tree[m].children = new List<TreeModel>(); |
| | | for (int i = 0; i < dt.Rows.Count; i++)//ç¬¬ä¸æ¬¡å¾ªç¯ï¼å¾å°æææ ¹èç¹çåé |
| | | { |
| | | var strLen = dt.Rows[i]["hnumber"].ToString().Split('.'); |
| | | if (strLen.Length == num && dt.Rows[i]["hnumber"].ToString().Contains(tree[m].id + ".")) |
| | | { |
| | | TreeModel tbjson = new TreeModel(); |
| | | tbjson.id = dt.Rows[i]["hitemid"].ToString(); |
| | | tbjson.title = dt.Rows[i]["hname"].ToString(); |
| | | tree[m].children.Add(tbjson); |
| | | } |
| | | } |
| | | var strLens = tree[m].id.Split('.'); |
| | | for (int i = 0; i < tree[m].children.Count; i++) |
| | | { |
| | | digui(dt, tree[m].children, strLens.Length + 2);//忬¡ç¨åéå»å¾ªç¯ï¼æ¿åºåéçåé |
| | | } |
| | | } |
| | | |
| | | } |
| | | #endregion |
| | | |
| | | #region åç±» æ å½¢å¾(æ ¹æ®ä»£ç å±å¼æ ç¶å¾) |
| | | public void getTreeByLevel(DataTable dt, List<TreeModel> tree, int num) |
| | | { |
| | | for (int m = 0; m < tree.Count; m++) |
| | | { |
| | | tree[m].children = new List<TreeModel>(); |
| | | for (int i = 0; i < dt.Rows.Count; i++)//ç¬¬ä¸æ¬¡å¾ªç¯ï¼å¾å°æææ ¹èç¹çåé |
| | | { |
| | | var HLevel = (int)dt.Rows[i]["hlevel"]; |
| | | var HParentID = dt.Rows[i]["hparentid"].ToString(); |
| | | if (HLevel == num && HParentID == tree[m].id) |
| | | { |
| | | TreeModel tbjson = new TreeModel(); |
| | | tbjson.id = dt.Rows[i]["hitemid"].ToString(); |
| | | tbjson.title = dt.Rows[i]["hname"].ToString(); |
| | | tree[m].children.Add(tbjson); |
| | | } |
| | | } |
| | | for (int i = 0; i < tree[m].children.Count; i++) |
| | | { |
| | | getTreeByLevel(dt, tree[m].children, num + 1);//忬¡ç¨åéå»å¾ªç¯ï¼æ¿åºåéçåé |
| | | } |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | <!--<add key="FileIP" value="http://localhost:8082/LuBaoAPI"/>--> |
| | | <!--<add key="FileIP" value="http://localhost:8080/" />--> |
| | | <!--<add key="sUrl" value="http://183.129.128.86:9090/WEBS-WMSTest/WebService1.asmx"/> --> |
| | | <!--<add key="sUrl" value="http://192.168.0.11/WEBS-WMS/WebService1.asmx" />--><!--é¢å°å¼æº--> |
| | | <!--<add key="sUrl" value="http://192.168.0.11/WEBS-WMS/WebService1.asmx"/>--> |
| | | <!--é¢å°å¼æº--> |
| | | <add key="sUrl" value="http://192.168.0.11/WEBS-WMS/WebService1.asmx" /> <!--é¢å°å¼æº--> |
| | | <!--<add key="sUrl" value="http://60.190.4.42:9003/WebService/WebService1.asmx" /> å¤å®--> |
| | | <!--<add key="sUrl" value="http://60.190.4.42:9003/WebService/WebService1.asmx" /> --> |
| | | <!--<add key="sUrl" value="http://10.10.130.181/WEBS-WMS/WebService1.asmx"/> åæ¥ç§æ--> |
| | |
| | | <!--<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"/>--><!--æ¯è«å°--> |
| | | |
| | |
| | | </basicHttpBinding> |
| | | </bindings> |
| | | <client> |
| | | <endpoint address="http://10.10.1.2:8090/WEBS-WMS/WebService1.asmx" binding="basicHttpBinding" bindingConfiguration="WebService1Soap" contract="Webs1.WebService1Soap" name="WebService1Soap" /> |
| | | <endpoint address="http://192.168.0.11/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://10.10.1.2:8090/WEBS-WMS/WebService1.asmx</value> |
| | | <value>http://192.168.0.11/WEBS-WMS/WebService1.asmx</value> |
| | | </setting> |
| | | </WebAPI.Properties.Settings> |
| | | </applicationSettings> |
| | |
| | | <Compile Include="Controllers\åºç¡èµæ\åºç¡èµæ\Gy_OperatorController.cs" /> |
| | | <Compile Include="Controllers\åºç¡èµæ\åºç¡èµæ\Gy_PaymentConditionListBillController.cs" /> |
| | | <Compile Include="Controllers\åºç¡èµæ\åºç¡èµæ\Gy_DisposeWayController.cs" /> |
| | | <Compile Include="Controllers\åºç¡èµæ\åºç¡èµæ\Gy_ProcMulController.cs" /> |
| | | <Compile Include="Controllers\åºç¡èµæ\åºç¡èµæ\Gy_ScrapReasonController.cs" /> |
| | | <Compile Include="Controllers\åºç¡èµæ\åºç¡èµæ\Gy_TemporaryAreaController.cs" /> |
| | | <Compile Include="Controllers\åºç¡èµæ\åºç¡èµæ\Gy_RateTypeController.cs" /> |
| | |
| | | <Compile Include="Dapper\SqlPools.cs" /> |
| | | <Compile Include="DbUntil\DataFormatUntil.cs" /> |
| | | <Compile Include="DLL\ClsGy_BadPhenomena_Ctl.cs" /> |
| | | <Compile Include="DLL\ClsGy_ProcMul_Ctl.cs" /> |
| | | <Compile Include="DLL\ClsGy_TechnologyParameterType_Ctl.cs" /> |
| | | <Compile Include="DLL\ClsGy_InspectInstruMent_Ctl.cs" /> |
| | | <Compile Include="DLL\ClsGy_InspectBasis_Ctl.cs" /> |
| | |
| | | <Compile Include="DLL\å·¥èµç®¡ç\ClsPay_WorkTimesBill.cs" /> |
| | | <Compile Include="DLL\ééæ¶æ¯\Cls_DDMsg.cs" /> |
| | | <Compile Include="DLL\项ç®ç®¡ç\项ç®é¶æ®µ\ClsPM_CustomerProInfoBill_Ctl.cs" /> |
| | | <Compile Include="Exceptions\EmptyException.cs" /> |
| | | <Compile Include="Exceptions\ExcelException.cs" /> |
| | | <Compile Include="HttpClient.cs" /> |
| | | <Compile Include="InvokeHelper.cs" /> |
| | | <Compile Include="Log.cs" /> |
| | |
| | | <WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected> |
| | | <NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile> |
| | | <NameOfLastUsedPublishProfile>D:\Git\houduan\WebAPI\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile> |
| | | <NameOfLastUsedPublishProfile>D:\æºäºè¿æ\MES\MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfile10.pubxml</NameOfLastUsedPublishProfile> |
| | | <NameOfLastUsedPublishProfile>C:\Users\86130\Desktop\æºäºè¿æ\MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfilewtt.pubxml</NameOfLastUsedPublishProfile> |
| | | <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig> |
| | | <UseIISExpress>true</UseIISExpress> |
| | | <Use64BitIISExpress /> |
| | |
| | | <IISExpressWindowsAuthentication>disabled</IISExpressWindowsAuthentication> |
| | | <IISExpressUseClassicPipelineMode>false</IISExpressUseClassicPipelineMode> |
| | | <UseGlobalApplicationHostFile /> |
| | | <ProjectView>ProjectFiles</ProjectView> |
| | | <ProjectView>ShowAllFiles</ProjectView> |
| | | <Controller_SelectedScaffolderID>ApiControllerEmptyScaffolder</Controller_SelectedScaffolderID> |
| | | <Controller_SelectedScaffolderCategoryPath>root/Common/Web API</Controller_SelectedScaffolderCategoryPath> |
| | | </PropertyGroup> |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WebAPI.WebBLL.JCJM.GYZL |
| | | { |
| | | interface Gy_CustomerService |
| | | { |
| | | /// <summary> |
| | | /// 导å
¥excel |
| | | /// </summary> |
| | | void ImportExcel(); |
| | | |
| | | /// <summary> |
| | | /// ä¸ä¼ excel |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | DataTable UploadExcel(DataSet ExcelDs); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | using SyntacticSugar.constant; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Linq; |
| | | using System.Threading.Tasks; |
| | | using System.Web; |
| | | using WebAPI.Exceptions; |
| | | using WebAPI.WebBLL.JCJM.GYZL; |
| | | |
| | | namespace WebAPI.WebBLL.JCJM.IMPL |
| | | { |
| | | public class Gy_CustomerImpl : Gy_CustomerService |
| | | { |
| | | // 线ç¨è®¡æ°å¨ |
| | | List<Task> taskList = new List<Task>(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | #region 导å
¥EXCEL |
| | | public void ImportExcel() |
| | | { |
| | | throw new NotImplementedException(); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | /// <summary> |
| | | /// 夿å |
| | | /// </summary> |
| | | /// <param name="provisional"></param> |
| | | /// <returns></returns> |
| | | private static string JudgmentColumns(DataTable provisional) |
| | | { |
| | | var error = ""; |
| | | //æ¥è¯¢æ²¡æçå |
| | | if (!provisional.Columns.Contains("客æ·ä»£ç ")) |
| | | error += "æ²¡ææ¾å°ã客æ·ä»£ç ãçæ é¢,"; |
| | | |
| | | if (!provisional.Columns.Contains("客æ·åç§°")) |
| | | error += "æ²¡ææ¾å°ã客æ·åç§°ãçæ é¢,"; |
| | | return error; |
| | | } |
| | | |
| | | #region ä¸ä¼ EXCEL |
| | | public DataTable UploadExcel(DataSet ExcelDs) |
| | | { |
| | | //å建临æ¶è¡¨ |
| | | DataTable provisional = new DataTable("dt2"); |
| | | |
| | | //æ·»å åå |
| | | for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++) |
| | | { |
| | | provisional.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString()); |
| | | } |
| | | |
| | | //æ·»å æ°æ® |
| | | for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++) |
| | | { |
| | | DataRow row = provisional.NewRow(); |
| | | for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++) |
| | | { |
| | | row[j] = ExcelDs.Tables[0].Rows[i][j].ToString(); |
| | | } |
| | | provisional.Rows.Add(row); |
| | | } |
| | | |
| | | //夿å |
| | | string error = JudgmentColumns(provisional); |
| | | if (error.Length > 0) |
| | | { |
| | | throw new ExcelException($"Excel模æ¿åå¨é误,{error}\r\n"); |
| | | } |
| | | |
| | | for (int i = 0; i <= provisional.Rows.Count - 1; i++) |
| | | { |
| | | string HRegionNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["å°åºä»£ç "].ToString()); |
| | | string HRegionName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["å°åºåç§°"].ToString()); |
| | | string HCurrencyNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["é»è®¤è´§å¸ä»£ç "].ToString()); |
| | | string HCurrencyName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["é»è®¤è´§å¸åç§°"].ToString()); |
| | | //string HBillingNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["ç»ç®æ¹å¼ä»£ç "].ToString()); |
| | | //string HBillingName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["ç»ç®æ¹å¼åç§°"].ToString()); |
| | | |
| | | string HCusTypeNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["客æ·å类代ç "].ToString()); |
| | | string HCusTypeName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["客æ·åç±»åç§°"].ToString()); |
| | | |
| | | //è®°å½ä»»å¡ |
| | | var tasks = new List<Task>(); |
| | | |
| | | //妿å½åå°åºä»£ç åå°åºåç§°ä¸ä¸ºç©ºå夿æ¯å¦åå¨ |
| | | if (!String.IsNullOrEmpty(HRegionName) || !String.IsNullOrEmpty(HRegionNumber)) |
| | | { |
| | | tasks.Add(JudgeRegion(HRegionNumber, HRegionName)); |
| | | } |
| | | |
| | | // 妿å½åè´§å¸ä»£ç åè´§å¸åç§°ä¸ä¸ºç©ºå夿æ¯å¦åå¨ |
| | | if (!String.IsNullOrEmpty(HCurrencyName) || !String.IsNullOrEmpty(HCurrencyNumber)) |
| | | { |
| | | tasks.Add(JudgeCurrency(HCurrencyNumber, HCurrencyName)); |
| | | } |
| | | |
| | | //妿å½å客æ·å类代ç ååç§° |
| | | if (!String.IsNullOrEmpty(HCusTypeName) || !String.IsNullOrEmpty(HCusTypeNumber)) |
| | | { |
| | | tasks.Add(JudgeCusType(HCusTypeNumber, HCusTypeName)); |
| | | } |
| | | try |
| | | { |
| | | //çå¾
ä»»å¡å®æ |
| | | Task.WaitAll(tasks.ToArray()); |
| | | } |
| | | catch (AggregateException ae) |
| | | { |
| | | string msg = ae.Message; |
| | | ae.Handle(ex => { |
| | | if (ex is EmptyException) |
| | | msg = ex.Message; |
| | | Console.WriteLine(ex.Message); |
| | | return ex is EmptyException; |
| | | }); |
| | | throw new Exception("第" + i +1 +"æé®é¢: " +msg); |
| | | } |
| | | |
| | | |
| | | //è·åçå®è¡æ° |
| | | int line = i + 1; |
| | | } |
| | | return provisional; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 夿å°åºæ¯å¦æ£ç¡® |
| | | /// </summary> |
| | | private Task<int> JudgeRegion(string HNumber, string HName) |
| | | { |
| | | return Task<int>.Factory.StartNew(() => |
| | | { |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | DataSet ds = oCN.RunProcReturn("select * from Gy_AreaSet where HNumber = '" + HNumber + "' and HName = '" + HName + "'", "Gy_AreaSet"); |
| | | if (ds.Tables[0].Rows.Count == EmptyConstant.EMPTY) |
| | | { |
| | | throw new EmptyException("å½åå°åºä¸åå¨ï¼è¯·éæ°éæ©"); |
| | | } |
| | | return (int)ds.Tables[0].Rows[0][0]; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | throw new EmptyException(e.Message); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å¤æè´§å¸æ¯å¦æ£ç¡® |
| | | /// </summary> |
| | | private Task<int> JudgeCurrency(string HNumber, string HName) |
| | | { |
| | | { |
| | | return Task<int>.Factory.StartNew(() => |
| | | { |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | DataSet ds = oCN.RunProcReturn("select * from Gy_Currency where HNumber = '" + HNumber + "' and HName = '" + HName + "'", "Gy_Currency"); |
| | | if (ds.Tables[0].Rows.Count == EmptyConstant.EMPTY) |
| | | { |
| | | throw new EmptyException("å½åè´§å¸ä¸åå¨ï¼è¯·éæ°éæ©"); |
| | | } |
| | | return (int)ds.Tables[0].Rows[0][0]; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | throw new EmptyException(e.Message); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 夿客æ·åç±» |
| | | /// </summary> |
| | | private Task<int> JudgeCusType(string HNumber, string HName) |
| | | { |
| | | { |
| | | return Task<int>.Factory.StartNew(() => |
| | | { |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | DataSet ds = oCN.RunProcReturn("select * from Gy_CusType where HNumber = '" + HNumber + "' and HName = '" + HName + "'", "Gy_CusType"); |
| | | if (ds.Tables[0].Rows.Count == EmptyConstant.EMPTY) |
| | | { |
| | | throw new EmptyException("å½ååç±»ä¸åå¨ï¼è¯·éæ°éæ©"); |
| | | } |
| | | return (int)ds.Tables[0].Rows[0][0]; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | throw new EmptyException(e.Message); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | |
| | | } |
| | |
| | | E:\æºäºmes\mes\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.dll |
| | | E:\æºäºmes\mes\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.pdb |
| | | E:\æºäºmes\mes\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.AssemblyReference.cache |
| | | D:\æºäºè¿æ\MES\MES-WEB-API\sdk_dingding\TopSdk\bin\Debug\TopSdk.dll |
| | | D:\æºäºè¿æ\MES\MES-WEB-API\sdk_dingding\TopSdk\bin\Debug\TopSdk.pdb |
| | | D:\æºäºè¿æ\MES\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.AssemblyReference.cache |
| | | D:\æºäºè¿æ\MES\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.CoreCompileInputs.cache |
| | | D:\æºäºè¿æ\MES\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.dll |
| | | D:\æºäºè¿æ\MES\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.pdb |
| | | C:\Users\86130\Desktop\æºäºè¿æ\MES-WEB-API\sdk_dingding\TopSdk\bin\Debug\TopSdk.dll |
| | | C:\Users\86130\Desktop\æºäºè¿æ\MES-WEB-API\sdk_dingding\TopSdk\bin\Debug\TopSdk.pdb |
| | | C:\Users\86130\Desktop\æºäºè¿æ\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.CoreCompileInputs.cache |
| | | C:\Users\86130\Desktop\æºäºè¿æ\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.dll |
| | | C:\Users\86130\Desktop\æºäºè¿æ\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.pdb |
| | | C:\Users\86130\Desktop\æºäºè¿æ\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.AssemblyReference.cache |