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;
@ApiModelProperty(value = "劳务人员资质证书提前多少天预警")
private java.lang.Integer certificateExpireWarnAheadDay;
@ApiModelProperty(value = "是否显示资料中心0不显示1显示")
private java.lang.Integer showFileCenter;
@TableField(exist = false)
private java.lang.String fileStorageType;
}

View File

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

View File

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

View File

@ -40,6 +40,7 @@ public class QualityRegionController {
@ApiImplicitParams({
@ApiImplicitParam(name = "projectSn", value = "项目唯一标识", paramType = "body", required = true, dataType = "String"),
@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")
public Result<List<QualityRegion>> selectQualityRegionList(@RequestBody Map<String, Object> map) {

View File

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

View File

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