Browse Source

操作票修改

zhongwei
段飞宇 1 year ago
parent
commit
3281c30526
  1. 44
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/OperationTicketServiceImpl.java
  2. 4
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java
  3. BIN
      hzims-service/ticket/src/main/resources/template/电气操作票.docx

44
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/OperationTicketServiceImpl.java

@ -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

4
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java

@ -188,10 +188,10 @@ public class TicketProcessServiceImpl implements TicketProcessService {
//获取站点编号
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);
workTicketVo.getWorkTicket().setSignage(station.getSignage());
workTicketVo.getWorkTicket().setSignageCode(station.getCode());

BIN
hzims-service/ticket/src/main/resources/template/电气操作票.docx

Binary file not shown.
Loading…
Cancel
Save