TmsTruckLeaveFactoryController.java 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. package com.steerinfo.dil.controller;
  2. import com.steerinfo.dil.service.impl.TmsTruckEnFactoryResultService;
  3. import com.steerinfo.dil.service.impl.TmsTruckLeaveFactoryService;
  4. import com.steerinfo.dil.util.BaseRESTfulController;
  5. import com.steerinfo.framework.controller.RESTfulResult;
  6. import org.springframework.beans.factory.annotation.Autowired;
  7. import org.springframework.web.bind.annotation.PostMapping;
  8. import org.springframework.web.bind.annotation.RequestBody;
  9. import org.springframework.web.bind.annotation.RequestMapping;
  10. import org.springframework.web.bind.annotation.RestController;
  11. import java.util.Map;
  12. /**
  13. * @author luobang
  14. * @create 2021-10-29 17:52
  15. */
  16. @RestController
  17. @RequestMapping("/${api.version}/tmsTruck")
  18. public class TmsTruckLeaveFactoryController extends BaseRESTfulController {
  19. @Autowired
  20. TmsTruckLeaveFactoryService tmsTruckLeaveFactoryService;
  21. @PostMapping("/leaveFactory")
  22. public RESTfulResult addLeaveFactory(@RequestBody(required = true) Map<String,Object> map){
  23. Integer integer=tmsTruckLeaveFactoryService.updateLeaveFactory(map);
  24. if (integer!=1){
  25. return failed();
  26. }
  27. return success();
  28. }
  29. }