Ver código fonte

基础数据修改

于继渤 2 anos atrás
pai
commit
a63eaaf54f

+ 9 - 0
src/main/java/com/dk/mdm/controller/mst/DictionaryDataController.java

@@ -14,6 +14,9 @@ import org.springframework.beans.factory.annotation.Autowired;
 import io.swagger.annotations.Api;
 import com.dk.mdm.service.mst.DictionaryDataService;
 
+import java.util.List;
+import java.util.Map;
+
 @Api(tags = "数据字典API接口")
 @RestController
 @RequestMapping("/mst/dictionaryData")
@@ -78,6 +81,12 @@ public class DictionaryDataController{
         return this.getService().disable(id);
     }
 
+    @PostMapping("count_by_cond_money_account/{id}")
+    public ResponseResultVO<Long> countByCondMoneyAccount(@PathVariable String id) {
+        return dictionaryDataService.countByCondMoneyAccount(id);
+    }
+
+
     /**
      * @desc : 启用
      * @author : 于继渤

+ 8 - 1
src/main/java/com/dk/mdm/mapper/mst/CusFollowMapper.xml

@@ -234,7 +234,13 @@
             <if test="cpId != null">
                 AND tccf.cp_id = #{cpId}
             </if>
-
+            <if test="searchText != null and searchText != ''">
+                AND(tmc.cus_phone  LIKE concat('%', #{searchText}, '%')
+                OR tmc.cus_name LIKE concat('%', #{searchText}, '%')
+                OR tmc.address_full LIKE concat('%', #{searchText}, '%')
+                OR tccf.remarks LIKE concat('%', #{searchText}, '%')
+                )
+            </if>
         </where>
     </sql>
 
@@ -313,6 +319,7 @@
         SELECT
         count(1)
         FROM dkic_b.t_crm_cus_follow tccf
+        LEFT JOIN dkic_b.t_mst_customer tmc ON tmc.cus_id = tccf.cus_id
         <include refid="Condition_Join"/>
     </select>
 

+ 2 - 0
src/main/java/com/dk/mdm/mapper/mst/DictionaryDataMapper.java

@@ -30,6 +30,8 @@ public interface DictionaryDataMapper extends BaseMapper<DictionaryData>{
      */
     Long countByCond(DictionaryDataQuery dictionaryDataQuery);
 
+    Long countByCondMoneyAccount(String id);
+
     /**
      * @desc : 批量编辑序号
      * @author : 于继渤

+ 8 - 0
src/main/java/com/dk/mdm/mapper/mst/DictionaryDataMapper.xml

@@ -134,6 +134,14 @@
         FROM dkic_b.t_mst_dictionary_data
         <include refid="Condition"/>
     </select>
+    <select id="countByCondMoneyAccount" resultType="Long">
+        SELECT
+            count(1)
+        FROM
+            dkic_b.t_mst_money_account
+                LEFT JOIN dkic_b.t_mst_dictionary_data dd ON mac_type = dd.data_id
+        where dd.data_id = #{id}::uuid
+    </select>
 
     <!-- 根据主键查询表t_mst_dictionary_data的一行数据 -->
     <select id="selectById" resultMap="BaseResultMap">

+ 9 - 2
src/main/java/com/dk/mdm/service/mst/DictionaryDataService.java

@@ -6,11 +6,13 @@ import com.dk.common.model.pojo.PageList;
 import com.dk.common.response.ResponseResultUtil;
 import com.dk.common.response.ResponseResultVO;
 import com.dk.mdm.infrastructure.convert.mst.DictionaryDataConvert;
+import com.dk.mdm.mapper.mst.MoneyAccountMapper;
 import com.dk.mdm.model.pojo.mst.DictionaryData;
 import com.dk.mdm.mapper.mst.DictionaryDataMapper;
 import com.dk.common.service.BaseService;
 import com.dk.common.mapper.BaseMapper;
 import com.dk.mdm.model.query.mst.DictionaryDataQuery;
+import com.dk.mdm.model.query.mst.MoneyAccountQuery;
 import com.dk.mdm.model.response.mst.DictionaryDataResponse;
 import com.dk.mdm.model.vo.mst.DictionaryDataVO;
 import com.dk.mdm.model.vo.mst.WarehouseVO;
@@ -20,6 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 @Service
@@ -40,7 +43,8 @@ public class DictionaryDataService extends BaseService<DictionaryData> {
 	@Autowired
 	private DictionaryDataConvert dictionaryDataConvert;
 
-
+	@Autowired
+	private MoneyAccountMapper moneyAccountMapper;
 	/**
 	 * @desc : 重写主键
 	 * @author : 于继渤
@@ -64,7 +68,10 @@ public class DictionaryDataService extends BaseService<DictionaryData> {
 	}
 
 
-
+	public ResponseResultVO<Long> countByCondMoneyAccount(String id) {
+		Long aLong = dictionaryDataMapper.countByCondMoneyAccount(id);
+		return ResponseResultUtil.success(aLong);
+	}
 	/**
 	 * @desc : 新建
 	 * @author : 于继渤