Browse Source

品质检测代码提交

liujiankang 7 years ago
parent
commit
0f39ad9007
17 changed files with 706 additions and 5 deletions
  1. 39 1
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/ComplaintDetectInfo.java
  2. 11 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/order/Product.java
  3. 11 0
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/ComplaintDetectInfoService.java
  4. 36 0
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/FittingsInfoService.java
  5. 7 0
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/product/ProductService.java
  6. 14 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/ComplaintDetectInfoServiceImpl.java
  7. 9 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/ComplaintDetectInfoMapper.java
  8. 7 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/FittingsInfoMapper.java
  9. 37 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/FittingsInfoServiceImpl.java
  10. 78 4
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/complaintDetectInfoMapper.xml
  11. 7 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/fittingsInfoMapper.xml
  12. 6 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/product/ProductServiceImpl.java
  13. 7 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/product/mapper/ProductMapper.java
  14. 5 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/product/mapper/productMapper.xml
  15. 126 0
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminDetectController.java
  16. 169 0
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/add_detect.ftl
  17. 137 0
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_list.ftl

+ 39 - 1
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/ComplaintDetectInfo.java

@@ -14,9 +14,10 @@ public class ComplaintDetectInfo implements Serializable {
     private Integer detectId;//id
     private Integer customerId;//客诉id
     private Integer signclosedId;//签收ID
+    private Integer productId;//产品ID
     private Integer detectProductType;//产品类型
     private String detectProductNumber;//产品型号
-    private Integer detectState;//状态
+    private Integer detectState;//状态 1待仓库转入 2正在检查  3检查通过  4检查未通过
     private String detectPhenomenon;//工厂检测现象
     private String detectFailureClassification;//故障分类
     private String detectFailureCause;//故障原因
@@ -28,6 +29,11 @@ public class ComplaintDetectInfo implements Serializable {
     private String detectDesc;//备注
     private Date signclosedCreateTime;//创建时间
     private Date signclosedUpdateTime;//修改时间
+    private String machineNo;//机器编号
+
+    private String questionTitle;//问题标题
+    private String detectIsMaintenance;//是否需要维修
+
 
     public Integer getDetectId() {
         return detectId;
@@ -164,4 +170,36 @@ public class ComplaintDetectInfo implements Serializable {
     public void setSignclosedUpdateTime(Date signclosedUpdateTime) {
         this.signclosedUpdateTime = signclosedUpdateTime;
     }
+
+    public String getQuestionTitle() {
+        return questionTitle;
+    }
+
+    public void setQuestionTitle(String questionTitle) {
+        this.questionTitle = questionTitle;
+    }
+
+    public Integer getProductId() {
+        return productId;
+    }
+
+    public void setProductId(Integer productId) {
+        this.productId = productId;
+    }
+
+    public String getMachineNo() {
+        return machineNo;
+    }
+
+    public void setMachineNo(String machineNo) {
+        this.machineNo = machineNo;
+    }
+
+    public String getDetectIsMaintenance() {
+        return detectIsMaintenance;
+    }
+
+    public void setDetectIsMaintenance(String detectIsMaintenance) {
+        this.detectIsMaintenance = detectIsMaintenance;
+    }
 }

+ 11 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/order/Product.java

@@ -33,6 +33,9 @@ public class Product implements Serializable {
 
     private Integer productType;        //商品类型
 
+    private String productNumber;        //产品型号
+
+
     private List<ProductColor> colorList = new ArrayList<ProductColor>();   //产品颜色集合
 
     public Integer getProductId() {
@@ -107,6 +110,14 @@ public class Product implements Serializable {
         this.colorList = colorList;
     }
 
+    public String getProductNumber() {
+        return productNumber;
+    }
+
+    public void setProductNumber(String productNumber) {
+        this.productNumber = productNumber;
+    }
+
     @Override
     public String toString() {
         return "Product{" +

+ 11 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/ComplaintDetectInfoService.java

@@ -1,6 +1,11 @@
 package com.iamberry.rst.faces.cm;
 
 import com.iamberry.rst.core.cm.ComplaintDetectInfo;
+import com.iamberry.rst.core.order.Order;
+import com.iamberry.rst.core.page.PageRequest;
+import com.iamberry.rst.core.page.PagedResult;
+
+import java.util.List;
 
 /**
  * 客诉-品质检测产品service
@@ -21,4 +26,10 @@ public interface ComplaintDetectInfoService {
      * @return
      */
     int updateComplaintDetectById(ComplaintDetectInfo record);
+
+    /**
+     * 获取品质检测列表
+     * @return
+     */
+    PagedResult<ComplaintDetectInfo> listComplaintDetect(PageRequest<ComplaintDetectInfo> pageRequest);
 }

+ 36 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/FittingsInfoService.java

@@ -0,0 +1,36 @@
+package com.iamberry.rst.faces.cm;
+
+import com.iamberry.rst.core.cm.FittingsInfo;
+
+import java.util.List;
+
+/**
+ * 客诉-产品配件service
+ */
+public interface FittingsInfoService {
+    /**
+     * 添加配件信息
+     * @param fittingsInfo
+     * @return
+     */
+    Integer addFittingsInfo(FittingsInfo fittingsInfo);
+
+    /**
+     * 根据id查询配件信息
+     * @param fittingsId
+     * @return
+     */
+    FittingsInfo getFittingsById(Integer fittingsId);
+
+    /**
+     * 修改配件信息
+     * @param fittingsInfo
+     * @return
+     */
+    Integer updateFittingsInfo(FittingsInfo fittingsInfo);
+    /**
+     * 查询所有配件信息
+     * @return
+     */
+    List<FittingsInfo> listFittings();
+}

+ 7 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/product/ProductService.java

@@ -1,5 +1,6 @@
 package com.iamberry.rst.faces.product;
 
+import com.iamberry.rst.core.order.Product;
 import com.iamberry.rst.core.product.Gift;
 import com.iamberry.rst.core.product.OrderGift;
 
@@ -37,4 +38,10 @@ public interface ProductService {
      * @return
      */
     List<Gift> listGiftByRentType(Integer rentType);
+
+    /**
+     * 获取所有水机  奶机
+     * @return
+     */
+    List<Product> listProduce();
 }

+ 14 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/ComplaintDetectInfoServiceImpl.java

@@ -1,12 +1,20 @@
 package com.iamberry.rst.service.cm;
 
 
+import com.github.pagehelper.PageHelper;
 import com.iamberry.rst.core.cm.ComplaintDetectInfo;
+import com.iamberry.rst.core.order.Order;
+import com.iamberry.rst.core.page.PageRequest;
+import com.iamberry.rst.core.page.PagedResult;
 import com.iamberry.rst.faces.cm.ComplaintDetectInfoService;
 import com.iamberry.rst.service.cm.mapper.AwaitingSignclosedProductMapper;
 import com.iamberry.rst.service.cm.mapper.ComplaintDetectInfoMapper;
+import com.iamberry.rst.util.PageUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+
+import java.util.List;
+
 @Service
 public class ComplaintDetectInfoServiceImpl implements ComplaintDetectInfoService {
     @Autowired
@@ -26,4 +34,10 @@ public class ComplaintDetectInfoServiceImpl implements ComplaintDetectInfoServic
     public int updateComplaintDetectById(ComplaintDetectInfo record) {
         return complaintDetectInfoMapper.updateComplaintDetectById(record);
     }
+    @Override
+    public PagedResult<ComplaintDetectInfo> listComplaintDetect(PageRequest<ComplaintDetectInfo> pageRequest) {
+        PageHelper.startPage(pageRequest.getPageNO(), pageRequest.getPageSize(), pageRequest.isPageTotal());
+        List<ComplaintDetectInfo> detedctList = complaintDetectInfoMapper.listComplaintDetect(pageRequest.getData());
+        return PageUtil.getPage(detedctList);
+    }
 }

+ 9 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/ComplaintDetectInfoMapper.java

@@ -1,6 +1,9 @@
 package com.iamberry.rst.service.cm.mapper;
 
 import com.iamberry.rst.core.cm.ComplaintDetectInfo;
+
+import java.util.List;
+
 /**
  * 客诉-品质检测产品mapper
  */
@@ -20,4 +23,10 @@ public interface ComplaintDetectInfoMapper {
      * @return
      */
     int updateComplaintDetectById(ComplaintDetectInfo record);
+
+    /**
+     * 获取品质检测列表
+     * @return
+     */
+    List<ComplaintDetectInfo> listComplaintDetect(ComplaintDetectInfo record);
 }

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

@@ -2,6 +2,8 @@ package com.iamberry.rst.service.cm.mapper;
 
 import com.iamberry.rst.core.cm.FittingsInfo;
 
+import java.util.List;
+
 public interface FittingsInfoMapper {
 
     /**
@@ -24,4 +26,9 @@ public interface FittingsInfoMapper {
      * @return
      */
     Integer updateFittingsInfo(FittingsInfo fittingsInfo);
+    /**
+     * 查询所有配件信息
+     * @return
+     */
+    List<FittingsInfo> listFittings();
 }

+ 37 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/FittingsInfoServiceImpl.java

@@ -0,0 +1,37 @@
+package com.iamberry.rst.service.cm.mapper;
+
+
+import com.iamberry.rst.core.cm.AwaitingSignclosedProductInfo;
+import com.iamberry.rst.core.cm.FittingsInfo;
+import com.iamberry.rst.faces.cm.AwaitingSignclosedProductInfoService;
+import com.iamberry.rst.faces.cm.FittingsInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class FittingsInfoServiceImpl implements FittingsInfoService {
+    @Autowired
+    private FittingsInfoMapper fittingsInfoMapper;
+
+    @Override
+    public Integer addFittingsInfo(FittingsInfo fittingsInfo) {
+        return fittingsInfoMapper.addFittingsInfo(fittingsInfo);
+    }
+
+    @Override
+    public FittingsInfo getFittingsById(Integer fittingsId) {
+        return fittingsInfoMapper.getFittingsById(fittingsId);
+    }
+
+    @Override
+    public Integer updateFittingsInfo(FittingsInfo fittingsInfo) {
+        return fittingsInfoMapper.updateFittingsInfo(fittingsInfo);
+    }
+
+    @Override
+    public List<FittingsInfo> listFittings() {
+        return fittingsInfoMapper.listFittings();
+    }
+}

+ 78 - 4
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/complaintDetectInfoMapper.xml

@@ -4,6 +4,8 @@
   <resultMap id="BaseResultMap" type="ComplaintDetectInfo" >
     <id column="detect_id" property="detectId" jdbcType="INTEGER" />
     <result column="customer_id" property="customerId" jdbcType="INTEGER" />
+    <result column="signclosed_id" property="signclosedId" jdbcType="INTEGER" />
+    <result column="product_id" property="productId" jdbcType="INTEGER" />
     <result column="detect_product_type" property="detectProductType" jdbcType="BIT" />
     <result column="detect_product_number" property="detectProductNumber" jdbcType="VARCHAR" />
     <result column="detect_state" property="detectState" jdbcType="BIT" />
@@ -18,12 +20,14 @@
     <result column="detect_desc" property="detectDesc" jdbcType="VARCHAR" />
     <result column="signclosed_create_time" property="signclosedCreateTime" jdbcType="TIMESTAMP" />
     <result column="signclosed_update_time" property="signclosedUpdateTime" jdbcType="TIMESTAMP" />
+    <result column="machine_no" property="machineNo" jdbcType="VARCHAR" />
+    <result column="detect_is_maintenance" property="detectIsMaintenance" jdbcType="VARCHAR" />
   </resultMap>
   <sql id="Base_Column_List" >
-    detect_id, customer_id, detect_product_type, detect_product_number, detect_state, 
+    detect_id, customer_id,signclosed_id,product_id, detect_product_type, detect_product_number, detect_state,
     detect_phenomenon, detect_failure_classification, detect_failure_cause, detect_results, 
     detect_point, detect_analysis, detect_customer_id, detect_revolution_produced, detect_desc, 
-    signclosed_create_time, signclosed_update_time
+    signclosed_create_time, signclosed_update_time,detect_is_maintenance
   </sql>
   <select id="getComplaintDetectById" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
     select 
@@ -31,13 +35,79 @@
     from tb_rst_complaint_detect
     where detect_id = #{detectId,jdbcType=INTEGER}
   </select>
+
+  <select id="listComplaintDetect" resultMap="BaseResultMap" parameterType="ComplaintDetectInfo" >
+    select
+      cd.detect_id detectId,
+      cd.signclosed_id signclosedId,
+      cd.product_id productId,
+      cd.customer_id customerId,
+      cd.detect_product_type detectProductType,
+      cd.detect_product_number detectProductNumber,
+      cd.detect_state detectState,
+      cd.detect_phenomenon detectPhenomenon,
+      cd.detect_failure_classification detectFailureClassification,
+      cd.detect_failure_cause detectFailureCause,
+      cd.detect_results detectResults,
+      cd.detect_point detectPoint,
+      cd.detect_analysis detectAnalysis,
+      cd.detect_customer_id detectCustomerId,
+      cd.detect_revolution_produced detectRevolutionProduced,
+      cd.detect_desc detectDesc,
+      cd.signclosed_create_time signclosedCreateTime,
+      cd.signclosed_update_time signclosedUpdateTime,
+      cd.machine_no machineNo,
+      cd.detect_is_maintenance
+    from tb_rst_complaint_detect cd LEFT JOIN tb_rst_customer_info ci ON cd.customer_id = ci.customer_id
+    <where>
+      <if test="detectProductType != null and detectProductType != ''">
+        cd.detect_product_type = #{detectProductType,jdbcType=BIT}
+      </if>
+      <if test="detectProductNumber != null and detectProductNumber != ''" >
+       AND cd.detect_product_number = #{detectProductNumber,jdbcType=VARCHAR}
+      </if>
+      <if test="detectState != null and detectState != ''" >
+       AND cd.detect_state = #{detectState,jdbcType=BIT}
+      </if>
+      <if test="detectPhenomenon != null and detectPhenomenon != ''" >
+       AND cd.detect_phenomenon like CONCAT('%',#{detectPhenomenon,jdbcType=VARCHAR},'%')
+      </if>
+      <if test="detectFailureClassification != null and detectFailureClassification != ''" >
+        AND cd.detect_failure_classification like CONCAT('%',#{detectFailureClassification,jdbcType=VARCHAR},'%')
+      </if>
+      <if test="detectFailureCause != null and detectFailureCause != ''" >
+        AND cd.detect_failure_cause like CONCAT('%',#{detectFailureCause,jdbcType=VARCHAR},'%')
+      </if>
+      <if test="detectResults != null and detectResults != ''" >
+        AND cd.detect_results like CONCAT('%',#{detectResults,jdbcType=VARCHAR},'%')
+      </if>
+      <if test="detectPoint != null and detectPoint != ''" >
+        AND cd.detect_point like CONCAT('%',#{detectPoint,jdbcType=VARCHAR},'%')
+      </if>
+      <if test="detectAnalysis != null and detectAnalysis != ''" >
+        AND cd.detect_analysis like CONCAT('%',#{detectAnalysis,jdbcType=VARCHAR},'%')
+      </if>
+      <if test="detectCustomerId != null and detectCustomerId != ''" >
+        AND cd.detect_customer_id = #{detectCustomerId,jdbcType=INTEGER}
+      </if>
+      <if test="detectRevolutionProduced != null and detectRevolutionProduced != ''" >
+        AND cd.detect_revolution_produced = #{detectRevolutionProduced,jdbcType=BIT}
+      </if>
+      <if test="questionTitle != null and questionTitle != ''" >
+        AND ci.customer_question_title like CONCAT('%',#{questionTitle},'%')
+      </if>
+      <if test="detectIsMaintenance != null and detectIsMaintenance != ''" >
+        AND cd.detect_is_maintenance = #{detectIsMaintenance,jdbcType=BIT}
+      </if>
+    </where>
+  </select>
   <insert id="insert" parameterType="ComplaintDetectInfo" >
-    insert into tb_rst_complaint_detect (detect_id, customer_id, detect_product_type, 
+    insert into tb_rst_complaint_detect (detect_id, customer_id,signclosed_id,product_id, detect_product_type,
       detect_product_number, detect_state, detect_phenomenon, 
       detect_failure_classification, detect_failure_cause, 
       detect_results, detect_point, detect_analysis, 
       detect_customer_id, detect_revolution_produced, 
-      detect_desc, signclosed_create_time, signclosed_update_time
+      detect_desc, signclosed_create_time, signclosed_update_time,machine_no,detect_is_maintenance
       )
     values (#{detectId,jdbcType=INTEGER}, #{customerId,jdbcType=INTEGER}, #{detectProductType,jdbcType=BIT}, 
       #{detectProductNumber,jdbcType=VARCHAR}, #{detectState,jdbcType=BIT}, #{detectPhenomenon,jdbcType=VARCHAR}, 
@@ -45,6 +115,7 @@
       #{detectResults,jdbcType=VARCHAR}, #{detectPoint,jdbcType=VARCHAR}, #{detectAnalysis,jdbcType=VARCHAR}, 
       #{detectCustomerId,jdbcType=INTEGER}, #{detectRevolutionProduced,jdbcType=BIT}, 
       #{detectDesc,jdbcType=VARCHAR}, #{signclosedCreateTime,jdbcType=TIMESTAMP}, #{signclosedUpdateTime,jdbcType=TIMESTAMP}
+      ,#{machineNo,jdbcType=TIMESTAMP},#{detectIsMaintenance,jdbcType=BIT}
       )
   </insert>
 
@@ -96,6 +167,9 @@
       <if test="signclosedUpdateTime != null" >
         signclosed_update_time = #{signclosedUpdateTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="detectIsMaintenance != null" >
+        detect_is_maintenance = #{detectIsMaintenance,jdbcType=TIMESTAMP}
+      </if>
     </set>
     where detect_id = #{detectId,jdbcType=INTEGER}
   </update>

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

@@ -24,6 +24,13 @@
     where fittings_id = #{fittingsId,jdbcType=INTEGER}
   </select>
 
+  <!-- 查询所有配件信息 -->
+  <select id="listFittings" resultType="FittingsInfo">
+    select
+    <include refid="fittingsInfo" />
+    from tb_rst_product_fittings
+  </select>
+
   <!-- 添加配件信息 -->
   <insert id="addFittingsInfo" parameterType="FittingsInfo" keyProperty="fittingsId" useGeneratedKeys="true" >
     insert into tb_rst_product_fittings (fittings_id, product_id, fittings_name, 

+ 6 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/product/ProductServiceImpl.java

@@ -1,5 +1,6 @@
 package com.iamberry.rst.service.product;
 
+import com.iamberry.rst.core.order.Product;
 import com.iamberry.rst.core.product.Gift;
 import com.iamberry.rst.core.product.OrderGift;
 import com.iamberry.rst.faces.product.ProductService;
@@ -94,4 +95,9 @@ public class ProductServiceImpl implements ProductService {
         }
         return returnGift;
     }
+
+    @Override
+    public List<Product> listProduce() {
+        return productMapper.listProduce();
+    }
 }

+ 7 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/product/mapper/ProductMapper.java

@@ -1,5 +1,6 @@
 package com.iamberry.rst.service.product.mapper;
 
+import com.iamberry.rst.core.order.Product;
 import com.iamberry.rst.core.product.OrderGift;
 
 import java.util.List;
@@ -19,4 +20,10 @@ public interface ProductMapper {
      * @return
      */
     public List<OrderGift> listGift(OrderGift orderGift);
+
+    /**
+     * 获取所有水机  奶机
+     * @return
+     */
+    List<Product> listProduce();
 }

+ 5 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/product/mapper/productMapper.xml

@@ -17,4 +17,9 @@
             AND gift_rent_type = #{giftRentType}
         </if>
     </select>
+
+    <select id="listProduce"  resultType="product">
+        select * from tb_rst_product_info where product_type = 1
+    </select>
+
 </mapper>

+ 126 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminDetectController.java

@@ -0,0 +1,126 @@
+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.order.Order;
+import com.iamberry.rst.core.order.Product;
+import com.iamberry.rst.core.order.RentType;
+import com.iamberry.rst.core.page.PageRequest;
+import com.iamberry.rst.core.page.PagedResult;
+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.utils.AdminUtils;
+import org.apache.commons.lang.StringUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+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.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.List;
+
+/**
+ * Created by wxm on 2017/8/29.
+ */
+@Controller
+@RequestMapping("/admin/detect")
+public class AdminDetectController {
+
+   // private
+    @Autowired
+    private ComplaintDetectInfoService complaintDetectInfoService;
+    @Autowired
+    private ProductService productService;
+    @Autowired
+    private FittingsInfoService fittingsInfoService;
+
+
+    /**
+     * 跳转到添加检测记录页面
+     *
+     * @return
+     */
+    @RequiresPermissions("detect:add:detect")
+    @RequestMapping(value = "/to_add_detect")
+    public ModelAndView toAddDetect(HttpServletRequest request) {
+        ModelAndView mv = new ModelAndView("cm/inspection/add_detect");
+        //获取所有产品
+        List<Product> productList = productService.listProduce();
+        mv.addObject("productList",productList);
+        //获取所有配件
+        List<FittingsInfo> listFittings = fittingsInfoService.listFittings();
+        mv.addObject("listFittings",listFittings);
+        return mv;
+    }
+
+
+
+    /**
+     * 客诉 - 查询品质检测列表
+     * @param request
+     * @return
+     */
+    @RequiresPermissions("detect:select:detect")
+    @RequestMapping("/select_detect_list")
+    public ModelAndView selectDetectList(HttpServletRequest request,
+                                        @RequestParam(value = "pageNO", defaultValue = "1", required = false) int pageNO,
+                                        @RequestParam(value = "pageTotal", required = false) Integer pageTotal,
+                                        @RequestParam(value = "pageSize", defaultValue = "5", required = false) int pageSize,
+                                         ComplaintDetectInfo detectInfo) {
+
+        ModelAndView mv = new ModelAndView("cm/inspection/detect_list");
+        StringBuilder url = new StringBuilder("/admin/detect/select_detect_list?pageSize=" + pageSize);
+
+        // 请求参数
+        if (StringUtils.isNotEmpty(detectInfo.getDetectPhenomenon())) {
+            url.append("&detectPhenomenon=").append(detectInfo.getDetectPhenomenon());
+            mv.addObject("detectPhenomenon",detectInfo.getDetectPhenomenon());
+        }
+        if (StringUtils.isNotEmpty(detectInfo.getDetectFailureCause())) {
+            url.append("&detectFailureCause=").append(detectInfo.getDetectFailureCause());
+            mv.addObject("detectFailureCause",detectInfo.getDetectFailureCause());
+        }
+        if (StringUtils.isNotEmpty(detectInfo.getDetectPoint())) {
+            url.append("&detectPoint=").append(detectInfo.getDetectPoint());
+            mv.addObject("detectPoint",detectInfo.getDetectPoint());
+        }
+        if (StringUtils.isNotEmpty(detectInfo.getDetectAnalysis())) {
+            url.append("&detectAnalysis=").append(detectInfo.getDetectAnalysis());
+            mv.addObject("detectAnalysis",detectInfo.getDetectAnalysis());
+        }
+        if (detectInfo.getDetectState() != null && detectInfo.getDetectState() != -1) {
+            url.append("&detectState=").append(detectInfo.getDetectState());
+            mv.addObject("detectState",detectInfo.getDetectState());
+        }
+        if (StringUtils.isNotEmpty(detectInfo.getDetectFailureClassification())) {
+            url.append("&detectFailureClassification=").append(detectInfo.getDetectFailureClassification());
+            mv.addObject("detectFailureClassification",detectInfo.getDetectFailureClassification());
+        }
+        if (detectInfo.getDetectProductType() != null && detectInfo.getDetectProductType() != -1) {
+            url.append("&detectProductType=").append(detectInfo.getDetectProductType());
+            mv.addObject("detectProductType",detectInfo.getDetectProductType());
+        }
+
+        // 封装请求数据
+        PageRequest<ComplaintDetectInfo> pageRequest = new PageRequest<>(detectInfo, pageNO, pageSize, pageTotal == null);
+        // 查询订单列表
+        PagedResult<ComplaintDetectInfo> result = complaintDetectInfoService.listComplaintDetect(pageRequest);
+        long total = 0;
+        if (pageTotal == null) {
+            total = result.getPages();
+        } else {
+            total = pageTotal;
+            result.setPages(total);
+        }
+
+        url.append("&pageTotal=").append(total).append("&pageNO=");
+        mv.addObject("page", result);
+        mv.addObject("url", url.toString());
+        return mv;
+    }
+
+}
+

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

@@ -0,0 +1,169 @@
+<!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;}
+    </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">检测产品&nbsp;&nbsp;</span>
+            <label for="radio-1">
+                <input type="radio" id="radio-1" name="detectProductType" value="1" checked/>产品
+                <select name="orderPayType" style="width:100px">
+
+                <#if (productList ?size > 0)>
+                    <#list productList as list>
+                        <option value ="${list.productId}">${list.productName}</option>
+                    </#list>
+                <#else >
+                    <option value ="">暂无产品,请先添加产品</option>
+                </#if>
+                </select>
+                <input class="my-input" type="text" id="machineNo" name="machineNo" style="width: 30%;" placeholder="机器编号" />
+            </label>
+        </div>
+
+        <div class="input-box">
+            <span class="input-dic" style="margin-top: 0">&nbsp;</span>
+
+            <label for="radio-2" style="margin-left: 50px;">
+                <input type="radio" id="radio-2" name="detectProductType" value="2"/>配件
+                <select name="orderPayType"  style="width:100px">
+                <#if (listFittings ?size > 0)>
+                    <#list listFittings as list>
+                        <option value ="${list.fittingsId}">${list.fittingsName}</option>
+                    </#list>
+                <#else >
+                    <option value ="">暂无配件,请先添加配件</option>
+                </#if>
+                </select>
+            </label>
+        </div>
+
+        <div class="input-box"><span class="input-dic spanhidth">检测日期</span><input class="my-input-date" type="text" style="width: 76%;"  name="signclosedUpdateTime" id="signclosedUpdateTime" onClick="WdatePicker({skin:'whyGreen',maxDate:'%y-%M-%d'})" placeholder="请选择检测日期" readonly="readonly"/> </div>
+
+        <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" checked/>检测通过
+            </label>
+            <label for="radio-4" style="margin-left: 50px;">
+                <input type="radio" id="radio-4" name="detectState" value="4"/>检测未通过
+            </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="工厂检测现象"></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="故障分类"></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="故障原因"></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="判定结果"></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="故障指向"></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="原因分析"></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" value="1" checked/>需要维修
+            </label>
+            <label for="radio-6" style="margin-left: 50px;">
+                <input type="radio" id="radio-6" name="detectIsMaintenance" value="2"/>不需要维修
+            </label>
+        </div>
+        <div class="input-box">
+            <span class="input-dic" style="margin-top: 0">是否已转入</span>
+            <label for="radio-7">
+                <input type="radio" id="radio-7" name="detectRevolutionProduced" value="1" checked/>已转入维修
+            </label>
+            <label for="radio-8" style="margin-left: 50px;">
+                <input type="radio" id="radio-8" name="detectRevolutionProduced" 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="请详细备注签收的内容,便于以后复查。如果转入生产,则生产部门同事可查看!"></textarea>
+        </div>
+        <div>
+           <button type="button" class="my-btn-submit" onclick="">确认提交</button>
+        </div>
+    </form>
+</article>
+<script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
+<script type="text/javascript">
+    $(function(){
+
+
+    });
+
+    function  add() {
+        $.ajax({
+            cache: true,
+            type: "POST",
+            url: "${path}/admin/order/save_order_money",
+            data:$('#form-admin-add').serialize(),// 你的formid
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    window.parent.admin_result("支付成功!",1);
+                } else {
+                    window.parent.admin_result(data.resultMsg,5);
+                }
+                var index = parent.layer.getFrameIndex(window.name);
+                parent.$('.btn-refresh').click();
+                parent.layer.close(index);
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+                window.parent.admin_result("支付失败!",5);
+                var index = parent.layer.getFrameIndex(window.name);
+                parent.$('.btn-refresh').click();
+                parent.layer.close(index);
+            }
+        });
+    }
+</script>
+</body>
+</html>

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

@@ -0,0 +1,137 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title></title>
+    <style>
+        *{padding: 0;margin: 0;}
+        .my-input{border: 1px solid rgba(0,0,0,.1);padding: 1px 5px;height: 32px;margin-right: 10px;}
+        /*.my-input::-webkit-input-placeholder,.my-select{color: #dcdcdc;}*/
+        .my-select{border: 1px solid rgba(0,0,0,.1);padding:6px 50px 6px 15px;height: 34px;margin: 0 10px; -webkit-appearance:none;appearance:none;background: url(/common/images/pts/select-1.png) right center no-repeat;background-size:auto 100%;}
+        .my-btn-search{border: 1px solid #32a3d8;padding: 1px 25px;height: 32px;background-color: #32a3d8;color: #fff;}
+        .barcodeImg{margin:10px 0px}
+        .table-bg thead th{background-color: #e2f6ff;}
+        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;}
+    </style>
+<#include "/base/list_base.ftl">
+</head>
+<body>
+<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
+    <span class="c-gray en">&gt;</span> RST管理
+    <span class="c-gray en">&gt;</span> 品质检测列表
+    <a class="btn radius r" style="line-height:1.6em;margin-top:3px;background: #32a3d8;color: #fff;" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
+</nav>
+<div class="page-container">
+    <div class="text-c">
+        <form name="form1" action="${path}/admin/detect/select_detect_list" method="post">
+            <button type="button" style="cursor:pointer;float: left;" class="my-btn-search" onclick="add_detect('添加品质检测','${path}/admin/detect/to_add_detect','570','450');">新建品检</button>
+            <input class="my-input" type="text" name="questionTitle" value="${questionTitle!}" placeholder="客诉问题"/>
+            <input class="my-input" type="text" name="detectPhenomenon" value="${detectPhenomenon!}" placeholder="工厂检测现象"/>
+            <input class="my-input" type="text" name="detectFailureCause" value="${detectFailureCause!}" placeholder="故障原因"/>
+            <input class="my-input" type="text" name="detectPoint" value="${detectPoint!}" placeholder="故障指向"/>
+            <input class="my-input" type="text" name="detectAnalysis" value="${detectAnalysis!}" placeholder="原因分析"/>
+            <input class="my-input" type="text" name="detectFailureClassification" value="${detectFailureClassification!}" placeholder="故障分类"/>
+
+            <select class="my-select" name="detectState" style="height: 30px;width: 150px">
+                <option value ="">选择状态</option>
+                <option value ="1" <#if detectState??><#if detectState == 1>selected="selected"</#if></#if>>待仓库转入</option>
+                <option value ="2" <#if detectState??><#if detectState == 2>selected="selected"</#if></#if>>正在检查</option>
+                <option value ="3" <#if detectState??><#if detectState == 3>selected="selected"</#if></#if>>检查通过</option>
+                <option value ="4" <#if detectState??><#if detectState == 4>selected="selected"</#if></#if>>检查未通过</option>
+            </select>
+            <select class="my-select" name="detectProductType" style="height: 30px;width: 150px">
+                <option value ="">选择产品类型</option>
+                <option value ="1" <#if detectProductType??><#if detectProductType == 1>selected="selected"</#if></#if>>净水机</option>
+                <option value ="2" <#if detectProductType??><#if detectProductType == 2>selected="selected"</#if></#if>>冲奶机</option>
+            </select>
+            <button style="cursor:pointer;" type="submit" class="my-btn-search">搜索</button>
+        </form>
+    </div>
+    <div class="mt-20">
+        <table class="table table-border table-bordered table-bg table-hover table-sort">
+            <thead>
+            <tr class="text-c">
+                <th width="100">产品类型</th>
+                <th width="100">产品型号</th>
+                <th width="100">状态</th>
+                <th width="100">工厂检测现象</th>
+                <th width="100">故障分类</th>
+                <th width="150">故障原因</th>
+                <th width="150">判定结果</th>
+                <th width="150">故障指向</th>
+                <th width="150">原因分析</th>
+                <th width="150">客诉描述</th>
+                <th width="150">是否转入生产部门</th>
+                <th width="150">备注</th>
+                <th width="150">检测日期</th>
+                <th width="50">操作</th>
+            </tr>
+            </thead>
+            <tbody id="listid">
+            <#if (page.dataList?size > 0)>
+                <#list page.dataList as detect>
+                <tr>
+                    <td class="text-c" width="100">${detect.detectProductType!}</td>
+                    <td class="text-c" width="100">${detect.detectProductNumber!}</td>
+                    <td class="text-c" width="100">
+                        <#if detect.detectState == 1>
+                            待仓库转入
+                        </#if>
+                        <#if detect.detectState == 2>
+                            正在检查
+                        </#if>
+                        <#if detect.detectState == 3>
+                            检查通过
+                        </#if>
+                        <#if detect.detectState == 4>
+                            检查通过
+                        </#if>
+                    </td>
+                    <td class="text-c" width="100">${detect.detectPhenomenon!}</td>
+                    <td class="text-c" width="100">${detect.detectFailureClassification!}</td>
+                    <td class="text-c" width="100">${detect.detectFailureCause!}</td>
+                    <td class="text-c" width="100">${detect.detectResults!}</td>
+                    <td class="text-c" width="100">${detect.detectPoint!}</td>
+                    <td class="text-c" width="100">${detect.detectAnalysis!}</td>
+                    <td class="text-c" width="100">${detect.customerId!}</td>
+                    <td class="text-c" width="100">
+                        <#if detect.detectRevolutionProduced == 1>
+                            待转入
+                        </#if>
+                        <#if detect.detectRevolutionProduced == 2>
+                            已转入
+                        </#if>
+                        <#if detect.detectRevolutionProduced == 3>
+                            不需要转入
+                        </#if>
+                    </td>
+                    <td class="text-c" width="100">${detect.detectDesc!}</td>
+                    <td class="text-c" width="100">${(detect.signclosedCreateTime?string("yyyy-MM-dd"))!''}</td>
+                    <!-- 遍历操作 -->
+                    <td class="td-manage text-c">
+                        <#--<a style="text-decoration:none" href="javascript:;" title="修改"
+                           onclick="edit_detail('${path}/admin/equipment/_update_device?deviceId=${device.deviceId!}');">
+                            <i class="Hui-iconfont">&#xe6df;</i>
+                        </a>-->
+                    </td>
+                </tr>
+                </#list>
+            <#else >
+            <tr><td class="td-manage text-c" colspan = "14">暂时没有品质检测信息</td></tr>
+            </#if>
+            </tbody>
+        </table>
+    </div>
+</div>
+<div style="padding-top: 10px;"></div>
+<#include "/base/page_util.ftl">
+
+<script type="text/javascript">
+    /*添加*/
+    function add_detect(title,url,w,h){
+        layer_show(title,url,w,h);
+    }
+</script>
+</body>
+</html>