|
@@ -13,7 +13,7 @@ import com.ruoyi.framework.config.RuoYiConfig;
|
|
|
import com.ruoyi.project.common.domain.DataEntity;
|
|
|
import com.ruoyi.project.common.domain.TCommonfile;
|
|
|
import com.ruoyi.project.common.service.ITCommonfileService;
|
|
|
-import com.ruoyi.project.process.controller.export.PermanentMoc;
|
|
|
+import com.ruoyi.project.process.controller.export.*;
|
|
|
import com.ruoyi.project.process.controller.vo.*;
|
|
|
import com.ruoyi.project.process.mapper.TMocMapper;
|
|
|
import com.ruoyi.project.system.domain.SysDept;
|
|
@@ -72,6 +72,768 @@ public class TMocController extends BaseController
|
|
|
@Autowired
|
|
|
private ITCommonfileService commonfileService;
|
|
|
|
|
|
+ /**
|
|
|
+ * 导出临时MOC - 带压消漏清单
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('process:moc:export')")
|
|
|
+ @GetMapping("/exportaquifier")
|
|
|
+ public AjaxResult exportAquifier(TMoc tMoc)
|
|
|
+ {
|
|
|
+ // 当前用户归属部门
|
|
|
+ Long deptId = userService.selectUserById(getUserId()).getDeptId();
|
|
|
+ // 查询条件
|
|
|
+ // 1. 数据归属部门=当前用户归属部门
|
|
|
+ tMoc.setDeptId(deptId);
|
|
|
+ // 2. 时效性=临时
|
|
|
+ tMoc.setTimeliness("2");
|
|
|
+ // 3. 临时MOC类别
|
|
|
+ tMoc.setTempCategory("1");
|
|
|
+ // 查询总表数据
|
|
|
+ List<TMoc> mocList = tMocService.selectTMocList(tMoc);
|
|
|
+ // 带压消漏清单数据
|
|
|
+ List<Aquifier> aquifierList = new ArrayList<Aquifier>();
|
|
|
+ //字典查询
|
|
|
+ List<SysDictData> mocStatusDict = iSysDictTypeService.selectDictDataByType("MOC_STATUS");
|
|
|
+ // 遍历总表数据,插入带压消漏清单
|
|
|
+ for (TMoc moc : mocList) {
|
|
|
+ Aquifier aquifier = new Aquifier();
|
|
|
+ aquifier.setMocNo(moc.getMocNo());
|
|
|
+ aquifier.setCompanyMocNo(moc.getCompanyMocNo());
|
|
|
+ aquifier.setProcessUnit(moc.getProcessUnit());
|
|
|
+ aquifier.setDepartment(moc.getDepartment());
|
|
|
+ aquifier.setLeakLocation(moc.getLeakLocation());
|
|
|
+ aquifier.setTitle(moc.getTitle());
|
|
|
+ aquifier.setPressure(moc.getPressure());
|
|
|
+ aquifier.setTemperature(moc.getTemperature());
|
|
|
+ aquifier.setLeakFluid(moc.getLeakFluid());
|
|
|
+ aquifier.setMaterialType(moc.getMaterialType());
|
|
|
+ aquifier.setPlanDate(moc.getPlanDate());
|
|
|
+ aquifier.setSealDate(moc.getSealDate());
|
|
|
+ aquifier.setExtention1(moc.getExtention1());
|
|
|
+ aquifier.setExtention2(moc.getExtention2());
|
|
|
+ aquifier.setExtention3(moc.getExtention3());
|
|
|
+ aquifier.setExtention4(moc.getExtention4());
|
|
|
+ aquifier.setExtention5(moc.getExtention5());
|
|
|
+ aquifier.setExtention6(moc.getExtention6());
|
|
|
+ aquifier.setExtention7(moc.getExtention7());
|
|
|
+ aquifier.setExtention8(moc.getExtention8());
|
|
|
+ aquifier.setExtention9(moc.getExtention9());
|
|
|
+ for (SysDictData sysDictData : mocStatusDict) {
|
|
|
+ if (sysDictData.getDictValue().equals(moc.getStatus())) {
|
|
|
+ aquifier.setStatus(sysDictData.getDictLabel());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ aquifier.setRemoveTime(moc.getRemoveTime());
|
|
|
+ aquifier.setRemarks(moc.getRemarks());
|
|
|
+ aquifierList.add(aquifier);
|
|
|
+ }
|
|
|
+ ExcelUtil<Aquifier> util = new ExcelUtil<Aquifier>(Aquifier.class);
|
|
|
+ return util.exportExcel(aquifierList, "带压消漏清单");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 批量导入临时MOC - 带压消漏清单
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('process:moc:add')")
|
|
|
+ @PostMapping("/aquifier/importData")
|
|
|
+ public AjaxResult importAquifierData(@RequestParam("file") MultipartFile file) throws IOException
|
|
|
+ {
|
|
|
+ //获取操作人员ID
|
|
|
+ Long userId = getUserId();
|
|
|
+ //报错行数统计
|
|
|
+ List<Integer> failRow =new ArrayList<Integer>();
|
|
|
+ Workbook workbook = ExcelUtils.getWorkBook(file);
|
|
|
+ Sheet sheet = workbook.getSheetAt(0);
|
|
|
+ List<TMoc> list = new ArrayList<TMoc>();
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ //字典查询
|
|
|
+ List<SysDictData> mocStatusDict = iSysDictTypeService.selectDictDataByType("MOC_STATUS");
|
|
|
+ //部门查询
|
|
|
+ List<SysDept> dept = iSysDeptService.selectDeptList(new SysDept());
|
|
|
+ int rowNum = sheet.getPhysicalNumberOfRows();
|
|
|
+ int failNumber = 0;
|
|
|
+ for (int i = 2; i <= rowNum; i++) {
|
|
|
+ try {
|
|
|
+ logger.info("读取行数:" + i);
|
|
|
+ Row row = sheet.getRow(i);
|
|
|
+ int cellNum = row.getPhysicalNumberOfCells();
|
|
|
+ TMoc entity = new TMoc();
|
|
|
+ entity.setTimeliness("2");
|
|
|
+ entity.setTempCategory("1");
|
|
|
+ entity.setDeptId(userService.selectUserById(getUserId()).getDeptId());
|
|
|
+ for (int j = 0; j < cellNum; j++) {
|
|
|
+ Cell cell = row.getCell(j);
|
|
|
+ // cell.setCellType(CellType.STRING);
|
|
|
+ String cellValue = ExcelUtils.getCellValue(cell);
|
|
|
+ logger.info("cellValue:" + cellValue);
|
|
|
+ if (j == 0) {
|
|
|
+ entity.setMocNo(cellValue);
|
|
|
+ } else if (j == 1) {
|
|
|
+ entity.setCompanyMocNo(cellValue);
|
|
|
+ } else if (j == 2) {
|
|
|
+ entity.setProcessUnit(cellValue);
|
|
|
+ } else if (j == 3) {
|
|
|
+ entity.setDepartment(cellValue);
|
|
|
+ } else if (j == 4) {
|
|
|
+ entity.setLeakLocation(cellValue);
|
|
|
+ } else if (j == 5) {
|
|
|
+ entity.setTitle(cellValue);
|
|
|
+ } else if (j == 6) {
|
|
|
+ entity.setPressure(cellValue);
|
|
|
+ } else if (j == 7) {
|
|
|
+ entity.setTemperature(cellValue);
|
|
|
+ } else if (j == 8) {
|
|
|
+ entity.setLeakFluid(cellValue);
|
|
|
+ } else if (j == 9) {
|
|
|
+ entity.setMaterialType(cellValue);
|
|
|
+ } else if (j == 10) {
|
|
|
+ if (cellValue.length() > 3) {
|
|
|
+ entity.setPlanDate(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ }
|
|
|
+ } else if (j == 11) {
|
|
|
+ if (cellValue.length() > 3) {
|
|
|
+ entity.setSealDate(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ }
|
|
|
+ } else if (j == 12) {
|
|
|
+ if (cellValue.length() > 3) {
|
|
|
+ entity.setExtention1(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ }
|
|
|
+ } else if (j == 13) {
|
|
|
+ if (cellValue.length() > 3) {
|
|
|
+ entity.setExtention2(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ }
|
|
|
+ } else if (j == 14) {
|
|
|
+ if (cellValue.length() > 3) {
|
|
|
+ entity.setExtention3(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ }
|
|
|
+ } else if (j == 15) {
|
|
|
+ if (cellValue.length() > 3) {
|
|
|
+ entity.setExtention4(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ }
|
|
|
+ } else if (j == 16) {
|
|
|
+ if (cellValue.length() > 3) {
|
|
|
+ entity.setExtention5(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ }
|
|
|
+ } else if (j == 17) {
|
|
|
+ if (cellValue.length() > 3) {
|
|
|
+ entity.setExtention6(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ }
|
|
|
+ } else if (j == 18) {
|
|
|
+ if (cellValue.length() > 3) {
|
|
|
+ entity.setExtention7(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ }
|
|
|
+ } else if (j == 19) {
|
|
|
+ if (cellValue.length() > 3) {
|
|
|
+ entity.setExtention8(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ }
|
|
|
+ } else if (j == 20) {
|
|
|
+ if (cellValue.length() > 3) {
|
|
|
+ entity.setExtention9(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ }
|
|
|
+ } else if (j == 21) {
|
|
|
+ if (cellValue.length() > 3) {
|
|
|
+ entity.setExpTime(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ }
|
|
|
+ } else if (j == 22) {
|
|
|
+ for (SysDictData sysDictData : mocStatusDict) {
|
|
|
+ if (sysDictData.getDictLabel().equals(cellValue.trim())) {
|
|
|
+ entity.setStatus(sysDictData.getDictValue());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (j == 23) {
|
|
|
+ if (cellValue.length() > 3) {
|
|
|
+ entity.setRemoveTime(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ entity.setCreaterCode(userId.toString());
|
|
|
+ logger.info("entity:" + entity);
|
|
|
+ list.add(entity);
|
|
|
+ }catch (Exception e){
|
|
|
+ failNumber++;
|
|
|
+ failRow.add(i+1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ int successNumber = 0;
|
|
|
+ int failNum = 0;
|
|
|
+ for (TMoc t : list
|
|
|
+ ) {
|
|
|
+ failNum++;
|
|
|
+ try {
|
|
|
+ tMocService.insertTMoc(t);
|
|
|
+ successNumber++;
|
|
|
+ }catch (Exception e){
|
|
|
+ failNumber++;
|
|
|
+ logger.info("e:" + e);
|
|
|
+ failRow.add(failNum+1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ logger.info("list:" + JSON.toJSONString(list));
|
|
|
+ logger.info("successNumber:" +String.valueOf(successNumber));
|
|
|
+ logger.info("failNumber:" +String.valueOf(failNumber));
|
|
|
+ logger.info("failRow:" +String.valueOf(failRow));
|
|
|
+ return AjaxResult.success(String.valueOf(successNumber), failRow);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 导出临时MOC - 临时设施、其它
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('process:moc:export')")
|
|
|
+ @GetMapping("/exportfacility")
|
|
|
+ public AjaxResult exportFacility(TMoc tMoc)
|
|
|
+ {
|
|
|
+ // 当前用户归属部门
|
|
|
+ Long deptId = userService.selectUserById(getUserId()).getDeptId();
|
|
|
+ // 查询条件
|
|
|
+ // 1. 数据归属部门=当前用户归属部门
|
|
|
+ tMoc.setDeptId(deptId);
|
|
|
+ // 2. 时效性=临时
|
|
|
+ tMoc.setTimeliness("2");
|
|
|
+ // 3. 临时MOC类别
|
|
|
+ tMoc.setTempCategory("2");
|
|
|
+ // 查询总表数据
|
|
|
+ List<TMoc> mocList = tMocService.selectTMocList(tMoc);
|
|
|
+ // 临时设施、其它数据
|
|
|
+ List<Facility> facilityList = new ArrayList<Facility>();
|
|
|
+ //字典查询
|
|
|
+ List<SysDictData> tempStateDict = iSysDictTypeService.selectDictDataByType("TEMP_STATE");
|
|
|
+ // 遍历总表数据,插入临时设施、其它
|
|
|
+ for (TMoc moc : mocList) {
|
|
|
+ Facility facility = new Facility();
|
|
|
+ facility.setMocNo(moc.getMocNo());
|
|
|
+ facility.setCompanyMocNo(moc.getCompanyMocNo());
|
|
|
+ facility.setLocation(moc.getLocation());
|
|
|
+ facility.setTitle(moc.getTitle());
|
|
|
+ facility.setExpTime(moc.getExpTime());
|
|
|
+ for (SysDictData sysDictData : tempStateDict) {
|
|
|
+ if (sysDictData.getDictValue().equals(moc.getTempState())) {
|
|
|
+ facility.setTempState(sysDictData.getDictLabel());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ facility.setRemoveTime(moc.getRemoveTime());
|
|
|
+ facility.setRemarks(moc.getRemarks());
|
|
|
+ facilityList.add(facility);
|
|
|
+ }
|
|
|
+ ExcelUtil<Facility> util = new ExcelUtil<Facility>(Facility.class);
|
|
|
+ return util.exportExcel(facilityList, "临时设施及其它");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 批量导入临时MOC - 临时设施、其它
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('process:moc:add')")
|
|
|
+ @PostMapping("/facility/importData")
|
|
|
+ public AjaxResult importFacilityData(@RequestParam("file") MultipartFile file) throws IOException
|
|
|
+ {
|
|
|
+ //获取操作人员ID
|
|
|
+ Long userId = getUserId();
|
|
|
+ //报错行数统计
|
|
|
+ List<Integer> failRow =new ArrayList<Integer>();
|
|
|
+ Workbook workbook = ExcelUtils.getWorkBook(file);
|
|
|
+ Sheet sheet = workbook.getSheetAt(0);
|
|
|
+ List<TMoc> list = new ArrayList<TMoc>();
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ //字典查询
|
|
|
+ List<SysDictData> tempStateDict = iSysDictTypeService.selectDictDataByType("TEMP_STATE");
|
|
|
+ //部门查询
|
|
|
+ List<SysDept> dept = iSysDeptService.selectDeptList(new SysDept());
|
|
|
+ int rowNum = sheet.getPhysicalNumberOfRows();
|
|
|
+ int failNumber = 0;
|
|
|
+ for (int i = 2; i <= rowNum; i++) {
|
|
|
+ try {
|
|
|
+ logger.info("读取行数:" + i);
|
|
|
+ Row row = sheet.getRow(i);
|
|
|
+ int cellNum = row.getPhysicalNumberOfCells();
|
|
|
+ TMoc entity = new TMoc();
|
|
|
+ entity.setTimeliness("2");
|
|
|
+ entity.setTempCategory("2");
|
|
|
+ entity.setDeptId(userService.selectUserById(getUserId()).getDeptId());
|
|
|
+ for (int j = 0; j < cellNum; j++) {
|
|
|
+ Cell cell = row.getCell(j);
|
|
|
+ // cell.setCellType(CellType.STRING);
|
|
|
+ String cellValue = ExcelUtils.getCellValue(cell);
|
|
|
+ logger.info("cellValue:" + cellValue);
|
|
|
+ if (j == 0) {
|
|
|
+ entity.setMocNo(cellValue);
|
|
|
+ } else if (j == 1) {
|
|
|
+ entity.setCompanyMocNo(cellValue);
|
|
|
+ } else if (j == 2) {
|
|
|
+ entity.setLocation(cellValue);
|
|
|
+ } else if (j == 3) {
|
|
|
+ entity.setTitle(cellValue);
|
|
|
+ } else if (j == 4) {
|
|
|
+ if (cellValue.length() > 3) {
|
|
|
+ entity.setExpTime(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ }
|
|
|
+ } else if (j == 5) {
|
|
|
+ for (SysDictData sysDictData : tempStateDict) {
|
|
|
+ if (sysDictData.getDictLabel().equals(cellValue.trim())) {
|
|
|
+ entity.setTempState(sysDictData.getDictValue());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (j == 6) {
|
|
|
+ if (cellValue.length() > 3) {
|
|
|
+ entity.setRemoveTime(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ }
|
|
|
+ } else if (j == 7) {
|
|
|
+ entity.setRemarks(cellValue);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ entity.setCreaterCode(userId.toString());
|
|
|
+ logger.info("entity:" + entity);
|
|
|
+ list.add(entity);
|
|
|
+ }catch (Exception e){
|
|
|
+ failNumber++;
|
|
|
+ failRow.add(i+1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ int successNumber = 0;
|
|
|
+ int failNum = 0;
|
|
|
+ for (TMoc t : list
|
|
|
+ ) {
|
|
|
+ failNum++;
|
|
|
+ try {
|
|
|
+ tMocService.insertTMoc(t);
|
|
|
+ successNumber++;
|
|
|
+ }catch (Exception e){
|
|
|
+ failNumber++;
|
|
|
+ logger.info("e:" + e);
|
|
|
+ failRow.add(failNum+1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ logger.info("list:" + JSON.toJSONString(list));
|
|
|
+ logger.info("successNumber:" +String.valueOf(successNumber));
|
|
|
+ logger.info("failNumber:" +String.valueOf(failNumber));
|
|
|
+ logger.info("failRow:" +String.valueOf(failRow));
|
|
|
+ return AjaxResult.success(String.valueOf(successNumber), failRow);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 导出临时MOC - 仪表联锁旁路
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('process:moc:export')")
|
|
|
+ @GetMapping("/exportinterlock")
|
|
|
+ public AjaxResult exportInterlock(TMoc tMoc)
|
|
|
+ {
|
|
|
+ // 当前用户归属部门
|
|
|
+ Long deptId = userService.selectUserById(getUserId()).getDeptId();
|
|
|
+ // 查询条件
|
|
|
+ // 1. 数据归属部门=当前用户归属部门
|
|
|
+ tMoc.setDeptId(deptId);
|
|
|
+ // 2. 时效性=临时
|
|
|
+ tMoc.setTimeliness("2");
|
|
|
+ // 3. 临时MOC类别
|
|
|
+ tMoc.setTempCategory("3");
|
|
|
+ // 查询总表数据
|
|
|
+ List<TMoc> mocList = tMocService.selectTMocList(tMoc);
|
|
|
+ // 仪表联锁旁路数据
|
|
|
+ List<Interlock> interlockList = new ArrayList<Interlock>();
|
|
|
+ //字典查询
|
|
|
+ List<SysDictData> tempStateDict = iSysDictTypeService.selectDictDataByType("TEMP_STATE");
|
|
|
+ // 遍历总表数据,插入仪表联锁旁路
|
|
|
+ for (TMoc moc : mocList) {
|
|
|
+ Interlock interlock = new Interlock();
|
|
|
+ interlock.setMocNo(moc.getMocNo());
|
|
|
+ interlock.setCompanyMocNo(moc.getCompanyMocNo());
|
|
|
+ interlock.setTitle(moc.getTitle());
|
|
|
+ interlock.setFinishDate(moc.getFinishDate());
|
|
|
+ interlock.setExpTime(moc.getExpTime());
|
|
|
+ for (SysDictData sysDictData : tempStateDict) {
|
|
|
+ if (sysDictData.getDictValue().equals(moc.getTempState())) {
|
|
|
+ interlock.setTempState(sysDictData.getDictLabel());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ interlock.setRemoveTime(moc.getRemoveTime());
|
|
|
+ interlock.setRemarks(moc.getRemarks());
|
|
|
+ interlockList.add(interlock);
|
|
|
+ }
|
|
|
+ ExcelUtil<Interlock> util = new ExcelUtil<Interlock>(Interlock.class);
|
|
|
+ return util.exportExcel(interlockList, "仪表联锁旁路");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 批量导入临时MOC - 仪表联锁旁路
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('process:moc:add')")
|
|
|
+ @PostMapping("/interlock/importData")
|
|
|
+ public AjaxResult importInterlockData(@RequestParam("file") MultipartFile file) throws IOException
|
|
|
+ {
|
|
|
+ //获取操作人员ID
|
|
|
+ Long userId = getUserId();
|
|
|
+ //报错行数统计
|
|
|
+ List<Integer> failRow =new ArrayList<Integer>();
|
|
|
+ Workbook workbook = ExcelUtils.getWorkBook(file);
|
|
|
+ Sheet sheet = workbook.getSheetAt(0);
|
|
|
+ List<TMoc> list = new ArrayList<TMoc>();
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ //字典查询
|
|
|
+ List<SysDictData> tempStateDict = iSysDictTypeService.selectDictDataByType("TEMP_STATE");
|
|
|
+ //部门查询
|
|
|
+ List<SysDept> dept = iSysDeptService.selectDeptList(new SysDept());
|
|
|
+ int rowNum = sheet.getPhysicalNumberOfRows();
|
|
|
+ int failNumber = 0;
|
|
|
+ for (int i = 2; i <= rowNum; i++) {
|
|
|
+ try {
|
|
|
+ logger.info("读取行数:" + i);
|
|
|
+ Row row = sheet.getRow(i);
|
|
|
+ int cellNum = row.getPhysicalNumberOfCells();
|
|
|
+ TMoc entity = new TMoc();
|
|
|
+ entity.setTimeliness("2");
|
|
|
+ entity.setTempCategory("3");
|
|
|
+ entity.setDeptId(userService.selectUserById(getUserId()).getDeptId());
|
|
|
+ for (int j = 0; j < cellNum; j++) {
|
|
|
+ Cell cell = row.getCell(j);
|
|
|
+ // cell.setCellType(CellType.STRING);
|
|
|
+ String cellValue = ExcelUtils.getCellValue(cell);
|
|
|
+ logger.info("cellValue:" + cellValue);
|
|
|
+ if (j == 0) {
|
|
|
+ entity.setMocNo(cellValue);
|
|
|
+ } else if (j == 1) {
|
|
|
+ entity.setCompanyMocNo(cellValue);
|
|
|
+ } else if (j == 2) {
|
|
|
+ entity.setTitle(cellValue);
|
|
|
+ } else if (j == 3) {
|
|
|
+ if (cellValue.length() > 3) {
|
|
|
+ entity.setFinishDate(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ }
|
|
|
+ } else if (j == 4) {
|
|
|
+ if (cellValue.length() > 3) {
|
|
|
+ entity.setExpTime(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ }
|
|
|
+ } else if (j == 5) {
|
|
|
+ for (SysDictData sysDictData : tempStateDict) {
|
|
|
+ if (sysDictData.getDictLabel().equals(cellValue.trim())) {
|
|
|
+ entity.setTempState(sysDictData.getDictValue());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (j == 6) {
|
|
|
+ if (cellValue.length() > 3) {
|
|
|
+ entity.setRemoveTime(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ }
|
|
|
+ } else if (j == 7) {
|
|
|
+ entity.setRemarks(cellValue);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ entity.setCreaterCode(userId.toString());
|
|
|
+ logger.info("entity:" + entity);
|
|
|
+ list.add(entity);
|
|
|
+ }catch (Exception e){
|
|
|
+ failNumber++;
|
|
|
+ failRow.add(i+1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ int successNumber = 0;
|
|
|
+ int failNum = 0;
|
|
|
+ for (TMoc t : list
|
|
|
+ ) {
|
|
|
+ failNum++;
|
|
|
+ try {
|
|
|
+ tMocService.insertTMoc(t);
|
|
|
+ successNumber++;
|
|
|
+ }catch (Exception e){
|
|
|
+ failNumber++;
|
|
|
+ logger.info("e:" + e);
|
|
|
+ failRow.add(failNum+1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ logger.info("list:" + JSON.toJSONString(list));
|
|
|
+ logger.info("successNumber:" +String.valueOf(successNumber));
|
|
|
+ logger.info("failNumber:" +String.valueOf(failNumber));
|
|
|
+ logger.info("failRow:" +String.valueOf(failRow));
|
|
|
+ return AjaxResult.success(String.valueOf(successNumber), failRow);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 导出MOC
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('process:moc:export')")
|
|
|
+ @GetMapping("/export")
|
|
|
+ public AjaxResult export(TMoc tMoc)
|
|
|
+ {
|
|
|
+ // 当前用户归属部门
|
|
|
+ Long deptId = userService.selectUserById(getUserId()).getDeptId();
|
|
|
+ // 查询条件
|
|
|
+ // 1. 数据归属部门=当前用户归属部门
|
|
|
+ tMoc.setDeptId(deptId);
|
|
|
+ // 查询总表数据
|
|
|
+ List<TMoc> mocList = tMocService.selectTMocList(tMoc);
|
|
|
+ // MOC数据
|
|
|
+ List<Moc> mocSummaryList = new ArrayList<Moc>();
|
|
|
+ //字典查询
|
|
|
+ List<SysDictData> mocAreaDict = iSysDictTypeService.selectDictDataByType("MOC_AREA");
|
|
|
+ List<SysDictData> mocTypeDict = iSysDictTypeService.selectDictDataByType("MOC_TYPE");
|
|
|
+ List<SysDictData> mcDetailDict = iSysDictTypeService.selectDictDataByType("MC_DETAIL");
|
|
|
+ List<SysDictData> mocRiskLevelDict = iSysDictTypeService.selectDictDataByType("MOC_RISKLEVEL");
|
|
|
+ // 遍历总表数据,插入MOC表
|
|
|
+ for (TMoc moc : mocList) {
|
|
|
+ Moc mocSummary = new Moc();
|
|
|
+ mocSummary.setMocNo(moc.getMocNo());
|
|
|
+ mocSummary.setCompanyMocNo(moc.getCompanyMocNo());
|
|
|
+ mocSummary.setTimeliness("1".equals(moc.getTimeliness()) ? "永久" : "临时");
|
|
|
+ mocSummary.setProjectNo(moc.getProjectNo());
|
|
|
+ for (SysDictData sysDictData : mocAreaDict) {
|
|
|
+ if (sysDictData.getDictValue().equals(moc.getArea())) {
|
|
|
+ mocSummary.setArea(sysDictData.getDictLabel());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ mocSummary.setTitle(moc.getTitle());
|
|
|
+ for (SysDictData sysDictData : mocTypeDict) {
|
|
|
+ if (sysDictData.getDictValue().equals(moc.getMocType())) {
|
|
|
+ mocSummary.setMocType(sysDictData.getDictLabel());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ mocSummary.setOwner(moc.getOwner());
|
|
|
+ mocSummary.setApproveTime(moc.getApproveTime());
|
|
|
+ mocSummary.setMcTime(moc.getMcTime());
|
|
|
+ for (SysDictData sysDictData : mcDetailDict) {
|
|
|
+ if (sysDictData.getDictValue().equals(moc.getMcDetail())) {
|
|
|
+ mocSummary.setMcDetail(sysDictData.getDictLabel());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ mocSummary.setRemarks(moc.getRemarks());
|
|
|
+ for (SysDictData sysDictData : mocRiskLevelDict) {
|
|
|
+ if (sysDictData.getDictValue().equals(moc.getRiskLevel())) {
|
|
|
+ mocSummary.setRiskLevel(sysDictData.getDictLabel());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ mocSummary.setEhsCheck(moc.getEhsCheck());
|
|
|
+ mocSummary.setTraining(moc.getTraining());
|
|
|
+ mocSummary.setPssr(moc.getPssr());
|
|
|
+ mocSummary.setPssrNo(moc.getPssrNo());
|
|
|
+ mocSummaryList.add(mocSummary);
|
|
|
+ }
|
|
|
+ ExcelUtil<Moc> util = new ExcelUtil<Moc>(Moc.class);
|
|
|
+ return util.exportExcel(mocSummaryList, "MOC汇总");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 导出临时MOC
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('process:moc:export')")
|
|
|
+ @GetMapping("/exporttemporary")
|
|
|
+ public AjaxResult exportTemporaryMoc(TMoc tMoc)
|
|
|
+ {
|
|
|
+ // 当前用户归属部门
|
|
|
+ Long deptId = userService.selectUserById(getUserId()).getDeptId();
|
|
|
+ // 查询条件
|
|
|
+ // 1. 数据归属部门=当前用户归属部门
|
|
|
+ tMoc.setDeptId(deptId);
|
|
|
+ // 2. 时效性=临时
|
|
|
+ tMoc.setTimeliness("2");
|
|
|
+ // 查询总表数据
|
|
|
+ List<TMoc> mocList = tMocService.selectTMocList(tMoc);
|
|
|
+ // 临时MOC数据
|
|
|
+ List<TemporaryMoc> temporaryMocList = new ArrayList<TemporaryMoc>();
|
|
|
+ //字典查询
|
|
|
+ List<SysDictData> mocAreaDict = iSysDictTypeService.selectDictDataByType("MOC_AREA");
|
|
|
+ List<SysDictData> mocTypeDict = iSysDictTypeService.selectDictDataByType("MOC_TYPE");
|
|
|
+ List<SysDictData> mcDetailDict = iSysDictTypeService.selectDictDataByType("MC_DETAIL");
|
|
|
+ List<SysDictData> mocRiskLevelDict = iSysDictTypeService.selectDictDataByType("MOC_RISKLEVEL");
|
|
|
+ List<SysDictData> tempStateDict = iSysDictTypeService.selectDictDataByType("TEMP_STATE");
|
|
|
+ List<SysDictData> mocStatusDict = iSysDictTypeService.selectDictDataByType("MOC_STATUS");
|
|
|
+ List<SysDictData> yesNoEnDict = iSysDictTypeService.selectDictDataByType("YES_NO_EN");
|
|
|
+ // 遍历总表数据,插入临时MOC表
|
|
|
+ for (TMoc moc : mocList) {
|
|
|
+ TemporaryMoc temporaryMoc = new TemporaryMoc();
|
|
|
+ temporaryMoc.setMocNo(moc.getMocNo());
|
|
|
+ temporaryMoc.setCompanyMocNo(moc.getCompanyMocNo());
|
|
|
+ temporaryMoc.setProjectNo(moc.getProjectNo());
|
|
|
+ for (SysDictData sysDictData : mocAreaDict) {
|
|
|
+ if (sysDictData.getDictValue().equals(moc.getArea())) {
|
|
|
+ temporaryMoc.setArea(sysDictData.getDictLabel());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ temporaryMoc.setTitle(moc.getTitle());
|
|
|
+ for (SysDictData sysDictData : mocTypeDict) {
|
|
|
+ if (sysDictData.getDictValue().equals(moc.getMocType())) {
|
|
|
+ temporaryMoc.setMocType(sysDictData.getDictLabel());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ temporaryMoc.setOwner(moc.getOwner());
|
|
|
+ temporaryMoc.setApproveTime(moc.getApproveTime());
|
|
|
+ temporaryMoc.setMcTime(moc.getMcTime());
|
|
|
+ for (SysDictData sysDictData : mcDetailDict) {
|
|
|
+ if (sysDictData.getDictValue().equals(moc.getMcDetail())) {
|
|
|
+ temporaryMoc.setMcDetail(sysDictData.getDictLabel());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ temporaryMoc.setExpTime(moc.getExpTime());
|
|
|
+ for (SysDictData sysDictData : tempStateDict) {
|
|
|
+ if (sysDictData.getDictValue().equals(moc.getTempState())) {
|
|
|
+ temporaryMoc.setTempState(sysDictData.getDictLabel());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (SysDictData sysDictData : mocStatusDict) {
|
|
|
+ if (sysDictData.getDictValue().equals(moc.getStatus())) {
|
|
|
+ temporaryMoc.setStatus(sysDictData.getDictLabel());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ temporaryMoc.setRemoveTime(moc.getRemoveTime());
|
|
|
+ temporaryMoc.setRemarks(moc.getRemarks());
|
|
|
+ for (SysDictData sysDictData : mocRiskLevelDict) {
|
|
|
+ if (sysDictData.getDictValue().equals(moc.getRiskLevel())) {
|
|
|
+ temporaryMoc.setRiskLevel(sysDictData.getDictLabel());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ temporaryMoc.setEhsCheck(moc.getEhsCheck());
|
|
|
+ temporaryMoc.setTraining(moc.getTraining());
|
|
|
+ temporaryMoc.setPssr(moc.getPssr());
|
|
|
+ temporaryMoc.setPssrNo(moc.getPssrNo());
|
|
|
+ temporaryMocList.add(temporaryMoc);
|
|
|
+ }
|
|
|
+ ExcelUtil<TemporaryMoc> util = new ExcelUtil<TemporaryMoc>(TemporaryMoc.class);
|
|
|
+ return util.exportExcel(temporaryMocList, "临时MOC");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 批量导入临时MOC
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('process:moc:add')")
|
|
|
+ @PostMapping("/temporary/importData")
|
|
|
+ public AjaxResult importTemporaryData(@RequestParam("file") MultipartFile file) throws IOException
|
|
|
+ {
|
|
|
+ //获取操作人员ID
|
|
|
+ Long userId = getUserId();
|
|
|
+ //报错行数统计
|
|
|
+ List<Integer> failRow =new ArrayList<Integer>();
|
|
|
+ Workbook workbook = ExcelUtils.getWorkBook(file);
|
|
|
+ Sheet sheet = workbook.getSheetAt(0);
|
|
|
+ List<TMoc> list = new ArrayList<TMoc>();
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ //字典查询
|
|
|
+ List<SysDictData> mocAreaDict = iSysDictTypeService.selectDictDataByType("MOC_AREA");
|
|
|
+ List<SysDictData> mocTypeDict = iSysDictTypeService.selectDictDataByType("MOC_TYPE");
|
|
|
+ List<SysDictData> mcDetailDict = iSysDictTypeService.selectDictDataByType("MC_DETAIL");
|
|
|
+ List<SysDictData> mocRiskLevelDict = iSysDictTypeService.selectDictDataByType("MOC_RISKLEVEL");
|
|
|
+ List<SysDictData> tempStateDict = iSysDictTypeService.selectDictDataByType("TEMP_STATE");
|
|
|
+ List<SysDictData> mocStatusDict = iSysDictTypeService.selectDictDataByType("MOC_STATUS");
|
|
|
+ List<SysDictData> yesNoEnDict = iSysDictTypeService.selectDictDataByType("YES_NO_EN");
|
|
|
+ //部门查询
|
|
|
+ List<SysDept> dept = iSysDeptService.selectDeptList(new SysDept());
|
|
|
+ int rowNum = sheet.getPhysicalNumberOfRows();
|
|
|
+ int failNumber = 0;
|
|
|
+ for (int i = 2; i <= rowNum; i++) {
|
|
|
+ try {
|
|
|
+ logger.info("读取行数:" + i);
|
|
|
+ Row row = sheet.getRow(i);
|
|
|
+ int cellNum = row.getPhysicalNumberOfCells();
|
|
|
+ TMoc entity = new TMoc();
|
|
|
+ entity.setTimeliness("2");
|
|
|
+ entity.setDeptId(userService.selectUserById(getUserId()).getDeptId());
|
|
|
+ for (int j = 0; j < cellNum; j++) {
|
|
|
+ Cell cell = row.getCell(j);
|
|
|
+ // cell.setCellType(CellType.STRING);
|
|
|
+ String cellValue = ExcelUtils.getCellValue(cell);
|
|
|
+ logger.info("cellValue:" + cellValue);
|
|
|
+ if (j == 0) {
|
|
|
+ entity.setMocNo(cellValue);
|
|
|
+ } else if (j == 1) {
|
|
|
+ entity.setCompanyMocNo(cellValue);
|
|
|
+ } else if (j == 2) {
|
|
|
+ entity.setProjectNo(cellValue);
|
|
|
+ } else if (j == 3) {
|
|
|
+ for (SysDictData sysDictData : mocAreaDict) {
|
|
|
+ if (sysDictData.getDictLabel().equals(cellValue.trim())) {
|
|
|
+ entity.setArea(sysDictData.getDictValue());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (j == 4) {
|
|
|
+ entity.setTitle(cellValue);
|
|
|
+ } else if (j == 5) {
|
|
|
+ for (SysDictData sysDictData : mocTypeDict) {
|
|
|
+ if (sysDictData.getDictLabel().equals(cellValue.trim())) {
|
|
|
+ entity.setMocType(sysDictData.getDictValue());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (j == 6) {
|
|
|
+ entity.setOwner(cellValue);
|
|
|
+ } else if (j == 7) {
|
|
|
+ if (cellValue.length() > 3) {
|
|
|
+ entity.setApproveTime(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ }
|
|
|
+ } else if (j == 8) {
|
|
|
+ if (cellValue.length() > 3) {
|
|
|
+ entity.setMcTime(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ }
|
|
|
+ } else if (j == 9) {
|
|
|
+ for (SysDictData sysDictData : mcDetailDict) {
|
|
|
+ if (sysDictData.getDictLabel().equals(cellValue.trim())) {
|
|
|
+ entity.setMcDetail(sysDictData.getDictValue());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (j == 10) {
|
|
|
+ if (cellValue.length() > 3) {
|
|
|
+ entity.setExpTime(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ }
|
|
|
+ } else if (j == 11) {
|
|
|
+ for (SysDictData sysDictData : tempStateDict) {
|
|
|
+ if (sysDictData.getDictLabel().equals(cellValue.trim())) {
|
|
|
+ entity.setTempState(sysDictData.getDictValue());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (j == 12) {
|
|
|
+ for (SysDictData sysDictData : mocStatusDict) {
|
|
|
+ if (sysDictData.getDictLabel().equals(cellValue.trim())) {
|
|
|
+ entity.setStatus(sysDictData.getDictValue());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (j == 13) {
|
|
|
+ if (cellValue.length() > 3) {
|
|
|
+ entity.setRemoveTime(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ }
|
|
|
+ } else if (j == 14) {
|
|
|
+ entity.setRemarks(cellValue);
|
|
|
+ } else if (j == 15) {
|
|
|
+ for (SysDictData sysDictData : mocRiskLevelDict) {
|
|
|
+ if (sysDictData.getDictLabel().equals(cellValue.trim())) {
|
|
|
+ entity.setRiskLevel(sysDictData.getDictValue());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (j == 16) {
|
|
|
+ if (cellValue.length() > 3) {
|
|
|
+ entity.setEhsCheck(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ }
|
|
|
+ } else if (j == 17) {
|
|
|
+ if (cellValue.length() > 3) {
|
|
|
+ entity.setTraining(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ }
|
|
|
+ } else if (j == 18) {
|
|
|
+ if (cellValue.length() > 3) {
|
|
|
+ entity.setPssr(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ }
|
|
|
+ } else if (j == 19) {
|
|
|
+ entity.setPssrNo(cellValue);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ entity.setCreaterCode(userId.toString());
|
|
|
+ logger.info("entity:" + entity);
|
|
|
+ list.add(entity);
|
|
|
+ }catch (Exception e){
|
|
|
+ failNumber++;
|
|
|
+ failRow.add(i+1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ int successNumber = 0;
|
|
|
+ int failNum = 0;
|
|
|
+ for (TMoc t : list
|
|
|
+ ) {
|
|
|
+ failNum++;
|
|
|
+ try {
|
|
|
+ tMocService.insertTMoc(t);
|
|
|
+ successNumber++;
|
|
|
+ }catch (Exception e){
|
|
|
+ failNumber++;
|
|
|
+ logger.info("e:" + e);
|
|
|
+ failRow.add(failNum+1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ logger.info("list:" + JSON.toJSONString(list));
|
|
|
+ logger.info("successNumber:" +String.valueOf(successNumber));
|
|
|
+ logger.info("failNumber:" +String.valueOf(failNumber));
|
|
|
+ logger.info("failRow:" +String.valueOf(failRow));
|
|
|
+ return AjaxResult.success(String.valueOf(successNumber), failRow);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 导出永久MOC
|
|
|
*/
|
|
@@ -153,11 +915,11 @@ public class TMocController extends BaseController
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 批量导入MOC管理
|
|
|
+ * 批量导入永久MOC
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('process:moc:add')")
|
|
|
@PostMapping("/permanent/importData")
|
|
|
- public AjaxResult importData(@RequestParam("file") MultipartFile file) throws IOException
|
|
|
+ public AjaxResult importPermanentData(@RequestParam("file") MultipartFile file) throws IOException
|
|
|
{
|
|
|
//获取操作人员ID
|
|
|
Long userId = getUserId();
|
|
@@ -213,9 +975,13 @@ public class TMocController extends BaseController
|
|
|
} else if (j == 6) {
|
|
|
entity.setOwner(cellValue);
|
|
|
} else if (j == 7) {
|
|
|
- entity.setApproveTime(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ if (cellValue.length() > 3) {
|
|
|
+ entity.setApproveTime(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ }
|
|
|
} else if (j == 8) {
|
|
|
- entity.setMcTime(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ if (cellValue.length() > 3) {
|
|
|
+ entity.setMcTime(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ }
|
|
|
} else if (j == 9) {
|
|
|
for (SysDictData sysDictData : mcDetailDict) {
|
|
|
if (sysDictData.getDictLabel().equals(cellValue.trim())) {
|
|
@@ -231,9 +997,13 @@ public class TMocController extends BaseController
|
|
|
}
|
|
|
}
|
|
|
} else if (j == 12) {
|
|
|
- entity.setEhsCheck(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ if (cellValue.length() > 3) {
|
|
|
+ entity.setEhsCheck(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ }
|
|
|
} else if (j == 13) {
|
|
|
- entity.setTraining(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ if (cellValue.length() > 3) {
|
|
|
+ entity.setTraining(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ }
|
|
|
} else if (j == 14) {
|
|
|
for (SysDictData sysDictData : yesNoEnDict) {
|
|
|
if (sysDictData.getDictLabel().equals(cellValue.trim())) {
|
|
@@ -253,7 +1023,9 @@ public class TMocController extends BaseController
|
|
|
}
|
|
|
}
|
|
|
} else if (j == 17) {
|
|
|
- entity.setPssr(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ if (cellValue.length() > 3) {
|
|
|
+ entity.setPssr(new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue));
|
|
|
+ }
|
|
|
} else if (j == 18) {
|
|
|
entity.setPssrNo(cellValue);
|
|
|
}
|