Commit 4a6ee7e7 authored by 赵啸非's avatar 赵啸非

添加事项备注字段

parent 99169bce
package com.mortals.xhx.module.matter.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.matter.model.*;
import lombok.Data;
import java.util.List;
/**
* 自定义导入对象
* @author: zxfei
* @date: 2025/3/24 9:44
*/
@Data
public class MatterCustomImportEntity extends BaseEntityLong {
/**
* 事项名称
*/
private String matterName;
/**
* 部门名称
*/
private String deptName;
/**
* 事项详情链接
*/
private String url;
}
\ No newline at end of file
......@@ -2009,7 +2009,7 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
}
sb.append("\n");
//承诺办结时限 办理地点 办理时间 咨询电话
HashSet<String> whiteBaseSet = new HashSet<>(Arrays.asList("承诺办结时限", "办理地点", "办理时间", "咨询电话"));
HashSet<String> whiteBaseSet = new HashSet<>(Arrays.asList("承诺办结时限", "办理地点", "办理时间", "咨询方式"));
Map<String, String> baseInfoMap = MatterDetailHtmlParseUtil.getbaseInfoMapByHtml(dom);
for (Map.Entry<String, String> entry : baseInfoMap.entrySet()) {
if (whiteBaseSet.contains(entry.getKey())) {
......
......@@ -10,6 +10,8 @@ import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.framework.service.ICacheService;
import com.mortals.framework.util.DataUtil;
import com.mortals.framework.utils.ReflectUtils;
import com.mortals.framework.utils.poi.ExcelUtil;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.framework.config.InterceptorConfig;
import com.mortals.xhx.base.system.param.service.ParamService;
......@@ -19,12 +21,16 @@ import com.mortals.xhx.module.base.model.BaseAreaEntity;
import com.mortals.xhx.module.base.model.BaseAreaQuery;
import com.mortals.xhx.module.base.service.BaseAreaService;
import com.mortals.xhx.module.matter.model.*;
import com.mortals.xhx.module.matter.model.vo.MatterCustomImportEntity;
import com.mortals.xhx.module.matter.service.*;
import com.mortals.xhx.module.site.model.SiteThemeQuery;
import com.mortals.xhx.module.site.service.SiteThemeService;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.util.ArrayList;
import java.util.HashMap;
......@@ -359,4 +365,36 @@ public class MatterController extends BaseCRUDJsonBodyMappingController<MatterSe
return ret.toString();
}
@PostMapping("/importDataCustom")
public String importDataCustom(MultipartFile file, boolean updateSupport) {
JSONObject ret = new JSONObject();
Map<String, Object> model = new HashMap<>();
Map<String, Object> excelConfData = new HashMap<>();
excelConfData.put("headereRow", 0);
excelConfData.put("dataRow", 1);
excelConfData.put("sheetName", StringUtils.EMPTY);
Context context = getContext();
String busiDesc = "导入" + getModuleDesc();
int code = VALUE_RESULT_SUCCESS;
try {
ExcelUtil<MatterCustomImportEntity, Long> util = new ExcelUtil<>(MatterCustomImportEntity.class);
doImportExcelBefore(excelConfData);
List<MatterCustomImportEntity> list = util.importExcel((String) excelConfData.get("sheetName"), file.getInputStream(), (Integer) excelConfData.get("headereRow"), (Integer) excelConfData.get("dataRow"));
// doImportDataBefore(list, updateSupport, context);
// String message = this.service.importList(list, updateSupport, getContext());
// doImportExcelAfter(file, list, getContext());
//model.put(MESSAGE_INFO, message);
recordSysLog(request, busiDesc + " 【成功】");
} catch (Exception e) {
code = VALUE_RESULT_FAILURE;
doException(request, busiDesc, model, e);
}
ret.put(KEY_RESULT_CODE, code);
ret.put(KEY_RESULT_MSG, model.remove(MESSAGE_INFO));
return ret.toJSONString();
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment