#修改
1. 新增任务档
2. 新增任务档明细
3. 修改组拖接口源
| | |
| | | package com.vincent.rsf.server.api.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.vincent.rsf.framework.common.R; |
| | | import com.vincent.rsf.framework.exception.CoolException; |
| | | import com.vincent.rsf.server.api.controller.params.OtherReceiptParams; |
| | | import com.vincent.rsf.server.api.controller.params.ReceiptParams; |
| | | import com.vincent.rsf.server.api.service.MobileService; |
| | | import com.vincent.rsf.server.manager.controller.params.WaitPakinParam; |
| | | import com.vincent.rsf.server.manager.entity.AsnOrderItem; |
| | | import com.vincent.rsf.server.system.controller.BaseController; |
| | | import com.vincent.rsf.server.system.controller.param.LoginParam; |
| | | import io.swagger.annotations.Api; |
| | |
| | | } |
| | | |
| | | |
| | | @PreAuthorize("hasAuthority('manager:asnOrderItem:list')") |
| | | @ApiOperation("获取订单物料明细") |
| | | @GetMapping("/asnOrderItem/trackCode/{code}") |
| | | public R getItemByTrackCode(@PathVariable String code) { |
| | | if (StringUtils.isBlank(code)) { |
| | | return R.error("编码不能为空!!"); |
| | | } |
| | | return R.ok(mobileService.getDeltByCode(code)); |
| | | } |
| | | |
| | | |
| | | @PreAuthorize("hasAuthority('manager:waitPakin:update')") |
| | | @ApiOperation("组拖") |
| | | @PostMapping("/waitPakin/merge") |
| | | public R pikinOrder(@RequestBody WaitPakinParam waitPakin) { |
| | | if (Objects.isNull(waitPakin)) { |
| | | return R.error("参数不能为空!!"); |
| | | } |
| | | if (org.apache.commons.lang3.StringUtils.isBlank(waitPakin.getBarcode())) { |
| | | return R.error("托盘码不能为空!!"); |
| | | } |
| | | if (Objects.isNull(waitPakin.getItems()) || waitPakin.getItems().isEmpty()) { |
| | | return R.error("跟踪码不能为空!!"); |
| | | } |
| | | return R.ok(mobileService.mergeItems(waitPakin)); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:waitPakin:update')") |
| | | @ApiOperation("组拖解绑") |
| | | @PostMapping("/waitPakin/unbind") |
| | | public R pakinUnBind(@RequestBody WaitPakinParam param) { |
| | | if (Objects.isNull(param)) { |
| | | return R.error("参数不能为空!!"); |
| | | } |
| | | if (org.apache.commons.lang3.StringUtils.isBlank(param.getBarcode())) { |
| | | return R.error("托盘码不能为空!!"); |
| | | } |
| | | if (Objects.isNull(param.getItems()) || param.getItems().isEmpty()) { |
| | | return R.error("跟踪码不能为空!!"); |
| | | } |
| | | return R.ok(mobileService.unBind(param)); |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | import com.vincent.rsf.framework.common.R; |
| | | import com.vincent.rsf.server.api.controller.params.OtherReceiptParams; |
| | | import com.vincent.rsf.server.api.controller.params.ReceiptParams; |
| | | import com.vincent.rsf.server.manager.controller.params.WaitPakinParam; |
| | | import com.vincent.rsf.server.manager.entity.AsnOrder; |
| | | import com.vincent.rsf.server.manager.entity.WaitPakin; |
| | | import com.vincent.rsf.server.system.controller.param.LoginParam; |
| | | import com.vincent.rsf.server.system.entity.Fields; |
| | | |
| | |
| | | R getReceiptAreas(); |
| | | |
| | | List<Fields> getDynamicFields(); |
| | | |
| | | R getDeltByCode(String code); |
| | | |
| | | WaitPakin mergeItems(WaitPakinParam waitPakin); |
| | | |
| | | WaitPakin unBind(WaitPakinParam param); |
| | | } |
| | |
| | | import com.vincent.rsf.server.common.security.JwtSubject; |
| | | import com.vincent.rsf.server.common.utils.CommonUtil; |
| | | import com.vincent.rsf.server.common.utils.JwtUtil; |
| | | import com.vincent.rsf.server.manager.controller.params.WaitPakinParam; |
| | | import com.vincent.rsf.server.manager.entity.*; |
| | | import com.vincent.rsf.server.manager.mapper.*; |
| | | import com.vincent.rsf.server.manager.service.AsnOrderItemLogService; |
| | | import com.vincent.rsf.server.manager.service.AsnOrderLogService; |
| | | import com.vincent.rsf.server.manager.service.WarehouseAreasItemService; |
| | | import com.vincent.rsf.server.manager.service.WarehouseAreasService; |
| | | import com.vincent.rsf.server.manager.service.*; |
| | | import com.vincent.rsf.server.system.constant.CodeRes; |
| | | import com.vincent.rsf.server.system.constant.SerialRuleCode; |
| | | import com.vincent.rsf.server.system.controller.param.LoginParam; |
| | |
| | | |
| | | @Autowired |
| | | private AsnOrderLogService asnOrderLogService; |
| | | |
| | | @Autowired |
| | | private WaitPakinService waitPakinService; |
| | | |
| | | @Autowired |
| | | private WaitPakinItemService waitPakinItemService; |
| | | |
| | | @Autowired |
| | | private AsnOrderItemLogService asnOrderItemLogService; |
| | |
| | | return fieldsMapper.selectList(new LambdaQueryWrapper<Fields>().eq(Fields::getFlagEnable, 1).eq(Fields::getStatus, 1)); |
| | | } |
| | | |
| | | @Override |
| | | public R getDeltByCode(String code) { |
| | | return R.ok(asnOrderItemMapper.selectOne(new LambdaQueryWrapper<AsnOrderItem>().eq(AsnOrderItem::getTrackCode, code))); |
| | | } |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @description PDA组拖 |
| | | * @param |
| | | * @return |
| | | * @time 2025/3/29 14:26 |
| | | */ |
| | | @Override |
| | | public WaitPakin mergeItems(WaitPakinParam waitPakin) { |
| | | return waitPakinService.mergeItems(waitPakin); |
| | | } |
| | | |
| | | @Override |
| | | public WaitPakin unBind(WaitPakinParam param) { |
| | | |
| | | return waitPakinService.unBind(param); |
| | | } |
| | | |
| | | /** |
| | | * 获取ReceiptDetlsDtos |
| | | */ |
| | |
| | | // generator.username="sa"; |
| | | // generator.password="Zoneyung@zy56$"; |
| | | |
| | | generator.table="man_wait_pakin_item_log"; |
| | | generator.tableDesc="组拖明细历史档"; |
| | | generator.table="man_task_log"; |
| | | generator.tableDesc="任务工作历史档"; |
| | | generator.packagePath="com.vincent.rsf.server.manager"; |
| | | |
| | | generator.build(); |
| | |
| | | return asnOrderItemService.generateBarcode(orders); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:asnOrderItem:list')") |
| | | @ApiOperation("获取订单物料明细") |
| | | @GetMapping("/asnOrderItem/trackCode/{code}") |
| | | public R getItemByTrackCode(@PathVariable String code) { |
| | | return R.ok(asnOrderItemService.getOne(new LambdaQueryWrapper<AsnOrderItem>().eq(AsnOrderItem::getTrackCode, code))); |
| | | } |
| | | /** |
| | | * ASN单据明细导入 |
| | | * @param file |
New file |
| | |
| | | package com.vincent.rsf.server.manager.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.R; |
| | | import com.vincent.rsf.server.common.utils.ExcelUtil; |
| | | import com.vincent.rsf.server.common.annotation.OperationLog; |
| | | import com.vincent.rsf.server.common.domain.BaseParam; |
| | | import com.vincent.rsf.server.common.domain.KeyValVo; |
| | | import com.vincent.rsf.server.common.domain.PageParam; |
| | | import com.vincent.rsf.server.manager.entity.Task; |
| | | import com.vincent.rsf.server.manager.service.TaskService; |
| | | import com.vincent.rsf.server.system.controller.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class TaskController extends BaseController { |
| | | |
| | | @Autowired |
| | | private TaskService taskService; |
| | | |
| | | @PreAuthorize("hasAuthority('manager:task:list')") |
| | | @PostMapping("/task/page") |
| | | public R page(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<Task, BaseParam> pageParam = new PageParam<>(baseParam, Task.class); |
| | | return R.ok().add(taskService.page(pageParam, pageParam.buildWrapper(true))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:task:list')") |
| | | @PostMapping("/task/list") |
| | | public R list(@RequestBody Map<String, Object> map) { |
| | | return R.ok().add(taskService.list()); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:task:list')") |
| | | @PostMapping({"/task/many/{ids}", "/tasks/many/{ids}"}) |
| | | public R many(@PathVariable Long[] ids) { |
| | | return R.ok().add(taskService.listByIds(Arrays.asList(ids))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:task:list')") |
| | | @GetMapping("/task/{id}") |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok().add(taskService.getById(id)); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:task:save')") |
| | | @OperationLog("Create 任务工作档") |
| | | @PostMapping("/task/save") |
| | | public R save(@RequestBody Task task) { |
| | | task.setCreateBy(getLoginUserId()); |
| | | task.setCreateTime(new Date()); |
| | | task.setUpdateBy(getLoginUserId()); |
| | | task.setUpdateTime(new Date()); |
| | | if (!taskService.save(task)) { |
| | | return R.error("Save Fail"); |
| | | } |
| | | return R.ok("Save Success").add(task); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:task:update')") |
| | | @OperationLog("Update 任务工作档") |
| | | @PostMapping("/task/update") |
| | | public R update(@RequestBody Task task) { |
| | | task.setUpdateBy(getLoginUserId()); |
| | | task.setUpdateTime(new Date()); |
| | | if (!taskService.updateById(task)) { |
| | | return R.error("Update Fail"); |
| | | } |
| | | return R.ok("Update Success").add(task); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:task:remove')") |
| | | @OperationLog("Delete 任务工作档") |
| | | @PostMapping("/task/remove/{ids}") |
| | | public R remove(@PathVariable Long[] ids) { |
| | | if (!taskService.removeByIds(Arrays.asList(ids))) { |
| | | return R.error("Delete Fail"); |
| | | } |
| | | return R.ok("Delete Success").add(ids); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:task:list')") |
| | | @PostMapping("/task/query") |
| | | public R query(@RequestParam(required = false) String condition) { |
| | | List<KeyValVo> vos = new ArrayList<>(); |
| | | LambdaQueryWrapper<Task> wrapper = new LambdaQueryWrapper<>(); |
| | | if (!Cools.isEmpty(condition)) { |
| | | wrapper.like(Task::getId, condition); |
| | | } |
| | | taskService.page(new Page<>(1, 30), wrapper).getRecords().forEach( |
| | | item -> vos.add(new KeyValVo(item.getId(), item.getId())) |
| | | ); |
| | | return R.ok().add(vos); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:task:list')") |
| | | @PostMapping("/task/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(taskService.list(), Task.class), response); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.R; |
| | | import com.vincent.rsf.server.common.utils.ExcelUtil; |
| | | import com.vincent.rsf.server.common.annotation.OperationLog; |
| | | import com.vincent.rsf.server.common.domain.BaseParam; |
| | | import com.vincent.rsf.server.common.domain.KeyValVo; |
| | | import com.vincent.rsf.server.common.domain.PageParam; |
| | | import com.vincent.rsf.server.manager.entity.TaskItem; |
| | | import com.vincent.rsf.server.manager.service.TaskItemService; |
| | | import com.vincent.rsf.server.system.controller.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class TaskItemController extends BaseController { |
| | | |
| | | @Autowired |
| | | private TaskItemService taskItemService; |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItem:list')") |
| | | @PostMapping("/taskItem/page") |
| | | public R page(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<TaskItem, BaseParam> pageParam = new PageParam<>(baseParam, TaskItem.class); |
| | | return R.ok().add(taskItemService.page(pageParam, pageParam.buildWrapper(true))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItem:list')") |
| | | @PostMapping("/taskItem/list") |
| | | public R list(@RequestBody Map<String, Object> map) { |
| | | return R.ok().add(taskItemService.list()); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItem:list')") |
| | | @PostMapping({"/taskItem/many/{ids}", "/taskItems/many/{ids}"}) |
| | | public R many(@PathVariable Long[] ids) { |
| | | return R.ok().add(taskItemService.listByIds(Arrays.asList(ids))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItem:list')") |
| | | @GetMapping("/taskItem/{id}") |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok().add(taskItemService.getById(id)); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItem:save')") |
| | | @OperationLog("Create 任务工作档") |
| | | @PostMapping("/taskItem/save") |
| | | public R save(@RequestBody TaskItem taskItem) { |
| | | taskItem.setCreateBy(getLoginUserId()); |
| | | taskItem.setCreateTime(new Date()); |
| | | taskItem.setUpdateBy(getLoginUserId()); |
| | | taskItem.setUpdateTime(new Date()); |
| | | if (!taskItemService.save(taskItem)) { |
| | | return R.error("Save Fail"); |
| | | } |
| | | return R.ok("Save Success").add(taskItem); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItem:update')") |
| | | @OperationLog("Update 任务工作档") |
| | | @PostMapping("/taskItem/update") |
| | | public R update(@RequestBody TaskItem taskItem) { |
| | | taskItem.setUpdateBy(getLoginUserId()); |
| | | taskItem.setUpdateTime(new Date()); |
| | | if (!taskItemService.updateById(taskItem)) { |
| | | return R.error("Update Fail"); |
| | | } |
| | | return R.ok("Update Success").add(taskItem); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItem:remove')") |
| | | @OperationLog("Delete 任务工作档") |
| | | @PostMapping("/taskItem/remove/{ids}") |
| | | public R remove(@PathVariable Long[] ids) { |
| | | if (!taskItemService.removeByIds(Arrays.asList(ids))) { |
| | | return R.error("Delete Fail"); |
| | | } |
| | | return R.ok("Delete Success").add(ids); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItem:list')") |
| | | @PostMapping("/taskItem/query") |
| | | public R query(@RequestParam(required = false) String condition) { |
| | | List<KeyValVo> vos = new ArrayList<>(); |
| | | LambdaQueryWrapper<TaskItem> wrapper = new LambdaQueryWrapper<>(); |
| | | if (!Cools.isEmpty(condition)) { |
| | | wrapper.like(TaskItem::getId, condition); |
| | | } |
| | | taskItemService.page(new Page<>(1, 30), wrapper).getRecords().forEach( |
| | | item -> vos.add(new KeyValVo(item.getId(), item.getId())) |
| | | ); |
| | | return R.ok().add(vos); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItem:list')") |
| | | @PostMapping("/taskItem/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(taskItemService.list(), TaskItem.class), response); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.R; |
| | | import com.vincent.rsf.server.common.utils.ExcelUtil; |
| | | import com.vincent.rsf.server.common.annotation.OperationLog; |
| | | import com.vincent.rsf.server.common.domain.BaseParam; |
| | | import com.vincent.rsf.server.common.domain.KeyValVo; |
| | | import com.vincent.rsf.server.common.domain.PageParam; |
| | | import com.vincent.rsf.server.manager.entity.TaskItemLog; |
| | | import com.vincent.rsf.server.manager.service.TaskItemLogService; |
| | | import com.vincent.rsf.server.system.controller.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class TaskItemLogController extends BaseController { |
| | | |
| | | @Autowired |
| | | private TaskItemLogService taskItemLogService; |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItemLog:list')") |
| | | @PostMapping("/taskItemLog/page") |
| | | public R page(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<TaskItemLog, BaseParam> pageParam = new PageParam<>(baseParam, TaskItemLog.class); |
| | | return R.ok().add(taskItemLogService.page(pageParam, pageParam.buildWrapper(true))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItemLog:list')") |
| | | @PostMapping("/taskItemLog/list") |
| | | public R list(@RequestBody Map<String, Object> map) { |
| | | return R.ok().add(taskItemLogService.list()); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItemLog:list')") |
| | | @PostMapping({"/taskItemLog/many/{ids}", "/taskItemLogs/many/{ids}"}) |
| | | public R many(@PathVariable Long[] ids) { |
| | | return R.ok().add(taskItemLogService.listByIds(Arrays.asList(ids))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItemLog:list')") |
| | | @GetMapping("/taskItemLog/{id}") |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok().add(taskItemLogService.getById(id)); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItemLog:save')") |
| | | @OperationLog("Create 任务工作历史档") |
| | | @PostMapping("/taskItemLog/save") |
| | | public R save(@RequestBody TaskItemLog taskItemLog) { |
| | | taskItemLog.setCreateBy(getLoginUserId()); |
| | | taskItemLog.setCreateTime(new Date()); |
| | | taskItemLog.setUpdateBy(getLoginUserId()); |
| | | taskItemLog.setUpdateTime(new Date()); |
| | | if (!taskItemLogService.save(taskItemLog)) { |
| | | return R.error("Save Fail"); |
| | | } |
| | | return R.ok("Save Success").add(taskItemLog); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItemLog:update')") |
| | | @OperationLog("Update 任务工作历史档") |
| | | @PostMapping("/taskItemLog/update") |
| | | public R update(@RequestBody TaskItemLog taskItemLog) { |
| | | taskItemLog.setUpdateBy(getLoginUserId()); |
| | | taskItemLog.setUpdateTime(new Date()); |
| | | if (!taskItemLogService.updateById(taskItemLog)) { |
| | | return R.error("Update Fail"); |
| | | } |
| | | return R.ok("Update Success").add(taskItemLog); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItemLog:remove')") |
| | | @OperationLog("Delete 任务工作历史档") |
| | | @PostMapping("/taskItemLog/remove/{ids}") |
| | | public R remove(@PathVariable Long[] ids) { |
| | | if (!taskItemLogService.removeByIds(Arrays.asList(ids))) { |
| | | return R.error("Delete Fail"); |
| | | } |
| | | return R.ok("Delete Success").add(ids); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItemLog:list')") |
| | | @PostMapping("/taskItemLog/query") |
| | | public R query(@RequestParam(required = false) String condition) { |
| | | List<KeyValVo> vos = new ArrayList<>(); |
| | | LambdaQueryWrapper<TaskItemLog> wrapper = new LambdaQueryWrapper<>(); |
| | | if (!Cools.isEmpty(condition)) { |
| | | wrapper.like(TaskItemLog::getId, condition); |
| | | } |
| | | taskItemLogService.page(new Page<>(1, 30), wrapper).getRecords().forEach( |
| | | item -> vos.add(new KeyValVo(item.getId(), item.getId())) |
| | | ); |
| | | return R.ok().add(vos); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskItemLog:list')") |
| | | @PostMapping("/taskItemLog/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(taskItemLogService.list(), TaskItemLog.class), response); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.R; |
| | | import com.vincent.rsf.server.common.utils.ExcelUtil; |
| | | import com.vincent.rsf.server.common.annotation.OperationLog; |
| | | import com.vincent.rsf.server.common.domain.BaseParam; |
| | | import com.vincent.rsf.server.common.domain.KeyValVo; |
| | | import com.vincent.rsf.server.common.domain.PageParam; |
| | | import com.vincent.rsf.server.manager.entity.TaskLog; |
| | | import com.vincent.rsf.server.manager.service.TaskLogService; |
| | | import com.vincent.rsf.server.system.controller.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class TaskLogController extends BaseController { |
| | | |
| | | @Autowired |
| | | private TaskLogService taskLogService; |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskLog:list')") |
| | | @PostMapping("/taskLog/page") |
| | | public R page(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<TaskLog, BaseParam> pageParam = new PageParam<>(baseParam, TaskLog.class); |
| | | return R.ok().add(taskLogService.page(pageParam, pageParam.buildWrapper(true))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskLog:list')") |
| | | @PostMapping("/taskLog/list") |
| | | public R list(@RequestBody Map<String, Object> map) { |
| | | return R.ok().add(taskLogService.list()); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskLog:list')") |
| | | @PostMapping({"/taskLog/many/{ids}", "/taskLogs/many/{ids}"}) |
| | | public R many(@PathVariable Long[] ids) { |
| | | return R.ok().add(taskLogService.listByIds(Arrays.asList(ids))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskLog:list')") |
| | | @GetMapping("/taskLog/{id}") |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok().add(taskLogService.getById(id)); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskLog:save')") |
| | | @OperationLog("Create 任务工作历史档") |
| | | @PostMapping("/taskLog/save") |
| | | public R save(@RequestBody TaskLog taskLog) { |
| | | taskLog.setCreateBy(getLoginUserId()); |
| | | taskLog.setCreateTime(new Date()); |
| | | taskLog.setUpdateBy(getLoginUserId()); |
| | | taskLog.setUpdateTime(new Date()); |
| | | if (!taskLogService.save(taskLog)) { |
| | | return R.error("Save Fail"); |
| | | } |
| | | return R.ok("Save Success").add(taskLog); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskLog:update')") |
| | | @OperationLog("Update 任务工作历史档") |
| | | @PostMapping("/taskLog/update") |
| | | public R update(@RequestBody TaskLog taskLog) { |
| | | taskLog.setUpdateBy(getLoginUserId()); |
| | | taskLog.setUpdateTime(new Date()); |
| | | if (!taskLogService.updateById(taskLog)) { |
| | | return R.error("Update Fail"); |
| | | } |
| | | return R.ok("Update Success").add(taskLog); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskLog:remove')") |
| | | @OperationLog("Delete 任务工作历史档") |
| | | @PostMapping("/taskLog/remove/{ids}") |
| | | public R remove(@PathVariable Long[] ids) { |
| | | if (!taskLogService.removeByIds(Arrays.asList(ids))) { |
| | | return R.error("Delete Fail"); |
| | | } |
| | | return R.ok("Delete Success").add(ids); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskLog:list')") |
| | | @PostMapping("/taskLog/query") |
| | | public R query(@RequestParam(required = false) String condition) { |
| | | List<KeyValVo> vos = new ArrayList<>(); |
| | | LambdaQueryWrapper<TaskLog> wrapper = new LambdaQueryWrapper<>(); |
| | | if (!Cools.isEmpty(condition)) { |
| | | wrapper.like(TaskLog::getId, condition); |
| | | } |
| | | taskLogService.page(new Page<>(1, 30), wrapper).getRecords().forEach( |
| | | item -> vos.add(new KeyValVo(item.getId(), item.getId())) |
| | | ); |
| | | return R.ok().add(vos); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskLog:list')") |
| | | @PostMapping("/taskLog/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(taskLogService.list(), TaskLog.class), response); |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | @PreAuthorize("hasAuthority('manager:waitPakin:update')") |
| | | @ApiOperation("组拖") |
| | | @PostMapping("/waitPakin/merge") |
| | | public R pikinOrder(@RequestBody WaitPakinParam waitPakin) { |
| | | if (Objects.isNull(waitPakin)) { |
| | | return R.error("参数不能为空!!"); |
| | | } |
| | | if (StringUtils.isBlank(waitPakin.getBarcode())) { |
| | | return R.error("托盘码不能为空!!"); |
| | | } |
| | | if (Objects.isNull(waitPakin.getItems()) || waitPakin.getItems().isEmpty()) { |
| | | return R.error("跟踪码不能为空!!"); |
| | | } |
| | | return R.ok(waitPakinService.mergeItems(waitPakin)); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:waitPakin:update')") |
| | | @ApiOperation("组拖解绑") |
| | | @PostMapping("/waitPakin/unbind") |
| | | public R pakinUnBind(@RequestBody WaitPakinParam param) { |
| | | if (Objects.isNull(param)) { |
| | | return R.error("参数不能为空!!"); |
| | | } |
| | | if (StringUtils.isBlank(param.getBarcode())) { |
| | | return R.error("托盘码不能为空!!"); |
| | | } |
| | | if (Objects.isNull(param.getItems()) || param.getItems().isEmpty()) { |
| | | return R.error("跟踪码不能为空!!"); |
| | | } |
| | | return R.ok(waitPakinService); |
| | | |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.entity; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.SpringUtils; |
| | | import com.vincent.rsf.server.system.service.UserService; |
| | | import com.vincent.rsf.server.system.entity.User; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("man_task") |
| | | public class Task implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 任务号 |
| | | */ |
| | | @ApiModelProperty(value= "任务号") |
| | | private String taskCode; |
| | | |
| | | /** |
| | | * 任务状态 |
| | | */ |
| | | @ApiModelProperty(value= "任务状态") |
| | | private Short taskStatus; |
| | | |
| | | /** |
| | | * 任务类型 |
| | | */ |
| | | @ApiModelProperty(value= "任务类型") |
| | | private Short taskType; |
| | | |
| | | /** |
| | | * 源库位 |
| | | */ |
| | | @ApiModelProperty(value= "源库位") |
| | | private String orgLoc; |
| | | |
| | | /** |
| | | * 目标库位 |
| | | */ |
| | | @ApiModelProperty(value= "目标库位") |
| | | private String targLoc; |
| | | |
| | | /** |
| | | * 托盘码 |
| | | */ |
| | | @ApiModelProperty(value= "托盘码") |
| | | private String barcode; |
| | | |
| | | /** |
| | | * 机器人编码 |
| | | */ |
| | | @ApiModelProperty(value= "机器人编码") |
| | | private String robotCode; |
| | | |
| | | /** |
| | | * 执行状态 |
| | | */ |
| | | @ApiModelProperty(value= "执行状态") |
| | | private Short exceStatus; |
| | | |
| | | /** |
| | | * 异常描述 |
| | | */ |
| | | @ApiModelProperty(value= "异常描述") |
| | | private String expDesc; |
| | | |
| | | /** |
| | | * 优先级 |
| | | */ |
| | | @ApiModelProperty(value= "优先级") |
| | | private Short sort; |
| | | |
| | | /** |
| | | * 异常编码 |
| | | */ |
| | | @ApiModelProperty(value= "异常编码") |
| | | private String expCode; |
| | | |
| | | /** |
| | | * 开始时间 |
| | | */ |
| | | @ApiModelProperty(value= "开始时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date startTime; |
| | | |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @ApiModelProperty(value= "结束时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date endTime; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 冻结 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 冻结 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | | * 租户 |
| | | */ |
| | | @ApiModelProperty(value= "租户") |
| | | private Integer tenantId; |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | public Task() {} |
| | | |
| | | public Task(String taskCode,Short taskStatus,Short taskType,String orgLoc,String targLoc,String barcode,String robotCode,Short exceStatus,String expDesc,Short sort,String expCode,Date startTime,Date endTime,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | | this.taskCode = taskCode; |
| | | this.taskStatus = taskStatus; |
| | | this.taskType = taskType; |
| | | this.orgLoc = orgLoc; |
| | | this.targLoc = targLoc; |
| | | this.barcode = barcode; |
| | | this.robotCode = robotCode; |
| | | this.exceStatus = exceStatus; |
| | | this.expDesc = expDesc; |
| | | this.sort = sort; |
| | | this.expCode = expCode; |
| | | this.startTime = startTime; |
| | | this.endTime = endTime; |
| | | this.status = status; |
| | | this.deleted = deleted; |
| | | this.tenantId = tenantId; |
| | | this.createBy = createBy; |
| | | this.createTime = createTime; |
| | | this.updateBy = updateBy; |
| | | this.updateTime = updateTime; |
| | | this.memo = memo; |
| | | } |
| | | |
| | | // Task task = new Task( |
| | | // null, // 任务号 |
| | | // null, // 任务状态 |
| | | // null, // 任务类型 |
| | | // null, // 源库位 |
| | | // null, // 目标库位 |
| | | // null, // 托盘码 |
| | | // null, // 机器人编码 |
| | | // null, // 执行状态 |
| | | // null, // 异常描述 |
| | | // null, // 优先级 |
| | | // null, // 异常编码 |
| | | // null, // 开始时间 |
| | | // null, // 结束时间 |
| | | // null, // 状态[非空] |
| | | // null, // 是否删除[非空] |
| | | // null, // 租户 |
| | | // null, // 添加人员 |
| | | // null, // 添加时间[非空] |
| | | // null, // 修改人员 |
| | | // null, // 修改时间[非空] |
| | | // null // 备注 |
| | | // ); |
| | | |
| | | public String getStartTime$(){ |
| | | if (Cools.isEmpty(this.startTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.startTime); |
| | | } |
| | | |
| | | public String getEndTime$(){ |
| | | if (Cools.isEmpty(this.endTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.endTime); |
| | | } |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return "正常"; |
| | | case 0: |
| | | return "冻结"; |
| | | default: |
| | | return String.valueOf(this.status); |
| | | } |
| | | } |
| | | |
| | | public String getCreateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.getById(this.createBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public String getUpdateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.getById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getUpdateTime$(){ |
| | | if (Cools.isEmpty(this.updateTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | } |
| | | |
| | | |
| | | |
| | | public Boolean getStatusBool(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return true; |
| | | case 0: |
| | | return false; |
| | | default: |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.SpringUtils; |
| | | import com.vincent.rsf.server.system.service.UserService; |
| | | import com.vincent.rsf.server.system.entity.User; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("man_task_item") |
| | | public class TaskItem implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 主单ID |
| | | */ |
| | | @ApiModelProperty(value= "主单ID") |
| | | private Long taskId; |
| | | |
| | | /** |
| | | * 物料ID |
| | | */ |
| | | @ApiModelProperty(value= "物料ID") |
| | | private Long matnrId; |
| | | |
| | | /** |
| | | * 物料名称 |
| | | */ |
| | | @ApiModelProperty(value= "物料名称") |
| | | private String maktx; |
| | | |
| | | /** |
| | | * 物料编码 |
| | | */ |
| | | @ApiModelProperty(value= "物料编码") |
| | | private String matnrCode; |
| | | |
| | | /** |
| | | * 库存单位 |
| | | */ |
| | | @ApiModelProperty(value= "库存单位") |
| | | private String unit; |
| | | |
| | | /** |
| | | * 数量 |
| | | */ |
| | | @ApiModelProperty(value= "数量") |
| | | private Double anfme; |
| | | |
| | | /** |
| | | * 库存批次 |
| | | */ |
| | | @ApiModelProperty(value= "库存批次") |
| | | private String batch; |
| | | |
| | | /** |
| | | * 规格 |
| | | */ |
| | | @ApiModelProperty(value= "规格") |
| | | private String spec; |
| | | |
| | | /** |
| | | * 型号 |
| | | */ |
| | | @ApiModelProperty(value= "型号") |
| | | private String model; |
| | | |
| | | /** |
| | | * 字段索引 |
| | | */ |
| | | @ApiModelProperty(value= "字段索引") |
| | | private String fieldsIndex; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 冻结 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 冻结 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | | * 租户 |
| | | */ |
| | | @ApiModelProperty(value= "租户") |
| | | private Integer tenantId; |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | public TaskItem() {} |
| | | |
| | | public TaskItem(Long taskId,Long matnrId,String maktx,String matnrCode,String unit,Double anfme,String batch,String spec,String model,String fieldsIndex,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | | this.taskId = taskId; |
| | | this.matnrId = matnrId; |
| | | this.maktx = maktx; |
| | | this.matnrCode = matnrCode; |
| | | this.unit = unit; |
| | | this.anfme = anfme; |
| | | this.batch = batch; |
| | | this.spec = spec; |
| | | this.model = model; |
| | | this.fieldsIndex = fieldsIndex; |
| | | this.status = status; |
| | | this.deleted = deleted; |
| | | this.tenantId = tenantId; |
| | | this.createBy = createBy; |
| | | this.createTime = createTime; |
| | | this.updateBy = updateBy; |
| | | this.updateTime = updateTime; |
| | | this.memo = memo; |
| | | } |
| | | |
| | | // TaskItem taskItem = new TaskItem( |
| | | // null, // 主单ID |
| | | // null, // 物料ID |
| | | // null, // 物料名称 |
| | | // null, // 物料编码 |
| | | // null, // 库存单位 |
| | | // null, // 数量 |
| | | // null, // 库存批次 |
| | | // null, // 规格 |
| | | // null, // 型号 |
| | | // null, // 字段索引 |
| | | // null, // 状态[非空] |
| | | // null, // 是否删除[非空] |
| | | // null, // 租户 |
| | | // null, // 添加人员 |
| | | // null, // 添加时间[非空] |
| | | // null, // 修改人员 |
| | | // null, // 修改时间[非空] |
| | | // null // 备注 |
| | | // ); |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return "正常"; |
| | | case 0: |
| | | return "冻结"; |
| | | default: |
| | | return String.valueOf(this.status); |
| | | } |
| | | } |
| | | |
| | | public String getCreateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.getById(this.createBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public String getUpdateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.getById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getUpdateTime$(){ |
| | | if (Cools.isEmpty(this.updateTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | } |
| | | |
| | | |
| | | |
| | | public Boolean getStatusBool(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return true; |
| | | case 0: |
| | | return false; |
| | | default: |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.SpringUtils; |
| | | import com.vincent.rsf.server.system.service.UserService; |
| | | import com.vincent.rsf.server.system.entity.User; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("man_task_item_log") |
| | | public class TaskItemLog implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 主单ID |
| | | */ |
| | | @ApiModelProperty(value= "主单ID") |
| | | private Long taskId; |
| | | |
| | | /** |
| | | * 任务明细ID |
| | | */ |
| | | @ApiModelProperty(value= "任务明细ID") |
| | | private Long taskItemId; |
| | | |
| | | /** |
| | | * 物料ID |
| | | */ |
| | | @ApiModelProperty(value= "物料ID") |
| | | private Long matnrId; |
| | | |
| | | /** |
| | | * 物料名称 |
| | | */ |
| | | @ApiModelProperty(value= "物料名称") |
| | | private String maktx; |
| | | |
| | | /** |
| | | * 物料编码 |
| | | */ |
| | | @ApiModelProperty(value= "物料编码") |
| | | private String matnrCode; |
| | | |
| | | /** |
| | | * 库存单位 |
| | | */ |
| | | @ApiModelProperty(value= "库存单位") |
| | | private String unit; |
| | | |
| | | /** |
| | | * 数量 |
| | | */ |
| | | @ApiModelProperty(value= "数量") |
| | | private Double anfme; |
| | | |
| | | /** |
| | | * 库存批次 |
| | | */ |
| | | @ApiModelProperty(value= "库存批次") |
| | | private String batch; |
| | | |
| | | /** |
| | | * 规格 |
| | | */ |
| | | @ApiModelProperty(value= "规格") |
| | | private String spec; |
| | | |
| | | /** |
| | | * 型号 |
| | | */ |
| | | @ApiModelProperty(value= "型号") |
| | | private String model; |
| | | |
| | | /** |
| | | * 字段索引 |
| | | */ |
| | | @ApiModelProperty(value= "字段索引") |
| | | private String fieldsIndex; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 冻结 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 冻结 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | | * 租户 |
| | | */ |
| | | @ApiModelProperty(value= "租户") |
| | | private Integer tenantId; |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | public TaskItemLog() {} |
| | | |
| | | public TaskItemLog(Long taskId,Long taskItemId,Long matnrId,String maktx,String matnrCode,String unit,Double anfme,String batch,String spec,String model,String fieldsIndex,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | | this.taskId = taskId; |
| | | this.taskItemId = taskItemId; |
| | | this.matnrId = matnrId; |
| | | this.maktx = maktx; |
| | | this.matnrCode = matnrCode; |
| | | this.unit = unit; |
| | | this.anfme = anfme; |
| | | this.batch = batch; |
| | | this.spec = spec; |
| | | this.model = model; |
| | | this.fieldsIndex = fieldsIndex; |
| | | this.status = status; |
| | | this.deleted = deleted; |
| | | this.tenantId = tenantId; |
| | | this.createBy = createBy; |
| | | this.createTime = createTime; |
| | | this.updateBy = updateBy; |
| | | this.updateTime = updateTime; |
| | | this.memo = memo; |
| | | } |
| | | |
| | | // TaskItemLog taskItemLog = new TaskItemLog( |
| | | // null, // 主单ID |
| | | // null, // 任务明细ID |
| | | // null, // 物料ID |
| | | // null, // 物料名称 |
| | | // null, // 物料编码 |
| | | // null, // 库存单位 |
| | | // null, // 数量 |
| | | // null, // 库存批次 |
| | | // null, // 规格 |
| | | // null, // 型号 |
| | | // null, // 字段索引 |
| | | // null, // 状态[非空] |
| | | // null, // 是否删除[非空] |
| | | // null, // 租户 |
| | | // null, // 添加人员 |
| | | // null, // 添加时间[非空] |
| | | // null, // 修改人员 |
| | | // null, // 修改时间[非空] |
| | | // null // 备注 |
| | | // ); |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return "正常"; |
| | | case 0: |
| | | return "冻结"; |
| | | default: |
| | | return String.valueOf(this.status); |
| | | } |
| | | } |
| | | |
| | | public String getCreateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.getById(this.createBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public String getUpdateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.getById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getUpdateTime$(){ |
| | | if (Cools.isEmpty(this.updateTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | } |
| | | |
| | | |
| | | |
| | | public Boolean getStatusBool(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return true; |
| | | case 0: |
| | | return false; |
| | | default: |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.entity; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.SpringUtils; |
| | | import com.vincent.rsf.server.system.service.UserService; |
| | | import com.vincent.rsf.server.system.entity.User; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("man_task_log") |
| | | public class TaskLog implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 任务ID |
| | | */ |
| | | @ApiModelProperty(value= "任务ID") |
| | | private Long taskId; |
| | | |
| | | /** |
| | | * 任务号 |
| | | */ |
| | | @ApiModelProperty(value= "任务号") |
| | | private String taskCode; |
| | | |
| | | /** |
| | | * 任务状态 |
| | | */ |
| | | @ApiModelProperty(value= "任务状态") |
| | | private Short taskStatus; |
| | | |
| | | /** |
| | | * 任务类型 |
| | | */ |
| | | @ApiModelProperty(value= "任务类型") |
| | | private Short taskType; |
| | | |
| | | /** |
| | | * 源库位 |
| | | */ |
| | | @ApiModelProperty(value= "源库位") |
| | | private String orgLoc; |
| | | |
| | | /** |
| | | * 目标库位 |
| | | */ |
| | | @ApiModelProperty(value= "目标库位") |
| | | private String targLoc; |
| | | |
| | | /** |
| | | * 托盘码 |
| | | */ |
| | | @ApiModelProperty(value= "托盘码") |
| | | private String barcode; |
| | | |
| | | /** |
| | | * 机器人编码 |
| | | */ |
| | | @ApiModelProperty(value= "机器人编码") |
| | | private String robotCode; |
| | | |
| | | /** |
| | | * 执行状态 |
| | | */ |
| | | @ApiModelProperty(value= "执行状态") |
| | | private Short exceStatus; |
| | | |
| | | /** |
| | | * 异常描述 |
| | | */ |
| | | @ApiModelProperty(value= "异常描述") |
| | | private String expDesc; |
| | | |
| | | /** |
| | | * 优先级 |
| | | */ |
| | | @ApiModelProperty(value= "优先级") |
| | | private Short sort; |
| | | |
| | | /** |
| | | * 异常编码 |
| | | */ |
| | | @ApiModelProperty(value= "异常编码") |
| | | private String expCode; |
| | | |
| | | /** |
| | | * 开始时间 |
| | | */ |
| | | @ApiModelProperty(value= "开始时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date startTime; |
| | | |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @ApiModelProperty(value= "结束时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date endTime; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 冻结 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 冻结 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | | * 租户 |
| | | */ |
| | | @ApiModelProperty(value= "租户") |
| | | private Integer tenantId; |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | public TaskLog() {} |
| | | |
| | | public TaskLog(Long taskId,String taskCode,Short taskStatus,Short taskType,String orgLoc,String targLoc,String barcode,String robotCode,Short exceStatus,String expDesc,Short sort,String expCode,Date startTime,Date endTime,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | | this.taskId = taskId; |
| | | this.taskCode = taskCode; |
| | | this.taskStatus = taskStatus; |
| | | this.taskType = taskType; |
| | | this.orgLoc = orgLoc; |
| | | this.targLoc = targLoc; |
| | | this.barcode = barcode; |
| | | this.robotCode = robotCode; |
| | | this.exceStatus = exceStatus; |
| | | this.expDesc = expDesc; |
| | | this.sort = sort; |
| | | this.expCode = expCode; |
| | | this.startTime = startTime; |
| | | this.endTime = endTime; |
| | | this.status = status; |
| | | this.deleted = deleted; |
| | | this.tenantId = tenantId; |
| | | this.createBy = createBy; |
| | | this.createTime = createTime; |
| | | this.updateBy = updateBy; |
| | | this.updateTime = updateTime; |
| | | this.memo = memo; |
| | | } |
| | | |
| | | // TaskLog taskLog = new TaskLog( |
| | | // null, // 任务ID |
| | | // null, // 任务号 |
| | | // null, // 任务状态 |
| | | // null, // 任务类型 |
| | | // null, // 源库位 |
| | | // null, // 目标库位 |
| | | // null, // 托盘码 |
| | | // null, // 机器人编码 |
| | | // null, // 执行状态 |
| | | // null, // 异常描述 |
| | | // null, // 优先级 |
| | | // null, // 异常编码 |
| | | // null, // 开始时间 |
| | | // null, // 结束时间 |
| | | // null, // 状态[非空] |
| | | // null, // 是否删除[非空] |
| | | // null, // 租户 |
| | | // null, // 添加人员 |
| | | // null, // 添加时间[非空] |
| | | // null, // 修改人员 |
| | | // null, // 修改时间[非空] |
| | | // null // 备注 |
| | | // ); |
| | | |
| | | public String getStartTime$(){ |
| | | if (Cools.isEmpty(this.startTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.startTime); |
| | | } |
| | | |
| | | public String getEndTime$(){ |
| | | if (Cools.isEmpty(this.endTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.endTime); |
| | | } |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return "正常"; |
| | | case 0: |
| | | return "冻结"; |
| | | default: |
| | | return String.valueOf(this.status); |
| | | } |
| | | } |
| | | |
| | | public String getCreateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.getById(this.createBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public String getUpdateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.getById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getUpdateTime$(){ |
| | | if (Cools.isEmpty(this.updateTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | } |
| | | |
| | | |
| | | |
| | | public Boolean getStatusBool(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return true; |
| | | case 0: |
| | | return false; |
| | | default: |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.mapper; |
| | | |
| | | import com.vincent.rsf.server.manager.entity.TaskItemLog; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface TaskItemLogMapper extends BaseMapper<TaskItemLog> { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.mapper; |
| | | |
| | | import com.vincent.rsf.server.manager.entity.TaskItem; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface TaskItemMapper extends BaseMapper<TaskItem> { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.mapper; |
| | | |
| | | import com.vincent.rsf.server.manager.entity.TaskLog; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface TaskLogMapper extends BaseMapper<TaskLog> { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.mapper; |
| | | |
| | | import com.vincent.rsf.server.manager.entity.Task; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface TaskMapper extends BaseMapper<Task> { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.vincent.rsf.server.manager.entity.TaskItemLog; |
| | | |
| | | public interface TaskItemLogService extends IService<TaskItemLog> { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.vincent.rsf.server.manager.entity.TaskItem; |
| | | |
| | | public interface TaskItemService extends IService<TaskItem> { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.vincent.rsf.server.manager.entity.TaskLog; |
| | | |
| | | public interface TaskLogService extends IService<TaskLog> { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.vincent.rsf.server.manager.entity.Task; |
| | | |
| | | public interface TaskService extends IService<Task> { |
| | | |
| | | } |
| | |
| | | public interface WaitPakinService extends IService<WaitPakin> { |
| | | |
| | | WaitPakin mergeItems(WaitPakinParam waitPakin); |
| | | |
| | | WaitPakin unBind(WaitPakinParam param); |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.service.impl; |
| | | |
| | | import com.vincent.rsf.server.manager.mapper.TaskItemLogMapper; |
| | | import com.vincent.rsf.server.manager.entity.TaskItemLog; |
| | | import com.vincent.rsf.server.manager.service.TaskItemLogService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("taskItemLogService") |
| | | public class TaskItemLogServiceImpl extends ServiceImpl<TaskItemLogMapper, TaskItemLog> implements TaskItemLogService { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.service.impl; |
| | | |
| | | import com.vincent.rsf.server.manager.mapper.TaskItemMapper; |
| | | import com.vincent.rsf.server.manager.entity.TaskItem; |
| | | import com.vincent.rsf.server.manager.service.TaskItemService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("taskItemService") |
| | | public class TaskItemServiceImpl extends ServiceImpl<TaskItemMapper, TaskItem> implements TaskItemService { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.service.impl; |
| | | |
| | | import com.vincent.rsf.server.manager.mapper.TaskLogMapper; |
| | | import com.vincent.rsf.server.manager.entity.TaskLog; |
| | | import com.vincent.rsf.server.manager.service.TaskLogService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("taskLogService") |
| | | public class TaskLogServiceImpl extends ServiceImpl<TaskLogMapper, TaskLog> implements TaskLogService { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.service.impl; |
| | | |
| | | import com.vincent.rsf.server.manager.mapper.TaskMapper; |
| | | import com.vincent.rsf.server.manager.entity.Task; |
| | | import com.vincent.rsf.server.manager.service.TaskService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("taskService") |
| | | public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements TaskService { |
| | | |
| | | } |
| | |
| | | private AsnOrderItemService asnOrderItemService; |
| | | @Autowired |
| | | private AsnOrderService asnOrderService; |
| | | |
| | | @Autowired |
| | | private WaitPakinService waitPakinService; |
| | | @Autowired |
| | | private WaitPakinItemService waitPakinItemService; |
| | | |
| | |
| | | } |
| | | return pakin; |
| | | } |
| | | |
| | | @Override |
| | | public WaitPakin unBind(WaitPakinParam param) { |
| | | String barcode = param.getBarcode(); |
| | | if (StringUtils.isNotBlank(barcode)) { |
| | | WaitPakin waitPakins = waitPakinService.getOne(new LambdaQueryWrapper<WaitPakin>().eq(WaitPakin::getBarcode, barcode), false); |
| | | if (Objects.isNull(waitPakins)) { |
| | | throw new CoolException("组拖不存在!!"); |
| | | } |
| | | List<PakinItem> paramItems = param.getItems(); |
| | | if (Objects.isNull(paramItems) || paramItems.isEmpty()) { |
| | | throw new CoolException("解绑物料不能为空!!"); |
| | | } |
| | | List<Long> list = paramItems.stream().map(PakinItem::getMatnrId).collect(Collectors.toList()); |
| | | List<WaitPakinItem> pakinItems = waitPakinItemService.list(new LambdaQueryWrapper<WaitPakinItem>() |
| | | .eq(WaitPakinItem::getPakinId, waitPakins.getId()) |
| | | .eq(WaitPakinItem::getMatnrId, list)); |
| | | if (pakinItems.isEmpty()) { |
| | | throw new CoolException("数据错误:组拖明细不存在!!"); |
| | | } |
| | | if (!waitPakinItemService.removeByIds(pakinItems)) { |
| | | throw new CoolException("组拖明细解绑失败!!"); |
| | | } |
| | | return waitPakins; |
| | | } |
| | | return new WaitPakin(); |
| | | } |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.vincent.rsf.server.manager.mapper.TaskItemLogMapper"> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.vincent.rsf.server.manager.mapper.TaskItemMapper"> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.vincent.rsf.server.manager.mapper.TaskLogMapper"> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.vincent.rsf.server.manager.mapper.TaskMapper"> |
| | | |
| | | </mapper> |