| | |
| | | return null; |
| | | } |
| | | |
| | | public bool GetS2Result(string plcnum) |
| | | { |
| | | try |
| | | { |
| | | string mysqlstr = $"select data from forall where plcnum='{plcnum}' && device='S2' order by id desc limit 1"; |
| | | string str = selectmysql(mysqlstr, connStrAll); |
| | | if (string.IsNullOrEmpty(str)) |
| | | { |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | ProductModel p = null; |
| | | p = JsonConvert.DeserializeObject<ProductModel>(str, new JsonSerializerSettings() { TypeNameHandling = TypeNameHandling.All }); |
| | | |
| | | return p.Result=="OK"; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | CommonLogger.LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"数据库forlocal获取对象异常 {e.ToString()}"); |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | |
| | | public string Getbasketcode(string plcnum, out string sn) |
| | | { |
| | | sn = "Noread"; |