检验结果回传至ERP质检报告中增加自动提交
This commit is contained in:
		
							parent
							
								
									8a5732a1a2
								
							
						
					
					
						commit
						f597770b4b
					
				|  | @ -4,6 +4,7 @@ import nc.bs.framework.common.InvocationInfoProxy; | |||
| import nc.bs.framework.common.NCLocator; | ||||
| import nc.bs.trade.business.HYSuperDMO; | ||||
| import nc.impl.qc.c003.maintain.ReportMaintainImpl; | ||||
| import nc.itf.qc.c003.approve.IReportApprove; | ||||
| import nc.itf.qc.c003.maintain.IReportMaintain; | ||||
| import nc.vo.pub.BusinessException; | ||||
| import nc.vo.pub.VOStatus; | ||||
|  | @ -18,10 +19,12 @@ import nc.vo.scmpub.util.CollectionUtils; | |||
| import nccloud.api.rest.utils.NCCRestUtils; | ||||
| import nccloud.api.rest.utils.ResultMessageUtil; | ||||
| import nccloud.base.exception.ExceptionUtils; | ||||
| import nccloud.dto.scmpub.script.entity.SCMScriptResultDTO; | ||||
| import nccloud.framework.service.ServiceLocator; | ||||
| import nccloud.pubitf.arap.arappub.IArapBillPubUtilService; | ||||
| import nccloud.pubitf.riart.pflow.CloudPFlowContext; | ||||
| import nccloud.pubitf.riart.pflow.ICloudScriptPFlowService; | ||||
| import nccloud.pubitf.scmpub.commit.service.IBatchRunScriptService; | ||||
| import nccloud.pubitf.scmpub.pub.service.ISCMPubQueryService; | ||||
| import org.json.JSONString; | ||||
| 
 | ||||
|  | @ -190,6 +193,14 @@ public class QcconclusionRestResource extends QcBaseRestResource { | |||
| //        this.doSaveAndCombine(vos); | ||||
|         IReportMaintain reportMaintain=((IReportMaintain) NCLocator.getInstance().lookup(IReportMaintain.class)); | ||||
|         ReportVO[] resultVos=  reportMaintain.saveBase(vos,new Object(),updatevos); | ||||
| //        IReportApprove iReportApprove=((IReportApprove) NCLocator.getInstance().lookup(IReportApprove.class)); | ||||
| //        iReportApprove.approveReport(resultVos,); | ||||
| 
 | ||||
|         CloudPFlowContext context = this.generatePFContext(resultVos); | ||||
|         IBatchRunScriptService iReportApprove=((IBatchRunScriptService) NCLocator.getInstance().lookup(IBatchRunScriptService.class)); | ||||
| 
 | ||||
|         SCMScriptResultDTO obj = iReportApprove.runBacth(context, ReportVO.class); | ||||
| 
 | ||||
|         //质检报告更新 | ||||
|         Map<String, Object> returnMap = new HashMap<String, Object>(); | ||||
|         returnMap.put("data", resultVos); | ||||
|  | @ -244,4 +255,11 @@ public class QcconclusionRestResource extends QcBaseRestResource { | |||
|         } | ||||
| 
 | ||||
|     } | ||||
|     private CloudPFlowContext generatePFContext(ReportVO[] reports) { | ||||
|         CloudPFlowContext context = new CloudPFlowContext(); | ||||
|         context.setBillType(QCBillType.ReportBill.getCode()); | ||||
|         context.setActionName("N_C003_APPROVE"); | ||||
|         context.setBillVos(reports); | ||||
|         return context; | ||||
|     } | ||||
| } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue