Pārlūkot izejas kodu

导出接口 调用 查找点检信息接口 调整参数

daili 3 gadi atpakaļ
vecāks
revīzija
e179119577

+ 10 - 9
application-facade/src/main/java/com/factory/web/service/impl/pm/PreventMistakeServiceImpl.java

@@ -1022,10 +1022,11 @@ public class PreventMistakeServiceImpl extends ServiceImpl<PreventMistakeMapper,
 	}
 
 	/**
-     * 修改防错计划
-     * @param req
-     * @return
-     */
+	 * 修改防错计划
+	 *
+	 * @param @req
+	 * @return
+	 */
 	@Override
 	public void setOnsitePlanHis(Long bentelerPlanId) {
 
@@ -1296,11 +1297,11 @@ public class PreventMistakeServiceImpl extends ServiceImpl<PreventMistakeMapper,
 		return bytes;
 	}
 
-    /**
-     * byte[]转成Object
-     * @param byte[]
-     * @return Object
-     */
+	/**
+	 * byte[]转成Object
+	 * @param @byte[]
+	 * @return Object
+	 */
     private Object byteArrayToObject(byte[] buffer) throws Exception {
 		Object ob = null;
 		ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(buffer));

+ 20 - 19
application-facade/src/main/resources/mapper/FirstArticleMapper.xml

@@ -64,26 +64,27 @@
     
     <!--取得Pad端首件计划列表 -->
     <select id="getFaPlanListForPad" resultType="com.factory.web.entity.fa.res.FaPlanListForPadRes">
-        <if test="req.type == 0"> <!-- 未完成 -->
-        SELECT DISTINCT fac.benteler_plan_id,
-			   bp.`name` AS benteler_plan_name
-        </if>
-        <if test="req.type == 1 || req.type == 2"><!-- 已完成 --><!-- 待重检(不放行) -->
-        SELECT fat.id AS first_article_task_id,
-		       fat.`status`,
-			   fac.benteler_plan_id,
-			   bp.`name` AS benteler_plan_name,
-			   fac.id AS first_article_calendar_id,
-			   fac.type_flag
-        </if>
-		FROM   first_article_task fat,
-		       first_article_calendar fac,
-			   benteler_plan bp
-		WHERE  fat.first_article_calendar_id = fac.id
-		AND    fac.benteler_plan_id = bp.id
-		AND    bp.pause_flag = 0
 		<if test="req.type == 0"> <!-- 未完成 -->
-		AND    fat.`status` = 0
+			SELECT DISTINCT fac.benteler_plan_id,
+			bp.`name` AS benteler_plan_name
+		</if>
+
+		<if test="req.type == 1 || req.type == 2"><!-- 已完成 --><!-- 待重检(不放行) -->
+			SELECT fat.id AS first_article_task_id,
+			fat.`status`,
+			fac.benteler_plan_id,
+			bp.`name` AS benteler_plan_name,
+			fac.id AS first_article_calendar_id,
+			fac.type_flag
+		</if>
+		FROM first_article_task fat,
+		first_article_calendar fac,
+		benteler_plan bp
+		WHERE fat.first_article_calendar_id = fac.id
+		AND fac.benteler_plan_id = bp.id
+		AND bp.pause_flag = 0
+		<if test="req.type == 0"> <!-- 未完成 -->
+			AND fat.`status` = 0
 		</if>
 		<if test="req.type == 1"> <!-- 已完成 -->
 		AND    fat.`status` in (1, 2, 4)

+ 26 - 24
application-facade/src/main/resources/mapper/PreventMistakeMapper.xml

@@ -64,29 +64,29 @@
 
     <!-- 取得防错计划列表(查询所有的防错计划)(计划审批状态plan_status 0待质量经理审批、1待生产经理审批、2已驳回待修改、3审批通过) -->
     <select id="getPmPlanList" resultType="com.factory.web.entity.pm.res.PmPlanListRes">
-        SELECT
-			bp.id AS benteler_plan_id,
-			bp.`name` AS benteler_plan_name,
-			bp.created_time,
-			bp.pause_flag,
-			bp.plan_type,
-			ps.approval_level,
-		    ps.reason,
-		    ps.updated_time,
-		    ps.approval_person,
-		    ps.`status`,
-			ps.plan_status
-		FROM
-			benteler_plan bp,
-			(
-			    SELECT a.id,
-						 a.benteler_plan_id,
-						 a.approval_level,
-						 a.reason,
-                         a.updated_time,
-                         uu.username AS approval_person,
-						 a.`status`,
-						 CASE
+        select
+		bp.id AS benteler_plan_id,
+		bp.`name` AS benteler_plan_name,
+		bp.created_time,
+		bp.pause_flag,
+		bp.plan_type,
+		ps.approval_level,
+		ps.reason,
+		ps.updated_time,
+		ps.approval_person,
+		ps.`status`,
+		ps.plan_status
+		from
+		benteler_plan bp,
+		(
+		SELECT a.id,
+		a.benteler_plan_id,
+		a.approval_level,
+		a.reason,
+		a.updated_time,
+		uu.username AS approval_person,
+		a.`status`,
+		CASE
 								 WHEN a.approval_level = 2 AND a.`status` = 0 THEN 1
 								 WHEN a.approval_level = 2 AND a.`status` = 1 THEN 3
 								 WHEN a.approval_level = 2 AND a.`status` = 2 THEN 2
@@ -122,7 +122,9 @@
 		    <if test="req.planType != null">
 		    AND bp.plan_type = #{req.planType}
 		    </if>
-    </select>
+		order by bp.created_time desc
+
+	</select>
 
     <!--取得防错计划当天任务信息-->
     <select id="getTaskList" resultType="com.factory.web.entity.pm.res.PmTaskListRes">

+ 1 - 0
pom.xml

@@ -14,6 +14,7 @@
         <module>common-user</module>
         <module>application-file</module>
         <module>application-facade</module>
+        <module>application-task</module>
     </modules>
 
     <properties>