|
@@ -10,9 +10,12 @@ import com.zhiqiyun.open.core.models.category.CategoryOrganization;
|
|
|
import com.zhiqiyun.open.core.service.CategoryMaterialService;
|
|
import com.zhiqiyun.open.core.service.CategoryMaterialService;
|
|
|
import com.zhiqiyun.open.core.service.CategoryOccupationService;
|
|
import com.zhiqiyun.open.core.service.CategoryOccupationService;
|
|
|
import com.zhiqiyun.open.core.service.CategoryOrganizationService;
|
|
import com.zhiqiyun.open.core.service.CategoryOrganizationService;
|
|
|
|
|
+import com.zhiqiyun.open.core.service.SequenceService;
|
|
|
import com.zhiqiyun.open.router.request.category.CategoryMaterialRequest;
|
|
import com.zhiqiyun.open.router.request.category.CategoryMaterialRequest;
|
|
|
import com.zhiqiyun.open.router.request.category.CategoryOccupationRequest;
|
|
import com.zhiqiyun.open.router.request.category.CategoryOccupationRequest;
|
|
|
import com.zhiqiyun.open.router.request.category.CategoryOrganizationRequest;
|
|
import com.zhiqiyun.open.router.request.category.CategoryOrganizationRequest;
|
|
|
|
|
+import com.zhiqiyun.open.router.request.category.CategoryOrganizationSaveRequest;
|
|
|
|
|
+import com.zhiqiyun.open.utils.DateUtil;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -32,6 +35,9 @@ public class CategoryApi {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private CategoryOrganizationService categoryOrganizationService;
|
|
private CategoryOrganizationService categoryOrganizationService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private SequenceService sequenceService;
|
|
|
|
|
+
|
|
|
@ServiceMethod(method = "list.category.occupation", title = "查询文旅岗位目录")
|
|
@ServiceMethod(method = "list.category.occupation", title = "查询文旅岗位目录")
|
|
|
public OapResponse listCategoryOccupation(CategoryOccupationRequest request) {
|
|
public OapResponse listCategoryOccupation(CategoryOccupationRequest request) {
|
|
|
QueryWrapper<CategoryOccupation> queryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<CategoryOccupation> queryWrapper = new QueryWrapper<>();
|
|
@@ -76,4 +82,30 @@ public class CategoryApi {
|
|
|
return OapResponse.success().setBody(listData);
|
|
return OapResponse.success().setBody(listData);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @ServiceMethod(method = "list.category.organization.save", title = "机构保存")
|
|
|
|
|
+ public OapResponse listPageOrganizationSave(CategoryOrganizationSaveRequest request) {
|
|
|
|
|
+ QueryWrapper<CategoryOrganization> queryWrapper = new QueryWrapper<>();
|
|
|
|
|
+ queryWrapper.eq("name", request.getName())
|
|
|
|
|
+ .last("limit 1");
|
|
|
|
|
+ CategoryOrganization categoryOrganization = this.categoryOrganizationService.getOne(queryWrapper);
|
|
|
|
|
+ if (categoryOrganization != null) return OapResponse.success().setBody(categoryOrganization.getId());
|
|
|
|
|
+ categoryOrganization = new CategoryOrganization();
|
|
|
|
|
+ categoryOrganization.setName(request.getName());
|
|
|
|
|
+ categoryOrganization.setSocialCode(request.getSocialCode());
|
|
|
|
|
+ categoryOrganization.setBusinessLicense(request.getBusinessLicense());
|
|
|
|
|
+ categoryOrganization.setLegalPersonName(request.getLegalPersonName());
|
|
|
|
|
+ categoryOrganization.setLegalPersonIdCardA(request.getLegalPersonIdCardA());
|
|
|
|
|
+ categoryOrganization.setLegalPersonIdCardB(request.getLegalPersonIdCardB());
|
|
|
|
|
+ categoryOrganization.setContacts(request.getContacts());
|
|
|
|
|
+ categoryOrganization.setContactNumber(request.getContactNumber());
|
|
|
|
|
+ categoryOrganization.setContactAddress(request.getContactAddress());
|
|
|
|
|
+ categoryOrganization.setRemark(request.getRemark());
|
|
|
|
|
+ categoryOrganization.setLat(request.getLat());
|
|
|
|
|
+ categoryOrganization.setLng(request.getLng());
|
|
|
|
|
+ categoryOrganization.setId(this.sequenceService.nextId());
|
|
|
|
|
+ categoryOrganization.setCreatedTime(DateUtil.current());
|
|
|
|
|
+ this.categoryOrganizationService.save(categoryOrganization);
|
|
|
|
|
+ return OapResponse.success().setBody(categoryOrganization.getId());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|