Browse Source

Merge remote-tracking branch 'origin/master'

user5 3 years ago
parent
commit
c98c3220db

+ 0 - 4
src/main/java/com/jeeplus/modules/workcontractinfo/service/WorkContractInfoService.java

@@ -3992,7 +3992,6 @@ public class WorkContractInfoService extends CrudService<WorkContractInfoDao, Wo
 			workContractInfo.setTotalContractIds(","+workContractInfo.getTotalContractIds()+",");
 		}
 		String companyId = UserUtils.getUser().getComId();
-		workContractInfo.getSqlMap().put("dsf", dataScopeFilter(workContractInfo.getCurrentUser(), "o", "u","s", MenuStatusEnum.WORK_CONTRACT_INFO.getValue()));
 		//workContractInfo.getSqlMap().put("dsf","and (a.company_id='"+companyId+"')");
 
 		//为了方便后台 limit 的显示,将页面传入的page暂存
@@ -4022,7 +4021,6 @@ public class WorkContractInfoService extends CrudService<WorkContractInfoDao, Wo
 			workContractInfo.setTotalContractIds(","+workContractInfo.getTotalContractIds()+",");
 		}
 		String companyId = UserUtils.getUser().getComId();
-		workContractInfo.getSqlMap().put("dsf", dataScopeFilter(workContractInfo.getCurrentUser(), "o", "u","s", MenuStatusEnum.WORK_CONTRACT_INFO.getValue()));
 		//workContractInfo.getSqlMap().put("dsf","and (a.company_id='"+companyId+"')");
 
 		//为了方便后台 limit 的显示,将页面传入的page暂存
@@ -4062,7 +4060,6 @@ public class WorkContractInfoService extends CrudService<WorkContractInfoDao, Wo
 			workContractInfo.setTotalContractIds(","+workContractInfo.getTotalContractIds()+",");
 		}
 		String companyId = UserUtils.getUser().getComId();
-		workContractInfo.getSqlMap().put("dsf", dataScopeFilter(workContractInfo.getCurrentUser(), "o", "u","s", MenuStatusEnum.WORK_CONTRACT_INFO.getValue()));
 		//workContractInfo.getSqlMap().put("dsf","and (a.company_id='"+companyId+"')");
 
 		//为了方便后台 limit 的显示,将页面传入的page暂存
@@ -4093,7 +4090,6 @@ public class WorkContractInfoService extends CrudService<WorkContractInfoDao, Wo
 			workContractInfo.setTotalContractIds(","+workContractInfo.getTotalContractIds()+",");
 		}
 		String companyId = UserUtils.getUser().getComId();
-		workContractInfo.getSqlMap().put("dsf", dataScopeFilter(workContractInfo.getCurrentUser(), "o", "u","s", MenuStatusEnum.WORK_CONTRACT_INFO.getValue()));
 		//workContractInfo.getSqlMap().put("dsf","and (a.company_id='"+companyId+"')");
 
 		//为了方便后台 limit 的显示,将页面传入的page暂存

+ 0 - 2
src/main/java/com/jeeplus/modules/workinvoice/service/WorkInvoiceService.java

@@ -2808,7 +2808,6 @@ public class WorkInvoiceService extends CrudService<WorkInvoiceDao, WorkInvoice>
 		String beginDate = map.get("beginDate");
 		String endDate = map.get("endDate");
 
-		workInvoice.getSqlMap().put("dsf", dataScopeFilter(workInvoice.getCurrentUser(), "o", "u","s", MenuStatusEnum.WORK_INVOICE.getValue()));
 		if(StringUtils.isNotBlank(workInvoice.getOfficeId())){
 			//查询该选择节点下所有的部门Id
 			List<String> officeIdList = officeService.getChildrenOffice(workInvoice.getOfficeId());
@@ -2842,7 +2841,6 @@ public class WorkInvoiceService extends CrudService<WorkInvoiceDao, WorkInvoice>
 		String beginDate = map.get("beginDate");
 		String endDate = map.get("endDate");
 
-		workInvoice.getSqlMap().put("dsf", dataScopeFilter(workInvoice.getCurrentUser(), "o", "u","s", MenuStatusEnum.WORK_INVOICE.getValue()));
 		if(StringUtils.isNotBlank(workInvoice.getOfficeId())){
 			//查询该选择节点下所有的部门Id
 			List<String> officeIdList = officeService.getChildrenOffice(workInvoice.getOfficeId());

+ 57 - 19
src/main/resources/mappings/modules/statement/StatementCompanyComprehensiveDao.xml

@@ -755,21 +755,58 @@
 	</select>
 
 	<select id="selectAllByType" parameterType="StatementCompanyComprehensiveInfo" resultType="StatementCompanyComprehensiveInfo">
-		select *,
+		select
+		       a.id as "id",
+		       a.del_flag as "delFlag",
+		       a.create_date as "createDate",
+		       a.year as "year",
+		       a.type as "type",
+		       a.big_date_type as "bigDateType",
+		       a.small_date_type as "smallDateType",
+		       a.statement_date as "statementDate",
+		       a.office_id as "officeId",
+		       a.field1 as "field1",
+			   a.field2 as "field2",
+			   a.field3 as "field3",
+			   a.field4 as "field4",
+			   a.field5 as "field5",
+			   a.field6 as "field6",
+			   a.field7 as "field7",
+			   a.field8 as "field8",
 		(select name from sys_office where id = office_id) officeName
-		from statement_company_comprehensive_info
-		where type = #{type}
-		and del_flag = 0
-		and big_date_type = #{bigDateType}
-		and year = #{year}
-		and small_date_type = #{smallDateType}
+		from statement_company_comprehensive_info a
+		<where>
+			a.type = #{type}
+			and a.del_flag = 0
+			and a.big_date_type = #{bigDateType}
+			and a.year = #{year}
+			and a.small_date_type = #{smallDateType}
+		</where>
 	</select>
 
 	<select id="selectAllByOfficeId" parameterType="StatementCompanyComprehensiveInfo" resultType="StatementCompanyComprehensiveInfo">
 		SELECT
-			su.NAME userName,
-			so.NAME officeName,
-			a.*
+			su.NAME as "userName",
+			so.NAME as "officeName",
+			a.id as "id",
+			a.del_flag as "delFlag",
+			a.create_date as "createDate",
+			a.year as "year",
+			a.type as "type",
+			a.big_date_type as "bigDateType",
+			a.small_date_type as "smallDateType",
+			a.statement_date as "statementDate",
+			a.office_id as "officeId",
+		    a.user_id as "userId",
+		    a.office_parent_ids as "officeParentIds",
+			a.field1 as "field1",
+			a.field2 as "field2",
+			a.field3 as "field3",
+			a.field4 as "field4",
+			a.field5 as "field5",
+			a.field6 as "field6",
+			a.field7 as "field7",
+			a.field8 as "field8",
 		FROM
 				statement_office_comprehensive_info a
 				LEFT JOIN sys_user su ON su.id = a.user_id
@@ -777,16 +814,17 @@
 				<if test="type == '1'.toString()">
 					left join statement_office_info soi on a.office_id = soi.office_id
 				</if>
-		WHERE
-			a.type = #{type}
-		  and big_date_type =#{bigDateType}
-		  and small_date_type = #{smallDateType}
-		  and a.year = #{year}
-		  and a.del_flag = 0
-		  AND (
+		<where>
+				a.type = #{type}
+			and big_date_type =#{bigDateType}
+			and small_date_type = #{smallDateType}
+			and a.year = #{year}
+			and a.del_flag = 0
+			AND (
 				a.office_id = #{officeId}
-				OR a.office_parent_ids LIKE concat( '%', #{officeId}, '%' )
-		      )
+			OR a.office_parent_ids LIKE concat( '%', #{officeId}, '%' )
+			)
+		</where>
 		ORDER BY
 			a.office_id,
 			a.user_id

+ 3 - 13
src/main/resources/mappings/modules/workinvoice/WorkInvoiceDao.xml

@@ -1597,9 +1597,7 @@
 			<if test="companyId != null and companyId != ''">
 				AND a.company_id = #{companyId}
 			</if>
-			<!--<if test="office != null and office.id != null and office.id != ''">
-				AND a.office_id = #{office.id}
-			</if>-->
+
 			<if test="officeIdList!=null and officeIdList.size!=0">
 				and a.office_id in
 				<foreach collection="officeIdList" item="officeId" separator="," open="(" close=")">
@@ -1767,15 +1765,7 @@
 			<if test="WorkInvoice.companyId != null and WorkInvoice.companyId != ''">
 				AND a.company_id = #{WorkInvoice.companyId}
 			</if>
-			<!--<if test="office != null and office.id != null and office.id != ''">
-				AND a.office_id = #{office.id}
-			</if>-->
-			<!--			<if test="WorkInvoice.officeIdList!=null and WorkInvoice.officeIdList.size!=0">-->
-			<!--				and a.office_id in-->
-			<!--				<foreach collection="officeIdList" item="officeId" separator="," open="(" close=")">-->
-			<!--					#{WorkInvoice.officeId}-->
-			<!--				</foreach>-->
-			<!--			</if>-->
+
 			<if test="WorkInvoice.invoiceNumber != null and WorkInvoice.invoiceNumber != ''">
 				AND a.invoice_number LIKE
 				<if test="WorkInvoice.dbName == 'oracle'">'%'||#{WorkInvoice.invoiceNumber}||'%'</if>
@@ -1824,7 +1814,7 @@
 
 	<select id="findBillingReportPageCount" resultType="integer">
 		SELECT
-		count(DISTINCT a.id)
+		count(a.id)
 		FROM work_invoice a
 		<include refid="workInvoiceJoins"/>
 		left join work_invoice_detail wid on a.id = wid.invoice_id