|
|
|
|
@ -47,7 +47,13 @@ public class ErpContractInfoServiceImpl implements IErpContractInfoService {
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public ErpContractInfoVo queryById(Long contractId) {
|
|
|
|
|
return baseMapper.selectVoById(contractId);
|
|
|
|
|
ErpContractInfoVo contractInfoVo = baseMapper.selectVoById(contractId);
|
|
|
|
|
MPJLambdaWrapper<ErpContractMaterial> lqw = JoinWrappers.lambda(ErpContractMaterial.class)
|
|
|
|
|
.selectAll(ErpContractMaterial.class)
|
|
|
|
|
.eq(contractId != null, ErpContractMaterial::getContractId, contractId);
|
|
|
|
|
List<ErpContractMaterial> contractMaterialList = contractMaterialMapper.selectList(lqw);
|
|
|
|
|
contractInfoVo.setContractMaterialList(contractMaterialList);
|
|
|
|
|
return contractInfoVo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@ -108,7 +114,7 @@ public class ErpContractInfoServiceImpl implements IErpContractInfoService {
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
public Boolean insertByBo(ErpContractInfoBo bo) {
|
|
|
|
|
public ErpContractInfoVo insertByBo(ErpContractInfoBo bo) {
|
|
|
|
|
ErpContractInfo add = MapstructUtils.convert(bo, ErpContractInfo.class);
|
|
|
|
|
validEntityBeforeSave(add);
|
|
|
|
|
List<ErpContractMaterial> contractMaterialList = bo.getContractMaterialList();
|
|
|
|
|
@ -120,7 +126,7 @@ public class ErpContractInfoServiceImpl implements IErpContractInfoService {
|
|
|
|
|
contractMaterialMapper.insert(erpContractMaterial);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return flag;
|
|
|
|
|
return MapstructUtils.convert(add, ErpContractInfoVo.class);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|