|
|
|
@ -19,6 +19,7 @@ import org.springframework.http.HttpStatus;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
@ -325,9 +326,9 @@ public class CaseController {
|
|
|
|
|
public void countLearnTime(@RequestParam String trainingId,
|
|
|
|
|
@ApiParam("时间,单位分钟") BigDecimal minuter) {
|
|
|
|
|
StuTrainingWithBLOBs stuTrainingWithBLOBs = stuTrainingMapper.selectByPrimaryKey(trainingId);
|
|
|
|
|
if (stuTrainingWithBLOBs.getTrainingTime()==null){
|
|
|
|
|
if (stuTrainingWithBLOBs.getTrainingTime() == null) {
|
|
|
|
|
stuTrainingWithBLOBs.setTrainingTime(minuter);
|
|
|
|
|
}else {
|
|
|
|
|
} else {
|
|
|
|
|
stuTrainingWithBLOBs.setTrainingTime(stuTrainingWithBLOBs.getTrainingTime().add(minuter));
|
|
|
|
|
}
|
|
|
|
|
stuTrainingMapper.updateByPrimaryKeyWithBLOBs(stuTrainingWithBLOBs);
|
|
|
|
@ -337,18 +338,34 @@ public class CaseController {
|
|
|
|
|
@ApiOperation("统计综合规划编辑建议书时间")
|
|
|
|
|
@AnonymousAccess
|
|
|
|
|
public void countCaseTime(@RequestParam String stuClientId,
|
|
|
|
|
@ApiParam("时间,单位分钟") BigDecimal minuter) {
|
|
|
|
|
@ApiParam("时间,单位分钟") BigDecimal minuter) {
|
|
|
|
|
SynthesisPlanClient synthesisPlanClient = synthesisPlanClientMapper.selectByPrimaryKey(stuClientId);
|
|
|
|
|
if (synthesisPlanClient.getSubmitStatus().equals("已审核")||synthesisPlanClient.getSubmitStatus().equals("未审核")){
|
|
|
|
|
if (synthesisPlanClient.getSubmitStatus().equals("已审核") || synthesisPlanClient.getSubmitStatus().equals("未审核")) {
|
|
|
|
|
return;
|
|
|
|
|
}else {
|
|
|
|
|
if (synthesisPlanClient.getUseTime()==null){
|
|
|
|
|
} else {
|
|
|
|
|
if (synthesisPlanClient.getUseTime() == null) {
|
|
|
|
|
synthesisPlanClient.setUseTime(minuter);
|
|
|
|
|
}else {
|
|
|
|
|
} else {
|
|
|
|
|
synthesisPlanClient.setUseTime(synthesisPlanClient.getUseTime().add(minuter));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
synthesisPlanClientMapper.updateByPrimaryKey(synthesisPlanClient);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("getPlanReportTime")
|
|
|
|
|
@ApiOperation("生成规划报告时间")
|
|
|
|
|
@AnonymousAccess
|
|
|
|
|
public void countCaseTime(@RequestParam String caseId,
|
|
|
|
|
@RequestParam String userId) {
|
|
|
|
|
SynthesisPlanClientExample example =new SynthesisPlanClientExample();
|
|
|
|
|
example.createCriteria().andCaseidEqualTo(caseId).andUseridEqualTo(userId);
|
|
|
|
|
List<SynthesisPlanClient> synthesisPlanClients = synthesisPlanClientMapper.selectByExample(example);
|
|
|
|
|
if (!synthesisPlanClients.isEmpty()) {
|
|
|
|
|
SynthesisPlanClient synthesisPlanClient = synthesisPlanClients.get(0);
|
|
|
|
|
synthesisPlanClient.setCreateTime(new Date());
|
|
|
|
|
synthesisPlanClientMapper.updateByPrimaryKey(synthesisPlanClient);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|