|
@@ -11,11 +11,12 @@ import com.ruoyi.common.core.web.page.TableSupport;
|
|
import com.ruoyi.common.security.utils.DictUtils;
|
|
import com.ruoyi.common.security.utils.DictUtils;
|
|
import com.sooka.sponest.comprehensive.api.comprehensiveConflictDefuse.domain.ConflictResolution;
|
|
import com.sooka.sponest.comprehensive.api.comprehensiveConflictDefuse.domain.ConflictResolution;
|
|
import com.sooka.sponest.comprehensive.api.comprehensiveConflictDefuse.service.RemoteConflictResolutionService;
|
|
import com.sooka.sponest.comprehensive.api.comprehensiveConflictDefuse.service.RemoteConflictResolutionService;
|
|
|
|
+import org.apache.commons.collections4.MapUtils;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
-import java.util.HashMap;
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
+import java.util.Map;
|
|
|
|
|
|
@RestController
|
|
@RestController
|
|
@RequestMapping("/AppConflictResolutionController")
|
|
@RequestMapping("/AppConflictResolutionController")
|
|
@@ -33,7 +34,34 @@ public class AppConflictResolutionController extends BaseController {
|
|
Integer pageSize = pageDomain.getPageSize();
|
|
Integer pageSize = pageDomain.getPageSize();
|
|
TableDataInfo tableDataInfo = remoteConflictResolutionService.selectConflictResolutionList(pageNum, pageSize, conflictResolution.getTemp(),conflictResolution.getEventName(),conflictResolution.getMainPersonName(),conflictResolution.getResolutionResponsibleName());
|
|
TableDataInfo tableDataInfo = remoteConflictResolutionService.selectConflictResolutionList(pageNum, pageSize, conflictResolution.getTemp(),conflictResolution.getEventName(),conflictResolution.getMainPersonName(),conflictResolution.getResolutionResponsibleName());
|
|
if (HttpStatus.SUCCESS == tableDataInfo.getCode()) {
|
|
if (HttpStatus.SUCCESS == tableDataInfo.getCode()) {
|
|
- return AjaxResult.success(tableDataInfo.getRows());
|
|
|
|
|
|
+ List<Map<String,Object>> rows = (List<Map<String, Object>>) tableDataInfo.getRows();
|
|
|
|
+ Map<String,Object> comprehensiveCertificateCode = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_CERTIFICATE_CODE);
|
|
|
|
+ Map<String,Object> comprehensiveSex = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_SEX);
|
|
|
|
+ Map<String,Object> comprehensiveNation = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_NATION);
|
|
|
|
+ Map<String,Object> comprehensiveEducationalBackground = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_EDUCATIONAL_BACKGROUND);
|
|
|
|
+ Map<String,Object> comprehensiveEventSize = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_EVENT_SIZE);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ Map<String,Object> comprehensiveEventType = DictUtils.getComprehensiveDictCacheToMap(DictKeys.COMPREHENSIVE_EVENT_TYPE);
|
|
|
|
+ Map<String,Object> comprehensivePartiesInvolved = DictUtils.getComprehensiveDictCacheToMap(DictKeys.COMPREHENSIVE_PARTIES_INVOLVED);
|
|
|
|
+ Map<String,Object> comprehensiveWaysResolving = DictUtils.getComprehensiveDictCacheToMap(DictKeys.COMPREHENSIVE_WAYS_RESOLVING);
|
|
|
|
+
|
|
|
|
+ for (Map<String, Object> row : rows) {
|
|
|
|
+ row.put("mainPersonIdCodeLabel",MapUtils.getString(comprehensiveCertificateCode,MapUtils.getString(row,"mainPersonIdCode")));
|
|
|
|
+ row.put("mainPersonGenderLabel",MapUtils.getString(comprehensiveSex,MapUtils.getString(row,"mainPersonGender")));
|
|
|
|
+ row.put("mainPersonNationalityLabel",MapUtils.getString(comprehensiveNation,MapUtils.getString(row,"mainPersonNationality")));
|
|
|
|
+ row.put("mainPersonEducationLabel",MapUtils.getString(comprehensiveEducationalBackground,MapUtils.getString(row,"mainPersonEducation")));
|
|
|
|
+ row.put("eventScaleLabel",MapUtils.getString(comprehensiveEventSize,MapUtils.getString(row,"eventScale")));
|
|
|
|
+ row.put("resolutionSuccessLabel",!MapUtils.getString(row,"resolutionSuccess").isEmpty()?("1".equals(conflictResolution.getResolutionSuccess())?"是":"否"):"");
|
|
|
|
+
|
|
|
|
+ row.put("eventCategoryLabel",MapUtils.getString(comprehensiveEventType,MapUtils.getString(row,"eventCategory")));
|
|
|
|
+ row.put("mainPersonCategoryLabel",MapUtils.getString(comprehensivePartiesInvolved,MapUtils.getString(row,"mainPersonCategory")));
|
|
|
|
+ row.put("resolutionMethodLabel",MapUtils.getString(comprehensiveWaysResolving,MapUtils.getString(row,"resolutionMethod")));
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return AjaxResult.success(rows);
|
|
} else {
|
|
} else {
|
|
return AjaxResult.error(tableDataInfo.getCode(), tableDataInfo.getMsg());
|
|
return AjaxResult.error(tableDataInfo.getCode(), tableDataInfo.getMsg());
|
|
}
|
|
}
|
|
@@ -48,11 +76,23 @@ public class AppConflictResolutionController extends BaseController {
|
|
R<ConflictResolution> edit = remoteConflictResolutionService.selectConflictResolutionById(id);
|
|
R<ConflictResolution> edit = remoteConflictResolutionService.selectConflictResolutionById(id);
|
|
if(HttpStatus.SUCCESS == edit.getCode()){
|
|
if(HttpStatus.SUCCESS == edit.getCode()){
|
|
ConflictResolution conflictResolution = edit.getData();
|
|
ConflictResolution conflictResolution = edit.getData();
|
|
|
|
+ Map<String,Object> comprehensiveEventType = DictUtils.getComprehensiveDictCacheToMap(DictKeys.COMPREHENSIVE_EVENT_TYPE);
|
|
|
|
+ Map<String,Object> comprehensivePartiesInvolved = DictUtils.getComprehensiveDictCacheToMap(DictKeys.COMPREHENSIVE_PARTIES_INVOLVED);
|
|
|
|
+ Map<String,Object> comprehensiveWaysResolving = DictUtils.getComprehensiveDictCacheToMap(DictKeys.COMPREHENSIVE_WAYS_RESOLVING);
|
|
|
|
+
|
|
|
|
+
|
|
conflictResolution.setMainPersonIdCodeLabel(DictUtils.getDictDataByValue(DictKeys.COMPREHENSIVE_CERTIFICATE_CODE, conflictResolution.getMainPersonIdCode()));
|
|
conflictResolution.setMainPersonIdCodeLabel(DictUtils.getDictDataByValue(DictKeys.COMPREHENSIVE_CERTIFICATE_CODE, conflictResolution.getMainPersonIdCode()));
|
|
conflictResolution.setMainPersonGenderLabel(DictUtils.getDictDataByValue(DictKeys.COMPREHENSIVE_SEX, conflictResolution.getMainPersonGender()));
|
|
conflictResolution.setMainPersonGenderLabel(DictUtils.getDictDataByValue(DictKeys.COMPREHENSIVE_SEX, conflictResolution.getMainPersonGender()));
|
|
conflictResolution.setMainPersonNationalityLabel(DictUtils.getDictDataByValue(DictKeys.COMPREHENSIVE_NATION, conflictResolution.getMainPersonNationality()));
|
|
conflictResolution.setMainPersonNationalityLabel(DictUtils.getDictDataByValue(DictKeys.COMPREHENSIVE_NATION, conflictResolution.getMainPersonNationality()));
|
|
conflictResolution.setMainPersonEducationLabel(DictUtils.getDictDataByValue(DictKeys.COMPREHENSIVE_EDUCATIONAL_BACKGROUND, conflictResolution.getMainPersonEducation()));
|
|
conflictResolution.setMainPersonEducationLabel(DictUtils.getDictDataByValue(DictKeys.COMPREHENSIVE_EDUCATIONAL_BACKGROUND, conflictResolution.getMainPersonEducation()));
|
|
|
|
+ conflictResolution.setEventScaleLabel(DictUtils.getDictDataByValue(DictKeys.COMPREHENSIVE_EVENT_SIZE, conflictResolution.getEventScale()));
|
|
conflictResolution.setResolutionSuccessLabel(!conflictResolution.getResolutionSuccess().isEmpty()?("1".equals(conflictResolution.getResolutionSuccess())?"是":"否"):"");
|
|
conflictResolution.setResolutionSuccessLabel(!conflictResolution.getResolutionSuccess().isEmpty()?("1".equals(conflictResolution.getResolutionSuccess())?"是":"否"):"");
|
|
|
|
+
|
|
|
|
+ conflictResolution.setEventCategoryLabel(MapUtils.getString(comprehensiveEventType,conflictResolution.getEventCategory()));
|
|
|
|
+ conflictResolution.setMainPersonCategoryLabel(MapUtils.getString(comprehensivePartiesInvolved,conflictResolution.getMainPersonCategory()));
|
|
|
|
+ conflictResolution.setResolutionMethodLabel(MapUtils.getString(comprehensiveWaysResolving,conflictResolution.getResolutionMethod()));
|
|
|
|
+
|
|
|
|
+
|
|
return AjaxResult.success(conflictResolution);
|
|
return AjaxResult.success(conflictResolution);
|
|
}else{
|
|
}else{
|
|
return AjaxResult.error(edit.getCode(), edit.getMsg());
|
|
return AjaxResult.error(edit.getCode(), edit.getMsg());
|