Procházet zdrojové kódy

修改bug文档bug

liujiankang před 7 roky
rodič
revize
b45a5599d1

+ 20 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/CustomerInfo.java

@@ -55,6 +55,10 @@ public class CustomerInfo  implements Serializable {
     private String customerQuestionTitle;
     //  客诉备注
     private String customerDesc;
+    //  是否为开箱损 1:是  2 否
+    private String customerOutDamaged;
+    //  是否为二次售后 1:是  2 否
+    private String customerSecondaryCustomer;
 
     /*客诉信息本身延伸字段*/
     //区域,用于修改客诉处理区域选择逻辑
@@ -642,4 +646,20 @@ public class CustomerInfo  implements Serializable {
     public void setIsNeedSelectOrder(Integer isNeedSelectOrder) {
         this.isNeedSelectOrder = isNeedSelectOrder;
     }
+
+    public String getCustomerOutDamaged() {
+        return customerOutDamaged;
+    }
+
+    public void setCustomerOutDamaged(String customerOutDamaged) {
+        this.customerOutDamaged = customerOutDamaged;
+    }
+
+    public String getCustomerSecondaryCustomer() {
+        return customerSecondaryCustomer;
+    }
+
+    public void setCustomerSecondaryCustomer(String customerSecondaryCustomer) {
+        this.customerSecondaryCustomer = customerSecondaryCustomer;
+    }
 }

+ 35 - 12
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/CustomerServiceImpl.java

@@ -4,6 +4,7 @@ import com.github.pagehelper.PageHelper;
 import com.iamberry.rst.core.cm.*;
 import com.iamberry.rst.core.order.*;
 import com.iamberry.rst.core.page.PagedResult;
+import com.iamberry.rst.faces.cm.CustomerCommonService;
 import com.iamberry.rst.faces.cm.CustomerService;
 import com.iamberry.rst.faces.order.EfastOrderService;
 import com.iamberry.rst.service.address.mapper.AddressMapper;
@@ -73,6 +74,8 @@ public class CustomerServiceImpl implements CustomerService {
     private EfastOrderService efastOrderService;
     @Autowired
     private StoreInfoMapper storeInfoMapper;
+    @Autowired
+    private CustomerCommonService customerCommonService;
 
     @Override
     public CustomerInfo getCustomerInfo(Integer customerId) {
@@ -274,7 +277,13 @@ public class CustomerServiceImpl implements CustomerService {
     @Transactional
     public Integer updateCustomerInfo(CustomerInfo customerInfo,SalesOrder salesOrder){
         Integer isNeedSelectOrder = customerInfo.getIsNeedSelectOrder();
-
+        //查询旧的客诉类型信息
+        CustomerCommon cc = customerInfo.getCustomerCommon();
+        cc.setCustomerId(customerInfo.getCustomerId());
+        List<CustomerCommon> ccList = customerCommonService.listCustomerCommon(cc);
+        /*if(ccList.size() > 0){
+            cc = ccList.get(0);
+        }*/
         //删除旧的售后数据
         customerService.deleteCustomerAfterSales(customerInfo);
 
@@ -321,22 +330,36 @@ public class CustomerServiceImpl implements CustomerService {
 
             logger.info("-----------修改客诉-查询订单--------------");
             CustomerCommon customerCommon = customerInfo.getCustomerCommon();
+            if(ccList.size() > 0){
+                cc = ccList.get(0);
+                customerCommon.setRelationBackStatus(cc.getRelationBackStatus()); //寄回状态 1:未寄回
+                customerCommon.setRelationSendStatus(cc.getRelationSendStatus()); //寄送状态 1:未寄送
+                customerCommon.setRelationIsTransfer(cc.getRelationIsTransfer());    //是否已转账邮费
+                customerCommon.setRelationBackPostage(cc.getRelationBackPostage());   //邮费
+                //旧的物流公司物流单号支付宝信息 邮费状态 efast订单号
+                customerCommon.setRelationBackLogisticsCompany(cc.getRelationBackLogisticsCompany());//寄回物流公司
+                customerCommon.setRelationBackLogisticsNo(cc.getRelationBackLogisticsNo());//寄回物流单号
+                customerCommon.setRelationAlipay(cc.getRelationAlipay());//转账账户
+                customerCommon.setRelationAlipayName(cc.getRelationAlipayName());//转账账户 (账户姓名)
+                customerCommon.setRelationDesc(cc.getRelationDesc());//备注
+                customerCommon.setRelationSendLogisticsCompany(cc.getRelationSendLogisticsCompany());//寄送物流公司
+                customerCommon.setRelationSendLogisticsNo(cc.getRelationSendLogisticsNo());//寄送物流单号
+                customerCommon.setSalesOrderId(cc.getSalesOrderId());//efast订单号
+            }else{
+                customerCommon.setRelationBackStatus(1); //寄回状态 1:未寄回
+                customerCommon.setRelationSendStatus(1); //寄送状态 1:未寄送
+                customerCommon.setRelationIsTransfer(0);    //是否已转账邮费  0:不需要
+                customerCommon.setRelationBackPostage(0);   //邮费默认为0
+            }
             customerCommon.setCustomerId(customerInfo.getCustomerId()); //设置客诉id
-            customerCommon.setRelationBackStatus(1); //寄回状态 1:未寄回
-            customerCommon.setRelationSendStatus(1); //寄送状态 1:未寄送
-            customerCommon.setRelationState(1); //状态  默认使用中
+            customerCommon.setRelationState(1); //状态  默认使用中 //新
             if(isNeedSelectOrder == 1){
-                customerCommon.setOrderId(salesOrder.getSalesId()); //订单id
+                customerCommon.setOrderId(salesOrder.getSalesId()); //订单id //新
             }
             customerCommon.setTransactionNumber(customerInfo.getTransactionNumber());   //外部交易号
-
             customerCommon.setIsNeedSelectOrder(isNeedSelectOrder); //是否需要添加订单
-
-            customerCommon.setRelationIsTransfer(0);    //是否已转账邮费  0:不需要
-            customerCommon.setRelationBackPostage(0);   //邮费默认为0
-
-            customerCommon.setRelationBackName(customerCommon.getRelationSendName()); //姓名
-            customerCommon.setRelationBackTel(customerCommon.getRelationSendTel()); //电话号码
+            customerCommon.setRelationBackName(customerCommon.getRelationSendName()); //姓名//新
+            customerCommon.setRelationBackTel(customerCommon.getRelationSendTel()); //电话号码//新
 
             /*  初始化产品类型,名称,配件名称 */
             customerService.setName(customerCommon);

+ 20 - 5
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/customerInfoMapper.xml

@@ -21,11 +21,14 @@
     <result column="customer_create_time" property="customerCreateTime" jdbcType="TIMESTAMP" />
     <result column="customer_update_time" property="customerUpdateTime" jdbcType="TIMESTAMP" />
     <result column="customer_desc" property="customerDesc" jdbcType="VARCHAR" />
+    <result column="customer_out_damaged" property="customerOutDamaged" jdbcType="INTEGER" />
+    <result column="customer_secondary_customer" property="customerSecondaryCustomer" jdbcType="INTEGER" />
   </resultMap>
   <sql id="Base_Column_List" >
     customer_id, admin_id, question_id, company_id, store_id, customer_source_type, customer_source, 
     customer_counsel_type, customer_name, customer_tel,customer_wechat_name, customer_is_solve, customer_is_visit,
-    customer_in_TDS, customer_out_TDS, customer_area, customer_create_time, customer_update_time
+    customer_in_TDS, customer_out_TDS, customer_area, customer_create_time, customer_update_time,customer_desc,
+    customer_out_damaged,customer_secondary_customer
   </sql>
 
   <!-- 根据id获取客诉信息 -->
@@ -51,7 +54,9 @@
       t.customer_create_time,
       t.customer_update_time,
       t.customer_question_title,
-      t.customer_desc
+      t.customer_desc,
+      t.customer_out_damaged,
+      t.customer_secondary_customer
     from tb_rst_customer_info t
     where t.customer_id = #{customerId,jdbcType=INTEGER}
   </select>
@@ -85,6 +90,8 @@
       c.customer_is_visit,
       c.customer_create_time,
       c.customer_desc,
+      c.customer_out_damaged,
+      c.customer_secondary_customer,
       v.visit_status,
       v.visit_complete_date,
       v.visit_name,
@@ -240,6 +247,8 @@
     <result column="customer_is_visit" property="customerIsVisit"/>
     <result column="customer_create_time" property="customerCreateTime"/>
     <result column="customer_desc" property="customerDesc"/>
+    <result column="customer_out_damaged" property="customerOutDamaged"/>
+    <result column="customer_secondary_customer" property="customerSecondaryCustomer"/>
     <result column="visit_status" property="visitStatus"/>
     <result column="visit_complete_date" property="visitCompleteDate"/>
     <result column="visit_name" property="visitName"/>
@@ -268,13 +277,13 @@
       company_id, store_id, customer_source_type, 
       customer_source, customer_counsel_type, customer_name, 
       customer_tel,customer_wechat_name, customer_is_solve, customer_is_visit,
-      customer_in_TDS, customer_out_TDS, customer_area, type_id, customer_desc
+      customer_in_TDS, customer_out_TDS, customer_area, type_id, customer_desc, customer_out_damaged, customer_secondary_customer
       )
     values (#{customerId,jdbcType=INTEGER}, #{adminId,jdbcType=INTEGER}, #{questionId,jdbcType=INTEGER}, 
       #{companyId,jdbcType=INTEGER}, #{storeId,jdbcType=INTEGER}, #{customerSourceType,jdbcType=TINYINT}, 
       #{customerSource,jdbcType=VARCHAR}, #{customerCounselType,jdbcType=BIT}, #{customerName,jdbcType=VARCHAR}, 
       #{customerTel,jdbcType=VARCHAR},#{customerWechatName,jdbcType=VARCHAR}, #{customerIsSolve,jdbcType=TINYINT}, #{customerIsVisit,jdbcType=VARCHAR},
-      #{customerInTDS,jdbcType=INTEGER}, #{customerOutTDS,jdbcType=INTEGER}, #{customerArea,jdbcType=VARCHAR},#{typeId},#{customerDesc}
+      #{customerInTDS,jdbcType=INTEGER}, #{customerOutTDS,jdbcType=INTEGER}, #{customerArea,jdbcType=VARCHAR},#{typeId},#{customerDesc},#{customerOutDamaged},#{customerSecondaryCustomer}
       )
   </insert>
 
@@ -337,7 +346,13 @@
         type_id = #{typeId},
       </if>
       <if test="customerDesc != null" >
-        customer_desc = #{customerDesc}
+        customer_desc = #{customerDesc},
+      </if>
+      <if test="customerOutDamaged != null" >
+        customer_out_damaged = #{customerOutDamaged},
+      </if>
+      <if test="customerSecondaryCustomer != null" >
+        customer_secondary_customer = #{customerSecondaryCustomer}
       </if>
     </set>
     where customer_id = #{customerId}

+ 3 - 2
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/renewedMapper.xml

@@ -196,7 +196,7 @@
       province_number, city_number, area_number, 
       renewed_send_merge_address, renewed_send_address, 
       renewed_send_logistics_company, renewed_send_logistics_no, 
-      renewed_desc, renewed_state, renewed_alipay, 
+      renewed_desc, renewed_state, renewed_alipay, renewed_alipay_name,
       renewed_is_transfer
       )
     values ( #{customerId,jdbcType=INTEGER}, #{orderId,jdbcType=INTEGER},
@@ -208,7 +208,8 @@
       #{provinceNumber,jdbcType=VARCHAR}, #{cityNumber,jdbcType=VARCHAR}, #{areaNumber,jdbcType=VARCHAR}, 
       #{renewedSendMergeAddress,jdbcType=VARCHAR}, #{renewedSendAddress,jdbcType=VARCHAR}, 
       #{renewedSendLogisticsCompany,jdbcType=VARCHAR}, #{renewedSendLogisticsNo,jdbcType=VARCHAR}, 
-      #{renewedDesc,jdbcType=VARCHAR}, #{renewedState,jdbcType=BIT}, #{renewedAlipay,jdbcType=VARCHAR}, 
+      #{renewedDesc,jdbcType=VARCHAR}, #{renewedState,jdbcType=BIT}, #{renewedAlipay,jdbcType=VARCHAR},
+      #{renewedAlipayName,jdbcType=VARCHAR},
       #{renewedIsTransfer,jdbcType=BIT}
       )
   </insert>

+ 5 - 3
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/repairMapper.xml

@@ -27,6 +27,7 @@
     <result column="repair_desc" property="repairDesc" jdbcType="VARCHAR" />
     <result column="repair_state" property="repairState" jdbcType="BIT" />
     <result column="repair_alipay" property="repairAlipay" jdbcType="VARCHAR" />
+    <result column="repair_alipay_name" property="repairAlipayName" jdbcType="VARCHAR" />
     <result column="repair_is_transfer" property="repairIsTransfer" jdbcType="BIT" />
     <result column="repair_create_time" property="repairCreateTime" jdbcType="TIMESTAMP" />
     <result column="repair_update_time" property="repairUpdateTime" jdbcType="TIMESTAMP" />
@@ -37,7 +38,7 @@
     repair_back_postage, repair_back_machine_no, repair_send_status, repair_send_name, 
     repair_send_tel, province_number, city_number, area_number, repair_send_merge_address, 
     repair_send_address, repair_send_logistics_company, repair_send_logistics_no, repair_desc, 
-    repair_state, repair_alipay, repair_is_transfer, repair_create_time, repair_update_time
+    repair_state, repair_alipay,repair_alipay_name, repair_is_transfer, repair_create_time, repair_update_time
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
     select 
@@ -140,6 +141,7 @@
     <result column="repair_desc" property="repairDesc"/>
     <result column="repair_state" property="repairState"/>
     <result column="repair_alipay" property="repairAlipay"/>
+    <result column="repair_alipay_name" property="repairAlipayName"/>
     <result column="repair_is_transfer" property="repairIsTransfer"/>
     <result column="repair_create_time" property="repairCreateTime"/>
     <result column="repair_update_time" property="repairUpdateTime"/>
@@ -187,7 +189,7 @@
       repair_send_tel, province_number, city_number, 
       area_number, repair_send_merge_address, repair_send_address, 
       repair_send_logistics_company, repair_send_logistics_no, 
-      repair_desc, repair_state, repair_alipay, 
+      repair_desc, repair_state, repair_alipay, repair_alipay_name,
       repair_is_transfer
       )
     values (#{customerId,jdbcType=INTEGER}, #{orderId,jdbcType=INTEGER},
@@ -198,7 +200,7 @@
       #{repairSendTel,jdbcType=CHAR}, #{provinceNumber,jdbcType=VARCHAR}, #{cityNumber,jdbcType=VARCHAR}, 
       #{areaNumber,jdbcType=VARCHAR}, #{repairSendMergeAddress,jdbcType=VARCHAR}, #{repairSendAddress,jdbcType=VARCHAR}, 
       #{repairSendLogisticsCompany,jdbcType=VARCHAR}, #{repairSendLogisticsNo,jdbcType=VARCHAR}, 
-      #{repairDesc,jdbcType=VARCHAR}, #{repairState,jdbcType=BIT}, #{repairAlipay,jdbcType=VARCHAR}, 
+      #{repairDesc,jdbcType=VARCHAR}, #{repairState,jdbcType=BIT}, #{repairAlipay,jdbcType=VARCHAR}, #{repairAlipayName,jdbcType=VARCHAR},
       #{repairIsTransfer,jdbcType=BIT}
       )
   </insert>

+ 24 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java

@@ -907,6 +907,7 @@ public class AdminCustomerController {
         }
         Integer flag = 0;
 
+
         Integer customerIsSolve = customerInfo.getCustomerIsSolve();    //处理类型
         String phone = customerInfo.getCustomerTel();       //手机号码
         Integer typeCompany = customerInfo.getTypeCompany();    // 所属商城   1:美国watero; 2:上朵电动牙刷  3:优尼雅净水机
@@ -1700,5 +1701,28 @@ public class AdminCustomerController {
         msg.setData(numberMap);
         return msg;
     }
+
+    /**
+     * 根据微信昵称/姓名/电话查询客诉
+     *
+     * @param request
+     * @return
+     */
+    @ResponseBody
+    @RequiresPermissions("customer:list:customer")
+    @RequestMapping("/get_custoner_info")
+    public ResponseJson getCustonerInfo(HttpServletRequest request,CustomerCommon customerCommon) throws Exception {
+        if (customerCommon == null) {
+            return new ResponseJson(500, "参数错误!", 500);
+        }
+        List<CustomerCommon> customerCommonList = customerCommonService.listCustomerCommon(customerCommon);
+        if(customerCommonList.size() < 1){
+            return new ResponseJson(500, "不存在相关客诉信息!", 500);
+        } else {
+            ResponseJson rj = new ResponseJson(200, "查询成功", 200);
+            rj.addResponseKeyValue("customer", customerCommonList.get(0));
+            return rj;
+        }
+    }
 }
 

+ 26 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/add_customer.ftl

@@ -162,7 +162,32 @@
                     <input type="text" class="input-text associated-phone" placeholder="用户电话" id="customerTel" name="customerTel" value="">
                 </div>
             </div>
-
+            <div class="row cl">
+                <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>是否二次售后:</label>
+                <div class="formControls col-10 col-sm-10 skin-minimal">
+                    <div class="radio-box">
+                        <input type="radio"  name="customerSecondaryCustomer" value="1"  >
+                        <label for="customer-type-1">是</label>
+                    </div>
+                    <div class="radio-box">
+                        <input type="radio"   name="customerSecondaryCustomer" value="2"  checked>
+                        <label for="customer-type-2">否</label>
+                    </div>
+                </div>
+            </div>
+            <div class="row cl">
+                <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>是否开箱损:</label>
+                <div class="formControls col-10 col-sm-10 skin-minimal">
+                    <div class="radio-box">
+                        <input type="radio"  name="customerOutDamaged" value="1"  >
+                        <label for="customer-type-1">是</label>
+                    </div>
+                    <div class="radio-box">
+                        <input type="radio"   name="customerOutDamaged" value="2"  checked>
+                        <label for="customer-type-2">否</label>
+                    </div>
+                </div>
+            </div>
             <div class="row cl" style="position: relative;">
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>客诉问题:</label>
                 <div class="formControls col-2 col-sm-2"> <span class="select-box">

+ 5 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/custome_list.ftl

@@ -119,6 +119,7 @@
             <#--<th width="80">客诉类型</th>-->
             <th width="80">问题类型</th>
             <th width="100">问题简述</th>
+            <th width="50">是否开箱损</th>
             <th width="60">销售</th>
             <th width="80">购买日期</th>
             <th width="60">区域</th>
@@ -164,7 +165,10 @@
                                         </a>&nbsp;
                                     </#if>
                             </td>
-                            <td>${customer.companyName!''}<br/>${customer.storeName!''}</td>
+                            <td><#if customer.customerOutDamaged??>
+                                <#if customer.customerOutDamaged == '1' >是</#if>
+                                <#if customer.customerOutDamaged == '2' >否</#if></td>
+                            <td>${customer.companyName!''}<br/>${customer.storeName!''}</#if></td>
                             <td>${(customer.salesTime?string("yyyy-MM-dd"))!''}</td>
                             <td>${customer.customerArea!''}</td>
                             <td>进${customer.customerInTDS!'0'}PPM<br/>出${customer.customerOutTDS!'0'}PPM</td>

+ 1 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/order_list.ftl

@@ -224,7 +224,7 @@
                             <input type="text" class="input-text associated-phone" value="" placeholder="填写收件人手机号" id="sendTel" name="salesAddressTel" datatype="m" errormsg="联系人电话格式不正确!">
                         </div>
                         <div class="formControls col-3 col-sm-3">
-                            <input type="text" placeholder="购买日期" id="salesPayTime"  name="salesPayTime" datatype="*" class="input-text Wdate" onclick="WdatePicker({skin:'whyGreen',dateFmt: 'yyyy-MM-dd HH:mm:ss'})"  readonly="readonly">
+                            <input type="text" placeholder="购买日期" id="salesPayTime"  name="salesPayTime" datatype="*" class="input-text Wdate" onclick="WdatePicker({skin:'whyGreen',maxDate: '%y-%M-%d'})"  readonly="readonly">
                         </div>
                     </div>
                     <div class="row cl" id="recipientAddress" style=" margin-top: 20px;">

+ 26 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/update_customer.ftl

@@ -148,6 +148,32 @@
                     <input type="text" class="input-text" placeholder="用户电话" id="customerTel" name="customerTel" value="${customerInfo.customerTel!''}">
                 </div>
             </div>
+            <div class="row cl">
+                <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>是否二次售后:</label>
+                <div class="formControls col-10 col-sm-10 skin-minimal">
+                    <div class="radio-box">
+                        <input type="radio"  name="customerSecondaryCustomer" value="1" <#if customerInfo.customerSecondaryCustomer == '1' >checked</#if> >
+                        <label for="customer-type-1">是</label>
+                    </div>
+                    <div class="radio-box">
+                        <input type="radio"   name="customerSecondaryCustomer" value="2"  <#if customerInfo.customerSecondaryCustomer == '2'>checked</#if>>
+                        <label for="customer-type-2">否</label>
+                    </div>
+                </div>
+            </div>
+            <div class="row cl">
+                <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>是否开箱损:</label>
+                <div class="formControls col-10 col-sm-10 skin-minimal">
+                    <div class="radio-box">
+                        <input type="radio"  name="customerOutDamaged" value="1"  <#if customerInfo.customerOutDamaged == '1' >checked</#if>>
+                        <label for="customer-type-1">是</label>
+                    </div>
+                    <div class="radio-box">
+                        <input type="radio"   name="customerOutDamaged" value="2" <#if customerInfo.customerOutDamaged == '2'>checked</#if>>
+                        <label for="customer-type-2">否</label>
+                    </div>
+                </div>
+            </div>
             <div class="row cl" style="position: relative;">
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>客诉问题:</label>
                 <div class="formControls col-2 col-sm-2"> <span class="select-box">