Parcourir la source

修改bug:资料查询>>资料废除后会生成多份资料

lvy il y a 3 mois
Parent
commit
09b90a909e

+ 4 - 0
blade-service/blade-business/src/main/java/org/springblade/business/controller/InformationWriteQueryController.java

@@ -1414,6 +1414,9 @@ public R<Object> batchTask(@RequestBody StartTaskVO startTaskVO) {
             List<InformationQuery> queryTempList = new ArrayList<>();
             Map<String, InformationQuery> queryTempMap = new HashMap<>();
             queryList.forEach(query -> {
+                if (query.getType() == 3) {
+                    startTaskVO.setTrialSelfInspectionRecordId(3L);
+                }
                 InformationQuery temp = queryTempMap.get(query.getWbsId() + "," + query.getContractId() + "," + query.getClassify());
                 if (temp != null) {
                     return;
@@ -1436,6 +1439,7 @@ public R<Object> batchTask(@RequestBody StartTaskVO startTaskVO) {
             if (queryList.isEmpty()) {
                 return R.fail( "已上报,无需重复上报");
             }
+            appType = startTaskVO.getTrialSelfInspectionRecordId();
             if (!saveQueryList.isEmpty()) {
                 this.informationQueryService.saveBatch(saveQueryList);
             }

+ 16 - 11
blade-service/blade-user/src/main/java/org/springblade/system/user/mapper/UserMapper.xml

@@ -175,17 +175,22 @@
                 iq.is_deleted = 0
             AND iq.classify = #{query.classify}
             AND iq.contract_id = #{query.contractId}
-
-                <if test="query.taskStatus != null and query.taskStatus != ''">
-                    <choose>
-                        <when test="query.taskStatus == 0">
-                            AND (iq.status = 0 OR iq.status = 3)
-                        </when>
-                        <otherwise>
-                            AND iq.status = #{query.taskStatus}
-                        </otherwise>
-                    </choose>
-                </if>
+                <choose>
+                    <when test="query.taskStatus != null and query.taskStatus != ''">
+<!--                        <choose>-->
+<!--                            <when test="query.taskStatus == 0">-->
+<!--                                AND (iq.status = 0 OR iq.status = 3)-->
+<!--                            </when>-->
+<!--                            <otherwise>-->
+<!--                                AND iq.status = #{query.taskStatus}-->
+<!--                            </otherwise>-->
+<!--                        </choose>-->
+                        AND iq.status = #{query.taskStatus}
+                    </when>
+                    <otherwise>
+                        AND iq.status != 3
+                    </otherwise>
+                </choose>
                 <if test="query.sourceType != null and query.sourceType != ''">
                     AND iq.source_type = #{query.sourceType}
                 </if>