This commit is contained in:
hejinbo
2023-09-19 11:36:02 +08:00
6 changed files with 80 additions and 22 deletions
@@ -73,6 +73,17 @@ public class CaseApplication extends BaseEntity {
/** 案件描述 */
private String caseDescribe;
/** 是否同意组庭 */
private int isAgreePendTral;
public int getIsAgreePendTral() {
return isAgreePendTral;
}
public void setIsAgreePendTral(int isAgreePendTral) {
this.isAgreePendTral = isAgreePendTral;
}
public String getCaseName() {
return caseName;
}
@@ -25,4 +25,6 @@ public interface ICaseApplicationService {
int pendTral(CaseApplication caseApplication);
int pendingAppointArbotrar(CaseApplication caseApplication);
int pendTralCheck(CaseApplication caseApplication);
}
@@ -206,6 +206,31 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
return rows;
}
@Override
@Transactional
public int pendTralCheck(CaseApplication caseApplication) {
int isAgreePendTral = caseApplication.getIsAgreePendTral();
caseApplication.setCaseStatus(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
int rows = 0;
//同意组庭
if(isAgreePendTral==1){
rows = caseApplicationMapper.submitCaseApplication(caseApplication);
}else {
List<Arbitrator> arbitrators = caseApplication.getArbitrators();
if(arbitrators!=null&&arbitrators.size()>0){
List<Long> ids = arbitrators.stream().map(Arbitrator::getId).collect(Collectors.toList());
List<String> arbitratorNames = arbitrators.stream().map(Arbitrator::getArbitratorName).collect(Collectors.toList());
String idstr = ids.stream().map(Object::toString).collect(Collectors.joining(","));
String arbitratorNamestr = arbitratorNames.stream().map(Object::toString).collect(Collectors.joining(","));
caseApplication.setArbitratorId(idstr);
caseApplication.setArbitratorName(arbitratorNamestr);
rows = caseApplicationMapper.submitCaseApplication(caseApplication);
}
}
return rows;
}
@Override
@Transactional
public int pendingAppointArbotrar(CaseApplication caseApplication) {
@@ -236,6 +261,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
}
private void assignmentCaseAffiliates(CaseApplication caseApplication, List<CaseAffiliate> caseAffiliatesnew) {
CaseAffiliate caseAffiliate = new CaseAffiliate();
// BeanUtils.copyBeanProp(caseApplication,caseAffiliate);
@@ -149,6 +149,7 @@
<if test="caseName != null and caseName != ''">case_name = #{caseName},</if>
<if test="caseDescribe != null and caseDescribe != ''">case_describe = #{caseDescribe},</if>
<if test="caseResult != null and caseResult != ''">case_result = #{caseResult},</if>
<if test="isAgreePendTral != null">is_agree_pend_tral = #{isAgreePendTral},</if>
</set>
where id = #{id}
</update>