|
|
@@ -12,6 +12,8 @@ import com.fs.common.enums.BusinessType;
|
|
|
import com.fs.common.utils.CloudHostUtils;
|
|
|
import com.fs.common.utils.ServletUtils;
|
|
|
import com.fs.common.utils.poi.ExcelUtil;
|
|
|
+import com.fs.company.domain.Company;
|
|
|
+import com.fs.company.service.ICompanyService;
|
|
|
import com.fs.company.service.impl.CompanyDeptServiceImpl;
|
|
|
import com.fs.course.mapper.FsUserCourseMapper;
|
|
|
import com.fs.course.mapper.FsUserCourseVideoMapper;
|
|
|
@@ -75,6 +77,9 @@ public class QwSopController extends BaseController
|
|
|
@Autowired
|
|
|
private CompanyDeptServiceImpl companyDeptService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ICompanyService companyService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private IQwUserService iQwUserService;
|
|
|
|
|
|
@@ -254,11 +259,13 @@ public class QwSopController extends BaseController
|
|
|
qwSop.setCompanyId(companyId);
|
|
|
qwSop.setCreateBy(loginUser.getUser().getNickName());
|
|
|
qwSop.setCreateTime(sdf.format(new Date()));
|
|
|
+ fillCompanyLevel(qwSop, companyId);
|
|
|
int count = qwSopService.insertQwSop(qwSop);
|
|
|
if(count > 0){
|
|
|
if(qwSop.getQwUserIds() != null){
|
|
|
updateTempVoiceInfo(qwSop);
|
|
|
}
|
|
|
+ return AjaxResult.success(qwSop);
|
|
|
}
|
|
|
return toAjax(count);
|
|
|
|
|
|
@@ -278,10 +285,26 @@ public class QwSopController extends BaseController
|
|
|
if(qwSop != null && qwSop.getQwUserIds() != null){
|
|
|
updateTempVoiceInfo(qwSop);
|
|
|
}
|
|
|
+ LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
+ Long companyId = loginUser.getCompany().getCompanyId();
|
|
|
+ fillCompanyLevel(qwSop, companyId);
|
|
|
+ sop.put("level", qwSop.getLevel());
|
|
|
}
|
|
|
return sop;
|
|
|
}
|
|
|
|
|
|
+ private void fillCompanyLevel(QwSop qwSop, Long companyId) {
|
|
|
+ if (qwSop == null || companyId == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ Company company = companyService.selectCompanyById(companyId);
|
|
|
+ Integer level = company != null && company.getLevel() != null ? company.getLevel() : 0;
|
|
|
+ qwSop.setLevel(level);
|
|
|
+ if (level == 1) {
|
|
|
+ qwSop.setIsRating(1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 暂停企微sop
|