Browse Source

1127

master
ruanqi 1 year ago
parent
commit
2935f64f68
  1. 8
      src/main/java/com/spring/modules/part/controller/PartInformationController.java
  2. 2
      src/main/java/com/spring/modules/part/service/PartInformationService.java
  3. 10
      src/main/java/com/spring/modules/part/service/impl/PartInformationServiceImpl.java

8
src/main/java/com/spring/modules/part/controller/PartInformationController.java

@ -140,6 +140,14 @@ public class PartInformationController {
return R.ok().put("rows", rows); return R.ok().put("rows", rows);
} }
@PostMapping(value="/getPartItemWithPartNo")
@ResponseBody
public R getPartItemWithPartNo(@RequestBody PartSubPropertiesValueData data){
List<PartSubPropertiesValueData> rows = partInformationService.getPartItemWithPartNo(data);
return R.ok().put("rows", rows);
}
/** /**
* 编辑材料属性值 * 编辑材料属性值
* @param data * @param data

2
src/main/java/com/spring/modules/part/service/PartInformationService.java

@ -23,7 +23,7 @@ public interface PartInformationService {
void partInformationDelete(PartInformationEntity data); void partInformationDelete(PartInformationEntity data);
List<PartSubPropertiesValueData> getPartItem(PartSubPropertiesValueData data); List<PartSubPropertiesValueData> getPartItem(PartSubPropertiesValueData data);
List<PartSubPropertiesValueData> getPartItemWithPartNo(PartSubPropertiesValueData data);
List<PartInformationEntity> searchPartList(String site,String partNo, String partDesc); List<PartInformationEntity> searchPartList(String site,String partNo, String partDesc);
List<PartInformationEntity> searchPartList(String site,String partNo); List<PartInformationEntity> searchPartList(String site,String partNo);

10
src/main/java/com/spring/modules/part/service/impl/PartInformationServiceImpl.java

@ -771,6 +771,16 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe
} }
return result; return result;
} }
@Override
@Transactional
public List<PartSubPropertiesValueData> getPartItemWithPartNo(PartSubPropertiesValueData data){
PartInformationEntity partData = partInformationMapper.selectOne(new QueryWrapper<PartInformationEntity>().eq("site", data.getSite()).eq("part_no", data.getPartNo()));
if(partData==null){
throw new RuntimeException("物料不存在!");
}
data.setCodeNo(partData.getCodeNo());
return getPartItem(data);
}
/** /**
* 编辑材料属性值 * 编辑材料属性值

Loading…
Cancel
Save