|
@@ -236,6 +236,8 @@ public class EnterpriseInfoController {
|
|
|
|
|
|
List<Map> mapList = new ArrayList<>();
|
|
|
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+
|
|
|
for (EnterpriseInfo enterpriseInfo : page) {
|
|
|
Map map = new HashMap();
|
|
|
map.put("id", enterpriseInfo.getId());
|
|
@@ -254,6 +256,15 @@ public class EnterpriseInfoController {
|
|
|
map.put("status", enterpriseInfo.getStatus());
|
|
|
map.put("statusN", statusN);
|
|
|
|
|
|
+ String checkTime = "";
|
|
|
+ if (enterpriseInfo.getCheckTime() != null) {
|
|
|
+ checkTime = sdf.format(enterpriseInfo.getCheckTime());
|
|
|
+ }
|
|
|
+
|
|
|
+ map.put("checkTime", checkTime);
|
|
|
+
|
|
|
+ map.put("contactsPhone", enterpriseInfo.getContactsPhone());
|
|
|
+
|
|
|
mapList.add(map);
|
|
|
}
|
|
|
|
|
@@ -267,8 +278,7 @@ public class EnterpriseInfoController {
|
|
|
}
|
|
|
|
|
|
msgResult.setResult(true);
|
|
|
- }
|
|
|
- catch (Exception ex) {
|
|
|
+ } catch (Exception ex) {
|
|
|
logger.error(ex.getMessage(), ex);
|
|
|
msgResult.setResult(false);
|
|
|
}
|
|
@@ -286,7 +296,7 @@ public class EnterpriseInfoController {
|
|
|
//表头
|
|
|
Row rowTitle = sheet.createRow(0);
|
|
|
|
|
|
- String[] titles = new String[]{"序号", "企业名称", "企业地址", "企业联系人", "认证状态"};
|
|
|
+ String[] titles = new String[]{"序号", "企业名称", "企业地址", "企业联系人","联系电话", "认证状态", "认证时间"};
|
|
|
|
|
|
for (int i = 0; i < titles.length; i++) {
|
|
|
Cell cell = rowTitle.createCell(i);
|
|
@@ -303,7 +313,9 @@ public class EnterpriseInfoController {
|
|
|
row.createCell(colIndex++).setCellValue(com.jpsoft.employment.modules.common.utils.StringUtils.strValue(map.get("name"), ""));
|
|
|
row.createCell(colIndex++).setCellValue(com.jpsoft.employment.modules.common.utils.StringUtils.strValue(map.get("address"), ""));
|
|
|
row.createCell(colIndex++).setCellValue(com.jpsoft.employment.modules.common.utils.StringUtils.strValue(map.get("contactsPersonId"), ""));
|
|
|
+ row.createCell(colIndex++).setCellValue(com.jpsoft.employment.modules.common.utils.StringUtils.strValue(map.get("contactsPhone"), ""));
|
|
|
row.createCell(colIndex++).setCellValue(com.jpsoft.employment.modules.common.utils.StringUtils.strValue(map.get("statusN"), ""));
|
|
|
+ row.createCell(colIndex++).setCellValue(com.jpsoft.employment.modules.common.utils.StringUtils.strValue(map.get("checkTime"), ""));
|
|
|
}
|
|
|
|
|
|
ByteArrayOutputStream output = new ByteArrayOutputStream();
|
|
@@ -350,10 +362,12 @@ public class EnterpriseInfoController {
|
|
|
|
|
|
try {
|
|
|
|
|
|
+ Date now = new Date();
|
|
|
EnterpriseInfo enterpriseInfo = enterpriseInfoService.get(id);
|
|
|
enterpriseInfo.setStatus("1");
|
|
|
enterpriseInfo.setUpdateBy(subject);
|
|
|
- enterpriseInfo.setUpdateTime(new Date());
|
|
|
+ enterpriseInfo.setUpdateTime(now);
|
|
|
+ enterpriseInfo.setCheckTime(now);
|
|
|
|
|
|
int affectCount = enterpriseInfoService.update(enterpriseInfo);
|
|
|
|
|
@@ -406,7 +420,7 @@ public class EnterpriseInfoController {
|
|
|
}
|
|
|
|
|
|
EnterpriseInfo currItem = enterpriseInfoService.findByName(name);
|
|
|
- if(currItem!=null){
|
|
|
+ if (currItem != null) {
|
|
|
sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("该企业名称已存在系统当中,不能重复添加!");
|
|
|
failCount++;
|
|
|
continue;
|
|
@@ -466,7 +480,7 @@ public class EnterpriseInfoController {
|
|
|
|
|
|
@ApiOperation(value = "判断企业名称是否重复")
|
|
|
@PostMapping("nameIsRepeatCheck")
|
|
|
- public MessageResult<Boolean> nameIsRepeatCheck(String id,String name) {
|
|
|
+ public MessageResult<Boolean> nameIsRepeatCheck(String id, String name) {
|
|
|
MessageResult<Boolean> msgResult = new MessageResult<>();
|
|
|
|
|
|
try {
|
|
@@ -476,9 +490,8 @@ public class EnterpriseInfoController {
|
|
|
|
|
|
if (enterpriseInfo == null) {
|
|
|
flag = true;
|
|
|
- }
|
|
|
- else{
|
|
|
- if(id.equals(enterpriseInfo.getId())){
|
|
|
+ } else {
|
|
|
+ if (id.equals(enterpriseInfo.getId())) {
|
|
|
flag = true;
|
|
|
}
|
|
|
}
|