فهرست منبع

业务表增加确认人,作业表增加接单人

lzm 3 سال پیش
والد
کامیت
a68a0c323c
1فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 4 1
      sp-server/src/main/java/com/pj/api/service/ApiService.java

+ 4 - 1
sp-server/src/main/java/com/pj/api/service/ApiService.java

@@ -253,9 +253,12 @@ public class ApiService {
         if (tbBusinessItem.getPick() == 1) {
             return AjaxJson.getError("您慢了一步,其他用户已接单");
         }
+        String adminId = spAdmin.getId()+"";
+        String adminName = StrUtil.isNotEmpty(spAdmin.getNickname()) ? spAdmin.getNickname():spAdmin.getName();
         String customerId = spAdmin.getCustomerId();
         TbCostomer tbCostomer = tbCostomerService.getById(customerId);
-        tbBusinessItem.setPick(1).setPickTime(new Date()).setPickCustomerId(tbCostomer.getId()).setPickCustomerName(tbCostomer.getName());
+        tbBusinessItem.setPick(1).setPickTime(new Date()).setPickCustomerId(tbCostomer.getId()).setPickCustomerName(tbCostomer.getName())
+            .setPickBy(adminName).setPickByAdminId(adminId);
         tbBusinessItemService.updateById(tbBusinessItem);
         //todo 通知录入人员 已接单
         List<SpAdmin> spAdminList = spAdminService.findByCustomerId(UserTypeEnum.PLATFORM_ADMIN.getCustomerId());