| | |
| | | INSERT INTO man_sta_sts (id, uuid, name, status, deleted, tenant_id, create_by, create_time, update_by, update_time, memo) VALUES (15, 'IDLE', '空闲', 1, 0, 2, 41, '2023-06-09 02:11:08', 41, '2023-06-09 02:11:38', ''); |
| | | INSERT INTO man_sta_sts (id, uuid, name, status, deleted, tenant_id, create_by, create_time, update_by, update_time, memo) VALUES (15, 'IDLE', '无货', 1, 0, 2, 41, '2023-06-09 02:11:08', 41, '2023-06-09 02:11:38', ''); |
| | | INSERT INTO man_sta_sts (id, uuid, name, status, deleted, tenant_id, create_by, create_time, update_by, update_time, memo) VALUES (16, 'STOCK', '有货', 1, 0, 2, 41, '2023-06-09 02:11:20', 41, '2023-06-18 15:20:31', ''); |
| | | INSERT INTO man_sta_sts (id, uuid, name, status, deleted, tenant_id, create_by, create_time, update_by, update_time, memo) VALUES (17, 'PAKIN', '放货预约', 1, 0, null, 41, '2023-06-18 15:20:58', 41, '2023-06-18 15:20:58', ''); |
| | | INSERT INTO man_sta_sts (id, uuid, name, status, deleted, tenant_id, create_by, create_time, update_by, update_time, memo) VALUES (18, 'PAKOUT', '取货预约', 1, 0, null, 41, '2023-06-18 15:21:08', 41, '2023-06-18 15:21:08', ''); |
| | | INSERT INTO man_sta_sts (id, uuid, name, status, deleted, tenant_id, create_by, create_time, update_by, update_time, memo) VALUES (17, 'READY_RELEASE', '放货预约', 1, 0, null, 41, '2023-06-18 15:20:58', 41, '2023-06-18 15:20:58', ''); |
| | | INSERT INTO man_sta_sts (id, uuid, name, status, deleted, tenant_id, create_by, create_time, update_by, update_time, memo) VALUES (18, 'READY_TAKE', '取货预约', 1, 0, null, 41, '2023-06-18 15:21:08', 41, '2023-06-18 15:21:08', ''); |
| | | INSERT INTO man_sta_sts (id, uuid, name, status, deleted, tenant_id, create_by, create_time, update_by, update_time, memo) VALUES (19, 'DISABLED', '禁用', 1, 0, null, 41, '2023-06-18 15:21:29', 41, '2023-06-18 15:21:29', ''); |
| | | INSERT INTO man_sta_sts (id, uuid, name, status, deleted, tenant_id, create_by, create_time, update_by, update_time, memo) VALUES (20, 'OTHER', '其他', 1, 0, null, 41, '2023-06-21 21:17:06', 41, '2023-06-21 21:17:06', ''); |
| | | |
| | |
| | | if (!destSta.getStaSts().equals(StaStsType.IDLE.val())) { |
| | | throw new BusinessException("destSta:" + task.getDestSta$() + " is not in IDLE status"); |
| | | } |
| | | destSta.setStaSts(StaStsType.PAKIN.val()); |
| | | destSta.setStaSts(StaStsType.READY_RELEASE.val()); |
| | | destSta.setUpdateTime(now); |
| | | if (!staService.updateById(destSta)) { |
| | | throw new BusinessException("destSta:" + task.getDestSta$() + " failed to update"); |
| | |
| | | if (!oriSta.getStaSts().equals(StaStsType.STOCK.val())) { |
| | | throw new BusinessException("oriSta:" + task.getOriSta$() + " is not in STOCK status"); |
| | | } |
| | | oriSta.setStaSts(StaStsType.PAKOUT.val()); |
| | | oriSta.setStaSts(StaStsType.READY_TAKE.val()); |
| | | oriSta.setUpdateTime(now); |
| | | if (!staService.updateById(oriSta)) { |
| | | throw new BusinessException("oriSta:" + task.getOriSta$() + " failed to update"); |
| | |
| | | if (!oriSta.getStaSts().equals(StaStsType.STOCK.val())) { |
| | | throw new BusinessException("oriSta:" + task.getOriSta$() + " is not in STOCK status"); |
| | | } |
| | | oriSta.setStaSts(StaStsType.PAKOUT.val()); |
| | | oriSta.setStaSts(StaStsType.READY_TAKE.val()); |
| | | oriSta.setUpdateTime(now); |
| | | if (!staService.updateById(oriSta)) { |
| | | throw new BusinessException("oriSta:" + task.getOriSta$() + " failed to update"); |
| | |
| | | if (!destSta.getStaSts().equals(StaStsType.IDLE.val())) { |
| | | throw new BusinessException("destSta:" + task.getDestSta$() + " is not in IDLE status"); |
| | | } |
| | | destSta.setStaSts(StaStsType.PAKIN.val()); |
| | | destSta.setStaSts(StaStsType.READY_RELEASE.val()); |
| | | destSta.setUpdateTime(now); |
| | | if (!staService.updateById(destSta)) { |
| | | throw new BusinessException("destSta:" + task.getDestSta$() + " failed to update"); |
| | |
| | | |
| | | IDLE, |
| | | STOCK, |
| | | PAKIN, |
| | | PAKOUT, |
| | | READY_RELEASE, |
| | | READY_TAKE, |
| | | DISABLED, |
| | | OTHER, |
| | | ; |
| | |
| | | import com.zy.acs.manager.manager.entity.Sta; |
| | | import com.zy.acs.manager.manager.entity.Task; |
| | | import com.zy.acs.manager.manager.enums.LocStsType; |
| | | import com.zy.acs.manager.manager.enums.StaStsType; |
| | | import com.zy.acs.manager.manager.enums.TaskStsType; |
| | | import com.zy.acs.manager.manager.enums.TaskTypeType; |
| | | import com.zy.acs.manager.manager.mapper.LocMapper; |
| | | import com.zy.acs.manager.manager.service.LocService; |
| | | import com.zy.acs.manager.manager.service.StaService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | |
| | | @Slf4j |
| | | @Service("locService") |
| | | public class LocServiceImpl extends ServiceImpl<LocMapper, Loc> implements LocService { |
| | | |
| | | @Autowired |
| | | private StaService staService; |
| | | |
| | | @Override |
| | | public Loc selecatByLocNo(String locNo) { |
| | |
| | | log.error("Loc [{}] 库位修改状态失败", task.getOriLoc$()); |
| | | } |
| | | } |
| | | |
| | | destSta = staService.getById(task.getDestSta()); |
| | | if (destSta.getStaSts().equals(StaStsType.READY_RELEASE.val())) { |
| | | destSta.setStaSts(StaStsType.STOCK.val()); |
| | | destSta.setUpdateTime(now); |
| | | if (!staService.updateById(destSta)) { |
| | | log.error("Sta [{}] 站点修改状态失败", task.getDestSta$()); |
| | | } |
| | | } |
| | | break; |
| | | case STA_TO_LOC: |
| | | oriSta = staService.getById(task.getOriSta()); |
| | | if (oriSta.getStaSts().equals(StaStsType.READY_TAKE.val())) { |
| | | oriSta.setStaSts(StaStsType.IDLE.val()); |
| | | oriSta.setUpdateTime(now); |
| | | if (!staService.updateById(oriSta)) { |
| | | log.error("Sta [{}] 站点修改状态失败", task.getOriSta$()); |
| | | } |
| | | } |
| | | |
| | | destLoc = this.getById(task.getDestLoc()); |
| | | if (destLoc.getLocSts().equals(LocStsType.PAKIN.val())) { |
| | | destLoc.setLocSts(LocStsType.STOCK.val()); |
| | |
| | | } |
| | | break; |
| | | case STA_TO_STA: |
| | | oriSta = staService.getById(task.getOriSta()); |
| | | if (oriSta.getStaSts().equals(StaStsType.READY_TAKE.val())) { |
| | | oriSta.setStaSts(StaStsType.IDLE.val()); |
| | | oriSta.setUpdateTime(now); |
| | | if (!staService.updateById(oriSta)) { |
| | | log.error("Sta [{}] 站点修改状态失败", task.getOriSta$()); |
| | | } |
| | | } |
| | | |
| | | destSta = staService.getById(task.getDestSta()); |
| | | if (destSta.getStaSts().equals(StaStsType.READY_RELEASE.val())) { |
| | | destSta.setStaSts(StaStsType.STOCK.val()); |
| | | destSta.setUpdateTime(now); |
| | | if (!staService.updateById(destSta)) { |
| | | log.error("Sta [{}] 站点修改状态失败", task.getDestSta$()); |
| | | } |
| | | } |
| | | break; |
| | | case TO_CHARGE: |
| | | case TO_STANDBY: |