| | |
| | | public without sharing class LexArriveGoodsController { |
| | | |
| | | //初始化 |
| | | @AuraEnabled |
| | | public static Results init(String arrType, String eSetId) { |
| | |
| | | public static Results searchProduct(String barcode, String arrControllerStr) { |
| | | Results results = new Results(); |
| | | try { |
| | | System.debug('arrControllerStr:' + arrControllerStr); |
| | | ArriveGoodsController arrController = (ArriveGoodsController) JSON.deserialize(arrControllerStr, ArriveGoodsController.class); |
| | | System.debug('arrControllerStr:'+arrControllerStr); |
| | | ArriveGoodsController arrController = (ArriveGoodsController)JSON.deserialize(arrControllerStr, ArriveGoodsController.class); |
| | | arrController.barcode = barcode; |
| | | arrController.returnError = null; |
| | | arrController.warningList = new List<String>(); |
| | | arrController.errorList = new List<String>(); |
| | | arrController.SearchPro(); |
| | | results.arrGoodCon = JSON.serialize(arrController); |
| | | if (arrController.returnError != null && arrController.returnError != '') { |
| | | if(arrController.returnError != null && arrController.returnError != ''){ |
| | | results.result = 'Fail'; |
| | | results.errorMsgList = arrController.errorList; |
| | | results.warningMsgList = arrController.warningList; |
| | | results.errorMsg = arrController.returnError; |
| | | } else { |
| | | }else { |
| | | results.coc = arrController.coc; |
| | | results.saveFLGbln = arrController.saveFLGbln; |
| | | results.returnFLGbln = arrController.ReturnFLGbln; |
| | |
| | | public static Results arriveGoodsConfim(String arrControllerStr) { |
| | | Results results = new Results(); |
| | | try { |
| | | ArriveGoodsController arrController = (ArriveGoodsController) JSON.deserialize(arrControllerStr, ArriveGoodsController.class); |
| | | ArriveGoodsController arrController = (ArriveGoodsController)JSON.deserialize(arrControllerStr, ArriveGoodsController.class); |
| | | arrController.returnError = null; |
| | | arrController.warningList = new List<String>(); |
| | | arrController.errorList = new List<String>(); |
| | | Pagereference page = arrController.ArriveGoodsConfim(); |
| | | results.arrGoodCon = JSON.serialize(arrController); |
| | | if (arrController.returnError != null && arrController.returnError != '') { |
| | | if(arrController.returnError != null && arrController.returnError != ''){ |
| | | results.result = 'Fail'; |
| | | results.errorMsgList = arrController.errorList; |
| | | results.warningMsgList = arrController.warningList; |
| | | results.errorMsg = arrController.returnError; |
| | | } else { |
| | | if (arrController.urlType == 'UnabletoEdit') { |
| | | results.url = '/lexarrivegsdetails?EsetId=' + arrController.arriveId; |
| | | }else { |
| | | if(arrController.urlType == 'UnabletoEdit'){ |
| | | results.url = '/lexarrivegsdetails?EsetId='+arrController.arriveId; |
| | | } |
| | | results.errorMsgList = arrController.errorList; |
| | | results.warningMsgList = arrController.warningList; |
| | |
| | | } |
| | | return results; |
| | | } |
| | | |
| | | |
| | | //登录返品 |
| | | @AuraEnabled |
| | | public static Results updateGoodsOfReturn(String arrControllerStr, String showGoodsofReturnListStr) { |
| | | Results results = new Results(); |
| | | try { |
| | | List<ConsumableorderdetailsInfo> showGoodsofReturnList = (List<ConsumableorderdetailsInfo>) JSON.deserialize( |
| | | showGoodsofReturnListStr, |
| | | List<ConsumableorderdetailsInfo>.class |
| | | ); |
| | | ArriveGoodsController arrController = (ArriveGoodsController) JSON.deserialize(arrControllerStr, ArriveGoodsController.class); |
| | | List<ConsumableorderdetailsInfo> showGoodsofReturnList = (List<ConsumableorderdetailsInfo>)JSON.deserialize(showGoodsofReturnListStr, List<ConsumableorderdetailsInfo>.class); |
| | | ArriveGoodsController arrController = (ArriveGoodsController)JSON.deserialize(arrControllerStr, ArriveGoodsController.class); |
| | | arrController.ShowGoodsofReturnList = changeType2(showGoodsofReturnList); |
| | | arrController.returnError = null; |
| | | arrController.warningList = new List<String>(); |
| | |
| | | StaticParameter.ConsumableOrderTrigger = true; //Add by Li Jun for bypass ConsumableOrderTrigger 20230616 |
| | | Pagereference page = arrController.UpdateGoodsOfReturn(); |
| | | results.arrGoodCon = JSON.serialize(arrController); |
| | | if (arrController.returnError != null && arrController.returnError != '') { |
| | | if(arrController.returnError != null && arrController.returnError != ''){ |
| | | results.result = 'Fail'; |
| | | results.errorMsgList = arrController.errorList; |
| | | results.warningMsgList = arrController.warningList; |
| | | results.errorMsg = arrController.returnError; |
| | | } else { |
| | | if (arrController.urlType == 'ToReturnGoodsPage') { |
| | | results.url = '/detail/' + arrController.return_Order_id; |
| | | }else { |
| | | if(arrController.urlType == 'ToReturnGoodsPage'){ |
| | | results.url = '/detail/'+arrController.return_Order_id; |
| | | } |
| | | if (arrController.urlType == 'ToInventoryGoodsPage') { |
| | | results.url = '/detail/' + arrController.inventory_Order_id; |
| | | if(arrController.urlType == 'ToInventoryGoodsPage'){ |
| | | results.url = '/detail/'+arrController.inventory_Order_id; |
| | | } |
| | | results.errorMsgList = arrController.errorList; |
| | | results.warningMsgList = arrController.warningList; |
| | |
| | | return results; |
| | | } |
| | | |
| | | public static List<ConsumableorderdetailsInfo> changeType1(List<ArriveGoodsController.ConsumableorderdetailsInfo> conList) { |
| | | public static List<ConsumableorderdetailsInfo> changeType1(List<ArriveGoodsController.ConsumableorderdetailsInfo> conList){ |
| | | List<ConsumableorderdetailsInfo> conList1 = new List<ConsumableorderdetailsInfo>(); |
| | | if (conList != null) { |
| | | for (ArriveGoodsController.ConsumableorderdetailsInfo con : conList) { |
| | | if(conList != null){ |
| | | for(ArriveGoodsController.ConsumableorderdetailsInfo con : conList){ |
| | | ConsumableorderdetailsInfo con1 = new ConsumableorderdetailsInfo(); |
| | | con1.esd = con.esd; |
| | | con1.Prod = con.Prod; |
| | |
| | | return conList1; |
| | | } |
| | | |
| | | public static List<ArriveGoodsController.ConsumableorderdetailsInfo> changeType2(List<ConsumableorderdetailsInfo> conList) { |
| | | public static List<ArriveGoodsController.ConsumableorderdetailsInfo> changeType2(List<ConsumableorderdetailsInfo> conList){ |
| | | List<ArriveGoodsController.ConsumableorderdetailsInfo> conList1 = new List<ArriveGoodsController.ConsumableorderdetailsInfo>(); |
| | | if (conList != null) { |
| | | for (ConsumableorderdetailsInfo con : conList) { |
| | | if(conList != null){ |
| | | for(ConsumableorderdetailsInfo con : conList){ |
| | | ArriveGoodsController.ConsumableorderdetailsInfo con1 = new ArriveGoodsController.ConsumableorderdetailsInfo(); |
| | | con1.esd = con.esd; |
| | | con1.Prod = con.Prod; |
| | |
| | | @AuraEnabled |
| | | public String ReportProductExpirationDate { get; set; } |
| | | |
| | | public ConsumableorderdetailsInfo() { |
| | | public ConsumableorderdetailsInfo(){ |
| | | |
| | | } |
| | | |
| | | // 排序 |
| | |
| | | return null; |
| | | } |
| | | } |
| | | } |
| | | } |