/** * 保存头 * * @throws DataHandleException * @throws SQLException */ public void saveHeader() throws DataHandleException, SQLException { if (headerDTO.getTransNo().equals(AssetsWebAttributes.ORDER_AUTO_PROD)) { if (StrUtil.isEmpty(headerDTO.getTransId())) { SeqProducer seqProducer = new SeqProducer(conn); String transId = seqProducer.getGUID(); headerDTO.setTransId(transId); } String companyCode = userAccount.getCompanyCode(); // 还是采用该方法,以下考虑周子君认为没必要 String transType = headerDTO.getTransType(); OrderNumGenerator numberProducer = new OrderNumGenerator(conn, companyCode, transType); headerDTO.setTransNo(numberProducer.getOrderNum()); headerDAO.createHeader(headerDTO); } else { headerDAO.updateHeader(headerDTO); } }
/** 功能:准备流程数据,由应用实现 */ protected void prepareProcedureData() { flowDTO.setApp_dataID(headerDTO.getTransId()); flowDTO.setPrimaryKey(headerDTO.getTransId()); flowDTO.setOrderNo(headerDTO.getTransNo()); flowDTO.setOrderName(ORDER_TITLE); }