|
@@ -387,7 +387,9 @@ public class OrderServiceImpl implements IOrderService {
|
|
|
|
|
|
//无固定场
|
|
|
if (createOrderForm.getOrderType() == 2) {
|
|
|
- AppSitePriceRules priceRule = appSitePriceRulesMapper.selectById(createOrderForm.getProductIds());
|
|
|
+ AppSitePlace sitePlace = appSitePlaceMapper.selectById(createOrderForm.getProductIds());
|
|
|
+ AppSitePriceRules priceRule = appSitePriceRulesMapper.selectOne(Wrappers.<AppSitePriceRules>lambdaQuery()
|
|
|
+ .eq(AppSitePriceRules::getSitePlaceId,sitePlace.getId()).last("limit 1"));
|
|
|
AppSitePlace appSitePlace = appSitePlaceMapper.selectById(priceRule.getSitePlaceId());
|
|
|
AppSite appSite = appSiteMapper.selectById(appSitePlace.getSiteId());
|
|
|
|
|
@@ -413,7 +415,6 @@ public class OrderServiceImpl implements IOrderService {
|
|
|
appOrderProInfo.setDelFlag(CommonConstant.DEL_FLAG_0);
|
|
|
|
|
|
proInfoList.add(appOrderProInfo);
|
|
|
-
|
|
|
tDiscounts = tDiscounts.add(priceRule.getOriginalPrice().subtract(priceRule.getSellingPrice())).setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
|
sumPrice = sumPrice.add(priceRule.getSellingPrice()).setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
|
}
|
|
@@ -684,17 +685,19 @@ public class OrderServiceImpl implements IOrderService {
|
|
|
* 保存签署流程记录
|
|
|
*/
|
|
|
private void saveSignFlowRecord(AppOrder appOrder) {
|
|
|
- List.of(appOrder.getFamilyIds().split(",")).forEach(a->{
|
|
|
- String id = UUID.randomUUID().toString().replace("-", "");
|
|
|
- AppContractSign record = new AppContractSign()
|
|
|
- .setId(id)
|
|
|
- .setOrderId(appOrder.getId())
|
|
|
- .setFamilyId(a)
|
|
|
- .setOrgCode(appOrder.getOrgCode())
|
|
|
- .setCreateTime(new Date())
|
|
|
- .setUpdateTime(new Date());
|
|
|
- appContractSignMapper.insert(record);
|
|
|
- });
|
|
|
+ if (appOrder.getFamilyIds() != null && !appOrder.getFamilyIds().isEmpty()){
|
|
|
+ List.of(appOrder.getFamilyIds().split(",")).forEach(a->{
|
|
|
+ String id = UUID.randomUUID().toString().replace("-", "");
|
|
|
+ AppContractSign record = new AppContractSign()
|
|
|
+ .setId(id)
|
|
|
+ .setOrderId(appOrder.getId())
|
|
|
+ .setFamilyId(a)
|
|
|
+ .setOrgCode(appOrder.getOrgCode())
|
|
|
+ .setCreateTime(new Date())
|
|
|
+ .setUpdateTime(new Date());
|
|
|
+ appContractSignMapper.insert(record);
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@Override
|