修改内置运行容器

This commit is contained in:
haozq 2025-11-21 09:52:57 +08:00
parent 6180b8684f
commit d1cbf21290
11 changed files with 216 additions and 81 deletions

View File

@ -26,6 +26,11 @@
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://maven.aliyun.com/repository/public" />
</remote-repository>
<remote-repository>
<option name="id" value="com.e-iceblue" />
<option name="name" value="e-iceblue" />

View File

@ -4,45 +4,18 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="9b65afef-7cf3-4db2-b51f-501883d55b79" name="Changes" comment="修改服务注册地址">
<change afterPath="$PROJECT_DIR$/auth/lib/spring-boot-starter-inforsuite-10.0.2.5.jar" afterDir="false" />
<change afterPath="$PROJECT_DIR$/gateway/lib/spring-boot-starter-inforsuite-10.0.2.5.jar" afterDir="false" />
<change afterPath="$PROJECT_DIR$/modules/bmw/lib/spring-boot-starter-inforsuite-10.0.2.5.jar" afterDir="false" />
<change afterPath="$PROJECT_DIR$/modules/file/lib/spring-boot-starter-inforsuite-10.0.2.5.jar" afterDir="false" />
<change afterPath="$PROJECT_DIR$/modules/system/lib/spring-boot-starter-inforsuite-10.0.2.5.jar" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/compiler.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/compiler.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/inspectionProfiles/Project_Default.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/inspectionProfiles/Project_Default.xml" afterDir="false" />
<list default="true" id="9b65afef-7cf3-4db2-b51f-501883d55b79" name="Changes" comment="修改内置运行容器">
<change afterPath="$PROJECT_DIR$/.idea/modules.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/jarRepositories.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/jarRepositories.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/vcs.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/api/api-system/api-system.iml" beforeDir="false" afterPath="$PROJECT_DIR$/api/api-system/api-system.iml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/api/api.iml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/auth/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/auth/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/auth/src/main/resources/bootstrap.yml" beforeDir="false" afterPath="$PROJECT_DIR$/auth/src/main/resources/bootstrap.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/common/common-core/src/main/java/com/bonus/common/core/constant/TokenConstants.java" beforeDir="false" afterPath="$PROJECT_DIR$/common/common-core/src/main/java/com/bonus/common/core/constant/TokenConstants.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/common/common-security/src/main/java/com/bonus/common/security/interceptor/HeaderInterceptor.java" beforeDir="false" afterPath="$PROJECT_DIR$/common/common-security/src/main/java/com/bonus/common/security/interceptor/HeaderInterceptor.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/common/common-security/src/main/java/com/bonus/common/security/utils/SecurityUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/common/common-security/src/main/java/com/bonus/common/security/utils/SecurityUtils.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/common/common-swagger/common-swagger.iml" beforeDir="false" afterPath="$PROJECT_DIR$/common/common-swagger/common-swagger.iml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/common/common.iml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/gateway/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/gateway/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/gateway/src/main/java/com/bonus/gateway/config/AuthWriteUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/gateway/src/main/java/com/bonus/gateway/config/AuthWriteUtils.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/gateway/src/main/java/com/bonus/gateway/config/CorsConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/gateway/src/main/java/com/bonus/gateway/config/CorsConfig.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/gateway/src/main/java/com/bonus/gateway/filter/AuthFilter.java" beforeDir="false" afterPath="$PROJECT_DIR$/gateway/src/main/java/com/bonus/gateway/filter/AuthFilter.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/gateway/src/main/resources/bootstrap.yml" beforeDir="false" afterPath="$PROJECT_DIR$/gateway/src/main/resources/bootstrap.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/modules/bmw/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/modules/bmw/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/common/common-security/src/main/java/com/bonus/common/security/service/TokenService.java" beforeDir="false" afterPath="$PROJECT_DIR$/common/common-security/src/main/java/com/bonus/common/security/service/TokenService.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/modules/bmw/src/main/java/com/bonus/bmw/subeva/dao/SubCorepersonDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/modules/bmw/src/main/java/com/bonus/bmw/subeva/dao/SubCorepersonDao.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/modules/bmw/src/main/java/com/bonus/bmw/subeva/service/SubCorepersonServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/modules/bmw/src/main/java/com/bonus/bmw/subeva/service/SubCorepersonServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/modules/bmw/src/main/java/com/bonus/bmw/team/controller/TeamBasicController.java" beforeDir="false" afterPath="$PROJECT_DIR$/modules/bmw/src/main/java/com/bonus/bmw/team/controller/TeamBasicController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/modules/bmw/src/main/resources/bootstrap.yml" beforeDir="false" afterPath="$PROJECT_DIR$/modules/bmw/src/main/resources/bootstrap.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/modules/bmw/src/main/resources/static/downloads/2022年购置SA-ZQY-2X50型牵张一体机说明书一本(显示器已更新).pdf" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/modules/bmw/src/main/resources/static/downloads/2022年购置集控式张牵设备出厂检测报告和合格证.pdf" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/modules/bmw/src/main/resources/static/js/publicJs.js" beforeDir="false" afterPath="$PROJECT_DIR$/modules/bmw/src/main/resources/static/js/publicJs.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/modules/bmw/src/main/resources/static/login.html" beforeDir="false" afterPath="$PROJECT_DIR$/modules/bmw/src/main/resources/static/login.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/modules/bmw/src/main/resources/static/pages/user/updateHeadImg.html" beforeDir="false" afterPath="$PROJECT_DIR$/modules/bmw/src/main/resources/static/pages/user/updateHeadImg.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/modules/file/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/modules/file/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/modules/file/src/main/java/com/bonus/file/FileApplication.java" beforeDir="false" afterPath="$PROJECT_DIR$/modules/file/src/main/java/com/bonus/file/FileApplication.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/modules/file/src/main/resources/bootstrap.yml" beforeDir="false" afterPath="$PROJECT_DIR$/modules/file/src/main/resources/bootstrap.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/modules/mw/src/main/resources/bootstrap.yml" beforeDir="false" afterPath="$PROJECT_DIR$/modules/mw/src/main/resources/bootstrap.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/modules/system/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/modules/system/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/modules/system/src/main/resources/bootstrap.yml" beforeDir="false" afterPath="$PROJECT_DIR$/modules/system/src/main/resources/bootstrap.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/modules/bmw/src/main/resources/mapper/SubContractor/SubContractorMapper.xml" beforeDir="false" afterPath="$PROJECT_DIR$/modules/bmw/src/main/resources/mapper/SubContractor/SubContractorMapper.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/modules/bmw/src/main/resources/mapper/certificateAdministration/certificateStatMapper.xml" beforeDir="false" afterPath="$PROJECT_DIR$/modules/bmw/src/main/resources/mapper/certificateAdministration/certificateStatMapper.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/modules/bmw/src/main/resources/mapper/subeva/SubTeamEvaMapper.xml" beforeDir="false" afterPath="$PROJECT_DIR$/modules/bmw/src/main/resources/mapper/subeva/SubTeamEvaMapper.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
@ -66,8 +39,8 @@
<component name="MavenImportPreferences">
<option name="generalSettings">
<MavenGeneralSettings>
<option name="localRepository" value="D:\maven\apache-maven-3.6.1\conf\repository" />
<option name="userSettingsFile" value="D:\maven\apache-maven-3.6.1\conf\settings.xml" />
<option name="localRepository" value="D:\maven\resp" />
<option name="userSettingsFile" value="D:\maven\apache-maven-3.9.9\conf\settings.xml" />
</MavenGeneralSettings>
</option>
<option name="importingSettings">
@ -75,9 +48,12 @@
<option name="jdkForImporter" value="1.8" />
</MavenImportingSettings>
</option>
<option name="explicitlyEnabledProfiles" value="dev-test(开发连测试环境-dameng_real_name)" />
<option name="explicitlyDisabledProfiles" value="dev-test(开发环境-real_name_test)" />
</component>
<component name="MavenRunner">
<option name="jreName" value="1.8" />
<option name="skipTests" value="true" />
</component>
<component name="ProjectColorInfo">{
&quot;associatedIndex&quot;: 3
@ -102,6 +78,7 @@
"Maven.YnRealNameWeb [clean].executor": "Run",
"Maven.YnRealNameWeb [compile].executor": "Run",
"Maven.YnRealNameWeb [install].executor": "Run",
"Maven.YnRealNameWeb [package].executor": "Run",
"RequestMappingsPanelOrder0": "0",
"RequestMappingsPanelOrder1": "1",
"RequestMappingsPanelWidth0": "75",
@ -109,6 +86,8 @@
"RunOnceActivity.OpenProjectViewOnStart": "true",
"RunOnceActivity.ShowReadmeOnStart": "true",
"RunOnceActivity.git.unshallow": "true",
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
"SONARLINT_PRECOMMIT_ANALYSIS": "true",
"Spring Boot.AuthApplication.executor": "Run",
"Spring Boot.BmwApplication.executor": "Run",
"Spring Boot.FileApplication.executor": "Run",
@ -117,7 +96,7 @@
"git-widget-placeholder": "main",
"ignore.virus.scanning.warn.message": "true",
"kotlin-language-version-configured": "true",
"last_opened_file_path": "F:/workspace/idea/dameng_real_name/modules/file/lib",
"last_opened_file_path": "F:/workspace/idea/dameng_real_name_22",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
@ -127,7 +106,7 @@
"project.structure.proportion": "0.0",
"project.structure.side.proportion": "0.44484413",
"run.configurations.included.in.services": "true",
"settings.editor.selected.configurable": "MavenSettings",
"settings.editor.selected.configurable": "reference.settings.project.maven.repository.indices",
"vue.rearranger.settings.migration": "true"
}
}]]></component>
@ -136,11 +115,11 @@
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="F:\workspace\idea\dameng_real_name\modules\file\lib" />
<recent name="F:\workspace\idea\dameng_real_name\modules\bmw\lib" />
<recent name="F:\workspace\idea\dameng_real_name\modules\system\lib" />
<recent name="F:\workspace\idea\dameng_real_name\gateway" />
<recent name="F:\workspace\idea\dameng_real_name\auth\lib" />
<recent name="F:\workspace\idea\dameng_real_name\modules\bmw\src\main\resources" />
<recent name="F:\workspace\idea\dameng_real_name\auth\src\main\resources" />
<recent name="F:\workspace\idea\dameng_real_name\modules\file\src\main\resources" />
<recent name="F:\workspace\idea\dameng_real_name\modules\system\src\main\resources" />
<recent name="F:\workspace\idea\dameng_real_name\gateway\src\main\resources" />
</key>
<key name="CopyClassDialog.RECENTS_KEY">
<recent name="com.bonus.gateway.config" />
@ -166,7 +145,27 @@
</set>
</option>
</component>
<component name="RunManager" selected="Spring Boot.FileApplication">
<component name="RunManager" selected="Spring Boot.BmwApplication">
<configuration name="AuthApplication" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="com.bonus.auth.AuthApplication" />
<module name="real-name-auth" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="com.bonus.auth.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="AppApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
<module name="real-name-app" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.bonus.app.AppApplication" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="AuthApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
<module name="real-name-auth" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.bonus.auth.AuthApplication" />
@ -202,6 +201,13 @@
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="MwApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
<module name="real-name-mw" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.bonus.mw.MwApplication" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="SystemApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
<module name="real-name-system" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.bonus.system.SystemApplication" />
@ -209,9 +215,20 @@
<option name="Make" enabled="true" />
</method>
</configuration>
<list>
<item itemvalue="Application.AuthApplication" />
<item itemvalue="Spring Boot.BmwApplication" />
<item itemvalue="Spring Boot.AppApplication" />
<item itemvalue="Spring Boot.AuthApplication" />
<item itemvalue="Spring Boot.GatewayApplication" />
<item itemvalue="Spring Boot.MwApplication" />
<item itemvalue="Spring Boot.SystemApplication" />
<item itemvalue="Spring Boot.FileApplication" />
</list>
<recent_temporary>
<list>
<item itemvalue="Spring Boot.FileApplication" />
<item itemvalue="Application.AuthApplication" />
</list>
</recent_temporary>
</component>
@ -256,7 +273,26 @@
<workItem from="1756265266244" duration="17000" />
<workItem from="1756343720546" duration="320000" />
<workItem from="1761118792695" duration="4944000" />
<workItem from="1761123806390" duration="1241000" />
<workItem from="1761123806390" duration="2344000" />
<workItem from="1761126352756" duration="599000" />
<workItem from="1761182803307" duration="2308000" />
<workItem from="1761198356455" duration="357000" />
<workItem from="1761204427147" duration="1498000" />
<workItem from="1761206194020" duration="6000" />
<workItem from="1761274125127" duration="390000" />
<workItem from="1761274987921" duration="5801000" />
<workItem from="1761283042556" duration="3592000" />
<workItem from="1761286682757" duration="725000" />
<workItem from="1761287448331" duration="626000" />
<workItem from="1761289119773" duration="62000" />
<workItem from="1761289480823" duration="423000" />
<workItem from="1761290247183" duration="613000" />
<workItem from="1761290869789" duration="6566000" />
<workItem from="1761787689426" duration="3052000" />
<workItem from="1761808035788" duration="971000" />
<workItem from="1762768552691" duration="2181000" />
<workItem from="1763624994274" duration="674000" />
<workItem from="1763689483339" duration="390000" />
</task>
<task id="LOCAL-00001" summary="删除多余的服务">
<option name="closed" value="true" />
@ -290,7 +326,23 @@
<option name="project" value="LOCAL" />
<updated>1755851732156</updated>
</task>
<option name="localTasksCounter" value="5" />
<task id="LOCAL-00005" summary="修改内置tomcat">
<option name="closed" value="true" />
<created>1761125097617</created>
<option name="number" value="00005" />
<option name="presentableId" value="LOCAL-00005" />
<option name="project" value="LOCAL" />
<updated>1761125097617</updated>
</task>
<task id="LOCAL-00006" summary="修改内置运行容器">
<option name="closed" value="true" />
<created>1761287828807</created>
<option name="number" value="00006" />
<option name="presentableId" value="LOCAL-00006" />
<option name="project" value="LOCAL" />
<updated>1761287828807</updated>
</task>
<option name="localTasksCounter" value="7" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
@ -377,7 +429,9 @@
<MESSAGE value="删除多余的服务" />
<MESSAGE value="修改代理服务" />
<MESSAGE value="修改服务注册地址" />
<option name="LAST_COMMIT_MESSAGE" value="修改服务注册地址" />
<MESSAGE value="修改内置tomcat" />
<MESSAGE value="修改内置运行容器" />
<option name="LAST_COMMIT_MESSAGE" value="修改内置运行容器" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
@ -396,6 +450,11 @@
<line>46</line>
<option name="timeStamp" value="3" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/common/common-datascope/src/main/java/com/bonus/common/datascope/aspect/DataScopeAspect.java</url>
<line>66</line>
<option name="timeStamp" value="7" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
</component>

View File

@ -55,13 +55,13 @@ public class TokenService
loginUser.setUsername(userName);
loginUser.setIpaddr(IpUtils.getIpAddr(ServletUtils.getRequest()));
refreshToken(loginUser);
String userKey = getTokenKey(loginUser.getToken());
// Jwt存储信息
Map<String, Object> claimsMap = new HashMap<String, Object>();
claimsMap.put(SecurityConstants.USER_KEY, token);
claimsMap.put(SecurityConstants.DETAILS_USER_ID, userId);
claimsMap.put(SecurityConstants.DETAILS_USERNAME, userName);
redisService.setCacheObject(getTokenKey(userKey),loginUser);
// 接口返回信息
Map<String, Object> rspMap = new HashMap<String, Object>();
rspMap.put("access_token", JwtUtils.createToken(claimsMap));
@ -105,6 +105,8 @@ public class TokenService
if (StringUtils.isNotEmpty(token))
{
String userkey = JwtUtils.getUserKey(token);
String key=getTokenKey(userkey);
System.err.println(key);
user = redisService.getCacheObject(getTokenKey(userkey));
return user;
}
@ -164,6 +166,7 @@ public class TokenService
loginUser.setExpireTime(loginUser.getLoginTime() + expireTime * MILLIS_MINUTE);
// 根据uuid将loginUser缓存
String userKey = getTokenKey(loginUser.getToken());
System.err.println(userKey);
redisService.setCacheObject(userKey, loginUser, expireTime, TimeUnit.MINUTES);
}

View File

@ -22,7 +22,7 @@ public interface SubCorepersonDao {
List<SubEvaBean> rankList(@Param("params") Map<String, Object> params, @Param("offset") Integer offset, @Param("limit") Integer limit);
// 分页
int rankCount(@Param("params") Map<String, Object> params);
Integer rankCount(@Param("params") Map<String, Object> params);
List<SubEvaBean> getPersonNameList(SubEvaBean o);

View File

@ -58,7 +58,11 @@ public class SubCorepersonServiceImpl implements SubCorepersonService{
@Override
public int rankCount(Map<String, Object> params) {
return dao.rankCount(params);
Integer num= dao.rankCount(params);
if(null == num){
return 0;
}
return num;
}
@Override

View File

@ -44,7 +44,7 @@ public class TeamBasicController {
@GetMapping
@Log(title = "班组基础管理-班组基础列表", businessType = BusinessType.SELECT)
@RequiresPermissions("sys:teamBasic:query")
// @RequiresPermissions("sys:teamBasic:query")
public PageTableResponse listSubCompany(PageTableRequest request) {
String roleLevel = SecurityUtils.getLoginUser().getSysUser().getRoleLevel();
String subId = SecurityUtils.getLoginUser().getSysUser().getSubId();

View File

@ -37,6 +37,7 @@ spring:
config:
# 配置中心地址
server-addr: @nacos.server@
namespace: @name.space@
# 配置文件格式
file-extension: yml
# 共享配置

View File

@ -242,7 +242,10 @@
LEFT JOIN "ynrealname"."bm_team_user_relation" btur ON btur."team_id" = bst2."id" and btur."is_active" = '1'
LEFT JOIN "ynrealname"."bm_worker" bw ON bw."id_number" = btur."id_number" and bw."is_active" = '1'
where bst2."is_active" = '1'
GROUP BY bst2."id" having teamStatus > 0) aa ON aa."id" = bst2."id"
GROUP BY bst2."id"
HAVING
CASE WHEN SUM(bw."ein_status") > 0 THEN 1 ELSE 0 END > 0
) aa ON aa."id" = bst2."id"
WHERE
bs."is_active" = '1'
<if test="params.orgId != null and params.orgId != ''">

View File

@ -11,30 +11,42 @@
"name",
sum( "title" ) AS total,
CONCAT( "name", '', sum( "title" ), '' ) AS title
FROM
(
FROM (
SELECT
bct."id" AS "id",
bct."work_type" AS "NAME",
COUNT( DISTINCT bweh."id_number" ) AS "title"
FROM
"ynrealname"."bm_certificate_type" bct
FROM
"ynrealname"."bm_certificate_type" bct
LEFT JOIN (
SELECT a."id_number", a."certificate_id",a."issuing_authority",a."first_date",
a."review_date", a."valid_start_date",a."valid_end_date",a."reality_review_date",a."certificate_photo" FROM (
SELECT * FROM "ynrealname"."bm_certificate_read" ORDER BY "valid_end_date" DESC FETCH FIRST 999999999 ROWS ONLY
) a GROUP BY a."id_number", a."certificate_id",a."issuing_authority",a."first_date",
SELECT
a."id_number", a."certificate_id",a."issuing_authority",a."first_date",
a."review_date", a."valid_start_date",a."valid_end_date",a."reality_review_date",a."certificate_photo"
FROM (
SELECT * FROM "ynrealname"."bm_certificate_read"
ORDER BY "valid_end_date" DESC
FETCH FIRST 999999999 ROWS ONLY
) a
GROUP BY
a."id_number", a."certificate_id",a."issuing_authority",a."first_date",
a."review_date", a."valid_start_date",a."valid_end_date",a."reality_review_date",a."certificate_photo"
) bcr ON bcr."certificate_id" = bct."id"
LEFT JOIN "ynrealname"."bm_worker_ein_history" bweh ON bweh."id_number" = bcr."id_number" AND bweh."is_active" = '1' AND bweh."exit_status" !=1
WHERE bct."is_hidden" = '0' AND bct."is_active" = '1'
<if test="name != '' and name != null">
AND (bct."work_type" like concat('%',#{name},'%') OR bct."neaten_work_operation" like concat('%',#{name},'%'))
</if>
GROUP BY bct."work_type",
LEFT JOIN "ynrealname"."bm_worker_ein_history" bweh
ON bweh."id_number" = bcr."id_number"
AND bweh."is_active" = '1'
AND bweh."exit_status" != 1
WHERE
bct."is_hidden" = '0'
AND bct."is_active" = '1'
<if test="name != '' and name != null">
AND (bct."work_type" like concat('%',#{name},'%') OR bct."neaten_work_operation" like concat('%',#{name},'%'))
</if>
GROUP BY
bct."id", -- 补充id到GROUP BY
bct."work_type",
bct."neaten_work_operation"
) a
GROUP BY "id", "name"
GROUP BY "id", "name" -- 外层分组基于内层的唯一id和name无需额外添加
</select>
<select id="getTreeLeve21Data1"
resultType="com.bonus.bmw.certificateAdministration.entity.CertificateStatBean">

View File

@ -4,16 +4,37 @@
<insert id="putTeamEvaList">
MERGE INTO "ynrealname"."bm_sub_team_eva" tgt
-- 源表:先通过内层子查询去重,确保 team_id + user_id 唯一(达梦必选)
USING (
<foreach collection="teamEvaBeanList" item="user" separator=" UNION ALL ">
SELECT #{user.evaLevel} AS "level", #{user.teamId} AS "team_id", #{userId} AS "user_id" FROM DUAL
</foreach>
SELECT
src_inner."level",
src_inner."team_id",
src_inner."user_id"
FROM (
-- 原 foreach 循环生成的多条记录(通过 UNION ALL 拼接)
<foreach collection="teamEvaBeanList" item="user" separator=" UNION ALL ">
SELECT
#{user.evaLevel} AS "level", -- 评价等级,参数绑定
#{user.teamId} AS "team_id", -- 团队ID参数绑定
#{userId} AS "user_id" -- 评价用户ID参数绑定
FROM DUAL -- 达梦支持 DUAL 虚拟表,用于生成单行数据
</foreach>
) src_inner
GROUP BY src_inner."team_id", src_inner."user_id", src_inner."level"
) src
ON (tgt."team_id" = src."team_id")
ON (tgt."team_id" = src."team_id" AND tgt."user_id" = src."user_id")
WHEN MATCHED THEN
UPDATE SET tgt."level" = src."level", tgt."user_id" = src."user_id"
UPDATE SET tgt."level" = src."level"
WHEN NOT MATCHED THEN
INSERT ("level","team_id","user_id") VALUES (src."level", src."team_id", src."user_id")
INSERT (
"level",
"team_id",
"user_id"
) VALUES (
src."level",
src."team_id",
src."user_id"
);
</insert>
<select id="list" resultType="com.bonus.bmw.subeva.entity.SubTeamEvaBean">

37
pom.xml
View File

@ -104,11 +104,11 @@
</dependency>
<!-- FastDFS 分布式文件系统 -->
<dependency>
<groupId>com.github.tobato</groupId>
<artifactId>fastdfs-client</artifactId>
<version>${tobato.version}</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.github.tobato</groupId>-->
<!-- <artifactId>fastdfs-client</artifactId>-->
<!-- <version>${tobato.version}</version>-->
<!-- </dependency>-->
<!-- Mybatis 依赖配置 -->
<dependency>
@ -361,9 +361,36 @@
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<!-- <profile>-->
<!-- <id>demeng-prod</id>-->
<!-- <properties>-->
<!-- <profiles.active>test</profiles.active>-->
<!-- <nacos.server>192.168.1.93:18848</nacos.server>-->
<!-- <name.space>dameng_real_name</name.space>-->
<!-- <nacos.username>nacos</nacos.username>-->
<!-- <nacos.password>Ynsbd@nacos251029!</nacos.password>-->
<!-- <version>demeng-prod</version>-->
<!-- </properties>-->
<!-- </profile>-->
<profile>
<id>dev-test(开发连测试环境-dameng_real_name)</id>
<properties>
<profiles.active>test</profiles.active>
<nacos.server>192.168.0.14:8848</nacos.server>
<name.space>dameng_real_name</name.space>
<nacos.username>nacos</nacos.username>
<nacos.password>nacos</nacos.password>
<version>dev_test</version>
</properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<!-- <profile>-->