|
|
|
@ -118,10 +118,10 @@ public class OperationTicketServiceImpl implements OperationTicketService {
|
|
|
|
|
|
|
|
|
|
//获取站点编号
|
|
|
|
|
String signage = station.getSignage(); |
|
|
|
|
if (StringUtils.isBlank(signage) || signage.length() < 2) { |
|
|
|
|
if (StringUtils.isBlank(signage)) { |
|
|
|
|
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.setSignageCode(station.getCode()); |
|
|
|
@ -168,8 +168,9 @@ public class OperationTicketServiceImpl implements OperationTicketService {
|
|
|
|
|
try { |
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(formData); |
|
|
|
|
// standardTicketInfoVo = JSONObject.toJavaObject(jsonObject, StandardTicketInfoVo.class);
|
|
|
|
|
standardTicketInfoVo = JSONObject.parseObject(jsonObject.getString("standardTicketInfoVo"), |
|
|
|
|
new TypeReference<StandardTicketInfoVo>(){}); |
|
|
|
|
standardTicketInfoVo = JSONObject.parseObject(jsonObject.getString("standardTicketInfoVo"), |
|
|
|
|
new TypeReference<StandardTicketInfoVo>() { |
|
|
|
|
}); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.error("获取表单出现异常了~~~~"); |
|
|
|
|
e.printStackTrace(); |
|
|
|
@ -401,10 +402,10 @@ public class OperationTicketServiceImpl implements OperationTicketService {
|
|
|
|
|
result = "DZ"; |
|
|
|
|
break; |
|
|
|
|
case "4": |
|
|
|
|
result = type; |
|
|
|
|
result = "KJ"; |
|
|
|
|
break; |
|
|
|
|
case "5": |
|
|
|
|
result = type; |
|
|
|
|
result = "TJ"; |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
result = "DZ"; |
|
|
|
@ -433,6 +434,11 @@ public class OperationTicketServiceImpl implements OperationTicketService {
|
|
|
|
|
Map<String, Object> workTicketInfoMap = this.convertMap(standardTicketInfoVo); |
|
|
|
|
//导入下在word
|
|
|
|
|
Map<String, Object> resultMap = OperationWordHelper.resultMap(workTicketInfoMap); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String name = getBuilder(standardTicketInfoVo.getTicketType()); |
|
|
|
|
resultMap.put("headTitle", name); |
|
|
|
|
|
|
|
|
|
String workTicketStatus = OperationWordHelper.getWorkTicketStatus(status); |
|
|
|
|
String os = TicketConstant.OS_NAME; |
|
|
|
|
//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 |
|
|
|
|
* |
|
|
|
|
* @param standardTicketInfoVo |
|
|
|
|