hanfucheng 9 months ago
parent
commit
0e428d5523
18 changed files with 2386 additions and 0 deletions
  1. 53 0
      lawenforcement-ui/src/api/lawenforcement/case.js
  2. 457 0
      lawenforcement-ui/src/views/lawenforcement/case/index.vue
  3. 348 0
      lawenforcement-ui/src/views/lawenforcement/register/index.vue
  4. 101 0
      src/main/java/com/sooka/sponest/lawenforcement/lawCase/controller/LawenforcementCaseController.java
  5. 145 0
      src/main/java/com/sooka/sponest/lawenforcement/lawCase/domain/LawenforcementAttach.java
  6. 126 0
      src/main/java/com/sooka/sponest/lawenforcement/lawCase/domain/LawenforcementCase.java
  7. 113 0
      src/main/java/com/sooka/sponest/lawenforcement/lawCase/domain/LawenforcementCaseLog.java
  8. 70 0
      src/main/java/com/sooka/sponest/lawenforcement/lawCase/mapper/LawenforcementAttachMapper.java
  9. 78 0
      src/main/java/com/sooka/sponest/lawenforcement/lawCase/mapper/LawenforcementCaseLogMapper.java
  10. 62 0
      src/main/java/com/sooka/sponest/lawenforcement/lawCase/mapper/LawenforcementCaseMapper.java
  11. 60 0
      src/main/java/com/sooka/sponest/lawenforcement/lawCase/service/ILawenforcementCaseLogService.java
  12. 70 0
      src/main/java/com/sooka/sponest/lawenforcement/lawCase/service/ILawenforcementCaseService.java
  13. 90 0
      src/main/java/com/sooka/sponest/lawenforcement/lawCase/service/impl/LawenforcementCaseLogServiceImpl.java
  14. 246 0
      src/main/java/com/sooka/sponest/lawenforcement/lawCase/service/impl/LawenforcementCaseServiceImpl.java
  15. 29 0
      src/main/java/com/sooka/sponest/lawenforcement/utils/DataConstants.java
  16. 108 0
      src/main/resources/mapper/lawenforcement/LawenforcementAttachMapper.xml
  17. 99 0
      src/main/resources/mapper/lawenforcement/LawenforcementCaseLogMapper.xml
  18. 131 0
      src/main/resources/mapper/lawenforcement/LawenforcementCaseMapper.xml

+ 53 - 0
lawenforcement-ui/src/api/lawenforcement/case.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询案件列表
+export function listCase(query) {
+  return request({
+    url: '/sooka-sponest-lawenforcement/case/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询案件详细
+export function getCase(id) {
+  return request({
+    url: '/sooka-sponest-lawenforcement/case/' + id,
+    method: 'get'
+  })
+}
+
+// 新增案件
+export function addCase(data) {
+  return request({
+    url: '/sooka-sponest-lawenforcement/case',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改案件
+export function updateCase(data) {
+  return request({
+    url: '/sooka-sponest-lawenforcement/case',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除案件
+export function delCase(id) {
+  return request({
+    url: '/sooka-sponest-lawenforcement/case/' + id,
+    method: 'delete'
+  })
+}
+
+//按部门查询日子
+export function getCaseLog(data) {
+  return request({
+    url: '/sooka-sponest-lawenforcement/case/getCaseLog',
+    method: 'post',
+    data: data
+  })
+}

+ 457 - 0
lawenforcement-ui/src/views/lawenforcement/case/index.vue

@@ -0,0 +1,457 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="案件名称" prop="caseName">
+        <el-input
+          v-model="queryParams.caseName"
+          placeholder="请输入案件名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="案件编号" prop="caseNumber">
+        <el-input
+          v-model="queryParams.caseNumber"
+          placeholder="请输入案件编号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-table v-loading="loading" :data="caseList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center"/>
+      <el-table-column label="案件名称" align="center" prop="caseName"/>
+      <el-table-column label="案件编号" align="center" prop="caseNumber"/>
+      <el-table-column label="处罚对象" align="center" prop="punishTarget">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.lawenforcement_punish_target" :value="scope.row.punishTarget"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="处罚情形" align="center" prop="punishType">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.lawenforcement_punish_type" :value="scope.row.punishType"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="案件描述" align="center" prop="describe"/>
+      <el-table-column label="状态" align="center" prop="state">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.lawenforcement_caseState" :value="scope.row.state"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['lawenforcement:case:query']"
+          >详情
+          </el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-plus"
+            @click="register(scope.row)"
+          >立案
+          </el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 详情 -->
+    <el-dialog :title="title" :visible.sync="open" width="1200px" class="form-style">
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="案件名称" prop="caseName">
+              <el-input v-model="form.caseName" placeholder="请输入案件名称" disabled/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="案件编号" prop="caseNumber">
+              <el-input v-model="form.caseNumber" placeholder="请输入案件编号" disabled/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="处罚对象" prop="punishTarget">
+              <el-select v-model="form.punishTarget" placeholder="请选择处罚对象" filterable disabled>
+                <el-option
+                  v-for="dict in dict.type.lawenforcement_punish_target"
+                  :key="dict.value"
+                  :label="dict.label"
+                  :value="dict.value"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="处罚情形" prop="punishType">
+              <el-select v-model="form.punishType" placeholder="请选择处罚情形" filterable disabled>
+                <el-option
+                  v-for="dict in dict.type.lawenforcement_punish_type"
+                  :key="dict.value"
+                  :label="dict.label"
+                  :value="dict.value"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="上报单位" prop="deptName">
+              <el-input v-model="form.deptName" disabled/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="上报人" prop="createName">
+              <el-input v-model="form.createName" disabled/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="上报时间" prop="createTime">
+              <el-input v-model="form.createTime" disabled/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="状态" prop="state">
+              <el-select v-model="form.state" filterable disabled>
+                <el-option
+                  v-for="dict in dict.type.lawenforcement_caseState"
+                  :key="dict.value"
+                  :label="dict.label"
+                  :value="dict.value"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="24">
+            <el-form-item label="案件描述" prop="describe">
+              <el-input type="textarea" v-model="form.describe" placeholder="请输入案件描述" disabled/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="24">
+            <el-col :span="8">
+              <el-card style="height: 350px;">
+                <el-form-item prop="dataOne">
+                  <div class="form-item-title">1.法制审核机构出具的审核意见书</div>
+                  <fileUpload v-model="dataOne"></fileUpload>
+                </el-form-item>
+                <el-form-item label="说明" prop="describe">
+                  <el-input type="textarea" v-model="form.describe" placeholder="请输入案件描述" disabled/>
+                </el-form-item>
+              </el-card>
+            </el-col>
+            <el-col :span="8">
+              <el-card style="height: 350px;">
+                <el-form-item prop="dataTwo">
+                  <div class="form-item-title">2.落实行政处罚裁量基准和包容审慎监管执法“四张清单”相关材料</div>
+                  <fileUpload v-model="dataTwo"></fileUpload>
+                </el-form-item>
+              </el-card>
+            </el-col>
+            <el-col :span="8">
+              <el-card style="height: 350px;">
+                <el-form-item prop="dataTwo">
+                  <div class="form-item-title">3.落实行政处罚裁量基准和包容审慎监管执法“四张清单”相关材料</div>
+                  <fileUpload v-model="dataThree"></fileUpload>
+                </el-form-item>
+              </el-card>
+            </el-col>
+          </el-col>
+        </el-row>
+      </el-form>
+      <el-table v-loading="loading" :data="logList" @selection-change="handleSelectionChange">
+        <el-table-column label="操作人" align="center" prop="createName"/>
+        <el-table-column label="操作时间" align="center" prop="createTime"/>
+        <el-table-column label="所属部门" align="center" prop="deptName"/>
+        <el-table-column label="操作内容" align="center" prop="content"/>
+        <el-table-column label="状态" align="center" prop="state">
+          <template slot-scope="scope">
+            <dict-tag :options="dict.type.lawenforcement_caseState" :value="scope.row.state"/>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div slot="footer" class="dialog-footer">
+        <el-button v-if="type!='1'&&form.state=='state_1'" type="primary" @click="acceptance('state_2')">受理
+        </el-button>
+        <el-button v-if="type!='1'&&form.state=='state_1'" @click="noAcceptance('state_3')">不予受理</el-button>
+        <el-button v-if="type!='1'&&form.state=='state_2'&&this.logNum==0" type="primary"
+                   @click="acceptance('state_5')">通 过
+        </el-button>
+        <el-button v-if="type!='1'&&form.state=='state_2'&&this.logNum==0" @click="noAcceptance('state_4')">不通过
+        </el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+
+    <el-dialog :title="title" :visible.sync="open1" width="600px" height="500px" class="form-style">
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="说明" prop="content">
+          <el-input type="textarea" v-model="form.content" placeholder="请输入说明"/>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submit">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+
+
+    <!--立案-->
+    <el-dialog :visible.sync="dialogVisible" :title="title" width="1200px" class="form-style">
+      <register @send-ok="sendOk" ref="register"  :caseNumber = "caseName"/>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+
+
+  </div>
+</template>
+
+<script>
+import {listCase, getCase, getCaseLog, updateCase, addCase} from "@/api/lawenforcement/case";
+import register from "@/views/lawenforcement/register/index.vue";
+import form from "element-ui/packages/form";
+
+export default {
+  name: "Case",
+  computed: {
+    form() {
+      return form
+    }
+  },
+  components: {register},
+  dicts: ['lawenforcement_punish_target', 'lawenforcement_punish_type', 'lawenforcement_caseState'],
+  data() {
+    return {
+      dataOne:null,
+      dataTwo:null,
+      dataThree:null,
+
+      // 遮罩层
+      loading: true,
+      dialogVisible: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      caseName:"",
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      type: 0,
+      // 案件表格数据
+      caseList: [],
+      //日志列表
+      logList: [],
+      logNum: null,
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      open1: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        createName: null,
+        updateName: null,
+        deptId: null,
+        deptName: null,
+        recordId: null,
+        caseName: null,
+        caseNumber: null,
+        punishTarget: null,
+        punishType: null,
+        describe: null,
+        dataOne: null,
+        uploadOne: null,
+        dataTwo: null,
+        uploadTwo: null,
+        dataThree: null,
+        uploadThree: null,
+        state: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {}
+    };
+  },
+  created() {
+    this.queryParams.state = this.$route.query.state;
+    this.type = this.$route.query.type;
+    this.getList();
+  },
+  methods: {
+    /** 查询案件列表 */
+    getList() {
+      this.loading = true;
+      listCase(this.queryParams).then(response => {
+        this.caseList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    //立案
+    register(row) {
+      this.dialogVisible = true;
+      this.title = "立案";
+      this.caseName = row.caseName;
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs.register.submitForm();
+    },
+    sendOk(){
+      debugger
+      this.dialogVisible = false;
+      this.getList();
+      this.$refs.register.reset();
+    },
+    // 按部门查看日志
+    getCaseLog(row) {
+      this.form.deptId = this.$store.state.user.dept.deptId;
+      this.form.id = row.id;
+      console.log(row)
+      console.log(this.$store.state.user.dept.deptId)
+      console.log(this.$store.state.user.dept.deptId)
+      getCaseLog(this.form).then(response => {
+        this.logNum = response.data;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.open1 = false;
+      this.dialogVisible = false;
+      this.$refs.register.reset()
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        createBy: null,
+        createName: null,
+        createTime: null,
+        updateBy: null,
+        updateName: null,
+        updateTime: null,
+        deptId: null,
+        deptName: null,
+        recordId: null,
+        caseName: null,
+        caseNumber: null,
+        punishTarget: null,
+        punishType: null,
+        describe: null,
+        dataOne: null,
+        uploadOne: null,
+        dataTwo: null,
+        uploadTwo: null,
+        dataThree: null,
+        uploadThree: null,
+        state: this.queryParams.state
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length !== 1
+      this.multiple = !selection.length
+    },
+    /** 详情 */
+    handleUpdate(row) {
+      this.getCaseLog(row);
+      this.reset();
+      const id = row.id || this.ids
+      getCase(id).then(response => {
+        this.form = response.data;
+        this.logList = response.data.logList
+        this.dataOne = response.data.fileList[0].attachPath
+        this.open = true;
+        this.title = "案件详情";
+      });
+    },
+    /** 受理 */
+    acceptance(state) {
+      this.form.state = state;
+      updateCase(this.form).then(response => {
+        if (state == 'state_2') {
+          this.$modal.msgSuccess("受理成功");
+        }
+        if (state == 'state_5') {
+          this.$modal.msgSuccess("通过成功");
+        }
+        this.open = false;
+        this.getList();
+      });
+    },
+    /* 不予受理 */
+    noAcceptance(state) {
+      this.form.state = state;
+      this.open1 = true;
+      if (state == 'state_3') {
+        this.title = "不予受理";
+      }
+      if (state == 'state_4') {
+        this.title = "不通过";
+      }
+    },
+    submit() {
+      updateCase(this.form).then(response => {
+        if (this.form.state == 'state_3') {
+          this.$modal.msgSuccess("不予受理");
+        }
+        if (this.form.state == 'state_4') {
+          this.$modal.msgSuccess("不通过");
+        }
+        this.open1 = false;
+        this.open = false;
+        this.getList();
+      });
+    }
+  }
+};
+</script>

+ 348 - 0
lawenforcement-ui/src/views/lawenforcement/register/index.vue

@@ -0,0 +1,348 @@
+<template>
+  <div class="app-container">
+
+    <!-- 立案 -->
+    <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+      <el-row :gutter="20">
+        <el-col :span="12">
+          <el-form-item label="案件名称" prop="caseName">
+            <el-input v-model="form.caseName" placeholder="请输入案件名称"/>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="案件编号" prop="caseNumber">
+            <el-input v-model="caseNumber" placeholder="请输入案件编号" disabled/>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row :gutter="20">
+        <el-col :span="12">
+          <el-form-item label="处罚对象" prop="punishTarget">
+            <el-select v-model="form.punishTarget" placeholder="请选择处罚对象" filterable>
+              <el-option
+                v-for="dict in dict.type.lawenforcement_punish_target"
+                :key="dict.value"
+                :label="dict.label"
+                :value="dict.value"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="处罚情形" prop="punishType">
+            <el-select v-model="form.punishType" placeholder="请选择处罚情形" filterable>
+              <el-option
+                v-for="dict in dict.type.lawenforcement_punish_type"
+                :key="dict.value"
+                :label="dict.label"
+                :value="dict.value"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row :gutter="20">
+        <el-col :span="24">
+          <el-form-item label="案件描述" prop="describe">
+            <el-input type="textarea" v-model="form.describe" placeholder="请输入案件描述"/>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row :gutter="20">
+        <el-col :span="24">
+          <el-col :span="8">
+            <el-card style="height: 350px;">
+              <el-form-item prop="dataOne">
+                <div class="form-item-title">1.法制审核机构出具的审核意见书</div>
+                <fileUpload :fileType = "fileType" :limit = "1" v-model="form.dataOne" :setFileName="setDataOne"
+                            :removeFileName="removeDataOne"></fileUpload>
+              </el-form-item>
+              <el-form-item label="说明" prop="describeOne">
+                <el-input type="textarea" v-model="form.describeOne" placeholder="请输入材料说明"/>
+              </el-form-item>
+            </el-card>
+          </el-col>
+          <el-col :span="8">
+            <el-card style="height: 350px;">
+              <el-form-item prop="dataTwo">
+                <div class="form-item-title">2.落实行政处罚裁量基准和包容审慎监管执法“四张清单”相关材料</div>
+                <fileUpload :fileType = "fileType" v-model="form.dataTwo" :setFileName="setDataTwo"
+                            :removeFileName="removeDataTwo"></fileUpload>
+              </el-form-item>
+              <el-form-item label="说明" prop="describeTwo">
+                <el-input type="textarea" v-model="form.describeTwo" placeholder="请输入材料说明"/>
+              </el-form-item>
+            </el-card>
+          </el-col>
+          <el-col :span="8">
+            <el-card style="height: 350px;">
+              <el-form-item prop="dataThree">
+                <div class="form-item-title">3.落实行政处罚裁量基准和包容审慎监管执法“四张清单”相关材料</div>
+                <fileUpload :fileType = "fileType" v-model="form.dataThree" :setFileName="setDataThree"
+                            :removeFileName="removeDataThree"></fileUpload>
+              </el-form-item>
+              <el-form-item label="说明" prop="describeThree">
+                <el-input type="textarea" v-model="form.describeThree" placeholder="请输入材料说明"/>
+              </el-form-item>
+            </el-card>
+          </el-col>
+        </el-col>
+      </el-row>
+    </el-form>
+  </div>
+</template>
+
+<script>
+import {listCase, getCase, delCase, updateCase, addCase} from "@/api/lawenforcement/case";
+import fileUpload from '@/views/components/FileUpload/index.vue';
+
+export default {
+  components: {fileUpload},
+  props:['caseNumber'],
+  name: "register",
+  dicts: ['lawenforcement_punish_target', 'lawenforcement_punish_type'],
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      fileNamesOne: null,
+      fileNamesTwo: null,
+      fileNamesThree: null,
+      fileType: ['pdf','jpg','jpeg','png'],
+      describeList: [],
+      // 案件表格数据
+      caseList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        createName: null,
+        updateName: null,
+        deptId: null,
+        deptName: null,
+        recordId: null,
+        caseName: null,
+        caseNumber: null,
+        punishTarget: null,
+        punishType: null,
+        describe: null,
+        dataOne: null,
+        uploadOne: null,
+        dataTwo: null,
+        uploadTwo: null,
+        dataThree: null,
+        uploadThree: null,
+        state: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        caseName: [
+          {required: true, message: "案件名称不能为空", trigger: "blur"}
+        ],
+        punishTarget: [
+          {required: true, message: "处罚对象不能为空", trigger: "blur"}
+        ],
+        punishType: [
+          {required: true, message: "处罚情形不能为空", trigger: "blur"}
+        ],
+        describe: [
+          {required: true, message: "案件描述不能为空", trigger: "blur"}
+        ],
+        describeOne: [
+          {validator: (rule, value, callback) => {
+            if (value || this.form.dataOne) {
+              callback();
+            } else {
+              callback(new Error('请上传文件或填写说明'));
+            }
+          }, trigger: "blur"}
+        ],
+        describeTwo: [
+          {validator: (rule, value, callback) => {
+            if (value || this.form.dataTwo) {
+              callback();
+            } else {
+              callback(new Error('请上传文件或填写说明'));
+            }
+          }, trigger: "blur"}
+        ],
+        describeThree: [
+          {validator: (rule, value, callback) => {
+            if (value || this.form.dataThree) {
+              callback();
+            } else {
+              callback(new Error('请上传文件或填写说明'));
+            }
+          }, trigger: "blur"}
+        ],
+      }
+    };
+  },
+  created() {
+  },
+  methods: {
+    /** 查询案件列表 */
+    getList() {
+      this.loading = true;
+      listCase(this.queryParams).then(response => {
+        this.caseList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    setDataOne(fileName) {
+      this.fileNamesOne = fileName;
+    },
+    removeDataOne(index) {
+      this.fileNamesOne = null;
+      let fileurls = that.form.fileUrlOne.split(",")
+      fileurls.splice(index, 1)
+      this.form.fileUrlOne = fileurls.toString()
+    },
+    setDataTwo(fileName) {
+      this.fileNamesTwo = fileName;
+    },
+    removeDataTwo(index) {
+      this.fileNamesTwo = null;
+      let fileurls = that.form.fileUrlTwo.split(",")
+      fileurls.splice(index, 1)
+      this.form.fileUrlTwo = fileurls.toString()
+    },
+    setDataThree(fileName) {
+      this.fileNamesThree = fileName;
+    },
+    removeDataThree(index) {
+      this.fileNamesThree = null;
+      let fileurls = that.form.fileUrlThree.split(",")
+      fileurls.splice(index, 1)
+      this.form.fileUrlThree = fileurls.toString()
+    },
+    // 取消按钮
+    cancel() {
+      this.dialogVisible = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        createBy: null,
+        createName: null,
+        createTime: null,
+        updateBy: null,
+        updateName: null,
+        updateTime: null,
+        deptId: null,
+        deptName: null,
+        recordId: null,
+        caseName: null,
+        caseNumber: null,
+        punishTarget: null,
+        punishType: null,
+        describe: null,
+        dataOne: null,
+        uploadOne: null,
+        dataTwo: null,
+        uploadTwo: null,
+        dataThree: null,
+        uploadThree: null,
+        describeOne: null,
+        describeTwo: null,
+        describeThree: null,
+        state: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length !== 1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加案件";
+    },
+    /** 详情 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getCase(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "案件详情";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          this.form.caseNumber = this.caseNumber
+          if (this.fileNamesOne != null)this.form.fileNamesOne = this.fileNamesOne;
+          if (this.fileNamesTwo != null)this.form.fileNamesTwo = this.fileNamesTwo;
+          if (this.fileNamesThree != null)this.form.fileNamesThree = this.fileNamesThree;
+          if (this.form.id != null) {
+            updateCase(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addCase(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+          this.$emit('send-ok');
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除案件编号为"' + ids + '"的数据项?').then(function () {
+        return delCase(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {
+      });
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('lawenforcement/case/export', {
+        ...this.queryParams
+      }, `case_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>

+ 101 - 0
src/main/java/com/sooka/sponest/lawenforcement/lawCase/controller/LawenforcementCaseController.java

@@ -0,0 +1,101 @@
+package com.sooka.sponest.lawenforcement.lawCase.controller;
+
+import com.ruoyi.common.core.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.web.controller.BaseController;
+import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.ruoyi.common.core.web.page.TableDataInfo;
+import com.ruoyi.common.log.annotation.Log;
+import com.ruoyi.common.log.enums.BusinessType;
+import com.ruoyi.common.security.annotation.RequiresPermissions;
+import com.sooka.sponest.lawenforcement.lawCase.domain.LawenforcementCase;
+import com.sooka.sponest.lawenforcement.lawCase.service.ILawenforcementCaseService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 案件Controller
+ *
+ * @author 韩福成
+ * @date 2024-10-10
+ */
+@RestController
+@RequestMapping("/case")
+public class LawenforcementCaseController extends BaseController {
+    @Autowired
+    private ILawenforcementCaseService lawenforcementCaseService;
+
+    /**
+     * 查询案件列表
+     */
+    @RequiresPermissions("lawenforcement:case:list")
+    @GetMapping("/list")
+    public TableDataInfo list(LawenforcementCase lawenforcementCase) {
+        startPage();
+        List<LawenforcementCase> list = lawenforcementCaseService.selectLawenforcementCaseList(lawenforcementCase);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出案件列表
+     */
+    @RequiresPermissions("lawenforcement:case:export")
+    @Log(title = "案件", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, LawenforcementCase lawenforcementCase) {
+        List<LawenforcementCase> list = lawenforcementCaseService.selectLawenforcementCaseList(lawenforcementCase);
+        ExcelUtil<LawenforcementCase> util = new ExcelUtil<LawenforcementCase>(LawenforcementCase.class);
+        util.exportExcel(response, list, "案件数据");
+    }
+
+    /**
+     * 获取案件详细信息
+     */
+    @RequiresPermissions("lawenforcement:case:query")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") String id) {
+        return AjaxResult.success(lawenforcementCaseService.selectLawenforcementCaseById(id));
+    }
+
+    /**
+     * 新增案件
+     */
+    @Log(title = "案件", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody LawenforcementCase lawenforcementCase) {
+        return toAjax(lawenforcementCaseService.insertLawenforcementCase(lawenforcementCase));
+    }
+
+    /**
+     * 修改案件
+     */
+    @RequiresPermissions("lawenforcement:case:edit")
+    @Log(title = "案件", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody LawenforcementCase lawenforcementCase) {
+        return toAjax(lawenforcementCaseService.updateLawenforcementCase(lawenforcementCase));
+    }
+
+    /**
+     * 删除案件
+     */
+    @RequiresPermissions("lawenforcement:case:remove")
+    @Log(title = "案件", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable String[] ids) {
+        return toAjax(lawenforcementCaseService.deleteLawenforcementCaseByIds(ids));
+    }
+
+    /*
+    * 按部门查看日志
+    *
+    * @author 韩福成
+    * @date 2024/10/11 下午2:47
+    */
+    @PostMapping(value = "/getCaseLog")
+    public AjaxResult getCaseLog(@RequestBody LawenforcementCase lawenforcementCase) {
+        return AjaxResult.success(lawenforcementCaseService.getCaseLog(lawenforcementCase));
+    }
+}

+ 145 - 0
src/main/java/com/sooka/sponest/lawenforcement/lawCase/domain/LawenforcementAttach.java

@@ -0,0 +1,145 @@
+package com.sooka.sponest.lawenforcement.lawCase.domain;
+
+import com.ruoyi.common.core.annotation.Excel;
+import com.ruoyi.common.core.web.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 附件对象 lawenforcement_attach
+ *
+ * @author 韩福成
+ * @date 2024-10-12
+ */
+public class LawenforcementAttach extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键id
+     */
+    private Long id;
+
+    /**
+     * 业务id
+     */
+    @Excel(name = "业务id")
+    private String busId;
+
+    /**
+     * 附件名称
+     */
+    @Excel(name = "附件名称")
+    private String fileName;
+
+    /**
+     * 附件路径
+     */
+    @Excel(name = "附件路径")
+    private String attachPath;
+
+    /**
+     * 说明
+     */
+    @Excel(name = "说明")
+    private String describe;
+
+    /**
+     * 排序
+     */
+    @Excel(name = "排序")
+    private Long attachSorts;
+
+    /**
+     * 创建人
+     */
+    @Excel(name = "创建人")
+    private String createName;
+
+    /**
+     * 更新人
+     */
+    @Excel(name = "更新人")
+    private String updateName;
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setBusId(String busId) {
+        this.busId = busId;
+    }
+
+    public String getBusId() {
+        return busId;
+    }
+
+    public void setFileName(String fileName) {
+        this.fileName = fileName;
+    }
+
+    public String getFileName() {
+        return fileName;
+    }
+
+    public void setAttachPath(String attachPath) {
+        this.attachPath = attachPath;
+    }
+
+    public String getAttachPath() {
+        return attachPath;
+    }
+
+    public void setDescribe(String describe) {
+        this.describe = describe;
+    }
+
+    public String getDescribe() {
+        return describe;
+    }
+
+    public void setAttachSorts(Long attachSorts) {
+        this.attachSorts = attachSorts;
+    }
+
+    public Long getAttachSorts() {
+        return attachSorts;
+    }
+
+    public void setCreateName(String createName) {
+        this.createName = createName;
+    }
+
+    public String getCreateName() {
+        return createName;
+    }
+
+    public void setUpdateName(String updateName) {
+        this.updateName = updateName;
+    }
+
+    public String getUpdateName() {
+        return updateName;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("busId", getBusId())
+                .append("fileName", getFileName())
+                .append("attachPath", getAttachPath())
+                .append("describe", getDescribe())
+                .append("attachSorts", getAttachSorts())
+                .append("createTime", getCreateTime())
+                .append("createBy", getCreateBy())
+                .append("createName", getCreateName())
+                .append("updateTime", getUpdateTime())
+                .append("updateBy", getUpdateBy())
+                .append("updateName", getUpdateName())
+                .toString();
+    }
+}

+ 126 - 0
src/main/java/com/sooka/sponest/lawenforcement/lawCase/domain/LawenforcementCase.java

@@ -0,0 +1,126 @@
+package com.sooka.sponest.lawenforcement.lawCase.domain;
+
+import com.ruoyi.common.core.annotation.Excel;
+import com.ruoyi.common.datascope.base.domain.BaseBusinessEntity;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import javax.validation.constraints.NotBlank;
+import java.util.List;
+
+/**
+ * 案件对象 lawenforcement_case
+ *
+ * @author 韩福成
+ * @date 2024-10-10
+ */
+@Data
+public class LawenforcementCase extends BaseBusinessEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键id
+     */
+    private String id;
+
+    /**
+     * 部门id
+     */
+    @Excel(name = "部门id")
+    private Long deptId;
+
+    /**
+     * 部门名称
+     */
+    @Excel(name = "部门名称")
+    private String deptName;
+
+    /**
+     * 工单id
+     */
+    @Excel(name = "工单id")
+    private String recordId;
+
+    /**
+     * 案件名称
+     */
+    @Excel(name = "案件名称")
+    private String caseName;
+
+    /**
+     * 案件编号
+     */
+    @Excel(name = "案件编号")
+    private String caseNumber;
+
+    /**
+     * 处罚对象
+     */
+    @Excel(name = "处罚对象")
+    private String punishTarget;
+
+    /**
+     * 处罚情形
+     */
+    @Excel(name = "处罚情形")
+    private String punishType;
+
+    /**
+     * 案件描述
+     */
+    @Excel(name = "案件描述")
+    private String describe;
+
+    /**
+     * 状态
+     */
+    @Excel(name = "状态")
+    private String state;
+
+    private String content;
+
+    //日志列表
+    private List<LawenforcementCaseLog> logList;
+
+    //文件列表
+    private List<LawenforcementAttach> fileList;
+
+    //文件名
+    private String fileNamesOne;
+    private String fileNamesTwo;
+    private String fileNamesThree;
+
+    //文件路径
+    private String dataOne;
+    private String dataTwo;
+    private String dataThree;
+
+    //说明
+    private String describeOne;
+    private String describeTwo;
+    private String describeThree;
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("createBy", getCreateBy())
+                .append("createName", getCreateName())
+                .append("createTime", getCreateTime())
+                .append("updateBy", getUpdateBy())
+                .append("updateName", getUpdateName())
+                .append("updateTime", getUpdateTime())
+                .append("deptId", getDeptId())
+                .append("deptName", getDeptName())
+                .append("recordId", getRecordId())
+                .append("caseName", getCaseName())
+                .append("caseNumber", getCaseNumber())
+                .append("punishTarget", getPunishTarget())
+                .append("punishType", getPunishType())
+                .append("describe", getDescribe())
+                .append("state", getState())
+                .toString();
+    }
+}

+ 113 - 0
src/main/java/com/sooka/sponest/lawenforcement/lawCase/domain/LawenforcementCaseLog.java

@@ -0,0 +1,113 @@
+package com.sooka.sponest.lawenforcement.lawCase.domain;
+
+import com.ruoyi.common.core.annotation.Excel;
+import com.ruoyi.common.core.web.domain.BaseEntity;
+import com.ruoyi.common.datascope.base.domain.BaseBusinessEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 案件日志对象 lawenforcement_case_log
+ *
+ * @author 韩福成
+ * @date 2024-10-11
+ */
+public class LawenforcementCaseLog extends BaseBusinessEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键id
+     */
+    private String id;
+
+    /**
+     * 案件id
+     */
+    @Excel(name = "案件id")
+    private String caseId;
+
+    /**
+     * 部门id
+     */
+    @Excel(name = "部门id")
+    private Long deptId;
+
+    /**
+     * 部门名称
+     */
+    @Excel(name = "部门名称")
+    private String deptName;
+
+    /**
+     * 操作内容
+     */
+    @Excel(name = "操作内容")
+    private String content;
+
+    /**
+     * 状态
+     */
+    @Excel(name = "状态")
+    private String state;
+
+    public String getDeptName() {
+        return deptName;
+    }
+
+    public void setDeptName(String deptName) {
+        this.deptName = deptName;
+    }
+
+    public Long getDeptId() {
+        return deptId;
+    }
+
+    public void setDeptId(Long deptId) {
+        this.deptId = deptId;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setCaseId(String caseId) {
+        this.caseId = caseId;
+    }
+
+    public String getCaseId() {
+        return caseId;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setState(String state) {
+        this.state = state;
+    }
+
+    public String getState() {
+        return state;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("createBy", getCreateBy())
+                .append("createName", getCreateName())
+                .append("createTime", getCreateTime())
+                .append("caseId", getCaseId())
+                .append("content", getContent())
+                .append("state", getState())
+                .toString();
+    }
+}

+ 70 - 0
src/main/java/com/sooka/sponest/lawenforcement/lawCase/mapper/LawenforcementAttachMapper.java

@@ -0,0 +1,70 @@
+package com.sooka.sponest.lawenforcement.lawCase.mapper;
+
+import com.sooka.sponest.lawenforcement.lawCase.domain.LawenforcementAttach;
+
+import java.util.List;
+
+/**
+ * 附件Mapper接口
+ *
+ * @author 韩福成
+ * @date 2024-10-12
+ */
+public interface LawenforcementAttachMapper
+{
+    /**
+     * 查询附件
+     *
+     * @param id 附件主键
+     * @return 附件
+     */
+    public LawenforcementAttach selectLawenforcementAttachById(Long id);
+
+    /**
+     * 查询附件列表
+     *
+     * @param lawenforcementAttach 附件
+     * @return 附件集合
+     */
+    public List<LawenforcementAttach> selectLawenforcementAttachList(LawenforcementAttach lawenforcementAttach);
+
+    /**
+     * 新增附件
+     *
+     * @param lawenforcementAttach 附件
+     * @return 结果
+     */
+    public int insertLawenforcementAttach(LawenforcementAttach lawenforcementAttach);
+
+    /**
+     * 修改附件
+     *
+     * @param lawenforcementAttach 附件
+     * @return 结果
+     */
+    public int updateLawenforcementAttach(LawenforcementAttach lawenforcementAttach);
+
+    /**
+     * 删除附件
+     *
+     * @param id 附件主键
+     * @return 结果
+     */
+    public int deleteLawenforcementAttachById(Long id);
+
+    /**
+     * 批量删除附件
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteLawenforcementAttachByIds(Long[] ids);
+
+    /*
+    * 按业务id删除
+    *
+    * @author 韩福成
+    * @date 2024/10/12 上午10:44
+    */
+    public int deleteByBusId(String busId);
+}

+ 78 - 0
src/main/java/com/sooka/sponest/lawenforcement/lawCase/mapper/LawenforcementCaseLogMapper.java

@@ -0,0 +1,78 @@
+package com.sooka.sponest.lawenforcement.lawCase.mapper;
+
+import com.sooka.sponest.lawenforcement.lawCase.domain.LawenforcementCase;
+import com.sooka.sponest.lawenforcement.lawCase.domain.LawenforcementCaseLog;
+
+import java.util.List;
+
+/**
+ * 案件日志Mapper接口
+ *
+ * @author 韩福成
+ * @date 2024-10-11
+ */
+public interface LawenforcementCaseLogMapper {
+    /**
+     * 查询案件日志
+     *
+     * @param id 案件日志主键
+     * @return 案件日志
+     */
+    public LawenforcementCaseLog selectLawenforcementCaseLogById(String id);
+
+    /**
+     * 查询案件日志列表
+     *
+     * @param lawenforcementCaseLog 案件日志
+     * @return 案件日志集合
+     */
+    public List<LawenforcementCaseLog> selectLawenforcementCaseLogList(LawenforcementCaseLog lawenforcementCaseLog);
+
+    /**
+     * 新增案件日志
+     *
+     * @param lawenforcementCaseLog 案件日志
+     * @return 结果
+     */
+    public int insertLawenforcementCaseLog(LawenforcementCaseLog lawenforcementCaseLog);
+
+    /**
+     * 修改案件日志
+     *
+     * @param lawenforcementCaseLog 案件日志
+     * @return 结果
+     */
+    public int updateLawenforcementCaseLog(LawenforcementCaseLog lawenforcementCaseLog);
+
+    /**
+     * 删除案件日志
+     *
+     * @param id 案件日志主键
+     * @return 结果
+     */
+    public int deleteLawenforcementCaseLogById(String id);
+
+    /**
+     * 批量删除案件日志
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteLawenforcementCaseLogByIds(String[] ids);
+
+    /*
+    * 按案件id查询
+    *
+    * @author 韩福成
+    * @date 2024/10/11 上午10:06
+    */
+    public List<LawenforcementCaseLog> getLogByCaseId(String caseId);
+
+    /*
+    * 按部门查询日志
+    *
+    * @author 韩福成
+    * @date 2024/10/11 下午2:51
+    */
+    public int getCaseLog(LawenforcementCase lawenforcementCase);
+}

+ 62 - 0
src/main/java/com/sooka/sponest/lawenforcement/lawCase/mapper/LawenforcementCaseMapper.java

@@ -0,0 +1,62 @@
+package com.sooka.sponest.lawenforcement.lawCase.mapper;
+
+
+import com.sooka.sponest.lawenforcement.lawCase.domain.LawenforcementCase;
+
+import java.util.List;
+
+/**
+ * 案件Mapper接口
+ *
+ * @author 韩福成
+ * @date 2024-10-10
+ */
+public interface LawenforcementCaseMapper {
+    /**
+     * 查询案件
+     *
+     * @param id 案件主键
+     * @return 案件
+     */
+    public LawenforcementCase selectLawenforcementCaseById(String id);
+
+    /**
+     * 查询案件列表
+     *
+     * @param lawenforcementCase 案件
+     * @return 案件集合
+     */
+    public List<LawenforcementCase> selectLawenforcementCaseList(LawenforcementCase lawenforcementCase);
+
+    /**
+     * 新增案件
+     *
+     * @param lawenforcementCase 案件
+     * @return 结果
+     */
+    public int insertLawenforcementCase(LawenforcementCase lawenforcementCase);
+
+    /**
+     * 修改案件
+     *
+     * @param lawenforcementCase 案件
+     * @return 结果
+     */
+    public int updateLawenforcementCase(LawenforcementCase lawenforcementCase);
+
+    /**
+     * 删除案件
+     *
+     * @param id 案件主键
+     * @return 结果
+     */
+    public int deleteLawenforcementCaseById(String id);
+
+    /**
+     * 批量删除案件
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteLawenforcementCaseByIds(String[] ids);
+}

+ 60 - 0
src/main/java/com/sooka/sponest/lawenforcement/lawCase/service/ILawenforcementCaseLogService.java

@@ -0,0 +1,60 @@
+package com.sooka.sponest.lawenforcement.lawCase.service;
+
+import java.util.List;
+import com.sooka.sponest.lawenforcement.lawCase.domain.LawenforcementCaseLog;
+
+/**
+ * 案件日志Service接口
+ *
+ * @author 韩福成
+ * @date 2024-10-11
+ */
+public interface ILawenforcementCaseLogService {
+    /**
+     * 查询案件日志
+     *
+     * @param id 案件日志主键
+     * @return 案件日志
+     */
+    public LawenforcementCaseLog selectLawenforcementCaseLogById(String id);
+
+    /**
+     * 查询案件日志列表
+     *
+     * @param lawenforcementCaseLog 案件日志
+     * @return 案件日志集合
+     */
+    public List<LawenforcementCaseLog> selectLawenforcementCaseLogList(LawenforcementCaseLog lawenforcementCaseLog);
+
+    /**
+     * 新增案件日志
+     *
+     * @param lawenforcementCaseLog 案件日志
+     * @return 结果
+     */
+    public int insertLawenforcementCaseLog(LawenforcementCaseLog lawenforcementCaseLog);
+
+    /**
+     * 修改案件日志
+     *
+     * @param lawenforcementCaseLog 案件日志
+     * @return 结果
+     */
+    public int updateLawenforcementCaseLog(LawenforcementCaseLog lawenforcementCaseLog);
+
+    /**
+     * 批量删除案件日志
+     *
+     * @param ids 需要删除的案件日志主键集合
+     * @return 结果
+     */
+    public int deleteLawenforcementCaseLogByIds(String[] ids);
+
+    /**
+     * 删除案件日志信息
+     *
+     * @param id 案件日志主键
+     * @return 结果
+     */
+    public int deleteLawenforcementCaseLogById(String id);
+}

+ 70 - 0
src/main/java/com/sooka/sponest/lawenforcement/lawCase/service/ILawenforcementCaseService.java

@@ -0,0 +1,70 @@
+package com.sooka.sponest.lawenforcement.lawCase.service;
+
+
+import com.sooka.sponest.lawenforcement.lawCase.domain.LawenforcementCase;
+
+import java.util.List;
+
+/**
+ * 案件Service接口
+ *
+ * @author 韩福成
+ * @date 2024-10-10
+ */
+public interface ILawenforcementCaseService {
+    /**
+     * 查询案件
+     *
+     * @param id 案件主键
+     * @return 案件
+     */
+    public LawenforcementCase selectLawenforcementCaseById(String id);
+
+    /**
+     * 查询案件列表
+     *
+     * @param lawenforcementCase 案件
+     * @return 案件集合
+     */
+    public List<LawenforcementCase> selectLawenforcementCaseList(LawenforcementCase lawenforcementCase);
+
+    /**
+     * 新增案件
+     *
+     * @param lawenforcementCase 案件
+     * @return 结果
+     */
+    public int insertLawenforcementCase(LawenforcementCase lawenforcementCase);
+
+    /**
+     * 修改案件
+     *
+     * @param lawenforcementCase 案件
+     * @return 结果
+     */
+    public int updateLawenforcementCase(LawenforcementCase lawenforcementCase);
+
+    /**
+     * 批量删除案件
+     *
+     * @param ids 需要删除的案件主键集合
+     * @return 结果
+     */
+    public int deleteLawenforcementCaseByIds(String[] ids);
+
+    /**
+     * 删除案件信息
+     *
+     * @param id 案件主键
+     * @return 结果
+     */
+    public int deleteLawenforcementCaseById(String id);
+
+    /*
+    * 按部门查看日志
+    *
+    * @author 韩福成
+    * @date 2024/10/11 下午2:49
+    */
+    public int getCaseLog(LawenforcementCase lawenforcementCase);
+}

+ 90 - 0
src/main/java/com/sooka/sponest/lawenforcement/lawCase/service/impl/LawenforcementCaseLogServiceImpl.java

@@ -0,0 +1,90 @@
+package com.sooka.sponest.lawenforcement.lawCase.service.impl;
+
+import com.ruoyi.common.core.utils.DateUtils;
+import com.ruoyi.common.datascope.base.service.BaseService;
+import com.sooka.sponest.lawenforcement.lawCase.domain.LawenforcementCaseLog;
+import com.sooka.sponest.lawenforcement.lawCase.mapper.LawenforcementCaseLogMapper;
+import com.sooka.sponest.lawenforcement.lawCase.service.ILawenforcementCaseLogService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 案件日志Service业务层处理
+ *
+ * @author 韩福成
+ * @date 2024-10-11
+ */
+@Service
+public class LawenforcementCaseLogServiceImpl extends BaseService implements ILawenforcementCaseLogService {
+    @Autowired
+    private LawenforcementCaseLogMapper lawenforcementCaseLogMapper;
+
+    /**
+     * 查询案件日志
+     *
+     * @param id 案件日志主键
+     * @return 案件日志
+     */
+    @Override
+    public LawenforcementCaseLog selectLawenforcementCaseLogById(String id) {
+        return lawenforcementCaseLogMapper.selectLawenforcementCaseLogById(id);
+    }
+
+    /**
+     * 查询案件日志列表
+     *
+     * @param lawenforcementCaseLog 案件日志
+     * @return 案件日志
+     */
+    @Override
+    public List<LawenforcementCaseLog> selectLawenforcementCaseLogList(LawenforcementCaseLog lawenforcementCaseLog) {
+        return lawenforcementCaseLogMapper.selectLawenforcementCaseLogList(lawenforcementCaseLog);
+    }
+
+    /**
+     * 新增案件日志
+     *
+     * @param lawenforcementCaseLog 案件日志
+     * @return 结果
+     */
+    @Override
+    public int insertLawenforcementCaseLog(LawenforcementCaseLog lawenforcementCaseLog) {
+        lawenforcementCaseLog.setCreateTime(DateUtils.getNowDate());
+        return lawenforcementCaseLogMapper.insertLawenforcementCaseLog(lawenforcementCaseLog);
+    }
+
+    /**
+     * 修改案件日志
+     *
+     * @param lawenforcementCaseLog 案件日志
+     * @return 结果
+     */
+    @Override
+    public int updateLawenforcementCaseLog(LawenforcementCaseLog lawenforcementCaseLog) {
+        return lawenforcementCaseLogMapper.updateLawenforcementCaseLog(lawenforcementCaseLog);
+    }
+
+    /**
+     * 批量删除案件日志
+     *
+     * @param ids 需要删除的案件日志主键
+     * @return 结果
+     */
+    @Override
+    public int deleteLawenforcementCaseLogByIds(String[] ids) {
+        return lawenforcementCaseLogMapper.deleteLawenforcementCaseLogByIds(ids);
+    }
+
+    /**
+     * 删除案件日志信息
+     *
+     * @param id 案件日志主键
+     * @return 结果
+     */
+    @Override
+    public int deleteLawenforcementCaseLogById(String id) {
+        return lawenforcementCaseLogMapper.deleteLawenforcementCaseLogById(id);
+    }
+}

+ 246 - 0
src/main/java/com/sooka/sponest/lawenforcement/lawCase/service/impl/LawenforcementCaseServiceImpl.java

@@ -0,0 +1,246 @@
+package com.sooka.sponest.lawenforcement.lawCase.service.impl;
+
+import com.ruoyi.common.core.utils.DateUtils;
+import com.ruoyi.common.core.utils.SpringUtils;
+import com.ruoyi.common.core.utils.StringUtils;
+import com.ruoyi.common.core.utils.uuid.IdUtils;
+import com.ruoyi.common.datascope.annotation.DataScopeMutiDept;
+import com.ruoyi.common.datascope.base.service.BaseService;
+import com.ruoyi.common.security.utils.SecurityUtils;
+import com.ruoyi.system.api.RemoteConfigService;
+import com.sooka.sponest.lawenforcement.lawCase.domain.LawenforcementAttach;
+import com.sooka.sponest.lawenforcement.lawCase.domain.LawenforcementCase;
+import com.sooka.sponest.lawenforcement.lawCase.domain.LawenforcementCaseLog;
+import com.sooka.sponest.lawenforcement.lawCase.mapper.LawenforcementAttachMapper;
+import com.sooka.sponest.lawenforcement.lawCase.mapper.LawenforcementCaseLogMapper;
+import com.sooka.sponest.lawenforcement.lawCase.mapper.LawenforcementCaseMapper;
+import com.sooka.sponest.lawenforcement.lawCase.service.ILawenforcementCaseService;
+import com.sooka.sponest.lawenforcement.utils.DataConstants;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+
+/**
+ * 案件Service业务层处理
+ *
+ * @author 韩福成
+ * @date 2024-10-10
+ */
+@Service
+public class LawenforcementCaseServiceImpl extends BaseService implements ILawenforcementCaseService {
+    @Autowired
+    private LawenforcementCaseMapper lawenforcementCaseMapper;
+
+    @Autowired
+    private LawenforcementCaseLogMapper lawenforcementCaseLogMapper;
+
+    @Autowired
+    private LawenforcementAttachMapper lawenforcementAttachMapper;
+
+    /**
+     * 查询案件
+     *
+     * @param id 案件主键
+     * @return 案件
+     */
+    @Override
+    public LawenforcementCase selectLawenforcementCaseById(String id) {
+        LawenforcementCase lawenforcementCase = lawenforcementCaseMapper.selectLawenforcementCaseById(id);
+        List<LawenforcementCaseLog> logList = lawenforcementCaseLogMapper.getLogByCaseId(id);
+        LawenforcementAttach attach = new LawenforcementAttach();
+        attach.setBusId(id);
+        List<LawenforcementAttach> fileList = lawenforcementAttachMapper.selectLawenforcementAttachList(attach);
+        for (LawenforcementAttach file : fileList) {
+            StringBuilder newDiles = new StringBuilder();
+            String suffix = file.getAttachPath().substring(file.getAttachPath().lastIndexOf(".")+1);
+            if (suffix.equals("pdf")){
+                String fileurl = SpringUtils.getBean(RemoteConfigService.class).remotegetConfigKey(DataConstants.DOWNLOAD_URL).getData();
+                String filename = file.getFileName();
+                String group = file.getAttachPath().substring(0, file.getAttachPath().indexOf('/'));
+                newDiles.append(fileurl).append("Download?fileName=").append(filename).append("&&group=").append(group).append("&&path=").append(file.getAttachPath().substring(file.getAttachPath().indexOf('/') + 1)).append("+").append(filename);
+                file.setAttachPath(newDiles.toString());
+            }else {
+                String fileUrl = SpringUtils.getBean(RemoteConfigService.class).remotegetConfigKey(DataConstants.FILE_URL).getData();
+                newDiles.append(fileUrl).append(file.getAttachPath());
+                file.setAttachPath(newDiles.toString());
+            }
+        }
+        lawenforcementCase.setLogList(logList);
+        lawenforcementCase.setFileList(fileList);
+        return lawenforcementCase;
+    }
+
+    /**
+     * 查询案件列表
+     *
+     * @param lawenforcementCase 案件
+     * @return 案件
+     */
+    @DataScopeMutiDept(deptAlias = "d")
+    @Override
+    public List<LawenforcementCase> selectLawenforcementCaseList(LawenforcementCase lawenforcementCase) {
+        setSookaDataBase(lawenforcementCase);
+        return lawenforcementCaseMapper.selectLawenforcementCaseList(lawenforcementCase);
+    }
+
+    /**
+     * 新增案件
+     *
+     * @param lawenforcementCase 案件
+     * @return 结果
+     */
+    @Override
+    public int insertLawenforcementCase(LawenforcementCase lawenforcementCase) {
+        //新增案件
+        lawenforcementCase.setId(IdUtils.simpleUUID());
+        lawenforcementCase.setCreateBy(SecurityUtils.getUserId().toString());
+        lawenforcementCase.setCreateTime(DateUtils.getNowDate());
+        lawenforcementCase.setCreateName(SecurityUtils.getLoginUser().getSysUser().getNickName());
+        lawenforcementCase.setDeptId(SecurityUtils.getLoginUser().getSysUser().getDeptId());
+        lawenforcementCase.setDeptName(SecurityUtils.getLoginUser().getSysUser().getDeptNames());
+        lawenforcementCase.setState("state_1");
+        int inserted = lawenforcementCaseMapper.insertLawenforcementCase(lawenforcementCase);
+        //新增案件日志
+        LawenforcementCaseLog lawenforcementCaseLog = new LawenforcementCaseLog();
+        lawenforcementCaseLog.setId(IdUtils.simpleUUID());
+        lawenforcementCaseLog.setCreateBy(SecurityUtils.getUserId().toString());
+        lawenforcementCaseLog.setCreateTime(DateUtils.getNowDate());
+        lawenforcementCaseLog.setCreateName( SecurityUtils.getLoginUser().getSysUser().getNickName());
+        lawenforcementCaseLog.setDeptId(SecurityUtils.getLoginUser().getSysUser().getDeptId());
+        lawenforcementCaseLog.setDeptName(SecurityUtils.getLoginUser().getSysUser().getDeptNames());
+        lawenforcementCaseLog.setCaseId(lawenforcementCase.getId());
+        lawenforcementCaseLog.setState("state_1");
+        lawenforcementCaseLog.setContent(lawenforcementCase.getContent());
+        lawenforcementCaseLogMapper.insertLawenforcementCaseLog(lawenforcementCaseLog);
+        //附件
+        lawenforcementAttachMapper.deleteByBusId(lawenforcementCase.getId());//删掉旧数据
+        if (StringUtils.isNotEmpty(lawenforcementCase.getFileNamesOne())||StringUtils.isNotEmpty(lawenforcementCase.getDescribeOne())){
+            LawenforcementAttach centerdataTFile = new LawenforcementAttach();
+            centerdataTFile.setBusId(lawenforcementCase.getId());
+            centerdataTFile.setFileName(lawenforcementCase.getFileNamesOne());
+            String fileUrl = getString(lawenforcementCase.getDataOne());
+            centerdataTFile.setAttachPath(fileUrl);
+            centerdataTFile.setAttachSorts(1L);
+            centerdataTFile.setDescribe(lawenforcementCase.getDescribeOne());
+            centerdataTFile.setCreateBy(SecurityUtils.getUserId().toString());
+            centerdataTFile.setCreateTime(DateUtils.getNowDate());
+            centerdataTFile.setCreateName(SecurityUtils.getLoginUser().getSysUser().getNickName());
+            lawenforcementAttachMapper.insertLawenforcementAttach(centerdataTFile);
+        }
+        if (StringUtils.isNotEmpty(lawenforcementCase.getFileNamesTwo())||StringUtils.isNotEmpty(lawenforcementCase.getDescribeTwo())){
+            LawenforcementAttach centerdataTFile = new LawenforcementAttach();
+            centerdataTFile.setBusId(lawenforcementCase.getId());
+            centerdataTFile.setFileName(lawenforcementCase.getFileNamesTwo());
+            String fileUrl = getString(lawenforcementCase.getDataTwo());
+            centerdataTFile.setAttachPath(fileUrl);
+            centerdataTFile.setAttachSorts(2L);
+            centerdataTFile.setDescribe(lawenforcementCase.getDescribeTwo());
+            centerdataTFile.setCreateBy(SecurityUtils.getUserId().toString());
+            centerdataTFile.setCreateTime(DateUtils.getNowDate());
+            centerdataTFile.setCreateName(SecurityUtils.getLoginUser().getSysUser().getNickName());
+            lawenforcementAttachMapper.insertLawenforcementAttach(centerdataTFile);
+        }
+        if (StringUtils.isNotEmpty(lawenforcementCase.getFileNamesThree())||StringUtils.isNotEmpty(lawenforcementCase.getDescribeThree())){
+            LawenforcementAttach centerdataTFile = new LawenforcementAttach();
+            centerdataTFile.setBusId(lawenforcementCase.getId());
+            centerdataTFile.setFileName(lawenforcementCase.getFileNamesThree());
+            String fileUrl = getString(lawenforcementCase.getDataThree());
+            centerdataTFile.setAttachPath(fileUrl);
+            centerdataTFile.setAttachSorts(3L);
+            centerdataTFile.setDescribe(lawenforcementCase.getDescribeThree());
+            centerdataTFile.setCreateBy(SecurityUtils.getUserId().toString());
+            centerdataTFile.setCreateTime(DateUtils.getNowDate());
+            centerdataTFile.setCreateName(SecurityUtils.getLoginUser().getSysUser().getNickName());
+            lawenforcementAttachMapper.insertLawenforcementAttach(centerdataTFile);
+        }
+        return inserted;
+    }
+
+    private static String getString(String file) {
+        String fileUrl = null;
+        if (file.indexOf('+') > -1 || file.indexOf("&&") > -1) {
+            if (file.indexOf('+') > -1) {
+                fileUrl = file.substring(0, file.indexOf('+'));
+            } else {
+                fileUrl = file;
+            }
+            String[] fileurls = fileUrl.split("&&");
+            fileUrl = fileurls[1].substring(fileurls[1].indexOf('=') + 1) + "/" + fileurls[2].substring(fileurls[2].indexOf('=') + 1);
+        } else {
+            fileUrl = file;
+        }
+        return fileUrl;
+    }
+
+    /**
+     * 修改案件
+     *
+     * @param lawenforcementCase 案件
+     * @return 结果
+     */
+    @Override
+    public int updateLawenforcementCase(LawenforcementCase lawenforcementCase) {
+        LawenforcementCaseLog lawenforcementCaseLog = new LawenforcementCaseLog();
+        lawenforcementCaseLog.setId(IdUtils.simpleUUID());
+        lawenforcementCaseLog.setCreateBy(SecurityUtils.getUserId().toString());
+        lawenforcementCaseLog.setCreateTime(DateUtils.getNowDate());
+        lawenforcementCaseLog.setCreateName( SecurityUtils.getLoginUser().getSysUser().getNickName());
+        lawenforcementCaseLog.setDeptId(SecurityUtils.getLoginUser().getSysUser().getDeptId());
+        lawenforcementCaseLog.setDeptName(SecurityUtils.getLoginUser().getSysUser().getDeptNames());
+        lawenforcementCaseLog.setCaseId(lawenforcementCase.getId());
+        lawenforcementCaseLog.setState(lawenforcementCase.getState());
+        lawenforcementCaseLog.setContent(lawenforcementCase.getContent());
+        int inserted = lawenforcementCaseLogMapper.insertLawenforcementCaseLog(lawenforcementCaseLog);
+        if (lawenforcementCase.getState().equals("state_5")){
+            List<LawenforcementCaseLog> logList = lawenforcementCaseLogMapper.getLogByCaseId(lawenforcementCase.getId());
+            long count = logList.stream().filter(obj -> obj.getState().equals("state_5")).count();
+            if (count>=5){
+                lawenforcementCase.setUpdateBy(SecurityUtils.getUserId());
+                lawenforcementCase.setUpdateTime(DateUtils.getNowDate());
+                lawenforcementCase.setUpdateName( SecurityUtils.getLoginUser().getSysUser().getNickName());
+                return lawenforcementCaseMapper.updateLawenforcementCase(lawenforcementCase);
+            }
+            return inserted;
+        }else {
+            lawenforcementCase.setUpdateBy(SecurityUtils.getUserId());
+            lawenforcementCase.setUpdateTime(DateUtils.getNowDate());
+            lawenforcementCase.setUpdateName( SecurityUtils.getLoginUser().getSysUser().getNickName());
+            return lawenforcementCaseMapper.updateLawenforcementCase(lawenforcementCase);
+        }
+    }
+
+    /**
+     * 批量删除案件
+     *
+     * @param ids 需要删除的案件主键
+     * @return 结果
+     */
+    @Override
+    public int deleteLawenforcementCaseByIds(String[] ids) {
+        return lawenforcementCaseMapper.deleteLawenforcementCaseByIds(ids);
+    }
+
+    /**
+     * 删除案件信息
+     *
+     * @param id 案件主键
+     * @return 结果
+     */
+    @Override
+    public int deleteLawenforcementCaseById(String id) {
+        return lawenforcementCaseMapper.deleteLawenforcementCaseById(id);
+    }
+
+    /*
+    * 按部门查看日志
+    *
+    * @author 韩福成
+    * @date 2024/10/11 下午2:50
+    */
+    @Override
+    public int getCaseLog(LawenforcementCase lawenforcementCase) {
+        return lawenforcementCaseLogMapper.getCaseLog(lawenforcementCase);
+    }
+}

+ 29 - 0
src/main/java/com/sooka/sponest/lawenforcement/utils/DataConstants.java

@@ -0,0 +1,29 @@
+package com.sooka.sponest.lawenforcement.utils;
+
+/**
+ * 数据中心常量池
+ */
+public class DataConstants {
+
+    private DataConstants() {
+        throw new IllegalStateException("Utility class");
+    }
+
+    public static final String FILE_URL = "fileUrl";
+
+    public static final String DOWNLOAD_URL = "downloadUrl";
+
+    public static final String ERROR_MSG = "数据已存在!";
+
+    public static final String MONTH = "month";
+
+    public static final String DAY = "day";
+
+    public static final String YEAR = "year";
+
+    public static final String CREATE_TIME = "create_time";
+
+    public static final String TITLE = "title";
+
+    public static final String CONTACTS ="contacts";
+}

+ 108 - 0
src/main/resources/mapper/lawenforcement/LawenforcementAttachMapper.xml

@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.sooka.sponest.lawenforcement.lawCase.mapper.LawenforcementAttachMapper">
+
+    <resultMap type="LawenforcementAttach" id="LawenforcementAttachResult">
+        <result property="id"    column="id"    />
+        <result property="busId"    column="bus_id"    />
+        <result property="fileName"    column="file_name"    />
+        <result property="attachPath"    column="attach_path"    />
+        <result property="describe"    column="describe"    />
+        <result property="attachSorts"    column="attach_sorts"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createName"    column="create_name"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateName"    column="update_name"    />
+    </resultMap>
+
+    <sql id="selectLawenforcementAttachVo">
+        select id, bus_id, file_name, attach_path, `describe`, attach_sorts, create_time, create_by, create_name, update_time, update_by, update_name from lawenforcement_attach
+    </sql>
+
+    <select id="selectLawenforcementAttachList" parameterType="LawenforcementAttach" resultMap="LawenforcementAttachResult">
+        <include refid="selectLawenforcementAttachVo"/>
+        <where>
+            <if test="busId != null  and busId != ''"> and bus_id = #{busId}</if>
+            <if test="fileName != null  and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
+            <if test="attachPath != null  and attachPath != ''"> and attach_path = #{attachPath}</if>
+            <if test="describe != null  and describe != ''"> and describe = #{describe}</if>
+            <if test="attachSorts != null "> and attach_sorts = #{attachSorts}</if>
+            <if test="createName != null  and createName != ''"> and create_name like concat('%', #{createName}, '%')</if>
+            <if test="updateName != null  and updateName != ''"> and update_name like concat('%', #{updateName}, '%')</if>
+        </where>
+    </select>
+
+    <select id="selectLawenforcementAttachById" parameterType="Long" resultMap="LawenforcementAttachResult">
+        <include refid="selectLawenforcementAttachVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertLawenforcementAttach" parameterType="LawenforcementAttach">
+        insert into lawenforcement_attach
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="busId != null">bus_id,</if>
+            <if test="fileName != null">file_name,</if>
+            <if test="attachPath != null">attach_path,</if>
+            <if test="describe != null">`describe`,</if>
+            <if test="attachSorts != null">attach_sorts,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createName != null">create_name,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateName != null">update_name,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="busId != null">#{busId},</if>
+            <if test="fileName != null">#{fileName},</if>
+            <if test="attachPath != null">#{attachPath},</if>
+            <if test="describe != null">#{describe},</if>
+            <if test="attachSorts != null">#{attachSorts},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createName != null">#{createName},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateName != null">#{updateName},</if>
+         </trim>
+    </insert>
+
+    <update id="updateLawenforcementAttach" parameterType="LawenforcementAttach">
+        update lawenforcement_attach
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="busId != null">bus_id = #{busId},</if>
+            <if test="fileName != null">file_name = #{fileName},</if>
+            <if test="attachPath != null">attach_path = #{attachPath},</if>
+            <if test="describe != null">describe = #{describe},</if>
+            <if test="attachSorts != null">attach_sorts = #{attachSorts},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createName != null">create_name = #{createName},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateName != null">update_name = #{updateName},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteLawenforcementAttachById" parameterType="Long">
+        delete from lawenforcement_attach where id = #{id}
+    </delete>
+
+    <delete id="deleteLawenforcementAttachByIds" parameterType="String">
+        delete from lawenforcement_attach where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+    <delete id="deleteByBusId" parameterType="String">
+        delete from lawenforcement_attach where bus_id = #{busId}
+    </delete>
+</mapper>

+ 99 - 0
src/main/resources/mapper/lawenforcement/LawenforcementCaseLogMapper.xml

@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.sooka.sponest.lawenforcement.lawCase.mapper.LawenforcementCaseLogMapper">
+
+    <resultMap type="LawenforcementCaseLog" id="LawenforcementCaseLogResult">
+        <result property="id"    column="id"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createName"    column="create_name"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="deptId"    column="dept_id"    />
+        <result property="deptName"    column="dept_name"    />
+        <result property="caseId"    column="case_id"    />
+        <result property="content"    column="content"    />
+        <result property="state"    column="state"    />
+    </resultMap>
+
+    <sql id="selectLawenforcementCaseLogVo">
+        select id, create_by, create_name, create_time,dept_id, dept_name, case_id, content, state from lawenforcement_case_log
+    </sql>
+
+    <select id="selectLawenforcementCaseLogList" parameterType="LawenforcementCaseLog" resultMap="LawenforcementCaseLogResult">
+        <include refid="selectLawenforcementCaseLogVo"/>
+        <where>
+            <if test="createName != null  and createName != ''"> and create_name like concat('%', #{createName}, '%')</if>
+            <if test="caseId != null  and caseId != ''"> and case_id = #{caseId}</if>
+            <if test="content != null  and content != ''"> and content = #{content}</if>
+            <if test="state != null  and state != ''"> and state = #{state}</if>
+        </where>
+    </select>
+
+    <select id="selectLawenforcementCaseLogById" parameterType="String" resultMap="LawenforcementCaseLogResult">
+        <include refid="selectLawenforcementCaseLogVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertLawenforcementCaseLog" parameterType="LawenforcementCaseLog">
+        insert into lawenforcement_case_log
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null and id != ''">id,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createName != null">create_name,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="deptId != null">dept_id,</if>
+            <if test="deptName != null">dept_name,</if>
+            <if test="caseId != null">case_id,</if>
+            <if test="content != null">content,</if>
+            <if test="state != null">state,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null and id != ''">#{id},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createName != null">#{createName},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="deptId != null">#{deptId},</if>
+            <if test="deptName != null">#{deptName},</if>
+            <if test="caseId != null">#{caseId},</if>
+            <if test="content != null">#{content},</if>
+            <if test="state != null">#{state},</if>
+         </trim>
+    </insert>
+
+    <update id="updateLawenforcementCaseLog" parameterType="LawenforcementCaseLog">
+        update lawenforcement_case_log
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createName != null">create_name = #{createName},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="deptName != null">dept_name = #{deptName},</if>
+            <if test="caseId != null">case_id = #{caseId},</if>
+            <if test="content != null">content = #{content},</if>
+            <if test="state != null">state = #{state},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteLawenforcementCaseLogById" parameterType="String">
+        delete from lawenforcement_case_log where id = #{id}
+    </delete>
+
+    <delete id="deleteLawenforcementCaseLogByIds" parameterType="String">
+        delete from lawenforcement_case_log where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+    <select id="getLogByCaseId" parameterType="String" resultMap="LawenforcementCaseLogResult">
+        <include refid="selectLawenforcementCaseLogVo"/>
+        where case_id = #{id} order by create_time desc
+    </select>
+
+    <select id="getCaseLog" parameterType="LawenforcementCase" resultType="java.lang.Integer">
+        select count(id) from lawenforcement_case_log
+        where dept_id = #{deptId} and case_id = #{id} and (state = 'state_4' or state = 'state_5')
+    </select>
+</mapper>

+ 131 - 0
src/main/resources/mapper/lawenforcement/LawenforcementCaseMapper.xml

@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.sooka.sponest.lawenforcement.lawCase.mapper.LawenforcementCaseMapper">
+
+    <resultMap type="LawenforcementCase" id="LawenforcementCaseResult">
+        <result property="id"    column="id"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createName"    column="create_name"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateName"    column="update_name"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="deptId"    column="dept_id"    />
+        <result property="deptName"    column="dept_name"    />
+        <result property="recordId"    column="record_id"    />
+        <result property="caseName"    column="case_name"    />
+        <result property="caseNumber"    column="case_number"    />
+        <result property="punishTarget"    column="punish_target"    />
+        <result property="punishType"    column="punish_type"    />
+        <result property="describe"    column="describe"    />
+        <result property="dataOne"    column="data_one"    />
+        <result property="uploadOne"    column="upload_one"    />
+        <result property="dataTwo"    column="data_two"    />
+        <result property="uploadTwo"    column="upload_two"    />
+        <result property="dataThree"    column="data_three"    />
+        <result property="uploadThree"    column="upload_three"    />
+        <result property="state"    column="state"    />
+    </resultMap>
+
+    <sql id="selectLawenforcementCaseVo">
+        select a.id, a.create_by, a.create_name, a.create_time, a.update_by, a.update_name, a.update_time, a.dept_id, a.dept_name, a.record_id, a.case_name, a.case_number,
+               a.punish_target, a.punish_type, a.describe, a.state from lawenforcement_case a
+    </sql>
+
+    <select id="selectLawenforcementCaseList" parameterType="LawenforcementCase" resultMap="LawenforcementCaseResult">
+        <include refid="selectLawenforcementCaseVo"/>
+        left join ${database_system}.sys_dept d on d.dept_id = a.dept_id
+        <where>
+            <if test="deptName != null  and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="recordId != null  and recordId != ''"> and record_id = #{recordId}</if>
+            <if test="caseName != null  and caseName != ''"> and case_name like concat('%', #{caseName}, '%')</if>
+            <if test="caseNumber != null  and caseNumber != ''"> and case_number like concat('%', #{caseNumber}, '%') </if>
+            <if test="punishTarget != null  and punishTarget != ''"> and punish_target = #{punishTarget}</if>
+            <if test="punishType != null  and punishType != ''"> and punish_type = #{punishType}</if>
+            <if test="describe != null  and describe != ''"> and `describe` = #{describe}</if>
+            <if test="state != null  and state != ''"> and state = #{state}</if>
+            ${params.dataScope}
+        </where>
+        order by a.create_time desc
+    </select>
+
+    <select id="selectLawenforcementCaseById" parameterType="String" resultMap="LawenforcementCaseResult">
+        <include refid="selectLawenforcementCaseVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertLawenforcementCase" parameterType="LawenforcementCase">
+        insert into lawenforcement_case
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null and id != ''">id,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createName != null">create_name,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateName != null">update_name,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="deptId != null">dept_id,</if>
+            <if test="deptName != null">dept_name,</if>
+            <if test="recordId != null">record_id,</if>
+            <if test="caseName != null">case_name,</if>
+            <if test="caseNumber != null">case_number,</if>
+            <if test="punishTarget != null">punish_target,</if>
+            <if test="punishType != null">punish_type,</if>
+            <if test="describe != null">`describe`,</if>
+            <if test="state != null">state,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null and id != ''">#{id},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createName != null">#{createName},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateName != null">#{updateName},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="deptId != null">#{deptId},</if>
+            <if test="deptName != null">#{deptName},</if>
+            <if test="recordId != null">#{recordId},</if>
+            <if test="caseName != null">#{caseName},</if>
+            <if test="caseNumber != null">#{caseNumber},</if>
+            <if test="punishTarget != null">#{punishTarget},</if>
+            <if test="punishType != null">#{punishType},</if>
+            <if test="describe != null">#{describe},</if>
+            <if test="state != null">#{state},</if>
+         </trim>
+    </insert>
+
+    <update id="updateLawenforcementCase" parameterType="LawenforcementCase">
+        update lawenforcement_case
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createName != null">create_name = #{createName},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateName != null">update_name = #{updateName},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="deptName != null">dept_name = #{deptName},</if>
+            <if test="recordId != null">record_id = #{recordId},</if>
+            <if test="caseName != null">case_name = #{caseName},</if>
+            <if test="caseNumber != null">case_number = #{caseNumber},</if>
+            <if test="punishTarget != null">punish_target = #{punishTarget},</if>
+            <if test="punishType != null">punish_type = #{punishType},</if>
+            <if test="describe != null">`describe` = #{describe},</if>
+            <if test="state != null">state = #{state},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteLawenforcementCaseById" parameterType="String">
+        delete from lawenforcement_case where id = #{id}
+    </delete>
+
+    <delete id="deleteLawenforcementCaseByIds" parameterType="String">
+        delete from lawenforcement_case where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>