|
|
@ -118,10 +118,10 @@ public class OperationTicketServiceImpl implements OperationTicketService { |
|
|
|
|
|
|
|
|
|
|
|
//获取站点编号
|
|
|
|
//获取站点编号
|
|
|
|
String signage = station.getSignage(); |
|
|
|
String signage = station.getSignage(); |
|
|
|
if (StringUtils.isBlank(signage) || signage.length() < 2) { |
|
|
|
if (StringUtils.isBlank(signage)) { |
|
|
|
throw new ServiceException("票据抬头未配置,请您到站点管理配置"); |
|
|
|
throw new ServiceException("票据抬头未配置,请您到站点管理配置"); |
|
|
|
} |
|
|
|
} |
|
|
|
signage = signage.length() == 2 ? station.getSignage() : station.getSignage().substring(0, 2); |
|
|
|
//signage = signage.length() == 2 ? station.getSignage() : station.getSignage().substring(0, 2);
|
|
|
|
|
|
|
|
|
|
|
|
standardTicketInfoVo.setSignage(signage); |
|
|
|
standardTicketInfoVo.setSignage(signage); |
|
|
|
standardTicketInfoVo.setSignageCode(station.getCode()); |
|
|
|
standardTicketInfoVo.setSignageCode(station.getCode()); |
|
|
@ -169,7 +169,8 @@ public class OperationTicketServiceImpl implements OperationTicketService { |
|
|
|
JSONObject jsonObject = JSONObject.parseObject(formData); |
|
|
|
JSONObject jsonObject = JSONObject.parseObject(formData); |
|
|
|
// standardTicketInfoVo = JSONObject.toJavaObject(jsonObject, StandardTicketInfoVo.class);
|
|
|
|
// standardTicketInfoVo = JSONObject.toJavaObject(jsonObject, StandardTicketInfoVo.class);
|
|
|
|
standardTicketInfoVo = JSONObject.parseObject(jsonObject.getString("standardTicketInfoVo"), |
|
|
|
standardTicketInfoVo = JSONObject.parseObject(jsonObject.getString("standardTicketInfoVo"), |
|
|
|
new TypeReference<StandardTicketInfoVo>(){}); |
|
|
|
new TypeReference<StandardTicketInfoVo>() { |
|
|
|
|
|
|
|
}); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("获取表单出现异常了~~~~"); |
|
|
|
log.error("获取表单出现异常了~~~~"); |
|
|
|
e.printStackTrace(); |
|
|
|
e.printStackTrace(); |
|
|
@ -401,10 +402,10 @@ public class OperationTicketServiceImpl implements OperationTicketService { |
|
|
|
result = "DZ"; |
|
|
|
result = "DZ"; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "4": |
|
|
|
case "4": |
|
|
|
result = type; |
|
|
|
result = "KJ"; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "5": |
|
|
|
case "5": |
|
|
|
result = type; |
|
|
|
result = "TJ"; |
|
|
|
break; |
|
|
|
break; |
|
|
|
default: |
|
|
|
default: |
|
|
|
result = "DZ"; |
|
|
|
result = "DZ"; |
|
|
@ -433,6 +434,11 @@ public class OperationTicketServiceImpl implements OperationTicketService { |
|
|
|
Map<String, Object> workTicketInfoMap = this.convertMap(standardTicketInfoVo); |
|
|
|
Map<String, Object> workTicketInfoMap = this.convertMap(standardTicketInfoVo); |
|
|
|
//导入下在word
|
|
|
|
//导入下在word
|
|
|
|
Map<String, Object> resultMap = OperationWordHelper.resultMap(workTicketInfoMap); |
|
|
|
Map<String, Object> resultMap = OperationWordHelper.resultMap(workTicketInfoMap); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String name = getBuilder(standardTicketInfoVo.getTicketType()); |
|
|
|
|
|
|
|
resultMap.put("headTitle", name); |
|
|
|
|
|
|
|
|
|
|
|
String workTicketStatus = OperationWordHelper.getWorkTicketStatus(status); |
|
|
|
String workTicketStatus = OperationWordHelper.getWorkTicketStatus(status); |
|
|
|
String os = TicketConstant.OS_NAME; |
|
|
|
String os = TicketConstant.OS_NAME; |
|
|
|
//Windows操作系统
|
|
|
|
//Windows操作系统
|
|
|
@ -453,6 +459,32 @@ public class OperationTicketServiceImpl implements OperationTicketService { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
|
|
|
|
* 获取操作票的名称 |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param ticketType |
|
|
|
|
|
|
|
* @return |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private String getBuilder(String ticketType) { |
|
|
|
|
|
|
|
String result = null; |
|
|
|
|
|
|
|
switch (ticketType) { |
|
|
|
|
|
|
|
case "3": |
|
|
|
|
|
|
|
result = "倒闸"; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case "4": |
|
|
|
|
|
|
|
result = "开机"; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case "5": |
|
|
|
|
|
|
|
result = "停机"; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
default: |
|
|
|
|
|
|
|
result = "倒闸"; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return result; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 将查询的数据转换为map |
|
|
|
* 将查询的数据转换为map |
|
|
|
* |
|
|
|
* |
|
|
|
* @param standardTicketInfoVo |
|
|
|
* @param standardTicketInfoVo |
|
|
|