主管理员 1 month ago
parent
commit
82c962c8d8
2 changed files with 43 additions and 35 deletions
  1. +42
    -34
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/OrderServiceImpl.java
  2. +1
    -1
      jeecg-boot-module-system/src/main/resources/application-dev.yml

+ 42
- 34
jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/OrderServiceImpl.java View File

@ -115,6 +115,14 @@ public class OrderServiceImpl implements OrderService {
} }
} }
private String getClassName(String id){
EmployCategory c1 = employCategoryService.getById(id);
if (c1 != null){
return c1.getName();
}
return null;
}
//订单信息-查看订单列表 //订单信息-查看订单列表
@Override @Override
public Result<?> queryOrderList(String token, String status, String role, PageBean pageBean) { public Result<?> queryOrderList(String token, String status, String role, PageBean pageBean) {
@ -131,8 +139,8 @@ public class OrderServiceImpl implements OrderService {
for (EmployOrder order : pageList.getRecords()) { for (EmployOrder order : pageList.getRecords()) {
order.setCategoryOne(employCategoryService.getById(order.getCategoryOne()).getName());
order.setCategoryTwo(employCategoryService.getById(order.getCategoryTwo()).getName());
order.setCategoryOne(getClassName(order.getCategoryOne()));
order.setCategoryTwo(getClassName(order.getCategoryTwo()));
if (order.getType() == 0){ if (order.getType() == 0){
order.setEmployJob(employJobService.getById(order.getJobId())); order.setEmployJob(employJobService.getById(order.getJobId()));
}else { }else {
@ -150,10 +158,8 @@ public class OrderServiceImpl implements OrderService {
EmployOrder order = employOrderService.getById(orderId); EmployOrder order = employOrderService.getById(orderId);
//根据所属行业查询行业信息 //根据所属行业查询行业信息
//分类信息 //分类信息
EmployCategory categoryOne = employCategoryService.getById(order.getCategoryOne());
order.setCategoryOne(categoryOne.getName());
EmployCategory categoryTwo = employCategoryService.getById(order.getCategoryTwo());
order.setCategoryTwo(categoryTwo.getName());
order.setCategoryOne(getClassName(order.getCategoryOne()));
order.setCategoryTwo(getClassName(order.getCategoryTwo()));
//查询招聘关联信息 //查询招聘关联信息
EmployJob job = employJobService.getById(order.getJobId()); EmployJob job = employJobService.getById(order.getJobId());
@ -163,18 +169,20 @@ public class OrderServiceImpl implements OrderService {
//查询求职关联信息 //查询求职关联信息
EmploySeek seek = employSeekService.getById(order.getSeekId()); EmploySeek seek = employSeekService.getById(order.getSeekId());
if(seek!=null){ if(seek!=null){
seek.setCategoryOne(employCategoryService.getById(seek.getCategoryOne()).getName());
seek.setCategoryTwo(employCategoryService.getById(seek.getCategoryTwo()).getName());
seek.setCategoryOne(getClassName(seek.getCategoryOne()));
seek.setCategoryTwo(getClassName(seek.getCategoryTwo()));
order.setEmploySeek(seek); order.setEmploySeek(seek);
} }
//查询公司关联信息 //查询公司关联信息
EmployAuthenticationCompany company = employAuthenticationCompanyService.getById(order.getCompanyId()); EmployAuthenticationCompany company = employAuthenticationCompanyService.getById(order.getCompanyId());
if(company!=null){ if(company!=null){
company.setIndustryName(getClassName(company.getIndustry()));
order.setEmployAuthenticationCompany(company); order.setEmployAuthenticationCompany(company);
} }
//查询个人简历关联信息 //查询个人简历关联信息
EmployResume resume = employResumeService.getById(order.getResumeId()); EmployResume resume = employResumeService.getById(order.getResumeId());
if(resume!=null){ if(resume!=null){
resume.setCategoryOneName(getClassName(resume.getCategoryOne()));
order.setEmployResume(resume); order.setEmployResume(resume);
} }
//查询个人认证关联信息 //查询个人认证关联信息
@ -214,14 +222,14 @@ public class OrderServiceImpl implements OrderService {
//根据订单里面关联个人标识查询认证信息 //根据订单里面关联个人标识查询认证信息
EmployAuthenticationPerson person = employAuthenticationPersonService EmployAuthenticationPerson person = employAuthenticationPersonService
.lambdaQuery().eq(EmployAuthenticationPerson::getUserId, toUser).one();
.lambdaQuery().eq(EmployAuthenticationPerson::getUserId, member.getId()).one();
//检查招聘方认证信息是否存在 //检查招聘方认证信息是否存在
if(company == null){ if(company == null){
return Result.error("招聘方公司认证信息不存在,无法接单"); return Result.error("招聘方公司认证信息不存在,无法接单");
} }
if(person == null){ if(person == null){
return Result.error("招聘方个人认证信息不存在,无法接单");
return Result.error("请您先完成个人认证");
} }
//查询该用户是否已经存在订单 //查询该用户是否已经存在订单
@ -380,7 +388,7 @@ public class OrderServiceImpl implements OrderService {
//根据发布人用户标识查询用户的简历信息 //根据发布人用户标识查询用户的简历信息
EmployResume resume = employResumeService.lambdaQuery().eq(EmployResume::getUserId, toUser).one(); EmployResume resume = employResumeService.lambdaQuery().eq(EmployResume::getUserId, toUser).one();
if(resume==null){ if(resume==null){
return Result.error("请先进行个人简历填写");
return Result.error("该师傅缺缺失个人简历,无法聘用");
} }
//根据订单里面关联公司标识查询认证信息 //根据订单里面关联公司标识查询认证信息
@ -389,16 +397,16 @@ public class OrderServiceImpl implements OrderService {
//公司信息为空 //公司信息为空
if(company==null){ if(company==null){
return Result.error("请先进行公认证");
return Result.error("请先进行公企业认证");
} }
//根据订单里面关联个人标识查询认证信息 //根据订单里面关联个人标识查询认证信息
EmployAuthenticationPerson person = employAuthenticationPersonService EmployAuthenticationPerson person = employAuthenticationPersonService
.lambdaQuery().eq(EmployAuthenticationPerson::getUserId, member.getId()).one();
.lambdaQuery().eq(EmployAuthenticationPerson::getUserId, toUser).one();
//个人信息为空 //个人信息为空
if(person==null){ if(person==null){
return Result.error("请先进行个人认证");
return Result.error("该师傅缺缺失个人认证,无法聘用");
} }
//查询该用户是否已经存在订单 //查询该用户是否已经存在订单
@ -430,8 +438,8 @@ public class OrderServiceImpl implements OrderService {
//招聘方信息 //招聘方信息
employOrder.setWorkHeadImg(company.getHeadImg()); employOrder.setWorkHeadImg(company.getHeadImg());
employOrder.setWorkName(company.getCompany()); employOrder.setWorkName(company.getCompany());
employOrder.setWorkUser(person.getName());
employOrder.setWorkPhone(person.getPhone());
employOrder.setWorkUser(company.getName());
employOrder.setWorkPhone(company.getPhone());
employOrder.setWorkAddress(company.getAddress()); employOrder.setWorkAddress(company.getAddress());
employOrder.setCreateTime(new Date()); employOrder.setCreateTime(new Date());
employOrder.setUserId(member.getId()); employOrder.setUserId(member.getId());
@ -581,7 +589,7 @@ public class OrderServiceImpl implements OrderService {
log.error("无法获取求职者信息,订单号:{}", order.getId()); log.error("无法获取求职者信息,订单号:{}", order.getId());
return Result.error("求职者信息异常,无法结算试工费用"); return Result.error("求职者信息异常,无法结算试工费用");
} }
addMemberAmount(jobSeeker, order.getPayMoney(), "试工费用到账:" + order.getTitle());
addMemberAmount(jobSeeker, order.getOrderNoMoney(), "试工费用到账:" + order.getTitle());
// 如果有求职信息将求职信息状态设置为已完成 // 如果有求职信息将求职信息状态设置为已完成
if(order.getSeekId() != null && StringUtils.isNotBlank(order.getSeekId())){ if(order.getSeekId() != null && StringUtils.isNotBlank(order.getSeekId())){
@ -592,7 +600,7 @@ public class OrderServiceImpl implements OrderService {
} }
} }
} catch (Exception e) { } catch (Exception e) {
log.error("求职者数据丢失,金额:{}无法到账,订单号:{}", order.getPayMoney(), order.getId(), e);
log.error("求职者数据丢失,金额:{}无法到账,订单号:{}", order.getOrderNoMoney(), order.getId(), e);
return Result.error("求职者信息异常,无法结算试工费用"); return Result.error("求职者信息异常,无法结算试工费用");
} }
}else { }else {
@ -643,12 +651,12 @@ public class OrderServiceImpl implements OrderService {
try { try {
HanHaiMember jobSeeker = getJobSeekerFromOrder(order); HanHaiMember jobSeeker = getJobSeekerFromOrder(order);
if(jobSeeker != null){ if(jobSeeker != null){
addMemberAmount(jobSeeker, order.getPayMoney(), "试工费用到账:" + order.getTitle());
addMemberAmount(jobSeeker, order.getOrderNoMoney(), "试工费用到账:" + order.getTitle());
} else { } else {
log.error("无法获取求职者信息,金额:{}无法到账,订单号:{}", order.getPayMoney(), order.getId());
log.error("无法获取求职者信息,金额:{}无法到账,订单号:{}", order.getOrderNoMoney(), order.getId());
} }
}catch (Exception e){ }catch (Exception e){
log.error("求职者数据丢失,金额:{}无法到账,订单号:{}", order.getPayMoney(), order.getId(), e);
log.error("求职者数据丢失,金额:{}无法到账,订单号:{}", order.getOrderNoMoney(), order.getId(), e);
} }
//修改订单状态 //修改订单状态
@ -704,10 +712,10 @@ public class OrderServiceImpl implements OrderService {
log.error("无法获取求职者信息,订单号:{}", order.getId()); log.error("无法获取求职者信息,订单号:{}", order.getId());
return Result.error("求职者信息异常,无法结算试工费用"); return Result.error("求职者信息异常,无法结算试工费用");
} }
addMemberAmount(jobSeeker, order.getPayMoney(), "试工费用到账:" + order.getTitle());
log.info("试工费用转账成功,订单号:{},金额:{},收款人:{}", order.getId(), order.getPayMoney(), jobSeeker.getId());
addMemberAmount(jobSeeker, order.getOrderNoMoney(), "试工费用到账:" + order.getTitle());
log.info("试工费用转账成功,订单号:{},金额:{},收款人:{}", order.getId(), order.getOrderNoMoney(), jobSeeker.getId());
} catch (Exception e) { } catch (Exception e) {
log.error("求职者数据丢失,金额:{}无法到账,订单号:{}", order.getPayMoney(), order.getId(), e);
log.error("求职者数据丢失,金额:{}无法到账,订单号:{}", order.getOrderNoMoney(), order.getId(), e);
return Result.error("求职者信息异常,无法结算试工费用"); return Result.error("求职者信息异常,无法结算试工费用");
} }
} }
@ -837,12 +845,12 @@ public class OrderServiceImpl implements OrderService {
try { try {
HanHaiMember jobSeeker = getJobSeekerFromOrder(order); HanHaiMember jobSeeker = getJobSeekerFromOrder(order);
if(jobSeeker != null){ if(jobSeeker != null){
addMemberAmount(jobSeeker, order.getPayMoney(), "试工费用到账:" + order.getTitle());
addMemberAmount(jobSeeker, order.getOrderNoMoney(), "试工费用到账:" + order.getTitle());
} else { } else {
log.error("无法获取求职者信息,金额:{}无法到账,订单号:{}", order.getPayMoney(), order.getId());
log.error("无法获取求职者信息,金额:{}无法到账,订单号:{}", order.getOrderNoMoney(), order.getId());
} }
}catch (Exception e){ }catch (Exception e){
log.error("求职者数据丢失,金额:{}无法到账,订单号:{}", order.getPayMoney(), order.getId(), e);
log.error("求职者数据丢失,金额:{}无法到账,订单号:{}", order.getOrderNoMoney(), order.getId(), e);
} }
//修改订单状态 //修改订单状态
@ -851,13 +859,13 @@ public class OrderServiceImpl implements OrderService {
order.setOrderStatus("Y"); order.setOrderStatus("Y");
if (order.getType() == 0){
if (order.getOrderNoMoney().compareTo(order.getPayMoney()) > 0){
order.setOrderStatusSeek("Y");
}else {
order.setOrderStatusSeek("N");
}
}
// if (order.getType() == 0){
// if (order.getOrderNoMoney().compareTo(order.getPayMoney()) > 0){
// order.setOrderStatusSeek("Y");
// }else {
// order.setOrderStatusSeek("N");
// }
// }
employOrderService.updateById(order); employOrderService.updateById(order);


+ 1
- 1
jeecg-boot-module-system/src/main/resources/application-dev.yml View File

@ -1,5 +1,5 @@
server: server:
port: 8003
port: 8002
tomcat: tomcat:
max-swallow-size: -1 max-swallow-size: -1
error: error:


Loading…
Cancel
Save