lxw
2023-03-01 a394dcd855aca5d6e05d799caf60d62bd8bbe764
接收者确认反馈
4个文件已修改
60 ■■■■■ 已修改文件
src/main/java/com/whyc/controller/BOMFeedbakController.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/mapper/BOMFeedbakMapper.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/BOMFeedbakService.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/BOMFeedbakMapper.xml 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/controller/BOMFeedbakController.java
@@ -25,14 +25,14 @@
    @ApiOperation(value = "查询发送者反馈不同状态")
    @GetMapping("getSenderStatus")
    public Response getSenderStatus(@RequestParam int flag, @RequestParam int pageCurr, @RequestParam int pageSize){
        return service.getSenderStatus(flag,pageCurr,pageSize);
    public Response getSenderStatus(@RequestParam int[] flags, @RequestParam int pageCurr, @RequestParam int pageSize){
        return service.getSenderStatus(flags,pageCurr,pageSize);
    }
    @ApiOperation(value = "查询接收者反馈不同状态")
    @GetMapping("getRecevierStatus")
    public Response getRecevierStatus(@RequestParam int flag, @RequestParam int pageCurr, @RequestParam int pageSize){
        return service.getRecevierStatus(flag,pageCurr,pageSize);
    public Response getRecevierStatus(@RequestParam int[] flags, @RequestParam int pageCurr, @RequestParam int pageSize){
        return service.getRecevierStatus(flags,pageCurr,pageSize);
    }
    @ApiOperation(value = "接收者确认反馈",notes = "传入id,confirmStatus,replyContent")
src/main/java/com/whyc/mapper/BOMFeedbakMapper.java
@@ -12,11 +12,11 @@
    int selectReceiver(@Param("id") Long id);
    //查询发送者反馈不同状态
    List<BOMFeedback> getSenderStatus(Long id, int flag);
    List<BOMFeedback> getSenderStatus(@Param("id")Long id, @Param("flags")int[] flags);
    //查询接收者反馈不同状态
    List<BOMFeedback> getRecevierStatus(@Param("id")Long id, int flag);
    List<BOMFeedback> getRecevierStatus(@Param("id")Long id,  @Param("flags")int[] flags);
    //当是杨红兰查看时,只有杨红兰的排在最前面
    List<BOMFeedback> getRecevierYHL(@Param("id")Long id, @Param("name")String name, int flag);
    List<BOMFeedback> getRecevierYHL(@Param("id")Long id, @Param("name")String name, @Param("flags")int[] flags);
}
src/main/java/com/whyc/service/BOMFeedbakService.java
@@ -68,23 +68,23 @@
        return map;
    }
    //查询发送者反馈不同状态
    public Response getSenderStatus(int flag,int pageCurr,int pageSize) {
    public Response getSenderStatus(int[] flags,int pageCurr,int pageSize) {
        PageHelper.startPage(pageCurr,pageSize);
        List list=mapper.getSenderStatus(ActionUtil.getUser().getId(),flag);
        List list=mapper.getSenderStatus(ActionUtil.getUser().getId(),flags);
        PageInfo pageInfo = new PageInfo(list);
        return new Response().setII(1,list.size()>0,pageInfo,"发送者反馈");
    }
   //查询接收者反馈不同状态
    public Response getRecevierStatus(int flag, int pageCurr, int pageSize) {
    public Response getRecevierStatus(int[] flags, int pageCurr, int pageSize) {
        PageHelper.startPage(pageCurr,pageSize);
        String name=ActionUtil.getUser().getName();
        long id=ActionUtil.getUser().getId();
        List list=new ArrayList();
        if(name.equals("杨红兰")){
            //当是杨红兰查看时,只有杨红兰的排在最前面
            list=mapper.getRecevierYHL(id,name,flag);
            list=mapper.getRecevierYHL(id,name,flags);
        }else{
            list=mapper.getRecevierStatus(id,flag);
            list=mapper.getRecevierStatus(id,flags);
        }
        PageInfo pageInfo = new PageInfo(list);
        return new Response().setII(1,list.size()>0,pageInfo,"接收者反馈");
src/main/resources/mapper/BOMFeedbakMapper.xml
@@ -15,10 +15,14 @@
               tb_product_history.parent_code,tb_product_history.parent_name,tb_product_history.parent_model,tb_product_history.custom_code,tb_product_history.version_time,
               tb_doc_user.name as sender_name
        from tb_bom_feedback,tb_product_history,tb_doc_user
        where tb_bom_feedback.product_id=tb_product_history.id
        and tb_bom_feedback.sender_id=tb_doc_user.id
        and sender_id=#{id}
        and confirm_status=#{flag}
        <where>
            tb_bom_feedback.product_id=tb_product_history.id
            and tb_bom_feedback.sender_id=tb_doc_user.id
            and sender_id=#{id}
            <foreach collection="flags" item="flag"  open="and (" close=")" separator="or">
                confirm_status=#{flag}
            </foreach>
        </where>
        order by create_time desc
    </select>
    <select id="getRecevierStatus" resultType="com.whyc.pojo.BOMFeedback">
@@ -26,10 +30,14 @@
               tb_product_history.parent_code,tb_product_history.parent_name,tb_product_history.parent_model,tb_product_history.custom_code,tb_product_history.version_time,
               tb_doc_user.name as sender_name
        from tb_bom_feedback,tb_product_history,tb_doc_user
        where tb_bom_feedback.product_id=tb_product_history.id
          and tb_bom_feedback.sender_id=tb_doc_user.id
          and receiver_ids like '%${id}%'
          and confirm_status=#{flag}
        <where>
            tb_bom_feedback.product_id=tb_product_history.id
            and tb_bom_feedback.sender_id=tb_doc_user.id
            and receiver_ids like '%${id}%'
            <foreach collection="flags" item="flag"  open="and (" close=")" separator="or">
                confirm_status=#{flag}
            </foreach>
        </where>
        order by create_time desc
    </select>
@@ -38,10 +46,14 @@
               tb_product_history.parent_code,tb_product_history.parent_name,tb_product_history.parent_model,tb_product_history.custom_code,tb_product_history.version_time,
               tb_doc_user.name as sender_name
        from tb_bom_feedback,tb_product_history,tb_doc_user
        where tb_bom_feedback.product_id=tb_product_history.id
          and tb_bom_feedback.sender_id=tb_doc_user.id
          and receiver_ids like '%${id}%'
          and confirm_status=#{flag}
        <where>
            tb_bom_feedback.product_id=tb_product_history.id
            and tb_bom_feedback.sender_id=tb_doc_user.id
            and receiver_ids like '%${id}%'
            <foreach collection="flags" item="flag"  open="and (" close=")" separator="or">
                confirm_status=#{flag}
            </foreach>
        </where>
        order by receiver_names=#{name} desc ,create_time desc
    </select>