diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml index a12935a..174f6b9 100644 --- a/ruoyi-admin/pom.xml +++ b/ruoyi-admin/pom.xml @@ -16,6 +16,11 @@ + + com.alibaba + easyexcel + 3.2.1 + com.sun.mail javax.mail diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/controller/BmsTemplateInfoController.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/controller/BmsTemplateInfoController.java index a171940..38864ef 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/controller/BmsTemplateInfoController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/controller/BmsTemplateInfoController.java @@ -80,12 +80,12 @@ public class BmsTemplateInfoController extends BaseController { /** * 导出模板表单 */ - @PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')") - @Log(title = "导出模板表单", businessType = BusinessType.EXPORT) +// @PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')") +// @Log(title = "导出模板表单", businessType = BusinessType.EXPORT) @ApiOperation(value = "导出模板表单") @GetMapping(value = "/exportTemplate/{id}") - public void exportTemplate(HttpServletRequest request, HttpServletResponse response, @PathVariable("id") Long id) { - bmsTemplateInfoService.exportTemplate(request, response, id); + public void exportTemplate(HttpServletResponse response, @PathVariable("id") Long id) { + bmsTemplateInfoService.exportTemplate( response,id); } /** diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/IBmsTemplateInfoService.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/IBmsTemplateInfoService.java index 26ceec2..ccb5e78 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/IBmsTemplateInfoService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/IBmsTemplateInfoService.java @@ -36,14 +36,12 @@ public interface IBmsTemplateInfoService extends IService { /** * 导出模板表单 * - * @param request - * @param response * @param id * @return * @author emiya.xie * @create 2023/8/31 10:25 */ - public void exportTemplate(HttpServletRequest request, HttpServletResponse response, Long id); + public void exportTemplate(HttpServletResponse response,Long id); /** diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsTemplateInfoServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsTemplateInfoServiceImpl.java index c02bd68..3798284 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsTemplateInfoServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/service/impl/BmsTemplateInfoServiceImpl.java @@ -1,10 +1,10 @@ package com.ruoyi.jjh.declaration.service.impl; -import cn.hutool.core.bean.BeanUtil; +import com.alibaba.excel.EasyExcel; +import com.alibaba.fastjson2.JSONArray; +import com.alibaba.fastjson2.JSONObject; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.ruoyi.common.exception.ServiceException; -import com.ruoyi.common.utils.file.FileUtils; import com.ruoyi.jjh.declaration.entity.BmsTemplateInfo; import com.ruoyi.jjh.declaration.mapper.BmsTemplateInfoMapper; import com.ruoyi.jjh.declaration.service.IBmsEnterpriseDirectoryService; @@ -12,12 +12,12 @@ import com.ruoyi.jjh.declaration.service.IBmsTemplateInfoService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import java.io.ByteArrayOutputStream; import java.io.IOException; -import java.io.InputStream; import java.time.LocalDate; +import java.util.ArrayList; import java.util.List; /** @@ -57,61 +57,39 @@ public class BmsTemplateInfoServiceImpl extends ServiceImpl> list = new ArrayList<>(); + for (Object o : js1) { + JSONObject parse = JSONObject.parse(o.toString()); + List head0 = new ArrayList<>(); + head0.add(parse.get("label").toString()); + list.add(head0); } - String fileName = bmsTemplateInfo.getTemplateName() + ".xlsx"; - String file = "/template/" + fileName; - - // 使用 try-with-resources 自动关闭 InputStream - try (InputStream is = this.getClass().getResourceAsStream(file)) { - if (is == null) { - throw new ServiceException("模板文件未找到!"); - } - - byte[] fileData = input2byte(is); - FileUtils.downloadFile(response, request, fileName, fileData); + // 创建 Excel 写入流 + // 设置响应头,告诉浏览器下载文件 + // 设置响应头,告诉浏览器下载文件 + response.setContentType("application/vnd.ms-excel"); + response.setHeader("Content-Disposition", "attachment; filename="+fileName); + try (ServletOutputStream outputStream = response.getOutputStream()) { + // 使用 EasyExcel 写数据到响应流 + EasyExcel.write(outputStream) + // 这里放入动态头 + .head(list).sheet("模板") + // 当然这里数据也可以用 List> 去传入 + .doWrite(new ArrayList<>()); } catch (IOException e) { - log.error("导出模板时发生错误", e); - throw new ServiceException("导出模板失败,请重试!"); + throw new RuntimeException(e); } - } - private byte[] input2byte(InputStream inStream) - throws IOException { - ByteArrayOutputStream swapStream = new ByteArrayOutputStream(); - byte[] buff = new byte[100]; - int rc = 0; - while ((rc = inStream.read(buff, 0, 100)) > 0) { - swapStream.write(buff, 0, rc); - } - byte[] in2b = swapStream.toByteArray(); - return in2b; } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/single/service/impl/SingleLoginServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/single/service/impl/SingleLoginServiceImpl.java index e8278b3..9ff8851 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/single/service/impl/SingleLoginServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/declaration/single/service/impl/SingleLoginServiceImpl.java @@ -57,7 +57,7 @@ public class SingleLoginServiceImpl implements SingleLoginService { SysUser user = new SysUser(); user.setUserName(userName); user.setNickName(nickName); - user.setPassword("admin123"); + user.setPassword("Jinjihu@2024//**..."); user.setPhonenumber(phone); user.setEmail(email); Long[] roles = new Long[1]; @@ -84,7 +84,7 @@ public class SingleLoginServiceImpl implements SingleLoginService { // } } //新增user账号密码 - UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(userName, "admin123"); + UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(userName, "Jinjihu@2024//**..."); AuthenticationContextHolder.setContext(authenticationToken); // 该方法会去调用UserDetailsServiceImpl.loadUserByUsername authentication = authenticationManager.authenticate(authenticationToken); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/request/JEnterpriseContactRequest.java b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/request/JEnterpriseContactRequest.java index 279aef0..c057b59 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/request/JEnterpriseContactRequest.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/jjh/ent/entity/request/JEnterpriseContactRequest.java @@ -32,6 +32,12 @@ public class JEnterpriseContactRequest { @ApiModelProperty("常用联系人姓名") private String contactName; + /** + * 常用联系人手机号 + */ + @ApiModelProperty("常用联系人手机号") + private String contactPhone; + /** * 常用联系人职务 */ diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index 632a266..e8a200c 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -34,7 +34,7 @@ spring: # 国际化资源文件路径 basename: i18n/messages profiles: - active: internet + active: test # 文件上传 servlet: multipart: diff --git a/ruoyi-admin/src/main/resources/mapper/jjh/ent/JDevelopmentReportMapper.xml b/ruoyi-admin/src/main/resources/mapper/jjh/ent/JDevelopmentReportMapper.xml index d1e21f6..4efdd30 100644 --- a/ruoyi-admin/src/main/resources/mapper/jjh/ent/JDevelopmentReportMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/jjh/ent/JDevelopmentReportMapper.xml @@ -9,7 +9,9 @@ '-' AS years, count(*) AS count FROM - bms_enterprise_basic_info UNION + bms_enterprise_basic_info + where type not like concat('%','3','%') + UNION SELECT '规上企业总数' AS dataName, '-' AS years, @@ -33,7 +35,7 @@ WHEN '2' THEN '生活性服务业企业数' WHEN '3' THEN - '新兴服务业企业数' ELSE '限上批零住餐企业数' + '规上服务业企业数' ELSE '限上批零住餐企业数' END AS dataName, #{year} AS years, IF @@ -48,7 +50,8 @@ FROM j_services_list GROUP BY - services_type UNION SELECT + services_type + UNION SELECT a.dict_label AS dataName, #{year} AS years, IFNULL( rs.count, '-' ) AS count diff --git a/ruoyi-admin/src/main/resources/mapper/jjh/ent/JEnterpriseContactMapper.xml b/ruoyi-admin/src/main/resources/mapper/jjh/ent/JEnterpriseContactMapper.xml index 8314baa..52bae9b 100644 --- a/ruoyi-admin/src/main/resources/mapper/jjh/ent/JEnterpriseContactMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/jjh/ent/JEnterpriseContactMapper.xml @@ -16,6 +16,9 @@ and contact_name like concat('%',#{req.contactName},'%') + + and contact_phone like concat('%',#{req.contactPhone},'%') + and contact_office like concat('%',#{req.contactOffice},'%') diff --git a/ruoyi-admin/src/main/resources/template/5G+工业互联网奖补模版.xlsx b/ruoyi-admin/src/main/resources/template/5G+工业互联网奖补模版.xlsx deleted file mode 100644 index b667334..0000000 Binary files a/ruoyi-admin/src/main/resources/template/5G+工业互联网奖补模版.xlsx and /dev/null differ diff --git a/ruoyi-admin/src/main/resources/template/两业融合奖补模版.xlsx b/ruoyi-admin/src/main/resources/template/两业融合奖补模版.xlsx deleted file mode 100644 index 419c0e1..0000000 Binary files a/ruoyi-admin/src/main/resources/template/两业融合奖补模版.xlsx and /dev/null differ diff --git a/ruoyi-admin/src/main/resources/template/信用管理奖补模版.xlsx b/ruoyi-admin/src/main/resources/template/信用管理奖补模版.xlsx deleted file mode 100644 index 5434db6..0000000 Binary files a/ruoyi-admin/src/main/resources/template/信用管理奖补模版.xlsx and /dev/null differ diff --git a/ruoyi-admin/src/main/resources/template/做大做强奖补模版.xlsx b/ruoyi-admin/src/main/resources/template/做大做强奖补模版.xlsx deleted file mode 100644 index dc192a0..0000000 Binary files a/ruoyi-admin/src/main/resources/template/做大做强奖补模版.xlsx and /dev/null differ diff --git a/ruoyi-admin/src/main/resources/template/制造服务业有效投入奖补模版.xlsx b/ruoyi-admin/src/main/resources/template/制造服务业有效投入奖补模版.xlsx deleted file mode 100644 index 67c896d..0000000 Binary files a/ruoyi-admin/src/main/resources/template/制造服务业有效投入奖补模版.xlsx and /dev/null differ diff --git a/ruoyi-admin/src/main/resources/template/发展报告模板.docx b/ruoyi-admin/src/main/resources/template/发展报告模板.docx deleted file mode 100644 index efefc5b..0000000 --- a/ruoyi-admin/src/main/resources/template/发展报告模板.docx +++ /dev/null @@ -1,8 +0,0 @@ - 苏州工业园区服务业发展情况 - 2023年4月 - 一、总体实力显著增强 - 产业规模高速增长,综合贡献明显提升。 - 近年来,园区服务业保持持续增长态势,截至目前,园区服务业规上企业总计677家。2021年,园区实现服务业增加值1674.4亿元,占GDP比重达50.3%。2022年全年,实现服务业增加值1753.18亿元,占GDP比重49.9%。2023年1-3月,实现服务业增加值405.95亿元,同比增加4.2%。7大服务业核算行业(①多式联运和运输代理业、②装卸报运和仓储业、③互联网和相关服务、软件信息服务业、④租赁和商务服务业、⑤居民服务、修理和其他服务业、⑥文化、体育和娱乐业、⑦科学研究和技术服务业)2022年全年营收1311.71亿元,增速达22%;2023年1-3月实现营收348.34亿元,同比增速35%。根据苏州市新兴服务业行业分类(含金融服务、信息服务、物流服务、科技服务、商务中介服务、设计服务、人力资源服务、检验检测认证、低碳绿色服务、现代商贸、文化消费、旅游康养等12个类别),2022年园区新兴服务业营收达1488.57亿元,较上年增长24%。 - 二、产业结构持续优化 - 产业结构逐步优化,生产性服务占主导。经过多年发展,园区服务业产业结构逐渐多样化,生产性服务业与生活性服务业基本形成7:3的格局。2022年,生产性服务业增加值达到1199.5亿元,占服务业增加值比重达68.4%。截至目前,园区生产性服务业规上企业总计655家(含部分工业企业)。自2019年苏州市开展全市生产性服务业综合评价以来,园区已连续两年考评优秀。37家园区企业入选苏州市生产性服务业领军企业,占全市51%,位居全市第一,并成为苏州首个实现生产性服务业9大重点领域(信息技术服务、研发设计、金融服务、检验检测认证、知识产权服务、节能环保服务、人力资源服务、现代供应链管理、商务服务)全覆盖的区域。推动先进制造业和现代服务业深度融合发展,2022年初,园区获评江苏省两业融合深度融合试点地区。 - 城市活力不断提升,生活性服务显潜能。完成环金鸡湖商圈城市活力提升规划并正式发布,引导环金鸡湖商圈核心商业体差异定位、错位发展,金鸡湖景区获评第一批省级现代服务业高质量发展集聚示范区。积极引入北京及上海周边外溢资源,推动园区载体与国内优质品牌对接,加快发展"首店经济"(首店经济是指一个区域利用特有的资源优势,吸引国内外品牌在区域首次开设门店,目前园区大力推动"中国首店""苏州首店"落户园区)。通过开展"云购金鸡湖"等活动,持续打造金鸡湖系列IP,宣传园区特色消费场景,在后疫情时代不断激发生活性服务业发展潜能。 diff --git a/ruoyi-admin/src/main/resources/template/品牌打造奖补模版.xlsx b/ruoyi-admin/src/main/resources/template/品牌打造奖补模版.xlsx deleted file mode 100644 index 1d29c58..0000000 Binary files a/ruoyi-admin/src/main/resources/template/品牌打造奖补模版.xlsx and /dev/null differ diff --git a/ruoyi-admin/src/main/resources/template/场景开放奖补模版.xlsx b/ruoyi-admin/src/main/resources/template/场景开放奖补模版.xlsx deleted file mode 100644 index bbdb18b..0000000 Binary files a/ruoyi-admin/src/main/resources/template/场景开放奖补模版.xlsx and /dev/null differ diff --git a/ruoyi-admin/src/main/resources/template/平台建设奖补模版.xlsx b/ruoyi-admin/src/main/resources/template/平台建设奖补模版.xlsx deleted file mode 100644 index 6531293..0000000 Binary files a/ruoyi-admin/src/main/resources/template/平台建设奖补模版.xlsx and /dev/null differ diff --git a/ruoyi-admin/src/main/resources/template/物流发展奖补模版.xlsx b/ruoyi-admin/src/main/resources/template/物流发展奖补模版.xlsx deleted file mode 100644 index 9d671ab..0000000 Binary files a/ruoyi-admin/src/main/resources/template/物流发展奖补模版.xlsx and /dev/null differ diff --git a/ruoyi-admin/src/main/resources/template/载体建设奖补模版.xlsx b/ruoyi-admin/src/main/resources/template/载体建设奖补模版.xlsx deleted file mode 100644 index 42f577c..0000000 Binary files a/ruoyi-admin/src/main/resources/template/载体建设奖补模版.xlsx and /dev/null differ diff --git a/ruoyi-admin/src/main/resources/template/项目落户奖补模版.xlsx b/ruoyi-admin/src/main/resources/template/项目落户奖补模版.xlsx deleted file mode 100644 index 9d5964f..0000000 Binary files a/ruoyi-admin/src/main/resources/template/项目落户奖补模版.xlsx and /dev/null differ diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java index 998fd2b..edcab18 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java @@ -115,6 +115,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter { // .antMatchers("/common/**").permitAll() .antMatchers("/system/chief").permitAll() .antMatchers("/system/singlelogin/**").permitAll() + .antMatchers("/system/**").permitAll() // .antMatchers("/jjh/**").permitAll() diff --git a/项目落户奖补模版.xlsx b/项目落户奖补模版.xlsx new file mode 100644 index 0000000..2d669b1 Binary files /dev/null and b/项目落户奖补模版.xlsx differ