| | |
| | | import com.vincent.rsf.server.common.domain.KeyValVo; |
| | | import com.vincent.rsf.server.common.domain.PageParam; |
| | | import com.vincent.rsf.server.manager.entity.BasStation; |
| | | import com.vincent.rsf.server.manager.enums.StaUseStatusType; |
| | | import com.vincent.rsf.server.manager.service.BasStationService; |
| | | import com.vincent.rsf.server.system.controller.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | basStation.setCreateTime(new Date()); |
| | | basStation.setUpdateBy(getLoginUserId()); |
| | | basStation.setUpdateTime(new Date()); |
| | | BasStation serviceOne = basStationService.getOne(new LambdaQueryWrapper<BasStation>().eq(BasStation::getStationName, basStation.getStationName())); |
| | | if (!Cools.isEmpty(serviceOne)) { |
| | | return R.error(basStation.getStationName()+"站已被初始化"); |
| | | } |
| | | if (!basStationService.save(basStation)) { |
| | | return R.error("保存失败"); |
| | | } |
| | |
| | | if (null !=basStation.getAreaIds()){ |
| | | basStation.setCrossZoneArea(Arrays.toString(basStation.getAreaIds())); |
| | | } |
| | | if (null !=basStation.getUseStatus() && basStation.getUseStatus().equals(StaUseStatusType.TYPE_O.type)){ |
| | | basStation.setBarcode(null); |
| | | } |
| | | if (!basStationService.updateById(basStation)) { |
| | | return R.error("更新失败"); |
| | | } |