教师端修改考核状态

master
pd 4 years ago
parent d48bffbfae
commit afc92e7775
  1. 2
      src/main/java/com/yipin/liuwanr/controller/AssesmentController.java
  2. 2
      src/main/java/com/yipin/liuwanr/mapper/AssesmentMapper.java
  3. 6
      src/main/java/com/yipin/liuwanr/service/AssesmentService.java

@ -523,5 +523,7 @@ public class AssesmentController {
}
return resp;
}
}

@ -180,7 +180,7 @@ public interface AssesmentMapper {
@Update({"<script>",
"update assessment set assesmentState=#{assesmentState} " +
"<if test='releaseType==0 and assesmentState==1'>,creationTime=#{creationTime},endTime=#{endTime}</if>",
"<if test='assesmentState==2'>,endTime=#{endTime} </if>",
"<if test='assesmentState==2 and timesum!=null'>,endTime=#{endTime},timesum=#{timesum} </if>",
"where id=#{id}",
"</script>"})
void updateAssesmentState(Assesment assesment);

@ -276,7 +276,11 @@ public class AssesmentService {
endtime = Long.parseLong(assesment.getEndTime());
assesment.setEndTime(AssesmentHelper.longPointDate(endtime));
}
if (timeSum != null && !timeSum.equals("")) {
if(assesment.getReleaseType().equals(2)&&!StringUtils.isEmpty(timeSum)){
long time=Long.parseLong(timeSum);
String gapTime=AssesmentHelper.getGapTime(time);
assesment.setTimesum(gapTime);
}else if (assesment.getReleaseType().equals(1)&&!StringUtils.isEmpty(timeSum)) {
datas = timeSum.split("h");
if (datas != null && datas.length > 0) {
hour = Integer.parseInt(datas[0]);

Loading…
Cancel
Save