GAT專案新需求:保險管理修改
1.需求:
2.原表
3.現表
4.SQL語句:
--刪除欄位
ALTER TABLE CAR_SECURE DROP COLUMN SECURE_ACC_NO
ALTER TABLE CAR_SECURE DROP COLUMN SECURE_ACC_PAY
ALTER TABLE CAR_SECURE DROP COLUMN SECURE_NUM
5.程式碼修改:
新增時輸入車牌號查詢,帶出發動機號和車架號:
/**
* 查詢車輛基本資訊(根據車牌號碼,主要查出車型和使用部門)
* 後面增加了查詢帶出車架號和發動機號
*/
@RequestMapping(value = "/queryByHostNo/{hostNo}", method = RequestMethod.GET)
@ResponseBody
public BaseResp queryByHostNo(@PathVariable String hostNo){
AbstractRequestExecutor executor = new AbstractRequestExecutor("請求訪問車輛基本資訊查詢介面", "query host detail"){
@Override
protected DetailResp queryDetail(String hostNo) throws Exception{
return carDealEtcService.queryByHostNo(hostNo);
}
};
return executor.executeQueryDetail(hostNo);
}
DetailResp queryByHostNo(String hostNo) throws Exception;
@Override
public DetailResp queryByHostNo(String hostNo) throws Exception {
DetailResp resp = new DetailResp();
PositionHostInfo phiResp = hostManagerDAO.queryByHostNo(hostNo);
//根據hostid查出車型
PositionHostInfoExtend phieResp = null;
if(Util.isNotEmpty(phiResp)){
phieResp = hostManagerDAO.getVehicleModel(phiResp.getHostid());
}
PositionHostInfoExtendTwo pt = new PositionHostInfoExtendTwo();
if(Util.isNotEmpty(phiResp)){
pt.setAppdeptid(phiResp.getAppdeptid());
pt.setAppsysid(phiResp.getAppsysid());
}
if(Util.isNotEmpty(phieResp)){
//車型
pt.setVehicleModel(phieResp.getVehicleModel());
//車架號
pt.setHostVin(phieResp.getHostVin());
//發動機
pt.setEngineId(phieResp.getEngineId());
}
if(Util.isEmpty(pt)){
resp.setRetCode(Constant.DATA_NOT_EXIST);
resp.setRetMsg("查詢不到資料,查詢操作中止");
return resp;
}
//翻譯字典項
DictionaryUtil.translate(pt);
resp.setRetCode(Constant.RETURN_SUCCESS);
resp.setRetMsg("查詢操作成功");
resp.setDetail(pt);
return resp;
}
列表中要顯示發動機號和車架號:
新增、修改、匯入都比較類似:
CarSecureInfo:實體類中注掉不需要的欄位
對映檔案:
CarSecureListResp:
PositionHostInfoExtendTwo:查詢帶出發動機號和車架號
CarSecureEditReq:注掉不需要的欄位,用於新增和修改
測試OK:
select t.RECORD_ID as recordId,
t.HOST_ID as hostId,
t.HOST_NO as carHostNO,
t.SECURE_PAY as securePay,
p.HOST_VIN as hostVin,
p.ENGINE_ID as engineId,
po.APPSYSID as appSysId,
po.APPDEPTID as appDeptId,
t.SECURE_NO as secureNo,
to_char(t.SECURE_START_TIME, 'yyyy-MM-dd') as secureStartTime,
to_char(t.SECURE_END_TIME, 'yyyy-MM-dd') as secureEndTime,
t.SECURE_HANDLE as secureHandle,
t.SECURE_TAX as secureTax,
t.SECURE_REMARK as secureRemark
from CAR_SECURE t, POSITION_HOST_INFO_EXTEND p, POSITION_HOST_INFO po
where t.host_id = p.hostid
and t.host_id = po.hostid
and ((po.appsysid, po.appdeptid) in
(select appsysid, appdeptid from table(get_subdept(-1, 2000, 0))))
order by t.UPDATE_TIME desc
============================================================================
查詢:
car/secure/list
{
"appSysId":"2009",
"appDeptId":"2",
"carHostNO":"蘇JF6772",
"startRow":0,
"maxSize":20
}
{
"retCode":1,
"retMsg":"操作成功",
"list":[
{
"recordId":"20170323140314738012734",
"appSysId":2009,
"appDeptId":2,
"orgDeptName":"鹽城供電公司_響水供電公司",
"carHostNO":"蘇JF6772",
"secureNo":"AAA",
"secureStartTime":"2016-11-01",
"secureEndTime":"2016-11-02",
"secureHandle":"啊哈哈的",
"securePay":0.05,
"secureTax":0,
"secureRemark":"詹姆斯3",
"engineId":"826197X",
"hostVin":"L_2JNMFE2G5EN101417"
},
{
"recordId":"20170323134019153013137",
"appSysId":2009,
"appDeptId":2,
"orgDeptName":"鹽城供電公司_響水供電公司",
"carHostNO":"蘇JF6772",
"secureNo":"AAA",
"secureStartTime":"2016-11-01",
"secureEndTime":"2016-11-02",
"secureHandle":"啊哈哈的",
"securePay":102.24,
"secureTax":452.23,
"secureRemark":"詹姆斯2",
"engineId":"826197X",
"hostVin":"L_2JNMFE2G5EN101417"
},
{
"recordId":"20170323133627911014404",
"appSysId":2009,
"appDeptId":2,
"orgDeptName":"鹽城供電公司_響水供電公司",
"carHostNO":"蘇JF6772",
"secureNo":"AAA",
"secureStartTime":"2016-11-01",
"secureEndTime":"2016-11-02",
"secureHandle":"啊哈哈的",
"securePay":102,
"secureTax":452,
"secureRemark":"詹姆斯",
"engineId":"826197X",
"hostVin":"L_2JNMFE2G5EN101417"
},
{
"recordId":"20170320162514963019983",
"appSysId":2009,
"appDeptId":2,
"orgDeptName":"鹽城供電公司_響水供電公司",
"carHostNO":"蘇JF6772",
"secureNo":"AAA",
"secureStartTime":"2016-11-01",
"secureEndTime":"2016-11-02",
"secureHandle":"啊哈哈的",
"securePay":102,
"secureTax":452,
"secureRemark":"黃磊1",
"engineId":"826197X",
"hostVin":"L_2JNMFE2G5EN101417"
},
{
"recordId":"20170320145248466019516",
"appSysId":2009,
"appDeptId":2,
"orgDeptName":"鹽城供電公司_響水供電公司",
"carHostNO":"蘇JF6772",
"secureNo":"AAAA",
"secureStartTime":"2017-01-01",
"secureEndTime":"2017-02-01",
"secureHandle":"張三88",
"securePay":1000,
"secureTax":120,
"secureRemark":"啊哈哈",
"engineId":"826197X",
"hostVin":"L_2JNMFE2G5EN101417"
},
{
"recordId":"20170320145248968014513",
"appSysId":2009,
"appDeptId":2,
"orgDeptName":"鹽城供電公司_響水供電公司",
"carHostNO":"蘇JF6772",
"secureNo":"BBBB",
"secureStartTime":"2017-02-01",
"secureEndTime":"2017-03-01",
"secureHandle":"李四88",
"securePay":2000,
"secureTax":101,
"secureRemark":"額呵呵",
"engineId":"826197X",
"hostVin":"L_2JNMFE2G5EN101417"
}
],
"totalNum":6,
"curRecordNum":6,
"startRow":0,
"nextStartRow":6,
"orgDeptName":"鹽城供電公司_響水供電公司"
}
======================================================================
輸入車牌號查詢車型和使用單位介面和車架號、還有發動機號:
car/secure/queryByHostNo/hh1007
{
"retCode":1,
"retMsg":"查詢操作成功",
"detail":{
"appsysid":23551,
"appdeptid":6,
"orgDeptName":"警保部_財務處",
"vehicleModel":"轎車",
"engineId":"ss1",
"hostVin":"dd1"
}
}
======================================================================
新增:
car/secure/addCarSecure
{
"carHostNO":"蘇JF6772",
"secureNo":"abcdefg",
"secureStartTime":"2016-11-1",
"secureEndTime":"2016-11-2",
"secureHandle":"啊哈哈的",
"securePay":"20",
"secureTax":"30",
"secureRemark":"嘿嘿嘿"
}
{
"retCode":1,
"retMsg":"操作成功"
}
======================================================================
修改:
car/secure/modifyCarSecure
{
"recordId":"20170418100755826011594",
"carHostNO":"人a1003",
"secureNo":"AQWER2",
"secureStartTime":"2016-11-2",
"secureEndTime":"2016-11-3",
"secureHandle":"哈哈的2",
"securePay":"22",
"secureTax":"32",
"secureRemark":"嘿嘿嘿2"
}
{
"retCode":1,
"retMsg":"操作成功"
}
======================================================================
匯入:
car/secure/importRecords
[{
"carHostNO":"蘇JF6772",
"secureNo":"abcdefg",
"secureStartTime":"2016-11-1",
"secureEndTime":"2016-11-2",
"secureHandle":"啊哈哈的",
"securePay":"20",
"secureTax":"30",
"secureRemark":"嘿嘿嘿"
}]
{
"retCode":1,
"retMsg":"操作成功"
}
相關文章
- GAT專案新需求:加油管理修改
- GAT專案新需求:保險管理增加查詢統計(續)
- GAT專案新需求:保險管理增加查詢統計-傳日期引數問題
- GAT專案新需求:ETC管理增加查詢統計
- GAT保險模組的修改
- GAT專案-保險模組費用Double型別相加損失精度型別
- GAT專案新需求:車輛基本資訊查詢增加勾選不包含下級
- 哪些需求管理工具管理專案需求比較好?
- GWC和GAT專案搭建過程
- GAT專案前臺到後臺
- 需求管理之專案中如何更好的控制客戶需求
- PMP®|專案管理中需求管理做不好怎麼辦?專案管理
- 專案需求管理的五大過程
- 軟體專案管理 4.1.軟體需求管理過程專案管理
- 軟體專案管理 4.3.敏捷需求建模方法專案管理敏捷
- 用Rational工具管理中小專案需求與測試
- 新管理時代,如何制定專案管理計劃專案管理
- 專案部薪酬管理創新(轉)
- 淺談專案管理創新(轉)專案管理
- 電商發退貨後臺管理系統專案需求
- 專案管理中的需求變更分析和解決之道專案管理
- 專案管理中如何更好的控制客戶的需求?專案管理
- Web專案經理手冊之需求變更管理Web
- 軟體開發專案的需求管理簡述(Z)
- 解決GAT專案Bug:軌跡分析查詢不到資料
- 解決GAT專案Bug:ETC費用統計問題
- 如何避免軟體開發專案中的需求管理陷阱?
- 軟體專案需求調研過程管理小議(轉)
- 惠安惠達新需求-費用結算管理模組裡對起始里程進行修改
- 專案需求說明書
- 團隊專案需求分析
- 惠安惠達專案新需求:首頁增加待命車明細
- 【專案管理】人力資源管理之二:馬斯洛需求層次理論專案管理
- 研發管理案例-專案管理平臺-需求任務變更歷史分析專案管理
- MVC + EFCore 專案實戰 - 數倉管理系統4 – 需求分解MVC
- 專案範圍管理不受控,需求不斷蔓延,怎麼辦?
- 我在專案管理中關於需求分析的總結(轉)專案管理
- 新保險法與舊保險法區別