| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.text.DateFormat; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | |
| | | projectPlan.setModifyTime(new Date()); |
| | | projectPlan.setModifyId(getUserId()); |
| | | |
| | | projectPlanService.updateById(projectPlan); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping("/projectPlan/update/homepage") |
| | | public R updateByHomepage(@RequestParam HashMap<String,Object> param){ |
| | | String itemId = (String) param.get("itemId"); |
| | | String weightNum = (String) param.get("weightNum"); |
| | | String realStartTime = (String) param.get("realStartTime"); |
| | | String realEndTime = (String) param.get("realEndTime"); |
| | | ProjectPlan projectPlan = projectPlanService.selectOne(new EntityWrapper<ProjectPlan>() |
| | | .eq("item_id", itemId) |
| | | .eq("weight_num", weightNum)); |
| | | try { |
| | | projectPlan.setRealStartTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(realStartTime)); |
| | | projectPlan.setRealEndTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(realEndTime)); |
| | | } catch (ParseException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | projectPlanService.updateById(projectPlan); |
| | | return R.ok(); |
| | | } |
| | |
| | | for (Item item : itemsArray) { |
| | | ItemDTO itemDto = new ItemDTO(); |
| | | itemDto.setProjectName(item.getName()); |
| | | itemDto.setProjectType(item.getType()); |
| | | itemDto.setProjectType(item.getType$()); |
| | | itemDto.setProjectStartTime(item.getStartTime$()); |
| | | itemDto.setProjectEndTime(item.getEndTime$()); |
| | | List<ProjectPlan> projectPlans = projectPlanService.selectList(new EntityWrapper<ProjectPlan>() |