Bladeren bron

项目列表管理页面总审在自己的项目后面有审核按钮,
生成咨询质量控制单编号后数据改为报告号

user5 4 jaren geleden
bovenliggende
commit
57bb06921a

+ 60 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageAllService.java

@@ -21,6 +21,8 @@ import com.jeeplus.modules.workclientinfo.entity.WorkClientLinkman;
 import com.jeeplus.modules.workclientinfo.service.WorkClientInfoService;
 import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
 import com.jeeplus.modules.workcontractinfo.service.WorkContractInfoService;
+import com.jeeplus.modules.workprojectnotify.entity.WorkProjectNotify;
+import com.jeeplus.modules.workprojectnotify.service.WorkProjectNotifyService;
 import org.activiti.engine.HistoryService;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -55,6 +57,8 @@ public class RuralProjectMessageAllService extends CrudService<RuralProjectMessa
     private WorkClientInfoService workClientInfoService;
     @Autowired
     private WorkClientLinkmanDao workClientLinkmanDao;
+    @Autowired
+    private WorkProjectNotifyService workProjectNotifyService;
 
     public RuralProjectRecords get(String id) {
         return super.get(id);
@@ -109,6 +113,26 @@ public class RuralProjectMessageAllService extends CrudService<RuralProjectMessa
 
     @Transactional(readOnly = false)
     public Map<String,List> getProjectList(RuralProjectRecords projectRecords, HttpServletRequest request, HttpServletResponse response) {
+        //查询所有和当前登陆人有关的项目的审核
+        WorkProjectNotify workProjectNotify = new WorkProjectNotify();
+        workProjectNotify.setUser(UserUtils.getUser());
+        workProjectNotify.setCompanyId(UserUtils.getSelectCompany().getId());
+        workProjectNotify.setRemarks("待审批");
+        //添加发票对应编号
+        workProjectNotify.setType("92");
+        //查询所有需要当前登录人进行处理的项目信息
+        List<WorkProjectNotify> notifyList = workProjectNotifyService.findList(workProjectNotify);
+
+        //添加发票对应编号
+        workProjectNotify.setType("51");
+        //查询所有需要当前登录人进行处理的项目信息
+        List<WorkProjectNotify> recordNotifyList = workProjectNotifyService.findList(workProjectNotify);
+
+        //添加发票对应编号
+        workProjectNotify.setType("95");
+        //查询所有需要当前登录人进行处理的项目信息
+        List<WorkProjectNotify> reportedNotifyList = workProjectNotifyService.findList(workProjectNotify);
+
         //添加查询类型(工程咨询)
         Page<RuralProjectRecords> page = this.findPage(new Page<RuralProjectRecords>(request, response), projectRecords);
         //无合同状态下,获取委托方的名称
@@ -118,6 +142,36 @@ public class RuralProjectMessageAllService extends CrudService<RuralProjectMessa
         for (int i = 0; i < list.size(); i++) {
             ProjectRecordTreeData projectRecordTreeData = new ProjectRecordTreeData();
             RuralProjectRecords records1 = list.get(i);
+            //新增报告展示
+            for (WorkProjectNotify notify: notifyList) {
+                if(notify.getNotifyId().equals(records1.getPrdId())){
+                    records1.setReportNotifyId(notify.getId());
+                    if("待审批".equals(notify.getRemarks()) && !"1".equals(notify.getStatus())){
+                        records1.setReportNotifyFlag(1);
+                    }
+                    break;
+                }
+            }
+            //线上归档展示
+            for (WorkProjectNotify notify: recordNotifyList) {
+                if(notify.getNotifyId().equals(records1.getPrrId())){
+                    records1.setReportNotifyId(notify.getId());
+                    if("待审批".equals(notify.getRemarks()) && !"1".equals(notify.getStatus())){
+                        records1.setRecordNotifyFlag(1);
+                    }
+                    break;
+                }
+            }
+            //上报展示
+            for (WorkProjectNotify notify: reportedNotifyList) {
+                if(notify.getNotifyId().equals(records1.getId())){
+                    records1.setReportNotifyId(notify.getId());
+                    if("待审批".equals(notify.getRemarks()) && !"1".equals(notify.getStatus())){
+                        records1.setReportedNotifyFlag(1);
+                    }
+                    break;
+                }
+            }
             if (records1.getWorkContractInfo() == null) {
                 //委托
                 List<WorkClientLinkman> clientLinkmanList = workClientLinkmanDao.queryProjectLinkmans(records1.getId(), 1);
@@ -278,6 +332,12 @@ public class RuralProjectMessageAllService extends CrudService<RuralProjectMessa
         projectRecordTreeData.setCreateId(info.getCreateBy().getId());
         //父节点的pid设置为0
         projectRecordTreeData.setPid("0");
+        projectRecordTreeData.setReportNotifyFlag(info.getReportNotifyFlag());
+        projectRecordTreeData.setReportNotifyId(info.getReportNotifyId());
+        projectRecordTreeData.setRecordNotifyFlag(info.getRecordNotifyFlag());
+        projectRecordTreeData.setRecordNotifyId(info.getRecordNotifyId());
+        projectRecordTreeData.setReportedNotifyFlag(info.getReportedNotifyFlag());
+        projectRecordTreeData.setReportedNotifyId(info.getReportedNotifyId());
 
         return projectRecordTreeData;
     }

+ 2 - 2
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageService.java

@@ -308,7 +308,7 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
                 if(notify.getNotifyId().equals(records1.getPrrId())){
                     records1.setReportNotifyId(notify.getId());
                     if("待审批".equals(notify.getRemarks()) && !"1".equals(notify.getStatus())){
-                        records1.setReportNotifyFlag(1);
+                        records1.setRecordNotifyFlag(1);
                     }
                     break;
                 }
@@ -318,7 +318,7 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
                 if(notify.getNotifyId().equals(records1.getId())){
                     records1.setReportNotifyId(notify.getId());
                     if("待审批".equals(notify.getRemarks()) && !"1".equals(notify.getStatus())){
-                        records1.setReportNotifyFlag(1);
+                        records1.setReportedNotifyFlag(1);
                     }
                     break;
                 }

+ 5 - 1
src/main/java/com/jeeplus/modules/workfullmanage/web/WorkFullManageController.java

@@ -938,7 +938,11 @@ public class WorkFullManageController extends BaseController {
 
 		//freemarker参数值准备
 		Map<String,Object> data  = new LinkedHashMap<>();
-		data.put("number",ruralProjectRecords.getProjectId());
+		if(StringUtils.isBlank(projectReportData.getNumber())){
+			data.put("number","");
+		}else{
+			data.put("number",projectReportData.getNumber());
+		}
 		data.put("projectName",ruralProjectRecords.getProjectName());
 		//咨询类别
 		data.put("consultType",consultType);

+ 3 - 3
src/main/webapp/webpage/modules/ruralprojectrecords/cost/ruralCostProjectMessageLists.jsp

@@ -782,11 +782,11 @@
 				}
 				if(d.recordNotifyFlag != undefined && d.recordNotifyFlag !=null && "" != d.recordNotifyFlag && d.recordNotifyFlag == 1)
 				{
-					xml+="<a href=\"#\" onclick=\"notifyDialogre('电子归档审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=" + d.recordNotifyId +"&home=record','95%', '95%')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 审批</a>";
+					xml+="<a href=\"#\" onclick=\"notifyDialogre('电子归档审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=" + d.reportNotifyId +"&home=record','95%', '95%')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 审批</a>";
 				}
 				if(d.reportedNotifyFlag != undefined && d.reportedNotifyFlag !=null && "" != d.reportedNotifyFlag && d.reportedNotifyFlag == 1)
 				{
-					xml+="<a href=\"#\" onclick=\"notifyDialogre('上报审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=" + d.reportedNotifyId +"&home=reported','95%', '95%')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 审批</a>";
+					xml+="<a href=\"#\" onclick=\"notifyDialogre('上报审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=" + d.reportNotifyId +"&home=reported','95%', '95%')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 审批</a>";
 				}
 				if(d.flag == 1){
 					if(d.projectReportStatus == 0){
@@ -1045,4 +1045,4 @@
 	}
 </script>
 </body>
-</html>
+</html>

+ 67 - 3
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/all/ruralProjectMessageAllLists.jsp

@@ -341,6 +341,59 @@
 				}
 			});
 		}
+		function notifyDialogre(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){
+				}
+			});
+
+		}
 	</script>
 	<style>
 		body{
@@ -720,9 +773,20 @@
 
 
         function complain(d){//操作中显示的内容
-        	var xml = '';
+			var xml = '<div class=\"layui-btn-group\">';
 			if(d.pid=="0") {
-				var xml = '<div class=\"layui-btn-group\">';
+				if(d.reportNotifyFlag != undefined && d.reportNotifyFlag !=null && "" != d.reportNotifyFlag && d.reportNotifyFlag == 1)
+				{
+					xml+="<a href=\"#\" onclick=\"notifyDialogre('新增报告审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=" + d.reportNotifyId +"&home=report','95%', '95%')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 审批</a>";
+				}
+				if(d.recordNotifyFlag != undefined && d.recordNotifyFlag !=null && "" != d.recordNotifyFlag && d.recordNotifyFlag == 1)
+				{
+					xml+="<a href=\"#\" onclick=\"notifyDialogre('电子归档审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=" + d.reportNotifyId +"&home=record','95%', '95%')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 审批</a>";
+				}
+				if(d.reportedNotifyFlag != undefined && d.reportedNotifyFlag !=null && "" != d.reportedNotifyFlag && d.reportedNotifyFlag == 1)
+				{
+					xml+="<a href=\"#\" onclick=\"notifyDialogre('上报审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=" + d.reportNotifyId +"&home=reported','95%', '95%')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 审批</a>";
+				}
 				if(d.flag == 1){
 					<shiro:hasPermission name="ruralProject:ruralProjectMessageAll:accessory">
 					if(0 == d.projectReportRecordStatus){
@@ -894,4 +958,4 @@
 	}
 </script>
 </body>
-</html>
+</html>

+ 3 - 3
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/ruralProjectMessageLists.jsp

@@ -781,11 +781,11 @@
 				}
 				if(d.recordNotifyFlag != undefined && d.recordNotifyFlag !=null && "" != d.recordNotifyFlag && d.recordNotifyFlag == 1)
 				{
-					xml+="<a href=\"#\" onclick=\"notifyDialogre('电子归档审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=" + d.recordNotifyId +"&home=record','95%', '95%')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 审批</a>";
+					xml+="<a href=\"#\" onclick=\"notifyDialogre('电子归档审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=" + d.reportNotifyId +"&home=record','95%', '95%')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 审批</a>";
 				}
 				if(d.reportedNotifyFlag != undefined && d.reportedNotifyFlag !=null && "" != d.reportedNotifyFlag && d.reportedNotifyFlag == 1)
 				{
-					xml+="<a href=\"#\" onclick=\"notifyDialogre('上报审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=" + d.reportedNotifyId +"&home=reported','95%', '95%')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 审批</a>";
+					xml+="<a href=\"#\" onclick=\"notifyDialogre('上报审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=" + d.reportNotifyId +"&home=reported','95%', '95%')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 审批</a>";
 				}
 				if(d.flag == 1){
 					if(d.projectReportStatus == 0){
@@ -1044,4 +1044,4 @@
 	}
 </script>
 </body>
-</html>
+</html>