| | |
| | | if (i > 0) { |
| | | return R.error("有" + i + "条数据处于出入库预约或盘点拣料中,无法同步库存"); |
| | | } |
| | | Config config = configService.selectOne(new EntityWrapper<Config>().eq("code","sync")); |
| | | if (config==null){ |
| | | config=new Config(); |
| | | Config config = configService.selectOne(new EntityWrapper<Config>().eq("code", "sync")); |
| | | if (config == null) { |
| | | config = new Config(); |
| | | config.setValue("1"); |
| | | config.setStatus((short) 1); |
| | | config.setCode("sync"); |
| | | config.setType((short) 1); |
| | | config.setName("同步期初数据MES"); |
| | | }else { |
| | | if (config.getValue().equals("1")){ |
| | | } else { |
| | | if (config.getValue().equals("1")) { |
| | | return R.error("数据同步中,请勿重复点击"); |
| | | } |
| | | config.setValue("1"); |