GAT專案新需求:加油管理修改

ZHOU_VIP發表於2017-04-17

新需求:加油管理列表要帶付費方式,如果是加油卡,則顯示卡號,類似江蘇電力這樣的頁面


開發:

1.先增加資料庫CAR_OIL表欄位和註釋

alter table CAR_OIL ADD  OILCARD_NO VARCHAR2(100);

alter table CAR_OIL ADD  PAYTYPE NUMBER(2);

comment on column CAR_OIL.OILCARD_NO is '加油卡號';

comment on column CAR_OIL.PAYTYPE is '付費方式';

2.手動在DICTIONARY_TYPE表中新增字典型別:1:現金;2:加油卡


在頁面上新增字典:192.168.1.136:8093/sgat



檢視DICTIONARY_ITEM


匯出SQL語句:

insert into DICTIONARY_ITEM (DIT_ID, DIC_TYPE, ITEM_VALUE, ITEM_NAME, ITEM_NAME_SPELL, ORDER_ID, PARENT_ID, FLAG, MARK, ITEM_LEVEL, MOD_DEL_FLAG, ROWID)
values ('20170414111953357011386', 'PAYTYPE', '1', '現金', 'XJ', 1, '-999', '1', null, 1, 1, 'AAAYJGAAGAAHHVqAAb');

insert into DICTIONARY_ITEM (DIT_ID, DIC_TYPE, ITEM_VALUE, ITEM_NAME, ITEM_NAME_SPELL, ORDER_ID, PARENT_ID, FLAG, MARK, ITEM_LEVEL, MOD_DEL_FLAG, ROWID)
values ('20170414112032302018699', 'PAYTYPE', '2', '加油卡', 'JYK', 2, '-999', '1', null, 1, 1, 'AAAYJGAAGAAHHVqAAc');

--------------------------------------------------------------------------------------------------------------------------
3.在程式碼中新增字典


4.實體類


5.對映檔案:


6.CarOilEditReq:於新增編輯


7.CarOilListResp:於列表顯示


8.列表要顯示付費方式和加油卡卡號


9.修改新增程式碼,要新增加油卡表中已經存在的加油卡卡號



10.匯入Excel付費方式是必填項,填了加油卡要填加油卡號,現金則不填加油卡號程式碼中驗證:1:現金;2:加油卡


開發完成測試介面OK:


查詢:
car/oil/list

{
    "carHostNO":"15000",
    "startRow":0,
    "maxSize":20
}

{
    "retCode":1,
    "retMsg":"操作成功",
    "list":[
        {
            "recordId":"20170414162815565018900",
            "appSysId":23551,
            "appDeptId":6,
            "orgDeptName":"警保部_財務處",
            "carHostNO":"15000",
            "oilUseTime":"2016-10-31",
            "oilType":"1",
            "oilAccount":22,
            "oilPay":20,
            "oilAddress":"中山陵",
            "oilMileage":"100",
            "oilHandle":"啊哈哈的",
            "vehicleModel":"轎車",
            "oilcardNo":"22222222",
            "payType":2,
            "oilTypeDesc":"98#",
            "payTypeDesc":"加油卡"
        },
        {
            "recordId":"20170217135923927019191",
            "appSysId":23551,
            "appDeptId":6,
            "orgDeptName":"警保部_財務處",
            "carHostNO":"15000",
            "oilUseTime":"2017-01-01",
            "oilType":"1",
            "oilAccount":22,
            "oilPay":22,
            "oilAddress":"南京",
            "oilMileage":"22",
            "oilHandle":"李四217",
            "vehicleModel":"轎車",
            "payType":1,
            "oilTypeDesc":"98#",
            "payTypeDesc":"現金"
        },
        {
            "recordId":"20161130102253899019445",
            "appSysId":23551,
            "appDeptId":6,
            "orgDeptName":"警保部_財務處",
            "carHostNO":"15000",
            "oilUseTime":"2016-11-30",
            "oilType":"6",
            "oilAccount":22,
            "oilPay":22,
            "oilAddress":"南京",
            "oilMileage":"22",
            "oilHandle":"李四",
            "vehicleModel":"轎車",
            "payType":1,
            "oilTypeDesc":"90#",
            "payTypeDesc":"現金"
        }
    ],
    "totalNum":3,
    "curRecordNum":3,
    "startRow":0,
    "nextStartRow":3
}


新增:
car/oil/addCarOil

用加油卡卡號
{
        "carHostNO":"15000",
        "oilcardNo":"22222222",
        "payType":"2",
        "oilUseTime":"2016-10-31",
        "oilType":"1",
        "oilAccount":"22",
        "oilPay":"20",
        "oilAddress":"中山陵",
        "oilMileage":"100",
        "oilHandle":"啊哈哈的"
}

{
    "retCode":1,
    "retMsg":"操作成功"
}

用現金
{
        "carHostNO":"15000",
        "oilcardNo":"",
        "payType":"1",
        "oilUseTime":"2016-10-31",
        "oilType":"1",
        "oilAccount":"22",
        "oilPay":"20",
        "oilAddress":"快快快",
        "oilMileage":"100",
        "oilHandle":"哈哈哈"
}

{
    "retCode":1,
    "retMsg":"操作成功"
}


修改:
car/oil/modifyCarOil

用加油卡卡號
{
    "recordId":"20170417085938160010308",	
    "carHostNO":"15000",
    "oilcardNo":"22222222",
    "payType":"2",
    "oilUseTime":"2016-10-31",
    "oilType":"1",
    "oilAccount":"22",
    "oilPay":"20",
    "oilAddress":"中山陵1",
    "oilMileage":"100",
    "oilHandle":"啊哈哈的1"
}

{
    "retCode":1,
    "retMsg":"操作成功"
}

用現金
{
    "recordId":"20170417085938160010308",	
    "carHostNO":"15000",
    "payType":"1",
    "oilUseTime":"2016-10-31",
    "oilType":"1",
    "oilAccount":"22",
    "oilPay":"20",
    "oilAddress":"中山陵",
    "oilMileage":"100",
    "oilHandle":"啊哈哈的"
}

{
    "retCode":1,
    "retMsg":"操作成功"
}


匯入:
car/oil/importRecords

[{
    "lineNo":"2",
    "carHostNO":"15000",
    "oilcardNo":"22222222",
    "payType":"現金",
    "oilType":"1",
    "oilUseTime":"2016-10-31",
    "oilType":"1",
    "oilAccount":"22",
    "oilPay":"20",
    "oilAddress":"日日日",
    "oilMileage":"100",
    "oilHandle":"一樣一樣"

}
]

{
    "retCode":8193,
    "retMsg":"操作失敗:第2行不正確,付費方式為現金,不填加油卡卡號!"
}

[{
    "lineNo":"2",
    "carHostNO":"15000",
    "oilcardNo":"22222222",
    "payType":"加油卡",
    "oilUseTime":"2016-10-31",
    "oilType":"1",
    "oilAccount":"22",
    "oilPay":"20",
    "oilAddress":"日日日",
    "oilMileage":"100",
    "oilHandle":"一樣一樣"

}
]

{
    "retCode":1,
    "retMsg":"操作成功"
}



相關文章