| | |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.domain.param.CreateOutTaskBatchParam; |
| | | import com.zy.asrs.domain.param.CancelTaskParam; |
| | | import com.zy.asrs.domain.param.CompleteTaskParam; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import com.zy.common.service.CommonService; |
| | | import com.zy.common.web.BaseController; |
| | | import com.zy.system.service.HighPrivilegeGrantService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | private WrkMastService wrkMastService; |
| | | @Autowired |
| | | private CommonService commonService; |
| | | @Autowired |
| | | private HighPrivilegeGrantService highPrivilegeGrantService; |
| | | |
| | | @RequestMapping(value = "/wrkMast/list/auth") |
| | | @ManagerAuth |
| | |
| | | return R.error("生成批量出库任务失败"); |
| | | } |
| | | |
| | | @PostMapping(value = "/wrkMast/complete/auth") |
| | | @ManagerAuth(memo = "工作档完成任务") |
| | | public R completeTask(@RequestBody CompleteTaskParam param) { |
| | | if (param == null) { |
| | | return R.error("参数不能为空"); |
| | | } |
| | | highPrivilegeGrantService.assertGranted(request.getHeader("token"), "完成任务"); |
| | | return commonService.completeTask(param) ? R.ok() : R.error("任务完成失败"); |
| | | } |
| | | |
| | | @PostMapping(value = "/wrkMast/cancel/auth") |
| | | @ManagerAuth(memo = "工作档取消任务") |
| | | public R cancelTask(@RequestBody CancelTaskParam param) { |
| | | if (param == null) { |
| | | return R.error("参数不能为空"); |
| | | } |
| | | highPrivilegeGrantService.assertGranted(request.getHeader("token"), "取消任务"); |
| | | return commonService.cancelTask(param) ? R.ok() : R.error("任务取消失败"); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, QueryWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |