Browse Source

update->App项目列表和App维保计划列表。进行结果去重操作

wang-hai-cheng 4 năm trước cách đây
mục cha
commit
37cd641ddb

+ 3 - 2
lift-business-service/src/main/resources/mapper/maintenance/MaintenancePlanMapper.xml

@@ -33,7 +33,7 @@
 	</resultMap>
 
 	<sql id="Base_Column_List" >
-		id, lift_id, mt_company_id, project_id, worker_id, plan_date, work_date, count, type, 
+		id, lift_id, mt_company_id, project_id, worker_id, plan_date, work_date, count, type,
 		status
 	</sql>
 
@@ -132,7 +132,8 @@
 	<!--app端 保养任务列表 (0:待保养、-1:超期) -->
 	<select id="findPlanByWorkerId" resultType="cn.com.ty.lift.business.maintenance.dao.entity.model.response.MaintenanceAppResponse"
 			parameterType="cn.com.ty.lift.business.maintenance.dao.entity.model.request.MaintenanceRecordRequest">
-		SELECT p.project_name      AS projectName,
+		SELECT DISTINCT
+		       p.project_name      AS projectName,
 		       p.id                AS projectId,
 			   mp.id               AS mtPlanId,
 			   l.id                AS liftId,

+ 1 - 1
lift-business-service/src/main/resources/mapper/project/ProjectMapper.xml

@@ -159,7 +159,7 @@
 	<!--app端 根据公司id查询公司下项目列表 -->
 	<select id="findListByCompanyId" parameterType="cn.com.ty.lift.business.project.dao.entity.model.request.ProjectRequest"
 			resultType="cn.com.ty.lift.business.project.dao.entity.model.response.ProjectCompanyResponse">
-		SELECT
+		SELECT DISTINCT
 	    p.id            AS projectId,
 		p.project_code  AS projectCode,
 		p.project_name  AS projectName,