Browse Source

修改报价明细查询条件

785834757 1 year ago
parent
commit
b328cc83ff

+ 3 - 0
src/main/java/com/ydtech/modules/order/service/impl/SysQuoteConfigServiceImpl.java

@@ -326,6 +326,9 @@ public class SysQuoteConfigServiceImpl extends ServiceImpl<SysQuoteConfigMapper,
         if(quoteDetailsQueryVo.getDeptId() == null) {
             quoteDetailsQueryVo.setDeptId(BaseController.getDeptId());
         }
+        if(quoteDetailsQueryVo.getOperator() == null){
+            quoteDetailsQueryVo.setOperator(BaseController.getUserId());
+        }
         Page<QuoteDetailsVo> quoteRecordPage = sysQuoteRecordMapper.getQuoteRecordPage(page, quoteDetailsQueryVo);
         quoteRecordPage.getRecords().forEach(item -> {
             item.setAction(QuoteNumberConstant.QuoteAction.getByCode(item.getAction()));

+ 10 - 9
src/main/resources/mapper/modules/order/SysQuoteRecordMapper.xml

@@ -54,17 +54,18 @@
             <if test="param.result!= null and param.result!= ''">
                 AND sqr.result = #{param.result}
             </if>
-            <if test="param.agent != null and param.agent != ''">
-                AND (sqr.user_id = #{param.agent} or su.name = #{param.agent})
-            </if>
-            <if test="param.operator != null and param.operator != ''">
-                AND sqr.operator = #{param.operator}
-            </if>
+
+
             <if test="param.deptId!= null and param.deptId!= ''">
-                AND sd.id like '${param.deptId}%'
+                <if test="param.operator != null and param.operator != ''">
+                    AND (sd.id like '${param.deptId}%' or sqr.operator = #{param.operator} or su.name = #{param.operator})
+                </if>
+                <if test="param.operator == null or param.operator == ''">
+                    AND sd.id like '${param.deptId}%'
+                </if>
             </if>
-            <if test="param.action != null and param.action!= ''">
-                AND sqr.action = #{param.action}
+            <if test="param.agent != null and param.agent!= ''">
+                AND sqr.user_id = #{param.agent}
             </if>
         ORDER BY sqr.create_time DESC
     </select>