|
@@ -341,9 +341,12 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
public void confirm(List<String> ids) {
|
|
|
ids.forEach(id -> {
|
|
|
TbBusiness business = this.getById(id);
|
|
|
+ SpAdmin currAdmin = StpUserUtil.getAdmin();
|
|
|
+ String adminName = StrUtil.isNotEmpty(currAdmin.getNickname()) ? currAdmin.getNickname():currAdmin.getName();
|
|
|
business.setConfirmInput(1).setAdminConfirmInput(1)
|
|
|
.setConfirmInputTime(new Date())
|
|
|
- .setConfirmInputBy(StpUserUtil.getAdmin().getName());
|
|
|
+ .setConfirmInputBy(StpUserUtil.getAdmin().getName())
|
|
|
+ .setConfirmBy(adminName).setConfirmByAdminId(currAdmin.getId()+"");
|
|
|
this.updateById(business);
|
|
|
List<TbBusinessCar> cars = tbBusinessCarService.findOtherBusinessCar(business.getId());
|
|
|
String carNoStr = cars.stream().map(TbBusinessCar::getCarNo).collect(Collectors.joining("、"));
|
|
@@ -716,6 +719,22 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
.setItemName(db.getItemName()).setItemPrice(db.getPrice()).setRemark(tbItem.getRemark())
|
|
|
.setItemTypeId(typeId).setItemTypeName(tbItemType.getName())
|
|
|
.setUnit(db.getUnit()).setTotal(itemTotalPrice).setCreateTime(now);
|
|
|
+ //合作伙伴创建记录接单操作人by lzm
|
|
|
+ String businessType = item.getBusinessType();
|
|
|
+ if (!StrUtil.equals(businessType, TbCostomer.CustomerEnum.BUSINESS_TYPE.getType())) {
|
|
|
+ String currCustomerId = StpUserUtil.getCustomerId();
|
|
|
+ TbCostomer currCostomer = tbCostomerService.getById(currCustomerId);
|
|
|
+ List<String> customerType = new ArrayList<>();
|
|
|
+ if (currCostomer != null) {
|
|
|
+ customerType = StrUtil.splitTrim(currCostomer.getType(), ",");
|
|
|
+ }
|
|
|
+ if (customerType.contains(businessType)) {
|
|
|
+ SpAdmin currAdmin = StpUserUtil.getAdmin();
|
|
|
+ String adminName = StrUtil.isNotEmpty(currAdmin.getNickname()) ? currAdmin.getNickname():currAdmin.getName();
|
|
|
+ item.setPickBy(adminName).setPickByAdminId(currAdmin.getId()+"");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //
|
|
|
price = price.add(itemTotalPrice);
|
|
|
itemList.add(item);
|
|
|
index++;
|
|
@@ -837,6 +856,24 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
.setItemName(db.getItemName()).setItemPrice(db.getPrice()).setRemark(tbItem.getRemark())
|
|
|
.setItemTypeId(tbItem.getTypeId()).setItemTypeName(tbItemType.getName())
|
|
|
.setUnit(db.getUnit()).setTotal(itemTotalPrice).setCreateTime(now);
|
|
|
+ //by lzm
|
|
|
+ String businessType = item.getBusinessType();
|
|
|
+ if (!StrUtil.equals(businessType, TbCostomer.CustomerEnum.BUSINESS_TYPE.getType())) {
|
|
|
+ String currCustomerId = StpUserUtil.getCustomerId();
|
|
|
+ TbCostomer currCostomer = tbCostomerService.getById(currCustomerId);
|
|
|
+ List<String> customerType = new ArrayList<>();
|
|
|
+ if (currCostomer != null) {
|
|
|
+ customerType = StrUtil.splitTrim(currCostomer.getType(), ",");
|
|
|
+ }
|
|
|
+ if (customerType.contains(businessType)) {
|
|
|
+ SpAdmin currAdmin = StpUserUtil.getAdmin();
|
|
|
+ String adminName = StrUtil.isNotEmpty(currAdmin.getNickname()) ? currAdmin.getNickname():currAdmin.getName();
|
|
|
+ item.setPickBy(adminName).setPickByAdminId(currAdmin.getId()+"");
|
|
|
+ }else {
|
|
|
+ item.setPickBy("").setPickByAdminId("");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //
|
|
|
price = price.add(itemTotalPrice);
|
|
|
itemList.add(item);
|
|
|
index++;
|