数据池修改字段名称,增加周期类型名称和周期值字段

This commit is contained in:
曹磊 2025-11-14 14:05:08 +08:00
parent 35e334d0b4
commit 30ab1a0c41
6 changed files with 38 additions and 20 deletions

View File

@ -13,6 +13,7 @@
a.pic as pic,
a.pic_focus as picFocus,
a.sys_org_code as sysOrgCode,
/* (case when ifnull(b.id,'') = '' then 'N' else 'Y' end) as izSelected*/
(case when ifnull(b.id,'') = '' then '0' else '1' end) as izSelected
from nu_config_elder_tag a
left join nu_biz_nu_customer_elder_tag b
@ -21,7 +22,7 @@
and b.customer_id = #{customerId}
where type = #{tagType}
and a.del_flag = '0'
and a.iz_enabled = '0'
and a.iz_enabled = 'Y'
</select>
</mapper>

View File

@ -125,6 +125,7 @@ public class NuBizNuCustomerServerServiceImpl extends ServiceImpl<NuBizNuCustome
// resMap.put("serviceList",allList);//服务指令计划
for (NuBizNuCustomerServer par : groupList) {
// if (par.getIzPackage().equals("Y")) {
if (par.getIzPackage().equals("1")) {
String directiveId = par.getDirectiveId();
if (directiveId != null && !directiveId.equals("")) {

View File

@ -61,7 +61,7 @@ public class DataPool implements Serializable {
/**指令包名称*/
private String packageName;
/**是否是服务指令包 0否 1是*/
/**是否是服务指令包 Y是 N否*/
private String izPackage;
/**开始时间*/

View File

@ -76,7 +76,7 @@ public class DataPoolSub implements Serializable {
private String packageId;
/**指令包名称*/
private String packageName;
/**是否是服务指令包 0否 1是*/
/**是否是服务指令包 Y是 N否*/
private String izPackage;
/**开始时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")

View File

@ -9,10 +9,14 @@
nu_name as nuName,
customer_id as customerId,
customer_name as customerName,
(case when iz_package = '1' then '' else directive_id end) as directiveId,
(case when iz_package = '1' then '' else directive_name end) as directiveName,
(case when iz_package = '1' then directive_id else '' end) as packageId,
(case when iz_package = '1' then directive_name else '' end) as packageName,
/* (case when iz_package = 'Y' then '' else directive_id end) as directiveId,
(case when iz_package = 'Y' then '' else directive_name end) as directiveName,
(case when iz_package = 'Y' then directive_id else '' end) as packageId,
(case when iz_package = 'Y' then directive_name else '' end) as packageName,*/
(case when iz_package = '1' then '' else directive_id end) as directiveId,
(case when iz_package = '1' then '' else directive_name end) as directiveName,
(case when iz_package = '1' then directive_id else '' end) as packageId,
(case when iz_package = '1' then directive_name else '' end) as packageName,
iz_package as izPackage,
CONCAT(CURDATE(), ' ',STR_TO_DATE(start_time, '%H:%i')) as startTime,
CONCAT(CURDATE(), ' ',STR_TO_DATE(end_time, '%H:%i')) as endTime,
@ -49,6 +53,10 @@
nu_name as nuName,
customer_id as customerId,
customer_name as customerName,
/* (case when iz_package = 'Y' then '' else directive_id end) as directiveId,
(case when iz_package = 'Y' then '' else directive_name end) as directiveName,
(case when iz_package = 'Y' then directive_id else '' end) as packageId,
(case when iz_package = 'Y' then directive_name else '' end) as packageName,*/
(case when iz_package = '1' then '' else directive_id end) as directiveId,
(case when iz_package = '1' then '' else directive_name end) as directiveName,
(case when iz_package = '1' then directive_id else '' end) as packageId,
@ -168,10 +176,10 @@
cycle_value varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周期值',
package_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令包ID',
package_name varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令包名称',
iz_package varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否是服务指令包 0否 1是',
iz_package varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否是服务指令包 Y是 N否',
start_time datetime(0) NULL DEFAULT NULL COMMENT '开始时间',
end_time datetime(0) NULL DEFAULT NULL COMMENT '结束时间',
iz_start varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '是否派发 0否 1是',
iz_start varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '是否开始 Y是 N否',
create_by varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
create_time datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
update_by varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
@ -209,7 +217,7 @@
service_content varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务说明',
package_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令包ID',
package_name varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务指令包名称',
iz_package varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否是服务指令包 0否 1是',
iz_package varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否是服务指令包 Y是 N否',
start_time datetime(0) NULL DEFAULT NULL COMMENT '开始时间',
end_time datetime(0) NULL DEFAULT NULL COMMENT '结束时间',
create_by varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',

View File

@ -75,9 +75,10 @@ public class DataPoolServiceImpl extends ServiceImpl<DataPoolMapper, DataPool> i
Date endTime = c.getTime();
if(dataTime.getTime()>=startTime.getTime()){
if(dataTime.getTime()<=endTime.getTime()){
dataPool.setIzStart("0");
dataPool.setIzStart("N");
dataPool.setDelFlag("0");
String izPackage = dataPool.getIzPackage();
// if(izPackage!=null&&izPackage.equals("Y")){
if(izPackage!=null&&izPackage.equals("1")){
addPackage(dataPool);
}else{
@ -167,6 +168,7 @@ public class DataPoolServiceImpl extends ServiceImpl<DataPoolMapper, DataPool> i
dataPoolSub.setCustomerName(dataPool.getCustomerName());
dataPoolSub.setStartTime(dataPool.getStartTime());
dataPoolSub.setEndTime(dataPool.getEndTime());
// dataPoolSub.setIzPackage("N");
dataPoolSub.setIzPackage("0");
dataPoolSub.setDelFlag(dataPool.getDelFlag());
dataPoolSub.setMainId(dataPool.getId());
@ -236,6 +238,7 @@ public class DataPoolServiceImpl extends ServiceImpl<DataPoolMapper, DataPool> i
dataPoolSub.setCustomerName(dataPool.getCustomerName());
dataPoolSub.setStartTime(dataPool.getStartTime());
dataPoolSub.setEndTime(dataPool.getEndTime());
// dataPoolSub.setIzPackage("Y");
dataPoolSub.setIzPackage("1");
dataPoolSub.setPackageId(dataPool.getPackageId());
dataPoolSub.setPackageName(dataPool.getPackageName());
@ -261,6 +264,7 @@ public class DataPoolServiceImpl extends ServiceImpl<DataPoolMapper, DataPool> i
dataPool.setCycleType(nuBizNuCustomerServer.getCycleType());
dataPool.setCycleValue(nuBizNuCustomerServer.getCycleValue());
dataPool.setIzPackage(nuBizNuCustomerServer.getIzPackage());
// if(nuBizNuCustomerServer.getIzPackage().equals("Y")){
if(nuBizNuCustomerServer.getIzPackage().equals("1")){
dataPool.setPackageId(nuBizNuCustomerServer.getDirectiveId());
dataPool.setPackageName(nuBizNuCustomerServer.getDirectiveName());
@ -269,8 +273,9 @@ public class DataPoolServiceImpl extends ServiceImpl<DataPoolMapper, DataPool> i
dataPool.setDirectiveName(nuBizNuCustomerServer.getDirectiveName());
}
String startTime = nuBizNuCustomerServer.getStartTime();
String hour = startTime.substring(0, 2);
String minute = startTime.substring(3, 5);
String[] starts = startTime.split(":");
String hour = starts[0];
String minute = starts[1];
Calendar c = Calendar.getInstance();
c.set(Calendar.HOUR_OF_DAY,Integer.valueOf(hour));
c.set(Calendar.MINUTE,Integer.valueOf(minute));
@ -278,8 +283,9 @@ public class DataPoolServiceImpl extends ServiceImpl<DataPoolMapper, DataPool> i
c.set(Calendar.MILLISECOND,0);
dataPool.setStartTime(c.getTime());
String endTime = nuBizNuCustomerServer.getEndTime();
hour = endTime.substring(0, 2);
minute = endTime.substring(3, 5);
String[] ends = endTime.split(":");
hour = ends[0];
minute = ends[1];
c.set(Calendar.HOUR_OF_DAY,Integer.valueOf(hour));
c.set(Calendar.MINUTE,Integer.valueOf(minute));
c.set(Calendar.SECOND,0);
@ -295,8 +301,9 @@ public class DataPoolServiceImpl extends ServiceImpl<DataPoolMapper, DataPool> i
@Override
public void deleteDataPool(NuBizNuCustomerServer nuBizNuCustomerServer) {
String startTime = nuBizNuCustomerServer.getStartTime();
String hour = startTime.substring(0, 2);
String minute = startTime.substring(3, 5);
String[] starts = startTime.split(":");
String hour = starts[0];
String minute = starts[1];
Calendar c = Calendar.getInstance();
c.set(Calendar.HOUR_OF_DAY,Integer.valueOf(hour));
c.set(Calendar.MINUTE,Integer.valueOf(minute));
@ -307,8 +314,9 @@ public class DataPoolServiceImpl extends ServiceImpl<DataPoolMapper, DataPool> i
dataPool.setNuId(nuBizNuCustomerServer.getNuId());
dataPool.setCustomerId(nuBizNuCustomerServer.getCustomerId());
dataPool.setStartTime(c.getTime());
dataPool.setIzStart("0");
dataPool.setIzStart("N");
String izPackage = nuBizNuCustomerServer.getIzPackage();
// if(izPackage.equals("Y")){
if(izPackage.equals("1")){
dataPool.setPackageId(nuBizNuCustomerServer.getDirectiveId());
}else{
@ -434,8 +442,8 @@ public class DataPoolServiceImpl extends ServiceImpl<DataPoolMapper, DataPool> i
c.add(Calendar.MINUTE,Integer.valueOf(serviceDuration));
dataPool.setEndTime(c.getTime());
dataPool.setCycleTypeId("3");
dataPool.setIzPackage("0");
dataPool.setIzStart("0");
dataPool.setIzPackage("N");
dataPool.setIzStart("N");
dataPool.setDelFlag("0");
addDaily(dataPool);
return Result.OK();