41 lines
1.4 KiB
Java
41 lines
1.4 KiB
Java
package seed.common.service;
|
|
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
import com.fasterxml.jackson.core.type.TypeReference;
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
|
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
|
|
import seed.dao.InnorixFileDAO;
|
|
|
|
@Service("innorixFileService")
|
|
public class InnorixFileServiceImpl extends EgovAbstractServiceImpl implements InnorixFileService{
|
|
|
|
@Resource(name="innorixFileDAO")
|
|
public InnorixFileDAO innorixFileDAO;
|
|
|
|
@Override
|
|
public void innorixExtraFileInsert(String innorixFileListStr, @RequestParam Map<String,Object> paramMap) throws Exception {
|
|
|
|
ObjectMapper objectMapper = new ObjectMapper();
|
|
List<InnorixFileVO> innorixFileList = objectMapper.readValue(innorixFileListStr, new TypeReference<List<InnorixFileVO>>() {});
|
|
|
|
for(InnorixFileVO innorixFileVO : innorixFileList) {
|
|
innorixFileVO.setDataIdx((Integer) paramMap.get("dataIdx"));
|
|
innorixFileVO.setFileFuncType((String)paramMap.get("fileFuncType"));
|
|
|
|
String fileName = innorixFileVO.getClientFileName();
|
|
String fileType = fileName.substring(fileName.lastIndexOf(".")+1, fileName.length());
|
|
innorixFileVO.setFileType(fileType);
|
|
innorixFileDAO.innorixExtraFileInsert(innorixFileVO);
|
|
}
|
|
}
|
|
|
|
}
|