Просмотр исходного кода

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

qtz 2 лет назад
Родитель
Сommit
d38737f642

+ 108
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationController.java Просмотреть файл

1
+package com.ruoyi.web.controller.wisdomarbitrate;
2
+
3
+import com.ruoyi.common.annotation.Log;
4
+import com.ruoyi.common.core.controller.BaseController;
5
+import com.ruoyi.common.core.domain.AjaxResult;
6
+import com.ruoyi.common.core.domain.entity.SysUser;
7
+import com.ruoyi.common.core.page.TableDataInfo;
8
+import com.ruoyi.common.enums.BusinessType;
9
+import com.ruoyi.common.utils.SecurityUtils;
10
+import com.ruoyi.common.utils.StringUtils;
11
+import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
12
+import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
13
+import org.apache.commons.lang3.ArrayUtils;
14
+import org.springframework.beans.factory.annotation.Autowired;
15
+import org.springframework.security.access.prepost.PreAuthorize;
16
+import org.springframework.validation.annotation.Validated;
17
+import org.springframework.web.bind.annotation.*;
18
+
19
+import java.util.List;
20
+
21
+import static com.ruoyi.common.core.domain.AjaxResult.error;
22
+
23
+
24
+@RestController
25
+@RequestMapping("/caseApplication")
26
+public class CaseApplicationController  extends BaseController {
27
+    @Autowired
28
+    private ICaseApplicationService caseApplicationService;
29
+
30
+    /**
31
+     * 查询立案数据
32
+     */
33
+    @PreAuthorize("@ss.hasPermi('caseApplication:list')")
34
+    @PostMapping("/list")
35
+    public TableDataInfo list(@Validated @RequestBody CaseApplication caseApplication)
36
+    {
37
+        startPage();
38
+        List<CaseApplication> list = caseApplicationService.selectCaseApplicationList(caseApplication);
39
+        return getDataTable(list);
40
+    }
41
+
42
+    /**
43
+     * 新增立案数据
44
+     */
45
+    @PreAuthorize("@ss.hasPermi('caseApplication:add')")
46
+    @Log(title = "新增立案数据", businessType = BusinessType.INSERT)
47
+    @PostMapping("/addCaseApplication")
48
+    public AjaxResult addCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
49
+    {
50
+        int caseApplicationCount = caseApplicationService.selectCaseApplicationCount(caseApplication);
51
+        if(caseApplicationCount>0){
52
+            return error("新增立案申请'" + caseApplication.getCaseNum() + "'案件编号已存在");
53
+        }
54
+        caseApplication.setCreateBy(getUsername());
55
+        return toAjax(caseApplicationService.insertcaseApplication(caseApplication));
56
+    }
57
+
58
+    /**
59
+     * 修改立案数据
60
+     */
61
+    @PreAuthorize("@ss.hasPermi('caseApplication:edit')")
62
+    @Log(title = "修改立案数据", businessType = BusinessType.UPDATE)
63
+    @PostMapping("/editCaseApplication")
64
+    public AjaxResult editCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
65
+    {
66
+
67
+        caseApplication.setUpdateBy(getUsername());
68
+        return toAjax(caseApplicationService.editCaseApplication(caseApplication));
69
+    }
70
+
71
+    /**
72
+     * 提交立案数据
73
+     */
74
+    @PreAuthorize("@ss.hasPermi('caseApplication:submit')")
75
+    @Log(title = "提交立案数据", businessType = BusinessType.UPDATE)
76
+    @PostMapping("/submitCaseApplication")
77
+    public AjaxResult submitCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
78
+    {
79
+
80
+        return toAjax(caseApplicationService.submitCaseApplication(caseApplication));
81
+    }
82
+
83
+    /**
84
+     * 删除立案数据
85
+     */
86
+    @PreAuthorize("@ss.hasPermi('caseApplication:remove')")
87
+    @Log(title = "删除立案数据", businessType = BusinessType.DELETE)
88
+    @PostMapping("/removeCaseApplication")
89
+    public AjaxResult removeCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
90
+    {
91
+
92
+        return toAjax(caseApplicationService.deletecaseApplicationByIds(caseApplication));
93
+    }
94
+
95
+    /**
96
+     * 查询立案信息
97
+     */
98
+    @PostMapping("/selectCaseApplication")
99
+    public AjaxResult selectCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
100
+    {
101
+        CaseApplication caseApplicationselect = caseApplicationService.selectCaseApplication(caseApplication);
102
+        return success(caseApplicationselect);
103
+    }
104
+
105
+
106
+
107
+
108
+}

+ 23
- 0
ruoyi-common/src/main/java/com/ruoyi/common/constant/CaseApplicationConstants.java Просмотреть файл

1
+package com.ruoyi.common.constant;
2
+/**
3
+ * 立案申请案件状态
4
+ *
5
+ */
6
+public class CaseApplicationConstants {
7
+    /** 立案申请 */
8
+    public static final int CASE_APPLICATION = 0;
9
+    /** 待缴费 */
10
+    public static final int PENDING_PAYMENT = 1;
11
+    /** 待缴费确认  */
12
+    public static final int PENDING_PAYMENT_CONFIRM = 2;
13
+    /** 待确认证据  */
14
+    public static final int EVIDENCE_CONFREMED = 3;
15
+    /** 待组庭  */
16
+    public static final int PENDING_TRIAL = 4;
17
+
18
+
19
+
20
+
21
+
22
+
23
+}

+ 150
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseAffiliate.java Просмотреть файл

1
+package com.ruoyi.wisdomarbitrate.domain;
2
+
3
+import com.ruoyi.common.annotation.Excel;
4
+import com.ruoyi.common.core.domain.BaseEntity;
5
+
6
+public class CaseAffiliate   extends BaseEntity {
7
+    private static final long serialVersionUID = 1L;
8
+    /** ID */
9
+    @Excel(name = "ID", cellType = Excel.ColumnType.NUMERIC, prompt = "ID")
10
+    private Long id;
11
+    /** 案件申请id */
12
+    private Long caseAppliId;
13
+    /** 身份类型 */
14
+    private int identityType;
15
+    /** 姓名 */
16
+    @Excel(name = "姓名")
17
+    private String name;
18
+    /** 身份证号 */
19
+    @Excel(name = "身份证号")
20
+    private String identityNum;
21
+    /** 单位电话 */
22
+    @Excel(name = "单位电话")
23
+    private String workTelphone;
24
+    /** 联系电话 */
25
+    @Excel(name = "联系电话")
26
+    private String contactTelphone;
27
+    /** 联系地址 */
28
+    @Excel(name = "联系地址")
29
+    private String contactAddress;
30
+    /** 单位地址 */
31
+    @Excel(name = "单位地址")
32
+    private String workAddress;
33
+
34
+    /** 代理人姓名 */
35
+    @Excel(name = "代理人姓名")
36
+    private String nameAgent;
37
+    /** 身份证号 */
38
+    @Excel(name = "代理人身份证号")
39
+    private String identityNumAgent;
40
+    /** 联系电话 */
41
+    @Excel(name = "代理人联系电话")
42
+    private String contactTelphoneAgent;
43
+    /** 联系地址 */
44
+    @Excel(name = "代理人联系地址")
45
+    private String contactAddressAgent;
46
+
47
+    public String getNameAgent() {
48
+        return nameAgent;
49
+    }
50
+
51
+    public void setNameAgent(String nameAgent) {
52
+        this.nameAgent = nameAgent;
53
+    }
54
+
55
+    public String getIdentityNumAgent() {
56
+        return identityNumAgent;
57
+    }
58
+
59
+    public void setIdentityNumAgent(String identityNumAgent) {
60
+        this.identityNumAgent = identityNumAgent;
61
+    }
62
+
63
+    public String getContactTelphoneAgent() {
64
+        return contactTelphoneAgent;
65
+    }
66
+
67
+    public void setContactTelphoneAgent(String contactTelphoneAgent) {
68
+        this.contactTelphoneAgent = contactTelphoneAgent;
69
+    }
70
+
71
+    public String getContactAddressAgent() {
72
+        return contactAddressAgent;
73
+    }
74
+
75
+    public void setContactAddressAgent(String contactAddressAgent) {
76
+        this.contactAddressAgent = contactAddressAgent;
77
+    }
78
+
79
+    public Long getId() {
80
+        return id;
81
+    }
82
+
83
+    public void setId(Long id) {
84
+        this.id = id;
85
+    }
86
+
87
+    public Long getCaseAppliId() {
88
+        return caseAppliId;
89
+    }
90
+
91
+    public void setCaseAppliId(Long caseAppliId) {
92
+        this.caseAppliId = caseAppliId;
93
+    }
94
+
95
+    public int getIdentityType() {
96
+        return identityType;
97
+    }
98
+
99
+    public void setIdentityType(int identityType) {
100
+        this.identityType = identityType;
101
+    }
102
+
103
+    public String getName() {
104
+        return name;
105
+    }
106
+
107
+    public void setName(String name) {
108
+        this.name = name;
109
+    }
110
+
111
+    public String getIdentityNum() {
112
+        return identityNum;
113
+    }
114
+
115
+    public void setIdentityNum(String identityNum) {
116
+        this.identityNum = identityNum;
117
+    }
118
+
119
+    public String getWorkTelphone() {
120
+        return workTelphone;
121
+    }
122
+
123
+    public void setWorkTelphone(String workTelphone) {
124
+        this.workTelphone = workTelphone;
125
+    }
126
+
127
+    public String getContactTelphone() {
128
+        return contactTelphone;
129
+    }
130
+
131
+    public void setContactTelphone(String contactTelphone) {
132
+        this.contactTelphone = contactTelphone;
133
+    }
134
+
135
+    public String getContactAddress() {
136
+        return contactAddress;
137
+    }
138
+
139
+    public void setContactAddress(String contactAddress) {
140
+        this.contactAddress = contactAddress;
141
+    }
142
+
143
+    public String getWorkAddress() {
144
+        return workAddress;
145
+    }
146
+
147
+    public void setWorkAddress(String workAddress) {
148
+        this.workAddress = workAddress;
149
+    }
150
+}

+ 218
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java Просмотреть файл

1
+package com.ruoyi.wisdomarbitrate.domain;
2
+
3
+import com.fasterxml.jackson.annotation.JsonFormat;
4
+import com.ruoyi.common.annotation.Excel;
5
+import com.ruoyi.common.core.domain.BaseEntity;
6
+import java.math.BigDecimal;
7
+import java.util.Date;
8
+import java.util.List;
9
+
10
+public class CaseApplication  extends BaseEntity {
11
+    private static final long serialVersionUID = 1L;
12
+
13
+    /** ID */
14
+    @Excel(name = "ID", cellType = Excel.ColumnType.NUMERIC, prompt = "ID")
15
+    private Long id;
16
+    /** 案件编号 */
17
+    @Excel(name = "案件编号")
18
+    private String caseNum;
19
+    /** 合同编号 */
20
+    @Excel(name = "合同编号")
21
+    private String contractNumber;
22
+    /** 案件标的 */
23
+    @Excel(name = "案件标的")
24
+    private BigDecimal caseSubjectAmount;
25
+    /** 立案日期 */
26
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
27
+    private Date registerDate;
28
+    /** 仲裁方式 */
29
+    private String arbitratMethod;
30
+    /** 案件状态 */
31
+    private int caseStatus;
32
+    /** 开庭日期 */
33
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
34
+    private Date hearDate;
35
+    /** 申请人仲裁诉求 */
36
+    private String arbitratClaims;
37
+    /** 借款开始日期 */
38
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
39
+    private Date loanStartDate;
40
+    /** 借款结束日期 */
41
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
42
+    private Date loanEndDate;
43
+    /** 申请人主张欠本金 */
44
+    @Excel(name = "申请人主张欠本金")
45
+    private BigDecimal claimPrinciOwed;
46
+    /** 申请人主张欠利息 */
47
+    @Excel(name = "申请人主张欠利息")
48
+    private BigDecimal claimInterestOwed;
49
+    /** 申请人主张违约金 */
50
+    @Excel(name = "申请人主张违约金")
51
+    private BigDecimal claimLiquidDamag;
52
+    /** 仲裁应缴费用 */
53
+    private BigDecimal feePayable;
54
+    /** 仲裁实缴费用 */
55
+    private BigDecimal paidExpenses;
56
+    /** 开始在线视频时间 */
57
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
58
+    private Date beginVideoDate;
59
+    /** 在线视频人员 */
60
+    private String onlineVideoPerson;
61
+
62
+    /** 案件关联人信息 */
63
+    private List<CaseAffiliate> caseAffiliates;
64
+
65
+
66
+
67
+    public Long getId() {
68
+        return id;
69
+    }
70
+
71
+    public void setId(Long id) {
72
+        this.id = id;
73
+    }
74
+
75
+    public String getCaseNum() {
76
+        return caseNum;
77
+    }
78
+
79
+    public void setCaseNum(String caseNum) {
80
+        this.caseNum = caseNum;
81
+    }
82
+
83
+    public String getContractNumber() {
84
+        return contractNumber;
85
+    }
86
+
87
+    public void setContractNumber(String contractNumber) {
88
+        this.contractNumber = contractNumber;
89
+    }
90
+
91
+    public BigDecimal getCaseSubjectAmount() {
92
+        return caseSubjectAmount;
93
+    }
94
+
95
+    public void setCaseSubjectAmount(BigDecimal caseSubjectAmount) {
96
+        this.caseSubjectAmount = caseSubjectAmount;
97
+    }
98
+
99
+    public Date getRegisterDate() {
100
+        return registerDate;
101
+    }
102
+
103
+    public void setRegisterDate(Date registerDate) {
104
+        this.registerDate = registerDate;
105
+    }
106
+
107
+    public String getArbitratMethod() {
108
+        return arbitratMethod;
109
+    }
110
+
111
+    public void setArbitratMethod(String arbitratMethod) {
112
+        this.arbitratMethod = arbitratMethod;
113
+    }
114
+
115
+    public int getCaseStatus() {
116
+        return caseStatus;
117
+    }
118
+
119
+    public void setCaseStatus(int caseStatus) {
120
+        this.caseStatus = caseStatus;
121
+    }
122
+
123
+    public Date getHearDate() {
124
+        return hearDate;
125
+    }
126
+
127
+    public void setHearDate(Date hearDate) {
128
+        this.hearDate = hearDate;
129
+    }
130
+
131
+    public String getArbitratClaims() {
132
+        return arbitratClaims;
133
+    }
134
+
135
+    public void setArbitratClaims(String arbitratClaims) {
136
+        this.arbitratClaims = arbitratClaims;
137
+    }
138
+
139
+    public Date getLoanStartDate() {
140
+        return loanStartDate;
141
+    }
142
+
143
+    public void setLoanStartDate(Date loanStartDate) {
144
+        this.loanStartDate = loanStartDate;
145
+    }
146
+
147
+    public Date getLoanEndDate() {
148
+        return loanEndDate;
149
+    }
150
+
151
+    public void setLoanEndDate(Date loanEndDate) {
152
+        this.loanEndDate = loanEndDate;
153
+    }
154
+
155
+    public BigDecimal getClaimPrinciOwed() {
156
+        return claimPrinciOwed;
157
+    }
158
+
159
+    public void setClaimPrinciOwed(BigDecimal claimPrinciOwed) {
160
+        this.claimPrinciOwed = claimPrinciOwed;
161
+    }
162
+
163
+    public BigDecimal getClaimInterestOwed() {
164
+        return claimInterestOwed;
165
+    }
166
+
167
+    public void setClaimInterestOwed(BigDecimal claimInterestOwed) {
168
+        this.claimInterestOwed = claimInterestOwed;
169
+    }
170
+
171
+    public BigDecimal getClaimLiquidDamag() {
172
+        return claimLiquidDamag;
173
+    }
174
+
175
+    public void setClaimLiquidDamag(BigDecimal claimLiquidDamag) {
176
+        this.claimLiquidDamag = claimLiquidDamag;
177
+    }
178
+
179
+    public BigDecimal getFeePayable() {
180
+        return feePayable;
181
+    }
182
+
183
+    public void setFeePayable(BigDecimal feePayable) {
184
+        this.feePayable = feePayable;
185
+    }
186
+
187
+    public BigDecimal getPaidExpenses() {
188
+        return paidExpenses;
189
+    }
190
+
191
+    public void setPaidExpenses(BigDecimal paidExpenses) {
192
+        this.paidExpenses = paidExpenses;
193
+    }
194
+
195
+    public Date getBeginVideoDate() {
196
+        return beginVideoDate;
197
+    }
198
+
199
+    public void setBeginVideoDate(Date beginVideoDate) {
200
+        this.beginVideoDate = beginVideoDate;
201
+    }
202
+
203
+    public String getOnlineVideoPerson() {
204
+        return onlineVideoPerson;
205
+    }
206
+
207
+    public void setOnlineVideoPerson(String onlineVideoPerson) {
208
+        this.onlineVideoPerson = onlineVideoPerson;
209
+    }
210
+
211
+    public List<CaseAffiliate> getCaseAffiliates() {
212
+        return caseAffiliates;
213
+    }
214
+
215
+    public void setCaseAffiliates(List<CaseAffiliate> caseAffiliates) {
216
+        this.caseAffiliates = caseAffiliates;
217
+    }
218
+}

+ 20
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAffiliateMapper.java Просмотреть файл

1
+package com.ruoyi.wisdomarbitrate.mapper;
2
+
3
+import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
4
+import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
5
+
6
+import java.util.List;
7
+
8
+public interface CaseAffiliateMapper {
9
+
10
+
11
+    int batchCaseAffiliate(List<CaseAffiliate> caseAffiliates);
12
+
13
+
14
+    void deletecaseAffiliate(CaseApplication caseApplication);
15
+
16
+
17
+    List<CaseAffiliate>  selectCaseAffiliate(CaseAffiliate caseAffiliate);
18
+
19
+    int updataCaseAffiliate(CaseAffiliate caseAffiliate);
20
+}

+ 23
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseApplicationMapper.java Просмотреть файл

1
+package com.ruoyi.wisdomarbitrate.mapper;
2
+
3
+import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
4
+import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
5
+
6
+import java.util.List;
7
+
8
+public interface CaseApplicationMapper {
9
+    List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication);
10
+
11
+    int selectCaseApplicationCount(CaseApplication caseApplication);
12
+
13
+    int insertCaseApplication(CaseApplication caseApplication);
14
+
15
+
16
+    int updataCaseApplication(CaseApplication caseApplication);
17
+
18
+    int submitCaseApplication(CaseApplication caseApplication);
19
+
20
+    int deletecaseApplication(CaseApplication caseApplication);
21
+
22
+    CaseApplication selectCaseApplication(CaseApplication caseApplication);
23
+}

+ 22
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseApplicationService.java Просмотреть файл

1
+package com.ruoyi.wisdomarbitrate.service;
2
+
3
+import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
4
+
5
+import java.util.List;
6
+
7
+public interface ICaseApplicationService {
8
+    List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication);
9
+
10
+
11
+    int insertcaseApplication(CaseApplication caseApplication);
12
+
13
+    int selectCaseApplicationCount(CaseApplication caseApplication);
14
+
15
+    int editCaseApplication(CaseApplication caseApplication);
16
+
17
+    int submitCaseApplication(CaseApplication caseApplication);
18
+
19
+    int deletecaseApplicationByIds(CaseApplication caseApplication);
20
+
21
+    CaseApplication selectCaseApplication(CaseApplication caseApplication);
22
+}

+ 98
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java Просмотреть файл

1
+package com.ruoyi.wisdomarbitrate.service.impl;
2
+
3
+import com.ruoyi.common.constant.CaseApplicationConstants;
4
+import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
5
+import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
6
+import com.ruoyi.wisdomarbitrate.mapper.CaseAffiliateMapper;
7
+import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
8
+import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
9
+import org.springframework.beans.factory.annotation.Autowired;
10
+import org.springframework.stereotype.Service;
11
+import org.springframework.transaction.annotation.Transactional;
12
+
13
+import java.lang.reflect.Field;
14
+import java.util.List;
15
+
16
+import static com.ruoyi.common.core.domain.AjaxResult.error;
17
+
18
+@Service
19
+public class CaseApplicationServiceImpl implements ICaseApplicationService {
20
+    @Autowired
21
+    private CaseApplicationMapper caseApplicationMapper;
22
+
23
+    @Autowired
24
+    private CaseAffiliateMapper caseAffiliateMapper;
25
+
26
+
27
+    @Override
28
+    public List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication) {
29
+        return caseApplicationMapper.selectCaseApplicationList(caseApplication);
30
+
31
+    }
32
+
33
+    @Override
34
+    @Transactional
35
+    public int insertcaseApplication(CaseApplication caseApplication) {
36
+        // 新增立案信息
37
+        caseApplication.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
38
+        int rows = caseApplicationMapper.insertCaseApplication(caseApplication);
39
+        List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
40
+        if(caseAffiliates!=null&&caseAffiliates.size()>0){
41
+            for (CaseAffiliate caseAffiliate : caseAffiliates){
42
+                caseAffiliate.setCaseAppliId(caseApplication.getId());
43
+            }
44
+            caseAffiliateMapper.batchCaseAffiliate(caseAffiliates);
45
+        }
46
+
47
+        return rows;
48
+    }
49
+
50
+    @Override
51
+    public int selectCaseApplicationCount(CaseApplication caseApplication) {
52
+        return caseApplicationMapper.selectCaseApplicationCount(caseApplication);
53
+    }
54
+
55
+    @Override
56
+    @Transactional
57
+    public int editCaseApplication(CaseApplication caseApplication) {
58
+        int rows = caseApplicationMapper.updataCaseApplication(caseApplication);
59
+        List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
60
+        if(caseAffiliates!=null&&caseAffiliates.size()>0){
61
+            for (CaseAffiliate caseAffiliate : caseAffiliates){
62
+                caseAffiliateMapper.updataCaseAffiliate(caseAffiliate);
63
+            }
64
+        }
65
+
66
+        return rows;
67
+    }
68
+
69
+    @Override
70
+    @Transactional
71
+    public int submitCaseApplication(CaseApplication caseApplication) {
72
+        //提交立案申请
73
+        caseApplication.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT);
74
+        int rows = caseApplicationMapper.submitCaseApplication(caseApplication);
75
+        return rows;
76
+    }
77
+
78
+    @Override
79
+    @Transactional
80
+    public int deletecaseApplicationByIds(CaseApplication caseApplication) {
81
+
82
+        caseAffiliateMapper.deletecaseAffiliate(caseApplication);
83
+        return caseApplicationMapper.deletecaseApplication(caseApplication);
84
+    }
85
+
86
+    @Override
87
+    public CaseApplication selectCaseApplication(CaseApplication caseApplication) {
88
+        CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
89
+        CaseAffiliate caseAffiliate = new CaseAffiliate();
90
+        caseAffiliate.setCaseAppliId(caseApplication.getId());
91
+        List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
92
+        caseApplicationselect.setCaseAffiliates(caseAffiliatListeselect);
93
+
94
+        return caseApplicationselect;
95
+    }
96
+
97
+
98
+}

+ 78
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAffiliateMapper.xml Просмотреть файл

1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper
3
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5
+<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.CaseAffiliateMapper">
6
+
7
+    <resultMap type="CaseAffiliate" id="CaseAffiliateResult">
8
+        <id     property="id"       column="id"      />
9
+        <result property="caseAppliId"       column="case_appli_id"      />
10
+        <result property="identityType"     column="identity_type"    />
11
+        <result property="name"     column="name"    />
12
+        <result property="identityNum"        column="identity_num"        />
13
+        <result property="workTelphone"  column="work_telphone"  />
14
+        <result property="contactTelphone"          column="contact_telphone"          />
15
+        <result property="contactAddress"       column="contact_address"       />
16
+        <result property="workAddress"     column="work_address"     />
17
+        <result property="nameAgent"       column="name_agent"       />
18
+        <result property="identityNumAgent"      column="identity_num_agent"     />
19
+        <result property="contactTelphoneAgent"      column="contact_telphone_agent"     />
20
+        <result property="contactAddressAgent"    column="contact_address_agent"   />
21
+
22
+    </resultMap>
23
+
24
+    <select id="selectCaseAffiliate" parameterType="CaseAffiliate" resultMap="CaseAffiliateResult">
25
+        select c.id ,c.case_appli_id ,c.identity_type ,c.name ,c.identity_num ,c.contact_telphone ,c.contact_address ,
26
+        c.work_address ,c.work_telphone ,c.name_agent, c.identity_num_agent ,c.contact_telphone_agent ,c.contact_address_agent
27
+        from case_affiliate c
28
+        <where>
29
+            <if test="caseAppliId != null ">
30
+                AND c.case_appli_id = #{caseAppliId}
31
+            </if>
32
+        </where>
33
+    </select>
34
+
35
+
36
+    <insert id="batchCaseAffiliate">
37
+        insert into case_affiliate(case_appli_id, identity_type,name,identity_num,contact_telphone,
38
+        contact_address,work_address,work_telphone ,name_agent,identity_num_agent,contact_telphone_agent,
39
+        contact_address_agent ) values
40
+        <foreach item="item" index="index" collection="list" separator=",">
41
+            (#{item.caseAppliId},#{item.identityType},#{item.name},#{item.identityNum},#{item.contactTelphone},
42
+            #{item.contactAddress},#{item.workAddress},#{item.workTelphone},  #{item.nameAgent},#{item.identityNumAgent},
43
+            #{item.contactTelphoneAgent},#{item.contactAddressAgent})
44
+        </foreach>
45
+    </insert>
46
+
47
+
48
+
49
+    <update id="updataCaseAffiliate" parameterType="CaseAffiliate">
50
+        update case_affiliate
51
+        set
52
+        identity_type= #{identityType},
53
+        name = #{name},
54
+        identity_num = #{identityNum},
55
+        contact_telphone = #{contactTelphone},
56
+        contact_address = #{contactAddress},
57
+        work_address = #{workAddress},
58
+        work_telphone = #{workTelphone},
59
+
60
+        name_agent = #{nameAgent},
61
+        identity_num_agent = #{identityNumAgent},
62
+        contact_telphone_agent = #{contactTelphoneAgent},
63
+        contact_address_agent = #{contactAddressAgent}
64
+        where id = #{id}
65
+
66
+    </update>
67
+
68
+    <delete id="deletecaseAffiliate" parameterType="CaseApplication">
69
+        delete from case_affiliate where case_appli_id = #{id}
70
+    </delete>
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+</mapper>

+ 164
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml Просмотреть файл

1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper
3
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5
+<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper">
6
+
7
+    <resultMap type="CaseApplication" id="CaseApplicationResult">
8
+        <id     property="id"       column="id"      />
9
+        <result property="caseNum"       column="case_num"      />
10
+        <result property="caseSubjectAmount"     column="case_subject_amount"    />
11
+        <result property="registerDate"     column="register_date"    />
12
+        <result property="arbitratMethod"        column="arbitrat_method"        />
13
+        <result property="caseStatus"  column="case_status"  />
14
+        <result property="hearDate"          column="hear_date"          />
15
+        <result property="arbitratClaims"       column="arbitrat_claims"       />
16
+        <result property="loanStartDate"     column="loan_start_date"     />
17
+        <result property="loanEndDate"       column="loan_end_date"       />
18
+        <result property="claimPrinciOwed"      column="claim_princi_owed"     />
19
+        <result property="claimInterestOwed"      column="claim_interest_owed"     />
20
+        <result property="claimLiquidDamag"    column="claim_liquid_damag"   />
21
+
22
+        <result property="feePayable"          column="fee_payable"          />
23
+        <result property="paidExpenses"       column="paid_expenses"       />
24
+        <result property="beginVideoDate"     column="begin_video_date"     />
25
+        <result property="onlineVideoPerson"       column="online_video_person"       />
26
+        <result property="contractNumber"      column="contract_number"     />
27
+
28
+        <result property="createBy"     column="create_by"    />
29
+        <result property="createTime"   column="create_time"  />
30
+        <result property="updateBy"     column="update_by"    />
31
+        <result property="updateTime"   column="update_time"  />
32
+    </resultMap>
33
+
34
+
35
+
36
+    <select id="selectCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
37
+        select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,c.case_status ,c.hear_date ,c.arbitrat_claims ,
38
+        c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
39
+        c.paid_expenses ,c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
40
+        c.update_by ,c.update_time
41
+        from case_application c
42
+        <where>
43
+            <if test="caseStatus != null and caseStatus != ''">
44
+                AND c.case_status = #{caseStatus}
45
+            </if>
46
+            <if test="caseNum != null and caseNum != ''">
47
+                AND c.case_num = #{caseNum}
48
+            </if>
49
+        </where>
50
+    </select>
51
+
52
+    <select id="selectCaseApplicationCount" parameterType="CaseApplication" resultType="int">
53
+        select count(1) from  case_application c
54
+        <where>
55
+            <if test="caseNum != null and caseNum != ''">
56
+                AND c.case_num = #{caseNum}
57
+            </if>
58
+        </where>
59
+    </select>
60
+
61
+    <insert id="insertCaseApplication" parameterType="CaseApplication" useGeneratedKeys="true" keyProperty="id">
62
+        insert into case_application(
63
+
64
+        <if test="caseNum != null and caseNum != ''">case_num,</if>
65
+        <if test="caseSubjectAmount != null">case_subject_amount,</if>
66
+        <if test="registerDate != null">register_date,</if>
67
+        <if test="arbitratMethod != null and arbitratMethod != ''">arbitrat_method,</if>
68
+        <if test="caseStatus != null ">case_status,</if>
69
+        <if test="hearDate != null ">hear_date,</if>
70
+        <if test="arbitratClaims != null and arbitratClaims != ''">arbitrat_claims,</if>
71
+        <if test="loanStartDate != null ">loan_start_date,</if>
72
+        <if test="loanEndDate != null ">loan_end_date,</if>
73
+        <if test="claimPrinciOwed != null ">claim_princi_owed,</if>
74
+
75
+        <if test="claimInterestOwed != null ">claim_interest_owed,</if>
76
+        <if test="claimLiquidDamag != null ">claim_liquid_damag,</if>
77
+        <if test="feePayable != null ">fee_payable,</if>
78
+        <if test="paidExpenses != null ">paid_expenses,</if>
79
+        <if test="beginVideoDate != null ">begin_video_date,</if>
80
+        <if test="onlineVideoPerson != null  and onlineVideoPerson != ''">online_video_person,</if>
81
+
82
+        <if test="contractNumber != null  and contractNumber != ''">contract_number,</if>
83
+        <if test="createBy != null  and createBy != ''">create_by,</if>
84
+        create_time
85
+        )values(
86
+        <if test="caseNum != null and caseNum != ''">#{caseNum},</if>
87
+        <if test="caseSubjectAmount != null">#{caseSubjectAmount},</if>
88
+        <if test="registerDate != null">#{registerDate},</if>
89
+        <if test="arbitratMethod != null and arbitratMethod != ''">#{arbitratMethod},</if>
90
+        <if test="caseStatus != null ">#{caseStatus},</if>
91
+        <if test="hearDate != null ">#{hearDate},</if>
92
+        <if test="arbitratClaims != null and arbitratClaims != ''">#{arbitratClaims},</if>
93
+        <if test="loanStartDate != null ">#{loanStartDate},</if>
94
+        <if test="loanEndDate != null ">#{loanEndDate},</if>
95
+        <if test="claimPrinciOwed != null ">#{claimPrinciOwed},</if>
96
+
97
+        <if test="claimInterestOwed != null ">#{claimInterestOwed},</if>
98
+        <if test="claimLiquidDamag != null ">#{claimLiquidDamag},</if>
99
+        <if test="feePayable != null ">#{feePayable},</if>
100
+        <if test="paidExpenses != null ">#{paidExpenses},</if>
101
+        <if test="beginVideoDate != null ">#{beginVideoDate},</if>
102
+        <if test="onlineVideoPerson != null  and onlineVideoPerson != ''">#{onlineVideoPerson},</if>
103
+
104
+        <if test="contractNumber != null  and contractNumber != ''">#{contractNumber},</if>
105
+        <if test="createBy != null  and createBy != ''">#{createBy},</if>
106
+        sysdate()
107
+        )
108
+    </insert>
109
+
110
+    <update id="updataCaseApplication" parameterType="CaseApplication">
111
+        update case_application
112
+        <set>
113
+            <if test="caseSubjectAmount != null">case_subject_amount = #{caseSubjectAmount},</if>
114
+            <if test="registerDate != null">register_date = #{registerDate},</if>
115
+            <if test="arbitratMethod != null and arbitratMethod != ''">arbitrat_method = #{arbitratMethod},</if>
116
+            <if test="hearDate != null ">hear_date = #{hearDate},</if>
117
+            <if test="arbitratClaims != null and arbitratClaims != ''">arbitrat_claims = #{arbitratClaims},</if>
118
+            <if test="loanStartDate != null ">loan_start_date = #{loanStartDate},</if>
119
+            <if test="loanEndDate != null ">loan_end_date = #{loanEndDate},</if>
120
+            <if test="loanEndDate != null ">claim_princi_owed = #{claimPrinciOwed},</if>
121
+            <if test="claimInterestOwed != null ">claim_interest_owed = #{claimInterestOwed},</if>
122
+            <if test="claimLiquidDamag != null ">claim_liquid_damag = #{claimLiquidDamag},</if>
123
+            <if test="feePayable != null ">fee_payable = #{feePayable},</if>
124
+            <if test="paidExpenses != null ">paid_expenses = #{paidExpenses},</if>
125
+            <if test="beginVideoDate != null ">begin_video_date = #{beginVideoDate},</if>
126
+            <if test="onlineVideoPerson != null  and onlineVideoPerson != ''">online_video_person = #{onlineVideoPerson},</if>
127
+
128
+            <if test="contractNumber != null  and contractNumber != ''">contract_number = #{contractNumber},</if>
129
+            <if test="updateBy != null  and updateBy != ''">update_by = #{updateBy},</if>
130
+            update_time = sysdate()
131
+        </set>
132
+        where id = #{id}
133
+    </update>
134
+
135
+    <update id="submitCaseApplication" parameterType="CaseApplication">
136
+        update case_application
137
+        <set>
138
+            <if test="caseStatus != null">case_status = #{caseStatus}</if>
139
+        </set>
140
+        where id = #{id}
141
+    </update>
142
+
143
+    <delete id="deletecaseApplication" parameterType="CaseApplication">
144
+        delete from case_application where id = #{id}
145
+    </delete>
146
+
147
+    <select id="selectCaseApplication" parameterType="CaseApplication" resultMap="CaseApplicationResult">
148
+        select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,c.case_status ,c.hear_date ,c.arbitrat_claims ,
149
+        c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
150
+        c.paid_expenses ,c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
151
+        c.update_by ,c.update_time
152
+        from case_application c
153
+        <where>
154
+            <if test="id != null ">
155
+                AND c.id = #{id}
156
+            </if>
157
+        </where>
158
+    </select>
159
+
160
+
161
+
162
+
163
+
164
+</mapper>