南昌市物联网技防平台-公安版
Administrator
2021-06-19 d1757c919b264de219decf4e8c9be0bf49cd926e
意见反馈新增接口 saves 修改,区分是意见反馈插入还是调查反馈上报插入
3 files modified
43 ■■■■■ changed files
blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/feedback/controller/FeedbackController.java 31 ●●●●● patch | view | raw | blame | history
blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/feedback/entity/Feedback.java 7 ●●●● patch | view | raw | blame | history
blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/feedback/vo/FeedbackVO.java 5 ●●●●● patch | view | raw | blame | history
blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/feedback/controller/FeedbackController.java
@@ -271,6 +271,7 @@
    @PostMapping("/saves")
    public R saves(FeedbackVO feedback) {
        if (feedback.getStatus()==0) {
        SimpleDateFormat sdf = new SimpleDateFormat();// 格式化时间
        sdf.applyPattern("yyyy-MM-dd HH:mm:ss");// a为am/pm的标记
        Date date = new Date();// 获取当前时间
@@ -285,7 +286,6 @@
        operation.setZctime(sdf.format(date));
        operationService.save(operation);
        feedbackService.save(feedback);
        Wj wj = new Wj();
        if (feedback.getSpaddress().equals("")&&feedback.getSpaddress()!=null) {
@@ -300,8 +300,7 @@
        }
        if (feedback.getTpaddress().equals("")&&feedback.getTpaddress()!=null){
        }
        else {
            } else {
            String[] splittp = feedback.getTpaddress().split(",");//以逗号分割
            for (
                String string3 : splittp) {
@@ -310,7 +309,33 @@
                iWjService.insertfeed(wj);
            }
        }
        alarmService.updateJtype(operation.getJid(), "2", null, null);
        }
        if (feedback.getStatus()==1){
            Wj wj = new Wj();
            if (feedback.getSpaddress() != null &&  feedback.getSpaddress()!="") {
                //获取视频地址
                String[] splitsp = feedback.getSpaddress().split(",");//以逗号分割
                for (String string2 : splitsp) {
                    wj.setSnumber(feedback.getSnumber());
                    wj.setAddress(string2);
                    iWjService.insertfeed(wj);
                }
            }
            if (feedback.getTpaddress() != null &&  feedback.getTpaddress()!="") {
                String[] splittp = feedback.getTpaddress().split(",");//以逗号分割
                for (
                    String string3 : splittp) {
                    wj.setSnumber(feedback.getSnumber());
                    wj.setAddress(string3);
                    iWjService.insertfeed(wj);
                }
            }
        }
        feedbackService.save(feedback);
        return R.success("新增成功");
    }
blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/feedback/entity/Feedback.java
@@ -20,12 +20,15 @@
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
/**
 * 实体类
@@ -107,7 +110,9 @@
    */
        @ApiModelProperty(value = "事发时间")
        @TableField("stime")
    private String stime;
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date stime;
    /**
    * 处理完成时间
    */
blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/feedback/vo/FeedbackVO.java
@@ -38,4 +38,9 @@
    private  String spaddress;
    private  String tpaddress;
    /**
     * 0 警情反馈   1 调查取证上报
      */
    private Integer status;
}