|
@@ -17,6 +17,7 @@ import com.sy.coinage.workshop.service.*;
|
|
import com.sy.coinage.workshop.vo.ScreenDeptVO;
|
|
import com.sy.coinage.workshop.vo.ScreenDeptVO;
|
|
import com.sy.coinage.workshop.vo.ScreenProportionVO;
|
|
import com.sy.coinage.workshop.vo.ScreenProportionVO;
|
|
import com.sy.coinage.workshop.vo.ScreenWareVO;
|
|
import com.sy.coinage.workshop.vo.ScreenWareVO;
|
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
@@ -28,6 +29,7 @@ import java.util.List;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@Component
|
|
@Component
|
|
|
|
+@Slf4j
|
|
public class ScreenComponent {
|
|
public class ScreenComponent {
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
@@ -202,6 +204,10 @@ public class ScreenComponent {
|
|
if (stock != null && stock.size() > 0) {
|
|
if (stock != null && stock.size() > 0) {
|
|
for (Stock stock1 : stock) {
|
|
for (Stock stock1 : stock) {
|
|
Product p = this.productService.getByCache(stock1.getSecuritiesId());
|
|
Product p = this.productService.getByCache(stock1.getSecuritiesId());
|
|
|
|
+ if(p == null){
|
|
|
|
+ p = this.productService.getById(stock1.getSecuritiesId());
|
|
|
|
+ log.info("cacheProportionInfo: product is:{} ,stock1.getSecuritiesId():{}",JSON.toJSONString(p),stock1.getSecuritiesId());
|
|
|
|
+ }
|
|
// 1 纪念币 2 流通币
|
|
// 1 纪念币 2 流通币
|
|
if (p.getTag() == 1) {
|
|
if (p.getTag() == 1) {
|
|
proportion1 = proportion1 + (stock1.getBoxNum() == null ? 0 : stock1.getBoxNum()) + stock1.getRacketNum() * p.getBoxAmount();
|
|
proportion1 = proportion1 + (stock1.getBoxNum() == null ? 0 : stock1.getBoxNum()) + stock1.getRacketNum() * p.getBoxAmount();
|