| | |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.all.SettingData; |
| | | import com.lf.server.entity.all.StaticData; |
| | | import com.lf.server.entity.data.MetaEntity; |
| | | import com.lf.server.entity.data.MetaFileEntity; |
| | | import com.lf.server.entity.sys.AttachEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.helper.FileHelper; |
| | |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | @Autowired |
| | | AttachService attachService; |
| | | |
| | | private static String tabs = "''"; |
| | | |
| | | private static Map<String, String> attachTabs = new HashMap<>(); |
| | | |
| | | private final static Log log = LogFactory.getLog(UploadAttachService.class); |
| | | |
| | | private static final String NO_FILE = JSON.toJSONString(new ResponseMsg<String>(HttpStatus.NOT_FOUND, "文件找不到")); |
| | | |
| | | /** |
| | | * 获取表名 |
| | | */ |
| | | public static String getTabs() { |
| | | return tabs; |
| | | } |
| | | |
| | | /** |
| | | * 初始化附件表 |
| | |
| | | return; |
| | | } |
| | | |
| | | List<String> keys = new ArrayList<>(); |
| | | for (String str : strs) { |
| | | if (attachTabs.containsKey(str)) { |
| | | continue; |
| | | } |
| | | |
| | | attachTabs.put(str, str.contains("bd.") ? "materiname" : "photono"); |
| | | keys.add("'" + str + "'"); |
| | | } |
| | | tabs = StringHelper.join(keys, ","); |
| | | } |
| | | |
| | | /** |
| | |
| | | log.error(ex.getMessage(), ex); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 上传Excel附件 |
| | | */ |
| | | public Map<String, Integer> uploadXlsAnnex(List<MetaEntity> ms, List<MetaFileEntity> list) { |
| | | Map<String, Integer> map = new HashMap<>(3); |
| | | for (MetaEntity me:ms) { |
| | | |
| | | } |
| | | |
| | | |
| | | return map; |
| | | } |
| | | |
| | | private void getAttachFiles(List<MetaFileEntity> list){ |
| | | |
| | | } |
| | | } |