|
@@ -5,6 +5,7 @@ import com.jpsoft.employment.modules.base.entity.Company;
|
|
|
import com.jpsoft.employment.modules.base.entity.EnterpriseCertificationApprove;
|
|
|
import com.jpsoft.employment.modules.base.entity.LabourServices;
|
|
|
import com.jpsoft.employment.modules.base.entity.LabourServicesApprove;
|
|
|
+import com.jpsoft.employment.modules.base.service.CompanyService;
|
|
|
import com.jpsoft.employment.modules.base.service.LabourServicesApproveService;
|
|
|
import com.jpsoft.employment.modules.base.service.LabourServicesService;
|
|
|
import com.jpsoft.employment.modules.common.dto.MessageResult;
|
|
@@ -38,6 +39,9 @@ public class LabourServicesController {
|
|
|
@Autowired
|
|
|
private DataDictionaryService dataDictionaryService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private CompanyService companyService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private UserService userService;
|
|
|
|
|
@@ -90,16 +94,31 @@ public class LabourServicesController {
|
|
|
|
|
|
@ApiOperation(value="获取信息")
|
|
|
@GetMapping("edit/{id}")
|
|
|
- public MessageResult<LabourServices> edit(@PathVariable("id") String id){
|
|
|
+ public MessageResult<LabourServices> edit(@PathVariable("id") String id,@RequestAttribute String subject){
|
|
|
MessageResult<LabourServices> msgResult = new MessageResult<>();
|
|
|
|
|
|
try {
|
|
|
+ User user = userService.get(subject);
|
|
|
+
|
|
|
+ if (user == null) {
|
|
|
+ throw new Exception("用户未登录,请先登录!");
|
|
|
+ }
|
|
|
+
|
|
|
+ Company company = companyService.get(user.getCompanyId());
|
|
|
+
|
|
|
+ if (company == null) {
|
|
|
+ throw new Exception("未查询到登录人员所在公司!");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
LabourServices labourServices = labourServicesService.get(id);
|
|
|
|
|
|
if (labourServices != null) {
|
|
|
String typeN = dataDictionaryService.findNameByCatalogNameAndValue("劳务对接类型",labourServices.getType());
|
|
|
|
|
|
labourServices.setTypeN(typeN);
|
|
|
+ labourServices.setCompanyName(company.getName());
|
|
|
+ labourServices.setLogo(company.getLogo());
|
|
|
|
|
|
msgResult.setResult(true);
|
|
|
msgResult.setData(labourServices);
|