¶Ô±ÈÐÂÎļþ |
| | |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ddnoticeconfig:create', 'æ°å»ºééå
¬ä¼å·éç¥é
ç½®', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ddnoticeconfig:delete', 'å é¤ééå
¬ä¼å·éç¥é
ç½®', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ddnoticeconfig:update', 'ä¿®æ¹ééå
¬ä¼å·éç¥é
ç½®', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ddnoticeconfig:query', 'æ¥è¯¢ééå
¬ä¼å·éç¥é
ç½®', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ddnoticeconfig:exportExcel', '导åºééå
¬ä¼å·éç¥é
ç½®(Excel)', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.cloud.admin; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.annotation.CloudRequiredPermission; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.DdNoticeConfig; |
| | | import com.doumee.service.business.DdNoticeConfigService; |
| | | import com.doumee.service.business.third.model.ApiResponse; |
| | | import com.doumee.service.business.third.model.PageData; |
| | | import com.doumee.service.business.third.model.PageWrap; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/10/14 15:11 |
| | | */ |
| | | @Api(tags = "ééå
¬ä¼å·éç¥é
ç½®") |
| | | @RestController |
| | | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/business/ddNoticeConfig") |
| | | public class DdNoticeConfigCloudController extends BaseController { |
| | | |
| | | @Autowired |
| | | private DdNoticeConfigService ddNoticeConfigService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @CloudRequiredPermission("business:ddnoticeconfig:create") |
| | | public ApiResponse create(@RequestBody DdNoticeConfig ddNoticeConfig) { |
| | | return ApiResponse.success(ddNoticeConfigService.create(ddNoticeConfig)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @CloudRequiredPermission("business:ddnoticeconfig:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | ddNoticeConfigService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @CloudRequiredPermission("business:ddnoticeconfig:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | ddNoticeConfigService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @CloudRequiredPermission("business:ddnoticeconfig:update") |
| | | public ApiResponse updateById(@RequestBody DdNoticeConfig ddNoticeConfig) { |
| | | ddNoticeConfigService.updateById(ddNoticeConfig); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @CloudRequiredPermission("business:ddnoticeconfig:query") |
| | | public ApiResponse<PageData<DdNoticeConfig>> findPage (@RequestBody PageWrap<DdNoticeConfig> pageWrap) { |
| | | return ApiResponse.success(ddNoticeConfigService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @CloudRequiredPermission("business:ddnoticeconfig:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<DdNoticeConfig> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(DdNoticeConfig.class).export(ddNoticeConfigService.findPage(pageWrap).getRecords(), "ééå
¬ä¼å·éç¥é
ç½®", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @CloudRequiredPermission("business:ddnoticeconfig:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(ddNoticeConfigService.findById(id)); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation("æ¹éç¦å¯ç¨") |
| | | @GetMapping("/updateStatus/batch") |
| | | @CloudRequiredPermission("business:ddnoticeconfig:update") |
| | | public ApiResponse updateStatusBatch(@RequestParam String ids,@RequestParam Integer status) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | ddNoticeConfigService.updateStatusByIdInBatch(idList,status); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | public Boolean workInfoOANotice(Long agentId,String userIds,OapiMessageCorpconversationAsyncsendV2Request.Msg msg){ |
| | | try{ |
| | | if(CollectionUtils.isEmpty(msg)){ |
| | | return null; |
| | | } |
| | | DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/message/corpconversation/asyncsend_v2"); |
| | | OapiMessageCorpconversationAsyncsendV2Request request = new OapiMessageCorpconversationAsyncsendV2Request(); |
| | | request.setAgentId(agentId); |
| | |
| | | request.setToAllUser(false); |
| | | |
| | | request.setMsg(msg); |
| | | OapiMessageCorpconversationAsyncsendV2Response rsp = client.execute(request, "60c2df248ca93d4eafb4a04a2330d3d3");//getToken()); |
| | | OapiMessageCorpconversationAsyncsendV2Response rsp = client.execute(request, getToken()); |
| | | if(rsp.getErrcode().equals(Constants.DD_ERR_CODE)){ |
| | | return true; |
| | | }else{ |
| | |
| | | */ |
| | | public String toDoNotice(String title,List<String> unionIdList,List<CreateTodoTaskRequest.CreateTodoTaskRequestContentFieldList> fieldList,String url) { |
| | | try{ |
| | | if(CollectionUtils.isEmpty(fieldList)){ |
| | | return null; |
| | | } |
| | | com.aliyun.dingtalktodo_1_0.Client client = DingTalk.createV1Client(); |
| | | CreateTodoTaskHeaders createTodoTaskHeaders = new CreateTodoTaskHeaders(); |
| | | createTodoTaskHeaders.xAcsDingtalkAccessToken = getToken(); |
| | |
| | | .setTitle("å»å¤ç") |
| | | .setActionType(2) |
| | | .setParam(actionList0Param) |
| | | .setUrl("https://www.baidu.com") //TODO 详æ
å°å |
| | | .setUrl(url) //TODO 详æ
å°å |
| | | .setActionKey("ak-1-1"); |
| | | //详æ
页url跳转å°å |
| | | CreateTodoTaskRequest.CreateTodoTaskRequestDetailUrl detailUrl = new CreateTodoTaskRequest.CreateTodoTaskRequestDetailUrl() |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 访客æ¥å¤ä¸è®¿å®¢ç³è¯· ééå¾
å |
| | | * @param visits |
| | | * @return |
| | | */ |
| | | public List<CreateTodoTaskRequest.CreateTodoTaskRequestContentFieldList> getToDoVisitFiledInfo(Visits visits){ |
| | | List<CreateTodoTaskRequest.CreateTodoTaskRequestContentFieldList> list = new ArrayList<>(); |
| | | CreateTodoTaskRequest.CreateTodoTaskRequestContentFieldList contentFieldList0 = new CreateTodoTaskRequest.CreateTodoTaskRequestContentFieldList() |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * ç¨è½¦ç³è¯·ç ééå¾
å |
| | | * @param carUseBook |
| | | * @return |
| | | */ |
| | | public List<CreateTodoTaskRequest.CreateTodoTaskRequestContentFieldList> getToDoCarUseBookFiledInfo(CarUseBook carUseBook){ |
| | | List<CreateTodoTaskRequest.CreateTodoTaskRequestContentFieldList> list = new ArrayList<>(); |
| | | CreateTodoTaskRequest.CreateTodoTaskRequestContentFieldList contentFieldList1 = new CreateTodoTaskRequest.CreateTodoTaskRequestContentFieldList() |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.DdNoticeConfig; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/10/14 15:11 |
| | | */ |
| | | public interface DdNoticeConfigMapper extends MPJBaseMapper<DdNoticeConfig> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * ééå
¬ä¼å·éç¥é
ç½® |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/10/14 15:11 |
| | | */ |
| | | @Data |
| | | @ApiModel("ééå
¬ä¼å·éç¥é
ç½®") |
| | | @TableName("`dd_notice_config`") |
| | | public class DdNoticeConfig { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | | @ExcelColumn(name="主é®") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "å建人ç¼ç ") |
| | | @ExcelColumn(name="å建人ç¼ç ") |
| | | private String creator; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name="å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ") |
| | | @ExcelColumn(name="æ´æ°äººç¼ç ") |
| | | private String edirot; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @ExcelColumn(name="æ´æ°æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date editDate; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "1") |
| | | @ExcelColumn(name="æ¯å¦å é¤0å¦ 1æ¯") |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | @ExcelColumn(name="夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "å¼å¯ç¶æï¼0å¼å¯ï¼1å
³é", example = "1") |
| | | @ExcelColumn(name="å¼å¯ç¶æï¼0å¼å¯ï¼1å
³é") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "æ é¢") |
| | | @ExcelColumn(name="æ é¢") |
| | | private String titile; |
| | | |
| | | @ApiModelProperty(value = "ä¸å¡ç±»å 1=访客æäº¤è®¿å®¢ç³è¯·å¾
审æ¹äººè¿è¡å®¡æ¹ï¼2=访客æäº¤è®¿å®¢ç³è¯·å®¡æ¹éè¿ï¼éç¥è¢«è®¿äººï¼3=访客æäº¤è®¿å®¢ç³è¯·å®¡æ¹æç»ï¼éç¥è¢«è®¿äººï¼4=访客ç³è¯·å®¡æ¹éè¿ï¼éç¥æé人ï¼5=访客æ¥å¤å¾
审æ¹äººè¿è¡å®¡æ¹ï¼6=访客æ¥å¤å®¡æ¹éè¿ï¼éç¥å起人ï¼7=访客æ¥å¤å®¡æ¹æç»ï¼éç¥å起人ï¼8=访客æ¥å¤å®¡æ¹éè¿ï¼éç¥æé人ï¼9=å
¬å¡è½¦ç³è¯·ï¼éç¥å®¡æ¹äººï¼10=å
¬å¡è½¦ç³è¯·å®¡æ¹éè¿,éç¥å起人ï¼11=å
¬å¡è½¦ç³è¯·å®¡æ¹é©³å,éç¥å起人ï¼12=å
¬å¡è½¦ç³è¯·å®¡æ¹éè¿,éç¥æé人ï¼13=天æ°é¢è¦ï¼14=åºåäºä»¶éç¥ï¼", example = "1") |
| | | @ExcelColumn(name="ä¸å¡ç±»å 1=访客æäº¤è®¿å®¢ç³è¯·å¾
审æ¹äººè¿è¡å®¡æ¹ï¼2=访客æäº¤è®¿å®¢ç³è¯·å®¡æ¹éè¿ï¼éç¥è¢«è®¿äººï¼3=访客æäº¤è®¿å®¢ç³è¯·å®¡æ¹æç»ï¼éç¥è¢«è®¿äººï¼4=访客ç³è¯·å®¡æ¹éè¿ï¼éç¥æé人ï¼5=访客æ¥å¤å¾
审æ¹äººè¿è¡å®¡æ¹ï¼6=访客æ¥å¤å®¡æ¹éè¿ï¼éç¥å起人ï¼7=访客æ¥å¤å®¡æ¹æç»ï¼éç¥å起人ï¼8=访客æ¥å¤å®¡æ¹éè¿ï¼éç¥æé人ï¼9=å
¬å¡è½¦ç³è¯·ï¼éç¥å®¡æ¹äººï¼10=å
¬å¡è½¦ç³è¯·å®¡æ¹éè¿,éç¥å起人ï¼11=å
¬å¡è½¦ç³è¯·å®¡æ¹é©³å,éç¥å起人ï¼12=å
¬å¡è½¦ç³è¯·å®¡æ¹éè¿,éç¥æé人ï¼13=天æ°é¢è¦ï¼14=åºåäºä»¶éç¥ï¼") |
| | | private Integer objType; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.dao.business.model.DdNoticeConfig; |
| | | import com.doumee.service.business.third.model.PageData; |
| | | import com.doumee.service.business.third.model.PageWrap; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ééå
¬ä¼å·éç¥é
ç½®Serviceå®ä¹ |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/10/14 15:11 |
| | | */ |
| | | public interface DdNoticeConfigService { |
| | | |
| | | /** |
| | | * å建 |
| | | * |
| | | * @param ddNoticeConfig å®ä½å¯¹è±¡ |
| | | * @return Integer |
| | | */ |
| | | Integer create(DdNoticeConfig ddNoticeConfig); |
| | | |
| | | /** |
| | | * 主é®å é¤ |
| | | * |
| | | * @param id ä¸»é® |
| | | */ |
| | | void deleteById(Integer id); |
| | | |
| | | /** |
| | | * å é¤ |
| | | * |
| | | * @param ddNoticeConfig å®ä½å¯¹è±¡ |
| | | */ |
| | | void delete(DdNoticeConfig ddNoticeConfig); |
| | | |
| | | /** |
| | | * æ¹é主é®å é¤ |
| | | * |
| | | * @param ids 主é®é |
| | | */ |
| | | void deleteByIdInBatch(List<Integer> ids); |
| | | |
| | | /** |
| | | * 䏻鮿´æ° |
| | | * |
| | | * @param ddNoticeConfig å®ä½å¯¹è±¡ |
| | | */ |
| | | void updateById(DdNoticeConfig ddNoticeConfig); |
| | | |
| | | /** |
| | | * æ¹é䏻鮿´æ° |
| | | * |
| | | * @param ddNoticeConfigs å®ä½é |
| | | */ |
| | | void updateByIdInBatch(List<DdNoticeConfig> ddNoticeConfigs); |
| | | |
| | | /** |
| | | * 䏻鮿¥è¯¢ |
| | | * |
| | | * @param id ä¸»é® |
| | | * @return DdNoticeConfig |
| | | */ |
| | | DdNoticeConfig findById(Integer id); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢åæ¡è®°å½ |
| | | * |
| | | * @param ddNoticeConfig å®ä½å¯¹è±¡ |
| | | * @return DdNoticeConfig |
| | | */ |
| | | DdNoticeConfig findOne(DdNoticeConfig ddNoticeConfig); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢ |
| | | * |
| | | * @param ddNoticeConfig å®ä½å¯¹è±¡ |
| | | * @return List<DdNoticeConfig> |
| | | */ |
| | | List<DdNoticeConfig> findList(DdNoticeConfig ddNoticeConfig); |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param pageWrap å页对象 |
| | | * @return PageData<DdNoticeConfig> |
| | | */ |
| | | PageData<DdNoticeConfig> findPage(PageWrap<DdNoticeConfig> pageWrap); |
| | | |
| | | /** |
| | | * æ¡ä»¶ç»è®¡ |
| | | * |
| | | * @param ddNoticeConfig å®ä½å¯¹è±¡ |
| | | * @return long |
| | | */ |
| | | long count(DdNoticeConfig ddNoticeConfig); |
| | | |
| | | void updateStatusByIdInBatch(List<Integer> ids,Integer status); |
| | | } |
| | |
| | | @Autowired |
| | | private CarDriverMapper carDriverMapper; |
| | | |
| | | @Autowired |
| | | private DdNoticeConfigMapper ddNoticeConfigMapper; |
| | | |
| | | @Autowired |
| | | private VisitsJoinMapper visitsMapper; |
| | |
| | | if(CollectionUtils.isNotEmpty(erpId)){ |
| | | String ddTalkId = dingTalk.toDoNotice(StringUtils.isNotBlank(carUseBook.getMemberName())?(carUseBook.getMemberName()+"æäº¤çå
¬å¡ç¨è½¦ç³è¯·"):"å
¬å¡è½¦ç¨è½¦ç³è¯·", |
| | | erpId , |
| | | dingTalk.getToDoCarUseBookFiledInfo(carUseBook),"pages/staff/vehicle/sendACarDetail?id="+carUseBook.getId()); |
| | | ddNoticeConfigMapper.selectCount(new QueryWrapper<DdNoticeConfig>().lambda() |
| | | .eq(DdNoticeConfig::getIsdeleted,Constants.ZERO).eq(DdNoticeConfig::getStatus,Constants.ZERO) |
| | | .eq(DdNoticeConfig::getObjType,9))>Constants.ZERO? |
| | | dingTalk.getToDoCarUseBookFiledInfo(carUseBook):null,"pages/staff/vehicle/sendACarDetail?id="+carUseBook.getId()); |
| | | carUseBookMapper.update(new UpdateWrapper<CarUseBook>().lambda() |
| | | .set(CarUseBook::getDdBelongToUnionId,erpId.get(Constants.ZERO)) |
| | | .set(CarUseBook::getDdToDoId,ddTalkId).eq(CarUseBook::getId,carUseBook.getId())); |
| | |
| | | Visits visits = visitsMapper.selectById(businessId); |
| | | if (Objects.nonNull(visits)) { |
| | | //TODO 缺å°åååç¼å
容 |
| | | String ddTalkId = dingTalk.toDoNotice(visits.getName() + "ç访客ç³è¯·", |
| | | String ddTalkId = dingTalk.toDoNotice(visits.getName() + (Constants.equalsInteger(visits.getType(),Constants.TWO)?"ç访客æ¥å¤":"ç访客ç³è¯·"), |
| | | erpId, |
| | | dingTalk.getToDoVisitFiledInfo(visits), "pages/appointmentDetails/appointmentDetails?id=" + visits.getId()); |
| | | ddNoticeConfigMapper.selectCount(new QueryWrapper<DdNoticeConfig>().lambda() |
| | | .eq(DdNoticeConfig::getIsdeleted,Constants.ZERO).eq(DdNoticeConfig::getStatus,Constants.ZERO) |
| | | .eq(DdNoticeConfig::getObjType,Constants.equalsInteger(visits.getType(),Constants.TWO)?5:1))>Constants.ZERO? |
| | | dingTalk.getToDoVisitFiledInfo(visits):null, |
| | | "pages/appointmentDetails/appointmentDetails?id=" + visits.getId()); |
| | | visitsMapper.update(new UpdateWrapper<Visits>().lambda() |
| | | .set(Visits::getDdBelongToUnionId,erpId.get(Constants.ZERO)) |
| | | .set(Visits::getDdToDoId, ddTalkId).eq(Visits::getId, visits.getId())); |
| | |
| | | //TODO 缺å°åååç¼å
容 |
| | | String ddTalkId = dingTalk.toDoNotice(StringUtils.isNotBlank(carUseBook.getMemberName())?(carUseBook.getMemberName()+"æäº¤çå
¬å¡ç¨è½¦ç³è¯·"):"å
¬å¡è½¦ç¨è½¦ç³è¯·", |
| | | memberList.stream().map(i->i.getErpId()).collect(Collectors.toList()) , |
| | | dingTalk.getToDoCarUseBookFiledInfo(carUseBook),"pages/staff/vehicle/sendACarDetail?id="+carUseBook.getId()); |
| | | ddNoticeConfigMapper.selectCount(new QueryWrapper<DdNoticeConfig>().lambda() |
| | | .eq(DdNoticeConfig::getIsdeleted,Constants.ZERO).eq(DdNoticeConfig::getStatus,Constants.ZERO) |
| | | .eq(DdNoticeConfig::getObjType,9))>Constants.ZERO? |
| | | dingTalk.getToDoCarUseBookFiledInfo(carUseBook):null,"pages/staff/vehicle/sendACarDetail?id="+carUseBook.getId()); |
| | | carUseBookMapper.update(new UpdateWrapper<CarUseBook>().lambda() |
| | | .set(CarUseBook::getDdToDoId,ddTalkId).eq(CarUseBook::getId,carUseBook.getId())); |
| | | } |
| | |
| | | if(Objects.nonNull(beVisitMember)&&StringUtils.isNotBlank(beVisitMember.getDdId())){ |
| | | dingTalk.workInfoOANotice(Long.valueOf(systemDictDataBiz.queryByCode(Constants.DD_TALK,Constants.AGENT_ID).getCode()), |
| | | beVisitMember.getDdId(), |
| | | ddNoticeConfigMapper.selectCount(new QueryWrapper<DdNoticeConfig>().lambda() |
| | | .eq(DdNoticeConfig::getIsdeleted,Constants.ZERO).eq(DdNoticeConfig::getStatus,Constants.ZERO) |
| | | .eq(DdNoticeConfig::getObjType, Constants.equalsInteger(visits.getType(),Constants.TWO)?(Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)?6:7):(Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)?2:3)))>Constants.ZERO? |
| | | dingTalk.getVisitNoticeMsg(visits,visits.getName()+"ç"+(Constants.equalsInteger(visits.getType(),Constants.TWO)?"访客æ¥å¤":"访客ç³è¯·")+"ï¼"+ |
| | | (Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)? "已审æ¹éè¿":"已审æ¹é©³å")) |
| | | (Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)? "已审æ¹éè¿":"已审æ¹é©³å")):null |
| | | ); |
| | | } |
| | | } |
| | |
| | | if(Objects.nonNull(creatMember)&&StringUtils.isNotBlank(creatMember.getDdId())){ |
| | | dingTalk.workInfoOANotice(Long.valueOf(systemDictDataBiz.queryByCode(Constants.DD_TALK,Constants.AGENT_ID).getCode()), |
| | | creatMember.getErpId(), |
| | | ddNoticeConfigMapper.selectCount(new QueryWrapper<DdNoticeConfig>().lambda() |
| | | .eq(DdNoticeConfig::getIsdeleted,Constants.ZERO).eq(DdNoticeConfig::getStatus,Constants.ZERO) |
| | | .eq(DdNoticeConfig::getObjType,Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)?10:11))>Constants.ZERO? |
| | | dingTalk.getCarUseNoticeMsg(carUseBook,carUseBook.getMemberName() + "æäº¤çå
¬å¡ç¨è½¦ï¼"+ |
| | | (Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)? "已审æ¹éè¿":"已审æ¹é©³å")) |
| | | (Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)? "已审æ¹éè¿":"已审æ¹é©³å")):null |
| | | ); |
| | | } |
| | | if(StringUtils.isNotBlank(carUseBook.getDdBelongToUnionId()) |
| | |
| | | if(Objects.nonNull(visits)||Objects.nonNull(carUseBook)){ |
| | | dingTalk.workInfoOANotice(Long.valueOf(systemDictDataBiz.queryByCode(Constants.DD_TALK,Constants.AGENT_ID).getCode()), |
| | | StringUtils.join(memberList.stream().map(i->i.getDdId()).collect(Collectors.toList()),","), |
| | | ddNoticeConfigMapper.selectCount(new QueryWrapper<DdNoticeConfig>().lambda() |
| | | .eq(DdNoticeConfig::getIsdeleted,Constants.ZERO).eq(DdNoticeConfig::getStatus,Constants.ZERO) |
| | | .eq(DdNoticeConfig::getObjType, Objects.nonNull(visits)?(Constants.equalsInteger(visits.getType(),Constants.TWO)?8:4):12))>Constants.ZERO? |
| | | Objects.nonNull(visits)? |
| | | dingTalk.getVisitNoticeMsg(visits,visits.getName()+"ç"+(Constants.equalsInteger(visits.getType(),Constants.TWO)?"访客æ¥å¤":"访客ç³è¯·")+"ï¼æéç»æ¨ï¼è¯·ç¥æ"): |
| | | dingTalk.getCarUseNoticeMsg(carUseBook,carUseBook.getMemberName() + "æäº¤çå
¬å¡ç¨è½¦ï¼æéç»æ¨ï¼è¯·ç¥æ") |
| | | dingTalk.getCarUseNoticeMsg(carUseBook,carUseBook.getMemberName() + "æäº¤çå
¬å¡ç¨è½¦ï¼æéç»æ¨ï¼è¯·ç¥æ"):null |
| | | |
| | | |
| | | |
| | | ); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.DdNoticeConfigMapper; |
| | | import com.doumee.dao.business.model.DdNoticeConfig; |
| | | import com.doumee.dao.business.model.SmsConfig; |
| | | import com.doumee.service.business.DdNoticeConfigService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.doumee.service.business.third.model.PageData; |
| | | import com.doumee.service.business.third.model.PageWrap; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * ééå
¬ä¼å·éç¥é
ç½®Serviceå®ç° |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/10/14 15:11 |
| | | */ |
| | | @Service |
| | | public class DdNoticeConfigServiceImpl implements DdNoticeConfigService { |
| | | |
| | | @Autowired |
| | | private DdNoticeConfigMapper ddNoticeConfigMapper; |
| | | |
| | | @Override |
| | | public Integer create(DdNoticeConfig ddNoticeConfig) { |
| | | ddNoticeConfigMapper.insert(ddNoticeConfig); |
| | | return ddNoticeConfig.getId(); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteById(Integer id) { |
| | | ddNoticeConfigMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(DdNoticeConfig ddNoticeConfig) { |
| | | UpdateWrapper<DdNoticeConfig> deleteWrapper = new UpdateWrapper<>(ddNoticeConfig); |
| | | ddNoticeConfigMapper.delete(deleteWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByIdInBatch(List<Integer> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return; |
| | | } |
| | | ddNoticeConfigMapper.deleteBatchIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public void updateById(DdNoticeConfig ddNoticeConfig) { |
| | | ddNoticeConfigMapper.updateById(ddNoticeConfig); |
| | | } |
| | | |
| | | @Override |
| | | public void updateByIdInBatch(List<DdNoticeConfig> ddNoticeConfigs) { |
| | | if (CollectionUtils.isEmpty(ddNoticeConfigs)) { |
| | | return; |
| | | } |
| | | for (DdNoticeConfig ddNoticeConfig: ddNoticeConfigs) { |
| | | this.updateById(ddNoticeConfig); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public DdNoticeConfig findById(Integer id) { |
| | | return ddNoticeConfigMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public DdNoticeConfig findOne(DdNoticeConfig ddNoticeConfig) { |
| | | QueryWrapper<DdNoticeConfig> wrapper = new QueryWrapper<>(ddNoticeConfig); |
| | | return ddNoticeConfigMapper.selectOne(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<DdNoticeConfig> findList(DdNoticeConfig ddNoticeConfig) { |
| | | QueryWrapper<DdNoticeConfig> wrapper = new QueryWrapper<>(ddNoticeConfig); |
| | | return ddNoticeConfigMapper.selectList(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public PageData<DdNoticeConfig> findPage(PageWrap<DdNoticeConfig> pageWrap) { |
| | | IPage<DdNoticeConfig> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | QueryWrapper<DdNoticeConfig> queryWrapper = new QueryWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | queryWrapper.lambda().eq(DdNoticeConfig::getIsdeleted, Constants.ZERO); |
| | | return PageData.from(ddNoticeConfigMapper.selectPage(page, queryWrapper)); |
| | | } |
| | | |
| | | @Override |
| | | public long count(DdNoticeConfig ddNoticeConfig) { |
| | | QueryWrapper<DdNoticeConfig> wrapper = new QueryWrapper<>(ddNoticeConfig); |
| | | return ddNoticeConfigMapper.selectCount(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void updateStatusByIdInBatch(List<Integer> ids,Integer status) { |
| | | if (CollectionUtils.isEmpty(ids) || Objects.isNull(status)) { |
| | | return; |
| | | } |
| | | ddNoticeConfigMapper.update(new UpdateWrapper<DdNoticeConfig>() |
| | | .set("status",status) |
| | | .in("id",ids) |
| | | ); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | @Autowired |
| | | private DingTalk dingTalk; |
| | | |
| | | @Autowired |
| | | private DdNoticeConfigMapper ddNoticeConfigMapper; |
| | | |
| | | |
| | | @Override |
| | | public Integer create(HiddenDanger hiddenDanger) { |
| | |
| | | if(StringUtils.isNotBlank(member.getDdId())){ |
| | | dingTalk.workInfoOANotice(Long.valueOf(systemDictDataBiz.queryByCode(Constants.DD_TALK,Constants.AGENT_ID).getCode()), |
| | | member.getDdId(), |
| | | dingTalk.getHiddenDangerNoticeMsg(hiddenDanger)); |
| | | ddNoticeConfigMapper.selectCount(new QueryWrapper<DdNoticeConfig>().lambda() |
| | | .eq(DdNoticeConfig::getIsdeleted,Constants.ZERO).eq(DdNoticeConfig::getStatus,Constants.ZERO) |
| | | .eq(DdNoticeConfig::getObjType,14))>Constants.ZERO? |
| | | dingTalk.getHiddenDangerNoticeMsg(hiddenDanger):null); |
| | | } |
| | | |
| | | return hiddenDanger.getId(); |
| | |
| | | if(StringUtils.isNotBlank(member.getDdId())){ |
| | | dingTalk.workInfoOANotice(Long.valueOf(systemDictDataBiz.queryByCode(Constants.DD_TALK,Constants.AGENT_ID).getCode()), |
| | | member.getDdId(), |
| | | dingTalk.getHiddenDangerNoticeMsg(hiddenDanger)); |
| | | ddNoticeConfigMapper.selectCount(new QueryWrapper<DdNoticeConfig>().lambda() |
| | | .eq(DdNoticeConfig::getIsdeleted,Constants.ZERO).eq(DdNoticeConfig::getStatus,Constants.ZERO) |
| | | .eq(DdNoticeConfig::getObjType,14))>Constants.ZERO? |
| | | dingTalk.getHiddenDangerNoticeMsg(hiddenDanger):null); |
| | | } |
| | | |
| | | } |
| | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Autowired |
| | | private DdNoticeConfigMapper ddNoticeConfigMapper; |
| | | |
| | | |
| | | @Override |
| | | public Integer create(Warning warning) { |
| | |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(memberList)&&memberList.size()>Constants.ZERO){ |
| | | List<String> ddUserIdList = memberList.stream().map(j->j.getErpId()).collect(Collectors.toList()); |
| | | //å鿍éééæ¶æ¯ |
| | | |
| | | Boolean isSuccess = dingTalk.workInfoOANotice(Long.valueOf(systemDictDataBiz.queryByCode(Constants.DD_TALK,Constants.AGENT_ID).getCode()), |
| | | String.join(",",ddUserIdList), |
| | | dingTalk.getWeatherNoticeMsg(title,text)); |
| | | ddNoticeConfigMapper.selectCount(new QueryWrapper<DdNoticeConfig>().lambda() |
| | | .eq(DdNoticeConfig::getIsdeleted,Constants.ZERO).eq(DdNoticeConfig::getStatus,Constants.ZERO) |
| | | .eq(DdNoticeConfig::getObjType,13))>Constants.ZERO? |
| | | dingTalk.getWeatherNoticeMsg(title,text):null); |
| | | for (Member member:memberList) { |
| | | WarningPush warningPush = new WarningPush(); |
| | | warningPush.setCreateDate(new Date()); |