| | |
| | | /// </summary> |
| | | public static ApiResult SetStationOutBill(StationOutBillView omodel) |
| | | { |
| | | if (!dicLock.TryAdd(omodel.HBillNo, omodel.HBillNo))//同一单号并发处理 |
| | | if (!dicLock.TryAdd(omodel.HICMOBillNo + "cz", omodel.HBillNo))//同一单号并发处理 |
| | | return new ApiResult { code = -1, msg = "服务器繁忙" }; |
| | | try |
| | | { |
| | | var stationInBillModel = YqnDal.GetStationInBillMail(omodel.HProcID, omodel.HICMOBillNo); |
| | | if (stationInBillModel == null) |
| | | return new ApiResult { code = -1, msg = "该工序进站单不存在" }; |
| | |
| | | var result = SetOutBill(omodel); |
| | | return result; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return new ApiResult { code = -1, msg = ex.ToString() }; |
| | | } |
| | | finally |
| | | { |
| | | dicLock.TryRemove(omodel.HICMOBillNo + "cz", out string key); |
| | | } |
| | | |
| | | } |
| | | #region sql语句 |
| | | public static DataSet GetStationOutBill(string strWhere) |
| | | { |