| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.lf.server.entity.all.BaseEntity; |
| | | import com.lf.server.entity.data.FmeLogEntity; |
| | | import com.lf.server.entity.data.MetaEntity; |
| | | import com.lf.server.entity.sys.AttachEntity; |
| | | import com.lf.server.helper.ClassHelper; |
| | | import com.lf.server.helper.StringHelper; |
| | |
| | | * 查询FME日志 |
| | | */ |
| | | public List<FmeLogEntity> selectFmeLogs() { |
| | | if (null == tabs) { |
| | | if (StringHelper.isEmpty(tabs)) { |
| | | tabs = UploadAttachService.getTabs().replace("'", ""); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public MetaEntity insertAttachByMeta(String metaName, String tab, String tabGuid) { |
| | | return attachMapper.insertAttachByMeta(metaName, tab, tabGuid); |
| | | public Integer insertAttachByMeta(String tab, String tabGuid, String metaName, String dirid) { |
| | | return attachMapper.insertAttachByMeta(tab, tabGuid, metaName, dirid); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | BaseEntity be = (BaseEntity) obj; |
| | | String dirid = getDirid(be); |
| | | for (String name : names) { |
| | | insertAttachByMeta(name, tab, be.getEventid()); |
| | | insertAttachByMeta(tab, be.getEventid(), name, dirid); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取目录编码 |
| | | */ |
| | | private String getDirid(BaseEntity be) { |
| | | if (StringHelper.isEmpty(be.getDirid())) { |
| | | return null; |
| | | } |
| | | |
| | | String dirid = be.getDirid().substring(0, 2); |
| | | |
| | | return StringHelper.getRightLike(dirid); |
| | | } |
| | | |
| | | /** |
| | | * 根据父ID查询记录 |
| | | */ |
| | | private List<?> selectRowsByParentid(String entity, String parentid, String field) { |