|
|
@ -318,92 +318,92 @@ public class SmsSalesReturnService extends MybatisBaseService<SmsSalesReturnMapp |
|
|
|
|
|
|
|
public SmsSalesInsertVo returnBillInit(String sid) { |
|
|
|
SmsSalesInsertVo vo = new SmsSalesInsertVo(); |
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
|
|
|
SmsSalesBill smsSalesBill = smsSalesBillService.fetchBySid(sid); |
|
|
|
if (null != smsSalesBill) { |
|
|
|
vo.setBillSid(sid); |
|
|
|
vo.setSourceBillNo(smsSalesBill.getBillNo()); |
|
|
|
//客户名称
|
|
|
|
if (StringUtils.isNotBlank(smsSalesBill.getCustomerName())) { |
|
|
|
vo.setCustomerName(smsSalesBill.getCustomerName()); |
|
|
|
} |
|
|
|
//车牌号
|
|
|
|
if (StringUtils.isNotBlank(smsSalesBill.getVehMark())) { |
|
|
|
vo.setVehMark(smsSalesBill.getVehMark()); |
|
|
|
} |
|
|
|
//客户单位
|
|
|
|
if (StringUtils.isNotBlank(smsSalesBill.getCustomerOrg())) { |
|
|
|
vo.setCustomerOrg(smsSalesBill.getCustomerOrg()); |
|
|
|
} |
|
|
|
//科目
|
|
|
|
if (StringUtils.isNotBlank(smsSalesBill.getSubject())) { |
|
|
|
vo.setSubject(smsSalesBill.getSubject()); |
|
|
|
} |
|
|
|
//原单商品列表
|
|
|
|
List<SalesGoodsReturnVo> billGoods = new ArrayList<>(); |
|
|
|
//材料费
|
|
|
|
BigDecimal materialCosts = new BigDecimal(0); |
|
|
|
//合计优惠
|
|
|
|
BigDecimal discount = new BigDecimal(0); |
|
|
|
List<SmsSalesBillDetail> billDetailList = smsSalesBillDetailService.fetchByMainSid(sid); |
|
|
|
if (!billDetailList.isEmpty()) { |
|
|
|
for (SmsSalesBillDetail salesBillDetail : billDetailList) { |
|
|
|
if (null != salesBillDetail.getPrice()) { |
|
|
|
materialCosts = salesBillDetail.getPrice().add(materialCosts); |
|
|
|
} |
|
|
|
if (null != salesBillDetail.getDiscountAmount()) { |
|
|
|
discount = salesBillDetail.getDiscountAmount().add(discount); |
|
|
|
} |
|
|
|
SalesGoodsReturnVo salesGoodsVo = new SalesGoodsReturnVo(); |
|
|
|
BeanUtil.copyProperties(salesBillDetail, salesGoodsVo); |
|
|
|
//查询对应销售单已退商品数量
|
|
|
|
// String count = baseMapper.selRetunGoodsNum(sid, salesBillDetail.getInventorySid());
|
|
|
|
// if (StringUtils.isNotBlank(count)) {
|
|
|
|
// salesGoodsVo.setReturnedCount(count);
|
|
|
|
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
// SmsSalesBill smsSalesBill = smsSalesBillService.fetchBySid(sid);
|
|
|
|
// if (null != smsSalesBill) {
|
|
|
|
// vo.setBillSid(sid);
|
|
|
|
// vo.setSourceBillNo(smsSalesBill.getBillNo());
|
|
|
|
// //客户名称
|
|
|
|
// if (StringUtils.isNotBlank(smsSalesBill.getCustomerName())) {
|
|
|
|
// vo.setCustomerName(smsSalesBill.getCustomerName());
|
|
|
|
// }
|
|
|
|
// //车牌号
|
|
|
|
// if (StringUtils.isNotBlank(smsSalesBill.getVehMark())) {
|
|
|
|
// vo.setVehMark(smsSalesBill.getVehMark());
|
|
|
|
// }
|
|
|
|
// //客户单位
|
|
|
|
// if (StringUtils.isNotBlank(smsSalesBill.getCustomerOrg())) {
|
|
|
|
// vo.setCustomerOrg(smsSalesBill.getCustomerOrg());
|
|
|
|
// }
|
|
|
|
// //科目
|
|
|
|
// if (StringUtils.isNotBlank(smsSalesBill.getSubject())) {
|
|
|
|
// vo.setSubject(smsSalesBill.getSubject());
|
|
|
|
// }
|
|
|
|
// //原单商品列表
|
|
|
|
// List<SalesGoodsReturnVo> billGoods = new ArrayList<>();
|
|
|
|
// //材料费
|
|
|
|
// BigDecimal materialCosts = new BigDecimal(0);
|
|
|
|
// //合计优惠
|
|
|
|
// BigDecimal discount = new BigDecimal(0);
|
|
|
|
// List<SmsSalesBillDetail> billDetailList = smsSalesBillDetailService.fetchByMainSid(sid);
|
|
|
|
// if (!billDetailList.isEmpty()) {
|
|
|
|
// for (SmsSalesBillDetail salesBillDetail : billDetailList) {
|
|
|
|
// if (null != salesBillDetail.getPrice()) {
|
|
|
|
// materialCosts = salesBillDetail.getPrice().add(materialCosts);
|
|
|
|
// }
|
|
|
|
// if (null != salesBillDetail.getDiscountAmount()) {
|
|
|
|
// discount = salesBillDetail.getDiscountAmount().add(discount);
|
|
|
|
// }
|
|
|
|
// SalesGoodsReturnVo salesGoodsVo = new SalesGoodsReturnVo();
|
|
|
|
// BeanUtil.copyProperties(salesBillDetail, salesGoodsVo);
|
|
|
|
// //查询对应销售单已退商品数量
|
|
|
|
//// String count = baseMapper.selRetunGoodsNum(sid, salesBillDetail.getInventorySid());
|
|
|
|
//// if (StringUtils.isNotBlank(count)) {
|
|
|
|
//// salesGoodsVo.setReturnedCount(count);
|
|
|
|
//// }
|
|
|
|
// billGoods.add(salesGoodsVo);
|
|
|
|
// }
|
|
|
|
// vo.setBillGoods(billGoods);
|
|
|
|
// }
|
|
|
|
// vo.setMaterialCosts(materialCosts.toString());
|
|
|
|
// vo.setDiscount(discount.toString());
|
|
|
|
// //税额
|
|
|
|
// BigDecimal maxAmount = new BigDecimal(0);
|
|
|
|
// SmsSalesBillInvoice invoice = smsSalesBillInvoiceService.fetchByMainSid(sid);
|
|
|
|
// if (null != invoice) {
|
|
|
|
// if (null != invoice.getTaxRate()) {
|
|
|
|
// maxAmount = materialCosts.multiply(invoice.getTaxRate()).multiply(new BigDecimal(0.01)).setScale(2, BigDecimal.ROUND_UP);
|
|
|
|
// vo.setMaxAmount(maxAmount.toString());
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// // 合计金额
|
|
|
|
// BigDecimal amountAll = new BigDecimal(0);
|
|
|
|
// amountAll = maxAmount.add(materialCosts);
|
|
|
|
// vo.setAmountAll(amountAll.toString());
|
|
|
|
// //已收金额
|
|
|
|
// BigDecimal receivedAmount = new BigDecimal(0);
|
|
|
|
// //欠款
|
|
|
|
// BigDecimal debts = new BigDecimal(0);
|
|
|
|
// // 应收金额
|
|
|
|
// BigDecimal receivableAmount = new BigDecimal(0);
|
|
|
|
// //结算时间
|
|
|
|
// SmsSalesBillSettle settle = smsSalesBillSettleService.fetchByMainSid(sid);
|
|
|
|
// if (null != settle) {
|
|
|
|
// vo.setSettleTime(sdf.format(settle.getSettleTime()));
|
|
|
|
// if (null != settle.getSettleAmount()) {
|
|
|
|
// receivedAmount = settle.getSettleAmount();
|
|
|
|
// }
|
|
|
|
// if (null != settle.getDebts()) {
|
|
|
|
// debts = settle.getDebts();
|
|
|
|
// }
|
|
|
|
// if (null != settle.getReceivableAmount()) {
|
|
|
|
// receivableAmount = settle.getReceivableAmount();
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// vo.setReceivedAmount(receivedAmount.toString());
|
|
|
|
// vo.setDebts(debts.toString());
|
|
|
|
// vo.setReceivableAmount(receivableAmount.toString());
|
|
|
|
// }
|
|
|
|
billGoods.add(salesGoodsVo); |
|
|
|
} |
|
|
|
vo.setBillGoods(billGoods); |
|
|
|
} |
|
|
|
vo.setMaterialCosts(materialCosts.toString()); |
|
|
|
vo.setDiscount(discount.toString()); |
|
|
|
//税额
|
|
|
|
BigDecimal maxAmount = new BigDecimal(0); |
|
|
|
SmsSalesBillInvoice invoice = smsSalesBillInvoiceService.fetchByMainSid(sid); |
|
|
|
if (null != invoice) { |
|
|
|
if (null != invoice.getTaxRate()) { |
|
|
|
maxAmount = materialCosts.multiply(invoice.getTaxRate()).multiply(new BigDecimal(0.01)).setScale(2, BigDecimal.ROUND_UP); |
|
|
|
vo.setMaxAmount(maxAmount.toString()); |
|
|
|
} |
|
|
|
} |
|
|
|
// 合计金额
|
|
|
|
BigDecimal amountAll = new BigDecimal(0); |
|
|
|
amountAll = maxAmount.add(materialCosts); |
|
|
|
vo.setAmountAll(amountAll.toString()); |
|
|
|
//已收金额
|
|
|
|
BigDecimal receivedAmount = new BigDecimal(0); |
|
|
|
//欠款
|
|
|
|
BigDecimal debts = new BigDecimal(0); |
|
|
|
// 应收金额
|
|
|
|
BigDecimal receivableAmount = new BigDecimal(0); |
|
|
|
//结算时间
|
|
|
|
SmsSalesBillSettle settle = smsSalesBillSettleService.fetchByMainSid(sid); |
|
|
|
if (null != settle) { |
|
|
|
vo.setSettleTime(sdf.format(settle.getSettleTime())); |
|
|
|
if (null != settle.getSettleAmount()) { |
|
|
|
receivedAmount = settle.getSettleAmount(); |
|
|
|
} |
|
|
|
if (null != settle.getDebts()) { |
|
|
|
debts = settle.getDebts(); |
|
|
|
} |
|
|
|
if (null != settle.getReceivableAmount()) { |
|
|
|
receivableAmount = settle.getReceivableAmount(); |
|
|
|
} |
|
|
|
} |
|
|
|
vo.setReceivedAmount(receivedAmount.toString()); |
|
|
|
vo.setDebts(debts.toString()); |
|
|
|
vo.setReceivableAmount(receivableAmount.toString()); |
|
|
|
} |
|
|
|
return vo; |
|
|
|
} |
|
|
|
|
|
|
@ -458,115 +458,136 @@ public class SmsSalesReturnService extends MybatisBaseService<SmsSalesReturnMapp |
|
|
|
|
|
|
|
public SmsSalesReturnNewDetailsVo returnGoodsBillInit(String sid, String type) { |
|
|
|
SmsSalesReturnNewDetailsVo vo = new SmsSalesReturnNewDetailsVo(); |
|
|
|
vo.setType(type); |
|
|
|
vo.setSourceBillSid(sid); |
|
|
|
if (type.equals("0")) { |
|
|
|
//维修工单
|
|
|
|
AsBusrepairBillDetailsVo data = asBusrepairBillFeign.fetchDetailsBySid(sid).getData(); |
|
|
|
if (null != data) { |
|
|
|
vo.setSourceBillNo(data.getBillNo()); |
|
|
|
vo.setBillType(data.getBillType()); |
|
|
|
vo.setBillDate(data.getCreateDate()); |
|
|
|
if (StringUtils.isNotBlank(data.getSubject())) { |
|
|
|
vo.setSubject(data.getSubject()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(data.getWaitorName())) { |
|
|
|
vo.setWaitorName(data.getWaitorName()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(data.getCustomerName())) { |
|
|
|
vo.setCustomerName(data.getCustomerName()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(data.getMobile())) { |
|
|
|
vo.setMobile(data.getMobile()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(data.getCustomerOrg())) { |
|
|
|
vo.setCustomerOrg(data.getCustomerOrg()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(data.getVehMark())) { |
|
|
|
vo.setVehMark(data.getVehMark()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(data.getVinNo())) { |
|
|
|
vo.setVinNo(data.getVinNo()); |
|
|
|
} |
|
|
|
SettleVo settleVo = data.getSettleVo(); |
|
|
|
if (null != settleVo) { |
|
|
|
vo.setSettleDate(settleVo.getSettleTime()); |
|
|
|
} |
|
|
|
List<SitemVo> sitemVos = data.getSitemVos(); |
|
|
|
List<SmsSitemVo> smsSitemVos = new ArrayList<>(); |
|
|
|
if (!sitemVos.isEmpty()) { |
|
|
|
for (SitemVo smsSitemVo : sitemVos) { |
|
|
|
SmsSitemVo sitemVo = new SmsSitemVo(); |
|
|
|
BeanUtil.copyProperties(smsSitemVo, sitemVo); |
|
|
|
smsSitemVos.add(sitemVo); |
|
|
|
} |
|
|
|
vo.setSitemVos(smsSitemVos); |
|
|
|
} |
|
|
|
List<GoodsDetailsVo> goodsDetailsVos = data.getGoodsDetailsVos(); |
|
|
|
List<SmsGoodsDetailsVo> smsGoodsDetailsVos = new ArrayList<>(); |
|
|
|
if (!goodsDetailsVos.isEmpty()) { |
|
|
|
for (GoodsDetailsVo goodsDetailsVo : goodsDetailsVos) { |
|
|
|
SmsGoodsDetailsVo smsGoodsDetailsVo = new SmsGoodsDetailsVo(); |
|
|
|
BeanUtil.copyProperties(goodsDetailsVo, smsGoodsDetailsVo); |
|
|
|
//查询已退数量
|
|
|
|
String goodsID = goodsDetailsVo.getGoodsID(); |
|
|
|
String sumBackCount = baseMapper.selBackCountByGoodsID(goodsID, sid); |
|
|
|
smsGoodsDetailsVo.setReturnedCount(sumBackCount); |
|
|
|
smsGoodsDetailsVos.add(smsGoodsDetailsVo); |
|
|
|
} |
|
|
|
vo.setGoodsDetailsVos(smsGoodsDetailsVos); |
|
|
|
} |
|
|
|
} |
|
|
|
} else if (type.equals("1")) { |
|
|
|
//销售单
|
|
|
|
SmsSalesBillDetailsVo data = smsSalesBillService.fetchDetailsVoBySid(sid); |
|
|
|
if (null != data) { |
|
|
|
vo.setSourceBillNo(data.getBillNo()); |
|
|
|
vo.setBillType("销售单"); |
|
|
|
vo.setBillDate(data.getCreateTime()); |
|
|
|
if (StringUtils.isNotBlank(data.getSubject())) { |
|
|
|
vo.setSubject(data.getSubject()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(data.getSalesName())) { |
|
|
|
vo.setWaitorName(data.getSalesName()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(data.getCustomerName())) { |
|
|
|
vo.setCustomerName(data.getCustomerName()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(data.getMobile())) { |
|
|
|
vo.setMobile(data.getMobile()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(data.getCustomerOrg())) { |
|
|
|
vo.setCustomerOrg(data.getCustomerOrg()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(data.getVehMark())) { |
|
|
|
vo.setVehMark(data.getVehMark()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(data.getVinNo())) { |
|
|
|
vo.setVinNo(data.getVinNo()); |
|
|
|
} |
|
|
|
SettlementVo settleVo = data.getSettlementVo(); |
|
|
|
if (null != settleVo) { |
|
|
|
vo.setSettleDate(settleVo.getSettleTime()); |
|
|
|
} |
|
|
|
List<SalesGoodsVo> goodsDetailsVos = data.getGoodsVos(); |
|
|
|
List<SmsGoodsDetailsVo> smsGoodsDetailsVos = new ArrayList<>(); |
|
|
|
if (!goodsDetailsVos.isEmpty()) { |
|
|
|
for (SalesGoodsVo goodsDetailsVo : goodsDetailsVos) { |
|
|
|
SmsGoodsDetailsVo smsGoodsDetailsVo = new SmsGoodsDetailsVo(); |
|
|
|
BeanUtil.copyProperties(goodsDetailsVo, smsGoodsDetailsVo); |
|
|
|
//查询已退数量
|
|
|
|
String goodsID = goodsDetailsVo.getGoodsID(); |
|
|
|
String sumBackCount = baseMapper.selBackCountByGoodsID(goodsID, sid); |
|
|
|
smsGoodsDetailsVo.setReturnedCount(sumBackCount); |
|
|
|
smsGoodsDetailsVos.add(smsGoodsDetailsVo); |
|
|
|
smsGoodsDetailsVos.add(smsGoodsDetailsVo); |
|
|
|
} |
|
|
|
vo.setGoodsDetailsVos(smsGoodsDetailsVos); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
List<SmsSitemVo> sitemVos = new ArrayList<>();// 维修项目
|
|
|
|
vo.setRemarks("222"); |
|
|
|
SmsSitemVo v = new SmsSitemVo(); |
|
|
|
v.setRemarks("saasg"); |
|
|
|
sitemVos.add(v); |
|
|
|
List<SmsGoodsDetailsVo> goodsDetailsVos = new ArrayList<>(); //商品信息
|
|
|
|
SmsGoodsDetailsVo v2 = new SmsGoodsDetailsVo(); |
|
|
|
v2.setRemarks("saasg"); |
|
|
|
goodsDetailsVos.add(v2); |
|
|
|
List<SalesGoodsReturnVo> returnGoods = new ArrayList<>(); //退货商品列表
|
|
|
|
SalesGoodsReturnVo v3 = new SalesGoodsReturnVo(); |
|
|
|
v3.setGoodsID("saasg"); |
|
|
|
returnGoods.add(v3); |
|
|
|
List<SalesItemsReturnVo> returnSitemVos = new ArrayList<>(); //退货维修项目列表
|
|
|
|
SalesItemsReturnVo v4 = new SalesItemsReturnVo(); |
|
|
|
v.setRemarks("saasg"); |
|
|
|
returnSitemVos.add(v4); |
|
|
|
vo.setReturnGoods(returnGoods); |
|
|
|
vo.setReturnSitemVos(returnSitemVos); |
|
|
|
vo.setGoodsDetailsVos(goodsDetailsVos); |
|
|
|
vo.setSitemVos(sitemVos); |
|
|
|
// vo.setType(type);
|
|
|
|
// vo.setSourceBillSid(sid);
|
|
|
|
// if (type.equals("0")) {
|
|
|
|
// //维修工单
|
|
|
|
// AsBusrepairBillDetailsVo data = asBusrepairBillFeign.fetchDetailsBySid(sid).getData();
|
|
|
|
// if (null != data) {
|
|
|
|
// vo.setSourceBillNo(data.getBillNo());
|
|
|
|
// vo.setBillType(data.getBillType());
|
|
|
|
// vo.setBillDate(data.getCreateDate());
|
|
|
|
// if (StringUtils.isNotBlank(data.getSubject())) {
|
|
|
|
// vo.setSubject(data.getSubject());
|
|
|
|
// }
|
|
|
|
// if (StringUtils.isNotBlank(data.getWaitorName())) {
|
|
|
|
// vo.setWaitorName(data.getWaitorName());
|
|
|
|
// }
|
|
|
|
// if (StringUtils.isNotBlank(data.getCustomerName())) {
|
|
|
|
// vo.setCustomerName(data.getCustomerName());
|
|
|
|
// }
|
|
|
|
// if (StringUtils.isNotBlank(data.getMobile())) {
|
|
|
|
// vo.setMobile(data.getMobile());
|
|
|
|
// }
|
|
|
|
// if (StringUtils.isNotBlank(data.getCustomerOrg())) {
|
|
|
|
// vo.setCustomerOrg(data.getCustomerOrg());
|
|
|
|
// }
|
|
|
|
// if (StringUtils.isNotBlank(data.getVehMark())) {
|
|
|
|
// vo.setVehMark(data.getVehMark());
|
|
|
|
// }
|
|
|
|
// if (StringUtils.isNotBlank(data.getVinNo())) {
|
|
|
|
// vo.setVinNo(data.getVinNo());
|
|
|
|
// }
|
|
|
|
// SettleVo settleVo = data.getSettleVo();
|
|
|
|
// if (null != settleVo) {
|
|
|
|
// vo.setSettleDate(settleVo.getSettleTime());
|
|
|
|
// }
|
|
|
|
// List<SitemVo> sitemVos = data.getSitemVos();
|
|
|
|
// List<SmsSitemVo> smsSitemVos = new ArrayList<>();
|
|
|
|
// if (!sitemVos.isEmpty()) {
|
|
|
|
// for (SitemVo smsSitemVo : sitemVos) {
|
|
|
|
// SmsSitemVo sitemVo = new SmsSitemVo();
|
|
|
|
// BeanUtil.copyProperties(smsSitemVo, sitemVo);
|
|
|
|
// smsSitemVos.add(sitemVo);
|
|
|
|
// }
|
|
|
|
// vo.setSitemVos(smsSitemVos);
|
|
|
|
// }
|
|
|
|
// List<GoodsDetailsVo> goodsDetailsVos = data.getGoodsDetailsVos();
|
|
|
|
// List<SmsGoodsDetailsVo> smsGoodsDetailsVos = new ArrayList<>();
|
|
|
|
// if (!goodsDetailsVos.isEmpty()) {
|
|
|
|
// for (GoodsDetailsVo goodsDetailsVo : goodsDetailsVos) {
|
|
|
|
// SmsGoodsDetailsVo smsGoodsDetailsVo = new SmsGoodsDetailsVo();
|
|
|
|
// BeanUtil.copyProperties(goodsDetailsVo, smsGoodsDetailsVo);
|
|
|
|
// //查询已退数量
|
|
|
|
// String goodsID = goodsDetailsVo.getGoodsID();
|
|
|
|
// String sumBackCount = baseMapper.selBackCountByGoodsID(goodsID, sid);
|
|
|
|
// smsGoodsDetailsVo.setReturnedCount(sumBackCount);
|
|
|
|
// smsGoodsDetailsVos.add(smsGoodsDetailsVo);
|
|
|
|
// }
|
|
|
|
// vo.setGoodsDetailsVos(smsGoodsDetailsVos);
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// } else if (type.equals("1")) {
|
|
|
|
// //销售单
|
|
|
|
// SmsSalesBillDetailsVo data = smsSalesBillService.fetchDetailsVoBySid(sid);
|
|
|
|
// if (null != data) {
|
|
|
|
// vo.setSourceBillNo(data.getBillNo());
|
|
|
|
// vo.setBillType("销售单");
|
|
|
|
// vo.setBillDate(data.getCreateTime());
|
|
|
|
// if (StringUtils.isNotBlank(data.getSubject())) {
|
|
|
|
// vo.setSubject(data.getSubject());
|
|
|
|
// }
|
|
|
|
// if (StringUtils.isNotBlank(data.getSalesName())) {
|
|
|
|
// vo.setWaitorName(data.getSalesName());
|
|
|
|
// }
|
|
|
|
// if (StringUtils.isNotBlank(data.getCustomerName())) {
|
|
|
|
// vo.setCustomerName(data.getCustomerName());
|
|
|
|
// }
|
|
|
|
// if (StringUtils.isNotBlank(data.getMobile())) {
|
|
|
|
// vo.setMobile(data.getMobile());
|
|
|
|
// }
|
|
|
|
// if (StringUtils.isNotBlank(data.getCustomerOrg())) {
|
|
|
|
// vo.setCustomerOrg(data.getCustomerOrg());
|
|
|
|
// }
|
|
|
|
// if (StringUtils.isNotBlank(data.getVehMark())) {
|
|
|
|
// vo.setVehMark(data.getVehMark());
|
|
|
|
// }
|
|
|
|
// if (StringUtils.isNotBlank(data.getVinNo())) {
|
|
|
|
// vo.setVinNo(data.getVinNo());
|
|
|
|
// }
|
|
|
|
// SettlementVo settleVo = data.getSettlementVo();
|
|
|
|
// if (null != settleVo) {
|
|
|
|
// vo.setSettleDate(settleVo.getSettleTime());
|
|
|
|
// }
|
|
|
|
// List<SalesGoodsVo> goodsDetailsVos = data.getGoodsVos();
|
|
|
|
// List<SmsGoodsDetailsVo> smsGoodsDetailsVos = new ArrayList<>();
|
|
|
|
// if (!goodsDetailsVos.isEmpty()) {
|
|
|
|
// for (SalesGoodsVo goodsDetailsVo : goodsDetailsVos) {
|
|
|
|
// SmsGoodsDetailsVo smsGoodsDetailsVo = new SmsGoodsDetailsVo();
|
|
|
|
// BeanUtil.copyProperties(goodsDetailsVo, smsGoodsDetailsVo);
|
|
|
|
// //查询已退数量
|
|
|
|
// String goodsID = goodsDetailsVo.getGoodsID();
|
|
|
|
// String sumBackCount = baseMapper.selBackCountByGoodsID(goodsID, sid);
|
|
|
|
// smsGoodsDetailsVo.setReturnedCount(sumBackCount);
|
|
|
|
// smsGoodsDetailsVos.add(smsGoodsDetailsVo);
|
|
|
|
// smsGoodsDetailsVos.add(smsGoodsDetailsVo);
|
|
|
|
// }
|
|
|
|
// vo.setGoodsDetailsVos(smsGoodsDetailsVos);
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// }
|
|
|
|
return vo; |
|
|
|
} |
|
|
|
|
|
|
@ -636,7 +657,7 @@ public class SmsSalesReturnService extends MybatisBaseService<SmsSalesReturnMapp |
|
|
|
SmsSalesReturn smsSalesReturn = fetchBySid(sid); |
|
|
|
if (null != smsSalesReturn) { |
|
|
|
BeanUtil.copyProperties(smsSalesReturn, vo); |
|
|
|
Integer type = smsSalesReturn.getType(); |
|
|
|
Integer type = smsSalesReturn.getBillType(); |
|
|
|
vo.setCreateTime(DateUtil.formatDate(smsSalesReturn.getCreateTime())); |
|
|
|
if (StringUtils.isNotBlank(smsSalesReturn.getProcInstId())) { |
|
|
|
vo.setInstanceId(smsSalesReturn.getProcInstId()); |
|
|
@ -660,9 +681,6 @@ public class SmsSalesReturnService extends MybatisBaseService<SmsSalesReturnMapp |
|
|
|
if (StringUtils.isNotBlank(data.getMobile())) { |
|
|
|
vo.setMobile(data.getMobile()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(data.getCustomerOrg())) { |
|
|
|
vo.setCustomerOrg(data.getCustomerOrg()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(data.getVehMark())) { |
|
|
|
vo.setVehMark(data.getVehMark()); |
|
|
|
} |
|
|
@ -717,9 +735,6 @@ public class SmsSalesReturnService extends MybatisBaseService<SmsSalesReturnMapp |
|
|
|
if (StringUtils.isNotBlank(data.getMobile())) { |
|
|
|
vo.setMobile(data.getMobile()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(data.getCustomerOrg())) { |
|
|
|
vo.setCustomerOrg(data.getCustomerOrg()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(data.getVehMark())) { |
|
|
|
vo.setVehMark(data.getVehMark()); |
|
|
|
} |
|
|
|