| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: 班次表(次表) |
| | |
| | | |
| | | /** |
| | | * 班次表(次表)-分页查询 |
| | | * |
| | | * @param shiftId |
| | | * @param pageNo |
| | | * @param pageSize |
| | |
| | | |
| | | /** |
| | | * 班次表(次表)-新增 |
| | | * |
| | | * @param mdcShiftSub |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "班次表(次表)-新增") |
| | | @ApiOperation(value = "班次表(次表)-新增", notes = "班次表(次表)-新增") |
| | | @PostMapping("/addShiftSub") |
| | | public Result<?> addShiftSub(@RequestBody JSONObject jsonbject) { |
| | | public Result<?> addShiftSub(@RequestBody MdcShiftSub mdcShiftSub) { |
| | | //处理是否存在空值 |
| | | if (jsonbject.getDate("sleepStartDate") != null || jsonbject.getDate("sleepEndDate") != null ) { |
| | | if (jsonbject.getDate("sleepEndDate") == null || jsonbject.getDate("sleepStartDate") == null) { |
| | | if (StringUtils.isNotEmpty(mdcShiftSub.getSleepStartDate()) || StringUtils.isNotEmpty(mdcShiftSub.getSleepEndDate())) { |
| | | if (StringUtils.isEmpty(mdcShiftSub.getSleepEndDate()) || StringUtils.isEmpty(mdcShiftSub.getSleepStartDate())) { |
| | | return Result.error("新增失败,休息时间选择不对"); |
| | | } |
| | | } |
| | | MdcShiftSub result = mdcShiftSubService.addMdcShiftSub(jsonbject); |
| | | MdcShiftSub result = mdcShiftSubService.addMdcShiftSub(mdcShiftSub); |
| | | return Result.OK(result); |
| | | } |
| | | |
| | | /** |
| | | * 班次表(次表)-修改 |
| | | * |
| | | * @param mdcShiftSub |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 班次表(次表)-根据id修改子表状态 |
| | | * |
| | | * @param jsonObject |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 班次表(次表)-根据id删除 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | |
| | | public Result<?> deleteMdcShiftSub(@RequestParam String id){ |
| | | return mdcShiftSubService.deleteMdcShiftSub(id); |
| | | } |
| | | |
| | | /** |
| | | * 班次表(次表)-根据id删除 |
| | | * |
| | | * @param shiftId |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "班次表(次表)-根据班制id获取班次下拉列表") |
| | | @ApiOperation(value = "班次表(次表)-根据班制id获取班次下拉列表", notes = "班次表(次表)-根据班制id获取班次下拉列表") |
| | | @GetMapping("/initShiftSubList") |
| | | public Result<?> initShiftSubList(@RequestParam(name = "shiftId", required = true) String shiftId) { |
| | | List<Map<String, String>> result = mdcShiftSubService.initShiftSubList(shiftId); |
| | | return Result.OK(result); |
| | | } |
| | | } |