浏览代码

项目业绩库功能

徐滕 4 小时之前
父节点
当前提交
97b1d987d2
共有 15 个文件被更改,包括 3104 次插入0 次删除
  1. 41 0
      src/main/java/com/jeeplus/modules/projectPerformanceDatabase/dao/ProjectPerformanceDao.java
  2. 16 0
      src/main/java/com/jeeplus/modules/projectPerformanceDatabase/dao/ProjectPerformanceDatabaseDao.java
  3. 38 0
      src/main/java/com/jeeplus/modules/projectPerformanceDatabase/entity/ProjectPerformance.java
  4. 48 0
      src/main/java/com/jeeplus/modules/projectPerformanceDatabase/entity/ProjectPerformanceDatabase.java
  5. 73 0
      src/main/java/com/jeeplus/modules/projectPerformanceDatabase/service/ProjectPerformanceDatabaseService.java
  6. 130 0
      src/main/java/com/jeeplus/modules/projectPerformanceDatabase/service/ProjectPerformanceService.java
  7. 191 0
      src/main/java/com/jeeplus/modules/projectPerformanceDatabase/web/ProjectPerformanceController.java
  8. 143 0
      src/main/java/com/jeeplus/modules/projectPerformanceDatabase/web/ProjectPerformanceDatabaseController.java
  9. 20 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectRecords.java
  10. 631 0
      src/main/resources/mappings/modules/projectPerformanceDatabase/ProjectPerformanceDao.xml
  11. 123 0
      src/main/resources/mappings/modules/projectPerformanceDatabase/ProjectPerformanceDatabaseDao.xml
  12. 92 0
      src/main/webapp/webpage/modules/projectPerformanceDatabase/projectPerformanceDatabaseForm.jsp
  13. 248 0
      src/main/webapp/webpage/modules/projectPerformanceDatabase/projectPerformanceDatabaseList.jsp
  14. 117 0
      src/main/webapp/webpage/modules/projectPerformanceDatabase/projectPerformanceForm.jsp
  15. 1193 0
      src/main/webapp/webpage/modules/projectPerformanceDatabase/projectPerformanceList.jsp

+ 41 - 0
src/main/java/com/jeeplus/modules/projectPerformanceDatabase/dao/ProjectPerformanceDao.java

@@ -0,0 +1,41 @@
+package com.jeeplus.modules.projectPerformanceDatabase.dao;
+
+import com.jeeplus.common.persistence.CrudDao;
+import com.jeeplus.common.persistence.annotation.MyBatisDao;
+import com.jeeplus.modules.projectPerformanceDatabase.entity.ProjectPerformance;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 知识分享列表类型dao
+ * @author: 徐滕
+ * @version: 2022-09-29 08:32
+ */
+@MyBatisDao
+public interface ProjectPerformanceDao extends CrudDao<RuralProjectRecords> {
+
+    Integer getCountByValue(String value);
+
+    /**
+     * 批量新增关联关系
+     * @param projectPerformanceList
+     * @return
+     */
+    Integer saveProjectPerformance(@Param("projectPerformanceList") List<ProjectPerformance> projectPerformanceList);
+
+    /**
+     * 根据项目ID列表查询已存在的关联记录
+     * @param projectIdList
+     * @return
+     */
+    List<ProjectPerformance> findByProjectIdList(@Param("projectIdList") List<String> projectIdList);
+
+    /**
+     * 批量逻辑删除关联记录
+     * @param projectPerformanceList
+     * @return
+     */
+    Integer deleteByLogicBatch(@Param("projectPerformanceList") List<ProjectPerformance> projectPerformanceList);
+}

+ 16 - 0
src/main/java/com/jeeplus/modules/projectPerformanceDatabase/dao/ProjectPerformanceDatabaseDao.java

@@ -0,0 +1,16 @@
+package com.jeeplus.modules.projectPerformanceDatabase.dao;
+
+import com.jeeplus.common.persistence.CrudDao;
+import com.jeeplus.common.persistence.annotation.MyBatisDao;
+import com.jeeplus.modules.projectPerformanceDatabase.entity.ProjectPerformanceDatabase;
+
+/**
+ * 知识分享列表类型dao
+ * @author: 徐滕
+ * @version: 2022-09-29 08:32
+ */
+@MyBatisDao
+public interface ProjectPerformanceDatabaseDao extends CrudDao<ProjectPerformanceDatabase> {
+
+    Integer getCountByValue(String value);
+}

+ 38 - 0
src/main/java/com/jeeplus/modules/projectPerformanceDatabase/entity/ProjectPerformance.java

@@ -0,0 +1,38 @@
+package com.jeeplus.modules.projectPerformanceDatabase.entity;
+
+import com.jeeplus.common.persistence.DataEntity;
+
+/**
+ * 知识分享列表类型表
+ * @author: 徐滕
+ * @version: 2022-09-28 16:04
+ */
+public class ProjectPerformance extends DataEntity<ProjectPerformance> {
+    private String listId;   //value值
+    private String projectPerformanceDatabaseId;    //排序
+    private String projectId;    //项目id
+
+    public String getListId() {
+        return listId;
+    }
+
+    public void setListId(String listId) {
+        this.listId = listId;
+    }
+
+    public String getProjectPerformanceDatabaseId() {
+        return projectPerformanceDatabaseId;
+    }
+
+    public void setProjectPerformanceDatabaseId(String projectPerformanceDatabaseId) {
+        this.projectPerformanceDatabaseId = projectPerformanceDatabaseId;
+    }
+
+    public String getProjectId() {
+        return projectId;
+    }
+
+    public void setProjectId(String projectId) {
+        this.projectId = projectId;
+    }
+}

+ 48 - 0
src/main/java/com/jeeplus/modules/projectPerformanceDatabase/entity/ProjectPerformanceDatabase.java

@@ -0,0 +1,48 @@
+package com.jeeplus.modules.projectPerformanceDatabase.entity;
+
+import com.jeeplus.common.persistence.DataEntity;
+import com.jeeplus.modules.sys.entity.Office;
+
+/**
+ * 知识分享列表类型表
+ * @author: 徐滕
+ * @version: 2022-09-28 16:04
+ */
+public class ProjectPerformanceDatabase extends DataEntity<ProjectPerformanceDatabase> {
+    private String value;   //value值
+    private String sort;    //排序
+    private Office office;
+    private Office company;
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    public String getSort() {
+        return sort;
+    }
+
+    public void setSort(String sort) {
+        this.sort = sort;
+    }
+
+    public Office getOffice() {
+        return office;
+    }
+
+    public void setOffice(Office office) {
+        this.office = office;
+    }
+
+    public Office getCompany() {
+        return company;
+    }
+
+    public void setCompany(Office company) {
+        this.company = company;
+    }
+}

+ 73 - 0
src/main/java/com/jeeplus/modules/projectPerformanceDatabase/service/ProjectPerformanceDatabaseService.java

@@ -0,0 +1,73 @@
+package com.jeeplus.modules.projectPerformanceDatabase.service;
+
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.service.CrudService;
+import com.jeeplus.modules.knowledgeSharing.dao.KnowledgeSharingDao;
+import com.jeeplus.modules.knowledgeSharing.entity.KnowledgeSharingInfo;
+import com.jeeplus.modules.projectPerformanceDatabase.dao.ProjectPerformanceDatabaseDao;
+import com.jeeplus.modules.projectPerformanceDatabase.entity.ProjectPerformanceDatabase;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * 知识分享列表类型service
+ * @author: 徐滕
+ * @version: 2022-09-29 08:32
+ */
+@Service
+@Transactional(readOnly = true)
+public class ProjectPerformanceDatabaseService extends CrudService<ProjectPerformanceDatabaseDao, ProjectPerformanceDatabase> {
+
+    @Autowired
+    private KnowledgeSharingDao knowledgeSharingDao;
+
+
+    public List<ProjectPerformanceDatabase> findList(ProjectPerformanceDatabase projectPerformanceDatabase) {
+        return super.findList(projectPerformanceDatabase);
+    }
+
+    public Page<ProjectPerformanceDatabase> findPage(Page<ProjectPerformanceDatabase> page, ProjectPerformanceDatabase projectPerformanceDatabase) {
+
+        int count = dao.queryCount(projectPerformanceDatabase);
+        page.setCount(count);
+        page.setCountFlag(false);
+        projectPerformanceDatabase.setPage(page);
+        page.setList(findList(projectPerformanceDatabase));
+        return page;
+    }
+
+
+    @Transactional(readOnly = false)
+    public void save(ProjectPerformanceDatabase projectPerformanceDatabase) {
+        projectPerformanceDatabase.setOffice(UserUtils.getSelectOffice());
+        projectPerformanceDatabase.setCompany(UserUtils.getSelectCompany());
+        //添加信息
+        super.save(projectPerformanceDatabase);
+    }
+
+    public Integer getCountByValue(String value){
+        return dao.getCountByValue(value);
+    }
+
+
+    /**
+     * 删除方法
+     * @param projectPerformanceDatabase
+     */
+    @Transactional(readOnly = false)
+    public void delete (ProjectPerformanceDatabase projectPerformanceDatabase){
+        dao.deleteByLogic(projectPerformanceDatabase);
+    }
+
+    public Integer getUsedByTypeKey(String key){
+        KnowledgeSharingInfo knowledgeSharingInfo = new KnowledgeSharingInfo();
+        knowledgeSharingInfo.setColumnId(key);
+        Integer count = knowledgeSharingDao.queryCount(knowledgeSharingInfo);
+
+        return count;
+    }
+}

+ 130 - 0
src/main/java/com/jeeplus/modules/projectPerformanceDatabase/service/ProjectPerformanceService.java

@@ -0,0 +1,130 @@
+package com.jeeplus.modules.projectPerformanceDatabase.service;
+
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.service.CrudService;
+import com.jeeplus.modules.knowledgeSharing.dao.KnowledgeSharingDao;
+import com.jeeplus.modules.knowledgeSharing.entity.KnowledgeSharingInfo;
+import com.jeeplus.modules.projectPerformanceDatabase.dao.ProjectPerformanceDao;
+import com.jeeplus.modules.projectPerformanceDatabase.entity.ProjectPerformance;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
+import com.jeeplus.modules.sys.entity.Office;
+import com.jeeplus.modules.sys.service.OfficeService;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import jersey.repackaged.com.google.common.collect.Lists;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * 知识分享列表类型service
+ * @author: 徐滕
+ * @version: 2022-09-29 08:32
+ */
+@Service
+@Transactional(readOnly = true)
+public class ProjectPerformanceService extends CrudService<ProjectPerformanceDao, RuralProjectRecords> {
+
+    @Autowired
+    private KnowledgeSharingDao knowledgeSharingDao;
+
+    @Autowired
+    private OfficeService officeService;
+
+
+    public List<RuralProjectRecords> findList(RuralProjectRecords projectRecords) {
+        return super.findList(projectRecords);
+    }
+
+    public Page<RuralProjectRecords> findPage(Page<RuralProjectRecords> page, RuralProjectRecords projectRecords) {
+
+        if(null!= projectRecords.getOffice() && StringUtils.isNotBlank(projectRecords.getOffice().getId())){
+            if("一部本部".equals(projectRecords.getOffice().getId())){
+                List<String> officeIdList = Lists.newArrayList();
+                Office office = officeService.getByName("工程一部");
+                officeIdList.add(office.getId());
+                projectRecords.setOfficeIdList(officeIdList);
+            }else{
+                //查询该选择节点下所有的部门Id
+                List<String> officeIdList = officeService.getChildrenOffice(projectRecords.getOffice().getId());
+                officeIdList.add(projectRecords.getOffice().getId());
+                if (officeIdList.size() > 0) {
+                    projectRecords.setOfficeIdList(officeIdList);
+                }
+            }
+        }
+
+
+        int count = dao.queryCount(projectRecords);
+        page.setCount(count);
+        page.setCountFlag(false);
+        projectRecords.setPage(page);
+        List<RuralProjectRecords> recordsList = findList(projectRecords);
+
+        page.setList(recordsList);
+        return page;
+    }
+
+
+    @Transactional(readOnly = false)
+    public void save(RuralProjectRecords projectRecords) {
+        projectRecords.setOffice(UserUtils.getSelectOffice());
+        projectRecords.setCompany(UserUtils.getSelectCompany());
+        //添加信息
+        super.save(projectRecords);
+    }
+
+    public Integer getCountByValue(String value){
+        return dao.getCountByValue(value);
+    }
+
+
+    /**
+     * 删除方法
+     * @param projectRecords
+     */
+    @Transactional(readOnly = false)
+    public void delete (RuralProjectRecords projectRecords){
+        dao.deleteByLogic(projectRecords);
+    }
+
+    public Integer getUsedByTypeKey(String key){
+        KnowledgeSharingInfo knowledgeSharingInfo = new KnowledgeSharingInfo();
+        knowledgeSharingInfo.setColumnId(key);
+        Integer count = knowledgeSharingDao.queryCount(knowledgeSharingInfo);
+
+        return count;
+    }
+
+    @Transactional(readOnly = false)
+    public String saveProjectPerformance(List<String> projectIdList, String projectPerformanceDatabaseId){
+        List<ProjectPerformance> projectPerformanceList = Lists.newArrayList();
+
+        // 1. 先根据项目id去查询是否存在项目关联数据库记录
+        List<ProjectPerformance> existList = dao.findByProjectIdList(projectIdList);
+
+        // 2. 如果存在关联记录,则将关联记录进行逻辑删除
+        if(existList != null && !existList.isEmpty()){
+            for (ProjectPerformance exist : existList) {
+                exist.preUpdate();
+            }
+            dao.deleteByLogicBatch(existList);
+        }
+
+        // 3. 批量新增新的关联关系
+        for (String projectId : projectIdList) {
+            ProjectPerformance projectPerformance = new ProjectPerformance();
+            projectPerformance.setProjectId(projectId);
+            projectPerformance.setProjectPerformanceDatabaseId(projectPerformanceDatabaseId);
+            projectPerformance.preInsert();
+            projectPerformanceList.add(projectPerformance);
+        }
+        if(!projectPerformanceList.isEmpty()){
+            dao.saveProjectPerformance(projectPerformanceList);
+        }
+
+        return "保存成功";
+    }
+}

+ 191 - 0
src/main/java/com/jeeplus/modules/projectPerformanceDatabase/web/ProjectPerformanceController.java

@@ -0,0 +1,191 @@
+package com.jeeplus.modules.projectPerformanceDatabase.web;
+
+import com.jeeplus.common.config.Global;
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.web.BaseController;
+import com.jeeplus.modules.projectEngineering.entity.ProjectEngineeringInfo;
+import com.jeeplus.modules.projectEngineering.service.ProjectEngineeringService;
+import com.jeeplus.modules.projectPerformanceDatabase.entity.ProjectPerformanceDatabase;
+import com.jeeplus.modules.projectPerformanceDatabase.service.ProjectPerformanceDatabaseService;
+import com.jeeplus.modules.projectPerformanceDatabase.service.ProjectPerformanceService;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
+import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectRecordsService;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.service.UserService;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientLinkman;
+import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
+import jersey.repackaged.com.google.common.collect.Lists;
+import org.activiti.engine.HistoryService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 知识分享列表类型controller
+ * @author: 徐滕
+ * @version: 2022-09-29 08:31
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/projectPerformance")
+public class ProjectPerformanceController extends BaseController {
+
+    @Autowired
+    private ProjectPerformanceService service;
+    @Autowired
+    private RuralProjectRecordsService projectRecordsService;
+    @Autowired
+    protected HistoryService historyService;
+    @Autowired
+    private UserService userService;
+    @Autowired
+    private ProjectEngineeringService engineeringService;
+    @Autowired
+    private ProjectPerformanceDatabaseService projectPerformanceDatabaseService;
+
+
+    @ModelAttribute
+    public RuralProjectRecords get(@RequestParam(required=false) String id) {
+        RuralProjectRecords entity = null;
+        if (StringUtils.isNotBlank(id)){
+            entity = service.get(id);
+        }
+        if (entity == null){
+            entity = new RuralProjectRecords();
+        }
+        return entity;
+    }
+
+    /**
+     * 项目列表页面
+     */
+    @RequiresPermissions("projectPerformance:list")
+    @RequestMapping(value = {"list", ""})
+    public String list(RuralProjectRecords projectRecords, HttpServletRequest request, HttpServletResponse response, Model model) {
+        if(UserUtils.isManager()){
+            model.addAttribute("flag","1");
+        }
+        String oldSubmitMoney = "";
+        //进行查询之后进行任何操作,返回还是查询之后的数据页面
+        if (StringUtils.isNotBlank(projectRecords.getToflag())){
+            request.getSession().removeAttribute("projectPerformance");
+            RuralProjectRecords search=projectRecords;
+            request.getSession().setAttribute("projectPerformance",search);
+        }else{
+            if (request.getSession().getAttribute("projectPerformance")!=null){
+                projectRecords= (RuralProjectRecords) request.getSession().getAttribute("projectPerformance");
+                model.addAttribute("ruralProjectRecords", projectRecords);
+            }
+        }
+        //添加查询类型(工程咨询)
+        List<String> typeList = Lists.newArrayList();
+        String oldProjectSort = null;
+        if (StringUtils.isBlank(projectRecords.getAttachmentProjectSort())){
+            typeList.add("1");
+            typeList.add("2");
+        }else {
+            oldProjectSort=projectRecords.getAttachmentProjectSort();
+            String attachmentProjectSort=projectRecords.getAttachmentProjectSort();
+            typeList.add(attachmentProjectSort.split("-")[0]);
+            projectRecords.setAttachmentProjectSort(attachmentProjectSort.split("-")[1]);
+        }
+
+        //查询总审人员信息
+        List<User> auditUserList = userService.getShowAuditUserList();
+        model.addAttribute("userList", auditUserList);
+
+        //添加查询类型list
+        projectRecords.setTypeList(typeList);
+        Page<RuralProjectRecords> page = service.findPage(new Page<RuralProjectRecords>(request, response), projectRecords);
+        model.addAttribute("page", page);
+        if(null != projectRecords.getWorkContractInfo()){
+            model.addAttribute("workContractInfoName", projectRecords.getWorkContractInfo().getName());
+            if(null != projectRecords.getWorkContractInfo().getClient()){
+                model.addAttribute("workContractInfoClientName", projectRecords.getWorkContractInfo().getClient().getName());
+            }
+        }
+        //无合同状态下,获取委托方的名称
+        List<RuralProjectRecords> list = page.getList();
+        for (int i = 0; i < list.size(); i++) {
+            RuralProjectRecords records1 = list.get(i);
+            if (records1.getWorkContractInfo() == null) {
+                projectRecordsService.queryLinkmanInfos(records1);
+                if (records1.getWorkClientLinkmanList() != null && records1.getWorkClientLinkmanList().size() > 0) {
+                    WorkClientLinkman linkman = records1.getWorkClientLinkmanList().get(0);
+                    WorkContractInfo contractInfo = new WorkContractInfo();
+                    contractInfo.setClient(linkman.getClientId());
+                    records1.setWorkContractInfo(contractInfo);
+                    records1.getWorkContractInfo().setClientName(records1.getWorkContractInfo().getClient().getName());
+                }
+            }
+        }
+        if(StringUtils.isNotBlank(oldSubmitMoney)){
+            projectRecords.setSubmitMoney(oldSubmitMoney);
+        }
+        //查询工程类型
+        if (projectRecords.getEngineeringType()!=null){
+            ProjectEngineeringInfo engineeringInfo=engineeringService.get(projectRecords.getEngineeringType());
+            model.addAttribute("engineeringInfo", engineeringInfo);
+        }
+
+        ProjectPerformanceDatabase projectPerformanceDatabase = new ProjectPerformanceDatabase();
+        projectPerformanceDatabase.setDelFlag("0");
+        List<ProjectPerformanceDatabase> projectPerformanceDatabaseList = projectPerformanceDatabaseService.findList(projectPerformanceDatabase);
+        // 这里可以查询驳回原因下拉框数据 → 塞进 model
+        model.addAttribute("projectPerformanceDatabaseList", projectPerformanceDatabaseList);
+
+        model.addAttribute("beginDate", projectRecords.getBeginDate());
+        model.addAttribute("endDate", projectRecords.getEndDate());
+        if (StringUtils.isNotBlank(oldProjectSort)){
+            model.addAttribute("oldProjectSort", oldProjectSort);
+        }
+        return "modules/projectPerformanceDatabase/projectPerformanceList";
+    }
+
+    @RequestMapping("/getProjectPerformanceDatabase")
+    public String getProjectPerformanceDatabase(String listId, Model model) {
+        model.addAttribute("listId", listId);
+        ProjectPerformanceDatabase projectPerformanceDatabase = new ProjectPerformanceDatabase();
+        projectPerformanceDatabase.setDelFlag("0");
+        List<ProjectPerformanceDatabase> projectPerformanceDatabaseList = projectPerformanceDatabaseService.findList(projectPerformanceDatabase);
+        // 这里可以查询驳回原因下拉框数据 → 塞进 model
+        model.addAttribute("projectPerformanceDatabaseList", projectPerformanceDatabaseList);
+        return "modules/projectPerformanceDatabase/projectPerformanceForm"; // 你的页面路径
+    }
+
+
+    /**
+     * 电子归档批量驳回
+     */
+    //@RequiresPermissions("ruralProject:ruralProjectMessageAll:reportBatchReject")
+    @RequestMapping(value = "saveProjectPerformance")
+    public String saveProjectPerformance(@RequestParam String listId, @RequestParam String projectPerformanceDatabaseId, HttpServletResponse response, Model model) {
+        Map<String,Object> map = new HashMap<>();
+
+        List<String> idList = Arrays.asList(listId.split(","));
+        String resultStr = "";
+        if(idList.size()>0){
+            resultStr = service.saveProjectPerformance(idList,projectPerformanceDatabaseId);
+            map.put("str",resultStr);
+            map.put("success",true);
+        }else{
+            map.put("str","选择项目数据错误");
+            map.put("success",false);
+        }
+        model.addAttribute("map",map.get("str"));
+        return "redirect:"+ Global.getAdminPath()+"/projectPerformance/?repage";
+    }
+
+}

+ 143 - 0
src/main/java/com/jeeplus/modules/projectPerformanceDatabase/web/ProjectPerformanceDatabaseController.java

@@ -0,0 +1,143 @@
+package com.jeeplus.modules.projectPerformanceDatabase.web;
+
+import com.jeeplus.common.config.Global;
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.MyBeanUtils;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.web.BaseController;
+import com.jeeplus.modules.projectPerformanceDatabase.entity.ProjectPerformanceDatabase;
+import com.jeeplus.modules.projectPerformanceDatabase.service.ProjectPerformanceDatabaseService;
+import org.apache.shiro.authz.annotation.Logical;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 知识分享列表类型controller
+ * @author: 徐滕
+ * @version: 2022-09-29 08:31
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/projectPerformanceDatabase")
+public class ProjectPerformanceDatabaseController extends BaseController {
+
+    @Autowired
+    private ProjectPerformanceDatabaseService service;
+
+
+    @ModelAttribute
+    public ProjectPerformanceDatabase get(@RequestParam(required=false) String id) {
+        ProjectPerformanceDatabase entity = null;
+        if (StringUtils.isNotBlank(id)){
+            entity = service.get(id);
+        }
+        if (entity == null){
+            entity = new ProjectPerformanceDatabase();
+        }
+        return entity;
+    }
+
+    /**
+     * 业务提问-所有问题展示页
+     */
+    @RequiresPermissions("projectPerformanceDatabase:projectPerformanceDatabase:list")
+    @RequestMapping(value = {"list", ""})
+    public String list(ProjectPerformanceDatabase projectPerformanceDatabase, HttpServletRequest request, HttpServletResponse response, Model model) {
+        Page<ProjectPerformanceDatabase> page = service.findPage(new Page<ProjectPerformanceDatabase>(request, response), projectPerformanceDatabase);
+        model.addAttribute("page", page);
+        return "modules/projectPerformanceDatabase/projectPerformanceDatabaseList";
+    }
+
+
+
+    /**
+     * 查看,增加,编辑业务提问表单页面
+     * @param projectPerformanceDatabase
+     * @param model
+     * @return
+     */
+    @RequiresPermissions(value={"projectPerformanceDatabase:projectPerformanceDatabase:add","projectPerformanceDatabase:projectPerformanceDatabase:edit"},logical= Logical.OR)
+    @RequestMapping(value = "form")
+    public String form(ProjectPerformanceDatabase projectPerformanceDatabase, Model model) {
+        model.addAttribute("projectPerformanceDatabase", projectPerformanceDatabase);
+        if(StringUtils.isNotBlank(projectPerformanceDatabase.getId())){
+            model.addAttribute("success", false);
+        }else{
+            model.addAttribute("success", true);
+        }
+        return "modules/projectPerformanceDatabase/projectPerformanceDatabaseForm";
+    }
+
+    /**
+     * 保存
+     * @param projectPerformanceDatabase
+     * @param model
+     * @param redirectAttributes
+     * @return
+     * @throws Exception
+     */
+    @RequiresPermissions(value={"projectPerformanceDatabase:projectPerformanceDatabase:add","projectPerformanceDatabase:projectPerformanceDatabase:edit"},logical= Logical.OR)
+    @RequestMapping(value = "save")
+    public String save(ProjectPerformanceDatabase projectPerformanceDatabase, Model model, RedirectAttributes redirectAttributes) throws Exception{
+        if (!beanValidator(model, projectPerformanceDatabase)){
+            return form(projectPerformanceDatabase, model);
+        }
+
+        if(!projectPerformanceDatabase.getIsNewRecord()){//编辑表单保存
+            ProjectPerformanceDatabase t = service.get(projectPerformanceDatabase.getId());//从数据库取出记录的值
+            MyBeanUtils.copyBeanNotNull2Bean(projectPerformanceDatabase, t);//将编辑表单中的非NULL值覆盖数据库记录中的值
+            service.save(t);//保存
+        }else{//新增表单保存
+
+            //判定key是否存在
+            Integer countByKey = service.getCountByValue(projectPerformanceDatabase.getValue());
+            if(countByKey>0){
+                addMessage(redirectAttributes, "保存失败,该项目业绩类型值已存在");
+                return "redirect:"+ Global.getAdminPath()+"/projectPerformanceDatabase/?repage";
+            }else{
+                service.save(projectPerformanceDatabase);//保存
+            }
+
+        }
+        addMessage(redirectAttributes, "保存成功");
+        return "redirect:"+ Global.getAdminPath()+"/projectPerformanceDatabase/?repage";
+    }
+    /**
+     * 删除
+     * @return
+     * @throws Exception
+     */
+    @RequiresPermissions(value={"projectPerformanceDatabase:projectPerformanceDatabase:del"},logical=Logical.OR)
+    @RequestMapping(value = "delete")
+    @ResponseBody
+    public Object delete(ProjectPerformanceDatabase knowledgeSharingInfo){
+        Map<String,Object> map = new HashMap<>();
+        try {
+            //查询是否被使用,若被使用则不允许删除
+            Integer usedCount = service.getUsedByTypeKey(knowledgeSharingInfo.getValue());
+            if(usedCount==0){
+                service.delete(knowledgeSharingInfo);//保存
+                map.put("success",true);
+            }else{
+                map.put("success",false);
+                map.put("message","该项目业绩类型已被使用,无法删除");
+            }
+        }catch (Exception e){
+            map.put("success",false);
+            map.put("message","删除错误,请联系管理员");
+        }
+        return map;
+    }
+
+}

+ 20 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectRecords.java

@@ -435,6 +435,10 @@ public class RuralProjectRecords extends ActEntity<RuralProjectRecords> {
 	private BigDecimal endMoney;	//咨询营业收入(结束)
 
 
+	private String projectPerformanceName;	//项目业绩名称
+	private String projectPerformanceId;	//项目业绩id
+
+
 	private ProjectReportDataVo projectReportDataVo;
 
 	public ProjectReportDataVo getProjectReportDataVo() {
@@ -2862,4 +2866,20 @@ public class RuralProjectRecords extends ActEntity<RuralProjectRecords> {
 	public void setEndMoney(BigDecimal endMoney) {
 		this.endMoney = endMoney;
 	}
+
+	public String getProjectPerformanceName() {
+		return projectPerformanceName;
+	}
+
+	public void setProjectPerformanceName(String projectPerformanceName) {
+		this.projectPerformanceName = projectPerformanceName;
+	}
+
+	public String getProjectPerformanceId() {
+		return projectPerformanceId;
+	}
+
+	public void setProjectPerformanceId(String projectPerformanceId) {
+		this.projectPerformanceId = projectPerformanceId;
+	}
 }

+ 631 - 0
src/main/resources/mappings/modules/projectPerformanceDatabase/ProjectPerformanceDao.xml

@@ -0,0 +1,631 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.modules.projectPerformanceDatabase.dao.ProjectPerformanceDao">
+
+	<sql id="businessQuestionsColumns">
+		a.id as "id",
+		a.create_by as "createBy.id",
+		(select name from sys_user user where user.id=a.create_by) as "createBy.name",
+		a.create_date as "createDate",
+		a.update_by as "updateBy.id",
+		a.update_date as "updateDate",
+		a.remarks as "remarks",
+		a.del_flag as "delFlag",
+		a.value as "value",
+		a.sort as "sort",
+		a.office_id as "office.id",
+		a.company_id as "company.id"
+	</sql>
+
+
+	<select id="get" resultType="RuralProjectRecords" >
+		SELECT
+			a.*
+		FROM rural_project_records a
+		WHERE a.id = #{id}
+	</select>
+
+	<select id="findList" resultType="RuralProjectRecords" >
+		SELECT
+		a.id AS "id",
+		a.create_by AS "createBy.id",
+		a.create_date AS "createDate",
+		a.update_by AS "updateBy.id",
+		a.update_date AS "updateDate",
+		a.del_flag AS "delFlag",
+		a.contract_id AS "workContractInfo.id",
+		a.project_id AS "projectId",
+		a.project_name AS "projectName",
+		a.scale_type AS "scaleType",
+		a.submit_scale AS "submitScale",
+		a.scale_unit AS "scaleUnit",
+		a.scale_quantity AS "scaleQuantity",
+		a.area_id AS "area.id",
+		a.project_site AS "projectSite",
+		a.project_desc AS "projectDesc",
+		a.remarks AS "remarks",
+		a.status AS "projectStatus",
+		a.process_instance_id AS "processInstanceId",
+		a.company_id AS "company.id",
+		a.office_id AS "office.id",
+		a.alter_process_id AS "alterProcessId",
+		a.province,
+		a.city,
+		a.area_name AS "county",
+		a.project_structure AS "projectStructure",
+		a.on_ground_num AS "onGroundNum",
+		a.under_ground_num AS "underGroundNum",
+		a.building_scale AS "buildingScale",
+		a.measuring_unit AS "measuringUnit",
+		a.project_use AS "projectUse",
+		a.install_fees AS "installFees",
+		a.building_fees AS "buildingFees",
+		a.building_percent AS "buildingPercent",
+		a.install_percent AS "installPercent",
+		a.unit_fees AS "unitFees",
+		a.building_unit_fees AS "buildingUnitFees",
+		a.install_unit_fees AS "installUnitFees",
+		a.total_fees AS "totalFees",
+		ifnull(a.reported_state,0) as "reportedState",
+		a.over_due_status as "overDueStatus",
+		ifnull(a.record_state,0) as "projectRecordStatus",
+		a.over_record_status as "overRecordStatus",
+		a.emergency_project as "emergencyProject",
+		a.attachment_project_sort as "attachmentProjectSort",
+		a.report_signature_flag as "reportSignatureFlag",
+		a.report_signature_document_id as "reportSignatureDocumentId",
+		a.report_signature_contract_id as "reportSignatureContractId",
+		a.report_signature_invalid_document_id as "reportSignatureInvalidDocumentId",
+		a.report_signature_file_name as "reportSignatureFileName",
+		a.report_signature_upload_file_user as "reportSignatureUploadFileUser.id",
+		a.report_signature_upload_date as "reportSignatureUploadDate",
+		a.quality_signature_flag as "qualitySignatureFlag",
+		a.quality_signature_document_id as "qualitySignatureDocumentId",
+		a.quality_signature_contract_id as "qualitySignatureContractId",
+		a.quality_signature_invalid_document_id as "qualitySignatureInvalidDocumentId",
+		a.quality_signature_file_name as "qualitySignatureFileName",
+		a.quality_signature_upload_file_user as "qualitySignatureUploadFileUser.id",
+		a.quality_signature_upload_date as "qualitySignatureUploadDate",
+		a.belonging_department as "belongingDepartment",
+		a.submit_money as "submitMoney",
+		a.project_type as projectType,
+		a.project_material_storage_status as "projectMaterialStorageStatus",
+
+		a.paper_filing_status as "apaperFilingStatus",
+		a.over_paper_filing_status as "overPaperFilingStatus",
+		sua.name AS "createBy.name",
+		area.name AS "area.name",
+		su.name as "leaderNameStr",
+		su.id as "leaderNameIds",
+		wci.name AS "workContractInfo.name",
+		wct.id AS "workContractInfo.client.id",
+		wct.name AS "workContractInfo.client.name",
+		o.top_company AS "office.name",
+		ifnull(prd.number ,"") as "projectReportNumber"
+		,ifnull(prd.status,0) as "projectReportStatus"
+		,ifnull(prd.name,"") as "projectReportName"
+
+		,prd.audit_pass_date as auditPassDate
+		,prd.first_audit_date as "reportAuditDate"
+		,if(date_add(prd.audit_pass_date,interval #{endingCount} day) >now(),"0","1") as reportedType
+
+
+		,prd.audit_pass_date as "prdAuditDate"
+		,prd.ZiXunShouRu as "money"
+		,ppd.value as "projectPerformanceName"
+
+		FROM rural_project_records a
+		LEFT JOIN sys_area area ON area.id = a.area_id
+
+		LEFT JOIN sys_user sua on a.create_by = sua.id
+		LEFT JOIN work_project_user w1 on a.id = w1.project_id
+		LEFT JOIN sys_user su on w1.user_id = su.id
+		LEFT JOIN sys_user suMaster on a.project_master_id = suMaster.id
+		LEFT JOIN work_contract_info wci on a.contract_id = wci.id
+		LEFT JOIN work_client_info wct on wci.client_id = wct.id
+		LEFT JOIN sys_office o ON o.id = a.office_id
+		left join project_report_data prd on prd.project_id = a.id
+		left join project_performance pp on pp.project_id = a.id and pp.del_flag = '0'
+		left join project_performance_database ppd on ppd.id = pp.project_performance_database_id and ppd.del_flag = '0'
+		<where>
+			a.status = 5
+			<if test="projectId != null and projectId != ''">
+				AND a.project_id like concat('%',#{projectId},'%')
+			</if>
+			<if test="area != null and area.id != null and area.id != ''">
+				AND (area.parent_ids LIKE concat('%',#{area.id},'%')
+				or a.area_id = #{area.id}
+				)
+			</if>
+			<if test="projectName != null and projectName != ''">
+				AND a.project_name like concat(concat('%',#{projectName}),'%')
+			</if>
+			<if test="scaleType != null and scaleType != ''">
+				AND a.scale_type = #{scaleType}
+			</if>
+			<if test="scaleUnit != null and scaleUnit != ''">
+				AND a.scale_unit = #{scaleUnit}
+			</if>
+			<if test="scaleQuantity != null and scaleQuantity != ''">
+				AND a.scale_quantity = #{scaleQuantity}
+			</if>
+			<if test="projectSite != null and projectSite != ''">
+				AND a.project_site LIKE concat('%',#{projectSite},'%')
+			</if>
+			<if test="remarks != null and remarks != ''">
+				AND a.remarks LIKE concat('%',#{remarks},'%')
+			</if>
+			<if test="projectDesc != null and projectDesc != ''">
+				AND a.project_desc LIKE concat('%',#{projectDesc},'%')
+			</if>
+
+			<if test="workContractInfo !=null and workContractInfo.name !=null and workContractInfo.name !=''">
+				AND wci.name like concat(concat('%',#{workContractInfo.name}),'%')
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.contractNum !=null and workContractInfo.contractNum !=''">
+				AND wci.contract_num like concat(concat('%',#{workContractInfo.contractNum}),'%')
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.contractPrice !=null and workContractInfo.contractPrice !=''">
+				AND wci.contract_price = #{workContractInfo.contractPrice}
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.contractType !=null and workContractInfo.contractType !=''">
+				AND wci.contract_type = #{workContractInfo.contractType}
+			</if>
+			<if test="workContractInfo!=null and workContractInfo.client !=null and workContractInfo.client.name !=null and workContractInfo.client.name !=''">
+				AND wct.name like concat(concat('%',#{workContractInfo.client.name}),'%')
+			</if>
+			<if test="(leaderNameStr != null and leaderNameStr != '') or (leaderId != null and leaderId != '')">
+				AND ((w1.user_id = #{leaderId}) or su.name like concat('%',#{leaderNameStr},'%')) AND w1.is_master = '1' AND w1.del_flag='0'
+			</if>
+			<if test="(projectMasterName != null and projectMasterName != '') or (projectMasterId != null and projectMasterId != '')">
+				AND ((a.project_master_id = #{projectMasterId}) or suMaster.name like concat('%',#{projectMasterName},'%')) AND suMaster.del_flag='0'
+			</if>
+			<if test="projectStatus !=null">
+				AND a.status = #{projectStatus}
+			</if>
+			<if test="beginDate !=null">
+				AND a.create_date >= #{beginDate}
+			</if>
+			<if test="endDate !=null">
+				AND a.create_date &lt; #{endDate}
+			</if>
+
+			<!-- 送审规模 -->
+			<if test="beginSubmitScale !=null and beginSubmitScale != ''">
+				AND a.submit_scale >= #{beginSubmitScale}
+			</if>
+			<if test="endSubmitScale !=null and endSubmitScale != ''">
+				AND a.submit_scale &lt; #{endSubmitScale}
+			</if>
+
+			<!-- 咨询营业收入 -->
+			<if test="beginMoney !=null">
+				AND prd.ZiXunShouRu >= #{beginMoney}
+			</if>
+			<if test="endMoney !=null">
+				AND prd.ZiXunShouRu &lt; #{endMoney}
+			</if>
+
+			<!-- 质量复核审核时间 -->
+			<if test="reportBeginDate !=null">
+				AND prd.audit_pass_date >= #{reportBeginDate}
+			</if>
+			<if test="reportEndDate !=null">
+				AND prd.audit_pass_date &lt;= #{reportEndDate}
+			</if>
+
+
+			<if test="attachmentProjectSort !=null and attachmentProjectSort != ''">
+				AND a.attachment_project_sort = #{attachmentProjectSort}
+			</if>
+			<if test="engineeringType !=null and engineeringType !=''">
+				and a.engineering_type= #{engineeringType}
+			</if>
+
+			<if test="bzshbUserId!=null and bzshbUserId!=''">
+				and prd.bzshb_user_id=#{bzshbUserId}
+			</if>
+
+			<if test="projectPerformanceId!=null and projectPerformanceId!=''">
+				and pp.project_performance_database_id=#{projectPerformanceId}
+			</if>
+
+			<if test="projectMaterialStorageStatus !=null and projectMaterialStorageStatus!=''">
+				AND a.project_material_storage_status= #{projectMaterialStorageStatus}
+			</if>
+			<if test="emergencyProject !=null and emergencyProject != ''">
+				<choose>
+					<when test="emergencyProject == 0">
+						AND (a.emergency_project = #{emergencyProject} or a.emergency_project is null)
+					</when>
+					<otherwise>
+						AND a.emergency_project = #{emergencyProject}
+					</otherwise>
+				</choose>
+			</if>
+			<if test="createBy != null and((createBy.id != null and createBy.id != '') or (createBy.name != null and createBy.name != ''))">
+				AND (a.create_by = #{createBy.id} or sua.name like concat('%',#{createBy.name},'%'))
+			</if>
+
+			<if test="reportData!=null and reportData.number !=null and reportData.number !=''">
+				and (
+				<if test="reportData.number == '暂无报告'">
+					(prd.number = '' or prd.number is null)
+				</if>
+				<if test="reportData.number != '暂无报告'">
+					prd.number like concat('%', #{reportData.number}, '%')
+				</if>
+				)
+			</if>
+
+			<if test="office!=null and office.id=='' and office.name!=null and office.name!='' ">
+				and  o.name like concat('%',#{office.name},'%')
+			</if>
+
+			<if test="reportedState !=null and reportedState !=''">
+				<choose>
+					<when test="reportedState == 0">
+						AND a.reported_state is null
+					</when>
+					<otherwise>
+						AND a.reported_state = #{reportedState}
+					</otherwise>
+				</choose>
+			</if>
+
+
+			<if test="projectReportStatus != null">
+				AND
+				<choose>
+					<when test="projectReportStatus != 0">
+						prd.status = #{projectReportStatus}
+					</when>
+					<otherwise>
+						prd.STATUS is null
+					</otherwise>
+				</choose>
+			</if>
+			<if test="submitMoney != null and submitMoney != ''">
+				AND a.submit_money = #{submitMoney}
+			</if>
+
+
+			<if test="typeList !=null and typeList !=''">
+				and a.project_type in
+				<foreach collection="typeList" item="id" index="index" open="(" close=")" separator=",">
+					#{id}
+				</foreach>
+			</if>
+
+			<if test="officeIdList!=null and officeIdList.size!=0">
+				and a.office_id in
+				<foreach collection="officeIdList" item="officeId" separator="," open="(" close=")">
+					#{officeId}
+				</foreach>
+			</if>
+			<if test="reportBeginDate !=null or reportEndDate !=null">
+				AND prd.status in (5,7)
+			</if>
+
+
+			AND  a.status != 7 AND a.del_flag = #{DEL_FLAG_NORMAL}
+			<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
+				AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id} )${sqlMap.dsf} )
+			</if>
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY SUBSTRING(a.project_id,6,4) DESC,cast( SUBSTRING(a.project_id,11) as UNSIGNED) DESC
+			</otherwise>
+		</choose>
+	</select>
+
+	<select id="queryCount" resultType="java.lang.Integer" >
+		SELECT count(DISTINCT a.id)  <!-- 这里改成 DISTINCT 防止数据膨胀 -->
+
+		FROM rural_project_records a
+
+		<!-- ===================== 按需 LEFT JOIN 开始 ===================== -->
+		<!-- 1. 区域:只有传了 area 条件才连表 -->
+		<if test="area != null and area.id != null and area.id != ''">
+			LEFT JOIN sys_area area ON area.id = a.area_id
+		</if>
+
+		<!-- 2. 创建人:只有传了 createBy 条件才连表 -->
+		<if test="createBy != null and ((createBy.id != null and createBy.id != '') or (createBy.name != null and createBy.name != ''))">
+			LEFT JOIN sys_user sua on a.create_by = sua.id
+		</if>
+
+		<!-- 3. 项目成员/负责人:只有传了 leader 相关才连表 -->
+		<if test="(leaderNameStr != null and leaderNameStr != '') or (leaderId != null and leaderId != '') or sqlMap.dsf != null and sqlMap.dsf != ''">
+			LEFT JOIN work_project_user w1 on a.id = w1.project_id
+			LEFT JOIN sys_user su on w1.user_id = su.id
+		</if>
+
+		<!-- 4. 项目负责人:只有传了 projectMaster 才连表 -->
+		<if test="(projectMasterName != null and projectMasterName != '') or (projectMasterId != null and projectMasterId != '')">
+			LEFT JOIN sys_user suMaster on a.project_master_id = suMaster.id
+		</if>
+
+		<!-- 5. 合同 + 客户:只有传了合同/客户条件才连表 -->
+		<if test="(workContractInfo !=null and workContractInfo.name !=null and workContractInfo.name !='')
+		or (workContractInfo !=null and workContractInfo.contractNum !=null and workContractInfo.contractNum !='')
+		or (workContractInfo !=null and workContractInfo.contractPrice !=null and workContractInfo.contractPrice !='')
+		or (workContractInfo !=null and workContractInfo.contractType !=null and workContractInfo.contractType !='')
+		or (workContractInfo!=null and workContractInfo.client !=null and workContractInfo.client.name !=null and workContractInfo.client.name !='')">
+			LEFT JOIN work_contract_info wci on a.contract_id = wci.id
+			LEFT JOIN work_client_info wct on wci.client_id = wct.id
+		</if>
+
+		<!-- 6. 部门:只有传了 office 条件才连表 -->
+		<if test="(office!=null and office.id=='' and office.name!=null and office.name!='' ) or (officeIdList!=null and officeIdList.size!=0)">
+			LEFT JOIN sys_office o ON o.id = a.office_id
+		</if>
+
+		<!-- 7. 报告数据:只有传了 prd 报告条件才连表 -->
+		<if test="beginMoney !=null or endMoney !=null or reportBeginDate !=null or reportEndDate !=null
+		or bzshbUserId!=null and bzshbUserId!=''
+		or (reportData!=null and reportData.number !=null and reportData.number !='')
+		or projectReportStatus != null">
+			left join project_report_data prd on prd.project_id = a.id
+		</if>
+		<!-- ===================== 按需 LEFT JOIN 结束 ===================== -->
+
+		left join project_performance pp on pp.project_id = a.id and pp.del_flag = '0'
+		left join project_performance_database ppd on ppd.id = pp.project_performance_database_id and ppd.del_flag = '0'
+
+		<where>
+			a.status = 5
+			<if test="projectId != null and projectId != ''">
+				AND a.project_id like concat('%',#{projectId},'%')
+			</if>
+			<if test="area != null and area.id != null and area.id != ''">
+				AND (area.parent_ids LIKE concat('%',#{area.id},'%')
+				or a.area_id = #{area.id}
+				)
+			</if>
+			<if test="projectName != null and projectName != ''">
+				AND a.project_name like concat(concat('%',#{projectName}),'%')
+			</if>
+			<if test="scaleType != null and scaleType != ''">
+				AND a.scale_type = #{scaleType}
+			</if>
+			<if test="scaleUnit != null and scaleUnit != ''">
+				AND a.scale_unit = #{scaleUnit}
+			</if>
+			<if test="scaleQuantity != null and scaleQuantity != ''">
+				AND a.scale_quantity = #{scaleQuantity}
+			</if>
+			<if test="projectSite != null and projectSite != ''">
+				AND a.project_site LIKE concat('%',#{projectSite},'%')
+			</if>
+			<if test="remarks != null and remarks != ''">
+				AND a.remarks LIKE concat('%',#{remarks},'%')
+			</if>
+			<if test="projectDesc != null and projectDesc != ''">
+				AND a.project_desc LIKE concat('%',#{projectDesc},'%')
+			</if>
+
+			<if test="workContractInfo !=null and workContractInfo.name !=null and workContractInfo.name !=''">
+				AND wci.name like concat(concat('%',#{workContractInfo.name}),'%')
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.contractNum !=null and workContractInfo.contractNum !=''">
+				AND wci.contract_num like concat(concat('%',#{workContractInfo.contractNum}),'%')
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.contractPrice !=null and workContractInfo.contractPrice !=''">
+				AND wci.contract_price = #{workContractInfo.contractPrice}
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.contractType !=null and workContractInfo.contractType !=''">
+				AND wci.contract_type = #{workContractInfo.contractType}
+			</if>
+			<if test="workContractInfo!=null and workContractInfo.client !=null and workContractInfo.client.name !=null and workContractInfo.client.name !=''">
+				AND wct.name like concat(concat('%',#{workContractInfo.client.name}),'%')
+			</if>
+			<if test="(leaderNameStr != null and leaderNameStr != '') or (leaderId != null and leaderId != '')">
+				AND ((w1.user_id = #{leaderId}) or su.name like concat('%',#{leaderNameStr},'%')) AND w1.is_master = '1' AND w1.del_flag='0'
+			</if>
+			<if test="(projectMasterName != null and projectMasterName != '') or (projectMasterId != null and projectMasterId != '')">
+				AND ((a.project_master_id = #{projectMasterId}) or suMaster.name like concat('%',#{projectMasterName},'%')) AND suMaster.del_flag='0'
+			</if>
+			<if test="projectStatus !=null">
+				AND a.status = #{projectStatus}
+			</if>
+			<if test="beginDate !=null">
+				AND a.create_date >= #{beginDate}
+			</if>
+			<if test="endDate !=null">
+				AND a.create_date &lt; #{endDate}
+			</if>
+
+			<!-- 送审规模 -->
+			<if test="beginSubmitScale !=null and beginSubmitScale != ''">
+				AND a.submit_scale >= #{beginSubmitScale}
+			</if>
+			<if test="endSubmitScale !=null and endSubmitScale != ''">
+				AND a.submit_scale &lt; #{endSubmitScale}
+			</if>
+
+			<!-- 咨询营业收入 -->
+			<if test="beginMoney !=null">
+				AND prd.ZiXunShouRu >= #{beginMoney}
+			</if>
+			<if test="endMoney !=null">
+				AND prd.ZiXunShouRu &lt; #{endMoney}
+			</if>
+
+			<!-- 质量复核审核时间 -->
+			<if test="reportBeginDate !=null">
+				AND prd.audit_pass_date >= #{reportBeginDate}
+			</if>
+			<if test="reportEndDate !=null">
+				AND prd.audit_pass_date &lt;= #{reportEndDate}
+			</if>
+
+
+			<if test="attachmentProjectSort !=null and attachmentProjectSort != ''">
+				AND a.attachment_project_sort = #{attachmentProjectSort}
+			</if>
+			<if test="engineeringType !=null and engineeringType !=''">
+				and a.engineering_type= #{engineeringType}
+			</if>
+
+			<if test="bzshbUserId!=null and bzshbUserId!=''">
+				and prd.bzshb_user_id=#{bzshbUserId}
+			</if>
+
+			<if test="projectPerformanceId!=null and projectPerformanceId!=''">
+				and pp.project_performance_database_id=#{projectPerformanceId}
+			</if>
+
+			<if test="projectMaterialStorageStatus !=null and projectMaterialStorageStatus!=''">
+				AND a.project_material_storage_status= #{projectMaterialStorageStatus}
+			</if>
+			<if test="emergencyProject !=null and emergencyProject != ''">
+				<choose>
+					<when test="emergencyProject == 0">
+						AND (a.emergency_project = #{emergencyProject} or a.emergency_project is null)
+					</when>
+					<otherwise>
+						AND a.emergency_project = #{emergencyProject}
+					</otherwise>
+				</choose>
+			</if>
+			<if test="createBy != null and((createBy.id != null and createBy.id != '') or (createBy.name != null and createBy.name != ''))">
+				AND (a.create_by = #{createBy.id} or sua.name like concat('%',#{createBy.name},'%'))
+			</if>
+
+			<if test="reportData!=null and reportData.number !=null and reportData.number !=''">
+				and (
+				<if test="reportData.number == '暂无报告'">
+					(prd.number = '' or prd.number is null)
+				</if>
+				<if test="reportData.number != '暂无报告'">
+					prd.number like concat('%', #{reportData.number}, '%')
+				</if>
+				)
+			</if>
+
+			<if test="office!=null and office.id=='' and office.name!=null and office.name!='' ">
+				and  o.name like concat('%',#{office.name},'%')
+			</if>
+
+
+			<if test="reportedState !=null and reportedState !=''">
+				<choose>
+					<when test="reportedState == 0">
+						AND a.reported_state is null
+					</when>
+					<otherwise>
+						AND a.reported_state = #{reportedState}
+					</otherwise>
+				</choose>
+			</if>
+
+
+			<if test="projectReportStatus != null">
+				AND
+				<choose>
+					<when test="projectReportStatus != 0">
+						prd.status = #{projectReportStatus}
+					</when>
+					<otherwise>
+						prd.STATUS is null
+					</otherwise>
+				</choose>
+			</if>
+			<if test="submitMoney != null and submitMoney != ''">
+				AND a.submit_money = #{submitMoney}
+			</if>
+
+
+			<if test="typeList !=null and typeList !=''">
+				and a.project_type in
+				<foreach collection="typeList" item="id" index="index" open="(" close=")" separator=",">
+					#{id}
+				</foreach>
+			</if>
+
+			<if test="officeIdList!=null and officeIdList.size!=0">
+				and a.office_id in
+				<foreach collection="officeIdList" item="officeId" separator="," open="(" close=")">
+					#{officeId}
+				</foreach>
+			</if>
+			<if test="reportBeginDate !=null or reportEndDate !=null">
+				AND prd.status in (5,7)
+			</if>
+
+
+			AND  a.status != 7 AND a.del_flag = #{DEL_FLAG_NORMAL}
+			<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
+				AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id} )${sqlMap.dsf} )
+			</if>
+		</where>
+	</select>
+
+	<!-- 批量新增关联关系 -->
+	<insert id="saveProjectPerformance">
+		INSERT INTO project_performance (
+		id,
+		create_by,
+		create_date,
+		update_by,
+		update_date,
+		remarks,
+		del_flag,
+		project_id,
+		project_performance_database_id
+		)
+		VALUES
+		<foreach collection="projectPerformanceList" item="item" separator=",">
+			(
+			#{item.id},
+			#{item.createBy.id},
+			#{item.createDate},
+			#{item.updateBy.id},
+			#{item.updateDate},
+			#{item.remarks},
+			#{item.delFlag},
+			#{item.projectId},
+			#{item.projectPerformanceDatabaseId}
+			)
+		</foreach>
+	</insert>
+
+	<!-- 根据项目ID列表查询已存在的关联记录 -->
+	<select id="findByProjectIdList" resultType="ProjectPerformance">
+		SELECT
+			a.id AS "id",
+			a.create_by AS "createBy.id",
+			a.create_date AS "createDate",
+			a.update_by AS "updateBy.id",
+			a.update_date AS "updateDate",
+			a.remarks AS "remarks",
+			a.del_flag AS "delFlag",
+			a.project_id AS "projectId",
+			a.project_performance_database_id AS "projectPerformanceDatabaseId"
+		FROM project_performance a
+		WHERE a.del_flag = '0'
+		AND a.project_id IN
+		<foreach collection="projectIdList" item="projectId" open="(" close=")" separator=",">
+			#{projectId}
+		</foreach>
+	</select>
+
+	<!-- 批量逻辑删除关联记录 -->
+	<update id="deleteByLogicBatch">
+		UPDATE project_performance SET
+			del_flag = '1',
+			update_by = #{projectPerformanceList[0].updateBy.id},
+			update_date = #{projectPerformanceList[0].updateDate}
+		WHERE del_flag = '0'
+		AND project_id IN
+		<foreach collection="projectPerformanceList" item="item" open="(" close=")" separator=",">
+			#{item.projectId}
+		</foreach>
+	</update>
+
+</mapper>

+ 123 - 0
src/main/resources/mappings/modules/projectPerformanceDatabase/ProjectPerformanceDatabaseDao.xml

@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.modules.projectPerformanceDatabase.dao.ProjectPerformanceDatabaseDao">
+
+	<sql id="businessQuestionsColumns">
+		a.id as "id",
+		a.create_by as "createBy.id",
+		(select name from sys_user user where user.id=a.create_by) as "createBy.name",
+		a.create_date as "createDate",
+		a.update_by as "updateBy.id",
+		a.update_date as "updateDate",
+		a.remarks as "remarks",
+		a.del_flag as "delFlag",
+		a.value as "value",
+		a.sort as "sort",
+		a.office_id as "office.id",
+		a.company_id as "company.id"
+	</sql>
+
+
+	<select id="get" resultType="com.jeeplus.modules.projectPerformanceDatabase.entity.ProjectPerformanceDatabase" >
+		SELECT
+			<include refid="businessQuestionsColumns"/>
+		FROM project_performance_database a
+		WHERE a.id = #{id}
+	</select>
+
+
+	<select id="getCountByValue" resultType="java.lang.Integer" >
+		SELECT
+			count(1)
+		FROM project_performance_database a
+		WHERE a.del_flag = 0 and a.value = #{value}
+	</select>
+
+	<select id="findList" resultType="com.jeeplus.modules.projectPerformanceDatabase.entity.ProjectPerformanceDatabase" >
+		SELECT
+			<include refid="businessQuestionsColumns"/>
+		FROM project_performance_database a
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+            <if test="value != null and value != ''">
+                AND a.value = #{value}
+            </if>
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.sort asc,a.update_date desc
+			</otherwise>
+		</choose>
+	</select>
+
+	<select id="queryCount" resultType="java.lang.Integer" >
+		SELECT count(1)
+		FROM project_performance_database a
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+			<if test="value != null and value != ''">
+				AND a.value = #{value}
+			</if>
+		</where>
+	</select>
+
+	<insert id="insert">
+		INSERT INTO project_performance_database(
+			id,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			remarks,
+			del_flag,
+			`value`,
+			sort,
+			office_id,
+			company_id
+		) VALUES (
+			#{id},
+			#{createBy.id},
+			#{createDate},
+			#{updateBy.id},
+			#{updateDate},
+			#{remarks},
+			#{delFlag},
+
+			#{value},
+			#{sort},
+			#{office.id},
+			#{company.id}
+		)
+	</insert>
+
+	<update id="update">
+		UPDATE project_performance_database SET
+		update_by = #{updateBy.id}
+		,update_date = #{updateDate}
+		,remarks = #{remarks}
+		<if test="value != null and value != ''">
+			,`value` = #{value}
+		</if>
+		<if test="sort != null and sort != ''">
+			,sort = #{sort}
+		</if>
+		WHERE id = #{id}
+	</update>
+
+
+	<!--物理删除-->
+	<update id="delete">
+		DELETE FROM project_performance_database
+		WHERE id = #{id}
+	</update>
+
+	<!--逻辑删除-->
+	<update id="deleteByLogic">
+		UPDATE project_performance_database SET
+			del_flag = #{DEL_FLAG_DELETE}
+		WHERE id = #{id}
+	</update>
+</mapper>

+ 92 - 0
src/main/webapp/webpage/modules/projectPerformanceDatabase/projectPerformanceDatabaseForm.jsp

@@ -0,0 +1,92 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+
+<html>
+<head>
+    <title>业务提问管理</title>
+    <meta name="decorator" content="default"/>
+    <script type="text/javascript" src="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.js"></script>
+    <script type="text/javascript" src="${ctxStatic}/iCheck/icheck.min.js"></script>
+    <script type="text/javascript" src="${ctxStatic}/layui/layui.js"></script>
+    <script src="${ctxStatic}/common/html/js/script.js"></script>
+
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.css"/>
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/css/layui.css"/>
+
+    <script type="text/javascript">
+        var validateForm;
+        var isMasterClient = true;//是否是委托方
+        var clientCount = 0;
+        function doSubmit(i){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                $("#inputForm").submit();
+                return true;
+            }
+
+            return false;
+        }
+        $(document).ready(function() {
+            layui.use(['form', 'layer'], function () {
+                var form = layui.form;
+
+            });
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+
+        });
+
+    </script>
+</head>
+<body>
+<div class="single-form">
+    <div class="container">
+        <sys:message content="${message}"/>
+        <form:form id="inputForm" modelAttribute="projectPerformanceDatabase" action="${ctx}/projectPerformanceDatabase/save" method="post" class="form-horizontal layui-form">
+            <form:hidden path="id"/>
+
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>项目业绩类型</h2></div>
+
+                <div class="layui-item layui-col-sm6 lw6">
+                    <label class="layui-form-label double-line"><span class="require-item">*</span>项目业绩类型名称:</label>
+                    <div class="layui-input-block">
+                        <form:input path="value" placeholder="请输入项目业绩类型名称" htmlEscape="false" maxlength="64" class="form-control layui-input required"/>
+                    </div>
+                </div>
+
+                <div class="layui-item layui-col-sm6 lw6">
+                    <label class="layui-form-label"><span class="require-item">*</span>排序:</label>
+                    <div class="layui-input-block">
+                        <form:input path="sort" placeholder="请输入排序" htmlEscape="false"  maxlength="5" class="form-control layui-input required number"/>
+                    </div>
+                </div>
+
+                <div class="layui-item layui-col-sm12 lw6 with-textarea">
+                    <label class="layui-form-label">备注:</label>
+                    <div class="layui-input-block">
+                        <form:textarea path="remarks" placeholder="请输入备注" htmlEscape="false" rows="3"
+                                       maxlength="200" class="form-control"/>
+                    </div>
+                </div>
+
+            </div>
+
+            <div class="form-group layui-row page-end"></div>
+        </form:form>
+    </div>
+</div>
+</body>
+</html>

+ 248 - 0
src/main/webapp/webpage/modules/projectPerformanceDatabase/projectPerformanceDatabaseList.jsp

@@ -0,0 +1,248 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>知识分享-栏目列表</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript" src="${ctxStatic}/ckeditor/ckeditor.js"></script>
+	<script type="text/javascript">
+
+        $(document).ready(function() {
+            /*//搜索框收放
+            $('#moresee').click(function(){
+                if($('#moresees').is(':visible'))
+                {
+                    $('#moresees').slideUp(0,resizeListWindow1);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-up").addClass("glyphicon glyphicon-menu-down");
+                }else{
+                    $('#moresees').slideDown(0,resizeListWindow1);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-down").addClass("glyphicon glyphicon-menu-up");
+                }
+            });*/
+        });
+
+        function openDialog(title,url,width,height,target) {
+
+            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                width = 'auto';
+                height = 'auto';
+            } else {//如果是PC端,根据用户设置的width和height显示。
+
+            }
+
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                content: url,
+                skin: 'three-btns',
+                btn: ['提交', '关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2: function (index) {
+                }
+            });
+        }
+
+
+		//打开对话框(查看)
+		function openDialogListView(title,url,width,height){
+
+
+			if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+				width='auto';
+				height='auto';
+			}else{//如果是PC端,根据用户设置的width和height显示。
+
+			}
+			$.ajax({
+				async: false,
+				url: url,
+				dataType: "json",
+				success: function (data) {
+					if(data.success){
+						top.layer.open({
+							type: 2,
+							skin: 'one-btn',
+							area: [width, height],
+							title: title,
+							maxmin: true, //开启最大化最小化按钮
+							content: url ,
+							btn: ['关闭'],
+							cancel: function(index){
+							}
+						});
+					}
+				}
+			});
+
+		}
+
+
+
+		function deleteInfo(title,id) {
+
+			layer.open({
+				title: title,
+				maxmin: true, //开启最大化最小化按钮
+				content: '确认要删除项目业绩类型类型吗?',
+				skin: 'two-btns',
+				btn: ['确定', '取消'],
+				btn1: function(index, layero){
+					$.ajax({
+						type:"post",
+						url:"${ctx}/projectPerformanceDatabase/delete?id="+ id,
+						success:function(data){
+							if(data.success) {
+								parent.layer.msg('删除成功', {icon: 1});
+								layer.close(index);
+								window.location.reload();
+							}else {
+								parent.layer.msg(data.message, {icon: 0});
+								layer.close(index);
+							}
+						}
+					})
+
+				},
+				btn2: function (index) {
+				}
+			});
+		}
+	</script>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+	<sys:message content="${message}"/>
+	<div class="layui-row">
+		<div class="full-width fl">
+			<div class="contentShadow layui-row" id="queryDiv">
+
+			<form:form id="searchForm" modelAttribute="projectPerformanceDatabase" action="${ctx}/projectPerformanceDatabase/list" method="post" class="form-inline">
+			<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+			<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+			<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+				<div class="commonQuery">
+					<div class="layui-item query athird">
+						<label class="layui-form-label">业绩类型:</label>
+						<div class="layui-input-block with-icon">
+							<form:input path="value" placeholder="请输入项目业绩类型类型" htmlEscape="false"  class="form-control layui-input"/>
+						</div>
+					</div>
+					<div class="layui-item query athird">
+					</div>
+
+					<div class="layui-item athird">
+						<div class="input-group">
+							<%--<a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>--%>
+							<div class="layui-btn-group search-spacing">
+								<button id="searchQuery" class="layui-btn layui-btn-sm  layui-bg-blue" onclick="search()">查询</button>
+								<button id="searchReset" class="layui-btn layui-btn-sm  " onclick="resetSearch()">重置</button>
+							</div>
+						</div>
+					</div>
+					<div style="    clear:both;"></div>
+				</div>
+				<div id="moresees" style="clear:both;display:none;">
+					<div style="clear:both;"></div>
+				</div>
+			</form:form>
+			</div>
+		</div>
+		<div class="full-width fl">
+			<div class="contentShadow layui-form contentDetails">
+				<div class="nav-btns">
+					<div class="layui-btn-group">
+						<shiro:hasPermission name="knowledgeSharing:knowledgeSharing:add">
+							<table:addRow label="新增项目业绩类型" url="${ctx}/projectPerformanceDatabase/form" title="新增项目业绩类型" height="50%;" width="50%;"></table:addRow><!-- 增加按钮 -->
+						</shiro:hasPermission>
+						<button class="layui-btn layui-btn-sm" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"> 刷新</button>
+					</div>
+				</div>
+				<table class="oa-table layui-table" id="contentTable"></table>
+
+				<!-- 分页代码 -->
+				<table:page page="${page}"></table:page>
+				<div style="clear: both;"></div>
+			</div>
+		</div>
+	</div>
+	<div id="changewidth"></div>
+</div>
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script>
+    layui.use('table', function(){
+        layui.table.render({
+            limit:${ page.pageSize }
+			,id:"checkboxTable"
+            ,elem: '#contentTable'
+            ,page: false
+            ,cols: [[
+                //{checkbox: true, fixed: true},
+				{field:'index',align:'center',  width:40,title: '序号'}
+				,{field:'value',align:'center', title: '项目业绩类型', minWidth:150}
+				,{field:'remarks',align:'center', title: '备注', minWidth:150}
+				,{field:'sort',align:'center', title: '排序', width:150}
+                ,{field:'createName',align:'center', title: '创建人', width:150}
+                ,{field:'createDate', align:'center',title: '创建时间', width:150}
+				,{align:'center',title:"操作",width:150,templet:function(d){
+						////对操作进行初始化
+						var xml = "<div class=\"layui-btn-group\">";
+						if(d.canedit != undefined && d.canedit == "1")
+							xml += "<a href=\"javascript:void(0)\" onclick=\"openDialog('修改项目业绩类型信息', '${ctx}/projectPerformanceDatabase/form?id="+ d.id +"','50%', '50%')\"   class=\"layui-btn layui-btn-xs  layui-bg-green\"> 编辑</a>";
+
+						if((d.candelete != undefined && d.candelete == "1") || d.isAdmin == "1")
+							xml += "<a href=\"javascript:void(0)\" onclick=\"deleteInfo('删除',  '"+d.id+"')\"   class=\"layui-btn layui-btn-xs layui-bg-red\"> 删除</a>";
+						xml+="</div>"
+						return xml;
+					}}
+            ]]
+            ,data: [
+                <c:if test="${ not empty page.list}">
+                <c:forEach items="${page.list}" var="projectPerformanceDatabase" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}"
+                    ,"id":"${projectPerformanceDatabase.id}"
+                    ,"value":"${projectPerformanceDatabase.value}"
+                    ,"sort":"${projectPerformanceDatabase.sort}"
+                    ,"remarks":"${projectPerformanceDatabase.remarks}"
+					,"createName":"${projectPerformanceDatabase.createBy.name}"
+					,"createDate":"<fmt:formatDate value="${projectPerformanceDatabase.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
+					<shiro:hasPermission name="knowledgeSharing:knowledgeSharing:edit">,"canedit":<c:choose><c:when test="${fns:getUser().id == projectPerformanceDatabase.createBy.id}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose></shiro:hasPermission>
+					<shiro:hasPermission name="knowledgeSharing:knowledgeSharing:del">,"candelete":<c:choose><c:when test="${fns:getUser().id == projectPerformanceDatabase.createBy.id}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose></shiro:hasPermission>
+                }
+                </c:forEach>
+                </c:if>
+            ]
+            // ,even: true
+            // ,height: 315
+        });
+
+    })
+
+    resizeListTable();
+</script>
+<script>
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+</script>
+</body>
+</html>

+ 117 - 0
src/main/webapp/webpage/modules/projectPerformanceDatabase/projectPerformanceForm.jsp

@@ -0,0 +1,117 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+
+<html>
+<head>
+    <title>批量驳回选择</title>
+    <meta name="decorator" content="default"/>
+    <script type="text/javascript" src="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.js"></script>
+    <script type="text/javascript" src="${ctxStatic}/iCheck/icheck.min.js"></script>
+    <script type="text/javascript" src="${ctxStatic}/layui/layui.js"></script>
+    <script src="${ctxStatic}/common/html/js/script.js"></script>
+
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.css"/>
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/css/layui.css"/>
+
+    <script type="text/javascript">
+        var validateForm;
+        function doSubmit(i){
+            if(validateForm.form()){
+                $("#inputForm").submit();
+                return true;
+            }
+            return false;
+        }
+        $(document).ready(function() {
+            layui.use(['form', 'layer'], function () {
+                var form = layui.form;
+                form.render();
+            });
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+        });
+    </script>
+    <style>
+        /* 关键:去除默认边距、滚动条 */
+        html, body {
+            margin: 0;
+            padding: 0;
+            height: 100%;
+            overflow: hidden;
+        }
+        /* 表单容器紧凑化 */
+        .single-form {
+            padding: 10px 15px;
+            height: auto;
+        }
+        .container {
+            padding: 0;
+            margin: 0;
+        }
+        /* 调整标题和表单间距 */
+        .form-group {
+            margin-bottom: 10px;
+        }
+        .form-group-label h2 {
+            margin: 0 0 15px 0;
+            font-size: 18px;
+        }
+        /* 调整输入框高度和边距 */
+        .layui-input-block {
+            margin-left: 110px;
+        }
+        .layui-form-label {
+            width: 100px;
+            padding: 9px 0;
+        }
+        /* 去掉底部多余间距 */
+        .page-end {
+            display: none;
+        }
+    </style>
+</head>
+<body>
+<div class="single-form">
+    <div class="container">
+        <sys:message content="${message}"/>
+
+        <!-- 表单ID必须是 inputForm 才能被你的框架识别 -->
+        <form:form id="inputForm" modelAttribute="projectPerformanceDatabase"
+                   action="${ctx}/projectPerformance/saveProjectPerformance"
+                   method="post" class="form-horizontal layui-form">
+
+            <input type="hidden" id="listId" name="listId" value="${listId}"/>
+
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>批量驳回设置</h2></div>
+
+                <div class="layui-item layui-col-sm6 lw6">
+                    <label class="layui-form-label double-line"><span class="require-item">*</span>选择业绩类型:</label>
+                    <div class="layui-input-block">
+                        <select name="projectPerformanceDatabaseId" class="form-control layui-input required">
+                            <option value="">请选择业绩类型</option>
+                            <c:forEach items="${projectPerformanceDatabaseList}" var="item">
+                                <option value="${item.id}">${item.value}</option>
+                            </c:forEach>
+                        </select>
+                    </div>
+                </div>
+            </div>
+        </form:form>
+    </div>
+</div>
+</body>
+</html>

文件差异内容过多而无法显示
+ 1193 - 0
src/main/webapp/webpage/modules/projectPerformanceDatabase/projectPerformanceList.jsp