[user3] 4 роки тому
батько
коміт
b8d1c768c9

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

@@ -189,6 +189,9 @@ public class RuralProjectRecords extends ActEntity<RuralProjectRecords> {
 	private String modifyFlag;		//修改判定参数
 
 
+	private Integer planCount;	//项目计划数量
+
+
 	private List<String> civilProjectList = Lists.newArrayList();
 	private List<WorkClientAttachment> workAttachments = Lists.newArrayList();
 
@@ -1323,4 +1326,12 @@ public class RuralProjectRecords extends ActEntity<RuralProjectRecords> {
 	public void setModifyFlag(String modifyFlag) {
 		this.modifyFlag = modifyFlag;
 	}
+
+	public Integer getPlanCount() {
+		return planCount;
+	}
+
+	public void setPlanCount(Integer planCount) {
+		this.planCount = planCount;
+	}
 }

+ 3 - 1
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordsDao.xml

@@ -1269,7 +1269,8 @@
 		wci.name AS "workContractInfo.name",
 		wct.id AS "workContractInfo.client.id",
 		wct.name AS "workContractInfo.client.name",
-		o.top_company AS "office.name"
+		o.top_company AS "office.name",
+		COUNT(pi.id) AS "planCount"
 		FROM rural_project_records a
 		<include refid="projectRecordsJoins"/>
 
@@ -1281,6 +1282,7 @@
 		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_plan_info pi on pi.project_id = a.id
 		<where>
 			<if test="projectId != null and projectId != ''">
 				AND a.project_id like concat('%',#{projectId},'%')

+ 10 - 1
src/main/webapp/webpage/modules/projectrecord/plan/projectPlanConsultingList.jsp

@@ -274,6 +274,10 @@
 						{
 							xml +="<a href=\"javascript:void(0)\" onclick=\"openDialog('编辑项目计划信息', '${ctx}/project/projectPlanConsulting/form?view=form&id='+encodeURIComponent('" + d.id + "'),'95%','95%','')\" class=\"layui-btn layui-btn-xs  layui-bg-green\" > 编辑</a>";
 						}
+						if(d.canedit5 != undefined && d.canedit5 =="1")
+						{
+							xml +="<a href=\"javascript:void(0)\" onclick=\"openDialog('添加项目计划信息', '${ctx}/project/projectPlanConsulting/form?view=form&id='+encodeURIComponent('" + d.id + "'),'95%','95%','')\" class=\"layui-btn layui-btn-xs  layui-bg-blue\" > 添加</a>";
+						}
 						xml+="</div>"
 						return xml;
 
@@ -299,7 +303,12 @@
 						,"canedit3":<c:choose><c:when test="${projectRecords.projectStatus == 5 && (fns:getUser().id == projectRecords.leaderIds || fns:getUser().id eq projectRecords.createBy.id)}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
 					</shiro:hasPermission>
 					<shiro:hasPermission name="project:projectPlanConsulting:edit">
-						,"canedit4":<c:choose><c:when test="${projectRecords.projectStatus == 5 && (fns:getUser().id == projectRecords.leaderIds || fns:getUser().id eq projectRecords.createBy.id)}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+						<c:if test="${projectRecords.planCount>0}">
+							,"canedit4":<c:choose><c:when test="${projectRecords.projectStatus == 5 && (fns:getUser().id == projectRecords.leaderIds || fns:getUser().id eq projectRecords.createBy.id)}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+						</c:if>
+						<c:if test="${projectRecords.planCount==0}">
+							,"canedit5":<c:choose><c:when test="${projectRecords.projectStatus == 5 && (fns:getUser().id == projectRecords.leaderIds || fns:getUser().id eq projectRecords.createBy.id)}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+						</c:if>
 					</shiro:hasPermission>
 					<shiro:hasPermission name="ruralProject:ruralProjectView:consultingPlanView">
 					,"showView":1

+ 9 - 0
src/main/webapp/webpage/modules/projectrecord/plan/projectPlanCostList.jsp

@@ -274,6 +274,10 @@
 						{
 							xml +="<a href=\"javascript:void(0)\" onclick=\"openDialog('编辑项目计划信息', '${ctx}/project/projectPlanCost/form?view=form&id='+encodeURIComponent('" + d.id + "'),'95%','95%','')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 编辑</a>";
 						}
+						if(d.canedit5 != undefined && d.canedit5 =="1")
+						{
+							xml +="<a href=\"javascript:void(0)\" onclick=\"openDialog('添加项目计划信息', '${ctx}/project/projectPlanConsulting/form?view=form&id='+encodeURIComponent('" + d.id + "'),'95%','95%','')\" class=\"layui-btn layui-btn-xs  layui-bg-blue\" > 添加</a>";
+						}
 						xml+="</div>"
 						return xml;
 
@@ -299,7 +303,12 @@
 						,"canedit3":<c:choose><c:when test="${projectRecords.projectStatus == 5 && (fns:getUser().id == projectRecords.leaderIds || fns:getUser().id eq projectRecords.createBy.id)}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
 					</shiro:hasPermission>
 					<shiro:hasPermission name="project:projectPlanCost:edit">
+						<c:if test="${projectRecords.planCount>0}">
 						,"canedit4":<c:choose><c:when test="${projectRecords.projectStatus == 5 && (fns:getUser().id == projectRecords.leaderIds || fns:getUser().id eq projectRecords.createBy.id)}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+						</c:if>
+						<c:if test="${projectRecords.planCount==0}">
+						,"canedit5":<c:choose><c:when test="${projectRecords.projectStatus == 5 && (fns:getUser().id == projectRecords.leaderIds || fns:getUser().id eq projectRecords.createBy.id)}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+						</c:if>
 					</shiro:hasPermission>
 					<shiro:hasPermission name="ruralProject:ruralProjectView:costPlanView">
 					,"showView":1

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

@@ -523,6 +523,9 @@
                                                     <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
                                                 </c:otherwise>
                                             </c:choose>
+                                            <c:if test="${workClientAttachment.collectFlag != 1}">
+                                                <a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')" class="op-btn op-btn-delete"  style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
+                                            </c:if>
                                         </div>
                                     </td>
                                 </tr>