Browse Source

项目申报相关的修改

huZhiHao 5 years ago
parent
commit
2040df7954

+ 5 - 2
src/main/java/platform/modules/company/service/ProjectApplicationService.java

@@ -228,6 +228,8 @@ public class ProjectApplicationService extends BaseService<ProjectApplication> {
         //查询币种单位数据
         List<DictionaryItem> currencyList = dictionaryItemService.findListByTypeName(Constant.DictionaryType.CURRENCY_UNIT);
         modelMap.put("currencyList", currencyList);
+        List<DictionaryItem> typeList = dictionaryItemService.findListByTypeName(Constant.DictionaryType.PROJECT_TYPE);
+        modelMap.put("typeList", typeList);
 		/*//项目类型
         List<DictionaryItem> projectTypeList = dictionaryItemService.findListByTypeName(Constant.DictionaryType.PROJECT_APPLICATION_TYPE);
         modelMap.put("projectTypeList", projectTypeList);*/
@@ -589,7 +591,7 @@ public class ProjectApplicationService extends BaseService<ProjectApplication> {
         modelMap.put("isTechnical", project.getIs_technical());
         modelMap.put("projectApply", projectApply);
         if (projectApply.getProject_type() != null) {
-            List<Project> projects = projectService.findByType(projectApply.getProject_type().toString());
+            List<Project> projects = projectService.findByType(projectApply.getProject_type().toString(), null);
             modelMap.put("projectNameList", projects);
         }
         //项目类别
@@ -958,7 +960,8 @@ public class ProjectApplicationService extends BaseService<ProjectApplication> {
      * @param apply
      */
     private FileDown annexThree(ProjectApplication apply) {
-        final String annexName = "苏州高新区工业经济发展专项扶持资金申请表";
+        final String annexName = "苏州高新区工业经济发展专项扶持资金申报表";
+
 //        String annexTempUrl = "/Users/xikaiwen/Downloads/annex3.docx";
         String annexTempUrl = repositoryPath + "/docs/annex_template/annex3.docx";
 

+ 20 - 9
src/main/java/platform/modules/government/service/ProjectApplicationSynthesisService.java

@@ -7,6 +7,8 @@ import org.springframework.stereotype.Service;
 import platform.common.Constant;
 import platform.common.base.service.DictionaryItemService;
 import platform.common.util.BokeWordUtils;
+import platform.common.util.CommonUtils;
+import platform.common.util.DateUtil;
 import platform.common.util.ShiroUtils;
 import platform.modules.company.dao.ProjectApplicationDao;
 import platform.modules.company.entity.ProjectApplication;
@@ -20,9 +22,7 @@ import platform.modules.government.entity.Project;
 
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Objects;
+import java.util.*;
 
 /**
  * @author kevin
@@ -49,8 +49,12 @@ public class ProjectApplicationSynthesisService {
     @Autowired
     private DictionaryItemService dictionaryItemService;
 
+    @Autowired
+    private StreetService streetService;
+
     /**
      * 获取街道申报综合
+     *
      * @param paramApplication
      * @return
      */
@@ -69,7 +73,7 @@ public class ProjectApplicationSynthesisService {
 
         String year = paramApplication.getProject_year();
         if (year != null && !year.equals("")) {
-            paramApplication.setProject_year_date(year+"-01-01 00:00:00");
+            paramApplication.setProject_year_date(year + "-01-01 00:00:00");
         }
 
         List<ApplicationDto> applicationDtoList = projectApplicationService.findProjectApplicationSynthesis(paramApplication);
@@ -77,11 +81,11 @@ public class ProjectApplicationSynthesisService {
         int index = 0;
         List<String[]> tableList = new ArrayList<>();
         for (ApplicationDto applicationDto : applicationDtoList) {
-            index ++;
+            index++;
             int appId = Integer.parseInt(applicationDto.getId());
             int projectType = Integer.parseInt(applicationDto.getProject_type());
 
-            ProjectApplicationCompanyInfo  companyInfo = companyInfoService.findByApplyIdAndType(appId, Constant.DictionaryType.PROJECT_APPLICATION);
+            ProjectApplicationCompanyInfo companyInfo = companyInfoService.findByApplyIdAndType(appId, Constant.DictionaryType.PROJECT_APPLICATION);
             String contact = "";
             String phone = "";
             if (companyInfo != null) {
@@ -104,14 +108,21 @@ public class ProjectApplicationSynthesisService {
                     projectApplicationService.projectType(projectType) + "-" + applicationDto.getProject_name(),
                     contact,
                     phone,
-                    status_name,
+                    /*status_name*/"",
                     ""});
         }
-        final String annexName = "2019年苏州高新区工业经济发展专项扶持资金申报项目汇总表.docx";
+
+        Map<String, String> dataMap = new HashMap<>();
+        dataMap.put("year", paramApplication.getProject_year());
+        dataMap.put("streetName", streetService.getStreetName(ShiroUtils.getStreetId()));
+        dataMap.put("name", ShiroUtils.getUserName());
+        dataMap.put("date", DateUtil.getCurrentDateString("yyyy-MM-dd"));
+
+        String annexName = paramApplication.getProject_year() + "年苏州高新区工业经济发展专项扶持资金申报项目汇总表.docx";
 //        String annexTempUrl = "/Users/xikaiwen/Downloads/annex6.docx";
         String annexTempUrl = repositoryPath + "/docs/annex_template/annex6.docx";
         try {
-            new BokeWordUtils(annexTempUrl, tableList).write(response, annexName);
+            new BokeWordUtils(annexTempUrl, dataMap, tableList).write(response, annexName);
         } catch (IOException e) {
             e.printStackTrace();
         }

+ 8 - 2
src/main/java/platform/modules/government/service/ProjectService.java

@@ -16,6 +16,7 @@ import platform.common.base.model.DictionaryItem;
 import platform.common.base.service.BaseService;
 import platform.common.base.service.DictionaryItemService;
 import platform.common.exception.BaseException;
+import platform.common.util.CommonUtils;
 import platform.common.util.ShiroUtils;
 import platform.modules.government.dao.ProjectDao;
 import platform.modules.government.entity.Project;
@@ -138,11 +139,16 @@ public class ProjectService extends BaseService<Project> {
 	}
 
 	//根据类型查找项目
-	public List<Project> findByType(String type) {
+	public List<Project> findByType(String type,String isApplication) {
 		Example example = new Example(Project.class);
         Example.Criteria criteria = example.createCriteria();
         criteria.andEqualTo("del_flag", 0);
-        criteria.andEqualTo("project_type",type);
+        if(CommonUtils.isNotNull(type)){
+			criteria.andEqualTo("project_type",type);
+		}
+		if(CommonUtils.isNotNull(isApplication)){
+			criteria.andEqualTo("is_application",isApplication);
+		}
         example.setOrderByClause("create_time desc");
         PageHelper.clearPage();
         List<Project> list = this.selectByExample(example);

+ 144 - 141
src/main/java/platform/modules/government/web/ProjectController.java

@@ -4,6 +4,7 @@ import java.time.LocalDateTime;
 import java.util.List;
 
 import org.apache.commons.lang3.StringUtils;
+import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.ModelMap;
@@ -33,33 +34,33 @@ import platform.modules.sys.web.ResponseMessage;
 
 @Controller
 @RequestMapping("/project")
-public class ProjectController extends BaseController{
-	
-	@Autowired
-	private ProjectService projectService; 
-	
-	@Autowired
-	private ProjectMaterialService projectMaterialService;
-	
-	@Autowired
-	private ProjectTypeService projectTypeService;
-	
-	@Autowired
-	private DictionaryItemService dictionaryItemService;
-	
-	@OperationLog(value = "查看项目申报项目列表")
-	@RequestMapping("/list")
-    public String list(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, 
-    		String keyword , ModelMap modelMap){
-
-        PageInfo<Project> pageInfo = projectService.findPage(pageNum,PAGESIZE,keyword);
-
-        modelMap.put("keyword",keyword);
-        modelMap.put("pageInfo",pageInfo);
+public class ProjectController extends BaseController {
+
+    @Autowired
+    private ProjectService projectService;
+
+    @Autowired
+    private ProjectMaterialService projectMaterialService;
+
+    @Autowired
+    private ProjectTypeService projectTypeService;
+
+    @Autowired
+    private DictionaryItemService dictionaryItemService;
+
+    @OperationLog(value = "查看项目申报项目列表")
+    @RequestMapping("/list")
+    public String list(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
+                       String keyword, ModelMap modelMap) {
+
+        PageInfo<Project> pageInfo = projectService.findPage(pageNum, PAGESIZE, keyword);
+
+        modelMap.put("keyword", keyword);
+        modelMap.put("pageInfo", pageInfo);
         return BASE_GOVERNMENT_PATH + "project/list";
     }
-	
-	/**
+
+    /**
      * 跳转到项目添加页面
      */
     @GetMapping(value = "/add")
@@ -79,11 +80,11 @@ public class ProjectController extends BaseController{
      */
     @GetMapping("/getProjectByYear")
     @ResponseBody
-    public Object getProjectByYear(Integer year){
+    public Object getProjectByYear(Integer year) {
         List<ProjectType> projectTypes = projectTypeService.findByYear(year);
         return ResponseMessage.success("success", projectTypes);
     }
-    
+
     /**
      * 添加/编辑项目
      */
@@ -91,15 +92,15 @@ public class ProjectController extends BaseController{
     @ResponseBody
     @PostMapping(value = "/save")
     public ResponseMessage save(Project project) throws Exception {
-    	if(IsTooFrequently()) {
-			return ResponseMessage.error("操作过于频繁,请稍后再试!");
-    	}
-    	Boolean flag = true ;
-    	if(null != project.getId()) {
-    		projectService.updateProject(project);
-    	}else {
-    		projectService.saveProject(project);
-    	}
+        if (IsTooFrequently()) {
+            return ResponseMessage.error("操作过于频繁,请稍后再试!");
+        }
+        Boolean flag = true;
+        if (null != project.getId()) {
+            projectService.updateProject(project);
+        } else {
+            projectService.saveProject(project);
+        }
         if (flag) {
             return ResponseMessage.success("保存成功!");
         }
@@ -123,7 +124,7 @@ public class ProjectController extends BaseController{
         modelMap.put("projectTypeList", projectTypeList);
         return BASE_GOVERNMENT_PATH + "project/project_edit";
     }
-    
+
     /**
      * 删除项目
      */
@@ -133,83 +134,85 @@ public class ProjectController extends BaseController{
     public ResponseMessage delete(@PathVariable("id") String id) throws Exception {
 
         try {
-        	projectService.deleteProject(id);
-        	return ResponseMessage.success("删除成功!");
-        }catch(BaseException e) {
-        	return ResponseMessage.success(e.getMessage());
-        }catch(Exception e) {
-        	e.printStackTrace();
+            projectService.deleteProject(id);
+            return ResponseMessage.success("删除成功!");
+        } catch (BaseException e) {
+            return ResponseMessage.success(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
         }
         return ResponseMessage.error("删除失败!");
     }
-    
+
     /**
-	 * 检验项目名称是否存在
-	 *
-	 * @return
-	 */
-	@ResponseBody
-	@GetMapping(value = "/isExistProjectName")
-	public Boolean isExistProjectName(String id, String name ,String type, Integer year) throws Exception {
-		boolean flag = true;
-		log.debug("检验项目名称是否存在参数! id= {}, name= {}", id, name,type);
-		Project project= projectService.findProjectByName(name,type);
+     * 检验项目名称是否存在
+     *
+     * @return
+     */
+    @ResponseBody
+    @GetMapping(value = "/isExistProjectName")
+    public Boolean isExistProjectName(String id, String name, String type, Integer year) throws Exception {
+        boolean flag = true;
+        log.debug("检验项目名称是否存在参数! id= {}, name= {}", id, name, type);
+        Project project = projectService.findProjectByName(name, type);
 //		Project project= projectService.findProjectByYear(name, type, year);
 
-		if (null != project) {
-			if (StringUtils.isBlank(id)) {
-				flag = false;
-			} else {
-				if (project.getId() != (Integer.parseInt(id))) {
-					flag = false;
-				}
-			}
-		}
-		log.info("检验项目名称是否存在结果! flag = {}", flag);
-		return flag;
-	}
-
-	
+        if (null != project) {
+            if (StringUtils.isBlank(id)) {
+                flag = false;
+            } else {
+                if (project.getId() != (Integer.parseInt(id))) {
+                    flag = false;
+                }
+            }
+        }
+        log.info("检验项目名称是否存在结果! flag = {}", flag);
+        return flag;
+    }
+
+
     /**
      * 获取相应类型的项目
      */
-	@ResponseBody
+    @ResponseBody
     @GetMapping(value = "/getProjectByType")
-    public ResponseMessage getProjectByType(ModelMap modelMap,String type) {
-        List<Project> projects = projectService.findByType(type);
-        return ResponseMessage.success("查询成功",projects);
+    public ResponseMessage getProjectByType(@Param("type") String type, @Param("isApplication") String isApplication) {
+
+        List<Project> projects = projectService.findByType(type, isApplication);
+        return ResponseMessage.success("查询成功", projects);
     }
-	
-	/**
+
+    /**
      * 获取相应类型的项目
      */
-	@ResponseBody
+    @ResponseBody
     @GetMapping(value = "/getProjectMaterials")
-    public ResponseMessage getProjectMaterials(ModelMap modelMap,Integer id) {
-		List<ProjectMaterial> materials = projectMaterialService.findProjectMaterialByType(id);
-		modelMap.put("applyMaterials", materials);
-		return ResponseMessage.success("查询成功",modelMap);
+    public ResponseMessage getProjectMaterials(ModelMap modelMap, Integer id) {
+        List<ProjectMaterial> materials = projectMaterialService.findProjectMaterialByType(id);
+        modelMap.put("applyMaterials", materials);
+        return ResponseMessage.success("查询成功", modelMap);
     }
-	
-	/**
-	 * 项目类别列表页
-	 * @param pageNum
-	 * @param keyword
-	 * @param modelMap
-	 * @return
-	 */
-	@RequestMapping("/type/list")
-    public String typeList(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, 
-    		String keyword , ModelMap modelMap){
-
-        PageInfo<ProjectType> pageInfo = projectTypeService.findPage(pageNum,PAGESIZE,keyword);
-
-        modelMap.put("keyword",keyword);
-        modelMap.put("pageInfo",pageInfo);
+
+    /**
+     * 项目类别列表页
+     *
+     * @param pageNum
+     * @param keyword
+     * @param modelMap
+     * @return
+     */
+    @RequestMapping("/type/list")
+    public String typeList(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
+                           String keyword, ModelMap modelMap) {
+
+        PageInfo<ProjectType> pageInfo = projectTypeService.findPage(pageNum, PAGESIZE, keyword);
+
+        modelMap.put("keyword", keyword);
+        modelMap.put("pageInfo", pageInfo);
         return BASE_GOVERNMENT_PATH + "project/type_list";
     }
-	
-	/**
+
+    /**
      * 跳转到项目类别添加页面
      */
     @GetMapping(value = "type/add")
@@ -219,7 +222,7 @@ public class ProjectController extends BaseController{
         modelMap.put("projectSuperTypeList", projectSuperTypeList);
         return BASE_GOVERNMENT_PATH + "project/project_type_add";
     }
-    
+
     /**
      * 添加/编辑项目
      */
@@ -227,15 +230,15 @@ public class ProjectController extends BaseController{
     @ResponseBody
     @PostMapping(value = "type/save")
     public ResponseMessage saveType(ProjectType projectType) throws Exception {
-    	if(IsTooFrequently()) {
-			return ResponseMessage.error("操作过于频繁,请稍后再试!");
-    	}
-    	Boolean flag = true ;
-    	if(null != projectType.getId()) {
-    		projectTypeService.updateType(projectType);
-    	}else {
-    		projectTypeService.saveType(projectType);
-    	}
+        if (IsTooFrequently()) {
+            return ResponseMessage.error("操作过于频繁,请稍后再试!");
+        }
+        Boolean flag = true;
+        if (null != projectType.getId()) {
+            projectTypeService.updateType(projectType);
+        } else {
+            projectTypeService.saveType(projectType);
+        }
         if (flag) {
             return ResponseMessage.success("保存成功!");
         }
@@ -255,7 +258,7 @@ public class ProjectController extends BaseController{
         modelMap.put("projectSuperTypeList", projectSuperTypeList);
         return BASE_GOVERNMENT_PATH + "project/project_type_edit";
     }
-    
+
     /**
      * 删除项目
      */
@@ -265,47 +268,47 @@ public class ProjectController extends BaseController{
     public ResponseMessage deleteType(@PathVariable("id") Integer id) throws Exception {
 
         try {
-        	projectTypeService.deleteProjectType(id);
-        	return ResponseMessage.success("删除成功!");
-        }catch(BaseException e) {
-        	return ResponseMessage.success(e.getMessage());
-        }catch(Exception e) {
-        	e.printStackTrace();
+            projectTypeService.deleteProjectType(id);
+            return ResponseMessage.success("删除成功!");
+        } catch (BaseException e) {
+            return ResponseMessage.success(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
         }
         return ResponseMessage.error("删除失败!");
     }
-    
+
+    /**
+     * 检验项目类型是否存在
+     */
+    @ResponseBody
+    @GetMapping(value = "/isExistProjectTypeName")
+    public Boolean isExistProjectTypeName(String id, String name, String type, Integer project_year) throws Exception {
+        boolean flag = true;
+        log.debug("检验项目类型是否存在参数! id= {}, name= {}", id, name, type);
+        ProjectType projectType = projectTypeService.findProjectTypeByName(name, type, project_year);
+
+        if (null != projectType) {
+            if (StringUtils.isBlank(id)) {
+                flag = false;
+            } else {
+                if (projectType.getId() != (Integer.parseInt(id))) {
+                    flag = false;
+                }
+            }
+        }
+        log.info("检验项目名称是否存在结果! flag = {}", flag);
+        return flag;
+    }
+
     /**
-	 * 检验项目类型是否存在
-	 */
-	@ResponseBody
-	@GetMapping(value = "/isExistProjectTypeName")
-	public Boolean isExistProjectTypeName(String id, String name ,String type, Integer project_year) throws Exception {
-		boolean flag = true;
-		log.debug("检验项目类型是否存在参数! id= {}, name= {}", id, name,type);
-		ProjectType projectType= projectTypeService.findProjectTypeByName(name,type, project_year);
-
-		if (null != projectType) {
-			if (StringUtils.isBlank(id)) {
-				flag = false;
-			} else {
-				if (projectType.getId() != (Integer.parseInt(id))) {
-					flag = false;
-				}
-			}
-		}
-		log.info("检验项目名称是否存在结果! flag = {}", flag);
-		return flag;
-	}
-    
-	 /**
      * 获取相应大类的项目类型
      */
-	@ResponseBody
+    @ResponseBody
     @GetMapping(value = "/getProjectTypeBySuper")
     public ResponseMessage getProjectTypeBySuper(ModelMap modelMap, String superType) {
         List<ProjectType> projectTypes = projectTypeService.findBySuperType(superType);
-        return ResponseMessage.success("查询成功",projectTypes);
+        return ResponseMessage.success("查询成功", projectTypes);
     }
-	
+
 }

+ 22 - 9
src/main/resources/templates/admin/company/projectApplication/apply_add.html

@@ -216,13 +216,13 @@
                                                                           th:name="${'operationsInfo['+iterStat.index+'].added_value_tax'}"/>
                     </td>
                 </tr>
-<!--                <tr class="text-c">-->
-<!--                    <td>营业税(万元)</td>-->
-<!--                    <td th:each="item,iterStat: ${operationsInfo}"><input required type="text" class="input-text number"-->
-<!--                                                                          th:value="${item.business_tax}"-->
-<!--                                                                          th:name="${'operationsInfo['+iterStat.index+'].business_tax'}"/>-->
-<!--                    </td>-->
-<!--                </tr>-->
+                <!--                <tr class="text-c">-->
+                <!--                    <td>营业税(万元)</td>-->
+                <!--                    <td th:each="item,iterStat: ${operationsInfo}"><input required type="text" class="input-text number"-->
+                <!--                                                                          th:value="${item.business_tax}"-->
+                <!--                                                                          th:name="${'operationsInfo['+iterStat.index+'].business_tax'}"/>-->
+                <!--                    </td>-->
+                <!--                </tr>-->
                 <tr class="text-c">
                     <td>企业所得税(万元)</td>
                     <td th:each="item,iterStat: ${operationsInfo}"><input required type="text" class="input-text number"
@@ -242,6 +242,18 @@
 
             <div class="line">项目申报类别&nbsp;&nbsp;&nbsp;&nbsp; <a th:href="${instructionUrl} " target="_blank"
                                                                 style="color: #5b98dd;">&nbsp;&nbsp;下载</a></div>
+            <div class="row cl">
+                <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span><span class="c-red"></span>类型:</label>
+                <div class="formControls col-xs-8 col-sm-4">
+					<span class="select-box">
+					<select class="select" th:name="is_application" id="is_application" onChange="changeType(this)">
+						<option value="">-- 全部 --</option>
+						<option value="1">申请类</option>
+                        <option value="0">奖励类</option>
+					</select>
+					</span>
+                </div>
+            </div>
             <div class="row cl">
                 <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span><span class="c-red">*</span>项目大类:</label>
                 <div class="formControls col-xs-8 col-sm-4">
@@ -293,7 +305,7 @@
                     <table class="table table-border table-bordered table-bg table-hover">
                         <thead>
                         <tr class="text-c">
-                            <th>编号</th>
+                            <th width="10%">序号</th>
                             <th>附件</th>
                             <th>申请材料</th>
                         </tr>
@@ -461,7 +473,8 @@
             url: pagePath + "/project/getProjectByType",
             type: "get",
             data: {
-                'type': $("#project_type").val()
+                'type': $("#project_type").val(),
+                'isApplication': $("#is_application").val()
             },
             dataType: "json",
             success: function (result) {

+ 3 - 3
src/main/resources/templates/admin/company/projectApplication/apply_approve.html

@@ -176,12 +176,12 @@
 		                	<span>[[${item.added_value_tax}]]</span>
 		                </td>
 		           	</tr>
-		           <!--	<tr class="text-c" >
+		           	<tr class="text-c" hidden>
 		            	<td>营业税</td>
 		                <td th:each="item,iterStat: ${operationsInfo}">
 		                	<span>[[${item.business_tax}]]</span>
 		                </td>
-		           	</tr>-->
+		           	</tr>
 		           	<tr class="text-c" >
 		            	<td>企业所得税</td>
 		                <td th:each="item,iterStat: ${operationsInfo}">
@@ -223,7 +223,7 @@
 		        <table class="table table-border table-bordered table-bg table-hover">
 		            <thead>
 		            <tr class="text-c">
-		                <th>编号</th>
+						<th width="10%">序号</th>
 		                <th>附件</th>
 		                <th>申请材料</th>
 		            </tr>

+ 3 - 3
src/main/resources/templates/admin/company/projectApplication/apply_approve_check.html

@@ -179,12 +179,12 @@
                     <span>[[${item.added_value_tax}]]</span>
                 </td>
             </tr>
-            <!--<tr class="text-c">
+            <tr class="text-c" hidden>
                 <td>营业税</td>
                 <td th:each="item,iterStat: ${operationsInfo}">
                     <span>[[${item.business_tax}]]</span>
                 </td>
-            </tr>-->
+            </tr>
             <tr class="text-c">
                 <td>企业所得税</td>
                 <td th:each="item,iterStat: ${operationsInfo}">
@@ -228,7 +228,7 @@
                 <table class="table table-border table-bordered table-bg table-hover">
                     <thead>
                     <tr class="text-c">
-                        <th>编号</th>
+                        <th width="10%">序号</th>
                         <th>附件</th>
                         <th>申请材料</th>
                     </tr>

+ 3 - 3
src/main/resources/templates/admin/company/projectApplication/apply_check.html

@@ -178,12 +178,12 @@
                     <span>[[${item.added_value_tax}]]</span>
                 </td>
             </tr>
-           <!-- <tr class="text-c">
+            <tr class="text-c" hidden>
                 <td>营业税</td>
                 <td th:each="item,iterStat: ${operationsInfo}">
                     <span>[[${item.business_tax}]]</span>
                 </td>
-            </tr>-->
+            </tr>
             <tr class="text-c">
                 <td>企业所得税</td>
                 <td th:each="item,iterStat: ${operationsInfo}">
@@ -225,7 +225,7 @@
                 <table class="table table-border table-bordered table-bg table-hover">
                     <thead>
                     <tr class="text-c">
-                        <th>编号</th>
+                        <th width="10%">序号</th>
                         <th>附件</th>
                         <th>申请材料</th>
                     </tr>

+ 15 - 2
src/main/resources/templates/admin/company/projectApplication/apply_edit.html

@@ -269,6 +269,18 @@
                 </div>
             </div>
             <div class="line">项目申报类别&nbsp;&nbsp;&nbsp;&nbsp; <a th:href="${instructionUrl} " target="_blank" style="color: #5b98dd;">&nbsp;&nbsp;下载</a></div>
+            <div class="row cl">
+                <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span><span class="c-red"></span>类型:</label>
+                <div class="formControls col-xs-8 col-sm-4">
+					<span class="select-box">
+					<select class="select" th:name="is_application" id="is_application" onChange="changeType(this)">
+						<option value="">-- 全部 --</option>
+						<option value="1">申请类</option>
+                        <option value="0">奖励类</option>
+					</select>
+					</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-4">
@@ -350,7 +362,7 @@
                     <table class="table table-border table-bordered table-bg table-hover">
                         <thead>
                         <tr class="text-c">
-                            <th>编号</th>
+                            <th width="10%">序号</th>
                             <th>附件</th>
                             <th>申请材料</th>
                         </tr>
@@ -455,7 +467,8 @@
             url: pagePath + "/project/getProjectByType",
             type: "get",
             data: {
-                'type': $("#project_type").val()
+                'type': $("#project_type").val(),
+                'isApplication': $("#is_application").val()
             },
             dataType: "json",
             success: function (result) {

+ 116 - 99
src/main/resources/templates/admin/company/projectApplication/approve_list.html

@@ -8,141 +8,151 @@
 
 <body layout:fragment="content">
 
-<nav class="breadcrumb" th:action="@{/projectApprove/list/{isPendingAudit}(isPendingAudit=${isPendingAudit})}" th:method="post">
+<nav class="breadcrumb" th:action="@{/projectApprove/list/{isPendingAudit}(isPendingAudit=${isPendingAudit})}"
+     th:method="post">
     <i class="Hui-iconfont">&#xe67f;</i>
     首页
     <span th:unless="${is_label}" 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="刷新" >
+    <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="@{/projectApprove/list/{isPendingAudit}(isPendingAudit=${isPendingAudit})}" th:method="get" >
-	<div class="page-container">
-	    <div class="" style="padding: 0 15px;">
-	        <div class="row clearfix">
+<form id="myForm" th:action="@{/projectApprove/list/{isPendingAudit}(isPendingAudit=${isPendingAudit})}"
+      th:method="get">
+    <div class="page-container">
+        <div class="" style="padding: 0 15px;">
+            <div class="row clearfix">
 				<span class="select-box" style="width:170px;">
                 <select class="select" th:name="project_year" id="project_year" onchange="changeProjectByYear()">
                 	<option value="">-- 请选择年份 --</option>
                 </select>
 				</span>
-                <span class="select-box" style="width:170px;" >
-                <select class="select" th:name="project_type" id="project_type" >
-                	<option value="" >-- 请选择项目类别 --</option>
-                    <option th:each="item : ${projectTypeList}" th:value="${item.id}" 
-                    		th:text="${item.type_name}" th:selected = "${paramApplication.project_type}==${item.id}">
+                <span class="select-box" style="width:170px;">
+                <select class="select" th:name="project_type" id="project_type">
+                	<option value="">-- 请选择项目类别 --</option>
+                    <option th:each="item : ${projectTypeList}" th:value="${item.id}"
+                            th:text="${item.type_name}" th:selected="${paramApplication.project_type}==${item.id}">
                     </option>
                 </select>
 				</span>
-				<span th:if="${type=='2'}" class="select-box" style="width:170px;">
+                <span th:if="${type=='2'}" class="select-box" style="width:170px;">
 				<select class="select" th:name="approval_status" id="approval_status">
 					<option value="">-- 请选择单据状态 --</option>
 					<option th:each="item : ${statusList}" th:value="${item.value}"
-							th:text="${item.name}" th:selected="${paramApplication.approval_status}==${item.value}">
+                            th:text="${item.name}" th:selected="${paramApplication.approval_status}==${item.value}">
 					</option>
 				</select>
 				</span>
-				<label>项目名称:</label>
-                <input style="width:200px;" type="text" class="input-text" placeholder="请输入项目名称查询" id="project_name" name="project_name" th:value="${paramApplication.project_name}"/>
-				<label>申请企业:</label>
-                <input style="width:200px;" type="text" class="input-text" placeholder="请输入申请企业查询" id="company_name" name="company_name" th:value="${paramApplication.company_name}"/>
+                <label>项目名称:</label>
+                <input style="width:200px;" type="text" class="input-text" placeholder="请输入项目名称查询" id="project_name"
+                       name="project_name" th:value="${paramApplication.project_name}"/>
+                <label>申请企业:</label>
+                <input style="width:200px;" type="text" class="input-text" placeholder="请输入申请企业查询" id="company_name"
+                       name="company_name" th:value="${paramApplication.company_name}"/>
                 <div style="width:330px;display:inline-block; margin-top: 10px;">
-                	<label >申请日期:</label>
-                	<input style="width:120px;" type="text" class="input-text" id="startTime" name="apply_date_start" th:value="${paramApplication.apply_date_start}"/>
+                    <label>申请日期:</label>
+                    <input style="width:120px;" type="text" class="input-text" id="startTime" name="apply_date_start"
+                           th:value="${paramApplication.apply_date_start}"/>
                     <label>-</label>
-                    <input style="width:120px;" type="text" class="input-text" id="endTime" name="apply_date_end" th:value="${paramApplication.apply_date_end}"/>
+                    <input style="width:120px;" type="text" class="input-text" id="endTime" name="apply_date_end"
+                           th:value="${paramApplication.apply_date_end}"/>
                 </div>
-	            <input type="button" value="搜索" class="btn btn-primary" onclick="$('#myForm').submit();">
-	            
-	        </div>
-	    </div>
-	    <div class="cl pd-5 bg-1 bk-gray mt-20">
-			<span>
-                <a onclick="exportExcel()" 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 id="index" class="table table-border table-bordered table-bg table-hover" style="table-layout: fixed;width:100%;">
-		    <thead>
-		    <tr class="text-c">
-		        <!--<th style="width:0px;"></th>-->
-		        <th>申请单号</th>
-		        <th>申请企业</th>
-		        <!-- <th>所属街道/乡镇</th>
-		        <th>项目来源</th>
-		        <th>项目大类</th> -->
-		        <th>项目类别</th>
-		        <th>申报项目</th>
-		        <th>申请日期</th>
-		        <th>单据状态</th>
-		        <th>操作</th>
-		    </tr>
-		    </thead>
-		    <tbody>
-		    <tr class="text-c" th:each="model,iterStat:${pageInfo.list}" th:object="${model}">
-		        <td th:text="*{apply_no}"></td>
-		        <td th:text="*{company_name}"></td>
-		        <!-- <td th:text="*{street_name}"></td>
-		        <td th:text="*{project_source}"></td>
-		        <td th:text="*{project_super_type_name}"></td> -->
-		        <td th:text="*{project_type}"></td>
-		        <td th:text="*{project_name}"></td>
-		        <td th:text="*{apply_date}"></td>
-		        <td th:text="*{statedesc}"></td>
-		        <td class="td-manage">
-					<a title="查看"
+                <input type="button" value="搜索" class="btn btn-primary" onclick="$('#myForm').submit();">
+
+            </div>
+        </div>
+        <div class="cl pd-5 bg-1 bk-gray mt-20">
+            <th:block th:if="${isPendingAudit=='2'}">
+                <span>
+                    <a onclick="exportExcel()" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i> 导出</a>
+                </span>
+            </th:block>
+            <span class="r">共有数据:<strong th:text="${pageInfo.total}" id="total">54</strong> 条</span>
+        </div>
+        <!-- 表格 -->
+        <table id="index" class="table table-border table-bordered table-bg table-hover"
+               style="table-layout: fixed;width:100%;">
+            <thead>
+            <tr class="text-c">
+                <!--<th style="width:0px;"></th>-->
+                <th>申请单号</th>
+                <th>申请企业</th>
+                <!-- <th>所属街道/乡镇</th>
+                <th>项目来源</th>
+                <th>项目大类</th> -->
+                <th>项目类别</th>
+                <th>申报项目</th>
+                <th>申请日期</th>
+                <th>单据状态</th>
+                <th>操作</th>
+            </tr>
+            </thead>
+            <tbody>
+            <tr class="text-c" th:each="model,iterStat:${pageInfo.list}" th:object="${model}">
+                <td th:text="*{apply_no}"></td>
+                <td th:text="*{company_name}"></td>
+                <!-- <td th:text="*{street_name}"></td>
+                <td th:text="*{project_source}"></td>
+                <td th:text="*{project_super_type_name}"></td> -->
+                <td th:text="*{project_type}"></td>
+                <td th:text="*{project_name}"></td>
+                <td th:text="*{apply_date}"></td>
+                <td th:text="*{statedesc}"></td>
+                <td class="td-manage">
+                    <a title="查看"
                        th:onclick="'javascript:open_dialog(\'查看\',\'/projectApprove/check/'+*{id}+'\',\'800\',\'400\');'"
                        class="ml-5" style="text-decoration:none">查看</a>
                     <a th:if="${isPendingAudit=='1'}" title="审核"
                        th:onclick="'javascript:open_dialog(\'审核\',\'/projectApprove/approve/'+*{id}+'\',\'800\',\'400\');'"
                        class="ml-5" style="text-decoration:none">审核</a>
-		        </td>
-		    </tr>
-		    </tbody>
-		</table>
-	    <div th:replace="admin/common/page :: page"></div>
-	</div>
+                </td>
+            </tr>
+            </tbody>
+        </table>
+        <div th:replace="admin/common/page :: page"></div>
+    </div>
 </form>
 <script type="text/javascript" th:src="@{/js/company/project_application/approve_list.js}"></script>
 <script type="text/javascript" th:src="@{/js/common/page.js}"></script>
 <script th:inline="javascript">
 
-    onload = function ()
-    {
-        var year=new Date().getFullYear(); //获取当前年份
+    onload = function () {
+        var year = new Date().getFullYear(); //获取当前年份
 
-        var sel = document.getElementById ('project_year');//获取select下拉列表
-        for ( var i = 2018; i < year+3; i++)//循环添加2006到当前年份加3年的每个年份依次添加到下拉列表
+        var sel = document.getElementById('project_year');//获取select下拉列表
+        for (var i = 2018; i < year + 3; i++)//循环添加2006到当前年份加3年的每个年份依次添加到下拉列表
         {
-            var option = document.createElement ('option');
+            var option = document.createElement('option');
             option.value = i;
-            var txt = document.createTextNode (i);
-            option.appendChild (txt);
-            sel.appendChild (option);
+            var txt = document.createTextNode(i);
+            option.appendChild(txt);
+            sel.appendChild(option);
         }
 
         var selectYear = [[${paramApplication.project_year}]];
         console.log(selectYear);
-        if (selectYear){
-            $("#project_year").find("option:contains('"+selectYear+"')").attr("selected",true);
+        if (selectYear) {
+            $("#project_year").find("option:contains('" + selectYear + "')").attr("selected", true);
             // changeProjectByYear(selectYear);
         }
     };
-    function changeProjectByYear(){
+
+    function changeProjectByYear() {
         $.ajax({
-            url :pagePath+"/project/getProjectByYear",
-            type : "get",
-            data : {
+            url: pagePath + "/project/getProjectByYear",
+            type: "get",
+            data: {
                 'year': $("#project_year").val()
             },
-            dataType : "json",
+            dataType: "json",
             success: function (result) {
                 if (result.success) {
                     var types = result.obj;
                     $("#project_type").find("option").remove();
                     var options = '<option value="" >-- 请选择项目类别 --</option>';
-                    for(var i=0;i< types.length;i++){
-                        options += '<option value="'+types[i].id+'" >'+types[i].type_name+'</option>';
+                    for (var i = 0; i < types.length; i++) {
+                        options += '<option value="' + types[i].id + '" >' + types[i].type_name + '</option>';
                     }
                     $("#project_type").append(options);
                 } else {
@@ -155,18 +165,18 @@
         });
     }
 
-	laydate.render({
-	    elem: '#startTime', //指定元素
-	    format: 'yyyy-MM-dd',
-	    type: 'date',
-	    //showBottom: false
-	});
-	laydate.render({
-	    elem: '#endTime', //指定元素
-	    format: 'yyyy-MM-dd',
-	    type: 'date',
-	    //showBottom: false
-	});
+    laydate.render({
+        elem: '#startTime', //指定元素
+        format: 'yyyy-MM-dd',
+        type: 'date',
+        //showBottom: false
+    });
+    laydate.render({
+        elem: '#endTime', //指定元素
+        format: 'yyyy-MM-dd',
+        type: 'date',
+        //showBottom: false
+    });
 
     function exportExcel() {
 
@@ -177,14 +187,21 @@
         var apply_date_start = $('#startTime').val();
         var apply_date_end = $('#endTime').val();
         var approval_status = $('#approval_status').val();
+        if (approval_status == undefined) {
+            approval_status = "";
+        }
         var project_year = $('#project_year').val();
+        if (project_year == "") {
+            errorMessage("请选择导出年份!")
+            return;
+        }
 
         window.open(encodeURI(pagePath + "/synthesis/exoprt/2?project_type=" + project_type +
-			"&project_name=" + project_name + "&company_name=" + company_name +
+            "&project_name=" + project_name + "&company_name=" + company_name +
             "&apply_date_start=" + apply_date_start + "&apply_date_end=" + apply_date_end +
-            "&approval_status="+ approval_status + "&project_year=" + project_year));
+            "&approval_status=" + approval_status + "&project_year=" + project_year));
     }
-	
+
 </script>
 </body>
 </html>

+ 2 - 2
src/main/resources/templates/admin/government/project/apply_approve.html

@@ -177,12 +177,12 @@
                     <span>[[${item.added_value_tax}]]</span>
                 </td>
             </tr>
-           <!-- <tr class="text-c">
+            <tr class="text-c" hidden>
                 <td>营业税</td>
                 <td th:each="item,iterStat: ${operationsInfo}">
                     <span>[[${item.business_tax}]]</span>
                 </td>
-            </tr>-->
+            </tr>
             <tr class="text-c">
                 <td>企业所得税</td>
                 <td th:each="item,iterStat: ${operationsInfo}">

+ 2 - 2
src/main/resources/templates/admin/government/project/apply_view.html

@@ -177,12 +177,12 @@
                     <span>[[${item.added_value_tax}]]</span>
                 </td>
             </tr>
-            <!--<tr class="text-c">
+            <tr class="text-c" hidden>
                 <td>营业税</td>
                 <td th:each="item,iterStat: ${operationsInfo}">
                     <span>[[${item.business_tax}]]</span>
                 </td>
-            </tr>-->
+            </tr>
             <tr class="text-c">
                 <td>企业所得税</td>
                 <td th:each="item,iterStat: ${operationsInfo}">