| | |
| | | import com.zy.common.model.Shelves; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.*; |
| | |
| | | private LocMastService locMastService; |
| | | @Autowired |
| | | private LocDetlService locDetlService; |
| | | @Value("${channel.equipmentRow}") |
| | | private Integer equipmentRow; |
| | | @Value("${channel.quietRow}") |
| | | private Integer quietRow; |
| | | @Value("${channel.equipmentCount}") |
| | | private Integer equipmentCount; |
| | | @Value("${channel.channelMax}") |
| | | private Integer channelMax; |
| | | |
| | | @RequestMapping(value = "/locMast/init/pwd") |
| | | public R locMastInitPwd(@RequestParam(required = false) String pwd) { |
| | |
| | | locMast.setAppeTime(now); |
| | | locMast.setModiUser(getUserId()); |
| | | locMast.setModiTime(now); |
| | | if (r==equipmentRow){ |
| | | locMast.setChannel(l+(b-2)*param.getEndLev()); |
| | | locMast.setLocType1((short)1); |
| | | int i = (locMast.getChannel() - 1) / (channelMax / equipmentCount) + 1; |
| | | locMast.setLocType2((short)i); |
| | | } |
| | | if (r==quietRow){ |
| | | locMast.setLocType1((short)2); |
| | | } |
| | | list.add(locMast); |
| | | } |
| | | } |
| | | } |
| | | // locMastService.delete(new EntityWrapper<>()); |
| | | locMastService.delete(new EntityWrapper<>()); |
| | | locDetlService.delete(new EntityWrapper<>()); |
| | | locMastService.insertBatch(list); |
| | | return R.ok("初始化成功"); |