|
|
@@ -94,7 +94,7 @@ public class CompanyService extends BaseService<Company> {
|
|
|
|
|
|
@Autowired
|
|
|
private WaitToDoService waitToDoService;
|
|
|
-
|
|
|
+
|
|
|
@Autowired
|
|
|
private ProjectApplicationCompanyInfoService applicationCompanyInfoService;
|
|
|
|
|
|
@@ -401,7 +401,7 @@ public class CompanyService extends BaseService<Company> {
|
|
|
}
|
|
|
return company == null ? new Company() : company;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 查询企业名称是否存在
|
|
|
*/
|
|
|
@@ -483,7 +483,7 @@ public class CompanyService extends BaseService<Company> {
|
|
|
approval1.setOper_type(Constant.OperType.APPROVED);
|
|
|
//保存审核记录
|
|
|
approvalService.insertAndGetId(approval1);
|
|
|
- if (CommonUtils.isNotNull(users) && users.size() > 0 ) {
|
|
|
+ if (CommonUtils.isNotNull(users) && users.size() > 0) {
|
|
|
sendSMSToRegisteredCompanyUser(users.get(0), true, approval1);
|
|
|
}
|
|
|
|
|
|
@@ -550,7 +550,7 @@ public class CompanyService extends BaseService<Company> {
|
|
|
|
|
|
//发送短信给企业用户,账号注册成功/失败
|
|
|
// 发送短信 错误修改 wangjiang 2020-1-8
|
|
|
- private void sendSMSToRegisteredCompanyUser(User user, Boolean isPassed, Approval approval) {
|
|
|
+ private void sendSMSToRegisteredCompanyUser(User user, Boolean isPassed, Approval approval) {
|
|
|
String templateParam;
|
|
|
String phone = user.getPhone();
|
|
|
logger.info("send msg to register company user which phone is : {}", phone);
|
|
|
@@ -763,14 +763,19 @@ public class CompanyService extends BaseService<Company> {
|
|
|
* @param letter
|
|
|
* @return
|
|
|
*/
|
|
|
- public List<CompanyContacts> findCompanyListByName(String letter, String companyName) {
|
|
|
+ public List<CompanyContacts> findCompanyListByName(String userId, String letter, String companyName) {
|
|
|
|
|
|
- boolean isLogin= ShiroUtils.isLogin();
|
|
|
+ /* boolean isLogin= ShiroUtils.isLogin();
|
|
|
List<CompanyContacts> list = new ArrayList<>();
|
|
|
if(!isLogin){
|
|
|
return list;
|
|
|
+ }*/
|
|
|
+ if (CommonUtils.isNull(userId)) {
|
|
|
+ List<CompanyContacts> list = new ArrayList<>();
|
|
|
+ return list;
|
|
|
}
|
|
|
- return companyContactService.findCompanyContactList(letter, companyName, ShiroUtils.getStreetId(), ShiroUtils.getBuildId());
|
|
|
+ User user = userService.getUser(Integer.parseInt(userId));
|
|
|
+ return companyContactService.findCompanyContactList(letter, companyName, user.getStreet_id(), user.getBuild_id());
|
|
|
}
|
|
|
|
|
|
private List<Company> companyContacts(String letter, String searchName) {
|
|
|
@@ -781,7 +786,7 @@ public class CompanyService extends BaseService<Company> {
|
|
|
for (LetterEnum anEnum : LetterEnum.values()) {
|
|
|
ccs.setLetter(anEnum.toString());
|
|
|
for (CompanyContact contact : companies) {
|
|
|
- if (contact.getLetter().equals(anEnum.toString())){
|
|
|
+ if (contact.getLetter().equals(anEnum.toString())) {
|
|
|
|
|
|
}
|
|
|
}
|