|
@@ -16,6 +16,7 @@ import com.ssj.bean.common.framework.core.domain.Response;
|
|
|
import com.ssj.bean.sys.imlibuser.TbClassStudentTemp;
|
|
|
import com.ssj.bean.sys.imlibuser.TbClassTeacherTemp;
|
|
|
import com.ssj.bean.weixin.libmy.domain.TbLibManager;
|
|
|
+import com.ssj.framework.basic.utils.DateHelper;
|
|
|
import com.ssj.framework.core.common.controller.BaseController;
|
|
|
import com.ssj.framework.core.util.Constant;
|
|
|
import com.ssj.framework.core.util.PasswordUtil;
|
|
@@ -281,7 +282,18 @@ public class ApiManagerTeacherController extends BaseController {
|
|
|
Map<String,Object> params=new HashMap<>(4);
|
|
|
try {
|
|
|
params.put("beginDate",req.getBeginDate());
|
|
|
- params.put("endDate",req.getEndDate());
|
|
|
+ LocalTime time = LocalTime.now();
|
|
|
+ String endDate = time.getHour()<12?DateHelper.format(DateHelper.getNextDay(new Date(),-2),"yyyy-MM-dd"):DateHelper.format(DateHelper.getNextDay(new Date(),-1),"yyyy-MM-dd");
|
|
|
+ if(StringUtils.isBlank(req.getBeginDate()) || req.getEndDate().compareTo(endDate)>0){
|
|
|
+ params.put("endDate",endDate);
|
|
|
+ }else{
|
|
|
+ params.put("endDate",req.getEndDate());
|
|
|
+ }
|
|
|
+
|
|
|
+ //显示质检时间,如果当前时间是中午12点前,就限制质检时间为昨天中午12点前,如果是今天就限制为今天12点前
|
|
|
+ String checkDate = DateHelper.format(DateHelper.getNextDay(DateHelper.parseDate(params.get("endDate").toString(),"yyyy-MM-dd"),1),"yyyy-MM-dd").concat(" 12:00:00");
|
|
|
+
|
|
|
+ params.put("checkDate",checkDate);
|
|
|
params.put("teacherId",req.getTeacherId());
|
|
|
params.put("subject",req.getSubject());
|
|
|
Map<String,Object> data = statisticsService.errorList(params,initPage(req.getPageNo(),req.getPageSize()));
|
|
@@ -466,14 +478,14 @@ public class ApiManagerTeacherController extends BaseController {
|
|
|
private List<Map<String,Object>> getSalaryList(String userId){
|
|
|
//计算今天日期
|
|
|
LocalDate date = LocalDate.now();
|
|
|
-// int day = date.getDayOfMonth();
|
|
|
-// LocalTime time = LocalTime.now();
|
|
|
-// boolean lastMonth = day< 4 || (day==4 && time.getHour()<12);
|
|
|
-// LocalDate localDate = lastMonth?date.minusMonths(2):date.minusMonths(1);
|
|
|
-// int month = localDate.getMonthValue();
|
|
|
-// int year = localDate.getYear();
|
|
|
- int month = date.getMonthValue();
|
|
|
- int year = date.getYear();
|
|
|
+ int day = date.getDayOfMonth();
|
|
|
+ LocalTime time = LocalTime.now();
|
|
|
+ boolean lastMonth = day< 4 || (day==4 && time.getHour()<12);
|
|
|
+ LocalDate localDate = lastMonth?date.minusMonths(2):date.minusMonths(1);
|
|
|
+ int month = localDate.getMonthValue();
|
|
|
+ int year = localDate.getYear();
|
|
|
+// int month = date.getMonthValue();
|
|
|
+// int year = date.getYear();
|
|
|
return teacherPayService.salaryList(userId,month,year);
|
|
|
}
|
|
|
|