| | |
| | | if (Objects.isNull(mats) ) { |
| | | throw new CoolException("物料编码不能为空!!"); |
| | | } |
| | | Mat matnr = matService.selectByMatnr(mats.getPro_komcode()); |
| | | Mat matnr = matService.selectOne(new EntityWrapper<Mat>().eq("matnr", mats.getPro_komcode())); |
| | | if (!Objects.isNull(matnr)) { |
| | | // 订单时间 |
| | | if (Utils.isValidFormat(mats.getUpdate_time(), "yyyy-MM-dd HH:mm:ss")) { |
| | |
| | | matnr.setWeight(Double.parseDouble(mats.getPro_wet())); |
| | | matnr.setSuppCode(mats.getPro_id()); |
| | | matnr.setTagId(MatLocType.getTag(mats.getPro_type())); |
| | | matnr.setLocType(MatLocType.getTag(mats.getPro_type())); |
| | | matnr.setManu(mats.getCompany_id()); |
| | | if (!matService.updateById(matnr)) { |
| | | throw new CoolException("物料更新失败或无需更新!!"); |
| | |
| | | matnr.setWeight(Double.parseDouble(mats.getPro_wet())); |
| | | matnr.setSuppCode(mats.getPro_id()); |
| | | matnr.setTagId(MatLocType.getTag(mats.getPro_type())); |
| | | matnr.setLocType(MatLocType.getTag(mats.getPro_type())); |
| | | matnr.setManu(mats.getCompany_id()); |
| | | if (!matService.insert(matnr)) { |
| | | throw new CoolException("物料更新失败!!"); |