OA消息待办取消功能
This commit is contained in:
@@ -2717,4 +2717,44 @@ public class TodoTaskController extends BaseAction {
|
|||||||
// public List<BusProcessName> findProcessNameByPrcNum(@RequestBody String taskId) {
|
// public List<BusProcessName> findProcessNameByPrcNum(@RequestBody String taskId) {
|
||||||
// return iBusProcessNameService.findBusProcessNameForEnd(taskId);
|
// return iBusProcessNameService.findBusProcessNameForEnd(taskId);
|
||||||
// }
|
// }
|
||||||
|
//
|
||||||
|
@ApiOperation(value = "取消OA消息通知")
|
||||||
|
@PostMapping("/cancelOAInform")
|
||||||
|
public String cancelOAInform(@RequestParam("id") String id) {
|
||||||
|
//查询出当前数据
|
||||||
|
BusProcessName busProcessName = iBusProcessNameService.selectById(id);
|
||||||
|
//在mes字段中增添一个属性 用来关联是否oa提醒
|
||||||
|
String mes = busProcessName.getMes();
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(mes);
|
||||||
|
Map<String, Object> stringObjectMap = JsonUtil.objToMap(jsonObject);
|
||||||
|
stringObjectMap.put("oa_cancelOAInform","1");
|
||||||
|
String s = JSON.toJSONString(stringObjectMap);
|
||||||
|
iBusProcessNameService.updateById(busProcessName);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "我的待办任务列表速度优化项(首页OA提醒)")
|
||||||
|
@ApiImplicitParams({@ApiImplicitParam(name = "name", value = "名称"),
|
||||||
|
@ApiImplicitParam(name = "current", value = "当前页"),
|
||||||
|
@ApiImplicitParam(name = "size", value = "每页条数"),
|
||||||
|
@ApiImplicitParam(name = "userId", value = "用户Id")})
|
||||||
|
@PostMapping("/todoTaskListNewOAInform")
|
||||||
|
public List<BusProcessName> todoTaskListNewOAInform(@RequestBody TaskCommonQuery taskCommonQuery) {
|
||||||
|
// 创建查询对象
|
||||||
|
List<BusProcessName> busProcessNames=new ArrayList<>();
|
||||||
|
busProcessNames=iBusProcessNameService.todoTask(taskCommonQuery);
|
||||||
|
// 判断当前数据是否被取消OA提醒
|
||||||
|
for (BusProcessName data: busProcessNames){
|
||||||
|
String mes = data.getMes();
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(mes);
|
||||||
|
Map<String, Object> stringObjectMap = JsonUtil.objToMap(jsonObject);
|
||||||
|
Object oa_cancelOAInform = stringObjectMap.get("oa_cancelOAInform");
|
||||||
|
if(oa_cancelOAInform != null){
|
||||||
|
//证明取消oa提醒
|
||||||
|
busProcessNames.remove(data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return busProcessNames;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -24,4 +24,6 @@ public interface IBusProcessNameService extends IService<BusProcessName> {
|
|||||||
|
|
||||||
|
|
||||||
String delDB(List<String> id);
|
String delDB(List<String> id);
|
||||||
|
|
||||||
|
BusProcessName selectById(String id);
|
||||||
}
|
}
|
||||||
|
|||||||
+6
@@ -7,6 +7,7 @@ import com.ydw.bat.wkflow.business_main.datas.service.IBusProcessNameService;
|
|||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -43,4 +44,9 @@ public class BusProcessNameServiceImpl extends ServiceImpl<BusProcessNameMapper,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BusProcessName selectById(@RequestParam("id") String id) {
|
||||||
|
return busProcessNameMapper.selectById(id);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user