| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | ///解绑sn码 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost("UnbindAsnInfo")] |
| | | public ResponseResult UnbindAsnInfo(UnbindAsnInfoDto unbindAsnInfoDto) |
| | | { |
| | | var entity = new MessageCenter(); |
| | | entity.TableName = TableName; |
| | | entity.Url = URL + "SetStackCode"; |
| | | entity.Method = METHOD; |
| | | entity.Data = Newtonsoft.Json.JsonConvert.SerializeObject(unbindAsnInfoDto); |
| | | entity.Status = 1; |
| | | entity.CreateBy = "PL017"; |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | bool result = m.ProcessSn(unbindAsnInfoDto); |
| | | resultInfos.tbBillList = result; |
| | | |
| | | entity.Result = 0; |
| | | if (result) entity.Result = 1; |
| | | entity.DealWith = 1; |
| | | _manager.save(entity); |
| | | |
| | | if (result) |
| | | { |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | else |
| | | { |
| | | return new ResponseResult |
| | | { |
| | | status = 1, |
| | | message = result.ToString(), |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | entity.Result = 0; |
| | | entity.DealWith = 0; |
| | | entity.ResultData = ex.Message; |
| | | _manager.save(entity); |
| | | |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | } |
| | | } |