|
@@ -1,11 +1,13 @@
|
|
|
package com.railway.business.catenary.service.impl;
|
|
package com.railway.business.catenary.service.impl;
|
|
|
|
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.railway.business.baseinfo.domain.BaseDeptStation;
|
|
import com.railway.business.baseinfo.domain.BaseDeptStation;
|
|
|
import com.railway.business.baseinfo.service.IBaseStationService;
|
|
import com.railway.business.baseinfo.service.IBaseStationService;
|
|
|
import com.railway.business.catenary.domain.BusJcab;
|
|
import com.railway.business.catenary.domain.BusJcab;
|
|
|
import com.railway.business.catenary.domain.vo.JcebQueryVo;
|
|
import com.railway.business.catenary.domain.vo.JcebQueryVo;
|
|
|
import com.railway.business.catenary.enums.JcebOrderFieldEnum;
|
|
import com.railway.business.catenary.enums.JcebOrderFieldEnum;
|
|
|
import com.railway.business.catenary.enums.JcebStatusEnum;
|
|
import com.railway.business.catenary.enums.JcebStatusEnum;
|
|
|
|
|
+import com.railway.business.catenary.enums.JcebTypeEnum;
|
|
|
import com.railway.business.catenary.enums.SortTypeEnum;
|
|
import com.railway.business.catenary.enums.SortTypeEnum;
|
|
|
import com.railway.business.catenary.util.JcebQueryUtil;
|
|
import com.railway.business.catenary.util.JcebQueryUtil;
|
|
|
import com.railway.business.push.service.IBusPushMsgService;
|
|
import com.railway.business.push.service.IBusPushMsgService;
|
|
@@ -125,11 +127,17 @@ public abstract class BusJcabServiceImpl {
|
|
|
*/
|
|
*/
|
|
|
protected void setSubmit(BusJcab jcab) {
|
|
protected void setSubmit(BusJcab jcab) {
|
|
|
jcab.setSubmitState(JcebStatusEnum.REPORTED.getCode());
|
|
jcab.setSubmitState(JcebStatusEnum.REPORTED.getCode());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 推送提交结果
|
|
|
|
|
+ */
|
|
|
|
|
+ protected void pushSubmit(BusJcab jcab) {
|
|
|
List<Long> leaderIds = stationService.getStationLeaderId(jcab.getDeptStationId());
|
|
List<Long> leaderIds = stationService.getStationLeaderId(jcab.getDeptStationId());
|
|
|
- String title = getJcebName() + "检查表需确认" ;
|
|
|
|
|
- String content = "有一条" + getJcebName() + "检查表需确认,请您及时处理";
|
|
|
|
|
|
|
+ String title = getJcebTypeEnum().getType() + "检查表需确认" ;
|
|
|
|
|
+ String content = "有一条" + getJcebTypeEnum().getType() + "检查表需确认,请您及时处理";
|
|
|
for(Long id : leaderIds){
|
|
for(Long id : leaderIds){
|
|
|
- busPushMsgService.create(id, title, content);
|
|
|
|
|
|
|
+ busPushMsgService.create(id, title, content, getPushParam(jcab));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -139,9 +147,9 @@ public abstract class BusJcabServiceImpl {
|
|
|
protected void setReject(BusJcab jcab) {
|
|
protected void setReject(BusJcab jcab) {
|
|
|
jcab.setConfirmUser(SecurityUtils.getUsername());
|
|
jcab.setConfirmUser(SecurityUtils.getUsername());
|
|
|
jcab.setSubmitState(JcebStatusEnum.RETURNED.getCode());
|
|
jcab.setSubmitState(JcebStatusEnum.RETURNED.getCode());
|
|
|
- String title = getJcebName() + "检查表被退回" ;
|
|
|
|
|
- String content = "您提交的" + getJcebName() + "检查表被退回,点击查看详情";
|
|
|
|
|
- busPushMsgService.create(jcab.getCreateBy(), title, content);
|
|
|
|
|
|
|
+ String title = getJcebTypeEnum().getType() + "检查表被退回" ;
|
|
|
|
|
+ String content = "您提交的" + getJcebTypeEnum().getType() + "检查表被退回,点击查看详情";
|
|
|
|
|
+ busPushMsgService.create(jcab.getCreateBy(), title, content, getPushParam(jcab));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -150,15 +158,22 @@ public abstract class BusJcabServiceImpl {
|
|
|
protected void setConfirm(BusJcab jcab) {
|
|
protected void setConfirm(BusJcab jcab) {
|
|
|
jcab.setConfirmUser(SecurityUtils.getUsername());
|
|
jcab.setConfirmUser(SecurityUtils.getUsername());
|
|
|
jcab.setSubmitState(JcebStatusEnum.COMPLETED.getCode());
|
|
jcab.setSubmitState(JcebStatusEnum.COMPLETED.getCode());
|
|
|
- String title = getJcebName() + "检查表已确认" ;
|
|
|
|
|
- String content = "您提交的" + getJcebName() + "检查表已确认,点击查看详情";
|
|
|
|
|
- busPushMsgService.create(jcab.getCreateBy(), title, content);
|
|
|
|
|
|
|
+ String title = getJcebTypeEnum().getType() + "检查表已确认" ;
|
|
|
|
|
+ String content = "您提交的" + getJcebTypeEnum().getType() + "检查表已确认,点击查看详情";
|
|
|
|
|
+ busPushMsgService.create(jcab.getCreateBy(), title, content, getPushParam(jcab));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ protected String getPushParam(BusJcab jcab){
|
|
|
|
|
+ JSONObject json = new JSONObject();
|
|
|
|
|
+ json.put("type", getJcebTypeEnum().getCode());
|
|
|
|
|
+ json.put("id", jcab.getId());
|
|
|
|
|
+ return json.toJSONString();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 获取检查表类型名
|
|
* 获取检查表类型名
|
|
|
* @return 类型名
|
|
* @return 类型名
|
|
|
*/
|
|
*/
|
|
|
- abstract String getJcebName();
|
|
|
|
|
|
|
+ abstract JcebTypeEnum getJcebTypeEnum();
|
|
|
|
|
|
|
|
}
|
|
}
|