|
|
@@ -30,6 +30,8 @@ import platform.common.util.DateUtil;
|
|
|
import platform.common.util.ExportExcel;
|
|
|
import platform.common.util.ShiroUtils;
|
|
|
import platform.common.util.WebUtil;
|
|
|
+import platform.modules.api.dto.SyncUserDto;
|
|
|
+import platform.modules.api.service.SkyImageApiService;
|
|
|
import platform.modules.build.DTO.CompanyDto;
|
|
|
import platform.modules.build.dao.CompanyContactDao;
|
|
|
import platform.modules.build.dao.CompanyDao;
|
|
|
@@ -62,12 +64,12 @@ import tk.mybatis.mapper.entity.Example.Criteria;
|
|
|
@Transactional
|
|
|
public class CompanyInfoManageService extends BaseService<Company> {
|
|
|
|
|
|
-
|
|
|
@Autowired
|
|
|
private CompanyService companyService;
|
|
|
|
|
|
@Autowired
|
|
|
private CompanyContactService companyContactService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private CompanyContactDao companyContactdao;
|
|
|
|
|
|
@@ -76,19 +78,28 @@ public class CompanyInfoManageService extends BaseService<Company> {
|
|
|
|
|
|
@Autowired
|
|
|
private CompanyDao companyDao;
|
|
|
+
|
|
|
@Autowired
|
|
|
private BuildInfoService buildInfoService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private StreetService streetService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private DictionaryTypeService dictionaryTypeService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private DictionaryItemService dictionaryItemService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private RoleService roleService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private UserService userService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private SkyImageApiService skyImageApiService;
|
|
|
+
|
|
|
public PageInfo<Company> findPage(Integer pageNum, Integer pageSize,
|
|
|
CompanyDto companyDto, CompanyInfoManageDto companyInfoManageDto) throws Exception {
|
|
|
if (StringUtils.isNotBlank(companyInfoManageDto.getKcompany_name())) {
|
|
|
@@ -383,9 +394,32 @@ public class CompanyInfoManageService extends BaseService<Company> {
|
|
|
}
|
|
|
}
|
|
|
User user = new User();
|
|
|
+ user.setCompany_name(information.getCompany_name());
|
|
|
user.setStreet_name(information.getStreet_name());
|
|
|
user.setStreet_id(information.getStreet_id());
|
|
|
userService.updateByCompanyId(id.toString(), user);
|
|
|
+
|
|
|
+ //企业名称同步到天启
|
|
|
+ new Thread(() -> {
|
|
|
+ //同步信息天启
|
|
|
+ List<User> userDtos = userService.findUsersByCompanyId(id);
|
|
|
+ for (User userDto : userDtos) {
|
|
|
+ SyncUserDto dto = new SyncUserDto();
|
|
|
+ dto.setAction(Constant.METHOD_STATUS.UPDATE);
|
|
|
+ dto.setUserName(userDto.getUser_name());
|
|
|
+ dto.setUserLoginName(userDto.getNick_name());
|
|
|
+ dto.setPassword(userDto.getPassword().trim());
|
|
|
+ dto.setPhone(userDto.getPhone());
|
|
|
+ dto.setCompanyName(information.getCompany_name());
|
|
|
+ if (null != information.getStreet_id()) {
|
|
|
+ Street street = streetService.findById(information.getStreet_id());
|
|
|
+ dto.setStreetName(street.getName());
|
|
|
+ }
|
|
|
+ dto.setToken(skyImageApiService.accessToken());
|
|
|
+ skyImageApiService.syncUserInfo(dto);
|
|
|
+ }
|
|
|
+ }, "syncUserInfo").start();
|
|
|
+
|
|
|
if (flag) {
|
|
|
return ResponseMessage.success("编辑成功");
|
|
|
} else {
|