Bläddra i källkod

Merge remote-tracking branch 'origin/master'

user7 4 år sedan
förälder
incheckning
cadb7a5862

+ 9 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/entity/ProjectReportRecord.java

@@ -49,6 +49,7 @@ public class ProjectReportRecord extends ActEntity<ProjectReportRecord> {
 	private User signCostTwo;		// 签字造价师二
 	private String reportId;
 	private Date accomplishDate;  //归档完成时间
+	private String condition;    //判定条件
 
 	private Integer type;//(1:ProjectReportRecord  2:RuralProjectReportRecord)
 
@@ -321,4 +322,12 @@ public class ProjectReportRecord extends ActEntity<ProjectReportRecord> {
 	public void setAccomplishDate(Date accomplishDate) {
 		this.accomplishDate = accomplishDate;
 	}
+
+	public String getCondition() {
+		return condition;
+	}
+
+	public void setCondition(String condition) {
+		this.condition = condition;
+	}
 }

+ 16 - 8
src/main/java/com/jeeplus/modules/projectcontentinfo/web/ProjectReportRecordController.java

@@ -118,7 +118,7 @@ public class ProjectReportRecordController extends BaseController {
 	 */
 	@RequestMapping(value = "formData")
 	public String formData(ProjectReportRecord projectReportRecord, Model model) {
-		ProjectReportRecord ReportRecord = new ProjectReportRecord();
+		ProjectReportRecord reportRecord = new ProjectReportRecord();
 		ProjectReportData projectReportData = new ProjectReportData();
 		projectReportData.setFileStatus("1");
 		projectReportData.setId(projectReportRecord.getReport().getId());
@@ -132,11 +132,16 @@ public class ProjectReportRecordController extends BaseController {
 				logger.error("Exception e"+e);
 			}
 		}
-
-		ReportRecord.setReport(projectReportDatas);
-		ReportRecord.setCreateDate(new Date());
-		ReportRecord.setCreateBy(UserUtils.getUser());
-		model.addAttribute("projectReportRecord", ReportRecord);
+		reportRecord.setRecordNum(projectReportDatas.getRecordNum());
+		reportRecord.setReport(projectReportDatas);
+		reportRecord.setContractNum(projectReportDatas.getContractNum());
+		reportRecord.setContractName(projectReportDatas.getContractName());
+		reportRecord.setClientName(projectReportDatas.getClientName());
+		reportRecord.setProjectNum(projectReportDatas.getProjectNum());
+		reportRecord.setProjectName(projectReportDatas.getProjectName());
+		reportRecord.setCreateDate(new Date());
+		reportRecord.setCreateBy(UserUtils.getUser());
+		model.addAttribute("projectReportRecord", reportRecord);
 		return "modules/projectrecord/workContentFromAndView/projectReportRecordForm";
 	}
 
@@ -201,6 +206,9 @@ public class ProjectReportRecordController extends BaseController {
 		}catch (Exception e){
 			addMessage(redirectAttributes, "保存报告归档失败");
 		}
+		if("completionArchive".equals(projectReportRecord.getCondition())){
+			return "redirect:"+Global.getAdminPath()+"/project/projectCompletionPigeonhole/?repage";
+		}
 		return "redirect:"+Global.getAdminPath()+"/projectcontentinfo/projectReportRecord/?repage";
 	}
 	/**
@@ -208,7 +216,7 @@ public class ProjectReportRecordController extends BaseController {
 	 */
 	@RequestMapping(value = "store")
 	public String store(ProjectReportRecord projectReportRecord, Model model, RedirectAttributes redirectAttributes) throws Exception{
-		if (!beanValidator(model, projectReportRecord)){
+		/*if (!beanValidator(model, projectReportRecord)){
 			return form(projectReportRecord, model);
 		}
 		if(!projectReportRecord.getIsNewRecord()){//编辑表单保存
@@ -221,7 +229,7 @@ public class ProjectReportRecordController extends BaseController {
 			projectReportRecord.setOfficeId(user.getOffice().getId());
 			projectReportRecord.setStatus("1");
 			projectReportRecordService.save(projectReportRecord);//保存
-		}
+		}*/
 		addMessage(redirectAttributes, "保存报告归档成功");
 		return "redirect:"+Global.getAdminPath()+"/projectcontentinfo/projectReportRecord/?repage";
 	}

+ 1 - 1
src/main/resources/mappings/modules/projectcontentinfo/ProjectContentDataDao.xml

@@ -304,7 +304,7 @@
 	<select id="getProjectContentReportDataList" resultType="com.jeeplus.modules.projectrecord.entity.ProjectRecordTreeData">
 		select a.id as "id", a.create_by as "createBy.id", a.create_date as "createDate", a.project_id as "pid",
 		a.name as "projectName", "" as projectId, "0" as projectStatus,su.name as "projectRegistrant" ,
-		pt.type_name as projectLeader, ppt.type_name as clientName,prd.status as status,prd.id as reportId,ifnull(prd.name,'') as reportName
+		pt.type_name as projectLeader, ppt.type_name as clientName,ifnull(prd.status,'10') as status,prd.id as reportId,ifnull(prd.name,'') as reportName
 		from project_content_data a
 		left join sys_user su on su.id = a.create_by
 		left join project_type pt on a.type = pt.type_id

+ 1 - 69
src/main/resources/mappings/modules/projectcontentinfo/ProjectReportDataDao.xml

@@ -753,75 +753,7 @@
 		LEFT JOIN work_contract_info wci on r.contract_id = wci.id
 		LEFT JOIN work_client_info wct on wci.client_id = wct.id
 		<where>
-			a.del_flag = #{DEL_FLAG_NORMAL}
-			<if test="project != null and project.id != null and project.id != ''">
-				AND a.project_id = #{project.id}
-			</if>
-			<if test="type != null and type != ''">
-				AND a.type = #{type}
-			</if>
-			<if test="name != null and name != ''">
-				AND a.name like
-				<if test="dbName == 'oracle'">'%'||#{name}||'%'</if>
-				<if test="dbName == 'mysql'">CONCAT('%', #{name}, '%')</if>
-			</if>
-			<if test="number != null and number != ''">
-				AND a.number like
-				<if test="dbName == 'oracle'">'%'||#{number}||'%'</if>
-				<if test="dbName == 'mysql'">CONCAT('%', #{number}, '%')</if>
-			</if>
-			<if test="achievementType != null and achievementType != ''">
-				AND a.achievement_type = #{achievementType}
-			</if>
-			<if test="signCostOne!=null and signCostOne.id != null and signCostOne.id != ''">
-				AND a.sign_cost_one = #{signCostOne.id}
-			</if>
-			<if test="signCostTwo!=null and signCostTwo.id != null and signCostTwo.id != ''">
-				AND a.sign_cost_two = #{signCostTwo.id}
-			</if>
-			<if test="master!=null and master.id != null and master.id != ''">
-				AND a.master = #{master.id}
-			</if>
-			<if test="reviewStandard != null and reviewStandard != ''">
-				AND a.review_standard = #{reviewStandard}
-			</if>
-
-			<if test="startDate != null and startDate != ''">
-				AND a.report_date &gt;= #{startDate}
-			</if>
-			<if test="endDate != null and endDate != ''">
-				AND a.report_date &lt;= #{endDate}
-			</if>
-			<if test="fileStatus != null and fileStatus != ''">
-				AND a.file_status = #{fileStatus}
-			</if>
-			<if test="officeId != null and officeId != ''">
-				AND a.office_id = #{officeId}
-			</if>
-			<if test="createStartDate != null and createStartDate != ''">
-				AND a.create_date &gt;= #{createStartDate}
-			</if>
-			<if test="createEndDate != null and createEndDate != ''">
-				AND a.create_date &lt;= #{createEndDate}
-			</if>
-			<if test="project!=null and project.projectName != null and project.projectName != ''">
-				AND r.project_name like
-				<if test="dbName == 'oracle'">'%'||#{project.projectName}||'%'</if>
-				<if test="dbName == 'mysql'">CONCAT('%', #{project.projectName}, '%')</if>
-			</if>
-			<if test="contractNum != null and contractNum != ''">
-				AND wci.contract_num like
-				<if test="dbName == 'oracle'">'%'||#{contractNum}||'%'</if>
-				<if test="dbName == 'mysql'">CONCAT('%', #{contractNum}, '%')</if>
-			</if>
-			<if test="clientName != null and clientName != ''">
-				AND wct.name like
-				<if test="dbName == 'oracle'">'%'||#{clientName}||'%'</if>
-				<if test="dbName == 'mysql'">CONCAT('%', #{clientName}, '%')</if>
-			</if>
-			<if test="projectMasterId != null and projectMasterId != ''">
-				AND #{projectMasterId} in (select user_id from work_project_user pm WHERE pm.project_id = a.project_id AND is_master = '1' AND pm.del_flag = '0')
-			</if>
+			a.del_flag = 0 and a.file_status in(1,2)
 			AND a.status in ('5','7')
 			and a. id =#{id}
 		</where>

+ 1 - 0
src/main/webapp/static/common/jeeplus.js

@@ -433,6 +433,7 @@ function getAuditState(id)
         case "6":result.label = "discarding";result.status="作废中";break;
         case "7":result.label = "discarded";result.status="已作废";break;
         case "8":result.label = "changing";result.status="变更中";break;
+        case "10":result.label = "unknown";result.status="待发起";break;
         default:
             result.label = "unknown";result.status="未知";break;
     }

+ 21 - 2
src/main/webapp/webpage/modules/projectrecord/implementCompletion/projectCompletionReviewList.jsp

@@ -327,6 +327,25 @@
 								return "<font>"+layui.util.toDateString(date,'yyyy-MM-dd')+"</font>";
 							}
 						}},
+					{align:'center', title: '状态',  width:70,templet:function(d){
+							var st = getAuditState(""+d.projectStatus);
+							if(d.pid ==0){
+								if(st.action)
+									var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/project/projectRecords/getProcess?id=" + d.id + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+								else
+									var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+								return xml;
+							}else if(d.pid !=0){
+								st = getAuditState(""+d.status);
+								if(st.action)
+									var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/projectcontentinfo/projectcontentinfo/getProcessOne?id=" + d.id + "&projectReportData.id="+ d.reportId + "&type="+d.status+"','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+								else
+									var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+								return xml;
+							}else{
+								return '';
+							}
+						}},
                     {templet: complain, align:'center', title: '操作',width:130}
                 ]],
                 done: function () {
@@ -380,9 +399,9 @@
 					].join('');
 				}else if(d.status == 5){
 					return [
-						'<a href="javascript:void(0)" onclick="openDialogres(\'报告作废\', \'${ctx}/projectcontentinfo/projectcontentinfo/form?view=reportInvalid&dictType=${dictType}&id='+d.contentPId+'&parentIds=${parentIds}&projectReportData.id='+d.reportId+'\',\'95%\',\'95%\')" class="op-btn op-btn-invalid" ><i class="fa fa-trash-o"></i> 作废</a>',
+						/*'<a href="javascript:void(0)" onclick="openDialogres(\'报告作废\', \'${ctx}/projectcontentinfo/projectcontentinfo/form?view=reportInvalid&dictType=${dictType}&id='+d.contentPId+'&parentIds=${parentIds}&projectReportData.id='+d.reportId+'\',\'95%\',\'95%\')" class="op-btn op-btn-invalid" ><i class="fa fa-trash-o"></i> 作废</a>',*/
 					].join('');
-				}else if(d.status == null || d.status == ''){
+				}else if(d.status == null || d.status == '' || d.status == 10){
 					return [
 						'<a href="javascript:void(0)" onclick="openDialogres(\'复核\', \'${ctx}/project/projectCompletionReview/reviewForm?view=report&dictType='+d.dictType+'&project.id='+d.pid+'&id='+d.contentPId+'&parentIds='+d.parentIds+'&infoId='+d.id+'\',\'95%\',\'95%\')" class="op-btn op-btn-edit" ><i class="fa fa-plus"></i> 复核</a>',
 					].join('');

+ 21 - 2
src/main/webapp/webpage/modules/projectrecord/implementEarly/projectEarlyReviewList.jsp

@@ -348,6 +348,25 @@
 								return "<font>"+layui.util.toDateString(date,'yyyy-MM-dd')+"</font>";
 							}
 						}},
+					{align:'center', title: '状态',  width:70,templet:function(d){
+							var st = getAuditState(""+d.projectStatus);
+							if(d.pid ==0){
+								if(st.action)
+									var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/project/projectRecords/getProcess?id=" + d.id + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+								else
+									var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+								return xml;
+							}else if(d.pid !=0){
+								st = getAuditState(""+d.status);
+								if(st.action)
+									var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/projectcontentinfo/projectcontentinfo/getProcessOne?id=" + d.id + "&projectReportData.id="+ d.reportId + "&type="+d.status+"','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+								else
+									var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+								return xml;
+							}else{
+								return '';
+							}
+						}},
                     {templet: complain, align:'center', title: '操作',width:130}
                 ]],
                 done: function () {
@@ -401,9 +420,9 @@
 					].join('');
 				}else if(d.status == 5){
 					return [
-						'<a href="javascript:void(0)" onclick="openDialogres(\'报告作废\', \'${ctx}/projectcontentinfo/projectcontentinfo/form?view=reportInvalid&dictType=${dictType}&id='+d.contentPId+'&parentIds=${parentIds}&projectReportData.id='+d.reportId+'\',\'95%\',\'95%\')" class="op-btn op-btn-invalid" ><i class="fa fa-trash-o"></i> 作废</a>',
+						/*'<a href="javascript:void(0)" onclick="openDialogres(\'报告作废\', \'${ctx}/projectcontentinfo/projectcontentinfo/form?view=reportInvalid&dictType=${dictType}&id='+d.contentPId+'&parentIds=${parentIds}&projectReportData.id='+d.reportId+'\',\'95%\',\'95%\')" class="op-btn op-btn-invalid" ><i class="fa fa-trash-o"></i> 作废</a>',*/
 					].join('');
-				}else if(d.status == null || d.status == ''){
+				}else if(d.status == null || d.status == '' || d.status == 10){
 					return [
 						'<a href="javascript:void(0)" onclick="openDialogres(\'复核\', \'${ctx}/project/projectEarlyReview/reviewForm?view=report&dictType='+d.dictType+'&project.id='+d.pid+'&id='+d.contentPId+'&parentIds='+d.parentIds+'&infoId='+d.id+'\',\'95%\',\'95%\')" class="op-btn op-btn-edit" ><i class="fa fa-plus"></i> 复核</a>',
 					].join('');

+ 8 - 6
src/main/webapp/webpage/modules/projectrecord/workContentFromAndView/projectReportRecordForm.jsp

@@ -96,6 +96,8 @@
 			<form:hidden path="id"/>
 			<form:hidden path="numberCount"/>
 			<form:hidden id="reportId" path="report.id"/>
+			<%-- 全过程中竣工阶段进行归档则添加判定字符 方便调转 --%>
+			<input type="hidden" input="condition" name="condition" value="completionArchive">
 
 			<div class="form-group layui-row first lw12">
 				<div class="form-group-label"><h2>基本信息</h2></div>
@@ -108,7 +110,7 @@
 				<div class="layui-item layui-col-sm6">
 					<label class="layui-form-label"><span class="require-item">*</span>归档申请编号:</label>
 					<div class="layui-input-block">
-						<form:input id="reportRecordNum" path="report.recordNum" htmlEscape="false"   readonly="true" class="form-control layui-input required"/>
+						<form:input id="reportRecordNum" path="recordNum" htmlEscape="false"   readonly="true" class="form-control layui-input required"/>
 					</div>
 				</div>
 				<div class="layui-item layui-col-sm6">
@@ -140,31 +142,31 @@
 				<div class="layui-item layui-col-sm6">
 					<label class="layui-form-label"><span class="require-item">*</span>合同编号:</label>
 					<div class="layui-input-block">
-						<form:input id="contractNum" path="report.contractNum" htmlEscape="false" readonly="true" class="form-control  layui-input required"/>
+						<form:input id="contractNum" path="contractNum" htmlEscape="false" readonly="true" class="form-control  layui-input required"/>
 					</div>
 				</div>
 				<div class="layui-item layui-col-sm6">
 					<label class="layui-form-label"><span class="require-item">*</span>合同名称:</label>
 					<div class="layui-input-block">
-						<form:input id="contractName" path="report.contractName" htmlEscape="false" readonly="true" class="form-control  layui-input required"/>
+						<form:input id="contractName" path="contractName" htmlEscape="false" readonly="true" class="form-control  layui-input required"/>
 					</div>
 				</div>
 				<div class="layui-item layui-col-sm6">
 					<label class="layui-form-label"><span class="require-item">*</span>主委托方:</label>
 					<div class="layui-input-block">
-						<form:input id="clientName" path="report.clientName" htmlEscape="false" readonly="true" class="form-control  layui-input required"/>
+						<form:input id="clientName" path="clientName" htmlEscape="false" readonly="true" class="form-control  layui-input required"/>
 					</div>
 				</div>
 				<div class="layui-item layui-col-sm6">
 					<label class="layui-form-label">项目编号:</label>
 					<div class="layui-input-block">
-						<form:input id="projectNum" path="report.projectNum" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
+						<form:input id="projectNum" path="projectNum" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
 					</div>
 				</div>
 				<div class="layui-item layui-col-sm6">
 					<label class="layui-form-label"><span class="require-item">*</span>项目名称:</label>
 					<div class="layui-input-block">
-						<form:input id="projectName" path="report.projectName" htmlEscape="false" readonly="true" class="form-control  layui-input required"/>
+						<form:input id="projectName" path="projectName" htmlEscape="false" readonly="true" class="form-control  layui-input required"/>
 					</div>
 				</div>
 				<div class="layui-item layui-col-sm6">