public TaiLieuDinhKem getThongTinTaiLieuDinhKem(Long thutucId, Long chungthucId) { // TODO Auto-generated method stub try { TaiLieuChungThuc chungThuc = TaiLieuChungThucLocalServiceUtil.getTaiLieuChungThuc(chungthucId); if (chungThuc != null) { List<ThuTuc2GiayTo> gList = ThuTuc2GiayToLocalServiceUtil.getDSTT2GiayTo( thutucId, chungThuc.getDanhMucGiayToId(), Constants.STEP.STEP1); if (gList != null && gList.size() > 0) { DanhMucGiayTo type = DanhMucGiayToLocalServiceUtil.getDanhMucGiayTo(chungThuc.getDanhMucGiayToId()); if (type != null) { TaiLieuDinhKem dinhKem = new TaiLieuDinhKem(DanhMucGiayToSoap.toSoapModel(type)); dinhKem.setTailieuChungThuc(TaiLieuChungThucSoap.toSoapModel(chungThuc)); dinhKem.setUrl( WebserviceFactory.getThamSoService().getValue(Constants.ThamSo.DOMAIN) + storage.getURLById(chungThuc.getNoiLuuTruId())); if (gList.get(0).getBatBuoc() == 1) { dinhKem.setBatBuoc(true); } else { dinhKem.setBatBuoc(false); } return dinhKem; } } } } catch (Exception e) { // TODO Auto-generated catch block } return null; }
private TaiLieuDinhKem getTailieuDinhKemBoiIdStep2(Long chungthucId) { // TODO Auto-generated method stub log.info("1.step 1 chungthuc Id:" + chungthucId); try { TaiLieuChungThuc chungThuc = TaiLieuChungThucLocalServiceUtil.fetchTaiLieuChungThuc(chungthucId); if (chungThuc == null) { log.info("2. null objct chungthuc by id"); chungThuc = TaiLieuChungThucLocalServiceUtil.getTaiLieuChungThuc(chungthucId); } if (chungThuc != null) { DanhMucGiayTo type = DanhMucGiayToLocalServiceUtil.fetchDanhMucGiayTo(chungThuc.getDanhMucGiayToId()); if (type == null) { log.info("3. null object danhmuc by id"); type = DanhMucGiayToLocalServiceUtil.getDanhMucGiayTo(chungThuc.getDanhMucGiayToId()); } if (type != null) { TaiLieuDinhKem dinhKem = new TaiLieuDinhKem(DanhMucGiayToSoap.toSoapModel(type)); dinhKem.setTailieuChungThuc(TaiLieuChungThucSoap.toSoapModel(chungThuc)); dinhKem.setUrl( WebserviceFactory.getThamSoService().getValue(Constants.ThamSo.DOMAIN) + storage.getURLById(chungThuc.getNoiLuuTruId())); return dinhKem; } } } catch (Exception e) { // TODO Auto-generated catch block log.info("document-------------error:" + e.getMessage()); // e.printStackTrace(); } return null; }
public TaiLieuDinhKem getDanhMucGiayTheoId(Long userId, Long giayToId) { try { TaiKhoanNguoiDung account = SharedserviceUtil.getTaiKhoanNguoiDungByLiferayId(userId); if (account == null) return null; DanhMucGiayTo danhMucGiayTo = DanhMucGiayToLocalServiceUtil.getDanhMucGiayTo(giayToId); if (danhMucGiayTo != null) { return FormUtils.getTaiLieuDinhKem(danhMucGiayTo, account.getId()); } } catch (Exception e) { // TODO Auto-generated catch block } return null; }
public TaiLieuDinhKem getPhienBanMoiNhatTheoTTHC2GiayTo(Long userId, Long thuTuc2GiayToId) { try { TaiKhoanNguoiDung account = SharedserviceUtil.getTaiKhoanNguoiDungByLiferayId(userId); if (account == null) return null; ThuTuc2GiayTo tt2GiayTo = ThuTuc2GiayToLocalServiceUtil.getThuTuc2GiayTo(thuTuc2GiayToId); if (tt2GiayTo != null) { DanhMucGiayTo danhMucGiayTo = DanhMucGiayToLocalServiceUtil.getDanhMucGiayTo(tt2GiayTo.getDanhMucGiayToId()); if (danhMucGiayTo != null) { return getPhienBanMoiNhatTheoMa(account.getId(), danhMucGiayTo.getMa()); } } } catch (Exception e) { // TODO Auto-generated catch block } return null; }