Procházet zdrojové kódy

Merge branch 'test' of http://git.mokasz.com/marketing/moka-private into test

leon před 4 roky
rodič
revize
27907c5fed

+ 17 - 4
src/main/java/com/mokamrp/privates/controller/pangu/FosterwxCashScheduleTaskListController.java

@@ -9,11 +9,14 @@ import com.mokamrp.privates.help.AjaxResult;
 import com.mokamrp.privates.interceptor.AuthUser;
 import com.mokamrp.privates.mapper.pangu.pojo.FosterwxCashScheduleTaskList;
 import com.mokamrp.privates.mapper.pangu.pojo.FosterwxCashScheduleTaskMobile;
+import com.mokamrp.privates.mapper.pangu.pojo.FosterwxMobile;
+import com.mokamrp.privates.mapper.pojo.Corp;
 import com.mokamrp.privates.mapper.pojo.User;
-import com.mokamrp.privates.service.pangu.FosterwxCashMobileService;
+import com.mokamrp.privates.service.CorpService;
 import com.mokamrp.privates.service.pangu.FosterwxCashScheduleTaskListService;
 import com.mokamrp.privates.service.pangu.FosterwxCashScheduleTaskMobileService;
 import com.mokamrp.privates.service.pangu.FosterwxCashWorkwxTaskListService;
+import com.mokamrp.privates.service.pangu.FosterwxMobileService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -51,7 +54,10 @@ public class FosterwxCashScheduleTaskListController extends BaseController<Foste
     public FosterwxCashScheduleTaskMobileService fosterwxCashScheduleTaskMobileService;
 
     @Autowired
-    public FosterwxCashMobileService fosterwxCashMobileService;
+    public FosterwxMobileService fosterwxMobileService;
+
+    @Autowired
+    public CorpService corpService;
 
     /*
      * @fast
@@ -133,8 +139,15 @@ public class FosterwxCashScheduleTaskListController extends BaseController<Foste
         });
 
         fosterwxCashScheduleTaskMobiles.forEach(fosterwxCashScheduleTaskMobile -> {
-            fosterwxCashScheduleTaskMobile.setFosterwxCashScheduleTaskList(fosterwxCashScheduleTaskListService.getById(fosterwxCashScheduleTaskMobile.getTaskId()));
-            fosterwxCashScheduleTaskMobile.setFosterwxCashMobile(fosterwxCashMobileService.getById(fosterwxCashScheduleTaskMobile.getMobileId()));
+            FosterwxCashScheduleTaskList taskList = fosterwxCashScheduleTaskListService.getById(fosterwxCashScheduleTaskMobile.getTaskId());
+            fosterwxCashScheduleTaskMobile.setFosterwxCashScheduleTaskList(taskList);
+            FosterwxMobile fosterwxMobile = fosterwxMobileService.getById(fosterwxCashScheduleTaskMobile.getMobileId());
+            if (null != fosterwxMobile) {
+                Corp corp = corpService.getById(fosterwxMobile.getWorkWxCorpId());
+                fosterwxMobile.setWorkWxCorp(null != corp ? corp.getName() : "");
+            }
+            fosterwxCashScheduleTaskMobile.setFosterwxMobile(fosterwxMobile);
+            fosterwxCashScheduleTaskMobile.setFosterwxCashWorkwxTaskList(fosterwxCashWorkwxTaskListService.getById(taskList.getChildTaskId()));
         });
 
         return AjaxResult.success(fosterwxCashScheduleTaskMobiles);

+ 20 - 9
src/main/java/com/mokamrp/privates/mapper/pangu/pojo/FosterwxCashScheduleTaskMobile.java

@@ -62,7 +62,10 @@ public class FosterwxCashScheduleTaskMobile extends Model<FosterwxCashScheduleTa
     private FosterwxCashScheduleTaskList fosterwxCashScheduleTaskList;
 
     @TableField(exist = false)
-    private FosterwxCashMobile fosterwxCashMobile;
+    private FosterwxMobile fosterwxMobile;
+
+    @TableField(exist = false)
+    private FosterwxCashWorkwxTaskList fosterwxCashWorkwxTaskList;
 
     @TableField(exist = false)
     private String ids;
@@ -149,14 +152,6 @@ public class FosterwxCashScheduleTaskMobile extends Model<FosterwxCashScheduleTa
         this.fosterwxCashScheduleTaskList = fosterwxCashScheduleTaskList;
     }
 
-    public FosterwxCashMobile getFosterwxCashMobile() {
-        return fosterwxCashMobile;
-    }
-
-    public void setFosterwxCashMobile(FosterwxCashMobile fosterwxCashMobile) {
-        this.fosterwxCashMobile = fosterwxCashMobile;
-    }
-
     public String getIds() {
         return ids;
     }
@@ -164,4 +159,20 @@ public class FosterwxCashScheduleTaskMobile extends Model<FosterwxCashScheduleTa
     public void setIds(String ids) {
         this.ids = ids;
     }
+
+    public FosterwxMobile getFosterwxMobile() {
+        return fosterwxMobile;
+    }
+
+    public void setFosterwxMobile(FosterwxMobile fosterwxMobile) {
+        this.fosterwxMobile = fosterwxMobile;
+    }
+
+    public FosterwxCashWorkwxTaskList getFosterwxCashWorkwxTaskList() {
+        return fosterwxCashWorkwxTaskList;
+    }
+
+    public void setFosterwxCashWorkwxTaskList(FosterwxCashWorkwxTaskList fosterwxCashWorkwxTaskList) {
+        this.fosterwxCashWorkwxTaskList = fosterwxCashWorkwxTaskList;
+    }
 }