Преглед на файлове

Merge branch 'hjb' of SH-Arbitrate/Arbitrate-Backend into dev

hejinbo преди 2 години
родител
ревизия
02a93bbd3f

+ 5
- 4
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseArbitrateController.java Целия файл

@@ -6,6 +6,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
6 6
 import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord;
7 7
 import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
8 8
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
9
+import com.ruoyi.wisdomarbitrate.domain.CaseIds;
9 10
 import com.ruoyi.wisdomarbitrate.service.ICaseArbitrateService;
10 11
 import org.springframework.beans.factory.annotation.Autowired;
11 12
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -35,12 +36,12 @@ public class CaseArbitrateController extends BaseController {
35 36
 
36 37
     /**
37 38
      * 书面审理
38
-     * @param arbitrateRecord
39
+     * @param
39 40
      * @return
40 41
      */
41 42
     @PostMapping("/writtenHear")
42
-    public AjaxResult writtenHear(@Validated @RequestBody ArbitrateRecord arbitrateRecord){
43
-        arbitrateRecord.setCreateBy(getUsername());
44
-        return caseArbitrateService.writtenHear(arbitrateRecord);
43
+    public AjaxResult writtenHear(@RequestBody CaseIds caseIds){
44
+        return  caseArbitrateService.writtenHear(caseIds);
45
+
45 46
     }
46 47
 }

+ 71
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/MyTest.java Целия файл

@@ -0,0 +1,71 @@
1
+package com.ruoyi.web.controller.wisdomarbitrate;
2
+
3
+import com.google.gson.Gson;
4
+import com.google.gson.JsonArray;
5
+import com.google.gson.JsonObject;
6
+import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
7
+import com.ruoyi.common.exception.EsignDemoException;
8
+import com.ruoyi.wisdomarbitrate.domain.DeptIdentify;
9
+import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
10
+import com.ruoyi.wisdomarbitrate.mapper.CaseAttachMapper;
11
+import com.ruoyi.wisdomarbitrate.mapper.DeptIdentifyMapper;
12
+import com.ruoyi.wisdomarbitrate.mapper.SealSignRecordMapper;
13
+import com.ruoyi.wisdomarbitrate.utils.SignAward;
14
+import org.springframework.beans.factory.annotation.Autowired;
15
+import org.springframework.web.bind.annotation.GetMapping;
16
+import org.springframework.web.bind.annotation.RequestMapping;
17
+import org.springframework.web.bind.annotation.RestController;
18
+
19
+import java.util.List;
20
+
21
+@RestController
22
+@RequestMapping
23
+public class MyTest {
24
+    @Autowired
25
+    private CaseApplicationMapper caseApplicationMapper;
26
+    @Autowired
27
+    private SealSignRecordMapper sealSignRecordMapper;
28
+    @Autowired
29
+    private CaseAttachMapper caseAttachMapper;
30
+    @Autowired
31
+    private DeptIdentifyMapper deptIdentifyMapper;
32
+    @GetMapping("/test")
33
+    public void myTest() throws EsignDemoException {
34
+        Gson gson = new Gson();
35
+        DeptIdentify deptIdentify = new DeptIdentify();
36
+        deptIdentify.setIdentifyStatus(0);
37
+        List<DeptIdentify> deptIdentifysnew = deptIdentifyMapper.selectDeptIdentifylist(deptIdentify);
38
+        if (deptIdentifysnew != null && deptIdentifysnew.size() > 0) {
39
+            for (int i = 0; i < deptIdentifysnew.size(); i++) {
40
+                EsignHttpResponse identifyInfo = SignAward.getDeptIdentifyInfo(deptIdentifysnew.get(i));
41
+                JsonObject identifyInfoJsonObject = gson.fromJson(identifyInfo.getBody(), JsonObject.class);
42
+                JsonObject identifyInfoData = identifyInfoJsonObject.getAsJsonObject("data");
43
+                int realnameStatus = identifyInfoData.get("realnameStatus").getAsInt();
44
+                if (realnameStatus == 1) {
45
+                    String orgId = identifyInfoData.get("orgId").getAsString();
46
+                    System.out.println("这是orgId"+orgId+"=======================");
47
+                    EsignHttpResponse identifyInfo1 = SignAward.deptIdentifySealList(orgId);
48
+                    //将orgId保存到数据库里
49
+                    DeptIdentify deptIdentifynew = deptIdentifysnew.get(i);
50
+                    deptIdentifynew.setOrgId(orgId);
51
+                    JsonObject identifyInfoJsonObject1 = gson.fromJson(identifyInfo1.getBody(), JsonObject.class);
52
+                    JsonObject identifyInfoData1 = identifyInfoJsonObject1.getAsJsonObject("data");
53
+                    JsonArray sealArray = identifyInfoData1.get("seals").getAsJsonArray();
54
+                    String sealNames = "";
55
+                    if (sealArray.size() > 0) {
56
+                        for (int j = 0; j < sealArray.size(); j++) {
57
+                            JsonObject sealObject = (JsonObject) sealArray.get(j);
58
+                            String sealName = sealObject.get("sealName").toString();
59
+                            String sealNamenew = sealName.substring(1, sealName.length() - 1);
60
+                            sealNames += sealNamenew + ",";
61
+                        }
62
+                    }
63
+                    String sealName = sealNames.substring(0, sealNames.length() - 1);
64
+                    deptIdentifynew.setIdentifyStatus(1);
65
+                    deptIdentifynew.setSealName(sealName);
66
+                    int row = deptIdentifyMapper.updateDeptIdentify(deptIdentifynew);
67
+                }
68
+            }
69
+        }
70
+    }
71
+}

+ 1
- 1
ruoyi-admin/src/main/resources/application-druid.yml Целия файл

@@ -6,7 +6,7 @@ spring:
6 6
         druid:
7 7
             # 主库数据源
8 8
             master:
9
-                url: jdbc:mysql://121.40.189.20:3306/test_smart_arbitration?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=Asia/Shanghai&useSSL=false
9
+                url: jdbc:mysql://121.40.189.20:3306/smart_arbitration?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=Asia/Shanghai&useSSL=false
10 10
                 username: root
11 11
                 password: YMzc157#
12 12
             # 从库数据源

+ 3
- 3
ruoyi-admin/src/main/resources/application.yml Целия файл

@@ -18,7 +18,7 @@ ruoyi:
18 18
 # 开发环境配置
19 19
 server:
20 20
   # 服务器的HTTP端口,默认为8080
21
-  port: 8001
21
+  port: 9001
22 22
   servlet:
23 23
     # 应用的访问路径
24 24
     context-path: /
@@ -176,6 +176,6 @@ identityAuthentication:
176 176
 # 腾讯云即时通信相关配置
177 177
 imConfig:
178 178
   # sdkAppId
179
-  sdkAppId: 1600012141
179
+  sdkAppId: 1600011167
180 180
   # 密钥
181
-  secretKey: 6075dc0ad9ae26d4186bfdffc192c649f2826140c84974f2e2b882997fcc8a54
181
+  secretKey: 17d136d9327576a247f991bdfed3a6d14cebc7d540a52245086829c3a1421a86

+ 9
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseIds.java Целия файл

@@ -0,0 +1,9 @@
1
+package com.ruoyi.wisdomarbitrate.domain;
2
+
3
+import lombok.Data;
4
+
5
+import java.util.List;
6
+@Data
7
+public class CaseIds {
8
+    private List<Long> ids;
9
+}

+ 2
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseArbitrateService.java Целия файл

@@ -4,13 +4,14 @@ import com.ruoyi.common.core.domain.AjaxResult;
4 4
 import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord;
5 5
 import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
6 6
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
7
+import com.ruoyi.wisdomarbitrate.domain.CaseIds;
7 8
 
8 9
 import java.util.List;
9 10
 
10 11
 public interface ICaseArbitrateService {
11 12
 
12 13
 
13
-    AjaxResult writtenHear(ArbitrateRecord arbitrateRecord);
14
+    AjaxResult  writtenHear(CaseIds caseIds);
14 15
 
15 16
     AjaxResult examineArbitrateMethod(CaseApplication caseApplication, Integer opinion);
16 17
 }

+ 48
- 160
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseArbitrateServiceImpl.java Целия файл

@@ -147,177 +147,63 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
147 147
 
148 148
     @Override
149 149
     @Transactional
150
-    public AjaxResult writtenHear(ArbitrateRecord arbitrateRecord) {
151
-        //查询案件详情
152
-        CaseApplication caseApplication = new CaseApplication();
153
-        caseApplication.setId(arbitrateRecord.getCaseAppliId());
154
-        CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
155
-        String createBy = arbitrateRecord.getCreateBy();
156
-
157
-        //先判断案件是否已经提交过仲裁结果
158
-        ArbitrateRecord arbitrateRecord1 = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecord);
159
-        if (arbitrateRecord1 != null) {
160
-            int i = arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord);
161
-            if (i > 0) {
162
-                //案件日志表里添加数据
163
-                CaseLogRecord caseLogRecord = new CaseLogRecord();
164
-                caseLogRecord.setCaseAppliId(caseApplication1.getId());
165
-                caseLogRecord.setCaseNode(caseApplication1.getCaseStatus());
166
-                if (createBy != null) {
167
-                    caseLogRecord.setCreateBy(createBy);
168
-                }
169
-                caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
170
-                // 新增日志
171
-                CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.GENERATED_ARBITRATION, "");
172
-
173
-            }
174
-        } else {
175
-            //提交仲裁结果
176
-            int i = arbitrateRecordMapper.insertArbitrateRecord(arbitrateRecord);
177
-            if (i > 0) {
178
-                //案件日志表里添加数据
179
-                CaseLogRecord caseLogRecord = new CaseLogRecord();
180
-                caseLogRecord.setCaseAppliId(caseApplication1.getId());
181
-                caseLogRecord.setCaseNode(caseApplication1.getCaseStatus());
182
-                if (createBy != null) {
183
-                    caseLogRecord.setCreateBy(createBy);
184
-                }
185
-                caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
186
-                // 新增日志
187
-                CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.GENERATED_ARBITRATION, "");
188
-            }
189
-        }
190
-            Boolean aBoolean1 = generateAward(arbitrateRecord);
191
-            if (aBoolean1) {
192
-                //修改案件状态
193
-                caseApplication1.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
194
-                int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
195
-                if (i > 0) {
196
-                    return AjaxResult.success("审理成功");
197
-                }
198
-            }
199
-        return AjaxResult.error("裁决书生成有误");
200
-    }
201
-
150
+    public AjaxResult writtenHear(CaseIds caseIds) {
151
+        if (caseIds!=null){
152
+            List<Long> ids = caseIds.getIds();
153
+            for (Long caseId : ids) {
154
+                //查询案件详情
155
+                CaseApplication caseApplication = new CaseApplication();
156
+                caseApplication.setId(caseId);
157
+                CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
158
+                //先判断案件是否已经提交过仲裁结果
159
+                ArbitrateRecord arbitrateRecord = new ArbitrateRecord();
160
+                arbitrateRecord.setCaseAppliId(caseId);
161
+                ArbitrateRecord arbitrateRecord1 = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecord);
162
+                if (arbitrateRecord1 != null) {
163
+                    int i = arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord);
164
+                    if (i > 0) {
165
+                        //案件日志表里添加数据
166
+                        CaseLogRecord caseLogRecord = new CaseLogRecord();
167
+                        caseLogRecord.setCaseAppliId(caseApplication1.getId());
168
+                        caseLogRecord.setCaseNode(caseApplication1.getCaseStatus());
169
+                        caseLogRecord.setCreateBy(getUsername());
170
+                        caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
171
+                        // 新增日志
172
+                        CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.GENERATED_ARBITRATION, "");
202 173
 
203
-    //生成庭审笔录
204
-    private Boolean generateTrialTranscripts(ArbitrateRecord arbitrateRecord) {
205
-        try {
206
-            Map<String, Object> datas = new HashMap<>();
207
-            Long id = arbitrateRecord.getCaseAppliId();
208
-            CaseApplication caseApplication = new CaseApplication();
209
-            caseApplication.setId(id);
210
-            CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
211
-            //获取案件关联人信息
212
-            CaseAffiliate caseAffiliate = new CaseAffiliate();
213
-            caseAffiliate.setCaseAppliId(id);
214
-            List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
215
-            if (caseAffiliates != null && caseAffiliates.size() > 0) {
216
-                for (CaseAffiliate affiliate : caseAffiliates) {
217
-                    //获取身份类型
218
-                    int identityType = affiliate.getIdentityType();
219
-                    if (identityType == 1) {    //申请人
220
-                        datas.put("appName", affiliate.getName());
221
-                        datas.put("appIDNo", affiliate.getIdentityNum());
222
-                        datas.put("appAddress", affiliate.getContactAddress());
223
-                        datas.put("appAgentName", affiliate.getNameAgent());
224
-                        datas.put("appAgentIDNo", affiliate.getIdentityNumAgent());
225
-                    } else if (identityType == 2) {  //被申请人
226
-                        datas.put("resName", affiliate.getName());
227
-                        datas.put("resIDNo", affiliate.getIdentityNum());
228
-                        datas.put("resAddress", affiliate.getContactAddress());
229
-                        datas.put("resAgentName", affiliate.getNameAgent());
230
-                        datas.put("resAgentIDNo", affiliate.getIdentityNumAgent());
231 174
                     }
232
-                }
233
-            }
234
-            String arbitratorName = caseApplication1.getArbitratorName();
235
-            datas.put("caseName", caseApplication1.getCaseName());
236
-            datas.put("arbitratorName", arbitratorName);
237
-            Date hearDate = caseApplication1.getHearDate();
238
-            if (hearDate != null) {
239
-                LocalDate localDate = hearDate.toInstant()
240
-                        .atZone(ZoneId.systemDefault())
241
-                        .toLocalDate();
242
-                datas.put("hearYear", localDate.getYear());
243
-                datas.put("hearMonths", localDate.getMonthValue());
244
-                datas.put("hearDay", localDate.getDayOfMonth());
245
-            } else {
246
-                datas.put("hearYear", null);
247
-                datas.put("hearMonths", null);
248
-                datas.put("hearDay", null);
249
-            }
250
-            datas.put("appArbitrationClaims", caseApplication1.getArbitratClaims());
251
-            datas.put("evidenDetermi", arbitrateRecord.getEvidenDetermi());
252
-            datas.put("factDetermi", arbitrateRecord.getFactDetermi());
253
-            datas.put("caseSketch", arbitrateRecord.getCaseSketch());
254
-            datas.put("arbitrateThink", arbitrateRecord.getArbitrateThink());
255
-            datas.put("rulingFollows", arbitrateRecord.getRulingFollows());
256
-            datas.put("legalProvisions", "仲裁法");
257
-            LocalDate now = LocalDate.now();
258
-            String year = Integer.toString(now.getYear());
259
-            String month = String.format("%02d", now.getMonthValue());
260
-            String day = String.format("%02d", now.getDayOfMonth());
261
-            datas.put("year", year);
262
-            datas.put("months", month);
263
-            datas.put("day", day);
264
-            String modalFilePath = "/data/arbitrate-document/template/仲裁裁决书模板.docx";
265
-            //String modalFilePath = "D:/develop/仲裁裁决书模板 (2).docx";
266
-            String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
267
-            //String saveFolderPath = "D:/data/" + now.getYear() + "/" + now.getMonthValue() + "/" + now.getDayOfMonth();
268
-            String fileName = UUID.randomUUID().toString().replace("-", "") + ".docx";
269
-            String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
270
-            String resultFilePath = saveFolderPath + "/" + fileName;
271
-            // 创建日期目录
272
-            File saveFolder = new File(saveFolderPath);
273
-            if (!saveFolder.exists()) {
274
-                saveFolder.mkdirs();
275
-            }
276
-            Path sourcePath = new File(modalFilePath).toPath();
277
-            Path destinationPath = new File(resultFilePath).toPath();
278
-            Files.copy(sourcePath, destinationPath, StandardCopyOption.REPLACE_EXISTING);
279
-            String docFilePath = WordUtil.getDocFilePath(datas, modalFilePath, resultFilePath);
280
-            String savePath = docFilePath.substring(0, docFilePath.indexOf("/upload/") + 8);
281
-            CaseAttach caseAttach = CaseAttach.builder()
282
-                    .caseAppliId(id)
283
-                    .annexName(saveName)
284
-                    .annexPath(savePath)
285
-                    .annexType(7)
286
-                    .build();
287
-            //保存到附件表里,先判断之前有没有,有的话更新,没有的话新增
288
-            CaseAttach caseAttach1 = new CaseAttach();
289
-            caseAttach1.setAnnexType(7);
290
-            caseAttach1.setCaseAppliId(id);
291
-            List<CaseAttach> caseAttachList = caseAttachMapper.getCaseAttachByCaseIdAndType(caseAttach1);
292
-            if (caseAttachList != null && caseAttachList.size() > 0) {
293
-                //之前已经生成过了,更新
294
-                caseAttachMapper.updateCaseAttachBycaseid(caseAttach);
295
-            } else {
296
-                //之前没生成过,新增
297
-                int i = caseAttachMapper.save(caseAttach);
298
-                ArbitrateRecord arbitrateRecord1 = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecord);
299
-                if (i > 0) {
300
-                    if (arbitrateRecord1 != null) {
301
-                        Integer annexId = caseAttach.getAnnexId();
302
-                        //将附件id保存到仲裁记录表里面
303
-                        arbitrateRecord1.setAnnexId(annexId);
304
-                        arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord1);
175
+                } else {
176
+                    //提交仲裁结果
177
+                    int i = arbitrateRecordMapper.insertArbitrateRecord(arbitrateRecord);
178
+                    if (i > 0) {
179
+                        //案件日志表里添加数据
180
+                        CaseLogRecord caseLogRecord = new CaseLogRecord();
181
+                        caseLogRecord.setCaseAppliId(caseApplication1.getId());
182
+                        caseLogRecord.setCaseNode(caseApplication1.getCaseStatus());
183
+                        caseLogRecord.setCreateBy(getUsername());
184
+                        caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
185
+                        // 新增日志
186
+                        CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.GENERATED_ARBITRATION, "");
305 187
                     }
306 188
                 }
189
+                Boolean aBoolean1 = generateAward(caseId);
190
+                if (aBoolean1) {
191
+                    //修改案件状态
192
+                    caseApplication1.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
193
+                    int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
194
+                }else {
195
+                    return AjaxResult.error("裁决书生成失败");
196
+                }
307 197
             }
308
-            return Boolean.TRUE;
309
-
310
-        } catch (IOException e) {
311
-            e.printStackTrace();
312
-            return Boolean.FALSE;
198
+            return AjaxResult.success("审理成功");
313 199
         }
200
+        return AjaxResult.error("请检查参数");
314 201
     }
315 202
 
316 203
     //生成仲裁文书
317
-    private Boolean generateAward(ArbitrateRecord arbitrateRecord) {
204
+    private Boolean generateAward(Long id) {
318 205
         try {
319 206
             Map<String, Object> datas = new HashMap<>();
320
-            Long id = arbitrateRecord.getCaseAppliId();
321 207
             if (id == null) {
322 208
                 return null;
323 209
             }
@@ -329,6 +215,8 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
329 215
             String equipmentNo = getNewEquipmentNo();
330 216
             datas.put("num", equipmentNo);
331 217
             //获取仲裁记录表里的相关信息
218
+            ArbitrateRecord arbitrateRecord = new ArbitrateRecord();
219
+            arbitrateRecord.setCaseAppliId(id);
332 220
             ArbitrateRecord arbitrateRecord1 = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecord);
333 221
             //获取案件关联人信息
334 222
             CaseAffiliate caseAffiliate = new CaseAffiliate();

+ 2
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/FixSelectFlowDetailUtils.java Целия файл

@@ -186,6 +186,7 @@ public class FixSelectFlowDetailUtils {
186 186
                 int realnameStatus = identifyInfoData.get("realnameStatus").getAsInt();
187 187
                 if (realnameStatus == 1) {
188 188
                     String orgId = identifyInfoData.get("orgId").getAsString();
189
+                    System.out.println("这是orgId"+orgId+"=======================");
189 190
                     EsignHttpResponse identifyInfo1 = SignAward.deptIdentifySealList(orgId);
190 191
                     //将orgId保存到数据库里
191 192
                     DeptIdentify deptIdentifynew = deptIdentifysnew.get(i);
@@ -355,6 +356,7 @@ public class FixSelectFlowDetailUtils {
355 356
             }
356 357
         }
357 358
     }*/
359
+
358 360
 }
359 361
 
360 362
 

+ 2
- 1
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/DeptIdentifyMapper.xml Целия файл

@@ -101,12 +101,13 @@
101 101
             <if test="isUse != null">is_use = #{isUse},</if>
102 102
             <if test="identifyStatus != null ">identify_status = #{identifyStatus},</if>
103 103
             <if test="sealName != null  and sealName != ''">seal_name = #{sealName},</if>
104
+            <if test="orgId != null  and orgId != ''">org_id = #{orgId},</if>
104 105
             <if test="sealId != null  and sealId != ''">seal_id = #{sealId},</if>
105 106
             <if test="sealStatus != null ">seal_status = #{sealStatus},</if>
106 107
         </set>
107 108
         <where>
108 109
             <if test="id != null">
109
-                AND d.id = #{id}
110
+                AND id = #{id}
110 111
             </if>
111 112
             <if test="sealId != null">
112 113
                 AND seal_id = #{sealId}