xiaoCJ 7 months ago
parent 422b68b687
commit 4183643ee0

@ -41,8 +41,9 @@ public class CaseController {
@ApiOperation("新增/编辑案例老师和管理员新增根据caseInfo中的publish区分都是题目答案学生端新增传isAnswer为学生答案+userId")
private ResultEntity<HttpStatus> insertCase(@ApiParam("左侧caseInfo对象") @RequestParam(required = false) String caseInfo, //todo 传json字符串
@ApiParam("右侧考核点设置的参数对象") @RequestParam String json,
@ApiParam("老师或管理员操作传master,学生操作传stu") String operator) {
return caseService.insertCase(caseInfo, json, operator);
@ApiParam("老师或管理员操作传master,学生操作传stu") String operator,
@ApiParam("风险测评-风险指标/财务分析-资产负债表等等") @RequestParam(required = false) String type) {
return caseService.insertCase(caseInfo, json, operator, type);
}
@PostMapping("/ZHGHType")

@ -9,7 +9,7 @@ import org.springframework.http.HttpStatus;
* @Date 2024/8/12
*/
public interface CaseService {
ResultEntity<HttpStatus> insertCase(String caseInfo, String json, String operator);
ResultEntity<HttpStatus> insertCase(String caseInfo, String json, String operator, String type);
ResultEntity<Object> getExamPoint(String caseID, String userId, String isAnswer, String type);

@ -126,7 +126,7 @@ public class CaseServiceImpl implements CaseService {
}
@Override
public ResultEntity<HttpStatus> insertCase(String caseInfo, String json, String operator) {
public ResultEntity<HttpStatus> insertCase(String caseInfo, String json, String operator, String type) {
Gson gson = new Gson();
CaseInfo newCase = new CaseInfo();
try {
@ -173,10 +173,8 @@ public class CaseServiceImpl implements CaseService {
synthesisPlanClientMapper.updateByPrimaryKeySelective(synthesisPlanClient);
}
}
String type = newCase.getManageMoneyMattersType();
//判断是哪种考核点 增加相关表
ResultEntity resultEntity = addCorrelationTable(type,json,gson,operator);
ResultEntity resultEntity = addCorrelationTable(type, json, gson, operator);
return resultEntity;
}
@ -201,7 +199,7 @@ public class CaseServiceImpl implements CaseService {
}
//添加或编辑相关类型表
public ResultEntity addCorrelationTable(String type,String json,Gson gson,String operator){
public ResultEntity addCorrelationTable(String type, String json, Gson gson, String operator) {
try {
if (StringUtils.isNotBlank(json)) {
if (type.equals("风险测评-风险指标")) {

Loading…
Cancel
Save