InnerDoubleJISCO.cs 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using com.hnshituo.core.webapp.vo;
  7. using Common;
  8. using Common.DbOption.work;
  9. namespace MeterSceneLibrary
  10. {
  11. public class InnerDoubleJISCO
  12. {
  13. // 一次计量数据
  14. private MeterWorkCarActualFirstService mwcfs = new MeterWorkCarActualFirstService();
  15. // 重量类型预处理表
  16. private MeterWorkPreWgttypeService wgttypeService = new MeterWorkPreWgttypeService();
  17. // 车辆委托表
  18. private PreTrackScaleService preTrackScaleService = new PreTrackScaleService();
  19. // 留期限皮操作
  20. private MeterBaseTermTareDataService termTareDate = new MeterBaseTermTareDataService();
  21. private MeterBaseSpotInfoService meterBaseSpotInfoService = new MeterBaseSpotInfoService();
  22. private rtInfo rt = new rtInfo();
  23. // 构建一次计量数据
  24. private MeterWorkCarActualFirst mwaf = new MeterWorkCarActualFirst();
  25. private MeterBaseCarService carService = new MeterBaseCarService();
  26. private MeterBaseSpecialUnitService meterBaseSpecialUnitService = new MeterBaseSpecialUnitService();
  27. // 结净最小值,默认取配置文件
  28. private double diffrentWgt = AppConfigCache.differenceWgt;
  29. // 根据称点查询监控信息
  30. private RESTfulResult<List<MeterWorkMonitor>> listMonitor;
  31. // 根据车号查询委托表中未使用和使用中的委托
  32. private List<PreTrackScale> listPreScale;
  33. private JISCO.SaveMethod saveMethod = new JISCO.SaveMethod();
  34. private ComBaseInfoService comBaseInfoService = new ComBaseInfoService();
  35. private MeterBaseTermTareDataService meterBaseTermTareDataService = new MeterBaseTermTareDataService();
  36. public rtInfo MeterMethod(PreTrackScale scale)
  37. {
  38. Log lg = Log.GetInstance();
  39. rt.isError = false;
  40. string ResultMessage = "";
  41. bool isError = false;
  42. //根据称点查询监控信息
  43. MeterWorkMonitorService meterWorkMonitorService = new MeterWorkMonitorService();
  44. listMonitor = meterWorkMonitorService.doQueryOneWf(new MeterWorkMonitor { pointNo = PbCache.sportInfo.baseSpotNo });
  45. mwaf.carNo = PbCache.lockCarNo;
  46. mwaf.weightType = ""; // 默认重量类型为空
  47. mwaf.actualFirstNo = DateTime.Now.ToString("yyyyMMdd");//10
  48. mwaf.meterWeight = PbCache.lockWgt;//计量重量
  49. mwaf.addWeight = PbCache.addWgt;//附加重量
  50. mwaf.createManNo = "admin";
  51. mwaf.createManName = "admin";
  52. mwaf.meterGroup = "";
  53. mwaf.meterClass = "";
  54. mwaf.createManNo = "SYSTEM";
  55. mwaf.createManName = "system";
  56. mwaf.createTime = DateTime.Now;
  57. mwaf.baseSpotNo = PbCache.sportInfo.baseSpotNo;//计量点编号
  58. mwaf.baseSpotName = PbCache.sportInfo.baseSpotName;
  59. //mwaf.memo = "";
  60. mwaf.valueFlag = "1"; //状态(0 = 作废,1 = 有效(已匹配),2 = 结净)
  61. mwaf.updateManName = "";
  62. mwaf.updateManNo = "";
  63. mwaf.updateTime = null;
  64. mwaf.checkFlag = "1"; //0未审核,1已审核
  65. mwaf.meterMode = "2"; //1:远程计量;2:智能计量;3:手工录入;4:放行智能计量;5:滞后匹配
  66. mwaf.addWeight = PbCache.addWgt;
  67. mwaf.dataSource = "1"; //数据来源(1=智能终端,2=本地计量,3=应急计量,4=手动录入(计量票据录入))
  68. PbCache.isActual = false;
  69. PbCache.isInnerCar = false;
  70. PbCache.ResultMessage = "";
  71. PbCache.monitorResultMessage = "";
  72. PbCache.LEDResultMessage = "";
  73. PbCache.yardActual = null;
  74. PbCache.yardFirst = null;
  75. // 根据车号查询重量类型预处理表
  76. RESTfulResult<List<MeterWorkPreWgttype>> rmX = wgttypeService.doQueryWf(new MeterWorkPreWgttype { carNo = PbCache.lockCarNo, valueFlag = "1" });
  77. if (rmX.Succeed)
  78. {
  79. List<MeterWorkPreWgttype> list = rmX.Data;
  80. // 不存在一次预处理数据
  81. if (list == null || list.Count == 0)
  82. {
  83. /* a. 程序报警
  84. * b. 自动进行语音求助
  85. */
  86. rt = saveMethod.doError("未选择称重类型,请选择后开始计量");
  87. PbCache.voiceType = 21;
  88. PbCache.monitorResultMessage = "未选择称重类型,请选择后开始计量";
  89. PbCache.LEDResultMessage = "未选择称重类型,请选择后开始计量";
  90. PbCache.ResultMessage = "未选择称重类型,请选择后开始计量";
  91. return rt;
  92. }
  93. else if (list == null || list.Count == 1)
  94. {
  95. // 历史皮重验证
  96. // 001033002:皮重
  97. rt = saveMethod.validHisTare2(list[0].weightTypeNo);
  98. if (list[0].weightTypeNo == "001033002" && PbCache.monitorResult.valid_wgt == false && listMonitor.Data[0].validWgt == "1")
  99. {
  100. PbCache.ResultMessage = "毛皮类型选错,请重新选择";
  101. PbCache.LEDResultMessage = "计量失败,毛皮类型选错,请重新选择";
  102. PbCache.voiceType = 26;
  103. rt = saveMethod.doError(PbCache.ResultMessage);
  104. rt.isWarn = true;
  105. rt.WarnContent = "validWgt";
  106. return rt;
  107. }
  108. // 001033001:毛重
  109. if (list[0].weightTypeNo == "001033001" && PbCache.monitorResult.valid_wgt == true && listMonitor.Data[0].validWgt == "1")
  110. {
  111. PbCache.ResultMessage = "毛皮类型选错,请重新选择";
  112. PbCache.LEDResultMessage = "计量失败,毛皮类型选错,请重新选择";
  113. PbCache.voiceType = 23;
  114. rt = saveMethod.doError(PbCache.ResultMessage);
  115. rt.isWarn = true;
  116. rt.WarnContent = "validWgt";
  117. return rt;
  118. }
  119. // 查已选择的委托
  120. RESTfulResult<List<PreTrackScale>> rmScale = preTrackScaleService.doQueryByFlag(new PreTrackScale { carNo = PbCache.lockCarNo, lineDesc = "1" });
  121. // 查询一次计量数据表
  122. RESTfulResult<List<MeterWorkCarActualFirst>> rmFirst = mwcfs.doQueryByFlag(new MeterWorkCarActualFirst { carNo = PbCache.lockCarNo });
  123. //查询车辆是否存在配置
  124. RESTfulResult<List<ComBaseInfo>> comBaseInfos = comBaseInfoService.doQueryBaseList(new ComBaseInfo { pBaseCode = "001048", validFlag = "1",baseName = PbCache.lockCarNo });
  125. //查询车辆是否存在期限皮重信息
  126. RESTfulResult<MeterBaseTermTareData> termTareData = meterBaseTermTareDataService.doQueryPageWf(new MeterBaseTermTareData { carNo = PbCache.lockCarNo, valueFlag = "0", spotAreaNo = PbCache.sportInfo.spotAreaNo });
  127. List<MeterWorkCarActualFirst> firstList = rmFirst.Data;
  128. //判断已选择的委托是否为1条
  129. if (rmScale.Succeed && rmScale.Data.Count == 1 && list[0].weightTypeNo == "001033001")
  130. {
  131. mwaf.weightType = "0";
  132. if (rmFirst.Succeed)
  133. {
  134. //不存在一次计量数据
  135. if (firstList == null || firstList.Count == 0)
  136. {
  137. if (comBaseInfos.Succeed)
  138. {
  139. //判断车辆是否满足期限皮
  140. if (comBaseInfos.Data != null && comBaseInfos.Data.Count == 1)
  141. {
  142. if (termTareData.Succeed)
  143. {
  144. //判断车辆是否存在期限皮重
  145. if (termTareData.Data == null)
  146. {
  147. // 只保存一次计量数据
  148. rt = saveMethod.doAddDoubleFirst(rmScale.Data[0], scale, mwaf);
  149. PbCache.voiceType = 15;
  150. rt.resultInfo = "计量成功,期限皮过期,请留存期限皮";
  151. PbCache.ResultMessage = "计量成功,期限皮过期,请留存期限皮";
  152. PbCache.monitorResultMessage = "计量成功,期限皮过期,请留存期限皮";
  153. PbCache.LEDResultMessage = string.Format("车号{0},毛重{1}吨,计量完成,期限皮过期", PbCache.lockCarNo, Math.Round((PbCache.lockWgt / 1000), 2));
  154. }
  155. else
  156. {
  157. // 存在期限皮重,并使用期限皮重结净
  158. EntityBase<PreTrackScale> entityBase1 = new EntityBase<PreTrackScale>();
  159. mwaf = entityBase1.format<MeterWorkCarActualFirst>(rmScale.Data[0], mwaf);
  160. rt = saveMethod.doTermTareNetDouble(rmScale.Data[0], scale, mwaf, "0");
  161. rt.resultInfo += ",期限皮结净";
  162. PbCache.voiceType = 16;
  163. PbCache.ResultMessage = "计量完成,期限皮结净";
  164. PbCache.LEDResultMessage = string.Format("车号{0},毛重{1}吨,净重{2}吨,期限皮结净", PbCache.lockCarNo, Math.Round((PbCache.lockWgt / 1000), 2), Math.Round((Math.Abs(PbCache.lockWgt - termTareData.Data.meterWeight.Value) / 1000), 2));
  165. }
  166. }
  167. }
  168. else
  169. {
  170. // 只保存一次计量数据
  171. rt = saveMethod.doAddDoubleFirst(rmScale.Data[0], scale, mwaf);
  172. PbCache.voiceType = 1;
  173. PbCache.LEDResultMessage = string.Format("车号{0},毛重{1}吨,计量完成", PbCache.lockCarNo, Math.Round((PbCache.lockWgt / 1000), 2));
  174. }
  175. }
  176. }
  177. //存在一条一次计量数据
  178. else if (firstList.Count == 1)
  179. {
  180. //存在的一次数据为毛重
  181. if (firstList[0].weightType == "0")
  182. {
  183. if (comBaseInfos.Succeed)
  184. {
  185. //判断车辆是否满足期限皮
  186. if (comBaseInfos.Data != null && comBaseInfos.Data.Count == 1)
  187. {
  188. if (termTareData.Succeed)
  189. {
  190. //判断车辆是否存在期限皮重
  191. if (termTareData.Data == null)
  192. {
  193. // 只保存一次计量数据
  194. rt = saveMethod.doAddDoubleFirst(rmScale.Data[0], scale, mwaf);
  195. PbCache.voiceType = 17;
  196. rt.resultInfo = "计量成功,期限皮过期,存在未结净毛重";
  197. PbCache.ResultMessage = "计量成功,期限皮过期,存在未结净毛重";
  198. PbCache.monitorResultMessage = "计量成功,期限皮过期,存在未结净毛重";
  199. PbCache.LEDResultMessage = string.Format("车号{0},毛重{1}吨,计量完成,期限皮过期", PbCache.lockCarNo, Math.Round((PbCache.lockWgt / 1000), 2));
  200. }
  201. else
  202. {
  203. // 存在期限皮重,并使用期限皮重结净
  204. EntityBase<PreTrackScale> entityBase1 = new EntityBase<PreTrackScale>();
  205. mwaf = entityBase1.format<MeterWorkCarActualFirst>(rmScale.Data[0], mwaf);
  206. rt = saveMethod.doTermTareNetDouble(rmScale.Data[0], scale, mwaf, "0");
  207. rt.resultInfo += ",期限皮结净";
  208. PbCache.voiceType = 16;
  209. PbCache.ResultMessage = "计量完成,期限皮结净";
  210. PbCache.LEDResultMessage = string.Format("车号{0},毛重{1}吨,净重{2}吨,期限皮结净", PbCache.lockCarNo, Math.Round((PbCache.lockWgt / 1000), 2), Math.Round((Math.Abs(PbCache.lockWgt - termTareData.Data.meterWeight.Value) / 1000), 2));
  211. }
  212. }
  213. }
  214. else
  215. {
  216. // 只保存一次计量数据
  217. rt = saveMethod.doAddDoubleFirst(rmScale.Data[0], scale, mwaf);
  218. rt.resultInfo += ",存在未结净毛重";
  219. PbCache.voiceType = 17;
  220. PbCache.ResultMessage = "存在未结净毛重";
  221. PbCache.LEDResultMessage = string.Format("车号{0},毛重{1}吨,存在未结净毛重,请联系", PbCache.lockCarNo, Math.Round((PbCache.lockWgt / 1000), 2));
  222. PbCache.monitorResultMessage = "存在未结净毛重";
  223. rt.isWarn = true;
  224. rt.WarnContent = "validWgt";
  225. }
  226. }
  227. }
  228. //存在的一次数据为皮重
  229. else
  230. {
  231. if (comBaseInfos.Succeed)
  232. {
  233. //判断车辆是否满足期限皮
  234. if (comBaseInfos.Data != null && comBaseInfos.Data.Count == 1)
  235. {
  236. if (termTareData.Succeed)
  237. {
  238. // 存在期限皮重,并使用期限皮重结净
  239. EntityBase<PreTrackScale> entityBase1 = new EntityBase<PreTrackScale>();
  240. mwaf = entityBase1.format<MeterWorkCarActualFirst>(rmScale.Data[0], mwaf);
  241. rt = saveMethod.doTermTareNetDoubleRetain(rmScale.Data[0], scale, firstList[0], mwaf, "0");
  242. rt.resultInfo += ",留存期限皮成功";
  243. PbCache.voiceType = 16;
  244. PbCache.ResultMessage = "计量完成,留存期限皮成功";
  245. PbCache.LEDResultMessage = string.Format("车号{0},毛重{1}吨,净重{2}吨,留存期限皮成功", PbCache.lockCarNo, Math.Round((PbCache.lockWgt / 1000), 2), Math.Round((Math.Abs(PbCache.lockWgt - firstList[0].meterWeight.Value) / 1000), 2));
  246. }
  247. }
  248. else
  249. {
  250. // 只保存一次计量数据
  251. rt = saveMethod.doAddDoubleNet(rmScale.Data[0], scale, firstList[0], mwaf,"0");
  252. PbCache.voiceType = 1;
  253. PbCache.LEDResultMessage = string.Format("车号{0},毛重{1}吨,净重{2}吨,双委托结净", PbCache.lockCarNo, Math.Round((PbCache.lockWgt / 1000), 2),Math.Round((Math.Abs(PbCache.lockWgt - firstList[0].meterWeight.Value) / 1000), 2));
  254. }
  255. }
  256. }
  257. }
  258. //存在多条一次计量数据
  259. else
  260. {
  261. if (comBaseInfos.Succeed)
  262. {
  263. //判断车辆是否满足期限皮
  264. if (comBaseInfos.Data != null && comBaseInfos.Data.Count == 1)
  265. {
  266. if (termTareData.Succeed)
  267. {
  268. //判断车辆是否存在期限皮重
  269. if (termTareData.Data == null)
  270. {
  271. // 只保存一次计量数据
  272. rt = saveMethod.doAddDoubleFirst(rmScale.Data[0], scale, mwaf);
  273. PbCache.voiceType = 15;
  274. rt.resultInfo = "计量成功,期限皮过期,存在多条未结净数据";
  275. PbCache.ResultMessage = "计量成功,期限皮过期,存在多条未结净数据";
  276. PbCache.monitorResultMessage = "计量成功,期限皮过期,存在多条未结净数据";
  277. PbCache.LEDResultMessage = string.Format("车号{0},毛重{1}吨,计量完成,期限皮过期", PbCache.lockCarNo, Math.Round((PbCache.lockWgt / 1000), 2));
  278. }
  279. else
  280. {
  281. // 存在期限皮重,并使用期限皮重结净
  282. EntityBase<PreTrackScale> entityBase1 = new EntityBase<PreTrackScale>();
  283. mwaf = entityBase1.format<MeterWorkCarActualFirst>(rmScale.Data[0], mwaf);
  284. rt = saveMethod.doTermTareNetDouble(rmScale.Data[0], scale, mwaf, "0");
  285. rt.resultInfo += ",期限皮结净";
  286. PbCache.voiceType = 16;
  287. PbCache.ResultMessage = "计量完成,期限皮结净";
  288. PbCache.LEDResultMessage = string.Format("车号{0},毛重{1}吨,净重{2}吨,期限皮结净", PbCache.lockCarNo, Math.Round((PbCache.lockWgt / 1000), 2), Math.Round((Math.Abs(PbCache.lockWgt - termTareData.Data.meterWeight.Value) / 1000), 2));
  289. }
  290. }
  291. }
  292. else
  293. {
  294. // 只保存一次计量数据
  295. rt = saveMethod.doAddDoubleFirst(rmScale.Data[0], scale, mwaf);
  296. rt.resultInfo += ",存在多条未结净数据";
  297. PbCache.voiceType = 11;
  298. PbCache.ResultMessage = "存在多条未结净数据";
  299. PbCache.LEDResultMessage = string.Format("车号{0},毛重{1}吨,存在多条未结净数据,请联系", PbCache.lockCarNo, Math.Round((PbCache.lockWgt / 1000), 2));
  300. PbCache.monitorResultMessage = "存在未结净毛重";
  301. rt.isWarn = true;
  302. rt.WarnContent = "validWgt";
  303. }
  304. }
  305. }
  306. }
  307. }
  308. //判断已选择的委托是否为0条
  309. else if (rmScale.Succeed && rmScale.Data.Count == 0)
  310. {
  311. mwaf.weightType = "1";
  312. //不存在一次计量数据
  313. if (firstList == null || firstList.Count == 0)
  314. {
  315. // 只保存一次计量数据
  316. rt = saveMethod.doAddFirst(null, mwaf);
  317. PbCache.voiceType = 1;
  318. PbCache.LEDResultMessage = string.Format("车号{0},皮重{1}吨,计量完成", PbCache.lockCarNo, Math.Round((PbCache.lockWgt / 1000), 2));
  319. }
  320. //存在一条一次计量数据
  321. else if (firstList.Count == 1)
  322. {
  323. //存在的一次数据为毛重
  324. if (firstList[0].weightType == "0")
  325. {
  326. if (comBaseInfos.Succeed)
  327. {
  328. //判断车辆是否满足期限皮
  329. if (comBaseInfos.Data != null && comBaseInfos.Data.Count == 1)
  330. {
  331. RESTfulResult<List<PreTrackScale>> scales = preTrackScaleService.doQueryWf(new PreTrackScale { predictionNo = firstList[0].predictionNo });
  332. // 存在期限皮重,并使用期限皮重结净
  333. EntityBase<PreTrackScale> entityBase1 = new EntityBase<PreTrackScale>();
  334. mwaf = entityBase1.format<MeterWorkCarActualFirst>(scales.Data[0], mwaf);
  335. rt = saveMethod.doTermTareNetDoubleRetain(scales.Data[0], scale, mwaf, firstList[0], "1");
  336. rt.resultInfo += ",留存期限皮成功";
  337. PbCache.voiceType = 16;
  338. PbCache.ResultMessage = "计量完成,留存期限皮成功";
  339. PbCache.LEDResultMessage = string.Format("车号{0},皮重{1}吨,净重{2}吨,留存期限皮成功", PbCache.lockCarNo, Math.Round((PbCache.lockWgt / 1000), 2), Math.Round((Math.Abs(PbCache.lockWgt - termTareData.Data.meterWeight.Value) / 1000), 2));
  340. }
  341. else
  342. {
  343. // 只保存一次计量数据
  344. rt = saveMethod.doAddDoubleNet(rmScale.Data[0], scale, mwaf, firstList[0], "1");
  345. PbCache.voiceType = 1;
  346. PbCache.LEDResultMessage = string.Format("车号{0},皮重{1}吨,净重{2}吨,双委托结净", PbCache.lockCarNo, Math.Round((PbCache.lockWgt / 1000), 2), Math.Round((Math.Abs(firstList[0].meterWeight.Value - PbCache.lockWgt) / 1000), 2));
  347. }
  348. }
  349. }
  350. //存在的一次数据为皮重
  351. else
  352. {
  353. //保存一条作废的皮重数据
  354. mwaf.weightType = "1";
  355. mwaf.valueFlag = "0";
  356. PbCache.voiceType = 1;
  357. rt = saveMethod.doAddFirst(null, mwaf);
  358. PbCache.LEDResultMessage = string.Format("车号{0},皮重{1}吨,计量完成", PbCache.lockCarNo, Math.Round((PbCache.lockWgt / 1000), 2));
  359. }
  360. }
  361. //存在多条一次计量数据
  362. else
  363. {
  364. List<MeterWorkCarActualFirst> mwcafListDouble = new List<MeterWorkCarActualFirst>();
  365. foreach (var item in firstList)
  366. {
  367. if (!string.IsNullOrEmpty(item.predictionCombination))
  368. {
  369. mwcafListDouble.Add(item);
  370. }
  371. }
  372. List<MeterWorkCarActualFirst> mwcafList = new List<MeterWorkCarActualFirst>();
  373. MeterWorkCarActualFirst meterWorkCarActualFirst = mwcafListDouble[0];
  374. mwcafList.Add(meterWorkCarActualFirst);
  375. foreach (var item in mwcafListDouble)
  376. {
  377. if (!string.IsNullOrEmpty(item.predictionCombination))
  378. {
  379. if (meterWorkCarActualFirst.predictionCombination == item.predictionCombination && meterWorkCarActualFirst.actualFirstNo != item.actualFirstNo)
  380. {
  381. mwcafList.Add(item);
  382. break;
  383. };
  384. }
  385. }
  386. if (comBaseInfos.Succeed)
  387. {
  388. //判断车辆是否满足期限皮
  389. if (comBaseInfos.Data != null && comBaseInfos.Data.Count == 1)
  390. {
  391. // 存在期限皮重,并使用期限皮重结净
  392. rt = saveMethod.doNetAddMuchGrossDouble(mwcafListDouble, mwaf);
  393. rt.resultInfo += ",留存期限皮成功";
  394. PbCache.voiceType = 16;
  395. PbCache.ResultMessage = "计量完成,留存期限皮成功";
  396. PbCache.LEDResultMessage = string.Format("车号{0},皮重{1}吨,留存期限皮成功", PbCache.lockCarNo, Math.Round((PbCache.lockWgt / 1000), 2));
  397. }
  398. else
  399. {
  400. // 双委托不使用期限皮结净
  401. rt = saveMethod.doAddDoubleMuchNet(mwcafList, mwaf);
  402. PbCache.voiceType = 1;
  403. PbCache.LEDResultMessage = string.Format("车号{0},皮重{1}吨,计量完成", PbCache.lockCarNo, Math.Round((PbCache.lockWgt / 1000), 2));
  404. }
  405. }
  406. }
  407. }
  408. //判断已选择的委托是否为多条
  409. else
  410. {
  411. rt = saveMethod.doError("存在多条已选择的委托,请联系计量大厅");
  412. PbCache.LEDResultMessage = "存在多条已选择的委托,请联系计量大厅";
  413. rt.isWarn = true;
  414. PbCache.voiceType = 19;
  415. rt.WarnContent = "validIsPre";
  416. return rt;
  417. }
  418. }
  419. else
  420. {
  421. rt = saveMethod.doError("存在多条上称申请数据,请联系计量大厅");
  422. PbCache.voiceType = 20;
  423. PbCache.LEDResultMessage = "存在多条上称申请数据,请联系计量大厅";
  424. return rt;
  425. }
  426. }
  427. // 后台失败处理
  428. if (!rt.result)
  429. {
  430. rt.resultInfo = "称重数据保存失败";
  431. PbCache.voiceType = 25;
  432. PbCache.LEDResultMessage = "计量失败,请联系计量大厅";
  433. PbCache.monitorResultMessage = "";
  434. }
  435. return rt;
  436. }
  437. }
  438. }