| | |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.MatCode; |
| | | import com.zy.asrs.entity.MatCodePrint; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import com.zy.asrs.service.MatCodeService; |
| | | import com.zy.asrs.utils.VersionUtils; |
| | | import com.zy.common.CodeRes; |
| | | import com.zy.common.config.AdminInterceptor; |
| | | import com.zy.common.model.KeyValueVo; |
| | | import com.zy.common.utils.BarcodeUtils; |
| | | import com.zy.common.utils.QrCode; |
| | | import com.zy.common.utils.excel.matcode.MatCodeExcel; |
| | |
| | | @Autowired |
| | | private MatCodeService matCodeService; |
| | | |
| | | /*************************************** xm-select ***********************************************/ |
| | | |
| | | // xm-select 搜索商品列表 |
| | | @RequestMapping("/mat/all/get/kv") |
| | | @ManagerAuth |
| | | public R getMatDataKV(@RequestParam(required = false) String condition) { |
| | | Wrapper<MatCode> wrapper = new EntityWrapper<MatCode>() |
| | | .andNew().like("mat_no", condition).or().like("mat_name", condition) |
| | | .orderBy("appe_time", false); |
| | | List<MatCode> mats = matCodeService.selectPage(new Page<>(1, 30), wrapper).getRecords(); |
| | | List<KeyValueVo> valueVos = new ArrayList<>(); |
| | | for (MatCode mat : mats) { |
| | | KeyValueVo vo = new KeyValueVo(); |
| | | vo.setName(mat.getMatNo() + " - " + mat.getMatName()); |
| | | vo.setValue(mat.getMatNo()); |
| | | valueVos.add(vo); |
| | | } |
| | | return R.ok().add(valueVos); |
| | | } |
| | | |
| | | @RequestMapping(value = "/matCode/covert/{id}/auth") |
| | | @ManagerAuth |
| | | public R covert(@PathVariable("id") String id) { |
| | | MatCode matCode = matCodeService.selectById(String.valueOf(id)); |
| | | if (matCode == null) { |
| | | return R.ok(); |
| | | } |
| | | OrderDetl orderDetl = new OrderDetl(); |
| | | VersionUtils.setOrderDetl(orderDetl, matCode); |
| | | orderDetl.setAnfme(0.0D); |
| | | return R.ok().add(orderDetl); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/matCode/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |