生产报告保存审批接口添加翻译

This commit is contained in:
李正@用友 2025-05-28 16:28:48 +08:00
parent 508996fb3d
commit d75b27399e
1 changed files with 11 additions and 0 deletions

View File

@ -136,6 +136,17 @@ public class WrResource extends AbstractNCCRestResource {
vo.setChildren(WrItemVO.class, items.toArray(new WrItemVO[0]));
voList.add(vo);
IAPIWrMaintain server = NCLocator.getInstance().lookup(IAPIWrMaintain.class);
List<AggWrVO> aggWrVOS = TransferCodeToPKTool.transferAggVO(voList);
//翻译报告类型
BaseDAO baseDAO = new BaseDAO();
for (AggWrVO aggWrVO : aggWrVOS) {
List<BilltypeVO> collection = (List<BilltypeVO>) baseDAO.retrieveByClause(BilltypeVO.class, " pk_billtypecode='" + aggWrVO.getParentVO().getVtrantypecode() + "'");
if(collection==null||collection.size()==0){
throw new BusinessException("翻译报告类型失败,检查报告类型编码【"+aggWrVO.getParentVO().getVtrantypecode()+"");
}
aggWrVO.getParentVO().setVtrantypeid(collection.get(0).getPk_billtypeid());
aggWrVO.getParentVO().setDbilldate(new UFDate());
}
AggWrVO[] aggvos = server.saveAndApprove(voList.toArray(new AggWrVO[0]));
boolean successFlag = true;
StringBuilder errMsg = new StringBuilder();