|
@@ -17,10 +17,7 @@ import com.mokamrp.privates.mapper.pangu.pojo.FosterwxMobile;
|
|
|
import com.mokamrp.privates.mapper.pangu.pojo.FosterwxMobileWxfriend;
|
|
import com.mokamrp.privates.mapper.pangu.pojo.FosterwxMobileWxfriend;
|
|
|
import com.mokamrp.privates.mapper.pangu.pojo.FosterwxStation;
|
|
import com.mokamrp.privates.mapper.pangu.pojo.FosterwxStation;
|
|
|
import com.mokamrp.privates.mapper.pojo.User;
|
|
import com.mokamrp.privates.mapper.pojo.User;
|
|
|
-import com.mokamrp.privates.service.pangu.FosterwxMobileService;
|
|
|
|
|
-import com.mokamrp.privates.service.pangu.FosterwxMobileWxfriendService;
|
|
|
|
|
-import com.mokamrp.privates.service.pangu.FosterwxStationService;
|
|
|
|
|
-import com.mokamrp.privates.service.pangu.FosterwxTaskScheduleService;
|
|
|
|
|
|
|
+import com.mokamrp.privates.service.pangu.*;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.validation.BindingResult;
|
|
import org.springframework.validation.BindingResult;
|
|
@@ -30,6 +27,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|
|
import javax.validation.Valid;
|
|
import javax.validation.Valid;
|
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
|
|
+import java.util.Calendar;
|
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
@@ -208,10 +206,22 @@ public class FosterwxMobileController extends BaseController<FosterwxMobile> {
|
|
|
|
|
|
|
|
@PostMapping("/getTaskList")
|
|
@PostMapping("/getTaskList")
|
|
|
public Object getTaskList(@Valid @RequestBody GetForsterwxMobileHandle getForsterwxMobileHandle) {
|
|
public Object getTaskList(@Valid @RequestBody GetForsterwxMobileHandle getForsterwxMobileHandle) {
|
|
|
- Integer StationId = getForsterwxMobileHandle.getStationId();
|
|
|
|
|
|
|
+ Integer stationId = getForsterwxMobileHandle.getStationId();
|
|
|
Integer mobileCode = getForsterwxMobileHandle.getMobileCode();
|
|
Integer mobileCode = getForsterwxMobileHandle.getMobileCode();
|
|
|
|
|
|
|
|
- return AjaxResult.success(fosterwxTaskScheduleService.getTaskListByMobileCode(StationId, mobileCode));
|
|
|
|
|
|
|
+ Calendar c = Calendar.getInstance();
|
|
|
|
|
+ c.set(Integer.valueOf(getForsterwxMobileHandle.getYear()), Integer.valueOf(getForsterwxMobileHandle.getMonth()), 0);
|
|
|
|
|
+ int dayOfMonth = c.get(Calendar.DAY_OF_MONTH);
|
|
|
|
|
+
|
|
|
|
|
+ Map<String, Object> res = new HashMap<>();
|
|
|
|
|
+ for (int i = 1; i <= dayOfMonth; i++) {
|
|
|
|
|
+ String date = getForsterwxMobileHandle.getYear() + "-" + String.format("%02d", Integer.valueOf(getForsterwxMobileHandle.getMonth())) + "-" + String.format("%02d", i);
|
|
|
|
|
+
|
|
|
|
|
+ res.put(date, fosterwxTaskScheduleService.getTaskListByMobileCode(stationId, mobileCode, date));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ return AjaxResult.success(res);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@PostMapping("/editMobile")
|
|
@PostMapping("/editMobile")
|