Kaynağa Gözat

任务管理列表添加机构来源,处理详情页面处理电话号只显示最后四位

hxl13994548489 2 yıl önce
ebeveyn
işleme
73ecb43b46

+ 18 - 1
src/main/java/com/ydtech/modules/order/service/impl/InsOrdersServiceImpl.java

@@ -748,9 +748,26 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
         if (null == orderAndAreaCompany.getFeeStatus()) orderAndAreaCompany.setFeeStatus("0");
 
         //获取出单员地区信息
-
+        //add by  hxl  添加手机号只显示最后四位
+        orderAndAreaCompany.setOwnerinfo(setNewPhone(orderAndAreaCompany.getOwnerinfo()));
+        orderAndAreaCompany.setApplyinfo(setNewPhone(orderAndAreaCompany.getApplyinfo()));
+        orderAndAreaCompany.setInsureinfo(setNewPhone(orderAndAreaCompany.getInsureinfo()));
         return HttpResult.ok("success", orderAndAreaCompany);
     }
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/5/6 11:55
+     *  @Description: 只显示手机号后4位
+     */
+    private static JSONObject setNewPhone(JSONObject ownerinfo) {
+        if(ownerinfo !=null ){
+            String phone = ownerinfo.getString("mobile")==null?"": ownerinfo.getString("mobile");
+            phone = phone.replaceAll("\\d{7}(\\d{4})", "*******$1");
+            ownerinfo.put("mobile",phone);
+        }
+        return ownerinfo;
+    }
 
     @Override
     public InsOrdersEditingVo revise(String orderNo) {

+ 10 - 1
src/main/resources/mapper/modules/order/InsOrdersMapper.xml

@@ -45,6 +45,8 @@
         <result property="agreementCode" column="agreementCode" jdbcType="VARCHAR"/>
         <result property="agreementName" column="agreementName" jdbcType="VARCHAR"/>
         <result property="partnerCompaniesName" column="partnerCompaniesName" jdbcType="VARCHAR"/>
+        <result property="managementSource" column="managementSource" jdbcType="VARCHAR"/>
+
     </resultMap>
     <resultMap id="OrderResultMap" type="com.ydtech.modules.order.entity.vo.OrderVo">
         <id property="orderno" column="orderno" jdbcType="VARCHAR"/>
@@ -812,7 +814,12 @@
         iac.inscompany as ins_company,
         agree.agreement_code as agreementCode,
         agree.agreement_name as agreementName,
-        company.namesimple as partnerCompaniesName
+        company.namesimple as partnerCompaniesName,
+        CASE dept.management_source
+        WHEN '1' THEN '渠道'
+        WHEN '2' THEN '个代'
+        ELSE '' END
+        AS managementSource
         from
             ins_area_company iac
         left JOIN
@@ -821,6 +828,8 @@
             ptl_agreement   agree  on  iac.agreement_id= agree.id
         left join
            esm_ins_company   company  on  agree.partner_companies_id= company.id
+        LEFT JOIN
+                sys_dept dept ON dept.id = io.deptid
         <where>
             <if test="agentUserIds != null and agentUserIds.size>0" >
                 AND (