bug修改

This commit is contained in:
guoshengxiong 2024-06-29 11:53:14 +08:00
parent 55992c0937
commit 4aad451bed
6 changed files with 48 additions and 38 deletions

View File

@ -102,6 +102,8 @@ public class SystemLogoConfig implements Serializable {
private java.lang.Integer isOpenCertificateExpireWarn; private java.lang.Integer isOpenCertificateExpireWarn;
@ApiModelProperty(value = "劳务人员资质证书提前多少天预警") @ApiModelProperty(value = "劳务人员资质证书提前多少天预警")
private java.lang.Integer certificateExpireWarnAheadDay; private java.lang.Integer certificateExpireWarnAheadDay;
@ApiModelProperty(value = "是否显示资料中心0不显示1显示")
private java.lang.Integer showFileCenter;
@TableField(exist = false) @TableField(exist = false)
private java.lang.String fileStorageType; private java.lang.String fileStorageType;
} }

View File

@ -312,7 +312,6 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
} else { } else {
result.put("workerId", ""); result.put("workerId", "");
} }
result.put("sn", systemUser.getSn());
result.put("styleType", null); result.put("styleType", null);
result.put("accountType", systemUser.getAccountType()); result.put("accountType", systemUser.getAccountType());
result.put("headquartersSn", null); result.put("headquartersSn", null);
@ -332,18 +331,17 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
result.put("menuAuthority", menuAuthority); result.put("menuAuthority", menuAuthority);
result.put("scope", scope); result.put("scope", scope);
result.put("expire", false); result.put("expire", false);
result.put("systemLogoConfig", new SystemLogoConfig());
result.put("personMail", systemUser.getPersonMail()); result.put("personMail", systemUser.getPersonMail());
result.put("avatar", systemUser.getAvatar()); result.put("avatar", systemUser.getAvatar());
if (Objects.equals(systemUser.getAccountType(), 10) || Objects.equals(systemUser.getAccountType(), 11)) { XzSystemUserToCompanyProject toCompanyProject = xzSystemUserToCompanyProjectMapper.selectOne(new LambdaQueryWrapper<XzSystemUserToCompanyProject>()
XzSystemUserToCompanyProject xzSystemUserToCompanyProject = xzSystemUserToCompanyProjectMapper.selectOne(new LambdaQueryWrapper<XzSystemUserToCompanyProject>()
.eq(XzSystemUserToCompanyProject::getType, 2) .eq(XzSystemUserToCompanyProject::getType, 2)
.eq(XzSystemUserToCompanyProject::getUserId, systemUser.getUserId()) .eq(XzSystemUserToCompanyProject::getUserId, systemUser.getUserId())
.last("order by id limit 1") .last("order by id limit 1")
); );
if (xzSystemUserToCompanyProject != null) { if (toCompanyProject != null) {
result.put("sn", xzSystemUserToCompanyProject.getSn()); result.put("sn", toCompanyProject.getSn());
} SystemLogoConfig config = getSystemLogoConfig(toCompanyProject.getHeadquartersSn());
result.put("systemLogoConfig", config);
} }
return result; return result;
} else { } else {
@ -400,10 +398,7 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
if (companyConfig.getEffectiveTime() == null) { if (companyConfig.getEffectiveTime() == null) {
companyConfig.setEffectiveTime(60 * 60 * 24 * 30 * 12); companyConfig.setEffectiveTime(60 * 60 * 24 * 30 * 12);
} }
SystemLogoConfig slc = systemLogoConfigMapper.selectOne(new LambdaQueryWrapper<SystemLogoConfig>().eq(SystemLogoConfig::getHeadquartersSn, companyConfig.getHeadquartersSn())); SystemLogoConfig slc = this.getSystemLogoConfig(companyConfig.getHeadquartersSn());
if (slc == null) {
slc = systemLogoConfigMapper.selectOne(new LambdaQueryWrapper<SystemLogoConfig>().eq(SystemLogoConfig::getHeadquartersSn, "-1"));
}
String token = jwtTokenProvider.createToken(MapUtils.getString(map, "account"), companyConfig.getEffectiveTime(), slc != null ? slc.getLoginTimeOut() : null); String token = jwtTokenProvider.createToken(MapUtils.getString(map, "account"), companyConfig.getEffectiveTime(), slc != null ? slc.getLoginTimeOut() : null);
UserEnterprise userEnterprise = userEnterpriseService.selectUserEnterpriseByUserId(systemUser.getUserId()); UserEnterprise userEnterprise = userEnterpriseService.selectUserEnterpriseByUserId(systemUser.getUserId());
if (userEnterprise != null) { if (userEnterprise != null) {
@ -457,20 +452,24 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
result.put("systemLogoConfig", slc); result.put("systemLogoConfig", slc);
result.put("personMail", systemUser.getPersonMail()); result.put("personMail", systemUser.getPersonMail());
result.put("avatar", systemUser.getAvatar()); result.put("avatar", systemUser.getAvatar());
if (Objects.equals(systemUser.getAccountType(), 10)) {
XzSystemUserToCompanyProject xzSystemUserToCompanyProject = xzSystemUserToCompanyProjectMapper.selectOne(new LambdaQueryWrapper<XzSystemUserToCompanyProject>()
.eq(XzSystemUserToCompanyProject::getType, 2)
.eq(XzSystemUserToCompanyProject::getUserId, systemUser.getUserId())
.last("order by id limit 1")
);
if (xzSystemUserToCompanyProject != null) {
result.put("sn", xzSystemUserToCompanyProject.getSn());
}
}
return result; return result;
} }
} }
/**
* 查询系统logo配置
*
* @param headquartersSn
* @return
*/
private SystemLogoConfig getSystemLogoConfig(String headquartersSn) {
SystemLogoConfig slc = systemLogoConfigMapper.selectOne(new LambdaQueryWrapper<SystemLogoConfig>().eq(SystemLogoConfig::getHeadquartersSn, headquartersSn));
if (slc == null) {
slc = systemLogoConfigMapper.selectOne(new LambdaQueryWrapper<SystemLogoConfig>().eq(SystemLogoConfig::getHeadquartersSn, "-1"));
}
return slc;
}
@Override @Override
public void register(Map<String, Object> map) { public void register(Map<String, Object> map) {
if (StringUtils.isNotEmpty(MapUtils.getString(map, "verificationCode"))) { if (StringUtils.isNotEmpty(MapUtils.getString(map, "verificationCode"))) {

View File

@ -1,6 +1,7 @@
package com.zhgd.xmgl.modules.edu.controller; package com.zhgd.xmgl.modules.edu.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.zhgd.annotation.OperLog;
import com.zhgd.jeecg.common.api.vo.Result; import com.zhgd.jeecg.common.api.vo.Result;
import com.zhgd.xmgl.modules.edu.entity.EducationClassify; import com.zhgd.xmgl.modules.edu.entity.EducationClassify;
import com.zhgd.xmgl.modules.edu.service.IEducationClassifyService; import com.zhgd.xmgl.modules.edu.service.IEducationClassifyService;
@ -36,6 +37,7 @@ public class EducationClassifyController {
* 分页列表查询 * 分页列表查询
* @return * @return
*/ */
@OperLog(operModul = "课程类型管理", operType = "查询", operDesc = "列表查询安全教育-分类信息")
@ApiOperation(value = "列表查询安全教育-分类信息", notes = "列表查询安全教育-分类信息", httpMethod = "POST") @ApiOperation(value = "列表查询安全教育-分类信息", notes = "列表查询安全教育-分类信息", httpMethod = "POST")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "sn", value = "项目SN或企业SN", paramType = "body", required = true, dataType = "String"), @ApiImplicitParam(name = "sn", value = "项目SN或企业SN", paramType = "body", required = true, dataType = "String"),
@ -56,6 +58,7 @@ public class EducationClassifyController {
* @param educationClassify * @param educationClassify
* @return * @return
*/ */
@OperLog(operModul = "课程类型管理", operType = "添加", operDesc = "添加安全教育-分类信息")
@ApiOperation(value = "添加安全教育-分类信息", notes = "添加安全教育-分类信息", httpMethod = "POST") @ApiOperation(value = "添加安全教育-分类信息", notes = "添加安全教育-分类信息", httpMethod = "POST")
@PostMapping(value = "/add") @PostMapping(value = "/add")
public Result<EducationClassify> add(@RequestBody EducationClassify educationClassify) { public Result<EducationClassify> add(@RequestBody EducationClassify educationClassify) {
@ -68,6 +71,7 @@ public class EducationClassifyController {
* @param educationClassify * @param educationClassify
* @return * @return
*/ */
@OperLog(operModul = "课程类型管理", operType = "编辑", operDesc = "编辑安全教育-分类信息")
@ApiOperation(value = "编辑安全教育-分类信息", notes = "编辑安全教育-分类信息", httpMethod = "POST") @ApiOperation(value = "编辑安全教育-分类信息", notes = "编辑安全教育-分类信息", httpMethod = "POST")
@PostMapping(value = "/edit") @PostMapping(value = "/edit")
public Result<EducationClassify> edit(@RequestBody EducationClassify educationClassify) { public Result<EducationClassify> edit(@RequestBody EducationClassify educationClassify) {
@ -80,6 +84,7 @@ public class EducationClassifyController {
* @param * @param
* @return * @return
*/ */
@OperLog(operModul = "课程类型管理", operType = "删除", operDesc = "删除安全教育-分类信息")
@ApiOperation(value = "删除安全教育-分类信息", notes = "删除安全教育-分类信息", httpMethod = "POST") @ApiOperation(value = "删除安全教育-分类信息", notes = "删除安全教育-分类信息", httpMethod = "POST")
@ApiImplicitParam(name = "id", value = "安全教育-分类ID", paramType = "body", required = true, dataType = "Integer") @ApiImplicitParam(name = "id", value = "安全教育-分类ID", paramType = "body", required = true, dataType = "Integer")
@PostMapping(value = "/delete") @PostMapping(value = "/delete")

View File

@ -40,6 +40,7 @@ public class QualityRegionController {
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "projectSn", value = "项目唯一标识", paramType = "body", required = true, dataType = "String"), @ApiImplicitParam(name = "projectSn", value = "项目唯一标识", paramType = "body", required = true, dataType = "String"),
@ApiImplicitParam(name = "notSupervisingUnit", value = "1不是监理单位", paramType = "body", required = false, dataType = "Integer"), @ApiImplicitParam(name = "notSupervisingUnit", value = "1不是监理单位", paramType = "body", required = false, dataType = "Integer"),
@ApiImplicitParam(name = "enterpriseId", value = "企业id", paramType = "body", required = false, dataType = "Integer"),
}) })
@PostMapping(value = "/list") @PostMapping(value = "/list")
public Result<List<QualityRegion>> selectQualityRegionList(@RequestBody Map<String, Object> map) { public Result<List<QualityRegion>> selectQualityRegionList(@RequestBody Map<String, Object> map) {

View File

@ -43,6 +43,9 @@
<if test="notSupervisingUnit == '1'.toString()"> <if test="notSupervisingUnit == '1'.toString()">
and et.id != 7 and et.id != 7
</if> </if>
<if test="enterpriseId != null and enterpriseId != ''">
and ei.id = #{enterpriseId}
</if>
order by qr.region_code order by qr.region_code
</select> </select>
<select id="selectChildQualityRegionList" resultType="com.zhgd.xmgl.modules.quality.entity.QualityRegion"> <select id="selectChildQualityRegionList" resultType="com.zhgd.xmgl.modules.quality.entity.QualityRegion">

View File

@ -67,7 +67,7 @@ public class WorkerSafeEducationController {
* @param workerSafeEducation * @param workerSafeEducation
* @return * @return
*/ */
@OperLog(operModul = "劳务管理", operType = "添加安全教育", operDesc = "添加安全教育记录信息") @OperLog(operModul = "安全教育管理", operType = "添加安全教育", operDesc = "添加安全教育记录信息")
@ApiOperation(value = "添加安全教育记录信息", notes = "添加安全教育记录信息", httpMethod = "POST") @ApiOperation(value = "添加安全教育记录信息", notes = "添加安全教育记录信息", httpMethod = "POST")
@PostMapping(value = "/add") @PostMapping(value = "/add")
public Result add(@RequestBody WorkerSafeEducation workerSafeEducation) { public Result add(@RequestBody WorkerSafeEducation workerSafeEducation) {
@ -81,7 +81,7 @@ public class WorkerSafeEducationController {
* @param workerSafeEducation * @param workerSafeEducation
* @return * @return
*/ */
@OperLog(operModul = "劳务管理", operType = "编辑安全教育", operDesc = "编辑安全教育记录信息") @OperLog(operModul = "安全教育管理", operType = "编辑安全教育", operDesc = "编辑安全教育记录信息")
@ApiOperation(value = "编辑安全教育信息", notes = "编辑安全教育信息", httpMethod = "POST") @ApiOperation(value = "编辑安全教育信息", notes = "编辑安全教育信息", httpMethod = "POST")
@PostMapping(value = "/edit") @PostMapping(value = "/edit")
public Result<WorkerSafeEducation> edit(@RequestBody WorkerSafeEducation workerSafeEducation) { public Result<WorkerSafeEducation> edit(@RequestBody WorkerSafeEducation workerSafeEducation) {
@ -95,7 +95,7 @@ public class WorkerSafeEducationController {
* @param workerSafeEducation * @param workerSafeEducation
* @return * @return
*/ */
@OperLog(operModul = "劳务管理", operType = "编辑安全教育", operDesc = "编辑安全教育记录信息") @OperLog(operModul = "安全教育管理", operType = "编辑安全教育", operDesc = "编辑安全教育记录信息")
@ApiOperation(value = "修改安全教育记录表数据", notes = "修改安全教育记录表数据", httpMethod = "POST") @ApiOperation(value = "修改安全教育记录表数据", notes = "修改安全教育记录表数据", httpMethod = "POST")
@PostMapping(value = "/updateSafeEducation") @PostMapping(value = "/updateSafeEducation")
public Result<WorkerSafeEducation> updateSafeEducation(@RequestBody WorkerSafeEducation workerSafeEducation) { public Result<WorkerSafeEducation> updateSafeEducation(@RequestBody WorkerSafeEducation workerSafeEducation) {
@ -109,7 +109,7 @@ public class WorkerSafeEducationController {
* @param * @param
* @return * @return
*/ */
@OperLog(operModul = "劳务管理", operType = "删除项目课程", operDesc = "删除项目课程") @OperLog(operModul = "安全教育管理", operType = "删除项目课程", operDesc = "删除项目课程")
@ApiOperation(value = "删除安全教育记录信息", notes = "删除安全教育记录信息", httpMethod = "POST") @ApiOperation(value = "删除安全教育记录信息", notes = "删除安全教育记录信息", httpMethod = "POST")
@ApiImplicitParam(name = "id", value = "安全教育记录ID", paramType = "body", required = true, dataType = "Integer") @ApiImplicitParam(name = "id", value = "安全教育记录ID", paramType = "body", required = true, dataType = "Integer")
@PostMapping(value = "/delete") @PostMapping(value = "/delete")