Przeglądaj źródła

各用户权限配置

yue 5 lat temu
rodzic
commit
2c5087a24d

+ 3 - 0
src/main/java/com/jeeplus/modules/sg/information/mapper/xml/InformationMapper.xml

@@ -296,6 +296,9 @@
 					</if>
 				</if>
 			</if>
+			<if test="dataScope != null and dataScope != ''">
+				${dataScope}
+			</if>
         </where>
         <choose>
             <when test="page !=null and page.orderBy != null and page.orderBy != ''">

+ 2 - 12
src/main/java/com/jeeplus/modules/sg/information/utils/ImportInformation.java

@@ -86,8 +86,6 @@ public  class ImportInformation {
                     isBack = "否";
                     isBackNo = 1;
                 }
-
-
                 if (materials.size() >= 1000 && flag == 1) {
                     materialService.saveMater(materials);
                     List<Material> information = materialService.findInformation(materials);
@@ -284,7 +282,6 @@ public  class ImportInformation {
         return hashMap;
     }
 
-
     /**
      *	导入综合信息Excel数据
      * */
@@ -303,7 +300,6 @@ public  class ImportInformation {
                 Object projectId = ei.getCellValue(row, 1);
                 Object projectName = ei.getCellValue(row, 2);
                 Object projectType = ei.getCellValue(row, 3);
-
                 if (projectId.equals("")) {
                     continue;
                 }
@@ -391,7 +387,6 @@ public  class ImportInformation {
                 ex.getMessage();
                 failureNum++;
             }
-
         }
         if (informationList.size() != 0) {
             informationService.saveInfo(informationList);
@@ -401,12 +396,12 @@ public  class ImportInformation {
         return hashMap;
     }
 
-
-
     //导入原因类型
     public static Map<String,Object> btnInReason(ImportExcel ei,int lastDataRowNum) {
         HashMap<String,Object> hashMap = new HashMap<String,Object>();
+        //用于记录导入原因类型时,没有原因类型的情况
         List<Material> materialList = new ArrayList<>();
+        //用于记录导入原因类型时,已有原因类型的情况
         List<Material> noChange = new ArrayList<>();
         List error = new ArrayList();
         int successNum = 0;
@@ -473,7 +468,6 @@ public  class ImportInformation {
                     material.setAfterAuthor(authorizedNumber1);
                     materialList.add(material);
                 }
-
                 successNum++;
                 if (materialList.size() == 1000) {
                     materialService.updateStatus(materialList);
@@ -562,7 +556,6 @@ public  class ImportInformation {
                 }
                 noChange.clear();
             }
-
         } catch (Exception e) {
             failureNum++;
             e.printStackTrace();
@@ -573,7 +566,6 @@ public  class ImportInformation {
         return hashMap;
     }
 
-
     public static Map<String,Integer> importInTrial(ImportExcel ei,int lastDataRowNum) {
         HashMap<String,Integer> hashMap = new HashMap<String,Integer>();
         List<append> appendList = new ArrayList<>();
@@ -595,8 +587,6 @@ public  class ImportInformation {
                 Object settlement = ei.getCellValue(row, 4);
                 //归口部门
                 Object underCentralized = ei.getCellValue(row, 5);
-
-
                 append.setProjectId(projectId.toString());
                 append.setTrial(trial.toString());
                 append.setConstruction(construction.toString());

+ 11 - 23
src/main/java/com/jeeplus/modules/sg/record/mapper/xml/RecordMapper.xml

@@ -3,11 +3,11 @@
 <mapper namespace="com.jeeplus.modules.sg.record.mapper.RecordMapper">
 
     <sql id="recordColumns">
-		id,
-		information,
-		material,
-		importUser,
-		importDate
+		a.id,
+		a.information,
+		a.material,
+		a.importUser,
+		a.importDate
 	</sql>
 
 	<select id="get" resultType="Record" >
@@ -21,25 +21,13 @@
 		SELECT
 		<include refid="recordColumns"/>
 		FROM sj_project_record a
-<!--		<where>
-			a.del_flag = #{DEL_FLAG_NORMAL}
-			${dataScope}
-			<if test="tuser != null and tuser.id != null and tuser.id != ''">
-				AND a.user_id = #{tuser.id}
-			</if>
-			<if test="name != null and name != ''">
-				AND a.name LIKE
-				<if test="dbName == 'oracle'">'%'||#{name}||'%'</if>
-				<if test="dbName == 'mssql'">'%'+#{name}+'%'</if>
-				<if test="dbName == 'mysql'">concat('%',#{name},'%')</if>
-			</if>
-			<if test="sex != null and sex != ''">
-				AND a.sex = #{sex}
-			</if>
-			<if test="beginInDate != null and endInDate != null ">
-				AND a.in_date BETWEEN #{beginInDate} AND #{endInDate}
+		left join sys_user b on a.create_by = b.id left join sys_office t on b.office_id = t.id
+		<where>
+			1=1
+			<if test="dataScope != null and dataScope != ''">
+				${dataScope}
 			</if>
-		</where>-->
+		</where>
 		<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
 				ORDER BY ${page.orderBy}