|
|
@@ -59,6 +59,9 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
59
|
59
|
BigDecimal feePayable = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2,BigDecimal.ROUND_HALF_UP);
|
|
60
|
60
|
caseApplication.setFeePayable(feePayable);
|
|
61
|
61
|
|
|
|
62
|
+ String caseNum = generateCaseNum();
|
|
|
63
|
+ caseApplication.setCaseNum(caseNum);
|
|
|
64
|
+
|
|
62
|
65
|
int rows = caseApplicationMapper.insertCaseApplication(caseApplication);
|
|
63
|
66
|
List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
|
|
64
|
67
|
if(caseAffiliates!=null&&caseAffiliates.size()>0){
|
|
|
@@ -80,6 +83,20 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
80
|
83
|
return rows;
|
|
81
|
84
|
}
|
|
82
|
85
|
|
|
|
86
|
+ private String generateCaseNum() {
|
|
|
87
|
+ String currentday = DateUtils.dateTime();
|
|
|
88
|
+ String caseNum = "zc"+ currentday;
|
|
|
89
|
+ //查询出当天的案件编号的最大值 ,如等于1
|
|
|
90
|
+ Integer caseNumMax = 1;
|
|
|
91
|
+ if(caseNumMax!=null){
|
|
|
92
|
+ //根据查询到的caseNumMax拼接一个案件编号
|
|
|
93
|
+ }else {
|
|
|
94
|
+ caseNum += "001";
|
|
|
95
|
+ }
|
|
|
96
|
+ return caseNum;
|
|
|
97
|
+
|
|
|
98
|
+ }
|
|
|
99
|
+
|
|
83
|
100
|
@Override
|
|
84
|
101
|
public int selectCaseApplicationCount(CaseApplication caseApplication) {
|
|
85
|
102
|
return caseApplicationMapper.selectCaseApplicationCount(caseApplication);
|