Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
zfhai 2023-12-09 11:38:44 +08:00
commit 3cc9c84d5e
8 changed files with 68 additions and 37 deletions

View File

@ -228,5 +228,8 @@ public class BmCompanyInfo implements Serializable {
@ApiModelProperty(value = "法人身份证国徽面", required = true)
private String legalNationUrl;
//用户名
private String userName;
}

View File

@ -89,7 +89,12 @@ public class BmCompanyInfoServiceImpl implements BmCompanyInfoService {
@Override
public List<BmCompanyInfo> selectList(BmCompanyDto bmCompanyDto) {
return bmCompanyInfoMapper.selectList(bmCompanyDto);
List<BmCompanyInfo> bmCompanyInfos = bmCompanyInfoMapper.selectList(bmCompanyDto);
for (BmCompanyInfo bmCompanyInfo : bmCompanyInfos) {
SysUser data = remoteUserService.selectUserById(bmCompanyInfo.getAuditor().longValue()).getData();
bmCompanyInfo.setUserName(data.getUserName());
}
return bmCompanyInfos;
}
/**

View File

@ -84,4 +84,5 @@ public interface DevInfoMapper
int insertLon(InforMationDto inforMationDto);
public List<SysDic> getSysDic();
public SysDic getSysDicById(Integer id);
}

View File

@ -17,6 +17,8 @@ import com.bonus.zlpt.equip.service.IDevInfoService;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import static com.bonus.zlpt.common.core.web.domain.AjaxResult.error;
/**
* 设备信息Service业务层处理
*
@ -47,28 +49,34 @@ public class DevInfoServiceImpl implements IDevInfoService
public DevInfoVo selectDevInfoByMaId(Long maId)
{
DevInfoVo devInfoVo = devInfoMapper.selectDevInfoByMaId(maId);
List<SysFile> files = devInfoMapper.getFilesByMaId(maId);
if (!CollectionUtils.isEmpty(files) && files.get(0) != null) {
List<String> picList = new ArrayList();
for (SysFile file : files) {
if (file.getDicId() == ASPECT_PICTURE) {
picList.add(file.getUrl());
try {
List<SysFile> files = devInfoMapper.getFilesByMaId(maId);
if (!CollectionUtils.isEmpty(files) && files.get(0) != null) {
List<String> picList = new ArrayList();
for (SysFile file : files) {
if (file.getDicId() == ASPECT_PICTURE) {
picList.add(file.getUrl());
}
if (file.getDicId() == EXAMINATION_PDF) {
devInfoVo.setExaminationPdf(file.getUrl());
}
if (file.getDicId() == INSURANCE_PDF) {
devInfoVo.setInsurancePdf(file.getUrl());
}
}
if (file.getDicId() == EXAMINATION_PDF) {
devInfoVo.setExaminationPdf(file.getUrl());
}
if (file.getDicId() == INSURANCE_PDF) {
devInfoVo.setInsurancePdf(file.getUrl());
String[] pictureArray = null;
if (!CollectionUtils.isEmpty(picList)) {
pictureArray = picList.toArray(new String[picList.size()]);
}
devInfoVo.setPictures(pictureArray);
}
String[] pictureArray = null;
if (!CollectionUtils.isEmpty(picList)) {
pictureArray = picList.toArray(new String[picList.size()]);
}
devInfoVo.setPictures(pictureArray);
Long companyUpNum = devInfoMapper.getCompanyUpNum(devInfoVo.getOwnCo());
devInfoVo.setCompanyUpNum(companyUpNum);
SysDic sysDic = devInfoMapper.getSysDicById(Integer.parseInt(devInfoVo.getMaStatus()));
devInfoVo.setMaStatusStr(sysDic.getName());
} catch (Exception e) {
error("fail to get devInfo for files or companyUpNum or maStatusStr" + maId);
}
Long companyUpNum = devInfoMapper.getCompanyUpNum(devInfoVo.getOwnCo());
devInfoVo.setCompanyUpNum(companyUpNum);
return devInfoVo;
}

View File

@ -348,4 +348,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
id,p_id,code,`name`,description,`value`,sort,`level`,status,create_time,creator
from sys_dic
</select>
<select id="getSysDicById" resultType="com.bonus.zlpt.system.api.domain.SysDic">
select
id,p_id,code,`name`,description,`value`,sort,`level`,status,create_time,creator
from sys_dic
where id = #{id}
</select>
</mapper>

View File

@ -11,8 +11,10 @@ import lombok.Data;
import lombok.ToString;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import java.util.List;
import java.util.Map;
/**
@ -26,24 +28,29 @@ import java.util.Map;
@Data
@Component
@Slf4j
@ConfigurationProperties("tencent.sms")
public class SmsComponent {
@Value("${tencent.sms.smsSdkAppId}") // 注入参数值
// @Value("tencent.sms.sdkAppId")
private String sdkAppId;
@Value("${tencent.sms.secretId}")
// @Value("tencent.sms.secretId")
private String secretId;
@Value("${tencent.sms.keysecret}")
// @Value("tencent.sms.secretKey")
private String secretKey;
@Value("${tencent.sms.signName}")
// @Value("tencent.sms.signName")
private String signName;
@Value("${tencent.sms.templateId}")
// @Value("tencent.sms.templateCodeId")
private String templateCodeId;
// @Value("tencent.sms.templateCodeIds")
private Map<Integer,String> templateCodeIds;
@Value("${tencent.sms.timeout}")
// @Value("tencent.sms.timeout")
private Integer timeout;
/**

View File

@ -11,11 +11,11 @@ tencent:
# 短信应用ID
smsSdkAppId: 1400874270
# 短信签名内容
signName: 作业智慧管控系统小程序
signName: 南网机具租赁共享平台
# 正文模板ID
templateCodeIds:
1: 2014173
2: 2014506
1: 2014506
2: 2014173
# 超时时间
timeout: 1000
@ -35,19 +35,19 @@ spring:
name: zlpt-system
profiles:
# 环境配置
active: zlpt_cloud_dev
active: zlpt_cloud_de
cloud:
nacos:
username: nacos
password: Bonus@admin123!
# username: nacos
# password: Bonus@admin123!
discovery:
# 服务注册地址
server-addr: 192.168.1.3:8848
namespace: zlpt_cloud_dev
server-addr: 10.40.92.74:8848
namespace: zlpt_cloud_de
config:
# 配置中心地址
server-addr: 192.168.1.3:8848
namespace: zlpt_cloud_dev
server-addr: 10.40.92.74:8848
namespace: zlpt_cloud_de
# 配置文件格式
file-extension: yml
# 共享配置