|
|
@@ -969,7 +969,19 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
969
|
969
|
if (insertRow != 0 && CollectionUtil.isNotEmpty(caseAffiliates)) {
|
|
970
|
970
|
caseAffiliates.forEach(caseAffiliate -> caseAffiliate.setCaseAppliLogId(caseApplication.getId()));
|
|
971
|
971
|
// 插入案件日志人员相关表
|
|
972
|
|
- caseAffiliateLogMapper.batchCaseAffiliate(caseAffiliates);
|
|
|
972
|
+ if(CollectionUtil.isNotEmpty(caseAttachList)) {
|
|
|
973
|
+ List<CaseAttach> filterList = caseAttachList.stream().filter(c -> c.getAnnexType().equals(2)).collect(Collectors.toList());
|
|
|
974
|
+ // 插入日志附件表
|
|
|
975
|
+ if(CollectionUtil.isNotEmpty(filterList)) {
|
|
|
976
|
+ for (CaseAttach caseAttach : filterList) {
|
|
|
977
|
+ // 查询附件表
|
|
|
978
|
+ CaseAttach attach = caseAttachMapper.queryAnnexById(caseAttach.getAnnexId());
|
|
|
979
|
+ attach.setCaseAppliLogId(caseApplication.getId());
|
|
|
980
|
+ caseAttachLogMapper.save(attach);
|
|
|
981
|
+ }
|
|
|
982
|
+ }
|
|
|
983
|
+
|
|
|
984
|
+ } caseAffiliateLogMapper.batchCaseAffiliate(caseAffiliates);
|
|
973
|
985
|
}
|
|
974
|
986
|
});
|
|
975
|
987
|
|
|
|
@@ -1077,11 +1089,22 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
1077
|
1089
|
// 立案申请状态直接修改主表信息
|
|
1078
|
1090
|
if (caseAttachList != null && caseAttachList.size() > 0
|
|
1079
|
1091
|
&& caseApplication.getCaseStatus()!=null && caseApplication.getCaseStatus().equals(CaseApplicationConstants.CASE_APPLICATION)) {
|
|
1080
|
|
- for (CaseAttach caseAttach : caseAttachList) {
|
|
1081
|
|
- caseAttach.setCaseAppliId(caseApplication.getId());
|
|
1082
|
|
- caseAttachMapper.updateCaseAttach(caseAttach);
|
|
|
1092
|
+ List<CaseAttach> filterList = caseAttachList.stream().filter(c -> c.getAnnexType().equals(2)).collect(Collectors.toList());
|
|
|
1093
|
+ if(CollectionUtil.isNotEmpty(filterList)){
|
|
|
1094
|
+ // 先删除2的附件在新增
|
|
|
1095
|
+// caseAttachMapper.deleteByCasedIdAndType(caseApplication.getId(),2,0);
|
|
|
1096
|
+// for (CaseAttach caseAttach : filterList) {
|
|
|
1097
|
+// caseAttach.setCaseAppliId(caseApplication.getId());
|
|
|
1098
|
+// caseAttachMapper.save(caseAttach);
|
|
|
1099
|
+// }
|
|
|
1100
|
+
|
|
|
1101
|
+ for (CaseAttach caseAttach : caseAttachList) {
|
|
|
1102
|
+ caseAttach.setCaseAppliId(caseApplication.getId());
|
|
|
1103
|
+ caseAttachMapper.updateCaseAttach(caseAttach);
|
|
|
1104
|
+ }
|
|
1083
|
1105
|
}
|
|
1084
|
1106
|
|
|
|
1107
|
+
|
|
1085
|
1108
|
}
|
|
1086
|
1109
|
// 根据案件id查询最新版本号
|
|
1087
|
1110
|
Integer maxVersion = caseApplicationLogMapper.selectMaxVersionByCaseId(caseApplication.getId());
|
|
|
@@ -1106,13 +1129,16 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
1106
|
1129
|
caseAffiliateLogMapper.batchCaseAffiliate(caseAffiliates);
|
|
1107
|
1130
|
}
|
|
1108
|
1131
|
if(CollectionUtil.isNotEmpty(caseAttachList)) {
|
|
|
1132
|
+ List<CaseAttach> filterList = caseAttachList.stream().filter(c -> c.getAnnexType().equals(2)).collect(Collectors.toList());
|
|
1109
|
1133
|
// 插入日志附件表
|
|
1110
|
|
- for (CaseAttach caseAttach : caseAttachList) {
|
|
1111
|
|
- // 查询附件表
|
|
1112
|
|
- CaseAttach attach = caseAttachMapper.queryAnnexById(caseAttach.getAnnexId());
|
|
1113
|
|
- attach.setCaseAppliLogId(caseApplication.getId());
|
|
1114
|
|
- caseAttachLogMapper.save(attach);
|
|
1115
|
|
- }
|
|
|
1134
|
+ if(CollectionUtil.isNotEmpty(filterList)) {
|
|
|
1135
|
+ for (CaseAttach caseAttach : filterList) {
|
|
|
1136
|
+ // 查询附件表
|
|
|
1137
|
+ CaseAttach attach = caseAttachMapper.queryAnnexById(caseAttach.getAnnexId());
|
|
|
1138
|
+ attach.setCaseAppliLogId(caseApplication.getId());
|
|
|
1139
|
+ caseAttachLogMapper.save(attach);
|
|
|
1140
|
+ }
|
|
|
1141
|
+ }
|
|
1116
|
1142
|
|
|
1117
|
1143
|
}
|
|
1118
|
1144
|
}
|
|
|
@@ -2731,8 +2757,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
2731
|
2757
|
public long createRoomId(Long caseId) {
|
|
2732
|
2758
|
long roomId = generateRoomId();
|
|
2733
|
2759
|
// 新增预约会议表
|
|
2734
|
|
-// ReservedConference conference = new ReservedConference(caseId, roomId,
|
|
2735
|
|
-// null, null,0);
|
|
|
2760
|
+// ReservedConference conference = new ReservedConference(caseId, SecurityUtils.getUserId(),roomId,
|
|
|
2761
|
+// null, null);
|
|
2736
|
2762
|
// reservedConferenceMapper.insert(conference);
|
|
2737
|
2763
|
// 绑定案件与房间号
|
|
2738
|
2764
|
caseApplicationMapper.bindCaseId(caseId, String.valueOf(roomId));
|
|
|
@@ -2766,6 +2792,19 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
2766
|
2792
|
@Transactional
|
|
2767
|
2793
|
public List<ReservedConference> reserveConferenceList(Long caseId) {
|
|
2768
|
2794
|
List<ReservedConference> reservedConferences = reservedConferenceMapper.selectListByCaseId(caseId);
|
|
|
2795
|
+ if(CollectionUtil.isNotEmpty(reservedConferences)){
|
|
|
2796
|
+ for (ReservedConference reservedConference : reservedConferences) {
|
|
|
2797
|
+ Date startTime = reservedConference.getScheduleStartTime();
|
|
|
2798
|
+ if(null != startTime){
|
|
|
2799
|
+ long beforeMinutes = startTime.getTime() - 1000 * 60 * 5;
|
|
|
2800
|
+ if(System.currentTimeMillis()<beforeMinutes ){
|
|
|
2801
|
+ reservedConference.setIsBeforeFiveMinutes(true);
|
|
|
2802
|
+ }else {
|
|
|
2803
|
+ reservedConference.setIsBeforeFiveMinutes(false);
|
|
|
2804
|
+ }
|
|
|
2805
|
+ }
|
|
|
2806
|
+ }
|
|
|
2807
|
+ }
|
|
2769
|
2808
|
|
|
2770
|
2809
|
return reservedConferences;
|
|
2771
|
2810
|
}
|
|
|
@@ -2782,7 +2821,6 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
2782
|
2821
|
return success( reservedConferenceMapper.deleteByRoomId(roomId));
|
|
2783
|
2822
|
}
|
|
2784
|
2823
|
|
|
2785
|
|
-
|
|
2786
|
2824
|
}
|
|
2787
|
2825
|
|
|
2788
|
2826
|
|