库存列表 展示单位名称字段
This commit is contained in:
parent
827cad38b4
commit
b590a3260a
|
|
@ -21,7 +21,6 @@ import cn.ysk.cashier.utils.SpringContextHolder;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.boot.context.ApplicationPidFileWriter;
|
import org.springframework.boot.context.ApplicationPidFileWriter;
|
||||||
import org.springframework.cache.annotation.EnableCaching;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
|
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
|
||||||
import org.springframework.scheduling.annotation.EnableAsync;
|
import org.springframework.scheduling.annotation.EnableAsync;
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@ public class TbProductServiceImpl implements TbProductService {
|
||||||
tbProductVo.setUnitName("");
|
tbProductVo.setUnitName("");
|
||||||
}else {
|
}else {
|
||||||
for (TbShopUnit tbShopUnit : tbShopUnits) {
|
for (TbShopUnit tbShopUnit : tbShopUnits) {
|
||||||
if(tbShopUnit.getId().toString().equals(product.getUnitId())){
|
if(tbShopUnit.getId().equals(product.getUnitId())){
|
||||||
tbProductVo.setUnitName(tbShopUnit.getName());
|
tbProductVo.setUnitName(tbShopUnit.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -142,7 +142,6 @@ public class TbProductServiceImpl implements TbProductService {
|
||||||
BeanUtils.copyProperties(product, tbProductVo);
|
BeanUtils.copyProperties(product, tbProductVo);
|
||||||
tbProductVoList.add(tbProductVo);
|
tbProductVoList.add(tbProductVo);
|
||||||
}
|
}
|
||||||
System.out.println(tbProductVoList);
|
|
||||||
return PageUtil.toPage(tbProductVoList,page.getTotalElements());
|
return PageUtil.toPage(tbProductVoList,page.getTotalElements());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue