执法巡查开发状态总结

UML状态图

使用状态图,查漏补觉,梳理相关业务流程。 建议:优化流程,使用流程图(活动图)/时序图来完善流程

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
title 工作计划逻辑状态图

left header
1. ~~扫描事件动画处理~~
2. 巡查录入,执法权限验证进行执法
3. 筛选商业调试UI
4. 巡查年度列表
5. 配置平台组件
endheader
scale 600 width
[*]-->巡查录入
state 执法权限{
巡查录入-->巡查结果:id
巡查录入-->巡查类型:执法种类集合(type=5)
}
执法权限-->执法:可以执法

执法-->[*]
[*]-->商家查询
商家查询:商家列表数据(分页)
商家查询:过滤条件(重置/确定)
商家查询:门店巡查状态页
商家查询--> Model:传递storeId
state 门店巡查状态页{
state Model{
Model: 门店详情
Model: 门店巡查Model
Model: 巡查状态Model
}
}

门店巡查状态页-->年度巡查页
[*]-->门店地图
门店地图-->扫描二维码
扫描二维码--> Model:传递storeId
扫描二维码: 1. 解析二维码地址获取storeId
扫描二维码: 2. 访问接口获取门店地图数据MapStoreModel
扫描二维码: 3. 定位门店位置动画之后,显示门店详情和大头针样式
年度巡查页-->[*]



center footer
结束
endfooter

uml活动图常用语法

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
start
:ClickServlet.handleRequest();
:new page;
if (Page.onSecurityCheck) then (true)
:Page.onInit();
if (isForward?) then (no)
:Process controls;
if (continue processing?) then (no)
stop
endif

if (isPost?) then (yes)
:Page.onPost();
else (no)
:Page.onGet();
endif
:Page.onRender();
endif
else (false)
endif

if (do redirect?) then (yes)
:redirect process;
else
if (do forward?) then (yes)
:Forward request;
else (no)
:Render page template;
endif
endif
stop
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
start
:ClickServlet.handleRequest();
:new page;
if (Page.onSecurityCheck) then (true)
:Page.onInit();
if (isForward?) then (no)
:Process controls;
if (continue processing?) then (no)
stop
endif

if (isPost?) then (yes)
:Page.onPost();
else (no)
:Page.onGet();
endif
:Page.onRender();
endif
else (false)
endif

if (do redirect?) then (yes)
:redirect process;
else
if (do forward?) then (yes)
:Forward request;
else (no)
:Render page template;
endif
endif
stop

title uml模型图题目支持MD center header 在此处添加标头 endheader start ‘开始’ ‘»»> 活动关系模块 支持嵌套,条件/循环/并行»»»’ if(环境条件) then (分流线名) :分支1活动; -[颜色]-> 线备注; note left 活动备注 end note elseif(分流线名) :分支2活动; else (分流线名) :分支3活动; endif

uml用例图常用语法

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
:Main Admin: as Admin
(Use the application) as (Use)

User -> (Start)
User --> (Use)

Admin ---> (Use)

note right of Admin : This is an example.

note right of (Use)
A note can also be on several lines
end note

note "This note is connected\nto several objects." as N2
(Start) .. N2
N2 .. (Use)

效果图

uml类图常用语法

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
class BaseClass
namespace net.dummy #DDDDDD {
.BaseClass <|-- Person
Meeting o-- Person
.BaseClass <|- Meeting
}
namespace net.foo {
net.dummy.Person <|- Person
.BaseClass <|-- Person
net.dummy.Meeting o-- Person
}
BaseClass <|-- net.unused.Person

效果图:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
class BaseClass
namespace net.dummy #DDDDDD {
.BaseClass <|-- Person
Meeting o-- Person
.BaseClass <|- Meeting
}
namespace net.foo {
net.dummy.Person <|- Person
.BaseClass <|-- Person
net.dummy.Meeting o-- Person
}
BaseClass <|-- net.unused.Person

title uml模型图题目支持MD center header 在此处添加标头 endheader

在Mac安装Fiddler

安装Mono

Mac下需要使用.Net编译后的程序,首先需要用到跨平台的方案Mono(现阶段微软已推出跨平台的方案.Net Core,不过暂时只支持控制台程序)。 下载地址

hexo博文置顶方法

修改 hero-generator-index 插件,把文件:node_modules/hexo-generator-index/lib/generator.js 内的代码替换为:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
'use strict';
var pagination = require('hexo-pagination');
module.exports = function(locals){
var config = this.config;
var posts = locals.posts;
    posts.data = posts.data.sort(function(a, b) {
            if(a.top && b.top) { // 两篇文章top都有定义
                if(a.top == b.top) return b.date - a.date; // 若top值一样则按照文章日期降序排
                else return b.top - a.top; // 否则按照top值降序排
            }
            else if(a.top && !b.top) { // 以下是只有一篇文章top有定义,那么将有top的排在前面(这里用异或操作居然不行233)
                return -1;
            }
            else if(!a.top && b.top) {
                return 1;
            }
            else return b.date - a.date; // 都没定义按照文章日期降序排
        });
    var paginationDir = config.pagination_dir || 'page';
    return pagination('', posts, {
        perPage: config.index_generator.per_page,
        layout: ['index', 'archive'],
        format: paginationDir + '/%d/',
        data: {
            __index: true
        }
    });
};

在文章中添加 top 值,数值越大文章越靠前:

+0800格式转NSDate

1
2
3
4
NSString *timstr = [resData objectForKey:@"Data"];
timstr = [timstr stringByReplacingOccurrencesOfString:@"/Date(" withString:@""];
timstr = [timstr stringByReplacingOccurrencesOfString:@"+0800)/" withString:@""];
model.time = [NSDate dateWithTimeIntervalSince1970:timstr.longLongValue/1000];

高德地图API使用

引入头文件

1
2
#import <AMapFoundationKit/AMapFoundationKit.h>
#import <AMapLocationKit/AMapLocationKit.h>

调用方法

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
NSString *strKey = @"2d8a96d668576584acebf2bab0ba0c08";//默认值
//配置里面取值
NSString *strBundleKey = [[NSBundle mainBundle] infoDictionary][@"IOSPostionkey"];
if (strBundleKey) {
    strKey = strBundleKey;
}
[AMapServices sharedServices].apiKey = strKey;

// 带逆地理信息的一次定位(返回坐标和地址信息)
self.GaodelocationManager = [[AMapLocationManager alloc] init];
[self.GaodelocationManager setDesiredAccuracy:kCLLocationAccuracyHundredMeters];
//   定位超时时间,最低2s,此处设置为2s
self.GaodelocationManager.locationTimeout =10;
//   逆地理请求超时时间,最低2s,此处设置为2s
self.GaodelocationManager.reGeocodeTimeout = 10;
//设置不允许系统暂停定位
[self.GaodelocationManager setPausesLocationUpdatesAutomatically:NO];
//    //设置允许在后台定位
//    [locationManager setAllowsBackgroundLocationUpdates:YES];
//设置允许连续定位逆地理
[self.GaodelocationManager setLocatingWithReGeocode:YES];
//    [locationManager setDelegate:self];
// [self.locationManager startUpdatingLocation];
//    // 带逆地理(返回坐标和地址信息)。将下面代码中的 YES 改成 NO ,则不会返回地址信息。
[self.GaodelocationManager requestLocationWithReGeocode:YES completionBlock:^(CLLocation *gaodeLocation, AMapLocationReGeocode *regeocode, NSError *error) {

    if (gaodeLocation==nil) {
        NSLog(@"高德没有返回地理位置,使用苹果官方定位经纬度");
        [self GetGISInfoByByLocationWithjingdu:jingdu AndWeidu:weidu];
        return ;
    }

    if (error)
    {
        NSLog(@"locError:{%ld - %@};", (long)error.code, error.localizedDescription);

        if (error.code == AMapLocationErrorLocateFailed)
        {
            NSLog(@"AMapLocationErrorLocateFailed高德没有返回地理位置,使用苹果官方定位经纬度");
            [self GetGISInfoByByLocationWithjingdu:jingdu AndWeidu:weidu];
            return;
        }
    }

    NSLog(@"使用高德location:%@", gaodeLocation);
    NSString * gaodeWeidu =  [NSString stringWithFormat:@"%.9f",gaodeLocation.coordinate.latitude];
    NSString * gaodeJingdu =  [NSString stringWithFormat:@"%.9f",gaodeLocation.coordinate.longitude];
    if (regeocode)
    {
        NSLog(@"reGeocode:%@", regeocode);
        self.theRealAdress = regeocode.formattedAddress;
    }
    [self GetGISInfoByByLocationWithjingdu:gaodeJingdu AndWeidu:gaodeWeidu];
}];

终端实现预览plantuml的插件

{% github weirongxu plantuml-previewer.vim bf4b3e5 width = 30% %}

安装依赖

1
2
3
Plug 'it-boyer/plantuml-syntax'  "plantuml语法高亮 Plug 'aklt/plantuml-syntax'
Plug 'tyru/open-browser.vim'
Plug 'weirongxu/plantuml-previewer.vim' "在线工具:http://sujoyu.github.io/plantuml-previewer/

Graphviz

下载地址