|
@@ -1,19 +1,17 @@
|
|
package com.jpsoft.employment.modules.mobile.controller;
|
|
package com.jpsoft.employment.modules.mobile.controller;
|
|
|
|
|
|
import com.github.pagehelper.Page;
|
|
import com.github.pagehelper.Page;
|
|
|
|
+import com.jpsoft.employment.modules.base.entity.Company;
|
|
import com.jpsoft.employment.modules.base.entity.LabourServices;
|
|
import com.jpsoft.employment.modules.base.entity.LabourServices;
|
|
import com.jpsoft.employment.modules.base.service.CompanyService;
|
|
import com.jpsoft.employment.modules.base.service.CompanyService;
|
|
import com.jpsoft.employment.modules.base.service.LabourServicesService;
|
|
import com.jpsoft.employment.modules.base.service.LabourServicesService;
|
|
import com.jpsoft.employment.modules.common.dto.MessageResult;
|
|
import com.jpsoft.employment.modules.common.dto.MessageResult;
|
|
import com.jpsoft.employment.modules.common.dto.Sort;
|
|
import com.jpsoft.employment.modules.common.dto.Sort;
|
|
-import com.jpsoft.employment.modules.common.utils.MapUtils;
|
|
|
|
import com.jpsoft.employment.modules.common.utils.PojoUtils;
|
|
import com.jpsoft.employment.modules.common.utils.PojoUtils;
|
|
import com.jpsoft.employment.modules.sys.entity.User;
|
|
import com.jpsoft.employment.modules.sys.entity.User;
|
|
import com.jpsoft.employment.modules.sys.service.DataDictionaryService;
|
|
import com.jpsoft.employment.modules.sys.service.DataDictionaryService;
|
|
import com.jpsoft.employment.modules.sys.service.UserService;
|
|
import com.jpsoft.employment.modules.sys.service.UserService;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
-import io.swagger.annotations.ApiImplicitParam;
|
|
|
|
-import io.swagger.annotations.ApiImplicitParams;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -100,6 +98,12 @@ public class LabourApiController {
|
|
labourServices.setApprovePersonName(user.getRealName());
|
|
labourServices.setApprovePersonName(user.getRealName());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ Company company = companyService.get(user.getCompanyId());
|
|
|
|
+
|
|
|
|
+ if(company!=null) {
|
|
|
|
+ labourServices.setCompanyName(company.getName());
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
msgResult.setResult(true);
|
|
msgResult.setResult(true);
|
|
@@ -110,17 +114,23 @@ public class LabourApiController {
|
|
|
|
|
|
@PostMapping("getLabourDetails/{id}")
|
|
@PostMapping("getLabourDetails/{id}")
|
|
@ApiOperation(value = "劳务对接详情")
|
|
@ApiOperation(value = "劳务对接详情")
|
|
- public MessageResult<LabourServices> getLabourDetails(
|
|
|
|
|
|
+ public MessageResult<Map> getLabourDetails(
|
|
@PathVariable("id") String id,
|
|
@PathVariable("id") String id,
|
|
String token) {
|
|
String token) {
|
|
- MessageResult<LabourServices> msgResult = new MessageResult<>();
|
|
|
|
|
|
+ MessageResult<Map> msgResult = new MessageResult<>();
|
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
|
|
|
try {
|
|
try {
|
|
LabourServices labourServices = labourServicesService.get(id);
|
|
LabourServices labourServices = labourServicesService.get(id);
|
|
|
|
+ User user = userService.get(labourServices.getApprovePersonId());
|
|
|
|
+ Company company = companyService.get(user.getCompanyId());
|
|
|
|
+
|
|
|
|
+ map.put("labourServices",labourServices);
|
|
|
|
+ map.put("company",company);
|
|
|
|
|
|
if (labourServices != null) {
|
|
if (labourServices != null) {
|
|
msgResult.setResult(true);
|
|
msgResult.setResult(true);
|
|
- msgResult.setData(labourServices);
|
|
|
|
|
|
+ msgResult.setData(map);
|
|
} else {
|
|
} else {
|
|
msgResult.setResult(false);
|
|
msgResult.setResult(false);
|
|
msgResult.setMessage("数据库不存在该记录!");
|
|
msgResult.setMessage("数据库不存在该记录!");
|