|
|
@@ -19,6 +19,7 @@ import com.ningdatech.kqapi.admin.mapper.ZoneMapper; |
|
|
|
import com.ningdatech.kqapi.admin.model.dto.GovServiceMatterImportDTO; |
|
|
|
import com.ningdatech.kqapi.admin.model.entity.Window; |
|
|
|
import com.ningdatech.kqapi.admin.model.entity.Zone; |
|
|
|
import com.ningdatech.kqapi.admin.model.enumerization.HandleChannelEnum; |
|
|
|
import com.ningdatech.kqapi.admin.model.req.MatterListReq; |
|
|
|
import com.ningdatech.kqapi.admin.model.vo.MatterDetailDTO; |
|
|
|
import com.ningdatech.kqapi.admin.model.vo.MatterListVO; |
|
|
@@ -42,6 +43,7 @@ import java.net.URLEncoder; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.Optional; |
|
|
|
|
|
|
|
/** |
|
|
|
* <p> |
|
|
@@ -162,6 +164,12 @@ public class AdminMatterManage { |
|
|
|
if (errMsg != null) { |
|
|
|
throw BizException.wrap(errMsg); |
|
|
|
} |
|
|
|
Optional<HandleChannelEnum> handleChannel = IEnum.getByDesc(HandleChannelEnum.class, data.getHandleChannel()); |
|
|
|
if (handleChannel.isPresent()) { |
|
|
|
data.setHandleChannelEnum(handleChannel.get()); |
|
|
|
} else { |
|
|
|
throw BizException.wrap("不支持的办理渠道"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
@@ -207,6 +215,7 @@ public class AdminMatterManage { |
|
|
|
menu.setWindow(window.getWindowName()); |
|
|
|
menu.setZoneName(zone.getZoneName()); |
|
|
|
menu.setDepartment(matter.getDepartment()); |
|
|
|
menu.setHandleChannel(matter.getHandleChannelEnum().getCode()); |
|
|
|
menu.setSort(99); |
|
|
|
menu.setType(type.getCode()); |
|
|
|
newMatters.add(menu); |
|
|
@@ -223,7 +232,7 @@ public class AdminMatterManage { |
|
|
|
final ClassPathResource resource = new ClassPathResource("/template/政策服务事项配置模板.xlsx"); |
|
|
|
try (ServletOutputStream os = response.getOutputStream()) { |
|
|
|
response.setContentType(ExcelUtil.XLSX_CONTENT_TYPE); |
|
|
|
String fileName = URLEncoder.encode(resource.getFile().getName(), "UTF-8"); |
|
|
|
String fileName = URLEncoder.encode(resource.getName(), "UTF-8"); |
|
|
|
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName); |
|
|
|
os.write(resource.readBytes()); |
|
|
|
os.flush(); |
|
|
|