瀏覽代碼

跟踪咨询报告

[user3] 4 年之前
父節點
當前提交
2f59f36476

+ 4 - 0
src/main/java/com/jeeplus/modules/projectConstruction/service/ContractService.java

@@ -10,6 +10,8 @@ import com.jeeplus.common.service.CrudService;
 import com.jeeplus.common.utils.SpringContextHolder;
 import com.jeeplus.modules.projectConstruction.dao.ContractDao;
 import com.jeeplus.modules.projectConstruction.entity.ConstructionContract;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectContentData;
+import com.jeeplus.modules.projectcontroltable.entity.ProjectControlTable;
 import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
 import com.jeeplus.modules.serialnum.service.SerialNumTplService;
 import com.jeeplus.modules.sys.dao.AreaDao;
@@ -58,6 +60,7 @@ public class ContractService extends CrudService<ContractDao,ConstructionContrac
     @Autowired
     private WorkClientAttachmentDao workClientAttachmentDao;
 
+
     /**
      * 获取客户列表信息
      * @param
@@ -130,6 +133,7 @@ public class ContractService extends CrudService<ContractDao,ConstructionContrac
                     workClientAttachmentDao.delete(workClientAttachment);
                 }
             }
+
         }
         return count;
     }

+ 218 - 43
src/main/java/com/jeeplus/modules/projectConstruction/web/ContractController.java

@@ -17,6 +17,7 @@ import com.jeeplus.common.web.BaseController;
 import com.jeeplus.modules.act.entity.Act;
 import com.jeeplus.modules.act.service.ActTaskService;
 import com.jeeplus.modules.act.utils.ActUtils;
+import com.jeeplus.modules.project.entity.Project;
 import com.jeeplus.modules.projectConstruction.entity.ConstructionContract;
 import com.jeeplus.modules.projectConstruction.service.ContractService;
 import com.jeeplus.modules.projectType.entity.ProjectTemplateType;
@@ -27,10 +28,7 @@ import com.jeeplus.modules.projectcontentinfo.entity.*;
 import com.jeeplus.modules.projectcontentinfo.service.*;
 import com.jeeplus.modules.projectcontroltable.entity.ProjectControlTable;
 import com.jeeplus.modules.projectcontroltable.service.ProjectControlTableService;
-import com.jeeplus.modules.projectrecord.entity.ProjectImplementEarly;
-import com.jeeplus.modules.projectrecord.entity.ProjectPaymentTreeData;
-import com.jeeplus.modules.projectrecord.entity.ProjectRecordTreeData;
-import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
+import com.jeeplus.modules.projectrecord.entity.*;
 import com.jeeplus.modules.projectrecord.enums.ProjectStatusEnum;
 import com.jeeplus.modules.projectrecord.service.ProjectImplementEarlyService;
 import com.jeeplus.modules.projectrecord.service.ProjectRecordsService;
@@ -79,7 +77,6 @@ import java.util.*;
 
 /**
  * 施工合同管理Controller
-
  */
 @Controller
 @RequestMapping(value = "${adminPath}/project/constructionContract")
@@ -96,6 +93,8 @@ public class ContractController extends BaseController {
     private ProjectContentDataService projectContentDataService;
     @Autowired
     private ProjectcontentinfoService projectcontentinfoService;
+    @Autowired
+    private ProjectControlTableService projectControlTableService;
 
     /*@ModelAttribute
     public ConstructionContract get(@RequestParam(required=false) String id) {
@@ -131,8 +130,8 @@ public class ContractController extends BaseController {
         }
         Page<ConstructionContract> page = contractService.findPage(new Page<ConstructionContract>(request, response), constructionContract);
         model.addAttribute("page", page);*/
-        if(UserUtils.isManager()){
-            model.addAttribute("flag","1");
+        if (UserUtils.isManager()) {
+            model.addAttribute("flag", "1");
         }
         Page<ProjectImplementEarly> page = projectImplementEarlyService.findProjectPage(new Page<ProjectImplementEarly>(request, response), projectRecords);
         //无合同状态下,获取委托方的名称
@@ -146,15 +145,15 @@ public class ContractController extends BaseController {
      */
     @RequestMapping(value = "getProjectList")
     @ResponseBody
-    public Map<String,List> getProjectList(ProjectImplementEarly projectRecords, HttpServletRequest request, HttpServletResponse response, Model model) {
-        if(UserUtils.isManager()){
-            model.addAttribute("flag","1");
+    public Map<String, List> getProjectList(ProjectImplementEarly projectRecords, HttpServletRequest request, HttpServletResponse response, Model model) {
+        if (UserUtils.isManager()) {
+            model.addAttribute("flag", "1");
         }
         Page<ProjectImplementEarly> page = projectImplementEarlyService.findProjectPage(new Page<ProjectImplementEarly>(request, response), projectRecords);
         //无合同状态下,获取委托方的名称
         List<ProjectImplementEarly> list = page.getList();
         List<ProjectRecordTreeData> projectRecordTreeDataList = new ArrayList<>();
-        Map<String,List> map = new HashMap<>();
+        Map<String, List> map = new HashMap<>();
         for (int i = 0; i < list.size(); i++) {
             ProjectRecordTreeData projectRecordTreeData = new ProjectRecordTreeData();
             ProjectImplementEarly records1 = list.get(i);
@@ -171,10 +170,10 @@ public class ContractController extends BaseController {
             projectRecordTreeData.setProjectName(records1.getProjectName());
             projectRecordTreeData.setProjectId(records1.getProjectId());
             projectRecordTreeData.setProjectContentId(records1.getProjectContentId());
-            if(null!= records1.getWorkContractInfo()){
+            if (null != records1.getWorkContractInfo()) {
                 projectRecordTreeData.setContractName(records1.getWorkContractInfo().getName());
                 projectRecordTreeData.setClientName(records1.getWorkContractInfo().getClient().getName());
-            }else{
+            } else {
                 projectRecordTreeData.setContractName("");
                 projectRecordTreeData.setClientName("");
             }
@@ -188,7 +187,7 @@ public class ContractController extends BaseController {
             List<User> masterUserList = records1.getProjectLeaders();
             List<String> masterList = new ArrayList<>();
             Set masterIdSet = new HashSet();
-            for (User masterUser:masterUserList) {
+            for (User masterUser : masterUserList) {
                 masterList.add(masterUser.getName());
                 masterIdSet.add(masterUser.getId());
             }
@@ -197,10 +196,10 @@ public class ContractController extends BaseController {
             List<String> masterIdList = new ArrayList<>(masterIdSet);
             //如果当前登录人为项目登记者或项目负责人则允许其添加子节点信息
             for (String masterId : masterIdList) {
-                if(masterId.equals(UserUtils.getUser().getId())){
+                if (masterId.equals(UserUtils.getUser().getId())) {
                     projectRecordTreeData.setOperationSign(1);
                     break;
-                }else{
+                } else {
                     projectRecordTreeData.setOperationSign(0);
                 }
             }
@@ -213,12 +212,11 @@ public class ContractController extends BaseController {
 
             //根据项目id查询合同的集合
             List<ConstructionContract> contractList = contractService.find(records1.getId());
-            if(0 != contractList.size()){
-                for(int j=0;j<contractList.size();j++){
-                    ProjectRecordTreeData treeNew=new ProjectRecordTreeData();
-                    ConstructionContract contract=contractList.get(j);
+            if (0 != contractList.size()) {
+                for (int j = 0; j < contractList.size(); j++) {
+                    ProjectRecordTreeData treeNew = new ProjectRecordTreeData();
+                    ConstructionContract contract = contractList.get(j);
                     treeNew.setId(contract.getId()); //合同Id
-
                     treeNew.setPid(records1.getId());//子类父id也就是项目Id
                     treeNew.setProjectId(contract.getCnumber());
                     treeNew.setProjectName(contract.getContractName());
@@ -229,10 +227,10 @@ public class ContractController extends BaseController {
                     treeNew.setCreateDate(contract.getCreateDate());
                     //如果当前登录人为项目登记者或项目负责人则允许其添加子节点信息
                     for (String masterId : masterIdList) {
-                        if(masterId.equals(UserUtils.getUser().getId())){
+                        if (masterId.equals(UserUtils.getUser().getId())) {
                             treeNew.setOperationSign(1);
                             break;
-                        }else{
+                        } else {
                             treeNew.setOperationSign(0);
                         }
 
@@ -241,18 +239,17 @@ public class ContractController extends BaseController {
                 }
             }
         }
-        map.put("data",projectRecordTreeDataList);
+        map.put("data", projectRecordTreeDataList);
         return map;
     }
 
 
-
     /**
      * 跳转添加合同页面
      */
     @RequestMapping(value = "form")
     public String form(ConstructionContract constructionContract, Model model) {
-        if (constructionContract!=null&&StringUtils.isNotBlank(constructionContract.getId())) {
+        if (constructionContract != null && StringUtils.isNotBlank(constructionContract.getId())) {
             constructionContract = contractService.get(constructionContract.getId());
             ProjectRecords projectRecords = projectRecordsService.get(constructionContract.getProjectId());
             constructionContract.setProjectName(projectRecords.getProjectName());
@@ -261,8 +258,8 @@ public class ContractController extends BaseController {
             attchment.setAttachmentId(constructionContract.getId());
             List<WorkClientAttachment> attachments = workClientAttachmentDao.findList(attchment);
             constructionContract.setWorkAttachments(attachments);
-        }else {
-            ProjectRecords records =contractService.getRecords(constructionContract.getProjectId());
+        } else {
+            ProjectRecords records = contractService.getRecords(constructionContract.getProjectId());
             constructionContract.setCreateBy(UserUtils.getUser());
             constructionContract.setCreateDate(new Date());
             constructionContract.setProjectName(records.getProjectName());
@@ -272,9 +269,9 @@ public class ContractController extends BaseController {
     }
 
 
-
     /**
      * 查看
+     *
      * @param
      * @param model
      * @return
@@ -305,12 +302,12 @@ public class ContractController extends BaseController {
         constructionContract.setTitularAmt(shiftDouble(constructionContract.getTitularAmtStr()));
         constructionContract.setStopAmt(shiftDouble(constructionContract.getStopAmtStr()));
         contractService.insertContract(constructionContract);
-        return "redirect:"+Global.getAdminPath()+"/project/constructionContract/?repage";
+        return "redirect:" + Global.getAdminPath() + "/project/constructionContract/?repage";
     }
 
-    private static Double shiftDouble(String moneyStr){
-        if(StringUtils.isNotBlank(moneyStr)){
-            moneyStr = moneyStr.replaceAll(",","");
+    private static Double shiftDouble(String moneyStr) {
+        if (StringUtils.isNotBlank(moneyStr)) {
+            moneyStr = moneyStr.replaceAll(",", "");
             Double money = Double.parseDouble(moneyStr);
             return money;
         }
@@ -318,12 +315,12 @@ public class ContractController extends BaseController {
     }
 
     @RequestMapping("selectcontent")
-    public String gridSelect(ProjectImplementEarly projectRecords, String searchLabel ,HttpServletRequest request, HttpServletResponse response, Model model) throws UnsupportedEncodingException {
+    public String gridSelect(ProjectImplementEarly projectRecords, String searchLabel, HttpServletRequest request, HttpServletResponse response, Model model) throws UnsupportedEncodingException {
         model.addAttribute("obj", projectRecords);
         Page<ProjectImplementEarly> page = projectImplementEarlyService.findProjectPage(new Page<ProjectImplementEarly>(request, response), projectRecords);
-        model.addAttribute("page",page);
+        model.addAttribute("page", page);
         searchLabel = URLDecoder.decode(searchLabel, "UTF-8");
-        model.addAttribute("searchLabel",searchLabel);
+        model.addAttribute("searchLabel", searchLabel);
         return "modules/sys/gridselectProjectList";
     }
 
@@ -343,19 +340,197 @@ public class ContractController extends BaseController {
      */
     @RequestMapping(value = "delete")
     @ResponseBody
-    public Map<String,Object> delete(ConstructionContract constructionContract, RedirectAttributes redirectAttributes) {
-        Map<String,Object> j= new HashMap<>();
+    public Map<String, Object> delete(ConstructionContract constructionContract, RedirectAttributes redirectAttributes) {
+        Map<String, Object> j = new HashMap<>();
         try {
             contractService.delete(constructionContract);
-            j.put("status",true);
-            j.put("msg","删除成功");
+            j.put("status", true);
+            j.put("msg", "删除成功");
             addMessage(redirectAttributes, "删除成功");
-        }catch (Exception e){
-            j.put("status",false);
-            j.put("msg","删除失败");
+        } catch (Exception e) {
+            j.put("status", false);
+            j.put("msg", "删除失败");
             addMessage(redirectAttributes, "删除失败");
         }
         return j;
     }
 
+
+    /**
+     * 跟踪咨询报告页面
+     */
+    @RequiresPermissions("project:constructionContract:list")
+    @RequestMapping(value = "projectFollow")
+    public String projectFollowList(HttpServletRequest request, HttpServletResponse response, Model model, ProjectImplementEarly projectRecords) {
+        if (UserUtils.isManager()) {
+            model.addAttribute("flag", "1");
+        }
+        Page<ProjectImplementEarly> page = projectImplementEarlyService.findProjectPage(new Page<ProjectImplementEarly>(request, response), projectRecords);
+        //无合同状态下,获取委托方的名称
+        List<ProjectImplementEarly> list = page.getList();
+        model.addAttribute("page", page);
+        return "modules/ProjectFollowReport/ProjectFollowReportList";
+    }
+
+
+    /**
+     * 跟踪咨询报告页面数据列表
+     */
+    @RequestMapping(value = "getProjectFollowList")
+    @ResponseBody
+    public Map<String, List> getProjectFollowList(ProjectFollowReport projectFollowReport, HttpServletRequest request, HttpServletResponse response, Model model, ProjectImplementEarly projectRecords) {
+        //查询所有项目信息
+        Page<ProjectImplementEarly> page = projectImplementEarlyService.findProjectPage(new Page<ProjectImplementEarly>(request, response), projectRecords);
+        //无合同状态下,获取委托方的名称
+        List<ProjectImplementEarly> list = page.getList();
+        List<ProjectRecordTreeData> projectRecordTreeDataList = new ArrayList<>();
+        Map<String, List> map = new HashMap<>();
+        for (int i = 0; i < list.size(); i++) {
+            //树形结构返回
+            ProjectRecordTreeData projectRecordTreeData = new ProjectRecordTreeData();
+            ProjectImplementEarly records1 = list.get(i);
+            if (records1.getWorkContractInfo() == null) {
+                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);
+                }
+            }
+            //将界面需要展示数据放入类中
+            //获取项目id
+            projectRecordTreeData.setId(records1.getId());
+            projectRecordTreeData.setProjectName(records1.getProjectName());
+            projectRecordTreeData.setProjectId(records1.getProjectId());
+            projectRecordTreeData.setProjectContentId(records1.getProjectContentId());
+            if (null != records1.getWorkContractInfo()) {
+                projectRecordTreeData.setContractName(records1.getWorkContractInfo().getName());
+                projectRecordTreeData.setClientName(records1.getWorkContractInfo().getClient().getName());
+            } else {
+                projectRecordTreeData.setContractName("");
+                projectRecordTreeData.setClientName("");
+            }
+            projectRecordTreeData.setProjectStatus(records1.getProjectStatus());
+            projectRecordTreeData.setProjectRegistrant(records1.getProjectRegistrant());
+            projectRecordTreeData.setCreateDate(records1.getCreateDate());
+            projectRecordTreeData.setCreateId(records1.getCreateBy().getId());
+            //父节点的pid设置为0
+            projectRecordTreeData.setPid("0");
+            //遍历项目负责人信息
+            List<User> masterUserList = records1.getProjectLeaders();
+            List<String> masterList = new ArrayList<>();
+            Set masterIdSet = new HashSet();
+            for (User masterUser : masterUserList) {
+                masterList.add(masterUser.getName());
+                masterIdSet.add(masterUser.getId());
+            }
+            //masterIdSet.add(records1.getCreateBy().getId());
+            //Set转List
+            List<String> masterIdList = new ArrayList<>(masterIdSet);
+            //如果当前登录人为项目登记者或项目负责人则允许其添加子节点信息
+            for (String masterId : masterIdList) {
+                if (masterId.equals(UserUtils.getUser().getId())) {
+                    projectRecordTreeData.setOperationSign(1);
+                    break;
+                } else {
+                    projectRecordTreeData.setOperationSign(0);
+                }
+            }
+
+            //项目负责人list数据转String
+            String projectLeader = masterList.toString().replaceAll("(?:\\[|null|\\]| +)", "");
+            projectRecordTreeData.setProjectLeader(projectLeader);
+            projectRecordTreeData.setLoginId(UserUtils.getUser().getId());
+            projectRecordTreeDataList.add(projectRecordTreeData);
+            //获取子集数据
+            String id = records1.getId();
+            if (null != id && !"".equals(id)) {
+                List<ProjectFollowReport> contractList = projectImplementEarlyService.find(id);
+                if (contractList.size() > 0) {
+                    for (int j = 0; j < contractList.size(); j++) {
+                        ProjectRecordTreeData treeNew = new ProjectRecordTreeData();
+                        ProjectFollowReport report = contractList.get(j);
+                        treeNew.setId(report.getId());
+                        treeNew.setPid(report.getProject().getId());
+                        treeNew.setProjectId(report.getProjectFollowId());
+                        treeNew.setProjectName(report.getProjectFollowName());
+                        treeNew.setCreateDate(report.getCreateDate());
+                        treeNew.setProjectLeader(projectLeader);
+                        User user = UserUtils.get(report.getCreateBy().getId());
+                        treeNew.setProjectRegistrant(user.getName());
+                        treeNew.setOperationSign(1);
+                        projectRecordTreeDataList.add(treeNew);
+                    }
+                }
+            }
+
+        }
+        map.put("data", projectRecordTreeDataList);
+        return map;
+    }
+
+    @RequestMapping(value = "followForm")
+    public String followForm(ProjectFollowReport projectFollowReport, HttpServletRequest request, HttpServletResponse response, Model model, RedirectAttributes attr) {
+        String id = projectFollowReport.getId();
+        if (null != id && !"".equals(id)) {
+            //通过id获取跟踪咨询报告信息
+            ProjectFollowReport follow = projectImplementEarlyService.getFollow(projectFollowReport);
+            //判断是否有project.Id值
+            //有project.Id需要查询
+            if (null == follow.getProject()) {
+                ProjectRecords project = new ProjectRecords();
+                follow.setProject(project);
+                follow.getProject().setId(projectFollowReport.getProject().getId());
+            }
+            /**获取项目的附件信息*/
+            WorkClientAttachment attchment = new WorkClientAttachment();
+            attchment.setAttachmentId(projectFollowReport.getId());
+            List<WorkClientAttachment> attachments = workClientAttachmentDao.findList(attchment);
+            follow.setWorkAttachments(attachments);
+            model.addAttribute("projectFollowReport", follow);
+            return "modules/projectrecord/workContentFromAndView/workFollowForm";
+        }
+
+        //查询是否含有上传或者引用的依据性文件信息
+        if(com.jeeplus.common.utils.StringUtils.isNotBlank(id)){
+            List<ProjectControlTable> controlData = projectControlTableService.getControlData(id,"");
+//            projectFollowReport.setProjectControlTableList(controlData);
+//            projectContentDataService.queryBasedData(projectFollowReport);
+        }
+        model.addAttribute("projectFollowReport", projectFollowReport);
+        model.addAttribute("flag", "complement");
+        return "modules/projectrecord/workContentFromAndView/workFollowForm";
+    }
+
+    @RequestMapping(value = "saveFollow")
+    public String saveFollow(ProjectFollowReport projectFollowReport, Model model, RedirectAttributes redirectAttributes) {
+//        projectImplementEarlyService.insertFollow(projectFollowReport);
+        if (null != projectFollowReport.getId() && !"".equals(projectFollowReport.getId())) {
+            projectImplementEarlyService.updateFollow(projectFollowReport);
+        } else {
+            projectImplementEarlyService.insertFollow(projectFollowReport);
+        }
+        return "redirect:" + Global.getAdminPath() + "/project/constructionContract/projectFollow";
+    }
+
+
+    /**
+     * 删除依据性资料
+     */
+    @RequestMapping(value = "deleteFollow")
+    @ResponseBody
+    public Map<String, Object> deleteFollow(ProjectFollowReport projectFollowReport, RedirectAttributes redirectAttributes) {
+        Map<String, Object> j = new HashMap<>();
+        try {
+            projectImplementEarlyService.deleteFollow(projectFollowReport);
+            j.put("status", true);
+            j.put("msg", "删除成功");
+            addMessage(redirectAttributes, "删除成功");
+        } catch (Exception e) {
+            j.put("status", false);
+            j.put("msg", "删除失败");
+            addMessage(redirectAttributes, "删除失败");
+        }
+        return j;
+    }
 }

+ 30 - 0
src/main/java/com/jeeplus/modules/projectrecord/dao/ProjectFollowReportDao.java

@@ -0,0 +1,30 @@
+package com.jeeplus.modules.projectrecord.dao;
+
+import com.jeeplus.common.persistence.CrudDao;
+import com.jeeplus.common.persistence.annotation.MyBatisDao;
+import com.jeeplus.modules.projectrecord.entity.ProjectFollowReport;
+
+import java.util.List;
+
+/**
+ * 跟踪咨询报告Dao
+ * @author enford
+ * @Version 2020-08-10
+ */
+@MyBatisDao
+public interface ProjectFollowReportDao extends CrudDao<ProjectFollowReport> {
+
+    /**查询根据报告表中数据集合
+     * @param entity-跟踪咨询报告实体类
+     * @return list集合*/
+    @Override
+    List<ProjectFollowReport> findList(ProjectFollowReport entity);
+
+
+    List<ProjectFollowReport> find(String projectId);
+
+    void insertFollow(ProjectFollowReport projectFollowReport);
+
+
+
+}

+ 135 - 0
src/main/java/com/jeeplus/modules/projectrecord/entity/ProjectFollowReport.java

@@ -0,0 +1,135 @@
+package com.jeeplus.modules.projectrecord.entity;
+
+import com.google.common.collect.Lists;
+import com.jeeplus.common.persistence.ActEntity;
+import com.jeeplus.common.persistence.TreeEntity;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectBasedData;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectContentData;
+import com.jeeplus.modules.projectcontroltable.entity.ProjectControlTable;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
+
+import java.util.List;
+
+/**
+ * 跟踪咨询报告entity
+ * @author enford
+ * @Version 2020-08-10
+ */
+public class ProjectFollowReport extends TreeEntity<ProjectFollowReport> {
+    private static final long serialVersionUID = 1L;
+    /**项目id*/
+    private ProjectRecords project;
+    /**跟踪咨询报告id*/
+    private String projectFollowId;
+    /**跟踪咨询报告名称*/
+    private String projectFollowName;
+    /**项目负责人*/
+    private List<User> projectLeaders;
+    /**项目登记人*/
+    private String projectRegistrant;
+    /**项目登记日期*/
+    private String projectRegistrationDate;
+    /**报告号*/
+    private String projectReportId;
+    /**字典类型*/
+    private String dictType;
+
+    private ProjectContentData projectContentData;
+
+
+    private List<WorkClientAttachment> workAttachments;
+
+
+    public ProjectRecords getProject() {
+        return project;
+    }
+
+    public void setProject(ProjectRecords project) {
+        this.project = project;
+    }
+
+    public String getProjectFollowId() {
+        return projectFollowId;
+    }
+
+    public void setProjectFollowId(String projectFollowId) {
+        this.projectFollowId = projectFollowId;
+    }
+
+    public String getProjectFollowName() {
+        return projectFollowName;
+    }
+
+    public void setProjectFollowName(String projectFollowName) {
+        this.projectFollowName = projectFollowName;
+    }
+
+    public List<User> getProjectLeaders() {
+        return projectLeaders;
+    }
+
+    public void setProjectLeaders(List<User> projectLeaders) {
+        this.projectLeaders = projectLeaders;
+    }
+
+    public String getProjectRegistrant() {
+        return projectRegistrant;
+    }
+
+    public void setProjectRegistrant(String projectRegistrant) {
+        this.projectRegistrant = projectRegistrant;
+    }
+
+    public String getProjectRegistrationDate() {
+        return projectRegistrationDate;
+    }
+
+    public void setProjectRegistrationDate(String projectRegistrationDate) {
+        this.projectRegistrationDate = projectRegistrationDate;
+    }
+
+    public List<WorkClientAttachment> getWorkAttachments() {
+        return workAttachments;
+    }
+
+    public void setWorkAttachments(List<WorkClientAttachment> workAttachments) {
+        this.workAttachments = workAttachments;
+    }
+
+
+    public String getProjectReportId() {
+        return projectReportId;
+    }
+
+    public void setProjectReportId(String projectReportId) {
+        this.projectReportId = projectReportId;
+    }
+
+
+    public ProjectContentData getProjectContentData() {
+        return projectContentData;
+    }
+
+    public void setProjectContentData(ProjectContentData projectContentData) {
+        this.projectContentData = projectContentData;
+    }
+
+    @Override
+    public ProjectFollowReport getParent() {
+        return null;
+    }
+
+    @Override
+    public void setParent(ProjectFollowReport parent) {
+
+    }
+
+    public String getDictType() {
+        return dictType;
+    }
+
+    public void setDictType(String dictType) {
+        this.dictType = dictType;
+    }
+}

+ 70 - 0
src/main/java/com/jeeplus/modules/projectrecord/service/ProjectImplementEarlyService.java

@@ -4,18 +4,24 @@ import com.jeeplus.common.persistence.Page;
 import com.jeeplus.common.service.CrudService;
 import com.jeeplus.common.utils.Collections3;
 import com.jeeplus.common.utils.MenuStatusEnum;
+import com.jeeplus.modules.projectConstruction.entity.ConstructionContract;
 import com.jeeplus.modules.projectType.dao.ProjectTypeDao;
 import com.jeeplus.modules.projectType.entity.ProjectType;
+import com.jeeplus.modules.projectrecord.dao.ProjectFollowReportDao;
 import com.jeeplus.modules.projectrecord.dao.ProjectImplementEarlyDao;
 import com.jeeplus.modules.projectrecord.dao.WorkProjectUserDao;
 import com.jeeplus.modules.projectrecord.entity.ProjectAttachmentInfo;
+import com.jeeplus.modules.projectrecord.entity.ProjectFollowReport;
 import com.jeeplus.modules.projectrecord.entity.ProjectImplementEarly;
 import com.jeeplus.modules.sys.entity.User;
 import com.jeeplus.modules.sys.utils.DictUtils;
 import com.jeeplus.modules.sys.utils.UserUtils;
+import com.jeeplus.modules.workclientinfo.dao.WorkClientAttachmentDao;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
 import com.jeeplus.modules.workclientinfo.entity.WorkClientInfo;
 import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
 import com.jeeplus.modules.workcontractinfo.service.WorkContractInfoService;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -37,6 +43,10 @@ public class ProjectImplementEarlyService extends CrudService<ProjectImplementEa
     private ProjectTypeDao projectTypeDao;
     @Autowired
     private WorkProjectUserDao workProjectUserDao;
+    @Autowired
+    private ProjectFollowReportDao projectFollowReportDao;
+    @Autowired
+    private WorkClientAttachmentDao workClientAttachmentDao;
 
     public ProjectImplementEarly get(String id) {
         return super.get(id);
@@ -65,6 +75,59 @@ public class ProjectImplementEarlyService extends CrudService<ProjectImplementEa
         return page;
     }
 
+    public Page<ProjectFollowReport> findFollowPage(Page<ProjectFollowReport> page, ProjectFollowReport projectFollowReport) {
+        projectFollowReport.setPage(page);
+        List<ProjectFollowReport> list = projectFollowReportDao.findList(projectFollowReport);
+        page.setList(list);
+        return page;
+    }
+
+    @Transactional(readOnly = true)
+    public List<ProjectFollowReport> find(String projectId) {
+        return  projectFollowReportDao.find(projectId);
+    }
+
+    @Transactional(readOnly = false)
+    public void deleteFollow(ProjectFollowReport projectFollowReport) {
+        projectFollowReportDao.delete(projectFollowReport);
+    }
+
+    @Transactional(readOnly = false)
+    public void updateFollow(ProjectFollowReport projectFollowReport) {
+        projectFollowReportDao.update(projectFollowReport);
+    }
+
+    @Transactional(readOnly = false)
+    public void insertFollow(ProjectFollowReport projectFollowReport) {
+        projectFollowReport.preInsert();
+        projectFollowReportDao.insertFollow(projectFollowReport);
+        if (projectFollowReport.getWorkAttachments()!=null && !projectFollowReport.getWorkAttachments().isEmpty()) {
+            //保存附件信息
+            for (WorkClientAttachment workClientAttachment : projectFollowReport.getWorkAttachments()) {
+                if (org.apache.commons.lang3.StringUtils.isBlank(workClientAttachment.getId())&& org.apache.commons.lang3.StringUtils.isNotBlank(workClientAttachment.getAttachmentId())) {
+                    continue;
+                }
+                if (org.apache.commons.lang3.StringUtils.isBlank(workClientAttachment.getId())&& org.apache.commons.lang3.StringUtils.isBlank(workClientAttachment.getUrl())) {
+                    continue;
+                }
+                if (WorkClientAttachment.DEL_FLAG_NORMAL.equals(workClientAttachment.getDelFlag())) {
+                    workClientAttachment.setAttachmentId(projectFollowReport.getId());
+                    workClientAttachment.setAttachmentFlag("134");
+                    workClientAttachment.setAttachmentUser(UserUtils.getUser().getId());
+                    if (StringUtils.isBlank(workClientAttachment.getId()) || "null".equals(workClientAttachment.getId())) {
+                        workClientAttachment.preInsert();
+                        workClientAttachmentDao.insert(workClientAttachment);
+                    } else {
+                        workClientAttachment.preUpdate();
+                        workClientAttachmentDao.update(workClientAttachment);
+                    }
+                } else {
+                    workClientAttachmentDao.delete(workClientAttachment);
+                }
+            }
+        }
+    }
+
     /**
      * 查询合同信息
      * @param projectRecords
@@ -140,4 +203,11 @@ public class ProjectImplementEarlyService extends CrudService<ProjectImplementEa
     public Integer getProjectContrntAndReport (String contentId,String reportId){
         return dao.getProjectContrntAndReport(contentId,reportId);
     }
+
+    /**
+     * 通过id获取跟踪咨询报告的基础信息
+     */
+    public ProjectFollowReport getFollow(ProjectFollowReport projectFollowReport) {
+        return projectFollowReportDao.get(projectFollowReport.getId());
+    }
 }

+ 167 - 0
src/main/resources/mappings/modules/projectrecord/ProjectFollowReport/ProjectFollowReport.xml

@@ -0,0 +1,167 @@
+<?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.projectrecord.dao.ProjectFollowReportDao">
+
+    <sql id="projectcontentinfoColumns">
+        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.parent_id AS "parent.id",
+		a.parent_ids AS "parentIds",
+		a.sort AS "sort",
+		a.project_id AS "project.id",
+		a.company_id AS "companyId",
+		a.office_id AS "officeId",
+		a.type AS "type",
+		a.info_id AS "infoId",
+		a.dict_type AS "dictType",
+		a.name AS "name",
+		a.link_id AS "linkId"
+    </sql>
+
+    <sql id="projectContentDataColumns">
+        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.company_id AS "companyId",
+		a.office_id AS "officeId",
+		a.name as "name",
+		a.contract_id as "contractId"
+    </sql>
+
+
+    <select id="get" resultType="com.jeeplus.modules.projectrecord.entity.ProjectFollowReport">
+        SELECT *
+        FROM sj_project_registration a
+                 LEFT JOIN sys_user su ON su.id = a.create_by
+        WHERE a.id = #{id}
+    </select>
+
+
+    <select id="findList" resultType="com.jeeplus.modules.projectrecord.entity.ProjectFollowReport">
+        SELECT
+        *
+        FROM sj_project_registration a
+        <where>
+            1=1
+        </where>
+        <choose>
+            <when test="page !=null and page.orderBy != null and page.orderBy != ''">
+                ORDER BY ${page.orderBy}
+            </when>
+            <otherwise>
+                ORDER BY a.update_date DESC
+            </otherwise>
+        </choose>
+    </select>
+
+    <select id="find" resultType="com.jeeplus.modules.projectrecord.entity.ProjectFollowReport">
+        SELECT
+        a.id,
+        a.projectFollowId,
+        a.projectFollowName,
+        a.projectId as `project.id`,
+        a.create_by AS "createBy.id",
+        a.create_date AS "createDate"
+        FROM sj_project_registration a
+        <where>
+            a.projectId = #{projectId}
+        </where>
+    </select>
+
+    <select id="findAllList" resultType="com.jeeplus.modules.projectrecord.entity.ProjectFollowReport">
+        SELECT
+        *
+        FROM sj_project_registration a
+        <where>
+            a.del_flag = #{DEL_FLAG_NORMAL}
+            ${dataScope}
+        </where>
+        <choose>
+            <when test="page !=null and page.orderBy != null and page.orderBy != ''">
+                ORDER BY ${page.orderBy}
+            </when>
+            <otherwise>
+                ORDER BY a.update_date DESC
+            </otherwise>
+        </choose>
+    </select>
+
+    <insert id="insert">
+        INSERT INTO sj_project_registration
+        (id,
+         create_by,
+         create_date,
+         update_by,
+         update_date,
+         del_flag,
+         projectFollowId,
+         projectFollowName,
+         projectId)
+        VALUES (#{id},
+                #{createBy.id},
+                #{createDate},
+                #{updateBy.id},
+                #{updateDate},
+                #{delFlag},
+                #{projectFollowId},
+                #{projectFollowName},
+                #{projectId})
+    </insert>
+
+    <insert id="insertFollow">
+        INSERT INTO sj_project_registration
+        (id,
+         create_by,
+         create_date,
+         update_by,
+         update_date,
+         del_flag,
+         projectFollowId,
+         projectFollowName,
+         projectId)
+        VALUES (#{id},
+                #{createBy.id},
+                #{createDate},
+                #{updateBy.id},
+                #{updateDate},
+                #{delFlag},
+                #{projectFollowId},
+                #{projectFollowName},
+                #{project.id})
+    </insert>
+
+    <update id="update">
+        UPDATE sj_project_registration
+        SET update_by   = #{updateBy.id},
+            update_date = #{updateDate},
+            projectFollowId = #{projectFollowId},
+            projectFollowName = #{projectFollowName},
+            projectId = #{project.id}
+        where id = #{id};
+    </update>
+
+
+    <!--物理删除-->
+    <update id="delete">
+        DELETE
+        FROM sj_project_registration
+        WHERE id = #{id}
+    </update>
+
+    <!--逻辑删除-->
+    <update id="deleteByLogic">
+        UPDATE sj_project_registration
+        SET del_flag = #{DEL_FLAG_DELETE}
+        WHERE id = #{id}
+    </update>
+
+</mapper>

+ 0 - 2
src/main/resources/mappings/modules/projectrecord/ProjectImplementEarlyDao.xml

@@ -61,8 +61,6 @@
 		pci.id as projectContentId
 		FROM project_records a
 		<include refid="projectRecordsJoins"/>
-
-
 		LEFT JOIN work_project_user w on a.id = w.project_id
 		LEFT JOIN project_content_info pci on pci.project_id = a.id
 		LEFT JOIN sys_user su on w.user_id = su.id

+ 536 - 0
src/main/webapp/webpage/modules/ProjectFollowReport/ProjectFollowReportList.jsp

@@ -0,0 +1,536 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>项目登记</title>
+	<meta name="decorator" content="default"/>
+	<link href="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.css" rel="stylesheet" />
+	<%--<script src="${ctxStatic}/layer-v2.3/laydate/laydate.js"></script>--%>
+	<style>
+		.layui-table th{
+			font-size: 14px;
+			/*表头内容居中显示*/
+			text-align: center;
+		}
+		.pid{
+			font-size:14px;
+			font-weight:400;
+		}
+	</style>
+	<script type="text/javascript">
+		$(document).ready(function() {
+
+			//搜索框收放
+			$('#moresee').click(function(){
+				if($('#moresees').is(':visible'))
+				{
+					$('#moresees').slideUp(0,resizeListWindow2);
+					$('#moresee i').removeClass("glyphicon glyphicon-menu-up").addClass("glyphicon glyphicon-menu-down");
+				}else{
+					$('#moresees').slideDown(0,resizeListWindow2);
+					$('#moresee i').removeClass("glyphicon glyphicon-menu-down").addClass("glyphicon glyphicon-menu-up");
+				}
+			});
+			laydate.render({
+				elem: '#beginDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+				event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+				type : 'date'
+			});
+			laydate.render({
+				elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+				event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+				type : 'date'
+			});
+		});
+
+		function reset() {
+			$("#searchForm").resetForm();
+		}
+
+		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: ['送审', '暂存', '关闭'],
+				/*yes: 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()) {
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function () {
+                            top.layer.close(index)
+                        }, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+
+                },*/
+				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,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(2) ){
+						// top.layer.close(index);//关闭对话框。
+						setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					}else {
+						return false;
+					}
+				},
+				btn3: function (index) {
+				}
+			});
+		}
+
+		function openDialogre(title,url,width,height,target,buttons) {
+
+			if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+				width = 'auto';
+				height = 'auto';
+			} else {//如果是PC端,根据用户设置的width和height显示。
+
+			}
+			var split = buttons.split(",");
+			top.layer.open({
+				type: 2,
+				area: [width, height],
+				title: title,
+				maxmin: true, //开启最大化最小化按钮
+				skin: 'three-btns',
+				content: url,
+				btn: split,
+				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,layero){
+					if(split.length==2){return}
+					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(2) ){
+						// top.layer.close(index);//关闭对话框。
+						setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					}else {
+						return false;
+					}
+				},
+				btn3: function (index) {
+				}
+			});
+		}
+	</script>
+	<style>
+		body{
+			background-color:transparent;
+			filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+			color:#ffffff;
+			background-color:rgba(255,255,255,0);
+			height:100%;
+		}
+	</style>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+	<sys:message content="${message}"/>
+	<div class="layui-row">
+		<div class="full-width fl">
+			<div class="layui-row contentShadow shadowLR" id="queryDiv">
+				<form:form id="searchForm" modelAttribute="projectImplementEarly" action="${ctx}/project/constructionContract/projectFollow" 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 lw6">
+						<div class="layui-item query athird">
+							<label class="layui-form-label">项目名称:</label>
+							<div class="layui-input-block">
+								<form:input path="projectName" htmlEscape="false" maxlength="64"  class=" form-control  layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item query athird ">
+							<label class="layui-form-label">项目负责人:</label>
+							<div class="layui-input-block">
+								<form:input path="leaderNameStr" htmlEscape="false" maxlength="255"  class=" form-control layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item athird">
+							<div class="input-group">
+								<a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
+								<button id="searchReset" class="fixed-btn searchReset fr" onclick="resetSearch()">重置</button>
+								<button id="searchQuery" class="fixed-btn searchQuery fr" onclick="search()">查询</button>
+							</div>
+						</div>
+						<div style="    clear:both;"></div>
+					</div>
+				</form:form>
+			</div>
+		</div>
+		<div class="full-width fl">
+			<div class="layui-form contentDetails contentShadow shadowLBR">
+				<div class="nav-btns">
+					<button class="nav-btn layui-btn" id="btn-expand">全部展开</button>
+					<button class="nav-btn layui-btn-warm" id="btn-fold">全部折叠</button>
+					<button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i>&nbsp;刷新</button>
+
+					<div style="clear: both;"></div>
+				</div>
+				<table id="permissionTable" class="layui-table" lay-filter="permissionTable"></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>
+
+	resizeListTable();
+	$("a").on("click",addLinkVisied);
+</script>
+<script>
+	resizeListWindow2();
+	$(window).resize(function(){
+		resizeListWindow2();
+	});
+</script>
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script src="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.js" charset="utf-8"></script>
+<script>
+	/*使用模块加载的方式 加载文件*/
+	layui.config({
+		base: '${ctx}/resoueces/css/layui/module/'
+	}).extend({
+		treetable: 'treetable-lay/treetable'
+	}).use(['layer', 'table', 'treetable'], function () {
+		var $ = layui.jquery;
+		var table = layui.table;
+		var layer = layui.layer;
+		var treetable = layui.treetable;
+
+		// 渲染表格
+		var renderTable = function () {
+			var projectName = $("#projectName").val();
+			var workContractInfoName = $("#workContractInfoName").val();
+			var workContractInfoClientName = $("#workContractInfoClientName").val();
+			if(undefined == workContractInfoName){
+				workContractInfoName = "";
+			}
+			if(undefined == workContractInfoClientName){
+				workContractInfoClientName = "";
+			}
+			layer.load(2);
+			treetable.render({
+				treeColIndex: 1,//树形图标显示在第几列
+				treeSpid: 0,//最上级的父级id
+				treeIdName: 'permissionId',//id字段的名称
+				treePidName: 'pid',//pid字段的名称
+				treeDefaultClose: true,//是否默认折叠
+				treeLinkage: true,//父级展开时是否自动展开所有子级
+				elem: '#permissionTable',
+				url: '${ctx}/project/constructionContract/getProjectFollowList?projectId=${projectRecords.id}&pageNo=${page.pageNo}&projectName='+$("#projectName").val()+'&leaderNameStr='+$("#leaderNameStr").val(),
+				page: false,
+				cols: [[
+					{type: 'numbers', align:'center', title: '序号' ,width:80},
+					{field: 'projectId', title: '项目编号/施工合同编号'},
+					{field: 'projectName', align:'center', title: '项目名称/施工合同名称',templet:function(d){
+							if(0 == d.pid){
+								return "<a class=\"attention-info pid\" title=\"" + d.projectName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/project/projectRecords/view?id=" + d.id +"','95%', '95%')\">" + d.projectName + "</a>";
+							}else{
+								return "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看施工合同内容', '${ctx}/project/constructionContract/view?id="+d.id+"','95%', '95%')\">" + d.projectName + "</a>";
+							}
+						}},
+					/*{field: 'contCate', align:'center', title: '合同分类',templet: function(d){
+							if(0 == d.pid){
+								return "";
+							}else{
+								return "<font>"+d.contCate+"</font>";
+							}
+						}},
+					{field: 'trueAmt', align:'center', title: '有效合同额',templet: function(d){
+							if(0 == d.pid){
+								return "";
+							}else{
+								return "<font>"+d.trueAmt+"</font>";
+							}
+						}},*/
+					{field: 'projectLeader', align:'center', title: '项目负责人',templet: function(d){
+							if(0 == d.pid){
+								return "<font style = 'font-size:14px;font-weight:500;'>"+d.projectLeader+"</font>";
+							}else{
+								return "<font>"+d.projectLeader+"</font>";
+							}
+						}},
+					{field: 'projectRegistrant', align:'center', title: '登记人',templet: function(d){
+							if(0 == d.pid){
+								return "<font style = 'font-size:14px;font-weight:500;'>"+d.projectRegistrant+"</font>";
+							}else{
+								return "<font>"+d.projectRegistrant+"</font>";
+							}
+						}},
+					{field: 'createDate', align:'center', title: '登记日期',width:100,templet: function(d){
+							var date=d.createDate;
+							/*date=date.replace(new RegExp(/-/gm) ,"/");*/
+
+							if(0 == d.pid){
+								return "<font style = 'font-size:14px;font-weight:500;'>"+layui.util.toDateString(date,'yyyy-MM-dd')+"</font>";
+							}else{
+								return "<font>"+layui.util.toDateString(date,'yyyy-MM-dd')+"</font>";
+							}
+						}},
+					{templet: complain, align:'center', title: '操作',width:130}
+				]],
+				done: function () {
+					layer.closeAll('loading');
+				}
+			});
+		};
+
+		renderTable();
+
+		//触发三个button按钮
+		$('#btn-expand').click(function () {
+			treetable.expandAll('#permissionTable');
+		});
+
+		$('#btn-fold').click(function () {
+			treetable.foldAll('#permissionTable');
+		});
+
+		$('#btn-refresh').click(function () {
+			renderTable();
+		});
+
+
+		function complain(d){//操作中显示的内容
+			if(d.pid=="0") {
+				if(1 == d.operationSign) {
+					return [
+						'<a href="javascript:void(0)" onclick="openDialogreAudit(\'新增跟踪咨询报告\', \'${ctx}/project/constructionContract/followForm?project.id=' + d.id +'\',\'95%\',\'95%\')" style=\"color: white;background: darkseagreen\" class="op-btn op-btn-add" ><i class="fa fa-plus"></i> 新增</a>',
+					].join('');
+				}else{
+					return [
+						'',
+					].join('');
+				}
+			} else if (d.pid!="0"){
+				if(1 == d.operationSign) {
+					if(d.status ==null){
+						//子级内容
+						return [
+							'<a href="javascript:void(0)" onclick="openDialogreAudit(\'修改跟踪咨询报告内容\', \'${ctx}/project/constructionContract/followForm?id='+d.id+'&project.id='+d.pid+ '\',\'95%\',\'95%\')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>',
+							'<a href="${ctx}/project/constructionContract/deleteFollow?project.id='+d.pid+'&id='+d.id+'" onclick="return confirmxRefresh(\'确认要删除该跟踪咨询报告吗?\', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>',
+						].join('');
+
+					}else{
+						return [
+							'',
+						].join('');
+					}
+
+				}else{
+					return [
+						'',
+					].join('');
+				}
+			}else{
+				return[''].join('');
+			}
+		}
+		//监听工具条
+		table.on('tool(permissionTable)', function (obj) {
+			var data = obj.data;
+			var layEvent = obj.event;
+			if(data.permissionName!=null){
+				if (layEvent === 'del') {
+					layer.msg('删除' + data.id);
+				} else if (layEvent === 'edit') {
+					layer.msg('修改' + data.id);
+				}
+			}
+		});
+	});
+
+</script>
+<script>
+	function openDialogres(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,
+			skin: 'three-btns',
+			maxmin: true, //开启最大化最小化按钮
+			content: url ,
+			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,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(2) ){
+					// top.layer.close(index);//关闭对话框。
+					setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+				}
+				return false;
+			},
+			btn3: function(index){
+			}
+		});
+	}
+	function openDialogreAudit(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,
+			skin: 'three-btns',
+			maxmin: true, //开启最大化最小化按钮
+			content: url ,
+			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 confirmxRefresh(mess, href){
+		top.layer.confirm(mess, {icon: 3, title:'系统提示'}, function(index){
+			//do something
+			if (typeof href == 'function') {
+				href();
+			}else{
+				resetTip(); //loading();
+				$.ajax({
+					url:href,
+					data:$('#loginForm').serialize(),
+					type:"post",
+					success:function(data){
+						if(data.status){
+							parent.layer.msg(data.msg,{icon:1});
+						}else {
+							parent.layer.msg(data.msg,{icon:2});
+						}
+						//parent.refreshTrees();
+						location = '${ctx}/project/constructionContract/projectFollow';
+					}
+				});
+			}
+			top.layer.close(index);
+		});
+		return false;
+	}
+</script>
+</body>
+</html>

+ 1 - 1
src/main/webapp/webpage/modules/projectrecord/workContentFromAndView/workContentForm.jsp

@@ -672,7 +672,7 @@
                 <thead>
                 <tr>
                     <th class="hide"></th>
-                    <%--<th >资料编号</th>--%>
+                    <%--<th>资料编号</th>--%>
                     <th >资料名称</th>
                     <th >资料类别</th>
                     <th >资料内容</th>

文件差異過大導致無法顯示
+ 1212 - 0
src/main/webapp/webpage/modules/projectrecord/workContentFromAndView/workFollowForm.jsp