Browse Source

#检修工作票

zhongwei
yang_shj 3 weeks ago
parent
commit
e80cf0f825
  1. 3
      hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/accessTicket/dto/request/AccessTicketPageReqDTO.java
  2. 9
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/accessTicket/controller/AccessTicketController.java
  3. 3
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/accessTicket/mapper/AccessTicketMapper.xml
  4. 16
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/accessTicket/service/impl/AccessTicketServiceImpl.java

3
hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/accessTicket/dto/request/AccessTicketPageReqDTO.java

@ -19,4 +19,7 @@ public class AccessTicketPageReqDTO implements Serializable {
@ApiModelProperty("过滤未完成任务:false-全部任务 true-过滤未完成任务")
private Boolean isComplete;
@ApiModelProperty("创建用户ID")
private Long creator;
}

9
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/accessTicket/controller/AccessTicketController.java

@ -15,6 +15,7 @@ import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.system.user.entity.User;
import org.springframework.web.bind.annotation.*;
@ -75,6 +76,14 @@ public class AccessTicketController extends BladeController {
return R.data(accessTicketService.pageCondition(param,query));
}
@GetMapping("/archive")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "报单档案")
public R<IPage<AccessTicketPageRspDTO>> archive(AccessTicketPageReqDTO param,Query query) {
param.setCreator(AuthUtil.getUserId());
return R.data(accessTicketService.pageCondition(param,query));
}
@PostMapping("/detail")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "检修工作票详情信息")

3
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/accessTicket/mapper/AccessTicketMapper.xml

@ -15,6 +15,9 @@
<if test="param.isComplete != null and param.isComplete == true">
AND TASK_NAME = '流程结束'
</if>
<if test="param.creator != null">
AND CREATE_USER = #{param.creator}
</if>
</where>
ORDER BY CREATE_TIME DESC
</select>

16
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/accessTicket/service/impl/AccessTicketServiceImpl.java

@ -175,10 +175,12 @@ public class AccessTicketServiceImpl extends ServiceImpl<AccessTicketMapper, Acc
}
// 消息推送
String countent = "您有一条检修报单流程待处理!单据名称:".concat(DateUtil.format(entity.getCreateTime(),DateUtil.PATTERN_DATETIME) + "_" + entity.getDeviceName() + "_检修工作票")
.concat(",当前环节:")
.concat(processWorkFlowResponse.getTaskName());;
this.sendMessage(entity,processWorkFlowResponse.getUserId(),countent);
if(!"流程结束".equals(entity.getTaskName())){
String countent = "您有一条检修报单流程待处理!单据名称:".concat(DateUtil.format(entity.getCreateTime(),DateUtil.PATTERN_DATETIME) + "_" + entity.getDeviceName() + "_检修工作票")
.concat(",当前环节:")
.concat(processWorkFlowResponse.getTaskName());;
this.sendMessage(entity,processWorkFlowResponse.getUserId(),countent);
}
return this.updateById(entity);
}
@ -358,12 +360,12 @@ public class AccessTicketServiceImpl extends ServiceImpl<AccessTicketMapper, Acc
for (Dict dict : dicts){
if(StringUtils.isNotEmpty(access.getDangerous())){
if(access.getDangerous().contains(dict.getDictKey())){
dangerous.append(" ").append(dict.getDictValue());
dangerous.append(" ").append(dict.getDictValue());
}else{
dangerous.append(" ").append(dict.getDictValue());
dangerous.append(" ").append(dict.getDictValue());
}
}else{
dangerous.append(" ").append(dict.getDictValue());
dangerous.append(" ").append(dict.getDictValue());
}
}
params.setDangerous(dangerous.toString());

Loading…
Cancel
Save