| | |
| | | import com.zy.asrs.service.BasMapService; |
| | | import com.zy.asrs.service.LocMastService; |
| | | import com.zy.asrs.utils.Utils; |
| | | import com.zy.common.model.NavigateNode; |
| | | import com.zy.common.utils.RedisUtil; |
| | | import com.zy.common.web.BaseController; |
| | | import com.zy.core.enums.MapNodeType; |
| | | |
| | | import com.zy.core.enums.LocStsType; |
| | | import com.zy.core.enums.RedisKeyType; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | private LocMastService locMastService; |
| | | @Autowired |
| | | private BasMapService basMapService; |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | |
| | | @RequestMapping(value = "/locMast/{id}/auth") |
| | | @ManagerAuth |
| | |
| | | String nodeType = map.getString("type"); |
| | | if("shelf".equals(nodeType)) { |
| | | if(initBay == -1) { |
| | | initBay = 1; |
| | | initBay = 2; |
| | | } |
| | | |
| | | HashMap<String, Object> locNoMap = new HashMap<>(); |
| | |
| | | LocMast locMast = new LocMast(); |
| | | int row = (int) map.get("row"); |
| | | int bay = (int) map.get("bay"); |
| | | int mapX = (int) map.get("mapX"); |
| | | int mapY = (int) map.get("mapY"); |
| | | locMast.setLocNo(Utils.getLocNo(row, bay, finalLev)); |
| | | locMast.setLocSts(String.valueOf(LocStsType.O)); |
| | | locMast.setRow1(row); |
| | | locMast.setBay1(bay); |
| | | locMast.setLev1(finalLev); |
| | | locMast.setLocType(Utils.getLocNo(mapX, mapY, finalLev)); |
| | | locMast.setStatus(1); |
| | | locMast.setAppeTime(new Date()); |
| | | locMastService.insert(locMast); |
| | | }); |
| | | } |
| | | |
| | | redisUtil.del(RedisKeyType.LOC_MAP_BASE.key); |
| | | return R.ok(); |
| | | } |
| | | |