Explorar o código

品质管理模块

liujiankang %!s(int64=7) %!d(string=hai) anos
pai
achega
65807b9a20
Modificáronse 25 ficheiros con 1320 adicións e 25 borrados
  1. 46 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/AwaitingSignclosedProductInfo.java
  2. 4 4
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/ComplaintSignclosedInfo.java
  3. 47 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/SignclosedProductInfo.java
  4. 9 0
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/AwaitingSignclosedProductInfoService.java
  5. 6 0
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/ComplaintSignclosedInfoService.java
  6. 8 0
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/ComplaintSignclosedProductInfoService.java
  7. 8 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/AwaitingSignclosedProductInfoServiceImpl.java
  8. 5 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/ComplaintSignclosedInfoServiceImpl.java
  9. 7 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/ComplaintSignclosedProductInfoServiceImpl.java
  10. 10 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/AwaitingSignclosedProductMapper.java
  11. 7 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/ComplaintSignclosedInfoMapper.java
  12. 10 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/ComplaintSignclosedProductInfoMapper.java
  13. 26 2
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/awaitingSignclosedProductMapper.xml
  14. 6 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/complaintSignclosedInfoMapper.xml
  15. 27 2
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/complaintSignclosedProductInfoMapper.xml
  16. 137 7
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminDetectController.java
  17. 51 0
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/kuaidi/LogisticsController.java
  18. 206 0
      watero-rst-web/src/main/java/com/iamberry/rst/utils/KuaiDi100.java
  19. 68 0
      watero-rst-web/src/main/java/com/iamberry/rst/utils/ResultMsg.java
  20. 7 3
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/add_remark.ftl
  21. 6 6
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_complete.ftl
  22. 17 1
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_list.ftl
  23. 201 0
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/update_complete.ftl
  24. 113 0
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/view_progress.ftl
  25. 288 0
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/logistics/view_logistics.ftl

+ 46 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/AwaitingSignclosedProductInfo.java

@@ -17,6 +17,12 @@ public class AwaitingSignclosedProductInfo implements Serializable {
     private Integer productNum;//产品数量
     private Date signclosedCreateTime;//创建时间
     private Date signclosedUpdateTime;//修改时间
+    private Integer signclosedProductType;//1 产品  2配件
+    private Integer signclosedProductId;//关联产品id  (根据产品类型判断)
+    private Integer signclosedProductColor;//关联产品颜色id
+
+    private String colorName;//颜色名称
+    private String productNumber;//产品型号
 
     public Integer getProductId() {
         return productId;
@@ -65,4 +71,44 @@ public class AwaitingSignclosedProductInfo implements Serializable {
     public void setSignclosedUpdateTime(Date signclosedUpdateTime) {
         this.signclosedUpdateTime = signclosedUpdateTime;
     }
+
+    public Integer getSignclosedProductType() {
+        return signclosedProductType;
+    }
+
+    public void setSignclosedProductType(Integer signclosedProductType) {
+        this.signclosedProductType = signclosedProductType;
+    }
+
+    public Integer getSignclosedProductId() {
+        return signclosedProductId;
+    }
+
+    public void setSignclosedProductId(Integer signclosedProductId) {
+        this.signclosedProductId = signclosedProductId;
+    }
+
+    public Integer getSignclosedProductColor() {
+        return signclosedProductColor;
+    }
+
+    public void setSignclosedProductColor(Integer signclosedProductColor) {
+        this.signclosedProductColor = signclosedProductColor;
+    }
+
+    public String getColorName() {
+        return colorName;
+    }
+
+    public void setColorName(String colorName) {
+        this.colorName = colorName;
+    }
+
+    public String getProductNumber() {
+        return productNumber;
+    }
+
+    public void setProductNumber(String productNumber) {
+        this.productNumber = productNumber;
+    }
 }

+ 4 - 4
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/ComplaintSignclosedInfo.java

@@ -23,10 +23,10 @@ public class ComplaintSignclosedInfo implements Serializable {
     private Integer signclosedAddrCity;//寄件地址(市)
     private Integer signclosedIsFittings;//是否少配件
     private Date signclosedDate;//签收时间
-    private Integer signclosedIsQuality;//是否品检
-    private Integer signclosedIsInto;//是否已转入品检
-    private Integer signclosedState;//处理状态
-    private Integer signclosedObjectsState;//物件状态
+    private Integer signclosedIsQuality;//是否品检   1 需要品检 2不需要品检
+    private Integer signclosedIsInto;//是否已转入品检    1 已转入品检2未转入品检
+    private Integer signclosedState;//处理状态      1已签收2未签收
+    private Integer signclosedObjectsState;//物件状态 1正常签收2物件不对
     private Integer signclosedCustomerId;//客诉id
     private Integer signclosedUrgedNum;//qc催促次数
     private String oldEfastId;//原有Efast订单id

+ 47 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/SignclosedProductInfo.java

@@ -17,6 +17,13 @@ public class SignclosedProductInfo implements Serializable {
     private Integer productNum;//产品数量
     private Date signclosedCreateTime;//创建时间
     private Date signclosedUpdateTime;//修改时间
+    private Integer signclosedProductType;//1 产品  2配件
+    private Integer signclosedProductId;//关联产品id  (根据产品类型判断)
+    private Integer signclosedProductColor;//关联产品颜色id
+
+
+    private String colorName;//颜色名称
+    private String productNumber;//产品型号
 
     public Integer getProductId() {
         return productId;
@@ -65,4 +72,44 @@ public class SignclosedProductInfo implements Serializable {
     public void setSignclosedUpdateTime(Date signclosedUpdateTime) {
         this.signclosedUpdateTime = signclosedUpdateTime;
     }
+
+    public Integer getSignclosedProductType() {
+        return signclosedProductType;
+    }
+
+    public void setSignclosedProductType(Integer signclosedProductType) {
+        this.signclosedProductType = signclosedProductType;
+    }
+
+    public Integer getSignclosedProductId() {
+        return signclosedProductId;
+    }
+
+    public void setSignclosedProductId(Integer signclosedProductId) {
+        this.signclosedProductId = signclosedProductId;
+    }
+
+    public Integer getSignclosedProductColor() {
+        return signclosedProductColor;
+    }
+
+    public void setSignclosedProductColor(Integer signclosedProductColor) {
+        this.signclosedProductColor = signclosedProductColor;
+    }
+
+    public String getColorName() {
+        return colorName;
+    }
+
+    public void setColorName(String colorName) {
+        this.colorName = colorName;
+    }
+
+    public String getProductNumber() {
+        return productNumber;
+    }
+
+    public void setProductNumber(String productNumber) {
+        this.productNumber = productNumber;
+    }
 }

+ 9 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/AwaitingSignclosedProductInfoService.java

@@ -1,6 +1,9 @@
 package com.iamberry.rst.faces.cm;
 
 import com.iamberry.rst.core.cm.AwaitingSignclosedProductInfo;
+import com.iamberry.rst.core.cm.SignclosedProductInfo;
+
+import java.util.List;
 
 /**
  * 客诉-待签收产品service
@@ -15,6 +18,12 @@ public interface AwaitingSignclosedProductInfoService {
      * 获取单个待签收产品
      */
     AwaitingSignclosedProductInfo getByPrimaryId(Integer productId);
+
+    /**
+     * 查询多个签收产品记录
+     * @return
+     */
+    List<AwaitingSignclosedProductInfo> listByPrimaryId(Integer signclosedId);
     /**
      * 修改单个待签收产品
      * @return

+ 6 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/ComplaintSignclosedInfoService.java

@@ -21,4 +21,10 @@ public interface ComplaintSignclosedInfoService {
      * @return
      */
     int updateSignclosedById(ComplaintSignclosedInfo record);
+
+    /**
+     * 增加催促次数
+     * @return
+     */
+    int updateUrgedNumById(ComplaintSignclosedInfo complaintSignclosedInfo);
 }

+ 8 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/ComplaintSignclosedProductInfoService.java

@@ -2,6 +2,8 @@ package com.iamberry.rst.faces.cm;
 
 import com.iamberry.rst.core.cm.SignclosedProductInfo;
 
+import java.util.List;
+
 /**
  * 客诉-签收产品表Service
  */
@@ -16,6 +18,12 @@ public interface ComplaintSignclosedProductInfoService {
      * @return
      */
     SignclosedProductInfo getSignclosedById(Integer productId);
+
+    /**
+     * 查询多个签收产品记录
+     * @return
+     */
+    List<SignclosedProductInfo> listSignclosedById(Integer signclosedId);
     /**
      * 修改单个签收产品记录
      * @return

+ 8 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/AwaitingSignclosedProductInfoServiceImpl.java

@@ -6,6 +6,9 @@ import com.iamberry.rst.faces.cm.AwaitingSignclosedProductInfoService;
 import com.iamberry.rst.service.cm.mapper.AwaitingSignclosedProductMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+
+import java.util.List;
+
 @Service
 public class AwaitingSignclosedProductInfoServiceImpl implements AwaitingSignclosedProductInfoService {
     @Autowired
@@ -21,6 +24,11 @@ public class AwaitingSignclosedProductInfoServiceImpl implements AwaitingSignclo
     }
 
     @Override
+    public List<AwaitingSignclosedProductInfo> listByPrimaryId(Integer signclosedId) {
+        return awaitingSignclosedProductMapper.listByPrimaryId(signclosedId);
+    }
+
+    @Override
     public int updateById(AwaitingSignclosedProductInfo record) {
         return awaitingSignclosedProductMapper.updateById(record);
     }

+ 5 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/ComplaintSignclosedInfoServiceImpl.java

@@ -30,4 +30,9 @@ public class ComplaintSignclosedInfoServiceImpl implements ComplaintSignclosedIn
     public int updateSignclosedById(ComplaintSignclosedInfo record) {
         return complaintSignclosedInfoMapper.updateSignclosedById(record);
     }
+
+    @Override
+    public int updateUrgedNumById(ComplaintSignclosedInfo complaintSignclosedInfo) {
+        return complaintSignclosedInfoMapper.updateUrgedNumById(complaintSignclosedInfo);
+    }
 }

+ 7 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/ComplaintSignclosedProductInfoServiceImpl.java

@@ -10,6 +10,8 @@ import com.iamberry.rst.service.cm.mapper.ComplaintSignclosedProductInfoMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 @Service
 public class ComplaintSignclosedProductInfoServiceImpl implements ComplaintSignclosedProductInfoService {
     @Autowired
@@ -27,6 +29,11 @@ public class ComplaintSignclosedProductInfoServiceImpl implements ComplaintSignc
     }
 
     @Override
+    public List<SignclosedProductInfo> listSignclosedById(Integer signclosedId) {
+        return complaintSignclosedProductInfoMapper.listSignclosedById(signclosedId);
+    }
+
+    @Override
     public int updateSignclosedById(SignclosedProductInfo record) {
         return complaintSignclosedProductInfoMapper.updateSignclosedById(record);
     }

+ 10 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/AwaitingSignclosedProductMapper.java

@@ -1,6 +1,9 @@
 package com.iamberry.rst.service.cm.mapper;
 
 import com.iamberry.rst.core.cm.AwaitingSignclosedProductInfo;
+
+import java.util.List;
+
 /**
  * 客诉-待签收产品mapper
  */
@@ -14,6 +17,13 @@ public interface AwaitingSignclosedProductMapper {
      * 获取单个待签收产品
      */
     AwaitingSignclosedProductInfo getByPrimaryId(Integer productId);
+
+    /**
+     * 获取多个待签收产品
+     */
+    List<AwaitingSignclosedProductInfo> listByPrimaryId(Integer signclosedId);
+
+
     /**
      * 修改单个待签收产品
      * @return

+ 7 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/ComplaintSignclosedInfoMapper.java

@@ -20,4 +20,11 @@ public interface ComplaintSignclosedInfoMapper {
      * @return
      */
     int updateSignclosedById(ComplaintSignclosedInfo record);
+
+    /**
+     * 增加催促次数
+     * @return
+     */
+    int updateUrgedNumById(ComplaintSignclosedInfo complaintSignclosedInfo);
+
 }

+ 10 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/ComplaintSignclosedProductInfoMapper.java

@@ -1,6 +1,9 @@
 package com.iamberry.rst.service.cm.mapper;
 
 import com.iamberry.rst.core.cm.SignclosedProductInfo;
+
+import java.util.List;
+
 /**
  * 客诉-签收产品表mapper
  */
@@ -16,6 +19,13 @@ public interface ComplaintSignclosedProductInfoMapper {
      */
     SignclosedProductInfo getSignclosedById(Integer productId);
     /**
+     * 查询多个签收产品记录
+     * @return
+     */
+    List<SignclosedProductInfo> listSignclosedById(Integer signclosedId);
+
+
+    /**
      * 修改单个签收产品记录
      * @return
      */

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

@@ -8,9 +8,13 @@
     <result column="product_num" property="productNum" jdbcType="INTEGER" />
     <result column="signclosed_create_time" property="signclosedCreateTime" jdbcType="TIMESTAMP" />
     <result column="signclosed_update_time" property="signclosedUpdateTime" jdbcType="TIMESTAMP" />
+    <result column="signclosed_product_type" property="signclosedProductType" jdbcType="INTEGER" />
+    <result column="signclosed_product_id" property="signclosedProductId" jdbcType="INTEGER" />
+    <result column="signclosed_product_color" property="signclosedProductColor" jdbcType="INTEGER" />
   </resultMap>
   <sql id="Base_Column_List" >
-    product_id, signclosed_id, product_name, product_num, signclosed_create_time, signclosed_update_time
+    product_id, signclosed_id, product_name, product_num, signclosed_create_time, signclosed_update_time,
+    signclosed_product_type,signclosed_product_id,signclosed_product_color
   </sql>
   <select id="getByPrimaryId" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
     select 
@@ -18,12 +22,32 @@
     from tb_rst_complaint_awaiting_signclosed_product
     where product_id = #{productId,jdbcType=INTEGER}
   </select>
+  <select id="listByPrimaryId" resultMap="BaseResultMap" parameterType="AwaitingSignclosedProductInfo" >
+    select
+    sp.product_id productId,
+	sp.signclosed_id signclosedId,
+	sp.product_name productName,
+	sp.product_num productNum,
+	sp.signclosed_create_time signclosedCreateTime,
+	sp.signclosed_update_time signclosedUpdateTime,
+	sp.signclosed_product_type signclosedProductType,
+	sp.signclosed_product_id signclosedProductId,
+	sp.signclosed_product_color signclosedProductColor,
+    pc.color_name colorName,
+    pi.product_number productNumber
+    from
+    tb_rst_complaint_awaiting_signclosed_product sp
+    LEFT JOIN tb_rst_product_color pc on sp.signclosed_product_color = pc.color_id
+    LEFT JOIN tb_rst_product_info pi on sp.signclosed_product_id = pi.product_id
+    where signclosed_id = #{signclosedId,jdbcType=INTEGER}
+  </select>
   <insert id="insert" parameterType="AwaitingSignclosedProductInfo" useGeneratedKeys="true" keyProperty="productId">
     insert into tb_rst_complaint_awaiting_signclosed_product (product_id, signclosed_id, product_name, 
-      product_num, signclosed_create_time, signclosed_update_time
+      product_num, signclosed_create_time, signclosed_update_time,signclosed_product_type,signclosed_product_id,signclosed_product_color
       )
     values (#{productId,jdbcType=INTEGER}, #{signclosedId,jdbcType=INTEGER}, #{productName,jdbcType=VARCHAR}, 
       #{productNum,jdbcType=INTEGER}, #{signclosedCreateTime,jdbcType=TIMESTAMP}, #{signclosedUpdateTime,jdbcType=TIMESTAMP}
+      ,#{signclosedProductType,jdbcType=INTEGER}, #{signclosedProductId,jdbcType=INTEGER}, #{signclosedProductColor,jdbcType=INTEGER}
       )
   </insert>
 

+ 6 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/complaintSignclosedInfoMapper.xml

@@ -138,4 +138,10 @@
     </set>
     where signclosed_id = #{signclosedId,jdbcType=INTEGER}
   </update>
+
+  <update id="updateUrgedNumById" parameterType="ComplaintSignclosedInfo" >
+    update tb_rst_complaint_signclosed SET
+        signclosed_urged_num = signclosed_urged_num + 1
+    where signclosed_id = #{signclosedId,jdbcType=INTEGER}
+  </update>
 </mapper>

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

@@ -8,9 +8,13 @@
     <result column="product_num" property="productNum" jdbcType="INTEGER" />
     <result column="signclosed_create_time" property="signclosedCreateTime" jdbcType="TIMESTAMP" />
     <result column="signclosed_update_time" property="signclosedUpdateTime" jdbcType="TIMESTAMP" />
+    <result column="signclosed_product_type" property="signclosedProductType" jdbcType="INTEGER" />
+    <result column="signclosed_product_id" property="signclosedProductId" jdbcType="INTEGER" />
+    <result column="signclosed_product_color" property="signclosedProductColor" jdbcType="INTEGER" />
   </resultMap>
   <sql id="Base_Column_List" >
-    product_id, signclosed_id, product_name, product_num, signclosed_create_time, signclosed_update_time
+    product_id, signclosed_id, product_name, product_num, signclosed_create_time,
+    signclosed_update_time,signclosed_product_type,signclosed_product_id,signclosed_product_color
   </sql>
   <select id="getSignclosedById" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
     select 
@@ -18,12 +22,33 @@
     from tb_rst_complaint_signclosed_product
     where product_id = #{productId,jdbcType=INTEGER}
   </select>
+  <select id="listSignclosedById" resultMap="BaseResultMap" parameterType="SignclosedProductInfo" >
+    select
+    sp.product_id productId,
+	sp.signclosed_id signclosedId,
+	sp.product_name productName,
+	sp.product_num productNum,
+	sp.signclosed_create_time signclosedCreateTime,
+	sp.signclosed_update_time signclosedUpdateTime,
+	sp.signclosed_product_type signclosedProductType,
+	sp.signclosed_product_id signclosedProductId,
+	sp.signclosed_product_color signclosedProductColor,
+    pc.color_name colorName,
+    pi.product_number productNumber
+    from
+    tb_rst_complaint_signclosed_product sp
+    LEFT JOIN tb_rst_product_color pc on sp.signclosed_product_color = pc.color_id
+    LEFT JOIN tb_rst_product_info pi on sp.signclosed_product_id = pi.product_id
+    where signclosed_id = #{signclosedId,jdbcType=INTEGER}
+  </select>
+
   <insert id="insert" parameterType="SignclosedProductInfo" >
     insert into tb_rst_complaint_signclosed_product (product_id, signclosed_id, product_name, 
-      product_num, signclosed_create_time, signclosed_update_time
+      product_num, signclosed_create_time, signclosed_update_time,signclosed_product_type,signclosed_product_id,signclosed_product_color
       )
     values (#{productId,jdbcType=INTEGER}, #{signclosedId,jdbcType=INTEGER}, #{productName,jdbcType=VARCHAR}, 
       #{productNum,jdbcType=INTEGER}, #{signclosedCreateTime,jdbcType=TIMESTAMP}, #{signclosedUpdateTime,jdbcType=TIMESTAMP}
+      ,#{signclosedProductType,jdbcType=INTEGER}, #{signclosedProductId,jdbcType=INTEGER}, #{signclosedProductColor,jdbcType=INTEGER}
       )
   </insert>
 

+ 137 - 7
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminDetectController.java

@@ -1,7 +1,6 @@
 package com.iamberry.rst.controllers.cm;
 
-import com.iamberry.rst.core.cm.ComplaintDetectInfo;
-import com.iamberry.rst.core.cm.FittingsInfo;
+import com.iamberry.rst.core.cm.*;
 import com.iamberry.rst.core.order.Order;
 import com.iamberry.rst.core.order.Product;
 import com.iamberry.rst.core.order.RentType;
@@ -11,6 +10,9 @@ import com.iamberry.rst.core.pts.PtsDevice;
 import com.iamberry.rst.faces.cm.ComplaintDetectInfoService;
 import com.iamberry.rst.faces.cm.FittingsInfoService;
 import com.iamberry.rst.faces.product.ProductService;
+import com.iamberry.rst.service.cm.mapper.AwaitingSignclosedProductMapper;
+import com.iamberry.rst.service.cm.mapper.ComplaintSignclosedInfoMapper;
+import com.iamberry.rst.service.cm.mapper.ComplaintSignclosedProductInfoMapper;
 import com.iamberry.rst.utils.AdminUtils;
 import com.iamberry.wechat.tools.ResponseJson;
 import org.apache.commons.lang.StringUtils;
@@ -41,8 +43,12 @@ public class AdminDetectController {
     private ProductService productService;
     @Autowired
     private FittingsInfoService fittingsInfoService;
-
-
+    @Autowired
+    private ComplaintSignclosedInfoMapper complaintSignclosedInfoMapper;
+    @Autowired
+    private ComplaintSignclosedProductInfoMapper signclosedProductInfoMapper;
+    @Autowired
+    private AwaitingSignclosedProductMapper awaitingSignclosedProductMapper;
     /**
      * 跳转到添加检测记录页面
      *
@@ -182,7 +188,7 @@ public class AdminDetectController {
         ModelAndView mv = new ModelAndView("cm/inspection/add_remark");
         String detectId = request.getParameter("detectId");
         if(detectId == null || detectId.equals("")){
-            return null;
+            return mv;
         }
         ComplaintDetectInfo detectInfo = complaintDetectInfoService.getComplaintDetectById(Integer.valueOf(detectId));
         mv.addObject("detectId",detectId);
@@ -202,7 +208,7 @@ public class AdminDetectController {
         String detectId = request.getParameter("detectId");
         String state = request.getParameter("state");
         if(detectId == null || detectId.equals("")){
-            return null;
+            return mv;
         }
         ComplaintDetectInfo detectInfo = complaintDetectInfoService.getComplaintDetectById(Integer.valueOf(detectId));
         mv.addObject("detectId",detectId);
@@ -222,7 +228,7 @@ public class AdminDetectController {
         ModelAndView mv = new ModelAndView("cm/inspection/detect_complete");
         String detectId = request.getParameter("detectId");
         if(detectId == null || detectId.equals("")){
-            return null;
+            return mv;
         }
         ComplaintDetectInfo detectInfo = complaintDetectInfoService.getComplaintDetectById(Integer.valueOf(detectId));
         mv.addObject("detectId",detectId);
@@ -300,5 +306,129 @@ public class AdminDetectController {
         }
         return msg;
     }
+
+    /**
+     * 跳转到查看仓储进度页面
+     *
+     * @return
+     */
+    @RequiresPermissions("complete:update:complete")
+    @RequestMapping(value = "/to_view_progress")
+    public ModelAndView toViewProgress(HttpServletRequest request) {
+        ModelAndView mv = new ModelAndView("cm/inspection/view_progress");
+        String signclosedId = request.getParameter("signclosedId");
+        if(signclosedId == null || signclosedId.equals("")){
+            return mv;
+        }
+        if(Integer.valueOf(signclosedId) == 0){
+            return mv;
+        }
+        List<SignclosedProductInfo> signclosedProductInfo = null;
+        List<AwaitingSignclosedProductInfo> awaitingSignclosedProductInfo = null;
+        ComplaintSignclosedInfo complaintSignclosedInfo = complaintSignclosedInfoMapper.getSignclosedById(Integer.valueOf(signclosedId));
+
+        if(complaintSignclosedInfo.getSignclosedState() == 1){//如果已签收。查询签收表所有产品 反之查询待签收表
+            signclosedProductInfo = signclosedProductInfoMapper.listSignclosedById(complaintSignclosedInfo.getSignclosedId());
+        }else{
+            awaitingSignclosedProductInfo = awaitingSignclosedProductMapper.listByPrimaryId(complaintSignclosedInfo.getSignclosedId());
+        }
+
+        mv.addObject("signclosedProductInfo",signclosedProductInfo == null ? awaitingSignclosedProductInfo :signclosedProductInfo);
+        mv.addObject("signclosedInfo",complaintSignclosedInfo);
+        mv.addObject("signclosedId",signclosedId);
+        return mv;
+    }
+
+    /**
+     * 跳转到查看物流信息页面
+     *
+     * @return
+     */
+    @RequiresPermissions("complete:update:complete")
+    @RequestMapping(value = "/to_view_logistics")
+    public ModelAndView toViewLogistics(HttpServletRequest request) {
+        ModelAndView mv = new ModelAndView("cm/logistics/view_logistics");
+        String billCode = request.getParameter("billCode");
+        String billName = request.getParameter("billName");
+        if(billCode == null || billCode.equals("") ||billName == null || billName.equals("")){
+            return mv;
+        }
+        mv.addObject("billCode",billCode);
+        mv.addObject("billName",billName);
+        return mv;
+    }
+
+    /**
+     * 增加催促提醒
+     * @param request
+     * @return
+     * @throws Exception
+     */
+    @RequiresPermissions("reminding:add:reminding")
+    @ResponseBody
+    @RequestMapping("/add_reminding")
+    public ResponseJson add_reminding(HttpServletRequest request,ComplaintSignclosedInfo complaintSignclosedInfo) throws Exception {
+        ResponseJson msg = new ResponseJson();
+        Integer num = complaintSignclosedInfoMapper.updateUrgedNumById(complaintSignclosedInfo);
+        if (num < 1) {
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+        } else {
+            msg.setResultCode(200);
+            msg.setReturnCode(200);
+        }
+        return msg;
+    }
+
+    /**
+     * 跳转到修改检测完成信息页面
+     *
+     * @return
+     */
+    @RequiresPermissions("complete:update:complete")
+    @RequestMapping(value = "/to_update_complete")
+    public ModelAndView toUpdateComplete(HttpServletRequest request) {
+        ModelAndView mv = new ModelAndView("cm/inspection/update_complete");
+        String detectId = request.getParameter("detectId");
+        if(detectId == null || detectId.equals("")){
+            return mv;
+        }
+        ComplaintDetectInfo detectInfo = complaintDetectInfoService.getComplaintDetectById(Integer.valueOf(detectId));
+        mv.addObject("detectId",detectId);
+        mv.addObject("detectInfo",detectInfo);
+        return mv;
+    }
+
+    /**
+     * 检测完成
+     * @param request
+     * @return
+     * @throws Exception
+     */
+    @RequiresPermissions("complete:update:complete")
+    @ResponseBody
+    @RequestMapping("/update_complete")
+    public ResponseJson update_complete(HttpServletRequest request, ComplaintDetectInfo detectInfo) throws Exception {
+        ResponseJson msg = new ResponseJson();
+        if(detectInfo == null){
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+            return msg;
+        }
+        if(detectInfo.getDetectId() == null || detectInfo.getDetectId().equals("")){
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+            return msg;
+        }
+        Integer num = complaintDetectInfoService.updateComplaintDetectById(detectInfo);
+        if (num < 1) {
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+        } else {
+            msg.setResultCode(200);
+            msg.setReturnCode(200);
+        }
+        return msg;
+    }
 }
 

+ 51 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/kuaidi/LogisticsController.java

@@ -0,0 +1,51 @@
+package com.iamberry.rst.controllers.kuaidi;
+
+import com.iamberry.rst.utils.KuaiDi100;
+import com.iamberry.rst.utils.ResultMsg;
+import com.iamberry.wechat.tools.NameUtils;
+import com.iamberry.wechat.tools.ResultInfo;
+import net.sf.json.JSONObject;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * Created by Administrator on 2017/8/15.
+ */
+@Controller
+@RequestMapping("/logistics")
+public class LogisticsController {
+    @Autowired
+    private KuaiDi100 kuaidi100;
+
+
+    /**
+     * 查询快递信息
+     * @param com 快递公司代码
+     * @param nu 快递单号
+     * @return
+     */
+    @RequestMapping("/getExpressInfo")
+    @ResponseBody
+    public ResultMsg getExpressInfo(@RequestParam("com") String com, @RequestParam("nu") String nu, HttpServletResponse response){
+        ResultMsg msg = new ResultMsg();
+        JSONObject rst = null;
+        if (com == null || com.equals("") || nu == null || nu.equals("")){
+            msg.setResultCode(ResultInfo.ERRORCODE);
+            msg.setMessage(NameUtils.getConfig("ERROR"));
+            msg.setData(rst);
+            msg.setStatus(false);
+            return msg;
+        }
+        rst = kuaidi100.getExpressInfo(com,nu);
+        msg.setResultCode(ResultInfo.SUCCESSCODE);
+        msg.setMessage(NameUtils.getConfig("SUCCESSINFO"));
+        msg.setData(rst);
+        msg.setStatus(true);
+        return msg;
+    }
+}

+ 206 - 0
watero-rst-web/src/main/java/com/iamberry/rst/utils/KuaiDi100.java

@@ -0,0 +1,206 @@
+package com.iamberry.rst.utils;
+
+import net.sf.json.JSONObject;
+import org.springframework.stereotype.Component;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLConnection;
+
+/**
+ * Created by Administrator on 2017/8/15.
+ */
+@Component
+public class KuaiDi100 {
+    private static String key = "29833628d495d7a5";//授权密匙key    百度的
+  /*private static String key = "06d6c2ea1bdb4ee9";//授权密匙key  自己的*/
+                    /*<option value="sto">申通快递</option>
+					<option value="yto">圆通快递</option>
+					<option value="sf">顺丰快递</option>
+					<option value="ems">邮政EMS</option>
+					<option value="zto">中通快递</option>
+					<option value="zjs">宅急送</option>
+					<option value="yunda">韵达快递</option>
+					<option value="cces">cces快递</option>
+					<option value="pick">上门提货</option>
+					<option value="htky">汇通快递</option>
+					<option value="ttkdex">天天快递</option>
+					<option value="stars">星晨急便</option>
+					<option value="jd">京东快递</option>
+					<option value="01">其他</option>
+					<option value="02">上门送货</option>*/
+
+  public String logisticsConversions(String code){
+      if(code == null || code.equals("")){
+          return null;
+      }
+      switch (code){
+          case "sto":
+              code = "shentong";
+              break;
+          case "yto":
+              code = "yuantong";
+              break;
+          case "sf":
+              code = "shunfeng";
+              break;
+          case "ems":
+              code = "ems";
+              break;
+          case "eyb":
+              code = "ems";
+              break;
+          case "zto":
+              code = "zhongtong";
+              break;
+          case "zjs":
+              code = "zhaijisong";
+              break;
+          case "yunda":
+              code = "yunda";
+              break;
+          case "cces":
+              code = "cces";
+              break;
+          case "pick":
+              code = "pick";
+              break;
+          case "htky":
+              code = "huitongkuaidi";
+              break;
+          case "ttkdex":
+              code = "tiantian";
+              break;
+          case "stars":
+              code = "xingchenjibian";
+              break;
+          case "jd":
+              code = "jd";
+              break;
+          case "01":
+              code = "01";
+              break;
+          case "02":
+              code = "01";
+              break;
+      }
+    return code;
+  }
+    /**
+     *  快递对应代码
+     *  EMS 		ems/eyb
+     * 	申通快递  	shentong
+     * 	顺丰速运 	shunfeng
+     * 	圆通速递 	yuantong
+     * 	韵达快运		yunda
+     *	中通快递		zhongtong
+     *	百世快递		huitongkuaidi
+     *	天天快递		tiantian
+     *	宅急送		zhaijisong
+     *	邮政国内包裹	youzhengguonei
+     *	邮政国际包裹	youzhengguoji
+     *	EMS国际快递	emsguoji
+     */
+    public static void main(String[] agrs){
+        KuaiDi100 kuaidi = new KuaiDi100();
+        System.out.println(kuaidi.getExpressInfo("ems","9754210807242"));
+    }
+    /**
+     * 查询快递信息
+     * @param com 快递公司代码
+     * @param nu 快递单号
+     * @return
+     */
+    public JSONObject getExpressInfo(String com , String nu){
+        JSONObject ret = null;
+        try
+        {
+            com = logisticsConversions(com);
+            StringBuilder sb = new StringBuilder();
+            sb.append("http://api.kuaidi100.com/api?id=");
+            sb.append(KuaiDi100.key);
+            sb.append("&com=").append(com);
+            sb.append("&nu=").append(nu);
+            sb.append("&show=0&muti=1&order=desc");
+            URL url= new URL(sb.toString());
+            URLConnection con=url.openConnection();
+            con.setAllowUserInteraction(false);
+            InputStream urlStream = url.openStream();
+            String type = con.guessContentTypeFromStream(urlStream);
+            String charSet=null;
+            if (type == null)
+                type = con.getContentType();
+
+            if (type == null || type.trim().length() == 0)
+                return null;
+
+            if(type.indexOf("charset=") > 0)
+                charSet = type.substring(type.indexOf("charset=") + 8);
+
+            byte b[] = new byte[10000];
+            int numRead = urlStream.read(b);
+            String content = new String(b, 0, numRead, "UTF-8");
+            while (numRead != -1) {
+                numRead = urlStream.read(b);
+                if (numRead != -1) {
+                    //String newContent = new String(b, 0, numRead);
+                    String newContent = new String(b, 0, numRead, "UTF-8");
+                    content += newContent;
+                }
+            }
+            ret = JSONObject.fromObject(content);
+            System.out.println(ret);
+            urlStream.close();
+        } catch (MalformedURLException e)
+        {
+            e.printStackTrace();
+        } catch (IOException e)
+        {
+            e.printStackTrace();
+        }
+        return ret;
+    }
+    /**
+     * 该接口使用与收费的快递公司接口查询
+     * @param com 快递公司代码
+     * @param nu 快递单号
+     * @return
+     */
+    public static String searchkuaiDiInfo(String com, String nu)
+    {
+        String content = "";
+        try
+        {
+            StringBuilder sb = new StringBuilder();
+            sb.append("http://www.kuaidi100.com/applyurl?key=").append(KuaiDi100.key);
+            sb.append("&com=").append(com);
+            sb.append("&nu=").append(nu);
+            URL url = new URL(sb.toString());
+            URLConnection con = url.openConnection();
+            con.setAllowUserInteraction(false);
+            InputStream urlStream = url.openStream();
+            byte b[] = new byte[10000];
+            int numRead = urlStream.read(b);
+            content = new String(b, 0, numRead);
+            while (numRead != -1)
+            {
+                numRead = urlStream.read(b);
+                if (numRead != -1)
+                {
+                    // String newContent = new String(b, 0, numRead);
+                    String newContent = new String(b, 0, numRead, "UTF-8");
+                    content += newContent;
+                }
+            }
+            urlStream.close();
+        }
+        catch (Exception e)
+        {
+            e.printStackTrace();
+            System.out.println("快递查询错误");
+        }
+        return content;
+    }
+}

+ 68 - 0
watero-rst-web/src/main/java/com/iamberry/rst/utils/ResultMsg.java

@@ -0,0 +1,68 @@
+package com.iamberry.rst.utils;
+
+/**
+ * @description 作为服务影响的返回结果,常用业务错误,返回错误码和错误信息;
+ * @author 欧阳明
+ * @data 2016-4-18 14:23
+ */
+public class ResultMsg implements java.io.Serializable{
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 8987614804726091566L;
+
+	private boolean status; // 状态
+	
+	private String ResultCode ; //状态码
+	
+	private String message; //返回信息
+	
+	private Object data; //返回对象
+
+	public ResultMsg(){}
+	
+	public ResultMsg(boolean status, String resultCode, String message,
+                     Object data) {
+		super();
+		this.status = status;
+		ResultCode = resultCode;
+		this.message = message;
+		this.data = data;
+	}
+
+	public boolean isStatus() {
+		return status;
+	}
+
+	public void setStatus(boolean status) {
+		this.status = status;
+	}
+
+	public String getResultCode() {
+		return ResultCode;
+	}
+
+	public void setResultCode(String resultCode) {
+		ResultCode = resultCode;
+	}
+
+	public String getMessage() {
+		return message;
+	}
+
+	public void setMessage(String message) {
+		this.message = message;
+	}
+
+	public Object getData() {
+		return data;
+	}
+
+	public void setData(Object data) {
+		this.data = data;
+	}
+	
+	
+
+}

+ 7 - 3
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/add_remark.ftl

@@ -32,15 +32,19 @@
     <form class="form form-horizontal" id="form-admin-add">
         <div class="input-box"   style="text-align:center;">
             <span class="input-dic spanhidth">备注</span>
-            <textarea rows="5" cols="20" name="detectDesc" id="detectDesc" class="my-textarea" placeholder="请详细备注签收的内容,便于以后复查。如果转入生产,则生产部门同事可查看!">${detectInfo.detectDesc!''}</textarea>
-
+            <#if detectInfo??>
+                <textarea rows="5" cols="20" name="detectDesc" id="detectDesc" class="my-textarea" placeholder="请详细备注签收的内容,便于以后复查。如果转入生产,则生产部门同事可查看!">${detectInfo.detectDesc!''}</textarea>
+            <#else>
+                <textarea rows="5" cols="20" name="detectDesc" id="detectDesc" class="my-textarea" placeholder="请详细备注签收的内容,便于以后复查。如果转入生产,则生产部门同事可查看!"></textarea>
+            </#if>
         </div>
         <div style="text-align:center;">
             <span>如果转入生产,则生产部门同事可查看!</span>
         </div>
         <div style="text-align:center;">
-
+        <#if detectId??>
             <input type="hidden" value="${detectId!''}" id="detectId" name="detectId">
+        </#if>
            <button type="button" class="my-btn-submit" onclick="add();">确认提交</button>
         </div>
     </form>

+ 6 - 6
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_complete.ftl

@@ -42,27 +42,27 @@
 
         <div class="input-box">
             <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-            <textarea rows="3" cols="20" name="detectPhenomenon" id="detectPhenomenon" ${detectInfo.detectPhenomenon!''} class="my-textarea" placeholder="工厂检测现象"></textarea>
+            <textarea rows="3" cols="20" name="detectPhenomenon" id="detectPhenomenon"  class="my-textarea" placeholder="工厂检测现象">${detectInfo.detectPhenomenon!''}</textarea>
         </div>
         <div class="input-box">
             <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-            <textarea rows="3" cols="20" name="detectFailureClassification" id="detectFailureClassification" ${detectInfo.detectFailureClassification!''} class="my-textarea" placeholder="故障分类"></textarea>
+            <textarea rows="3" cols="20" name="detectFailureClassification" id="detectFailureClassification"  class="my-textarea" placeholder="故障分类">${detectInfo.detectFailureClassification!''}</textarea>
         </div>
         <div class="input-box">
             <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-            <textarea rows="3" cols="20" name="detectFailureCause" id="detectFailureCause" ${detectInfo.detectFailureCause!''} class="my-textarea" placeholder="故障原因"></textarea>
+            <textarea rows="3" cols="20" name="detectFailureCause" id="detectFailureCause"  class="my-textarea" placeholder="故障原因">${detectInfo.detectFailureCause!''}</textarea>
         </div>
         <div class="input-box">
             <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-            <textarea rows="3" cols="20" name="detectResults" id="detectResults" ${detectInfo.detectResults!''} class="my-textarea" placeholder="判定结果"></textarea>
+            <textarea rows="3" cols="20" name="detectResults" id="detectResults"  class="my-textarea" placeholder="判定结果">${detectInfo.detectResults!''}</textarea>
         </div>
         <div class="input-box">
             <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-            <textarea rows="3" cols="20" name="detectPoint" id="detectPoint" ${detectInfo.detectPoint!''} class="my-textarea" placeholder="故障指向"></textarea>
+            <textarea rows="3" cols="20" name="detectPoint" id="detectPoint"  class="my-textarea" placeholder="故障指向">${detectInfo.detectPoint!''}</textarea>
         </div>
         <div class="input-box">
             <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-            <textarea rows="3" cols="20" name="detectAnalysis" id="detectAnalysis" ${detectInfo.detectAnalysis!''} class="my-textarea" placeholder="原因分析"></textarea>
+            <textarea rows="3" cols="20" name="detectAnalysis" id="detectAnalysis"  class="my-textarea" placeholder="原因分析">${detectInfo.detectAnalysis!''}</textarea>
         </div>
 
         <div class="input-box">

+ 17 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_list.ftl

@@ -124,10 +124,26 @@
                             <#if detect.detectRevolutionProduced == 1>
                                 <a style="text-decoration:none" href="javascript:;" title="转入生产"
                                    onclick="update_info('转入生产','${path}/admin/detect/to_detect_complete?detectId=${detect.detectId!''}&state=2','570','450');">
-                                    <i class="Hui-iconfont">&#xe645;</i>
+                                    <i class="Hui-iconfont">&#xe6e1;</i>
                                 </a>
                             </#if>
                         </#if>
+                        <#if detect.detectState == 3>
+                            <a style="text-decoration:none" href="javascript:;" title="修改检测信息"
+                               onclick="update_info('修改检测信息','${path}/admin/detect/to_update_complete?detectId=${detect.detectId!''}','570','450');">
+                                <i class="Hui-iconfont">&#xe60c;</i>
+                            </a>
+                        </#if>
+                        <#if detect.detectState == 4>
+                            <a style="text-decoration:none" href="javascript:;" title="修改检测信息"
+                               onclick="update_info('修改检测信息','${path}/admin/detect/to_update_complete?detectId=${detect.detectId!''}','570','450');">
+                                <i class="Hui-iconfont">&#xe60c;</i>
+                            </a>
+                        </#if>
+                        <a style="text-decoration:none" href="javascript:;" title="查看仓储进度"
+                           onclick="add_remark('查看仓储进度','${path}/admin/detect/to_view_progress?signclosedId=${detect.signclosedId!''}','570','450');">
+                            <i class="Hui-iconfont">&#xe6cd;</i>
+                        </a>
                     </td>
                 </tr>
                 </#list>

+ 201 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/update_complete.ftl

@@ -0,0 +1,201 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
+    <meta http-equiv="Cache-Control" content="no-siteapp" />
+<#include "/base/add_base.ftl">
+    <title>修改检测内容</title>
+    <style>
+        .my-title{font-weight: 500;padding-left: 15px;position: relative;}
+        .my-title:after{content: '';position: absolute;left: 0;top:12%;width: 3px;height: 80%;background: #32a3d8;}
+        .my-input{padding: 8px 5px;width: 80%;border:1px solid rgba(0,0,0,.1);}
+        .my-input-date{padding: 8px 10px;border:1px solid rgba(0,0,0,.1);width: 80%;background: url(http://s.iamberry.com/images/rili-1.png) 98.5% center no-repeat; background-size:auto 50%;}
+        .input-box{margin: 18px 0;}
+        .input-dic{float: left;margin:5px 10px 0 0;font-size: 12px;}
+        .add-list{list-style-type: none;padding: 10px;background-color: #f5f5f5;width: 60%;float: left;margin: 0;}
+        .add-list>li{margin: 10px 0;}
+        .my-textarea{padding: 5px 10px;width: 80%;border:1px solid rgba(0,0,0,.1);}
+        .my-btn-reset{padding: 10px 20px;width: 150px; background-color: #fff;color: #32a3d8;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
+        .my-btn-submit{padding: 10px 20px;width: 150px; background-color: #32a3d8;color: #fff;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
+        .my-select{border: 1px solid rgba(0,0,0,.1);padding:6px 50px 6px 15px;width: 60%; height: 34px;margin: 0 10px; -webkit-appearance:none;appearance:none;background: url(http://s.iamberry.com/images/select-1.png) right center no-repeat #fff;background-size:auto 100%;}
+        input[type=radio]{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+        input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+    </style>
+    <meta name="keywords" content="${path}">
+    <meta name="description" content="H-ui.admin v3.0,是一款由国人开发的轻量级扁平化网站后台模板,完全免费开源的网站后台管理系统模版,适合中小型CMS后台系统。">
+</head>
+<body>
+<article class="page-container">
+    <form class="form form-horizontal" id="form-admin-add">
+        <div class="input-box">
+            <span class="input-dic" style="margin-top: 0">检测结果</span>
+            <label for="radio-3">
+                <input type="radio" id="radio-3" name="detectState" value="3"
+                       <#if detectInfo.detectState == 3>checked</#if>
+                       />检测通过
+            </label>
+            <label for="radio-4" style="margin-left: 50px;">
+                <input type="radio" id="radio-4" name="detectState" value="4"
+                       <#if detectInfo.detectState == 4>checked</#if>
+                />检测未通过
+            </label>
+        </div>
+
+        <div class="input-box">
+            <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+            <textarea rows="3" cols="20" name="detectPhenomenon" id="detectPhenomenon"  class="my-textarea" placeholder="工厂检测现象">${detectInfo.detectPhenomenon!''}</textarea>
+        </div>
+        <div class="input-box">
+            <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+            <textarea rows="3" cols="20" name="detectFailureClassification" id="detectFailureClassification"  class="my-textarea" placeholder="故障分类">${detectInfo.detectFailureClassification!''}</textarea>
+        </div>
+        <div class="input-box">
+            <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+            <textarea rows="3" cols="20" name="detectFailureCause" id="detectFailureCause"  class="my-textarea" placeholder="故障原因">${detectInfo.detectFailureCause!''}</textarea>
+        </div>
+        <div class="input-box">
+            <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+            <textarea rows="3" cols="20" name="detectResults" id="detectResults"  class="my-textarea" placeholder="判定结果">${detectInfo.detectResults!''}</textarea>
+        </div>
+        <div class="input-box">
+            <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+            <textarea rows="3" cols="20" name="detectPoint" id="detectPoint"  class="my-textarea" placeholder="故障指向">${detectInfo.detectPoint!''}</textarea>
+        </div>
+        <div class="input-box">
+            <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+            <textarea rows="3" cols="20" name="detectAnalysis" id="detectAnalysis"  class="my-textarea" placeholder="原因分析">${detectInfo.detectAnalysis!''}</textarea>
+        </div>
+
+        <#--<div class="input-box">
+            <span class="input-dic" style="margin-top: 0">是否需要转入生产部门</span>
+            <label for="radio-5">
+                <input type="radio" id="radio-5" name="detectIsMaintenance" onclick="show()" value="1" checked/>需要转入生产部门
+            </label>
+            <label for="radio-6" style="margin-left: 50px;">
+                <input type="radio" id="radio-6" name="detectIsMaintenance" onclick="hide()" value="2"/>不需要转入生产部门
+            </label>
+        </div>
+        <div class="input-box" id="revolutionProducedId">
+            <span class="input-dic" style="margin-top: 0">立即转入生产部门</span>
+            <label for="radio-7">
+                <input type="radio" id="radio-7" name="detectRevolutionProduced" value="2" checked/>立即转入
+            </label>
+            <label for="radio-8" style="margin-left: 50px;">
+                <input type="radio" id="radio-8" name="detectRevolutionProduced" value="1"/>以后转入
+            </label>
+        </div>-->
+        <div class="input-box">
+            <span class="input-dic" style="margin-top: 0">QC检查状态</span>
+            <label for="radio-7">
+                <input type="radio" id="radio-9" name="maintenanceResults" value="1" checked/>通过
+            </label>
+            <label for="radio-8" style="margin-left: 50px;">
+                <input type="radio" id="radio-10" name="maintenanceResults" value="2"/>不通过
+            </label>
+        </div>
+        <div class="input-box">
+            <span class="input-dic spanhidth">备注</span>
+            <textarea rows="3" cols="20" name="detectDesc" id="detectDesc" class="my-textarea" placeholder="请详细备注内容,便于以后复查。如果转入生产,则生产部门同事可查看!">${detectInfo.detectDesc!''}</textarea>
+        </div>
+        <div>
+            <input type="hidden" value="${detectId!''}" id="detectId" name="detectId">
+           <button type="button" class="my-btn-submit" onclick="add();">确认提交</button>
+        </div>
+    </form>
+</article>
+<script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
+<script type="text/javascript">
+    function hide() {
+        $("#revolutionProducedId").hide();
+    }
+    function show() {
+        $("#revolutionProducedId").show();
+    }
+
+    function  add() {
+
+        var detectPhenomenon = $("#detectPhenomenon").val();
+        if( detectPhenomenon == null || detectPhenomenon == "" ){
+            layer.msg('请输入工厂检测现象',{icon: 5,time:1000});
+            return;
+        }
+        if( detectPhenomenon.length > 300 ){
+            layer.msg('工厂检测现象长度不得大于150个字符',{icon: 5,time:1000});
+            return;
+        }
+        var detectFailureClassification = $("#detectFailureClassification").val();
+        if( detectFailureClassification == null || detectFailureClassification == "" ){
+            layer.msg('请输入故障分类',{icon: 5,time:1000});
+            return;
+        }
+        if( detectFailureClassification.length > 50 ){
+            layer.msg('故障分类长度不得大于25个字符',{icon: 5,time:1000});
+            return;
+        }
+        var detectFailureCause = $("#detectFailureCause").val();
+        if( detectFailureCause == null || detectFailureCause == "" ){
+            layer.msg('请输入故障原因',{icon: 5,time:1000});
+            return;
+        }
+        if( detectFailureCause.length > 100 ){
+            layer.msg('故障原因长度不得大于50个字符',{icon: 5,time:1000});
+            return;
+        }
+
+        var detectResults = $("#detectResults").val();
+        if( detectResults == null || detectResults == "" ){
+            layer.msg('请输入判定结果',{icon: 5,time:1000});
+            return;
+        }
+        if( detectResults.length > 100 ){
+            layer.msg('判定结果长度不得大于50个字符',{icon: 5,time:1000});
+            return;
+        }
+
+        var detectPoint = $("#detectPoint").val();
+        if( detectPoint == null || detectPoint == "" ){
+            layer.msg('请输入故障指向',{icon: 5,time:1000});
+            return;
+        }
+        if( detectPoint.length > 100 ){
+            layer.msg('故障指向长度不得大于50个字符',{icon: 5,time:1000});
+            return;
+        }
+
+        var detectAnalysis = $("#detectAnalysis").val();
+        if( detectAnalysis == null || detectAnalysis == "" ){
+            layer.msg('请输入原因分析',{icon: 5,time:1000});
+            return;
+        }
+        if( detectAnalysis.length > 100 ){
+            layer.msg('原因分析长度不得大于50个字符',{icon: 5,time:1000});
+            return;
+        }
+        $.ajax({
+            cache: true,
+            type: "POST",
+            url: "${path}/admin/detect/update_complete",
+            data:$('#form-admin-add').serialize(),// 你的formid
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    layer.msg('检测完成',{icon: 1,time:1000},function () {
+                        window.parent.location.reload();
+                        var index = parent.layer.getFrameIndex(window.name);
+                        parent.layer.close(index)
+                    });
+                } else {
+                    layer.msg('检测完成失败',{icon: 5,time:1000});
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+                layer.msg('检测错误',{icon: 5,time:1000});
+            }
+        });
+    }
+</script>
+</body>
+</html>

+ 113 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/view_progress.ftl

@@ -0,0 +1,113 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
+    <meta http-equiv="Cache-Control" content="no-siteapp" />
+<#include "/base/add_base.ftl">
+    <title>修改备注 - H-ui.filter v2.4</title>
+    <style>
+        .my-title{font-weight: 500;padding-left: 15px;position: relative;}
+        .my-title:after{content: '';position: absolute;left: 0;top:12%;width: 3px;height: 80%;background: #32a3d8;}
+        .my-input{padding: 8px 5px;width: 80%;border:1px solid rgba(0,0,0,.1);}
+        .my-input-date{padding: 8px 10px;border:1px solid rgba(0,0,0,.1);width: 80%;background: url(http://s.iamberry.com/images/rili-1.png) 98.5% center no-repeat; background-size:auto 50%;}
+        .input-box{margin: 18px 0;}
+        .input-dic{float: left;margin:5px 10px 0 0;font-size: 12px;}
+        .add-list{list-style-type: none;padding: 10px;background-color: #f5f5f5;width: 60%;float: left;margin: 0;}
+        .add-list>li{margin: 10px 0;}
+        .my-textarea{padding: 5px 10px;width: 80%;border:1px solid rgba(0,0,0,.1);}
+        .my-btn-reset{padding: 10px 20px;width: 150px; background-color: #fff;color: #32a3d8;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
+        .my-btn-submit{padding: 10px 20px;width: 150px; background-color: #32a3d8;color: #fff;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
+        .my-select{border: 1px solid rgba(0,0,0,.1);padding:6px 50px 6px 15px;width: 60%; height: 34px;margin: 0 10px; -webkit-appearance:none;appearance:none;background: url(http://s.iamberry.com/images/select-1.png) right center no-repeat #fff;background-size:auto 100%;}
+        input[type=radio]{-webkit-appearance:none;appearance:none;background: url(/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+        input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+        .update-parts>span{margin-right: 10px;padding: 3px 4px;background-color: #effaff;border: 1px solid #32a3d8;}
+    </style>
+    <meta name="keywords" content="${path}">
+    <meta name="description" content="H-ui.admin v3.0,是一款由国人开发的轻量级扁平化网站后台模板,完全免费开源的网站后台管理系统模版,适合中小型CMS后台系统。">
+</head>
+<body>
+<article class="page-container">
+    <form class="form form-horizontal" id="form-admin-add">
+        <div class="input-box">
+            <span>签收日期:</span>
+            <#if signclosedInfo??>
+                ${signclosedInfo.signclosedDate?string("yyyy-MM-dd")!'暂无签收日期'}日
+            <#else >
+                暂无签收日期
+            </#if>
+        </div>
+
+        <div class="row cl">
+            <label class="form-label col-1 col-sm-1"></label>
+            <div class="formControls col-7 col-sm-7">
+                签收产品:
+                <div class="update-parts">
+            <#if signclosedProductInfo??>
+                <#if (signclosedProductInfo?size > 0)>
+                    <#list signclosedProductInfo as info>
+                        <#if info.signclosedProductType == 1 >
+                            <span>${info.productName!''}-${info.productNumber!''}(${info.colorName!''})x ${info.productNum!''}台</span><br>
+                        <#else >
+                            <span>${info.productName!''} x ${info.productNum!''}件</span><br>
+                        </#if>
+                    </#list>
+                <#else >
+                    暂无数据!
+                </#if>
+            <#else >
+                暂无数据!
+            </#if>
+                </div>
+            </div>
+        </div>
+        <div style="text-align:center;">
+        <#if signclosedId??>
+           <input type="hidden" value="${signclosedId!''}" id="signclosedId" name="signclosedId">
+            <#if signclosedInfo.signclosedState == 1>
+                <button type="button" class="my-btn-submit" onclick="add();">催促仓库转入QC</button>
+            </#if>
+            <#if signclosedInfo.signclosedState == 2>
+                <button type="button" class="my-btn-submit" onclick="openLogistics('物流信息','${path}/admin/detect/to_view_logistics?billCode=${signclosedInfo.signclosedLogisticsNumber}&billName=${signclosedInfo.signclosedLogistics  }',375,400);">查看物流</button>
+            </#if>
+        <#else >
+            <button type="button" class="my-btn-submit" onclick="add();">催促仓库转入QC</button>
+        </#if>
+        </div>
+    </form>
+</article>
+<script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
+<script type="text/javascript">
+
+    function  add() {
+        $.ajax({
+            cache: true,
+            type: "POST",
+            url: "${path}/admin/detect/add_reminding",
+            data:$('#form-admin-add').serialize(),// 你的formid
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    layer.msg('催促成功',{icon: 1,time:1000},function () {
+                        window.parent.location.reload();
+                        var index = parent.layer.getFrameIndex(window.name);
+                        parent.layer.close(index)
+                    });
+                } else {
+                    layer.msg('催促失败',{icon: 5,time:1000});
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+                layer.msg('催促失败',{icon: 5,time:1000});
+            }
+        });
+    }
+
+    function openLogistics(title, url, w, h) {
+        layer_show(title,url,w,h);
+    }
+</script>
+</body>
+</html>

+ 288 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/cm/logistics/view_logistics.ftl

@@ -0,0 +1,288 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title>查看物流</title>
+<#include "/base/add_base.ftl">
+    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
+    <meta name="apple-mobile-web-app-capable" content="yes">
+    <meta name="apple-mobile-web-app-status-bar-style" content="black">
+    <link rel="stylesheet" type="text/css" href="//css.iamberry.com/wateroPF/css/mui.min.css">
+    <style>
+        body{ text-align:center}
+        article, section, time, aside {
+            display: block;
+        }
+        .point-time {
+            content: "";
+            position: absolute;
+            width: 13px;
+            height: 13px;
+            top: 12px;
+            left: 30%;
+            background: #1c87bf;
+            margin-left: -4px;
+            border-radius: 50%;
+            box-shadow: 0 0 0 2px #fff;
+        }
+
+        .text-red {
+            color: #ff5b5b;
+        }
+
+        .text-blue {
+            color: #1c87bf;
+        }
+
+        .text-green {
+            color: #95c91e;
+        }
+
+        .text-yellow {
+            color: #ffb902;
+        }
+
+        .text-purple {
+            color: #d32d93;
+        }
+
+        .point-red {
+            background-color: #ff5b5b;
+        }
+
+        .point-blue {
+            background-color: #38d1f7;
+        }
+
+        .point-green {
+            background-color: #95c91e;
+        }
+
+        .point-yellow {
+            background-color: #ffb902;
+        }
+
+        .point-purple {
+            background-color: #d32d93;
+        }
+
+        .content {
+            width: 100%;
+            margin: 0 auto;
+        }
+        .content article {
+            position: relative;
+        }
+        .content article > h3 {
+            width: 100%;
+            height: 20px;
+            line-height: 20px;
+            text-align: left;
+            text-indent: 3%;
+            font-size: 1.4em;
+            color: #fff;
+            padding: 10px 0 20px;
+            background-color: #dd6d01;
+        }
+        .content article section {
+            padding: 0 10px 10px;
+            position: relative;
+        }
+        .content article section:before {
+            content: "";
+            width: 2px;
+            top: 17px;
+            bottom: -17px;
+            left: 30.54%;
+            background: #73dff9;
+            position: absolute;
+            -webkit-transform: scaleX(.5);
+        }
+        .content article section:last-child:before {
+            display: none;
+        }
+        .content article section time {
+            width: 25%;
+            display: block;
+            position: absolute;
+            padding: 8px 0;
+        }
+        .content article section time > span {
+            display: block;
+            text-align: center;
+        }
+        .content article section aside {
+            color: #3a3a38;
+            margin-left: 42%;
+            padding-bottom: 15px;
+            text-align: left;
+        }
+        .content article section .brief {
+            color: #9f9f9f;
+        }
+
+        .my-box-w{position: absolute;left: 50%;top: 50%;background: rgba(255,255,255,.1);width: 100px;height: 100px;border-radius: 50%;margin-left: -50px;margin-top: -60px;padding: 8px;}
+        .my-box-n{background: rgba(255,255,255,.2);position: relative;height: 100%;width: 100%;border-radius: 50%;}
+        .my-box-machine{position: absolute;left: 50%;top: 50%;width: auto;color: #fff;-webkit-transform:translateX(-50%) translateY(-20%);}
+        .machine-num{position: absolute;left: 50%;top: 50%;margin-top:40px;-webkit-transform: translateX(-50%);color: #fff;}
+    </style>
+    <script>
+        // 屏蔽分享
+        window.hiddenAllWechatMenu = true;
+    </script>
+</head>
+<body style="background: #fff;">
+<!-- <div class="loading-bg">
+        <div class="mui-loading">
+            <div class="mui-spinner">
+            </div>
+            &nbsp;&nbsp;加载中...
+        </div>
+</div> -->
+<div class="mui-content" style="background: #fff;">
+    <div style="position: relative;height: 100px;padding:20px 15px;background: #6bc5e3;">
+        <img style="float: left;" width="60px" src="//s.iamberry.com/wateroPF/new/images/logistics.png">
+        <ul style="display: inline-block;float: left;text-align: left;color: #fff;line-height: 30px;padding: 0 0 0 10px;">
+            <li id="billName"></li>
+            <li>单号:<span id="billCode"></span></li>
+        </ul>
+    </div>
+
+    <div id="pullrefresh" class="content">
+        <article class="my-tab-view-pull">
+        </article>
+    </div>
+    <div id="orderlist" class="content" style="display:none;padding: 10px 0;">
+        暂无物流信息
+    </div>
+</div>
+<script src="/common/lib/mui/js/mui.min.js"></script>
+<#--<script src="//s.iamberry.com/wateroPF/js/jquery-2.1.1.min.js"></script>
+<script src="//s.iamberry.com/wateroPF/js/shop/main.js"></script>-->
+<!-- <script src="//s.iamberry.com/wateroPF/js/shop/wechat-utils-1.0.js"></script> -->
+<script type="text/javascript">
+    function pullupRefresh() {
+        var billCode = ${billCode!''};
+        var billName = "${billName!''}";
+        mui.ajax('${path}/logistics/getExpressInfo?dates=' + new Date().getTime(), {
+            data: {
+                "com": billName,
+                "nu": billCode
+            },
+            dataType: 'json',
+            type: 'post',
+            timeout: 15000,
+            success: function(dt) {
+                console.log(dt);
+                if(dt.status) {
+                    var name='';
+                    switch (billName){
+                        case "sto":
+                            name= "申通快递";
+                            break;
+                        case "yto":
+                            name= "圆通快递";
+                            break;
+                        case "zto":
+                            name= "中通速递";
+                            break;
+                        case "sf":
+                            name= "顺丰快递";
+                            break;
+                        case "ems":
+                            name= "邮政EMS";
+                            break;
+                        case "eyb":
+                            name= "E邮宝";
+                            break;
+                        case "zjs":
+                            name= "宅急送";
+                            break;
+                        case "yunda":
+                            name= "韵达快递";
+                            break;
+                        case "cces":
+                            name= "cces快递";
+                            break;
+                        case "pick":
+                            name= "上门提货";
+                            break;
+                        case "htky":
+                            name= "汇通快递";
+                            break;
+                        case "ttkdex":
+                            name= "天天快递";
+                            break;
+                        case "stars":
+                            name= "星晨急便";
+                            break;
+                        case "jd":
+                            name= "京东快递";
+                            break;
+                        case "01":
+                            name= "其他";
+                            break;
+                        case "02":
+                            name= "上门送货";
+                            break;
+                        case "longbanwuliu":
+                            name= "龙邦快递";
+                            break;
+                        default:
+                            break;
+                    }
+                    $("#billName").text(name);
+                    $("#billCode").text(billCode);
+                    if(dt.data.status=="1"){
+
+
+                    var renewal_data = [];
+                    renewal_data = dt.data.data;
+                    var table = document.body.querySelector('.my-tab-view-pull');
+                    mui(renewal_data).each(function(index) {
+                        var li = document.createElement('section');
+                        var color='point-blue',text='';
+                        if(index==0){
+                            color='point-red';
+                            //text="text-red";
+                        }
+                        li.innerHTML = ' <span class="point-time '+color+'"></span><time class="'+text+'">'+this.time+'</time><aside><p class="things">'+this.location+'</p><p class="brief" style="padding-top: 4%;">'+this.context+'</p></aside>';
+                        table.appendChild(li);
+
+                    })
+                    }else{
+                        $("#orderlist").show();
+					}
+                }else{
+                    $("#pullrefresh").hide();
+                    $("#orderlist").show();
+                }
+            },
+            error: function(xhr, type, errorThrown) {
+                console.log(xhr)
+            }
+        });
+    }
+    mui.ready(function(){
+        //页面首次加载时拉取一次数据
+        pullupRefresh();
+    });
+    function   format(now)   {
+        now = new Date(now);
+        var   year=now.getFullYear();
+        var   month=now.getMonth()+1;
+        var   date=now.getDate();
+        var   hour=now.getHours();
+        var   minute=now.getMinutes();
+        var   second=now.getSeconds();
+        if(month <10 && month > 0){
+            month = "0"+month;
+        }
+        if(date <10 && date > 0){
+            date = "0"+date;
+        }
+        return   year+"-"+month+"-"+date;
+    }
+</script>
+</body>
+</html>