Browse Source

Merge branch 'dev'

bingowarden 4 years ago
parent
commit
036c4ffdee
25 changed files with 1068 additions and 34 deletions
  1. 16 16
      pom.xml
  2. 7 2
      src/main/java/platform/RootApplication.java
  3. 3 0
      src/main/java/platform/common/base/service/BaseService.java
  4. 3 0
      src/main/java/platform/common/base/service/TemplateService.java
  5. 4 0
      src/main/java/platform/common/util/DateUtil.java
  6. 107 0
      src/main/java/platform/common/util/ExcelUtil.java
  7. 154 0
      src/main/java/platform/common/util/ReadExcelUtil.java
  8. 103 0
      src/main/java/platform/common/util/holiday/HolidayExcelParser.java
  9. 91 0
      src/main/java/platform/common/util/holiday/HolidayExcelTemplateUtil.java
  10. 10 2
      src/main/java/platform/modules/company/service/StockLandApproveService.java
  11. 209 0
      src/main/java/platform/modules/government/web/SupermeController.java
  12. 9 9
      src/main/java/platform/modules/oauth/LoginCallback.java
  13. 31 1
      src/main/java/platform/modules/sys/service/SysConfigService.java
  14. 5 0
      src/main/java/platform/modules/sys/shiro/filter/MyRequestContextFilter.java
  15. 1 0
      src/main/java/platform/modules/sys/web/FileUploadController.java
  16. 1 1
      src/main/resources/static/h-ui/lib/kindeditor-4.1.7/kindeditor.js
  17. 0 1
      src/main/resources/static/js/super/dictionary/dictionary_type_add.js
  18. 59 0
      src/main/resources/static/js/super/holiday/holiday_add.js
  19. 53 0
      src/main/resources/static/js/super/holiday/holiday_list.js
  20. 8 0
      src/main/resources/templates/admin/common/left.html
  21. 2 1
      src/main/resources/templates/admin/government/content_add.html
  22. 129 0
      src/main/resources/templates/admin/super/holiday/holiday_add.html
  23. 61 0
      src/main/resources/templates/admin/super/holiday/holiday_list.html
  24. 1 1
      src/main/resources/templates/admin/super/industry/industry_file_list.html
  25. 1 0
      src/main/resources/templates/left.html

+ 16 - 16
pom.xml

@@ -21,7 +21,7 @@
         <thymeleaf.version>3.0.0.RELEASE</thymeleaf.version>
         <thymeleaf-layout-dialect.version>2.0.0</thymeleaf-layout-dialect.version>
         <shiro.version>1.3.2</shiro.version>
-<!--        <poi.version>3.9</poi.version>-->
+        <poi.version>3.17</poi.version>
         <thymeleaf-shiro.version>2.0.0</thymeleaf-shiro.version>
         <hutool.version>2.16.0</hutool.version>
         <commons-io.version>2.4</commons-io.version>
@@ -250,21 +250,21 @@
             <version>1.2.44</version>
         </dependency>
         <!-- poi office -->
-<!--        <dependency>-->
-<!--            <groupId>org.apache.poi</groupId>-->
-<!--            <artifactId>poi</artifactId>-->
-<!--            <version>${poi.version}</version>-->
-<!--        </dependency>-->
-<!--        <dependency>-->
-<!--            <groupId>org.apache.poi</groupId>-->
-<!--            <artifactId>poi-ooxml</artifactId>-->
-<!--            <version>${poi.version}</version>-->
-<!--        </dependency>-->
-<!--        <dependency>-->
-<!--            <groupId>org.apache.poi</groupId>-->
-<!--            <artifactId>poi-ooxml-schemas</artifactId>-->
-<!--            <version>${poi.version}</version>-->
-<!--        </dependency>-->
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi</artifactId>
+            <version>${poi.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi-ooxml</artifactId>
+            <version>${poi.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi-ooxml-schemas</artifactId>
+            <version>${poi.version}</version>
+        </dependency>
 
         <dependency>
             <groupId>org.projectlombok</groupId>

+ 7 - 2
src/main/java/platform/RootApplication.java

@@ -38,8 +38,10 @@ public class RootApplication
     /**
      * 文件上传临时路径
      */
-    /*@Bean
+    /*
+    @Bean
     MultipartConfigElement multipartConfigElement() {
+
         MultipartConfigFactory factory = new MultipartConfigFactory();
         String location = System.getProperty("user.dir") + "/data/tmp";
         File tmpFile = new File(location);
@@ -48,5 +50,8 @@ public class RootApplication
         }
         factory.setLocation(location);
         return factory.createMultipartConfig();
-    }*/
+
+    }
+
+     */
 }

+ 3 - 0
src/main/java/platform/common/base/service/BaseService.java

@@ -7,8 +7,10 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 import platform.common.base.mapper.BaseMapper;
 import platform.common.base.model.BaseEntity;
+import platform.common.base.model.Template;
 import platform.common.util.DateUtil;
 import platform.common.util.ShiroUtils;
+import platform.modules.sys.entity.SysConfig;
 import tk.mybatis.mapper.entity.Example;
 
 import java.util.Date;
@@ -248,4 +250,5 @@ public abstract class BaseService<T extends BaseEntity> {
         return SecureUtil.md5().digestHex(pass.trim());
     }
 
+
 }

+ 3 - 0
src/main/java/platform/common/base/service/TemplateService.java

@@ -57,6 +57,9 @@ public class TemplateService extends BaseService<Template> {
             criteria.andLike("name", "%" +  WebUtil.covertData(keyword) + "%");
         }
         criteria2.andEqualTo("del_flag", 0);
+
+
+
         //倒序
         example.and(criteria2);
         example.setOrderByClause("create_time desc");

+ 4 - 0
src/main/java/platform/common/util/DateUtil.java

@@ -607,4 +607,8 @@ public class DateUtil {
 
         return days;
     }
+
+    protected static int absoluteDay(Calendar cal, boolean use1904windowing) {
+        return 0;
+    }
 }

+ 107 - 0
src/main/java/platform/common/util/ExcelUtil.java

@@ -0,0 +1,107 @@
+package platform.common.util;
+
+import org.apache.poi.hssf.usermodel.HSSFCell;
+import org.apache.poi.hssf.usermodel.HSSFDateUtil;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.xssf.usermodel.XSSFCell;
+
+import java.text.DecimalFormat;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.logging.Logger;
+
+
+public class ExcelUtil {
+    private static final Logger logger = Logger.getLogger(String.valueOf(ExcelUtil.class));
+    public static final String OFFICE_EXCEL_2003_POSTFIX = "xls";
+    public static final String OFFICE_EXCEL_2010_POSTFIX = "xlsx";
+    public static final String EMPTY = "";
+    public static final String POINT = ".";
+    public static SimpleDateFormat sdf =   new SimpleDateFormat("yyyy/MM/dd");
+
+    /**
+     * 获得path的后缀名
+     * @param path
+     * @return
+     */
+    public static String getPostfix(String path){
+        if(path==null || EMPTY.equals(path.trim())){
+            return EMPTY;
+        }
+        if(path.contains(POINT)){
+            return path.substring(path.lastIndexOf(POINT)+1,path.length());
+        }
+        return EMPTY;
+    }
+    /**
+     * 单元格格式
+     * @param hssfCell
+     * @return
+     */
+    @SuppressWarnings({ "static-access", "deprecation" })
+    public static String getHValue(HSSFCell hssfCell){
+        if (hssfCell.getCellType() == hssfCell.CELL_TYPE_BOOLEAN) {
+            return String.valueOf(hssfCell.getBooleanCellValue());
+        } else if (hssfCell.getCellType() == hssfCell.CELL_TYPE_NUMERIC) {
+            String cellValue = "";
+            if(HSSFDateUtil.isCellDateFormatted(hssfCell)){
+                Date date = HSSFDateUtil.getJavaDate(hssfCell.getNumericCellValue());
+                cellValue = sdf.format(date);
+            }else{
+                DecimalFormat df = new DecimalFormat("#.##");
+                cellValue = df.format(hssfCell.getNumericCellValue());
+                String strArr = cellValue.substring(cellValue.lastIndexOf(POINT)+1,cellValue.length());
+                if(strArr.equals("00")){
+                    cellValue = cellValue.substring(0, cellValue.lastIndexOf(POINT));
+                }
+            }
+            return cellValue;
+        } else {
+            return String.valueOf(hssfCell.getStringCellValue());
+        }
+    }
+    /**
+     * 单元格格式
+     * @param xssfCell
+     * @return
+     */
+    public static String getXValue(XSSFCell xssfCell){
+        if (xssfCell.getCellType() == Cell.CELL_TYPE_BOOLEAN) {
+            return String.valueOf(xssfCell.getBooleanCellValue());
+        } else if (xssfCell.getCellType() == Cell.CELL_TYPE_NUMERIC) {
+            String cellValue = "";
+            if(XSSFDateUtil.isCellDateFormatted(xssfCell)){
+                Date date = XSSFDateUtil.getJavaDate(xssfCell.getNumericCellValue());
+                cellValue = sdf.format(date);
+            }else{
+                DecimalFormat df = new DecimalFormat("#.##");
+                cellValue = df.format(xssfCell.getNumericCellValue());
+                String strArr = cellValue.substring(cellValue.lastIndexOf(POINT)+1,cellValue.length());
+                if(strArr.equals("00")){
+                    cellValue = cellValue.substring(0, cellValue.lastIndexOf(POINT));
+                }
+            }
+            return cellValue;
+        } else {
+            return String.valueOf(xssfCell.getStringCellValue());
+        }
+    }
+    /**
+     * 自定义xssf日期工具类
+     *
+     */
+    static class XSSFDateUtil extends DateUtil {
+        protected static int absoluteDay(Calendar cal, boolean use1904windowing) {
+            return DateUtil.absoluteDay(cal, use1904windowing);
+        }
+
+        public static boolean isCellDateFormatted(XSSFCell xssfCell) {
+            return false;
+        }
+
+        public static Date getJavaDate(double numericCellValue) {
+            return null;
+        }
+    }
+}

+ 154 - 0
src/main/java/platform/common/util/ReadExcelUtil.java

@@ -0,0 +1,154 @@
+package platform.common.util;
+
+import org.apache.poi.hssf.usermodel.HSSFCell;
+import org.apache.poi.hssf.usermodel.HSSFRow;
+import org.apache.poi.hssf.usermodel.HSSFSheet;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.xssf.usermodel.XSSFCell;
+import org.apache.poi.xssf.usermodel.XSSFRow;
+import org.apache.poi.xssf.usermodel.XSSFSheet;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ReadExcelUtil {
+    public int totalRows; //sheet中总行数
+    public static int totalCells; //每一行总单元格数
+    /**
+     * read the Excel .xlsx,.xls
+     * @param file jsp中的上传文件
+     * @return
+     * @throws IOException
+     */
+    public List<ArrayList<String>> readExcel(MultipartFile file) throws IOException {
+        if(file==null||ExcelUtil.EMPTY.equals(file.getOriginalFilename().trim())){
+            return null;
+        }else{
+            String postfix = ExcelUtil.getPostfix(file.getOriginalFilename());
+            if(!ExcelUtil.EMPTY.equals(postfix)){
+                if(ExcelUtil.OFFICE_EXCEL_2003_POSTFIX.equals(postfix)){
+                    return readXls(file);
+                }else if(ExcelUtil.OFFICE_EXCEL_2010_POSTFIX.equals(postfix)){
+                    return readXlsx(file);
+                }else{
+                    return null;
+                }
+            }
+        }
+        return null;
+    }
+    /**
+     * read the Excel 2010 .xlsx
+     * @param file
+     * @return
+     * @throws IOException
+     */
+    @SuppressWarnings("deprecation")
+    public List<ArrayList<String>> readXlsx(MultipartFile file){
+        List<ArrayList<String>> list = new ArrayList<ArrayList<String>>();
+        // IO流读取文件
+        InputStream input = null;
+        XSSFWorkbook wb = null;
+        ArrayList<String> rowList = null;
+        try {
+            input = file.getInputStream();
+            // 创建文档
+            wb = new XSSFWorkbook(input);
+            //读取sheet(页)
+            for(int numSheet=0;numSheet<wb.getNumberOfSheets();numSheet++){
+                XSSFSheet xssfSheet = wb.getSheetAt(numSheet);
+                if(xssfSheet == null){
+                    continue;
+                }
+                totalRows = xssfSheet.getLastRowNum();
+                //读取Row,从第4行开始
+                for(int rowNum = 1;rowNum <= totalRows;rowNum++){
+                    XSSFRow xssfRow = xssfSheet.getRow(rowNum);
+                    if(xssfRow!=null){
+                        rowList = new ArrayList<String>();
+                        totalCells = xssfRow.getLastCellNum();
+                        //读取列,从第一列开始
+                        for(int c=0;c<=totalCells+1;c++){
+                            XSSFCell cell = xssfRow.getCell(c);
+                            if(cell==null){
+                                rowList.add(ExcelUtil.EMPTY);
+                                continue;
+                            }
+                            rowList.add(ExcelUtil.getXValue(cell).trim());
+                        }
+                        list.add(rowList);
+                    }
+                }
+            }
+            return list;
+        } catch (IOException e) {
+            e.printStackTrace();
+        } finally{
+            try {
+                input.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+        return null;
+
+    }
+    /**
+     * read the Excel 2003-2007 .xls
+     * @param file
+     * @return
+     * @throws IOException
+     */
+    public List<ArrayList<String>> readXls(MultipartFile file){
+        List<ArrayList<String>> list = new ArrayList<ArrayList<String>>();
+        // IO流读取文件
+        InputStream input = null;
+        HSSFWorkbook wb = null;
+        ArrayList<String> rowList = null;
+        try {
+            input = file.getInputStream();
+            // 创建文档
+            wb = new HSSFWorkbook(input);
+            //读取sheet(页)
+            for(int numSheet=0;numSheet<wb.getNumberOfSheets();numSheet++){
+                HSSFSheet hssfSheet = wb.getSheetAt(numSheet);
+                if(hssfSheet == null){
+                    continue;
+                }
+                totalRows = hssfSheet.getLastRowNum();
+                //读取Row,从第二行开始
+                for(int rowNum = 1;rowNum <= totalRows;rowNum++){
+                    HSSFRow hssfRow = hssfSheet.getRow(rowNum);
+                    if(hssfRow!=null){
+                        rowList = new ArrayList<String>();
+                        totalCells = hssfRow.getLastCellNum();
+                        //读取列,从第一列开始
+                        for(short c=0;c<=totalCells+1;c++){
+                            HSSFCell cell = hssfRow.getCell(c);
+                            if(cell==null){
+                                rowList.add(ExcelUtil.EMPTY);
+                                continue;
+                            }
+                            rowList.add(ExcelUtil.getHValue(cell).trim());
+                        }
+                        list.add(rowList);
+                    }
+                }
+            }
+            return list;
+        } catch (IOException e) {
+            e.printStackTrace();
+        } finally{
+            try {
+                input.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+        return null;
+    }
+}

+ 103 - 0
src/main/java/platform/common/util/holiday/HolidayExcelParser.java

@@ -0,0 +1,103 @@
+package platform.common.util.holiday;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+public class HolidayExcelParser {
+    private static final Logger logger = LoggerFactory.getLogger(HolidayExcelParser.class);
+
+    public static Map<String, String> parse(List<ArrayList<String>> readExcel) {
+        Map<String, String> mapRet = new HashMap<>();
+
+        String ret = "{";
+        // 逐行变换
+        // {"0101":2,"0102":2,"0103":2,
+        for (int i = 0; i < readExcel.size(); i++) {
+            Map<String, String> mapRowParseRet = parse1Row(readExcel.get(i));
+            if ("false".equals(mapRowParseRet.get("valid"))){
+                mapRet.put("valid","false");
+                mapRet.put("errMsg", "err: 第" + (i + 1 ) + "行有错误:" + mapRowParseRet.get("errMsg"));
+                return mapRet;
+            }
+
+            if ("".equals(mapRowParseRet.get("data")))
+            {
+                break;
+            }
+
+            ret += mapRowParseRet.get("data");
+
+            ret += ",";
+        }
+
+        ret = ret.substring(0,ret.length()-1);
+
+        ret += "}";
+
+        mapRet.put("valid","true");
+        mapRet.put("data",ret);
+        return mapRet;
+    }
+
+    private static Map<String, String> parse1Row(ArrayList<String> strListRow) {
+        Map<String, String> mapRet = new HashMap<>();
+        String retData = "";
+        if (null == strListRow.get(1) || "".equals(strListRow.get(1)))
+        {
+            mapRet.put("valid","true");
+            mapRet.put("data",retData);
+            return mapRet;
+        }
+
+        Map<String, String> mapCheck = checkRowData(strListRow);
+
+        if ("false".equals(mapCheck.get("valid")))
+        {
+            mapRet.put("valid","false");
+            mapRet.put("errMsg",mapCheck.get("errMsg"));
+            return mapRet;
+        }
+
+        retData += "\"" + parse1RowDayInfo(strListRow.get(1)) + "\"";
+        retData += ":" + parse1RowHolidayType(strListRow.get(2));
+
+        mapRet.put("valid","true");
+        mapRet.put("data",retData);
+        return mapRet;
+    }
+
+    private static Map<String, String> checkRowData(ArrayList<String> strListRow) {
+        Map<String, String> mapRet = new HashMap<>();
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
+        try {
+            Date dtTemp = simpleDateFormat.parse(strListRow.get(1));
+        } catch (ParseException e) {
+            e.printStackTrace();
+            mapRet.put("valid","false");
+            mapRet.put("errMsg","日期格式错误!");
+            return mapRet;
+        }
+
+        if (!"1".equals(strListRow.get(2)) && !"2".equals(strListRow.get(2)))
+        {
+            mapRet.put("valid","false");
+            mapRet.put("errMsg","假日类型错误!只能是”1“或”2“");
+            return mapRet;
+        }
+
+        mapRet.put("valid","true");
+        return mapRet;
+    }
+
+    private static String parse1RowHolidayType(String s) {
+        return s;
+    }
+
+    private static String parse1RowDayInfo(String s) {
+        return s.substring(5,7) + s.substring(8,10);
+    }
+}

+ 91 - 0
src/main/java/platform/common/util/holiday/HolidayExcelTemplateUtil.java

@@ -0,0 +1,91 @@
+package platform.common.util.holiday;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import platform.common.Constant;
+import platform.common.base.model.DictionaryItem;
+import platform.common.base.model.Template;
+import platform.common.base.service.DictionaryItemService;
+import platform.common.base.service.TemplateService;
+import platform.modules.government.entity.Attachment;
+import platform.modules.government.service.AttachmentService;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Component
+public class HolidayExcelTemplateUtil {
+
+    @Autowired
+    private AttachmentService attachmentService;
+
+    @Autowired
+    private TemplateService templateService;
+
+    @Autowired
+    private DictionaryItemService dictionaryItemService;
+
+    private final String DICT_ITEM_VALUE = "60dc644d-456d-4665-8dca-fbd7a2195592";
+
+    public Map<String, String> getTemplateFileInfo() {
+        Map<String,String> ret = new HashMap<>();
+
+        try {
+            int id = this.loadTemalateId();
+
+            if(-1 == id)
+            {
+                return ret;
+            }
+
+            List<Attachment> attachments = attachmentService.selectByIdAndBusinessId(Constant.Attachment.TEMPLATE, id, null);
+            if (null != attachments && attachments.size()>0) {
+                ret.put("templateFileUrl",attachments.get(0).getFile_url());
+                ret.put("templateFileName",attachments.get(0).getFile_name());
+            }
+        }catch (Exception e)
+        {
+            e.printStackTrace();
+        }
+
+        return ret;
+    }
+
+    private int loadTemalateId() throws Exception{
+        //
+        int itemId = this.loadTemalateItemId();
+
+        if (-1 == itemId)
+        {
+            return -1;
+        }
+
+        Template entCondition = new Template();
+        entCondition.setItem_id(itemId);
+        Template entRet;
+        entRet = templateService.findOne(entCondition);
+
+        if(null == entRet)
+        {
+            return -1;
+        }
+
+        return entRet.getId();
+    }
+
+    private int loadTemalateItemId() {
+        DictionaryItem entCond = new DictionaryItem();
+        entCond.setValue(this.DICT_ITEM_VALUE);
+
+        DictionaryItem entRet = dictionaryItemService.findOne(entCond);
+
+        if (null == entRet)
+        {
+            return -1;
+        }
+        return entRet.getId();
+    }
+
+
+}

+ 10 - 2
src/main/java/platform/modules/company/service/StockLandApproveService.java

@@ -613,11 +613,19 @@ public class StockLandApproveService extends BaseService<StockLand> {
                     try {
                         StockLand stockLand = stockLandService.findById(apply.getId());
                         Integer userid = stockLand.getCreate_by();
-                        CompanyInfoDto company = companyService.findByUserId(userid);
+                        // by leeking 2022-01-10
+                        // 3表联合查询:y_company、y_company_contact、z_user,有时候y_company_contact表没有对应企业的联系方式记录
+                        // 查询结果就是空,导致后面语句:company.getCompany_name()抛异常;不能正常完成审核流程,
+                        // 且这里查询结果company只使用以此;因此,只要后面company.getCompany_name(),能找到替代的,就可以废弃这里的查询
+                        //CompanyInfoDto company = companyService.findByUserId(userid);
                         Street street = streetService.findById(ShiroUtils.getStreetId());
 
                         Map<String, String> params = new HashMap<>();
-                        params.put("company_name", company.getCompany_name());
+
+                        // by leeking 2022-01-10
+                        // 仅仅是company_name,apply对象肯定是有的,可以替代原来的companly.getCompany_name()
+                        //params.put("company_name", company.getCompany_name());
+                        params.put("company_name", apply.getCompany_name());
                         params.put("street_name", street.getName());
 
                         String tempCode = Constant.SMS_TemplateCode.STOCKLAND_LOCAL_AUDIT;

+ 209 - 0
src/main/java/platform/modules/government/web/SupermeController.java

@@ -1,11 +1,15 @@
 package platform.modules.government.web;
 
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.ModelMap;
 import org.springframework.web.bind.annotation.*;
@@ -13,6 +17,7 @@ import org.springframework.web.bind.annotation.*;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 
+import org.springframework.web.multipart.MultipartFile;
 import platform.common.Constant;
 import platform.common.annotation.OperationLog;
 import platform.common.base.controller.BaseController;
@@ -22,6 +27,9 @@ import platform.common.base.model.Template;
 import platform.common.base.service.DictionaryItemService;
 import platform.common.base.service.DictionaryTypeService;
 import platform.common.base.service.TemplateService;
+import platform.common.util.ReadExcelUtil;
+import platform.common.util.holiday.HolidayExcelParser;
+import platform.common.util.holiday.HolidayExcelTemplateUtil;
 import platform.modules.build.entity.BuildInfo;
 import platform.modules.build.service.BuildInfoService;
 import platform.modules.build.service.CompanyService;
@@ -34,9 +42,14 @@ import platform.modules.government.service.AttachmentService;
 import platform.modules.government.service.BuildTypeService;
 import platform.modules.government.service.StreetService;
 import platform.modules.government.service.UserService;
+import platform.modules.sys.entity.SysConfig;
+import platform.modules.sys.service.SysConfigService;
 import platform.modules.sys.web.ResponseMessage;
 import tk.mybatis.mapper.entity.Example;
 
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+
 @Controller
 @RequestMapping(value = "/super")
 public class SupermeController extends BaseController {
@@ -67,6 +80,12 @@ public class SupermeController extends BaseController {
 
 	@Autowired
 	private AttachmentService attachmentService;
+
+	@Autowired
+	private SysConfigService sysConfigService;
+
+	@Resource
+	private HolidayExcelTemplateUtil holidayExcelTemplateUtil;
 	
 	@GetMapping(value = "")
 	public String list() {
@@ -1004,4 +1023,194 @@ public class SupermeController extends BaseController {
 		return BASE_SUPER_PATH + "industry/industry_file_list";
 
 	}
+
+
+	/**
+	 * 假日信息管理列表展示
+	 *
+	 * @param pageNum
+	 * @param modelMap
+	 * @return
+	 * @throws Exception
+	 */
+	@OperationLog(value = "读取假日信息列表")
+	@GetMapping(value = "/holidayList")
+	public String holidayList(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
+							   ModelMap modelMap) throws Exception {
+
+		PageInfo<SysConfig> pageInfo = sysConfigService.findPage(pageNum, PAGESIZE,"year_");
+		modelMap.put("pageInfo", pageInfo);
+		//modelMap.put("fileUrl", setFileUrl());
+		return BASE_SUPER_PATH + "holiday/holiday_list";
+	}
+
+	/**
+	 * 添加假日信息
+	 * @param pageNum
+	 * @param modelMap
+	 * @return
+	 */
+	@OperationLog(value = "新增假日信息")
+	@GetMapping(value = "/holiday/add")
+	public String addHolidayPage(ModelMap modelMap) {
+
+		Map<String,String> mapTemplateFileInfo = holidayExcelTemplateUtil.getTemplateFileInfo();
+		//modelMap.put("templateFileUrl",mapTemplateFileInfo.get("templateFileUrl"));
+		//modelMap.put("templateFileName",mapTemplateFileInfo.get("templateFileName"));
+		modelMap.putAll(mapTemplateFileInfo);
+		modelMap.put("fileUrl", setFileUrl());
+		return BASE_SUPER_PATH + "holiday/holiday_add";
+	}
+
+	/**
+	 * 修改相应假日信息
+	 * @param modelMap
+	 * @return
+	 */
+	@OperationLog(value = "编辑假日信息")
+	@GetMapping(value = "/holiday/edit/{id}")
+	public String editHolidayPage(@PathVariable("id") Integer id,ModelMap modelMap) {
+		SysConfig holidayInfo = sysConfigService.findById(id);
+
+		modelMap.put("id", holidayInfo.getId());
+		modelMap.put("configName", holidayInfo.getConfigName());
+		modelMap.put("configKey", holidayInfo.getConfigKey());
+		modelMap.put("configValue", holidayInfo.getConfigValue());
+
+
+		Map<String,String> mapTemplateFileInfo = holidayExcelTemplateUtil.getTemplateFileInfo();
+		//modelMap.put("templateFileUrl",mapTemplateFileInfo.get("templateFileUrl"));
+		//modelMap.put("templateFileName",mapTemplateFileInfo.get("templateFileName"));
+		modelMap.putAll(mapTemplateFileInfo);
+		modelMap.put("fileUrl", setFileUrl());
+		return BASE_SUPER_PATH + "holiday/holiday_add";
+	}
+
+
+	@OperationLog(value = "节假日信息【物理】删除")
+	@ResponseBody
+	@DeleteMapping(value = "/holiday/delete/{id}")
+	public ResponseMessage deleteHoliday(@PathVariable("id") int id) {
+		/*
+		SysConfig ent2Del = sysConfigService.findById(id);
+		if (null == ent2Del) {
+			return ResponseMessage.error("未找到相应的假日信息");
+		}
+		ent2Del.setDel_flag(true);
+		sysConfigService.update(ent2Del);
+
+		 */
+
+		sysConfigService.deleteById(id);
+
+		return ResponseMessage.success("删除成功!");
+	}
+
+	@OperationLog(value = "导入假日信息")
+	@PostMapping(value = "/holiday/import")
+	public ResponseEntity<String> importHoliday(HttpServletRequest request, @RequestParam("file") MultipartFile file) throws IOException {
+		Map<String, String> mapParseRet;
+
+		String retInfo = "";
+		if (file.isEmpty()) {
+			return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("文件不能为空");
+		}
+
+		List<ArrayList<String>> readExcel = new ArrayList<>();
+		try {
+			//调用util方法拿到解析的数据集合
+			readExcel = new ReadExcelUtil().readExcel(file);
+			// 进一步解析
+
+			mapParseRet = HolidayExcelParser.parse(readExcel);
+
+			if ("true".equals(mapParseRet.get("valid")))
+			{
+				retInfo = mapParseRet.get("data");
+			}else
+			{
+				retInfo = mapParseRet.get("errMsg");
+			}
+
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+
+		return ResponseEntity.status(HttpStatus.OK).body(retInfo);
+
+	}
+
+
+	@OperationLog(value = "假日信息保存")
+	@ResponseBody
+	@PostMapping(value = "/holiday/save")
+	public ModelMap saveHoliday(@RequestParam(value = "id", defaultValue = "-1") int id,
+									   @RequestParam(value = "configName", defaultValue = "") String configName,
+									   @RequestParam(value = "configKey", defaultValue = "") String configKey,
+									   @RequestParam(value = "configValue", defaultValue = "") String configValue) throws Exception {
+		ModelMap messagesMap = new ModelMap();
+
+		if(IsTooFrequently()) {
+			messagesMap.put("status", FAILURE);
+			messagesMap.put("message", "操作过于频繁,请稍后再试!");
+			return messagesMap;
+		}
+
+		SysConfig ent2Save;
+		if (-1 < id)
+		{
+			ent2Save = sysConfigService.findById(id);
+		}else{
+			ent2Save = new SysConfig();
+		}
+
+		ent2Save.setConfigName(configName);
+		ent2Save.setConfigKey(configKey);
+		ent2Save.setConfigValue(configValue.replace("&quot;","\""));
+		ent2Save.setDel_flag(false);
+
+
+		if (-1 < id)
+		{
+			sysConfigService.update(ent2Save);
+		}else{
+			sysConfigService.save(ent2Save);
+		}
+
+		messagesMap.put("status", SUCCESS);
+		messagesMap.put("message", "保存成功!");
+		return messagesMap;
+
+	}
+
+
+	/**
+	 * 同一年份假日信息是否存在
+	 *
+	 * @param configKey
+	 * @return
+	 */
+	@OperationLog(value = "同一年份假日信息是否存在")
+	@ResponseBody
+	@GetMapping(value = "/isExistHoliday")
+	public Boolean isExistHoliday(String id, String configKey) throws Exception {
+		boolean flag = true;
+		log.debug("检验同一年份假日信息是否存在参数! id= {}, configKey= {}", id, configKey);
+		SysConfig entExist = sysConfigService.getByKey(configKey);
+
+		if (null != entExist) {
+			if (StringUtils.isBlank(id)) {
+				flag = false;
+
+			} else {
+				if (entExist.getId() != (Integer.parseInt(id))) {
+					flag = false;
+				}
+			}
+
+		}
+		log.info("检验假日信息年份是否存在结果! flag = {}", flag);
+		return flag;
+	}
 }
+

+ 9 - 9
src/main/java/platform/modules/oauth/LoginCallback.java

@@ -47,11 +47,11 @@ public class LoginCallback extends BaseController {
 
     @PostMapping(value = "")
     public String validateLogin(String SAMLResponse) {
-        log.info("======================log leeking begin========================");
+
         log.info("! SAMLResponse = {}", SAMLResponse);
         //System.out.println("===============");
         User user = ShiroUtils.getCurrentUser();
-        log.info("======================LoginCallback.validateLogin.step1========================");
+
         User existUser = userDao.findByNickName(user.getNick_name(), Constant.UserType.GOVERNMENT);
         if (null == existUser) {
             user.setUser_type(Constant.UserType.GOVERNMENT);
@@ -59,24 +59,24 @@ public class LoginCallback extends BaseController {
             userService.saveSelectiveSso(user);
         }
 
-        log.info("======================LoginCallback.validateLogin.step2========================");
+
         UsernamePasswordToken token = new UsernamePasswordToken();
         token.setUsername(user.getNick_name());
-        log.info("======================LoginCallback.validateLogin.step3========================");
+
         //token.setPassword(resetPassword.toCharArray());
         token.setSSO(true);
-        log.info("======================LoginCallback.validateLogin.step4========================");
+
         SecurityUtils.getSubject().login(token);
 
-        log.info("======================LoginCallback.validateLogin.step5========================");
+
         // 注入token到cookie
         String tokenString = userService.createToken();
         tokenString = tokenString.replace("Bearer ", "");
         log.info("tokenstring: {}", tokenString);
-        log.info("======================LoginCallback.validateLogin.step6========================");
+
         CookieUtil.createWebCookie(response, "token", tokenString, 7200);
-        log.info("======================LoginCallback.validateLogin.step7========================");
-        log.info("======================log leeking end========================");
+
+
         return "redirect:/admin/home";
 
 }

+ 31 - 1
src/main/java/platform/modules/sys/service/SysConfigService.java

@@ -1,12 +1,18 @@
 package platform.modules.sys.service;
 
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
+import platform.common.base.model.Template;
 import platform.common.base.service.BaseService;
 import platform.common.exception.BaseException;
 import platform.common.util.CommonUtils;
+import platform.common.util.WebUtil;
 import platform.common.util.holiday.WorkDayHandler;
 import platform.modules.sys.entity.SysConfig;
+import tk.mybatis.mapper.entity.Example;
 
 import java.util.List;
 
@@ -54,12 +60,13 @@ public class SysConfigService extends BaseService<SysConfig> {
         return this.findOne(sysConfig);
     }
 
-    private SysConfig getByKey(String key) {
+    public SysConfig getByKey(String key) {
         SysConfig sysConfig = new SysConfig();
         sysConfig.setConfigKey(key);
         return this.findOne(sysConfig);
     }
 
+
     public String getYearWorkDay(String year) {
         SysConfig configEntity = getByYear(year);
         if (CommonUtils.isNull(configEntity)) {
@@ -75,4 +82,27 @@ public class SysConfigService extends BaseService<SysConfig> {
         }
         return configEntity.getConfigValue();
     }
+
+
+
+    public PageInfo<SysConfig> findPage(Integer pageNum, Integer pageSize,String keyword)
+    {
+        Example example = new Example(SysConfig.class);
+        Example.Criteria criteria = example.createCriteria();
+        Example.Criteria criteria2 = example.createCriteria();
+
+        if (StringUtils.isNotBlank(keyword)) {
+            criteria.andLike("configKey", keyword + "%");
+        }
+
+        criteria2.andEqualTo("del_flag", 0);
+        //倒序
+        example.and(criteria2);
+        example.setOrderByClause("config_key desc");
+        PageHelper.startPage(pageNum, pageSize);
+        List<SysConfig> retList = this.selectByExample(example);
+
+
+        return new PageInfo<SysConfig>(retList);
+    }
 }

+ 5 - 0
src/main/java/platform/modules/sys/shiro/filter/MyRequestContextFilter.java

@@ -43,6 +43,7 @@ public class MyRequestContextFilter extends RequestContextFilter {
     }
 
     private boolean processSSO(HttpServletRequest request, HttpServletResponse response) {
+
         String reqURI = request.getServletPath();
         System.out.println(reqURI);
         if ("/admin/index".equals(reqURI)) {//访问主页,强制SSO
@@ -74,7 +75,9 @@ public class MyRequestContextFilter extends RequestContextFilter {
                 logger.info("sessionIndex from SAMLResponse: " + sessionIndex);
                 String ssoId = (String) map.get("ssoId");
                 Map<String, Object> sessionMap = new HashMap<>();
+
                 if (!StringUtils.isEmpty(sessionIndex)) {
+
                     sessionMap.put("sessionIndex", sessionIndex);
                     User user = getUser(ssoId);
                     ShiroUtils.setCurrentUser(user);
@@ -83,7 +86,9 @@ public class MyRequestContextFilter extends RequestContextFilter {
                         logger.info("Can not parse userId from SAMLResponse.");
                     }
                     sessionMap.put("userId", userId);
+
                     Cookie cookie = new Cookie("ssoDemo", JSON.toJSONString(sessionMap));
+
                     cookie.setMaxAge(36000);
                     cookie.setPath("/");
                     response.addCookie(cookie);

+ 1 - 0
src/main/java/platform/modules/sys/web/FileUploadController.java

@@ -21,6 +21,7 @@ import org.springframework.web.multipart.MultipartHttpServletRequest;
 import platform.common.base.controller.BaseController;
 import platform.common.util.FileValidateUtil;
 import platform.common.util.HttpClientUtil;
+import platform.common.util.ReadExcelUtil;
 import platform.modules.government.entity.Attachment;
 import platform.modules.government.entity.FileDown;
 import platform.modules.government.service.AttachmentService;

+ 1 - 1
src/main/resources/static/h-ui/lib/kindeditor-4.1.7/kindeditor.js

@@ -8106,7 +8106,7 @@ KindEditor.plugin('multiimage', function(K) {
 		formatUploadUrl = K.undef(self.formatUploadUrl, true),
 		uploadJson = K.undef(self.uploadJson, self.basePath + 'php/upload_json.php'),
 		imgPath = self.pluginsPath + 'multiimage/images/',
-		imageSizeLimit = K.undef(self.imageSizeLimit, '1MB'),
+		imageSizeLimit = K.undef(self.imageSizeLimit, '5MB'),
 		imageFileTypes = K.undef(self.imageFileTypes, '*.jpg;*.gif;*.png'),
 		imageUploadLimit = K.undef(self.imageUploadLimit, 20),
 		filePostName = K.undef(self.filePostName, 'imgFile'),

+ 0 - 1
src/main/resources/static/js/super/dictionary/dictionary_type_add.js

@@ -1,5 +1,4 @@
 $(function () {
-
     $("#form-dictionarytype-add").validate({
         rules: {
             name: {

+ 59 - 0
src/main/resources/static/js/super/holiday/holiday_add.js

@@ -0,0 +1,59 @@
+$(function () {
+	$("#form-holiday-add").validate({
+        rules: {
+            configKey: {
+                required: true,
+                minlength: 1,
+                maxlength: 9,
+                remote: {
+                    url: pagePath + "/super/isExistHoliday",
+                    type: "get",
+                    data: {
+                        configKey: function () {
+                            return $("#configKey").val();
+                        },
+                        id: function () {
+                            return $("#id").val();
+                        }
+                    }
+                }
+            },
+            configName: {
+                minlength: 1,
+                maxlength: 20
+            }
+        },
+        messages: {
+            configKey: {
+                remote: "该年份假日信息已存在!"
+            }
+        },
+        onkeyup: false,
+        focusCleanup: true,
+        focusInvalid:false,
+        success: "valid",
+        submitHandler: function (form) {
+            $(form).ajaxSubmit({
+                type: 'post',
+                url: pagePath + "/super/holiday/save",
+                dataType: "json",
+                success: function (data) {
+                    if (data.status == "success") {
+                        succeedMessage(data.message);
+                        setTimeClose();
+                    } else {
+                        // $(form).find(":submit").attr("disabled", false);
+                        errorMessage(data.message);
+                    }
+                },
+                error: function () {
+                    errorMessage('系统错误!');
+                }
+            });
+            return false; // 非常重要,如果是false,则表明是不跳转,在本页上处理,也就是ajax,如果是非false,则传统的form跳转。
+        }
+    });
+	
+});
+
+

+ 53 - 0
src/main/resources/static/js/super/holiday/holiday_list.js

@@ -0,0 +1,53 @@
+$(function () {
+
+});
+
+/*
+ 参数解释:
+ title	标题
+ url		请求的url
+ id		需要操作的数据id
+ w		弹出层宽度(缺省调默认值)
+ h		弹出层高度(缺省调默认值)
+ */
+/*模板-增加*/
+function holiday_add(title,url,w,h){
+    layer_show(title,pagePath+url,w,h);
+    //var index = layer_show(title,pagePath+url,w,h);
+    //layer.full(index);
+}
+
+/*模板--编辑*/
+function holiday_edit(title,url,w,h){
+    layer_show(title,pagePath+url,w,h);
+	//var index = layer_show(title,pagePath+url,w,h);
+    //layer.full(index);
+}
+
+/*模板--删除*/
+function holiday_del( url){
+	
+    layer.confirm('确认要删除吗?',function(index){
+        //此处请求后台程序,下方是成功后的前台处理……
+        $.ajax({
+            type:"DELETE",
+            dataType:"json",
+            url: pagePath+url,
+            data:{
+                "timestamp":new Date().getTime()
+            },
+            success: function (result) {
+                if (result.success) {
+                    smileMessage(result.message)
+                    setTime();
+
+                } else {
+                    errorMessage(result.message);
+                }
+            },
+         	error: function () {
+         		errorMessage('系统错误!');
+         	}
+        });
+    });
+}

+ 8 - 0
src/main/resources/templates/admin/common/left.html

@@ -1691,6 +1691,14 @@
                 </ul>
             </dd>
         </dl>
+        <!-- /////////////////grip begin by leeking 2022-01-04/////////////////////// --->
+        <dl>
+            <dt>
+                <span> <a th:attr="data-href=@{/super/holidayList}" data-title="节假日管理">节假日管理</a></span>
+                <i class="icon-arrow"></i>
+            </dt>
+        </dl>
+        <!-- /////////////////grip end by leeking 2022-01-04/////////////////////// --->
         <dl>
             <dt class="titCellTop">
                 <span> <a th:attr="data-href=@{/admin/log/list}" data-title="日志管理">日志管理</a></span>

+ 2 - 1
src/main/resources/templates/admin/government/content_add.html

@@ -155,6 +155,7 @@
             }
         });
     });
+    /*
     // 初始化图片上传
     var options = {
         auto: false,
@@ -172,7 +173,7 @@
         //fileNumLimit: 3
     };
     var webUploadPicture = new $WebUploadPicture(options);
-
+    */
     /**
      * 取消
      */

+ 129 - 0
src/main/resources/templates/admin/super/holiday/holiday_add.html

@@ -0,0 +1,129 @@
+<!DOCTYPE HTML>
+<html xmlns:th="http://www.thymeleaf.org"
+      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
+      layout:decorate="~{admin/common/common}">
+<head>
+    <title>节假日管理</title>
+</head>
+
+<body layout:fragment="content">
+
+<article class="page-container">
+    <form class="form form-horizontal" id="form-holiday-add">
+		<input type="hidden" id="id" th:value="${id}" th:name="id"/>
+		<div class="row cl">
+			<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>名称:</label>
+			<div class="formControls col-xs-8 col-sm-9">
+				<input type="text" class="input-text" maxlength="20" required value="" th:value="${configName}"  th:id="configName" th:name="configName"/>
+			</div>
+		</div>
+		<div class="row cl">
+			<label class="form-label col-xs-4 col-sm-2"></label>
+			<div class="formControls col-xs-8 col-sm-9">
+				<span class="c-red">名称不能超过20个汉字</span>
+			</div>
+		</div>
+		<div class="row cl">
+			<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>年份:</label>
+			<div class="formControls col-xs-8 col-sm-9">
+				<input type="text" class="input-text" maxlength="9"   required value="" th:value="${configKey}?${configKey}:year_"  th:id="configKey" th:name="configKey"/>
+			</div>
+		</div>
+
+		<div class="row cl">
+			<label class="form-label col-xs-4 col-sm-2"></label>
+			<div class="formControls col-xs-8 col-sm-9">
+				<span class="c-red">年份格式:year_xxxx(比如:year_2022)</span>
+			</div>
+		</div>
+
+		<div class="row cl">
+			<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>假日数据:</label>
+			<div class="formControls col-xs-8 col-sm-9">
+				<input type="text" class="input-text" readOnly="true" required value="" th:value="${configValue}"  th:id="configValue" th:name="configValue"/>
+			</div>
+		</div>
+		<div class="row cl">
+			<label class="form-label col-xs-4 col-sm-2"></label>
+			<div class="formControls col-xs-8 col-sm-9">
+				<span class="c-red">假日数据:请下载模板文件,按模板文件格式制作数据,完成后导入。</span>
+			</div>
+		</div>
+
+		<div class="row cl">
+			<label class="form-label col-xs-4 col-sm-2"><span>模板文件:</span></label>
+			<div class="formControls col-xs-8 col-sm-9">
+				<a th:href="${fileUrl} + ${templateFileUrl}" target="_blank">[[${templateFileName}]]</a>
+			</div>
+		</div>
+
+		<div class="row cl">
+			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
+				<div class="uploader-thum-container">
+					<div id="fileListPre" style="display:none;">
+					</div>
+					<div id="filePicker">导入假日信息</div>
+				</div>
+			</div>
+		</div>
+
+
+		<div class="row cl">
+			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
+				<button class="btn btn-primary radius" type="submit" ><i class="Hui-iconfont">&#xe632;</i>
+					保存
+				</button>
+
+			</div>
+		</div>
+
+    </form>
+</article>
+<script type="text/javascript" th:src="@{/h-ui/lib/webuploader/0.1.5/webuploader.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/super/holiday/holiday_add.js}"></script>
+<script th:inline="javascript">
+	/**
+	 * 初始化上传控件
+	 */
+	var options = {
+		uploadBtnId: '#filePicker',
+		picturePreId: 'fileListPre',
+		hiddenPictureUrl: 'img',
+		hiddenPictureName: 'imgName',
+		width: 81,
+		height: 81,
+		fileSizeLimit: 100 * 1024 * 1024,
+		fileSingleSizeLimit: 100 * 1024 * 1024,
+		//fileNumLimit: 1,
+		serverUrl:pagePath + '/super/holiday/import'
+	};
+
+	var webUploadDoc = new $WebUploadDoc(options);
+	var objUploader = webUploadDoc.init();
+
+
+	// 文件上传成功,给item添加成功class, 用样式标记上传成功。
+	objUploader.on('uploadSuccess', function (file, response) {
+
+		if(response._raw.substring(0, 4) == "err:")
+		{
+			errorMessage("导入失败:" + response._raw);
+		}else{
+			succeedMessage("导入成功!");
+			$("#configValue").val(response._raw);
+		}
+
+	});
+
+    /**
+     * 取消
+     */
+    function removeIframe() {
+        var index = parent.layer.getFrameIndex(window.name);
+        parent.layer.close(index);
+    }
+    
+
+</script>
+</body>
+</html>

+ 61 - 0
src/main/resources/templates/admin/super/holiday/holiday_list.html

@@ -0,0 +1,61 @@
+<!DOCTYPE HTML>
+<html xmlns:th="http://www.thymeleaf.org"
+      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
+      layout:decorate="~{admin/common/common}">
+<head>
+    <title>节假日配置信息列表</title>
+</head>
+
+<body layout:fragment="content">
+<nav class="breadcrumb">
+   <i class="Hui-iconfont">&#xe67f;</i>
+    首页
+    <span class="c-gray en">&gt;</span>节假日管理
+    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" >
+        <i class="Hui-iconfont">&#xe68f;</i>
+    </a>
+</nav>
+
+<form id="myForm" th:action="@{/super/holidayList}" th:method="get">
+    <div class="page-container">
+
+        <div class="cl pd-5 bg-1 bk-gray mt-20">
+            <span class="l">
+                <a href="javascript:;" th:onclick="'javascript:holiday_add(\'新增假日信息\',\'/super/holiday/add\',\'800\',\'500\');'" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i>新增</a>
+            </span>
+            <span class="r">共有数据:<strong th:text="${pageInfo?.total}" id="total">54</strong> 条</span>
+        </div>
+        <table  class="table table-border table-bordered table-bg table-hover">
+            <thead>
+            <tr class="text-c">
+                <th>编号</th>
+                <th>名称</th>
+                <th>年份</th>
+                <th>配置信息</th>
+                <th width="100">操作</th>
+            </tr>
+            </thead>
+            <tbody>
+            <tr class="text-c" th:each="model,iterStat:${pageInfo.list}" th:object="${model}">
+                <td><input type="hidden" th:id="*{id}" value="" name=""/><span th:text="${iterStat.index+1}" ></span></td>
+                <td th:text="*{configName}"></td>
+                <td th:text="*{configKey}"></td>
+                <td th:text="*{configValue}"></td>
+                <td class="td-manage">
+                    <a title="修改" href="javascript:;"  th:onclick="'javascript:holiday_edit(\'修改假日数据\',\'/super/holiday/edit/'+*{id}+'\',\'800\',\'500\');'" class="ml-5" style="text-decoration:none">修改</a>
+                    <a title="删除" href="javascript:;"  th:onclick="'javascript:holiday_del(\'/super/holiday/delete/'+*{id}+'\');'" class="ml-5" style="text-decoration:none">删除</a>
+                </td>
+            </tr>
+            </tbody>
+        </table>
+        <div th:replace="admin/common/page :: page"></div>
+    </div>
+</form>
+
+<script type="text/javascript" th:src="@{/js/common/page.js}"></script>
+<script type="text/javascript" th:src="@{/js/super/holiday/holiday_list.js}"></script>
+<script th:inline="javascript">
+
+</script>
+</body>
+</html>

+ 1 - 1
src/main/resources/templates/admin/super/industry/industry_file_list.html

@@ -78,7 +78,7 @@
 </form>
 
 <script type="text/javascript" th:src="@{/js/common/page.js}"></script>
-<script type="text/javascript" th:src="@{/js/super/template/template_list.js}"></script>
+<script type="text/javascript" th:src="@{/js/super/template/holiday_list.js}"></script>
 <script type="text/javascript" th:src="@{/js/company/companyInfoManage/layui.all.js}"></script>
 <script th:inline="javascript">
     $(function () {

+ 1 - 0
src/main/resources/templates/left.html

@@ -1581,6 +1581,7 @@
                 </ul>
             </dd>
         </dl>
+
         <dl>
             <dt>
                 <span> <a th:attr="data-href=@{/admin/log/list}" data-title="日志管理">日志管理</a></span>