package com.malk.pro.zyjn.controller; import com.malk.server.common.McR; import com.malk.pro.zyjn.service.TongbuService; import com.malk.service.dingtalk.DDClient_Schedule; import com.malk.utils.UtilMap; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; import java.util.Map; @RestController @RequestMapping("/tongbuservice") @CrossOrigin//解决跨域问题 public class TongbuController { @Autowired private TongbuService tongbuService; //宜搭创建会议纪要后同步创建钉钉日程 @PostMapping("createRicheng") public McR createRicheng(String data, String formInstId){ McR richeng = tongbuService.createRicheng(data, formInstId); return richeng; } //宜搭删除会议纪要后同步删除钉钉日程 @PostMapping("deleteRicheng") public McR deleteRicheng(String formInstId, String createUserId, String dingdingRichengID){ McR richeng = tongbuService.deleteRicheng(formInstId, createUserId, dingdingRichengID); return richeng; } //宜搭各部门指定参会人后更新钉钉日程 @PostMapping("/updateRicheng") public McR updateRicheng(@RequestBody Map map){ return tongbuService.updateRicheng(map); } //查询会议申请”汇总参会部门“ @PostMapping("/getUsersDepts") public McR getUsersDepts(@RequestBody Map map){ List userIds = (List) map.get("userIds"); List deptNames = (List) map.get("deptNames"); return tongbuService.getUsersDepts(userIds,deptNames); } //获取流程实例 @PostMapping("/query") public McR query(@RequestBody Map map){ String formUuid = UtilMap.getString(map,"formUuid"); Map conditions = (Map) map.get("conditions"); Map argument = (Map) map.get("argument"); int currentPage = UtilMap.getInt(map, "currentPage"); int pageSize = UtilMap.getInt(map, "pageSize"); return tongbuService.query(formUuid,conditions,argument,currentPage,pageSize); } @GetMapping("test") public McR test() { tongbuService.test(); // 已手动维护ID到宜搭档案 return McR.success(); } }