whycq
2022-09-06 5ec06e72f39cae4dd599af6aa798c84c1919528b
src/main/java/zy/cloud/wms/manager/controller/ProjectPlanController.java
@@ -18,6 +18,9 @@
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
@@ -126,6 +129,25 @@
        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();
    }
    @RequestMapping(value = "/projectPlan/delete/auth")
    @ManagerAuth
    public R delete(@RequestParam(value = "ids[]") Long[] ids) {