Browse Source

样式调整

user5 2 years atrás
parent
commit
2b2a737d50

+ 2 - 3
src/main/java/com/jeeplus/modules/projectmaterialstorage/service/ProjectMaterialStorageService.java

@@ -5,7 +5,6 @@ import com.google.common.collect.Lists;
 import com.jeeplus.common.persistence.Page;
 import com.jeeplus.common.service.CrudService;
 import com.jeeplus.common.utils.IdGen;
-import com.jeeplus.common.utils.MenuStatusEnum;
 import com.jeeplus.common.utils.StringUtils;
 import com.jeeplus.modules.projectmaterialstorage.dao.ProjectMaterialStorageDao;
 import com.jeeplus.modules.projectmaterialstorage.entity.ProjectMaterialStorage;
@@ -177,7 +176,7 @@ public class ProjectMaterialStorageService extends CrudService<ProjectMaterialSt
      */
     @Override
     public Page<ProjectMaterialStorage> findPage(Page<ProjectMaterialStorage> page, ProjectMaterialStorage projectMaterialStorage) {
-        boolean a = UserUtils.getUser().isAdmin();
+        /*boolean a = UserUtils.getUser().isAdmin();
         //设置数据权限
         if(!UserUtils.getUser().isAdmin()) {
             String dataScopeSql = dataScopeFilter(projectMaterialStorage.getCurrentUser(), "o", "u", "s", MenuStatusEnum.WORK_RECORDS.getValue());
@@ -185,7 +184,7 @@ public class ProjectMaterialStorageService extends CrudService<ProjectMaterialSt
                 dataScopeSql = dataScopeFilter(projectMaterialStorage.getCurrentUser(), "o", "u", "s", MenuStatusEnum.OVERALL_WORK_RECORDS.getValue());
             }
             projectMaterialStorage.getSqlMap().put("dsf", dataScopeSql);
-        }
+        }*/
         int count = dao.queryCount(projectMaterialStorage);
         page.setCount(count);
         page.setCountFlag(false);

+ 1 - 1
src/main/java/com/jeeplus/modules/projectmaterialstorage/web/ProjectMaterialStorageController.java

@@ -282,7 +282,7 @@ public class ProjectMaterialStorageController extends BaseController {
     public String selectproject(ProjectRecords project, String url, String fieldLabels, String fieldKeys, String searchLabel, String searchKey, String ids, Integer isProject, Integer isProjectFalg, String details, HttpServletRequest request, HttpServletResponse response, Model model) {
         project.setCompany(UserUtils.getSelectCompany());
         project.setProjectStatus(ProjectStatusEnum.SIGNED.getValue());//已签状态
-        Page<ProjectRecords> page = projectRecordsService.ruralFindPage(new Page<ProjectRecords>(request, response), project);
+        Page<ProjectRecords> page = projectRecordsService.ruralFindPageByReimbur(new Page<ProjectRecords>(request, response), project,"");
         List<ProjectRecords> list = page.getList();
         try {
             fieldLabels = URLDecoder.decode(fieldLabels, "UTF-8");

+ 11 - 5
src/main/resources/mappings/modules/projectMaterialStorage/ProjectMaterialStorageDao.xml

@@ -41,12 +41,11 @@
 
 	<select id="findList" resultType="com.jeeplus.modules.projectmaterialstorage.entity.ProjectMaterialStorage" >
 		SELECT
-		a.id,a.material_name,a.price,a.create_date as createDate,r.project_name,sys_area.name as 'areaName',a.project_number as 'projectNumber',a.unit as 'unit',r.project_id as 'projectId',a.create_by as 'createBy.id'
+		a.id,a.material_name,a.price,a.create_date as createDate,r.project_name,sys_area.name as 'areaName',a.project_number as 'projectNumber',a.unit as 'unit',prd.number as 'projectId',a.create_by as 'createBy.id'
 		FROM project_material_storage a
-		left join rural_project_records as r
-		on a.project_number = r.id
-		LEFT JOIN sys_area
-		on sys_area.id = r.area_id
+		left join rural_project_records as r on a.project_number = r.id
+		left join project_report_data as prd on a.project_number = prd.project_id
+		LEFT JOIN sys_area on sys_area.id = r.area_id
 		<where>
 			a.del_flag = #{DEL_FLAG_NORMAL}
 			<if test="projectNumber != null and projectNumber != ''">
@@ -58,6 +57,9 @@
 			<if test="projectName != null and projectName != ''">
 				AND r.project_name like concat(concat('%',#{projectName}),'%')
 			</if>
+			<if test="projectId != null and projectId != ''">
+				AND prd.number like concat(concat('%',#{projectId}),'%')
+			</if>
 			<if test="materialName != null and materialName != ''">
 				AND a.material_name like concat(concat('%',#{materialName}),'%')
 			</if>
@@ -217,6 +219,7 @@
 		on a.project_number = r.id
 		LEFT JOIN sys_area
 		on sys_area.id = r.area_id
+		left join project_report_data as prd on a.project_number = prd.project_id
 		<where>
 			a.del_flag = #{DEL_FLAG_NORMAL}
 			<if test="projectNumber != null and projectNumber != ''">
@@ -228,6 +231,9 @@
 			<if test="projectName != null and projectName != ''">
 				AND r.project_name like concat(concat('%',#{projectName}),'%')
 			</if>
+			<if test="projectId != null and projectId != ''">
+				AND prd.number like concat(concat('%',#{projectId}),'%')
+			</if>
 			<if test="materialName != null and materialName != ''">
 				AND a.material_name like concat(concat('%',#{materialName}),'%')
 			</if>

+ 4 - 4
src/main/webapp/webpage/modules/projectMaterialStorage/projectMaterialStorageList.jsp

@@ -366,7 +366,7 @@
 							</div>
 						</div>
 
-						<div class="layui-item query athird">
+						<%--<div class="layui-item query athird">
 							<label class="layui-form-label">地点:</label>
 							<div class="layui-input-block with-icon">
 								<form:input path="areaName" htmlEscape="false" maxlength="64"  class=" form-control  layui-input"/>
@@ -383,7 +383,7 @@
                                        value="<fmt:formatDate value="${projectRecords.endDate}" pattern="yyyy-MM-dd"/>"/>
                                 </input>
 							</div>
-						</div>
+						</div>--%>
 <%--						<div class="layui-item query athird ">--%>
 <%--							<label class="layui-form-label">状态:</label>--%>
 <%--							<div class="layui-input-block">--%>
@@ -440,7 +440,7 @@
             ,elem: '#contentTable1'
             ,page: false
             ,cols: [[
-				{checkbox: true, fixed: true},
+				//{checkbox: true, fixed: true},
                 {field:'index',align:'center', title: '序号',width:55}
 				<%--,{field:'projName',align:'center', title: '项目名称',minWidth:100,templet:function(d){--%>
 				<%--		if(1 == d.showView && d.showView != undefined){--%>
@@ -460,7 +460,7 @@
 						</shiro:hasPermission>
 						return xml;
 											}}
-				,{field:'projectId',align:'center', title: '报告号',  width:150}
+				,{field:'projectId',align:'center', title: '报告号',  width:180}
 				,{field:'materialName',align:'center', title: '材料名称',  width:150}
 				,{field:'unit',align:'center', title: '单位',  width:80}
 				,{field:'price',align:'center', title: '价格',  width:150}

+ 5 - 3
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/all/ruralProjectMessageAllList.jsp

@@ -1105,9 +1105,11 @@
 						</shiro:hasPermission>
 						<%--						<shiro:hasPermission name="ruralProject:ruralCostProjectMessage:projectMaterialStorage">--%>
 						//材料库处理按钮
-						if (d.projectMaterialStorageStatus==1){
-							xml+="<a href=\"#\" onclick=\"openDialogreMaterialStorage('添加项目材料信息', '${ctx}/project/projectMaterialStorage/form?id=" + d.id +"','95%', '95%','','提交,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-blue\"  > 材料库处理</a>";
-						}
+						<shiro:hasPermission name="project:projectMaterialStorage:add">
+							if (d.projectMaterialStorageStatus==1){
+								xml+="<a href=\"#\" onclick=\"openDialogreMaterialStorage('添加项目材料信息', '${ctx}/project/projectMaterialStorage/form?id=" + d.id +"','95%', '95%','','提交,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-blue\"  > 材料库处理</a>";
+							}
+						</shiro:hasPermission>
 						<%--						</shiro:hasPermission>--%>
 						<shiro:hasPermission name="ruralProject:ruralProjectMessageAll:adminAccessory">
 							xml+="<a href=\"#\" onclick=\"openDialogView('归档管理员文件上传', '${ctx}/ruralProject/ruralProjectRecords/formAccessory?id=" + d.id + "','95%', '95%')\" class=\"layui-btn layui-btn-xs  layui-bg-blue\" > 上传文件</a>";