| | |
| | | BeanUtils.copyProperties(matnr, mat); |
| | | mat.setCode(matnr.getMatnr()).setName(matnr.getMaktx()); |
| | | if (!Objects.isNull(matnr.getGroupName())) { |
| | | MatnrGroup matnrGroup = matnrGroupService.getOne(new LambdaQueryWrapper<MatnrGroup>().eq(MatnrGroup::getName, matnr.getGroupName()), false); |
| | | MatnrGroup matnrGroup = matnrGroupService.getOne(new LambdaQueryWrapper<MatnrGroup>().eq(MatnrGroup::getName, matnr.getGroupName()).last("limit 1"), false); |
| | | if (Objects.isNull(matnrGroup)) { |
| | | mat.setGroupCode(matnrGroup.getCode()).setGroupId(matnrGroup.getId()); |
| | | } |
| | |
| | | @Override |
| | | public R queryOrderStatus(QueryOrderParam queryParams) { |
| | | WkOrder wkOrders = asnOrderService.getOne(new LambdaQueryWrapper<WkOrder>() |
| | | .eq(WkOrder::getPoCode, queryParams.getOrderNo())); |
| | | .eq(WkOrder::getPoCode, queryParams.getOrderNo()).last("limit 1")); |
| | | if (Objects.isNull(wkOrders)) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("exceStatus", "-1"); |
| | | return R.ok("单据不存在 !!").add(map); |
| | | } |
| | | |
| | | AsnOrderLog orderLog = asnOrderLogService.getOne(new LambdaQueryWrapper<AsnOrderLog>().eq(AsnOrderLog::getCode, queryParams.getOrderNo())); |
| | | AsnOrderLog orderLog = asnOrderLogService.getOne(new LambdaQueryWrapper<AsnOrderLog>().eq(AsnOrderLog::getCode, queryParams.getOrderNo()).last("limit 1")); |
| | | if (!Objects.isNull(orderLog)) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("exceStatus", "4"); |
| | |
| | | if (Objects.isNull(companys.getCode())) { |
| | | throw new CoolException("企业编码不能为空!!"); |
| | | } |
| | | Companys one = companysService.getOne(new LambdaQueryWrapper<Companys>().eq(Companys::getName, param.getName())); |
| | | Companys one = companysService.getOne(new LambdaQueryWrapper<Companys>().eq(Companys::getName, param.getName()).last("limit 1")); |
| | | if (Objects.isNull(one)) { |
| | | String ruleCode = SerialRuleUtils.generateRuleCode(SerialRuleCode.SYS_COMPANYS_CODE, null); |
| | | companys.setCode(ruleCode); |