| | |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | string msg4 = sArray[2].ToString(); |
| | | string msg5 = sArray[3].ToString(); |
| | | |
| | | List<Model.ClsSc_StationOutBillMain> list = new List<Model.ClsSc_StationOutBillMain>(); |
| | | |
| | |
| | | oBill.omodel.HBillNo = msg3 + "- " + j; |
| | | oBill.omodel.HBillStatus = 0; |
| | | oBill.omodel.HMouldNum = list[i].HMouldNum; |
| | | oBill.omodel.HYear = 2022; |
| | | oBill.omodel.HPeriod = 1; |
| | | oBill.omodel.HYear = DateTime.Now.Year; |
| | | oBill.omodel.HPeriod = DateTime.Now.Month; |
| | | oBill.omodel.HRemark = list[i].HRemark; |
| | | oBill.omodel.HSourceName = list[i].HSourceName; |
| | | oBill.omodel.HPieceQty = list[i].HPieceQty; |
| | |
| | | oBill.omodel.HWorkTimes = list[i].HWorkTimes; |
| | | oBill.omodel.HQCCheckID = list[i].HQCCheckID; |
| | | oBill.omodel.HMaker = msg4; |
| | | oBill.omodel.HEmpNum = msg5; |
| | | |
| | | //string HBillSubType = "3791"; |
| | | //long HInterID = list[0].HInterID;//递入type得到的单据ID |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 根据单据号 同步报错删除出站单 |
| | | [Route("Cj_StationOutBill/DelStationOutBill")] |
| | | [HttpGet] |
| | | public object DelStationOutBill(string HInterID) |
| | | { |
| | | try |
| | | { |
| | | DAL.ClsSc_StationOutBill oBill = new DAL.ClsSc_StationOutBill(); |
| | | |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | |
| | | DataTable DTable; |
| | | int num = 0; |
| | | //判断入库是否同步 |
| | | DTable = oCN.RunProcReturn("select * from Sc_StationOutBillMain where HInterID='" + HInterID + "' and HRelationQty=0", "Sc_StationOutBillMain").Tables[0]; |
| | | if (DTable.Rows.Count != 0) |
| | | { |
| | | num++; |
| | | } |
| | | //判断本次报废是否同步 |
| | | DTable = oCN.RunProcReturn("select * from Sc_StationOutBillMain where HProcExchInterID='" + DTable.Rows[0]["HProcExchInterID"].ToString() + "' and HBFFlag=0 ", "Sc_StationOutBillMain").Tables[0]; |
| | | if (DTable.Rows.Count != 0) |
| | | { |
| | | num++; |
| | | } |
| | | |
| | | if (num == 2) |
| | | { |
| | | if (!oBill.DeleteBill(long.Parse(HInterID), 0, 0, ref DBUtility.ClsPub.sExeReturnInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "删除成功!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | 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("Cj_StationOutBill/set_ShowBillJudge")] |
| | | [HttpGet] |