|
@@ -31,22 +31,19 @@ class RemainDay extends Command |
|
@@ -31,22 +31,19 @@ class RemainDay extends Command |
|
31
|
];//需要单独处理的项目
|
31
|
];//需要单独处理的项目
|
|
32
|
|
32
|
|
|
33
|
/**
|
33
|
/**
|
|
|
|
34
|
+ * @var int[]
|
|
|
|
35
|
+ * 按照达标天数收费的项目(白帽)
|
|
|
|
36
|
+ */
|
|
|
|
37
|
+ protected $bm_projectId = [
|
|
|
|
38
|
+ 4247,4299,4310,4215,4038,4084,4148
|
|
|
|
39
|
+ ];
|
|
|
|
40
|
+
|
|
|
|
41
|
+
|
|
|
|
42
|
+ /**
|
|
34
|
* @var 暂停的项目
|
43
|
* @var 暂停的项目
|
|
35
|
*/
|
44
|
*/
|
|
36
|
protected $ceaseProjectId = [
|
45
|
protected $ceaseProjectId = [
|
|
37
|
- 354,
|
|
|
|
38
|
- 378,
|
|
|
|
39
|
- 649,
|
|
|
|
40
|
- 1226,
|
|
|
|
41
|
- 1283,
|
|
|
|
42
|
- 1703,
|
|
|
|
43
|
- 1893,
|
|
|
|
44
|
- 2066,
|
|
|
|
45
|
- 2250,
|
|
|
|
46
|
- 2193,
|
|
|
|
47
|
- 2399,
|
|
|
|
48
|
- 1685,
|
|
|
|
49
|
- 3309
|
46
|
+ 354, 378, 649, 1226, 1283, 1703, 1893, 2066, 2250, 2193, 2399, 1685, 3309
|
|
50
|
];//需要单独处理的项目
|
47
|
];//需要单独处理的项目
|
|
51
|
/**
|
48
|
/**
|
|
52
|
* The console command description.
|
49
|
* The console command description.
|
|
@@ -123,11 +120,13 @@ class RemainDay extends Command |
|
@@ -123,11 +120,13 @@ class RemainDay extends Command |
|
123
|
//白帽版本的系统
|
120
|
//白帽版本的系统
|
|
124
|
if($deploy_build['seo_plan'] == 1){
|
121
|
if($deploy_build['seo_plan'] == 1){
|
|
125
|
if($deploy_build['seo_service_duration'] != 0){
|
122
|
if($deploy_build['seo_service_duration'] != 0){
|
|
126
|
- if($item['bm_finish_remain_day']){
|
|
|
|
127
|
- $compliance_day = (int)$item['bm_finish_remain_day'];
|
|
|
|
128
|
- $seo_remain_day = $deploy_build['seo_service_duration'] - $compliance_day;
|
123
|
+ if(in_array($item['id'],$this->bm_projectId)){
|
|
|
|
124
|
+ $seo_remain_day = $deploy_build['seo_service_duration'] - (int)$item['bm_finish_remain_day'];
|
|
129
|
}else{
|
125
|
}else{
|
|
130
|
- $seo_remain_day = $deploy_build['seo_service_duration'];
|
126
|
+ //按自然日统计
|
|
|
|
127
|
+ $diff = time() - strtotime($item['uptime']);
|
|
|
|
128
|
+ $compliance_day = floor($diff / (60 * 60 * 24));
|
|
|
|
129
|
+ $seo_remain_day = $deploy_build['service_duration'] - $compliance_day;
|
|
131
|
}
|
130
|
}
|
|
132
|
if($deploy_build['plan'] == 0 && $seo_remain_day < 0 && $deploy_build['seo_service_duration'] != 0){//只有白帽版本的项目且剩余服务时常为0,放入未续费中
|
131
|
if($deploy_build['plan'] == 0 && $seo_remain_day < 0 && $deploy_build['seo_service_duration'] != 0){//只有白帽版本的项目且剩余服务时常为0,放入未续费中
|
|
133
|
// $this->project->edit(['seo_remain_day'=>$seo_remain_day,'finish_remain_day'=>$compliance_day ?? 0,'extend_type'=>Project::TYPE_FIVE],['id'=>$item['id']]);
|
132
|
// $this->project->edit(['seo_remain_day'=>$seo_remain_day,'finish_remain_day'=>$compliance_day ?? 0,'extend_type'=>Project::TYPE_FIVE],['id'=>$item['id']]);
|