|
@ -30,8 +30,10 @@ import com.yxt.common.core.vo.PagerVo; |
|
|
import com.yxt.yyth.api.empcardgift.EmpCardGift; |
|
|
import com.yxt.yyth.api.empcardgift.EmpCardGift; |
|
|
import com.yxt.yyth.api.empcardgift.EmpCardGiftDto; |
|
|
import com.yxt.yyth.api.empcardgift.EmpCardGiftDto; |
|
|
import com.yxt.yyth.api.empcardgift.EmpCardGiftVo; |
|
|
import com.yxt.yyth.api.empcardgift.EmpCardGiftVo; |
|
|
|
|
|
import com.yxt.yyth.api.empcardgift.EmpGiftAppletVo; |
|
|
import com.yxt.yyth.api.empcardgiftgoods.EmpCardGiftGoods; |
|
|
import com.yxt.yyth.api.empcardgiftgoods.EmpCardGiftGoods; |
|
|
import com.yxt.yyth.api.empcardgiftgoods.EmpCardGiftGoodsVo; |
|
|
import com.yxt.yyth.api.empcardgiftgoods.EmpCardGiftGoodsVo; |
|
|
|
|
|
import com.yxt.yyth.api.empcardgiftgoods.EmpCardGoodsVo; |
|
|
import com.yxt.yyth.api.lpkcardbuildrecord.LpkCardBuildRecord; |
|
|
import com.yxt.yyth.api.lpkcardbuildrecord.LpkCardBuildRecord; |
|
|
import com.yxt.yyth.api.lpkcardgrantrecord.LpkCardGrantRecordDto; |
|
|
import com.yxt.yyth.api.lpkcardgrantrecord.LpkCardGrantRecordDto; |
|
|
import com.yxt.yyth.api.lpkcardqrcode.LpkCardQrcode; |
|
|
import com.yxt.yyth.api.lpkcardqrcode.LpkCardQrcode; |
|
@ -218,28 +220,39 @@ public class LpkGiftCardService extends MybatisBaseService<LpkGiftCardMapper, Lp |
|
|
System.out.println(query.getCustomerSid()); |
|
|
System.out.println(query.getCustomerSid()); |
|
|
IPage<LpkGiftCard> page = PagerUtil.queryToPage(pq); |
|
|
IPage<LpkGiftCard> page = PagerUtil.queryToPage(pq); |
|
|
IPage<AppletVo> list = baseMapper.getGifCardsByCustomerSid(page, query.getCustomerSid()); |
|
|
IPage<AppletVo> list = baseMapper.getGifCardsByCustomerSid(page, query.getCustomerSid()); |
|
|
list.getRecords().forEach(s->{ |
|
|
// list.getRecords().forEach(s->{
|
|
|
if(s.getLogo().equals("1")){ |
|
|
// if(s.getLogo().equals("1")){
|
|
|
//家庭卡
|
|
|
// //家庭卡
|
|
|
List<LpkGifGoodsVo> list1=LpkGiftBagGoodsService.getGoodsByGiftSid(s.getSid()); |
|
|
// List<LpkGifGoodsVo> list1=LpkGiftBagGoodsService.getGoodsByGiftSid(s.getSid());
|
|
|
list1.forEach(l->{ |
|
|
// list1.forEach(l->{
|
|
|
AppletVo vo= getGifCardsBySid(s.getSid()).getData(); |
|
|
// AppletVo vo= getGifCardsBySid(s.getSid()).getData();
|
|
|
List<GoodsVo> vos=vo.getGoodsVos(); |
|
|
// List<GoodsVo> vos=vo.getGoodsVos();
|
|
|
vos.forEach(d->{ |
|
|
// vos.forEach(d->{
|
|
|
if(l.getGoodsSid().equals(d.getGoodsSid())){ |
|
|
// if(l.getGoodsSid().equals(d.getGoodsSid())){
|
|
|
l.setContent("剩余"+d.getLNum()+"份/"+"共"+l.getGoodsNumber()+"份"); |
|
|
// l.setContent("剩余"+d.getLNum()+"份/"+"共"+l.getGoodsNumber()+"份");
|
|
|
} |
|
|
// }
|
|
|
}); |
|
|
// });
|
|
|
l.setRemarks(l.getWeight()+l.getSpecificationUnit()+"/"+l.getUnitName()); |
|
|
// l.setRemarks(l.getWeight()+l.getSpecificationUnit()+"/"+l.getUnitName());
|
|
|
}); |
|
|
// });
|
|
|
}else if(s.getLogo().equals("2")){ |
|
|
// }else if(s.getLogo().equals("2")){
|
|
|
//亲情卡
|
|
|
// //亲情卡
|
|
|
|
|
|
// List<EmpCardGoodsVo> list1=empCardGiftGoodsService.getGoodsByGiftSid(s.getSid()).getData();
|
|
|
} else if (s.getLogo().equals("3")) { |
|
|
// list1.forEach(l->{
|
|
|
//企业卡
|
|
|
// EmpGiftAppletVo vo=empCardGiftService.getGifCardsBySid(s.getSid()).getData();
|
|
|
|
|
|
// List<com.yxt.yyth.api.empcardgift.GoodsVo> vos=vo.getGoodsVos();
|
|
|
} |
|
|
// vos.forEach(d->{
|
|
|
}); |
|
|
// if(l.getGoodsSid().equals(d.getGoodsSid())){
|
|
|
|
|
|
// l.setContent("剩余"+d.getLNum()+"份/"+"共"+l.getGoodsNumber()+"份");
|
|
|
|
|
|
// }
|
|
|
|
|
|
// });
|
|
|
|
|
|
// l.setRemarks(l.getWeight()+l.getSpecificationUnit()+"/"+l.getUnitName());
|
|
|
|
|
|
// });
|
|
|
|
|
|
// EmpGiftAppletVo vo=empCardGiftService.getGifCardsBySid(s.getSid()).getData();
|
|
|
|
|
|
// } else if (s.getLogo().equals("3")) {
|
|
|
|
|
|
// //企业卡
|
|
|
|
|
|
//
|
|
|
|
|
|
// }
|
|
|
|
|
|
// });
|
|
|
PagerVo<AppletVo> p = PagerUtil.pageToVo(list, null); |
|
|
PagerVo<AppletVo> p = PagerUtil.pageToVo(list, null); |
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
return rb.success().setData(p); |
|
|
return rb.success().setData(p); |
|
|