wks il y a 3 ans
Parent
commit
ca8418be17

+ 1 - 1
src/main/java/com/ydtech/modules/protocol/service/impl/PtlAgreementServiceImpl.java

@@ -136,7 +136,7 @@ public class PtlAgreementServiceImpl extends ServiceImpl<PtlAgreementMapper, Ptl
                 // 供应商类型
                 .eq(!ObjectUtils.isEmpty(ptlAgreementPageVo.getCompaniesType()), PtlAgreement::getCompaniesType, ptlAgreementPageVo.getCompaniesType())
                 // 合作公司
-                .in(!StringUtils.isEmpty(ptlAgreementPageVo.getPartnerCompaniesId()), PtlAgreement::getPartnerCompaniesId, lowerId)
+                .in(!StringUtils.isEmpty(ptlAgreementPageVo.getPartnerCompaniesId()) && !lowerId.isEmpty(), PtlAgreement::getPartnerCompaniesId, lowerId)
                 // 录入时间
                 .between(!ObjectUtils.isEmpty(ptlAgreementPageVo.getStartDate()) && ObjectUtils.isEmpty(ptlAgreementPageVo.getEndDate()), PtlAgreement::getCreateTime, ptlAgreementPageVo.getStartDate(), ptlAgreementPageVo.getEndDate());
         Page<PtlAgreement> ptlAgreementPage = new Page<>(pageNum, pageSize);

+ 17 - 14
src/main/resources/mapper/modules/esm/EsmInsCompanyMapper.xml

@@ -5,19 +5,19 @@
 <mapper namespace="com.ydtech.modules.esm.dao.EsmInsCompanyMapper">
 
     <resultMap id="BaseResultMap" type="com.ydtech.modules.esm.model.EsmInsCompany">
-            <id property="id" column="id" jdbcType="VARCHAR"/>
-            <result property="code" column="code" jdbcType="VARCHAR"/>
-            <result property="name" column="name" jdbcType="VARCHAR"/>
-            <result property="parentId" column="parent_id" jdbcType="VARCHAR"/>
-            <result property="namesimple" column="namesimple" jdbcType="VARCHAR"/>
-            <result property="remark" column="remark" jdbcType="VARCHAR"/>
-            <result property="orderNum" column="order_num" jdbcType="INTEGER"/>
-            <result property="createBy" column="create_by" jdbcType="VARCHAR"/>
-            <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
-            <result property="lastUpdateBy" column="last_update_by" jdbcType="VARCHAR"/>
-            <result property="lastUpdateTime" column="last_update_time" jdbcType="TIMESTAMP"/>
-            <result property="cnName" column="cn_name" jdbcType="VARCHAR"/>
-            <result property="type" column="type" jdbcType="TINYINT"/>
+        <id property="id" column="id" jdbcType="VARCHAR"/>
+        <result property="code" column="code" jdbcType="VARCHAR"/>
+        <result property="name" column="name" jdbcType="VARCHAR"/>
+        <result property="parentId" column="parent_id" jdbcType="VARCHAR"/>
+        <result property="namesimple" column="namesimple" jdbcType="VARCHAR"/>
+        <result property="remark" column="remark" jdbcType="VARCHAR"/>
+        <result property="orderNum" column="order_num" jdbcType="INTEGER"/>
+        <result property="createBy" column="create_by" jdbcType="VARCHAR"/>
+        <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+        <result property="lastUpdateBy" column="last_update_by" jdbcType="VARCHAR"/>
+        <result property="lastUpdateTime" column="last_update_time" jdbcType="TIMESTAMP"/>
+        <result property="cnName" column="cn_name" jdbcType="VARCHAR"/>
+        <result property="type" column="type" jdbcType="TINYINT"/>
     </resultMap>
 
     <sql id="Base_Column_List">
@@ -47,8 +47,11 @@
         WHERE find_in_set(parent_id, @pv)
           AND length(
                 @pv := concat(@pv, ',', id))
+        UNION
+        SELECT id
+        FROM esm_ins_company
+        WHERE id = #{companyId}
     </select>
 
 
-
 </mapper>