配置:
问题描述:上次改好后可以实现新增,但是打印的时候还是不行,打印用的是查询明细的接口
如果用车人职务级别是手动输入的就显示手动输入的值,如果是字典项就对其翻译
vehUserJobList:
[{
ditId: 20151010094521480011042,
dicType: VD_VEH_USER_JOB,
itemValue: 1,
itemName: 部门领导,
itemNameSpell: BMLD,
orderId: 1,
parentId: -999,
flag: 1,
mark: null,
itemLevel: 1,
dicName: null,
parentDicName: null,
modDelFlag: 1,
extraMap: null
},
{
ditId: 20151010094717843017372,
dicType: VD_VEH_USER_JOB,
itemValue: 2,
itemName: 部门主任,
itemNameSpell: BMZR,
orderId: 2,
parentId: -999,
flag: 1,
mark: null,
itemLevel: 1,
dicName: null,
parentDicName: null,
modDelFlag: 1,
extraMap: null
},
{
ditId: 20151010094733946018262,
dicType: VD_VEH_USER_JOB,
itemValue: 3,
itemName: 处长,
itemNameSpell: CC,
orderId: 3,
parentId: -999,
flag: 1,
mark: null,
itemLevel: 1,
dicName: null,
parentDicName: null,
modDelFlag: 1,
extraMap: null
},
{
ditId: 20151010094752724011749,
dicType: VD_VEH_USER_JOB,
itemValue: 4,
itemName: 专职,
itemNameSpell: ZZ,
orderId: 4,
parentId: -999,
flag: 1,
mark: null,
itemLevel: 1,
dicName: null,
parentDicName: null,
modDelFlag: 1,
extraMap: null
},
{
ditId: 20151010094801446018108,
dicType: VD_VEH_USER_JOB,
itemValue: 5,
itemName: 普通,
itemNameSpell: PT,
orderId: 5,
parentId: -999,
flag: 1,
mark: null,
itemLevel: 1,
dicName: null,
parentDicName: null,
modDelFlag: 1,
extraMap: null
},
{
ditId: 20151010094813798017621,
dicType: VD_VEH_USER_JOB,
itemValue: 99,
itemName: 其他,
itemNameSpell: QT,
orderId: 99,
parentId: -999,
flag: 1,
mark: null,
itemLevel: 1,
dicName: null,
parentDicName: null,
modDelFlag: 1,
extraMap: null
}]
@Override
public VdVehUseApplyInfo getApplyInfo(String applyId) throws Exception{
VdVehUseApplyInfo applyInfo = vehUseApplyInfoDao.get(applyId);
validApplyInfoExist(applyInfo);
applyInfo.setDispatchers(vehUseApplyInfoDao.queryApplyDispatchers(applyId));
DictionaryUtil.translate(applyInfo);
MemoryTable mem = MemoryTable.getInstance();
List<DictionaryItem> vehUserJobList= mem.getDictionaryItem(DicTypeConst.VD_VEH_USER_JOB, Constant.DICT_NO_PARENT_ID);
String userJob = mem.getDicLable(vehUserJobList, applyInfo.getVehUserJob());
if("未知".equals(userJob)){//如果没有字典值,则userJob就为手动输入的值
userJob = applyInfo.getVehUserJob();
}
applyInfo.putExtraProperty("vehUserJobDesc", userJob);
return applyInfo;
}
测试:显示字典项部门主任和手动输入的值啊哈哈哈,OK~~~
{
submit: 0,
sendMessage: 0,
applyId: YCSQD_20170407_7,
leaderSign: null,
flowKey: vehApplyProcessSD,
flowName: 用车申请流程,
flowInstId: null,
flowExecutionId: null,
applyStatus: 0,
dispatchStatus: 1,
dispatchLockStatus: 0,
dispatchNote: null,
dispatcherId: null,
dispatcherName: null,
dispatchOperateTime: null,
applyListType: 1,
createUserId: 1,
createUserName: 超级管理员,
createOrgId: 2000,
createDeptId: 0,
createOrgDeptName: 顶级机构,
createTime: 2017-04-0714: 26: 59.0,
updateUserId: 1,
updateUserName: superuser,
updateOrgId: 2000,
updateDeptId: 0,
updateOrgDeptName: 顶级机构,
updateTime: 2017-04-0714: 26: 59.0,
dataVersion: null,
requiredDataVersion: null,
flowErrorStatus: 0,
hostVehType: 3,
dispatchers: [],
attachPath: null,
attachName: null,
attachData: null,
approveSuggestion: null,
vehUserId: 1,
vehUserName: 超级管理员,
vehUserPhone: 15366006274,
vehUserJob: 2,
vehUseOrgId: 2000,
vehUseDeptId: 0,
vehUseOrgDeptName: 顶级机构,
vehUseRange: null,
vehUsePlanNum: 1,
boundFlag: null,
beginUseTime: 2017-04-0814: 26: 40.0,
endUseTime: 2017-04-1214: 26: 42.0,
onVehAddr: 江苏省南京市鼓楼区石头城路5号,
onVehAddrLon: 118.753959,
onVehAddrLat: 32.051078,
destAddr: 江苏省南京市鼓楼区虎踞北路15号5幢,
destAddrLon: 118.751211,
destAddrLat: 32.063884,
coordConvert: false,
mapType: google,
vehUseType: null,
passengerNum: 1,
vehUseReason: ssssssssss,
remark: ,
hostId: null,
hostNo: null,
hostBrand: null,
hostColor: null,
hostPurpose: null,
hostVehType: 3,
hostUsageProperty: null,
hostRatedKg: null,
driverUserId: null,
driverName: null,
applyUserPhone: 15366006274,
driverPolitical: null,
driverSex: null,
driverAge: null,
driverDriveYear: null,
extraMap: {
vehUserJobDesc: 部门主任,
flowErrorStatusDesc: 正常,
applyStatusDesc: 未提交,
hostVehTypeDesc: 考斯特,
dispatchStatusDesc: 调度中,
dispatchLockStatusDesc: 未锁定
}
}
{
submit: 0,
sendMessage: 0,
applyId: YCSQD_20170407_8,
leaderSign: null,
flowKey: vehApplyProcessSD,
flowName: 用车申请流程,
flowInstId: null,
flowExecutionId: null,
applyStatus: 0,
dispatchStatus: 1,
dispatchLockStatus: 0,
dispatchNote: null,
dispatcherId: null,
dispatcherName: null,
dispatchOperateTime: null,
applyListType: 1,
createUserId: 1,
createUserName: 超级管理员,
createOrgId: 2000,
createDeptId: 0,
createOrgDeptName: 顶级机构,
createTime: 2017-04-0715: 14: 30.0,
updateUserId: 1,
updateUserName: superuser,
updateOrgId: 2000,
updateDeptId: 0,
updateOrgDeptName: 顶级机构,
updateTime: 2017-04-0715: 14: 30.0,
dataVersion: null,
requiredDataVersion: null,
flowErrorStatus: 0,
hostVehType: 3,
dispatchers: [],
attachPath: null,
attachName: null,
attachData: null,
approveSuggestion: null,
vehUserId: 1,
vehUserName: 超级管理员,
vehUserPhone: 15366006274,
vehUserJob: 啊哈哈哈,
vehUseOrgId: 2000,
vehUseDeptId: 0,
vehUseOrgDeptName: 顶级机构,
vehUseRange: null,
vehUsePlanNum: 1,
boundFlag: null,
beginUseTime: 2017-04-0815: 14: 12.0,
endUseTime: 2017-04-1115: 14: 16.0,
onVehAddr: 江苏省南京市浦口区康华路31号,
onVehAddrLon: 118.648377,
onVehAddrLat: 32.064023,
destAddr: 江苏省南京市玄武区农场巷120号,
destAddrLon: 118.813083,
destAddrLat: 32.056382,
coordConvert: false,
mapType: google,
vehUseType: null,
passengerNum: 1,
vehUseReason: sdafas,
remark: ,
hostId: null,
hostNo: null,
hostBrand: null,
hostColor: null,
hostPurpose: null,
hostVehType: 3,
hostUsageProperty: null,
hostRatedKg: null,
driverUserId: null,
driverName: null,
applyUserPhone: 15366006274,
driverPolitical: null,
driverSex: null,
driverAge: null,
driverDriveYear: null,
extraMap: {
flowErrorStatusDesc: 正常,
vehUserJobDesc: 啊哈哈哈,
applyStatusDesc: 未提交,
hostVehTypeDesc: 考斯特,
dispatchStatusDesc: 调度中,
dispatchLockStatusDesc: 未锁定
}
}