信创改造
This commit is contained in:
+3
-3
@@ -80,15 +80,15 @@
|
||||
SELECT
|
||||
device_code,
|
||||
SUM(CASE
|
||||
WHEN YEARWEEK(exam_time, 1) = YEARWEEK(NOW(), 1) THEN 1
|
||||
WHEN TO_CHAR(exam_time, 'IYYY-IW') = TO_CHAR(SYSDATE, 'IYYY-IW') THEN 1
|
||||
ELSE 0
|
||||
END) AS week_count,
|
||||
SUM(CASE
|
||||
WHEN YEAR(exam_time) = YEAR(NOW()) AND MONTH(create_time) = MONTH(NOW()) THEN 1
|
||||
WHEN EXTRACT(YEAR FROM exam_time) = EXTRACT(YEAR FROM SYSDATE) AND EXTRACT(MONTH FROM create_time) = EXTRACT(MONTH FROM SYSDATE) THEN 1
|
||||
ELSE 0
|
||||
END) AS month_count,
|
||||
SUM(CASE
|
||||
WHEN YEAR(exam_time) = YEAR(NOW()) THEN 1
|
||||
WHEN EXTRACT(YEAR FROM exam_time) = EXTRACT(YEAR FROM SYSDATE) THEN 1
|
||||
ELSE 0
|
||||
END) AS year_count,
|
||||
COUNT(*) AS total_count
|
||||
|
||||
+16
-16
@@ -257,11 +257,11 @@ public class ArchivesBasePhysiqueServiceImpl implements ArchivesBasePhysiqueServ
|
||||
//周数据和月数据查询每天的平均值 , 年数据查询每月的记录值
|
||||
trendWrapper.selectAvg(column,PhysiqueDataCommonTrendVO.CommonTrend::getDataValue);
|
||||
if(4 == scope){
|
||||
trendWrapper.selectAs("DATE_FORMAT(create_time, '%Y-%m')",PhysiqueDataCommonTrendVO.CommonTrend::getTime);
|
||||
trendWrapper.groupBy("DATE_FORMAT(create_time, '%Y-%m')");
|
||||
trendWrapper.selectAs("TO_CHAR(create_time, 'YYYY-MM')",PhysiqueDataCommonTrendVO.CommonTrend::getTime);
|
||||
trendWrapper.groupBy("TO_CHAR(create_time, 'YYYY-MM')");
|
||||
}else {
|
||||
trendWrapper.selectAs("DATE_FORMAT(create_time, '%Y-%m-%d')",PhysiqueDataCommonTrendVO.CommonTrend::getTime);
|
||||
trendWrapper.groupBy("DATE_FORMAT(create_time, '%Y-%m-%d')");
|
||||
trendWrapper.selectAs("TO_CHAR(create_time, 'YYYY-MM-DD')",PhysiqueDataCommonTrendVO.CommonTrend::getTime);
|
||||
trendWrapper.groupBy("TO_CHAR(create_time, 'YYYY-MM-DD')");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -292,11 +292,11 @@ public class ArchivesBasePhysiqueServiceImpl implements ArchivesBasePhysiqueServ
|
||||
//周数据和月数据查询每天的平均值 , 年数据查询每月的记录值
|
||||
trendWrapper.selectAvg(UserDataRecordBmi::getWeight,PhysiqueDataCommonTrendVO.CommonTrend::getDataValue);
|
||||
if(4 == scope){
|
||||
trendWrapper.selectAs("DATE_FORMAT(data_date, '%Y-%m')",PhysiqueDataCommonTrendVO.CommonTrend::getTime);
|
||||
trendWrapper.groupBy("DATE_FORMAT(data_date, '%Y-%m')");
|
||||
trendWrapper.selectAs("TO_CHAR(data_date, 'YYYY-MM')",PhysiqueDataCommonTrendVO.CommonTrend::getTime);
|
||||
trendWrapper.groupBy("TO_CHAR(data_date, 'YYYY-MM')");
|
||||
}else {
|
||||
trendWrapper.selectAs("DATE_FORMAT(data_date, '%Y-%m-%d')",PhysiqueDataCommonTrendVO.CommonTrend::getTime);
|
||||
trendWrapper.groupBy("DATE_FORMAT(data_date, '%Y-%m-%d')");
|
||||
trendWrapper.selectAs("TO_CHAR(data_date, 'YYYY-MM-DD')",PhysiqueDataCommonTrendVO.CommonTrend::getTime);
|
||||
trendWrapper.groupBy("TO_CHAR(data_date, 'YYYY-MM-DD')");
|
||||
}
|
||||
}
|
||||
}else {
|
||||
@@ -313,11 +313,11 @@ public class ArchivesBasePhysiqueServiceImpl implements ArchivesBasePhysiqueServ
|
||||
//周数据和月数据查询每天的平均值 , 年数据查询每月的记录值
|
||||
trendWrapper.selectAvg(UserDataRecordBmi::getBmi,PhysiqueDataCommonTrendVO.CommonTrend::getDataValue);
|
||||
if(4 == scope){
|
||||
trendWrapper.selectAs("DATE_FORMAT(data_date, '%Y-%m')",PhysiqueDataCommonTrendVO.CommonTrend::getTime);
|
||||
trendWrapper.groupBy("DATE_FORMAT(data_date, '%Y-%m')");
|
||||
trendWrapper.selectAs("TO_CHAR(data_date, 'YYYY-MM')",PhysiqueDataCommonTrendVO.CommonTrend::getTime);
|
||||
trendWrapper.groupBy("TO_CHAR(data_date, 'YYYY-MM')");
|
||||
}else {
|
||||
trendWrapper.selectAs("DATE_FORMAT(data_date, '%Y-%m-%d')",PhysiqueDataCommonTrendVO.CommonTrend::getTime);
|
||||
trendWrapper.groupBy("DATE_FORMAT(data_date, '%Y-%m-%d')");
|
||||
trendWrapper.selectAs("TO_CHAR(data_date, 'YYYY-MM-DD')",PhysiqueDataCommonTrendVO.CommonTrend::getTime);
|
||||
trendWrapper.groupBy("TO_CHAR(data_date, 'YYYY-MM-DD')");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -372,11 +372,11 @@ public class ArchivesBasePhysiqueServiceImpl implements ArchivesBasePhysiqueServ
|
||||
trendWrapper.selectAvg(UserDataRecordBloodPressure::getDbp,PhysiqueDataBloodTrendVO.BloodTrend::getDbp);
|
||||
trendWrapper.selectAvg(UserDataRecordBloodPressure::getSbp,PhysiqueDataBloodTrendVO.BloodTrend::getSbp);
|
||||
if(4 == scope){
|
||||
trendWrapper.selectAs("DATE_FORMAT(create_time, '%Y-%m')",PhysiqueDataBloodTrendVO.BloodTrend::getTime);
|
||||
trendWrapper.groupBy("DATE_FORMAT(create_time, '%Y-%m')");
|
||||
trendWrapper.selectAs("TO_CHAR(create_time, 'YYYY-MM')",PhysiqueDataBloodTrendVO.BloodTrend::getTime);
|
||||
trendWrapper.groupBy("TO_CHAR(create_time, 'YYYY-MM')");
|
||||
}else {
|
||||
trendWrapper.selectAs("DATE_FORMAT(create_time, '%Y-%m-%d')",PhysiqueDataBloodTrendVO.BloodTrend::getTime);
|
||||
trendWrapper.groupBy("DATE_FORMAT(create_time, '%Y-%m-%d')");
|
||||
trendWrapper.selectAs("TO_CHAR(create_time, 'YYYY-MM-DD')",PhysiqueDataBloodTrendVO.BloodTrend::getTime);
|
||||
trendWrapper.groupBy("TO_CHAR(create_time, 'YYYY-MM-DD')");
|
||||
}
|
||||
List<PhysiqueDataBloodTrendVO.BloodTrend> dataList = recordBloodMapper.selectJoinList(PhysiqueDataBloodTrendVO.BloodTrend.class,trendWrapper);
|
||||
if(ObjectUtil.isNotEmpty(dataList)){
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ public class SysIosRedeem implements Serializable {
|
||||
/**
|
||||
* 使用状态 0-未使用 1-已使用
|
||||
*/
|
||||
@TableField(value = "`status`")
|
||||
@TableField(value = "status")
|
||||
@Schema(title = "使用状态 0-未使用 1-已使用")
|
||||
private Byte status;
|
||||
/**
|
||||
|
||||
+4
-4
@@ -328,7 +328,7 @@ public interface SysUserMapper extends BaseMapper<SysUser>, MPJBaseMapper<SysUse
|
||||
* 分组统计所有部门下的员工数量
|
||||
* @return 所有orgCode的统计人数数据
|
||||
*/
|
||||
@Select("SELECT org_code as orgCode,COUNT(1) as peopleNumber FROM `sys_user` where person_type =1 and del_flag = 0 and `status` =1 and org_code is not null GROUP BY org_code")
|
||||
@Select("SELECT org_code as orgCode,COUNT(1) as peopleNumber FROM sys_user where person_type =1 and del_flag = 0 and status =1 and org_code is not null GROUP BY org_code")
|
||||
List<OrgPeopleNumberVO> statisticOrgPeopleNumber();
|
||||
|
||||
/**
|
||||
@@ -336,7 +336,7 @@ public interface SysUserMapper extends BaseMapper<SysUser>, MPJBaseMapper<SysUse
|
||||
* @param orgCode 部门
|
||||
* @return 人数
|
||||
*/
|
||||
@Select("SELECT COUNT(1) FROM `sys_user` where person_type =1 and del_flag = 0 and `status` =1 and org_code is not null and org_code like concat(#{orgCode},'%')")
|
||||
@Select("SELECT COUNT(1) FROM sys_user where person_type =1 and del_flag = 0 and status =1 and org_code is not null and org_code like concat(#{orgCode},'%')")
|
||||
Long statisticPeopleNumberByOrgCode(@Param("orgCode") String orgCode);
|
||||
|
||||
/**
|
||||
@@ -346,8 +346,8 @@ public interface SysUserMapper extends BaseMapper<SysUser>, MPJBaseMapper<SysUse
|
||||
*/
|
||||
@Select("<script> " +
|
||||
"SELECT id as id,org_code as orgCode " +
|
||||
"FROM `sys_user` " +
|
||||
"where del_flag = 0 and `status` =1 and id in " +
|
||||
"FROM sys_user " +
|
||||
"where del_flag = 0 and status =1 and id in " +
|
||||
"<foreach item='item' index='index' collection='userIdSet' open='(' separator=',' close=')'> #{item} </foreach> " +
|
||||
"</script> ")
|
||||
@MapKey("id")
|
||||
|
||||
+3
@@ -1193,6 +1193,9 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
||||
String dbType = md.getDatabaseProductName().toLowerCase();
|
||||
if (dbType.indexOf(DataBaseConstant.DB_TYPE_MYSQL.toLowerCase()) >= 0) {
|
||||
DB_TYPE = DataBaseConstant.DB_TYPE_MYSQL;
|
||||
} else if (dbType.indexOf(DataBaseConstant.DB_TYPE_DM.toLowerCase()) >= 0) {
|
||||
// 达梦数据库:getDatabaseProductName() 返回 "DM DBMS"
|
||||
DB_TYPE = DataBaseConstant.DB_TYPE_DM;
|
||||
} else if (dbType.indexOf(DataBaseConstant.DB_TYPE_ORACLE.toLowerCase()) >= 0) {
|
||||
DB_TYPE = DataBaseConstant.DB_TYPE_ORACLE;
|
||||
} else if (dbType.indexOf(DataBaseConstant.DB_TYPE_SQLSERVER.toLowerCase()) >= 0 || dbType.indexOf(DataBaseConstant.DB_TYPE_SQL_SERVER_BLANK) >= 0) {
|
||||
|
||||
+1
-1
@@ -439,7 +439,7 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart
|
||||
LambdaQueryWrapper<SysUser> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(SysUser::getStatus, "1")
|
||||
.eq(SysUser::getDelFlag, "0")
|
||||
.apply("FIND_IN_SET({0}, depart_ids) > 0", departId);
|
||||
.apply("INSTR(',' || depart_ids || ',', ',' || {0} || ',') > 0", departId);
|
||||
|
||||
List<SysUser> sysUsers = sysUserMapper.selectList(queryWrapper);
|
||||
if (CollectionUtil.isEmpty(sysUsers)) {
|
||||
|
||||
Reference in New Issue
Block a user