修改老师评分接口

master
xiaoCJ 5 months ago
parent 1ef4f54531
commit 5e262aa656

@ -843,7 +843,7 @@ public class GradeController {
LinkedHashMap<String, String> map = (LinkedHashMap<String, String>) updateMap.get(type);
String json = new Gson().toJson(map);
Gson gson = new Gson();
caseService.addCorrelationTable(type,json,gson,"stu");
caseService.addCorrelationTable(type,json,gson,"1");
}
//修改审核状态
SynthesisPlanClientExample synthesisPlanClientExample = new SynthesisPlanClientExample();

@ -592,10 +592,6 @@ public class CaseServiceImpl implements CaseService {
//主键id为空则新增 否则编辑
if (StringUtils.isBlank(caseRiskIndex.getCaseRiskIndexId())) {
caseRiskIndex.setCaseRiskIndexId(IdUtil.randomUUID());
//为空是老师新增给一个caseID
if (operator.equals("master")) {
caseRiskIndex.setCaseid(IdUtil.randomUUID());
}
caseRiskIndexMapper.insert(caseRiskIndex);
return new ResultEntity<HttpStatus>(HttpStatus.OK, "新增成功!");
}
@ -618,9 +614,6 @@ public class CaseServiceImpl implements CaseService {
//主键id为空则新增 否则编辑
if (StringUtils.isBlank(caseFinanceLiability.getCaseFinanceLiabilityId())) {
caseFinanceLiability.setCaseFinanceLiabilityId(IdUtil.randomUUID());
if (operator.equals("master")) {
caseFinanceLiability.setCaseId(IdUtil.randomUUID());
}
caseFinanceLiabilityMapper.insert(caseFinanceLiability);
return new ResultEntity<HttpStatus>(HttpStatus.OK, "新增成功!");
}
@ -642,9 +635,6 @@ public class CaseServiceImpl implements CaseService {
//主键id为空则新增 否则编辑
if (StringUtils.isBlank(caseIncomeAndExpenses.getCaseIncomeAndExpensesId())) {
caseIncomeAndExpenses.setCaseIncomeAndExpensesId(IdUtil.randomUUID());
if (operator.equals("master")) {
caseIncomeAndExpenses.setCaseid(IdUtil.randomUUID());
}
caseIncomeAndExpensesMapper.insert(caseIncomeAndExpenses);
return new ResultEntity<HttpStatus>(HttpStatus.OK, "新增成功!");
}
@ -666,9 +656,6 @@ public class CaseServiceImpl implements CaseService {
if (StringUtils.isBlank(caseCashFlow.getCaseCashFlowId())) {
caseCashFlow.setCaseCashFlowId(IdUtil.randomUUID());
if (operator.equals("master")) {
caseCashFlow.setCaseid(IdUtil.randomUUID());
}
caseCashFlowMapper.insert(caseCashFlow);
return new ResultEntity<HttpStatus>(HttpStatus.OK, "新增成功!");
}
@ -687,9 +674,6 @@ public class CaseServiceImpl implements CaseService {
CaseFinancialRatiosWithBLOBs caseFinancialRatios = gson.fromJson(json, CaseFinancialRatiosWithBLOBs.class);
if (StringUtils.isBlank(caseFinancialRatios.getCaseFinancialRatiosId())) {
caseFinancialRatios.setCaseFinancialRatiosId(IdUtil.randomUUID());
if (operator.equals("master")) {
caseFinancialRatios.setCaseid(IdUtil.randomUUID());
}
caseFinancialRatiosMapper.insert(caseFinancialRatios);
return new ResultEntity<HttpStatus>(HttpStatus.OK, "新增成功!");
}
@ -709,9 +693,6 @@ public class CaseServiceImpl implements CaseService {
if (StringUtils.isBlank(caseCashPlan.getCaseCashPlanId())) {
caseCashPlan.setCaseCashPlanId(IdUtil.randomUUID());
if (operator.equals("master")) {
caseCashPlan.setCaseid(IdUtil.randomUUID());
}
caseCashPlanMapper.insert(caseCashPlan);
return new ResultEntity<HttpStatus>(HttpStatus.OK, "新增成功!");
}
@ -730,9 +711,6 @@ public class CaseServiceImpl implements CaseService {
CaseLifeEducationPlan caseLifeEducationPlan = gson.fromJson(json, CaseLifeEducationPlan.class);
if (StringUtils.isBlank(caseLifeEducationPlan.getCaseLifeEducationPlanId())) {
caseLifeEducationPlan.setCaseLifeEducationPlanId(IdUtil.randomUUID());
if (operator.equals("master")) {
caseLifeEducationPlan.setCaseid(IdUtil.randomUUID());
}
caseLifeEducationPlanMapper.insert(caseLifeEducationPlan);
return new ResultEntity<HttpStatus>(HttpStatus.OK, "新增成功!");
}
@ -751,9 +729,6 @@ public class CaseServiceImpl implements CaseService {
CaseConsumptionPlan caseConsumptionPlan = gson.fromJson(json, CaseConsumptionPlan.class);
if (StringUtils.isBlank(caseConsumptionPlan.getCaseConsumptionPlanId())) {
caseConsumptionPlan.setCaseConsumptionPlanId(IdUtil.randomUUID());
if (operator.equals("master")) {
caseConsumptionPlan.setCaseId(IdUtil.randomUUID());
}
caseConsumptionPlanMapper.insert(caseConsumptionPlan);
return new ResultEntity<HttpStatus>(HttpStatus.OK, "新增成功!");
}
@ -772,9 +747,6 @@ public class CaseServiceImpl implements CaseService {
CaseStartAnUndertakingPlan caseStartAnUndertakingPlan = gson.fromJson(json, CaseStartAnUndertakingPlan.class);
if (StringUtils.isBlank(caseStartAnUndertakingPlan.getCaseStartAnUndertakingPlanId())) {
caseStartAnUndertakingPlan.setCaseStartAnUndertakingPlanId(IdUtil.randomUUID());
if (operator.equals("master")) {
caseStartAnUndertakingPlan.setCaseid(IdUtil.randomUUID());
}
caseStartAnUndertakingPlanMapper.insert(caseStartAnUndertakingPlan);
return new ResultEntity<HttpStatus>(HttpStatus.OK, "新增成功!");
}
@ -793,9 +765,6 @@ public class CaseServiceImpl implements CaseService {
CaseRetirementPlan caseRetirementPlan = gson.fromJson(json, CaseRetirementPlan.class);
if (StringUtils.isBlank(caseRetirementPlan.getCaseRetirementPlanId())) {
caseRetirementPlan.setCaseRetirementPlanId(IdUtil.randomUUID());
if (operator.equals("master")) {
caseRetirementPlan.setCaseid(IdUtil.randomUUID());
}
caseRetirementPlanMapper.insert(caseRetirementPlan);
return new ResultEntity<HttpStatus>(HttpStatus.OK, "新增成功!");
}
@ -814,9 +783,6 @@ public class CaseServiceImpl implements CaseService {
CaseInsurancePlan caseInsurancePlan = gson.fromJson(json, CaseInsurancePlan.class);
if (StringUtils.isBlank(caseInsurancePlan.getCaseInsurancePlanId())) {
caseInsurancePlan.setCaseInsurancePlanId(IdUtil.randomUUID());
if (operator.equals("master")) {
caseInsurancePlan.setCaseid(IdUtil.randomUUID());
}
caseInsurancePlanMapper.insert(caseInsurancePlan);
return new ResultEntity<HttpStatus>(HttpStatus.OK, "新增成功!");
}
@ -836,9 +802,6 @@ public class CaseServiceImpl implements CaseService {
CaseTaxPlan caseTaxPlan = gson.fromJson(json, CaseTaxPlan.class);
if (StringUtils.isBlank(caseTaxPlan.getCaseTaxPlanId())) {
caseTaxPlan.setCaseTaxPlanId(IdUtil.randomUUID());
if (operator.equals("master")) {
caseTaxPlan.setCaseid(IdUtil.randomUUID());
}
caseTaxPlanMapper.insert(caseTaxPlan);
return new ResultEntity<HttpStatus>(HttpStatus.OK, "新增成功!");
}
@ -855,9 +818,6 @@ public class CaseServiceImpl implements CaseService {
if (type.equals("财产分配")) {
CaseDistributionOfPropertyFamilyDto dto = gson.fromJson(json, CaseDistributionOfPropertyFamilyDto.class);
if (operator.equals("master")) {
dto.setCaseid(IdUtil.randomUUID());
}
CaseDistributionOfPropertyWithBLOBs caseDistributionOfPropertyWithBLOBs = new CaseDistributionOfPropertyWithBLOBs();
BeanUtils.copyProperties(dto, caseDistributionOfPropertyWithBLOBs);
//id为空 新增
@ -870,12 +830,14 @@ public class CaseServiceImpl implements CaseService {
if (operator.equals("stu")) {
List<CaseDistributionOfPropertyFamilyRecords> recordsList = dto.getCaseDistributionOfPropertyFamilyRecordsList();
List<CaseDistributionOfPropertyFamilyRecords> addList = new ArrayList<>();
for (CaseDistributionOfPropertyFamilyRecords caseDistributionOfPropertyFamilyRecords : recordsList) {
if (StringUtils.isBlank(caseDistributionOfPropertyFamilyRecords.getCaseDistributionOfPropertyFamilyRecordsId())) {
caseDistributionOfPropertyFamilyRecords.setCaseDistributionOfPropertyFamilyRecordsId(IdUtil.randomUUID());
caseDistributionOfPropertyFamilyRecords.setCaseDistributionOfPropertyId(caseDistributionOfPropertyWithBLOBs.getCaseDistributionOfPropertyId());
caseDistributionOfPropertyFamilyRecords.setCreateTime(new Date());
addList.add(caseDistributionOfPropertyFamilyRecords);
if (!recordsList.isEmpty()) {
for (CaseDistributionOfPropertyFamilyRecords caseDistributionOfPropertyFamilyRecords : recordsList) {
if (StringUtils.isBlank(caseDistributionOfPropertyFamilyRecords.getCaseDistributionOfPropertyFamilyRecordsId())) {
caseDistributionOfPropertyFamilyRecords.setCaseDistributionOfPropertyFamilyRecordsId(IdUtil.randomUUID());
caseDistributionOfPropertyFamilyRecords.setCaseDistributionOfPropertyId(caseDistributionOfPropertyWithBLOBs.getCaseDistributionOfPropertyId());
caseDistributionOfPropertyFamilyRecords.setCreateTime(new Date());
addList.add(caseDistributionOfPropertyFamilyRecords);
}
}
}
if (!addList.isEmpty()) {
@ -894,7 +856,7 @@ public class CaseServiceImpl implements CaseService {
caseDistributionOfPropertyMapper.updateByPrimaryKeySelective(caseDistributionOfPropertyWithBLOBs);
List<CaseDistributionOfPropertyFamilyRecords> recordsList = dto.getCaseDistributionOfPropertyFamilyRecordsList();
if (!recordsList.isEmpty()) {
if (recordsList != null && !recordsList.isEmpty()) {
for (CaseDistributionOfPropertyFamilyRecords caseDistributionOfPropertyFamilyRecords : recordsList) {
//先删掉老数据
CaseDistributionOfPropertyFamilyRecordsExample example = new CaseDistributionOfPropertyFamilyRecordsExample();
@ -914,9 +876,6 @@ public class CaseServiceImpl implements CaseService {
CaseHeritageWithBLOBs caseHeritageWithBLOBs = gson.fromJson(json, CaseHeritageWithBLOBs.class);
if (StringUtils.isBlank(caseHeritageWithBLOBs.getCaseHeritageId())) {
caseHeritageWithBLOBs.setCaseHeritageId(IdUtil.randomUUID());
if (operator.equals("master")) {
caseHeritageWithBLOBs.setCaseid(IdUtil.randomUUID());
}
caseHeritageMapper.insert(caseHeritageWithBLOBs);
return new ResultEntity<HttpStatus>(HttpStatus.OK, "新增成功!");
}

Loading…
Cancel
Save