瀏覽代碼

feat: 企业批量任务审核-sql调整

lixuesong 2 年之前
父節點
當前提交
2545116acc

+ 1 - 0
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/entity/WmReport.java

@@ -164,5 +164,6 @@ public class WmReport extends Model<WmReport> {
 	/**
 	 * 报告审批状态:1通过,2不通过
 	 */
+	@TableField(exist = false)
 	private String entTaskStatus;
 }

+ 7 - 4
hnqz-upms/hnqz-upms-biz/src/main/resources/mapper/WmTaskMapper.xml

@@ -1344,14 +1344,17 @@ FROM
 		<foreach collection="query.taskTypeIdList" item="item" index="index" separator="," open="(" close=")">
 			#{item}
 		</foreach>
-		  /* 状态为审核通过、不通过 */
-	  	<if test="query.entTaskStatus != null and (query.entTaskStatus == '1' or query.entTaskStatus == '2')">
+	  	<if test="query.entTaskStatus != null and query.entTaskStatus == 1">
 		  and (p.typeid = 0 and t.report_drug_approval_opinion = #{query.entTaskStatus}
 		  or p.typeid = 1 and t.report_drug_approval_opinion = #{query.entTaskStatus}
 		  or p.typeid = 2 and t.report_one_approval_opinion = #{query.entTaskStatus})
 	  	</if>
-		 /* 状态为待审核的 */
-		<if test="query.entTaskStatus != null and query.entTaskStatus == '0'">
+		<if test="query.entTaskStatus != null and query.entTaskStatus == 2">
+			and (p.typeid = 0 and t.report_drug_approval_opinion = #{query.entTaskStatus}
+			or p.typeid = 1 and t.report_drug_approval_opinion = #{query.entTaskStatus}
+			or p.typeid = 2 and t.report_one_approval_opinion = #{query.entTaskStatus})
+		</if>
+		<if test="query.entTaskStatus != null and query.entTaskStatus == 0">
 		  and (p.typeid = 0 and t.report_drug_approval_opinion is null
 			or p.typeid = 1 and t.report_drug_approval_opinion is null
 			or p.typeid = 2 and t.report_one_approval_opinion is null)