Browse Source

新增字段

master
董书康 1 year ago
parent
commit
520c47e073
2 changed files with 10 additions and 1 deletions
  1. +2
    -1
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/entity/CpsQuestionInfo.java
  2. +8
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/cps/CpsQuestionCreateService.java

+ 2
- 1
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/entity/CpsQuestionInfo.java View File

@ -28,9 +28,10 @@ public class CpsQuestionInfo extends BaseMgrEntity<CpsQuestionInfo> {
private Date questionTime;
private String questionLevel;
private String importanceLevel;
private String timesOneDay;
private Integer timesOneDay;
private String questionInformation;
private String responsiblePerson;
private String responsiblePersonName;
private String containmentMeasures;
private String rootCauseIdentification;
private String correctiveActions;


+ 8
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/cps/CpsQuestionCreateService.java View File

@ -15,6 +15,7 @@ import com.digiwin.athena.app.infra.service.CpsQuestionInfoService;
import com.digiwin.athena.opt.common.eai.EAIRequest;
import com.digiwin.athena.opt.common.eai.EAIUtil;
import com.digiwin.athena.opt.common.eai.service.AbsEAIService;
import com.digiwin.athena.opt.common.security.SecurityUtil;
import javax.annotation.Resource;
import java.util.List;
@ -43,8 +44,15 @@ public class CpsQuestionCreateService extends AbsEAIService {
List<CpsQuestionInfo> questionInfo = request.getObject("question_info", new TypeReference<List<CpsQuestionInfo>>() {
});
questionInfo.forEach(o->{
o.setResponsiblePerson(SecurityUtil.getUserProfile().getUserId());
o.setResponsiblePersonName(SecurityUtil.getUserProfile().getUserName());
});
cpsQuestionInfoService.saveBatch(questionInfo);
return buildOK("question_info", questionInfo);
}
}

Loading…
Cancel
Save