InnerDoubleJISCO.cs 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481
  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. //==============eason add 2023-03-27 暂未启用===============================
  181. /*
  182. if (!string.IsNullOrEmpty(firstList[0].predictionNo) && !string.IsNullOrEmpty(rmScale.Data[0].predictionNo) && firstList[0].predictionNo != rmScale.Data[0].predictionNo)
  183. {
  184. rt = saveMethod.doError("计量失败,委托选择异常,请联系计量大厅");
  185. PbCache.voiceType = 19;
  186. PbCache.LEDResultMessage = "计量失败,委托选择异常,请联系计量大厅";
  187. return rt;
  188. }
  189. //*/
  190. //=============================end===================================
  191. //存在的一次数据为毛重
  192. if (firstList[0].weightType == "0")
  193. {
  194. if (comBaseInfos.Succeed)
  195. {
  196. //判断车辆是否满足期限皮
  197. if (comBaseInfos.Data != null && comBaseInfos.Data.Count == 1)
  198. {
  199. if (termTareData.Succeed)
  200. {
  201. //判断车辆是否存在期限皮重
  202. if (termTareData.Data == null)
  203. {
  204. // 只保存一次计量数据
  205. rt = saveMethod.doAddDoubleFirst(rmScale.Data[0], scale, mwaf);
  206. PbCache.voiceType = 17;
  207. rt.resultInfo = "计量成功,期限皮过期,存在未结净毛重";
  208. PbCache.ResultMessage = "计量成功,期限皮过期,存在未结净毛重";
  209. PbCache.monitorResultMessage = "计量成功,期限皮过期,存在未结净毛重";
  210. PbCache.LEDResultMessage = string.Format("车号{0},毛重{1}吨,计量完成,期限皮过期", PbCache.lockCarNo, Math.Round((PbCache.lockWgt / 1000), 2));
  211. }
  212. else
  213. {
  214. // 存在期限皮重,并使用期限皮重结净
  215. EntityBase<PreTrackScale> entityBase1 = new EntityBase<PreTrackScale>();
  216. mwaf = entityBase1.format<MeterWorkCarActualFirst>(rmScale.Data[0], mwaf);
  217. rt = saveMethod.doTermTareNetDouble(rmScale.Data[0], scale, mwaf, "0");
  218. rt.resultInfo += ",期限皮结净";
  219. PbCache.voiceType = 16;
  220. PbCache.ResultMessage = "计量完成,期限皮结净";
  221. 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));
  222. }
  223. }
  224. }
  225. else
  226. {
  227. // 只保存一次计量数据
  228. rt = saveMethod.doAddDoubleFirst(rmScale.Data[0], scale, mwaf);
  229. rt.resultInfo += ",存在未结净毛重";
  230. PbCache.voiceType = 17;
  231. PbCache.ResultMessage = "存在未结净毛重";
  232. PbCache.LEDResultMessage = string.Format("车号{0},毛重{1}吨,存在未结净毛重,请联系", PbCache.lockCarNo, Math.Round((PbCache.lockWgt / 1000), 2));
  233. PbCache.monitorResultMessage = "存在未结净毛重";
  234. rt.isWarn = true;
  235. rt.WarnContent = "validWgt";
  236. }
  237. }
  238. }
  239. //存在的一次数据为皮重
  240. else
  241. {
  242. if (comBaseInfos.Succeed)
  243. {
  244. //判断车辆是否满足期限皮
  245. if (comBaseInfos.Data != null && comBaseInfos.Data.Count == 1)
  246. {
  247. if (termTareData.Succeed)
  248. {
  249. // 存在期限皮重,并使用期限皮重结净
  250. EntityBase<PreTrackScale> entityBase1 = new EntityBase<PreTrackScale>();
  251. mwaf = entityBase1.format<MeterWorkCarActualFirst>(rmScale.Data[0], mwaf);
  252. rt = saveMethod.doTermTareNetDoubleRetain(rmScale.Data[0], scale, firstList[0], mwaf, "0");
  253. rt.resultInfo += ",留存期限皮成功";
  254. PbCache.voiceType = 16;
  255. PbCache.ResultMessage = "计量完成,留存期限皮成功";
  256. 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));
  257. }
  258. }
  259. else
  260. {
  261. // 只保存一次计量数据
  262. rt = saveMethod.doAddDoubleNet(rmScale.Data[0], scale, firstList[0], mwaf,"0");
  263. PbCache.voiceType = 1;
  264. 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));
  265. }
  266. }
  267. }
  268. }
  269. //存在多条一次计量数据
  270. else
  271. {
  272. if (comBaseInfos.Succeed)
  273. {
  274. //判断车辆是否满足期限皮
  275. if (comBaseInfos.Data != null && comBaseInfos.Data.Count == 1)
  276. {
  277. if (termTareData.Succeed)
  278. {
  279. //判断车辆是否存在期限皮重
  280. if (termTareData.Data == null)
  281. {
  282. // 只保存一次计量数据
  283. rt = saveMethod.doAddDoubleFirst(rmScale.Data[0], scale, mwaf);
  284. PbCache.voiceType = 15;
  285. rt.resultInfo = "计量成功,期限皮过期,存在多条未结净数据";
  286. PbCache.ResultMessage = "计量成功,期限皮过期,存在多条未结净数据";
  287. PbCache.monitorResultMessage = "计量成功,期限皮过期,存在多条未结净数据";
  288. PbCache.LEDResultMessage = string.Format("车号{0},毛重{1}吨,计量完成,期限皮过期", PbCache.lockCarNo, Math.Round((PbCache.lockWgt / 1000), 2));
  289. }
  290. else
  291. {
  292. // 存在期限皮重,并使用期限皮重结净
  293. EntityBase<PreTrackScale> entityBase1 = new EntityBase<PreTrackScale>();
  294. mwaf = entityBase1.format<MeterWorkCarActualFirst>(rmScale.Data[0], mwaf);
  295. rt = saveMethod.doTermTareNetDouble(rmScale.Data[0], scale, mwaf, "0");
  296. rt.resultInfo += ",期限皮结净";
  297. PbCache.voiceType = 16;
  298. PbCache.ResultMessage = "计量完成,期限皮结净";
  299. 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));
  300. }
  301. }
  302. }
  303. else
  304. {
  305. // 只保存一次计量数据
  306. rt = saveMethod.doAddDoubleFirst(rmScale.Data[0], scale, mwaf);
  307. rt.resultInfo += ",存在多条未结净数据";
  308. PbCache.voiceType = 11;
  309. PbCache.ResultMessage = "存在多条未结净数据";
  310. PbCache.LEDResultMessage = string.Format("车号{0},毛重{1}吨,存在多条未结净数据,请联系", PbCache.lockCarNo, Math.Round((PbCache.lockWgt / 1000), 2));
  311. PbCache.monitorResultMessage = "存在未结净毛重";
  312. rt.isWarn = true;
  313. rt.WarnContent = "validWgt";
  314. }
  315. }
  316. }
  317. }
  318. }
  319. //判断已选择的委托是否为0条
  320. else if (rmScale.Succeed && rmScale.Data.Count == 0)
  321. {
  322. mwaf.weightType = "1";
  323. //不存在一次计量数据
  324. if (firstList == null || firstList.Count == 0)
  325. {
  326. // 只保存一次计量数据
  327. rt = saveMethod.doAddFirst(null, mwaf);
  328. PbCache.voiceType = 1;
  329. PbCache.LEDResultMessage = string.Format("车号{0},皮重{1}吨,计量完成", PbCache.lockCarNo, Math.Round((PbCache.lockWgt / 1000), 2));
  330. }
  331. //存在一条一次计量数据
  332. else if (firstList.Count == 1)
  333. {
  334. //存在的一次数据为毛重
  335. if (firstList[0].weightType == "0")
  336. {
  337. if (comBaseInfos.Succeed)
  338. {
  339. //判断车辆是否满足期限皮
  340. if (comBaseInfos.Data != null && comBaseInfos.Data.Count == 1)
  341. {
  342. RESTfulResult<List<PreTrackScale>> scales = preTrackScaleService.doQueryWf(new PreTrackScale { predictionNo = firstList[0].predictionNo });
  343. // 存在期限皮重,并使用期限皮重结净
  344. EntityBase<PreTrackScale> entityBase1 = new EntityBase<PreTrackScale>();
  345. mwaf = entityBase1.format<MeterWorkCarActualFirst>(scales.Data[0], mwaf);
  346. rt = saveMethod.doTermTareNetDoubleRetain(scales.Data[0], scale, mwaf, firstList[0], "1");
  347. rt.resultInfo += ",留存期限皮成功";
  348. PbCache.voiceType = 16;
  349. PbCache.ResultMessage = "计量完成,留存期限皮成功";
  350. 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));
  351. }
  352. else
  353. {
  354. // 只保存一次计量数据
  355. rt = saveMethod.doAddDoubleNet(rmScale.Data[0], scale, mwaf, firstList[0], "1");
  356. PbCache.voiceType = 1;
  357. 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));
  358. }
  359. }
  360. }
  361. //存在的一次数据为皮重
  362. else
  363. {
  364. //保存一条作废的皮重数据
  365. mwaf.weightType = "1";
  366. mwaf.valueFlag = "0";
  367. PbCache.voiceType = 1;
  368. rt = saveMethod.doAddFirst(null, mwaf);
  369. PbCache.LEDResultMessage = string.Format("车号{0},皮重{1}吨,计量完成", PbCache.lockCarNo, Math.Round((PbCache.lockWgt / 1000), 2));
  370. }
  371. }
  372. //存在多条一次计量数据
  373. else
  374. {
  375. List<MeterWorkCarActualFirst> mwcafListDouble = new List<MeterWorkCarActualFirst>();
  376. foreach (var item in firstList)
  377. {
  378. if (!string.IsNullOrEmpty(item.predictionCombination))
  379. {
  380. mwcafListDouble.Add(item);
  381. }
  382. }
  383. List<MeterWorkCarActualFirst> mwcafList = new List<MeterWorkCarActualFirst>();
  384. MeterWorkCarActualFirst meterWorkCarActualFirst = mwcafListDouble[0];
  385. mwcafList.Add(meterWorkCarActualFirst);
  386. foreach (var item in mwcafListDouble)
  387. {
  388. if (!string.IsNullOrEmpty(item.predictionCombination))
  389. {
  390. if (meterWorkCarActualFirst.predictionCombination == item.predictionCombination && meterWorkCarActualFirst.actualFirstNo != item.actualFirstNo)
  391. {
  392. mwcafList.Add(item);
  393. break;
  394. };
  395. }
  396. }
  397. if (comBaseInfos.Succeed)
  398. {
  399. //判断车辆是否满足期限皮
  400. if (comBaseInfos.Data != null && comBaseInfos.Data.Count == 1)
  401. {
  402. // 存在期限皮重,并使用期限皮重结净
  403. rt = saveMethod.doNetAddMuchGrossDouble(mwcafListDouble, mwaf);
  404. rt.resultInfo += ",留存期限皮成功";
  405. PbCache.voiceType = 16;
  406. PbCache.ResultMessage = "计量完成,留存期限皮成功";
  407. PbCache.LEDResultMessage = string.Format("车号{0},皮重{1}吨,留存期限皮成功", PbCache.lockCarNo, Math.Round((PbCache.lockWgt / 1000), 2));
  408. }
  409. else
  410. {
  411. // 双委托不使用期限皮结净
  412. rt = saveMethod.doAddDoubleMuchNet(mwcafList, mwaf);
  413. PbCache.voiceType = 1;
  414. PbCache.LEDResultMessage = string.Format("车号{0},皮重{1}吨,计量完成", PbCache.lockCarNo, Math.Round((PbCache.lockWgt / 1000), 2));
  415. }
  416. }
  417. }
  418. }
  419. //判断已选择的委托是否为多条
  420. else
  421. {
  422. rt = saveMethod.doError("存在多条已选择的委托,请联系计量大厅");
  423. PbCache.LEDResultMessage = "存在多条已选择的委托,请联系计量大厅";
  424. rt.isWarn = true;
  425. PbCache.voiceType = 19;
  426. rt.WarnContent = "validIsPre";
  427. return rt;
  428. }
  429. }
  430. else
  431. {
  432. rt = saveMethod.doError("存在多条上称申请数据,请联系计量大厅");
  433. PbCache.voiceType = 20;
  434. PbCache.LEDResultMessage = "存在多条上称申请数据,请联系计量大厅";
  435. return rt;
  436. }
  437. }
  438. // 后台失败处理
  439. if (!rt.result)
  440. {
  441. rt.resultInfo = "称重数据保存失败";
  442. PbCache.voiceType = 25;
  443. PbCache.LEDResultMessage = "计量失败,请联系计量大厅";
  444. PbCache.monitorResultMessage = "";
  445. }
  446. return rt;
  447. }
  448. }
  449. }