3/1
This commit is contained in:
@@ -29,6 +29,10 @@ public class OrdOrderDetail {
|
|||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String picUrl;//图片
|
private String picUrl;//图片
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String unitName;//斤
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String specificationUnit;//份
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -227,7 +227,8 @@ public class LpkGoodsService extends MybatisBaseService<LpkGoodsMapper, LpkGoods
|
|||||||
List<MyGoodsVo> vo =baseMapper.getGoodsApplet(query);
|
List<MyGoodsVo> vo =baseMapper.getGoodsApplet(query);
|
||||||
vo.forEach(s->{
|
vo.forEach(s->{
|
||||||
double i=Double.valueOf(s.getGoodsNumber());
|
double i=Double.valueOf(s.getGoodsNumber());
|
||||||
s.setGoodsNumber(String.valueOf((int)i));
|
s.setGoodsNumber(DoubleUtils.removeZeros(String.valueOf((int)i)));
|
||||||
|
s.setWeight(DoubleUtils.removeZeros(s.getWeight()));
|
||||||
s.setIconUrl(fileUploadComponent.getUrlPrefix()+s.getIconUrl());
|
s.setIconUrl(fileUploadComponent.getUrlPrefix()+s.getIconUrl());
|
||||||
if(s.getPeriodValidity()!=null){
|
if(s.getPeriodValidity()!=null){
|
||||||
//1>2 1 、1<2 -1 、1=2 0
|
//1>2 1 、1<2 -1 、1=2 0
|
||||||
|
|||||||
@@ -465,6 +465,8 @@ public class OrdOrderService extends MybatisBaseService<OrdOrderMapper, OrdOrder
|
|||||||
LpkGoods lpkGoods = lpkGoodsService.getOne(new QueryWrapper<LpkGoods>().eq("sid", detail.getGoodsSid()));
|
LpkGoods lpkGoods = lpkGoodsService.getOne(new QueryWrapper<LpkGoods>().eq("sid", detail.getGoodsSid()));
|
||||||
detail.setPicUrl(fileUploadComponent.getUrlPrefix() + lpkGoods.getPicUrl());
|
detail.setPicUrl(fileUploadComponent.getUrlPrefix() + lpkGoods.getPicUrl());
|
||||||
detail.setRemarks(removeZeros(String.valueOf(detail.getNumofPart())) + "斤/份," + "共" + detail.getPartNumber() + "份");
|
detail.setRemarks(removeZeros(String.valueOf(detail.getNumofPart())) + "斤/份," + "共" + detail.getPartNumber() + "份");
|
||||||
|
detail.setUnitName(lpkGoods.getUnitName());
|
||||||
|
detail.setSpecificationUnit(lpkGoods.getSpecificationUnit());
|
||||||
}
|
}
|
||||||
pagging.setOrdOrderDetails(details);
|
pagging.setOrdOrderDetails(details);
|
||||||
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
|||||||
@@ -35,6 +35,11 @@ public class ShoppingCartRest {
|
|||||||
public ResultBean minusShoppingCart(@RequestBody ShoppingCartDto dto) {
|
public ResultBean minusShoppingCart(@RequestBody ShoppingCartDto dto) {
|
||||||
return shoppingCartService.minusShoppingCart(dto);
|
return shoppingCartService.minusShoppingCart(dto);
|
||||||
}
|
}
|
||||||
|
@ApiOperation("修改购物车数量")
|
||||||
|
@PostMapping("/updateShoppingCart")
|
||||||
|
public ResultBean updateShoppingCart(@RequestBody ShoppingCartDto dto) {
|
||||||
|
return shoppingCartService.updateShoppingCart(dto);
|
||||||
|
}
|
||||||
@ApiOperation("购物车列表")
|
@ApiOperation("购物车列表")
|
||||||
@PostMapping("/shoppingCartList")
|
@PostMapping("/shoppingCartList")
|
||||||
public ResultBean shoppingCartList(@RequestBody ShoppingCartQuery query) {
|
public ResultBean shoppingCartList(@RequestBody ShoppingCartQuery query) {
|
||||||
|
|||||||
@@ -120,6 +120,20 @@ public class ShoppingCartService extends MybatisBaseService<ShoppingCartMapper,
|
|||||||
// baseMapper.insert(entity);
|
// baseMapper.insert(entity);
|
||||||
return rb.success().setMsg("成功");
|
return rb.success().setMsg("成功");
|
||||||
}
|
}
|
||||||
|
public ResultBean updateShoppingCart(ShoppingCartDto dto) {
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
ShoppingCart entity = new ShoppingCart();
|
||||||
|
// List<ShoppingCart> list= baseMapper.selectList(new QueryWrapper<ShoppingCart>().eq("sid",dto.getSid()));
|
||||||
|
List<ShoppingCart> list = baseMapper.selectList(new QueryWrapper<ShoppingCart>().eq("customerSid", dto.getCustomerSid())
|
||||||
|
.eq("goodsSid", dto.getGoodsSid())
|
||||||
|
.eq("affiliation", dto.getAffiliation()));
|
||||||
|
if (list.size() > 0) {
|
||||||
|
list.get(0).setGoodsNumber(dto.getGoodsNumber());
|
||||||
|
baseMapper.updateById(list.get(0));
|
||||||
|
return rb.success().setMsg("成功");
|
||||||
|
}
|
||||||
|
return rb.success().setMsg("成功");
|
||||||
|
}
|
||||||
|
|
||||||
public ResultBean delShoppingCart(String sid) {
|
public ResultBean delShoppingCart(String sid) {
|
||||||
ResultBean rb = ResultBean.fireFail();
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ public class TransferRecordsService extends MybatisBaseService<TransferRecordsMa
|
|||||||
transferRecordsGoodsDetailsService.submissionDetail(dto);
|
transferRecordsGoodsDetailsService.submissionDetail(dto);
|
||||||
return rb.success().setData(order);
|
return rb.success().setData(order);
|
||||||
}
|
}
|
||||||
public ResultBean getTransferByCode(String code) {
|
public synchronized ResultBean getTransferByCode(String code) {
|
||||||
ResultBean rb = new ResultBean().fail();
|
ResultBean rb = new ResultBean().fail();
|
||||||
// if(StringUtils.isBlank(dto.getCustomerSid())){
|
// if(StringUtils.isBlank(dto.getCustomerSid())){
|
||||||
// return rb.setMsg("参数不全");
|
// return rb.setMsg("参数不全");
|
||||||
@@ -79,6 +79,9 @@ public class TransferRecordsService extends MybatisBaseService<TransferRecordsMa
|
|||||||
if(null==transferRecords){
|
if(null==transferRecords){
|
||||||
return rb.setMsg("没有找到对应的转赠单号");
|
return rb.setMsg("没有找到对应的转赠单号");
|
||||||
}
|
}
|
||||||
|
// if(transferRecords.getState().equals("2")){
|
||||||
|
// return rb.setMsg("没有找到对应的转赠单号");
|
||||||
|
// }
|
||||||
TransferRecordsVo transferRecordsVo=new TransferRecordsVo();
|
TransferRecordsVo transferRecordsVo=new TransferRecordsVo();
|
||||||
BeanUtil.copyProperties(transferRecords,transferRecordsVo);
|
BeanUtil.copyProperties(transferRecords,transferRecordsVo);
|
||||||
List<TransferRecordsGoodsDetails> list=transferRecordsGoodsDetailsService.list(new QueryWrapper<TransferRecordsGoodsDetails>().eq("orderSid",transferRecords.getSid()));
|
List<TransferRecordsGoodsDetails> list=transferRecordsGoodsDetailsService.list(new QueryWrapper<TransferRecordsGoodsDetails>().eq("orderSid",transferRecords.getSid()));
|
||||||
@@ -92,7 +95,7 @@ public class TransferRecordsService extends MybatisBaseService<TransferRecordsMa
|
|||||||
vo.setGoodsContent(k.getContent());
|
vo.setGoodsContent(k.getContent());
|
||||||
vo.setGoodsFs("共"+DoubleUtils.removeZeros(String.valueOf(transferRecordsGoodsDetails.getGoodsNumber()))+"份");
|
vo.setGoodsFs("共"+DoubleUtils.removeZeros(String.valueOf(transferRecordsGoodsDetails.getGoodsNumber()))+"份");
|
||||||
vo.setGoodsJs("合计"+DoubleUtils.removeZeros(String.valueOf(transferRecordsGoodsDetails.getGoodsNumber()*Double.valueOf(k.getWeight())))+"斤");
|
vo.setGoodsJs("合计"+DoubleUtils.removeZeros(String.valueOf(transferRecordsGoodsDetails.getGoodsNumber()*Double.valueOf(k.getWeight())))+"斤");
|
||||||
vo.setPrice(Double.valueOf(k.getPrice())*Double.valueOf(k.getWeight())+"元/斤");
|
vo.setPrice(DoubleUtils.removeZeros(String.valueOf(Double.valueOf(k.getPrice())*Double.valueOf(k.getWeight())))+"元/斤");
|
||||||
vo.setGoodsPicUrl(fileUploadComponent.getUrlPrefix()+k.getPicUrl());
|
vo.setGoodsPicUrl(fileUploadComponent.getUrlPrefix()+k.getPicUrl());
|
||||||
vos.add(vo);
|
vos.add(vo);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ public class VegetableCellarService extends MybatisBaseService<VegetableCellarMa
|
|||||||
return rb.success().setMsg("成功");
|
return rb.success().setMsg("成功");
|
||||||
}
|
}
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public ResultBean receiveTransferGoods(VegetableCellarDto dto) {
|
public synchronized ResultBean receiveTransferGoods(VegetableCellarDto dto) {
|
||||||
ResultBean rb = ResultBean.fireFail();
|
ResultBean rb = ResultBean.fireFail();
|
||||||
if(StringUtils.isBlank(dto.getCustomerSid())){
|
if(StringUtils.isBlank(dto.getCustomerSid())){
|
||||||
return rb.setMsg("参数不全");
|
return rb.setMsg("参数不全");
|
||||||
|
|||||||
Reference in New Issue
Block a user