| | |
| | | import com.zy.asrs.entity.param.EmptyPlateOutParam; |
| | | import com.zy.asrs.entity.result.KeyValueVo; |
| | | import com.zy.asrs.service.MatService; |
| | | import com.zy.asrs.service.MobileService; |
| | | import com.zy.asrs.third.CodeDataParam; |
| | | import com.zy.asrs.third.CodeParam; |
| | | import com.zy.asrs.third.TokenUtils; |
| | | import com.zy.asrs.utils.MatExcelListener; |
| | | import com.zy.common.CodeRes; |
| | | import com.zy.common.config.AdminInterceptor; |
| | |
| | | import com.zy.common.utils.QrCode; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | |
| | | |
| | | @Autowired |
| | | private MatService matService; |
| | | |
| | | @Autowired |
| | | private MobileService mobileService; |
| | | |
| | | @Autowired |
| | | private SnowflakeIdWorker snowflakeIdWorker; |
| | | |
| | | @Value("mes.url") |
| | | private String url; |
| | | |
| | | @RequestMapping(value = "/mat/auto/matnr/auth") |
| | | public R autoMatnr(){ |
| | |
| | | return R.ok(matService.selectOne(new EntityWrapper<Mat>().eq("matnr", matnr))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/mat/tiaoma/auth") |
| | | @ManagerAuth |
| | | public R findByTiaoMa(@RequestParam("matnr") String matnr) { |
| | | List<CodeDataParam> data = mobileService.getData(TokenUtils.getToken(url), new CodeParam(Arrays.asList(matnr))); |
| | | CodeDataParam codeDataParam = data.get(0); |
| | | Mat mat = matService.selectOne(new EntityWrapper<Mat>().eq("matnr", codeDataParam.getProductionCode())); |
| | | mat.setMatnr(codeDataParam.getProductionCode()); |
| | | mat.setSafeQty(codeDataParam.getQty()); |
| | | mat.setUnit(codeDataParam.getBatchNum()); |
| | | mat.setMemo(matnr); |
| | | return R.ok(mat); |
| | | } |
| | | |
| | | @RequestMapping(value = "/mat/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1")Integer curr, |