| | |
| | | @ApiOperation(value = "确认服务", notes = "确认服务") |
| | | @PostMapping(value = "/confirmServiceOrder") |
| | | public AjaxResult confirmServiceOrder(@RequestBody @Validated IdSubmitDto idSubmitDto) { |
| | | SysProjServices services = new SysProjServices(); |
| | | services.setId(idSubmitDto.getId()); |
| | | services.setState(Dictionary.BEATUI_STATE_DYY); |
| | | int i = projServicesService.modify(services); |
| | | int i=projServicesService.confirmServiceOrder(idSubmitDto.getId()); |
| | | if (i > 0) { |
| | | //发送微信公众号提醒 |
| | | services=projServicesService.findById(services.getId()); |
| | | UniformMsgParam uniformMsgParam=new UniformMsgParam(services.getCompanyId(),UniformMsgParam.GZH_YYCG); |
| | | uniformMsgParam.put("serviceId",services.getId()); |
| | | asyncMessageManager.sendMsg(AsyncMessageRouting.SEND_UNIFORM_TEMPLATE_MSG ,uniformMsgParam); |
| | | |
| | | return AjaxResult.buildSuccessInstance("确认成功"); |
| | | } |
| | | return AjaxResult.buildFailInstance("确认失败"); |
| | |
| | | import com.matrix.core.tools.excl.ExcelSheetPO; |
| | | import com.matrix.core.tools.excl.ExcelUtil; |
| | | import com.matrix.core.tools.excl.ExcelVersion; |
| | | import com.matrix.system.app.dto.IdSubmitDto; |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | |
| | | import com.matrix.system.hive.bean.*; |
| | | import com.matrix.system.hive.dao.*; |
| | | import com.matrix.system.hive.service.*; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.ModelMap; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "确认服务", notes = "确认服务") |
| | | @PostMapping(value = "/confirmServiceOrder") |
| | | public @ResponseBody AjaxResult confirmServiceOrder(Long id) { |
| | | int i=sysProjServicesService.confirmServiceOrder(id); |
| | | if(i>0){ |
| | | return AjaxResult.buildSuccessInstance("确认成功"); |
| | | } |
| | | return AjaxResult.buildFailInstance("确认失败"); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * @author jiangyouyao |
| | |
| | | int findApiServiceOrderListTotal(ServiceOrderListDto serviceOrderListDto); |
| | | |
| | | public boolean skipServiceOrderStep(String step); |
| | | |
| | | /** |
| | | * 确认服务单 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | int confirmServiceOrder(Long id); |
| | | } |
| | |
| | | import com.matrix.component.asyncmessage.AsyncMessageManager; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.pojo.VerifyResult; |
| | | import com.matrix.core.tools.DateUtil; |
| | |
| | | |
| | | return flag; |
| | | } |
| | | |
| | | @Override |
| | | public int confirmServiceOrder(Long id) { |
| | | SysProjServices services = new SysProjServices(); |
| | | services.setId(id); |
| | | services.setState(Dictionary.BEATUI_STATE_DYY); |
| | | int i = modify(services); |
| | | if (i > 0) { |
| | | //发送微信公众号提醒 |
| | | services=findById(services.getId()); |
| | | UniformMsgParam uniformMsgParam=new UniformMsgParam(services.getCompanyId(),UniformMsgParam.GZH_YYCG); |
| | | uniformMsgParam.put("serviceId",services.getId()); |
| | | asyncMessageManager.sendMsg(AsyncMessageRouting.SEND_UNIFORM_TEMPLATE_MSG ,uniformMsgParam); |
| | | |
| | | } |
| | | return i; |
| | | } |
| | | } |
| | |
| | | public void handle(Map<String,Object> param){ |
| | | try { |
| | | |
| | | JSONObject messageJsonParam=JSONObject.parseObject(param.get("messages").toString()); |
| | | |
| | | if(!messageJsonParam.containsKey("companyId")||(!messageJsonParam.containsKey("templateCode"))){ |
| | | if(!param.containsKey("companyId")||(!param.containsKey("templateCode"))){ |
| | | LogUtil.error("小程序消息推送参数格式异常发送模板消息需要传JSONO字符串作为格式 例如:{\"companyId\":17,\"templateCode\":10000} companyId 、templateCode 是必须属性"); |
| | | return; |
| | | } |
| | | Long companyId = Long.parseLong( messageJsonParam.get("companyId").toString()); |
| | | Integer templateCode = Integer.parseInt( messageJsonParam.get("templateCode").toString()); |
| | | Long companyId = Long.parseLong( param.get("companyId").toString()); |
| | | Integer templateCode = Integer.parseInt( param.get("templateCode").toString()); |
| | | |
| | | //获取公司微信配置参数 |
| | | BusParameterSettings xcxAppId = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.MINIPROGRAM_APPID, companyId); |
| | |
| | | bulderParam.put("xcxAppId", xcxAppId.getParamValue()); |
| | | bulderParam.put("gzhAppid", gzhAppid.getParamValue()); |
| | | bulderParam.put("template_id", template.getUuid()); |
| | | bulderParam.put("messageJsonParam", messageJsonParam); |
| | | bulderParam.put("messageJsonParam", param); |
| | | //调用模板计算出消息体 |
| | | Map msgResult = templateMessageBulder.buildMsg(bulderParam); |
| | | |
| | |
| | | html +=btns[4].replace('VALUE',value); |
| | | html += btns[2].replace('VALUE',value); |
| | | break; |
| | | case '待确认': |
| | | html +=btns[7].replace('VALUE',value); |
| | | break; |
| | | } |
| | | html += btns[5].replace('VALUE',value); |
| | | html += btns[6].replace('VALUE',value); |
| | |
| | | |
| | | } |
| | | |
| | | function confirmServiceOrder(id) { |
| | | layer.confirm('确定确认订单吗?', { |
| | | btn: ['确认', '取消'] //可以无限个按钮 |
| | | }, function(index, layero){ |
| | | $.post(basePath+'/admin/projService/confirmServiceOrder?id='+id, {}, function(data){ |
| | | parent.layer.msg(data.info,{icon: 1}); |
| | | layer.closeAll(); |
| | | myGrid.serchData(); |
| | | }); |
| | | //按钮【按钮一】的回调 |
| | | }, function(index){ |
| | | // alert("2 = "+index); |
| | | //按钮【按钮二】的回调 |
| | | }); |
| | | |
| | | } |
| | | |
| | | |
| | | //打开查看界面 |
| | | function openEdit2() { |
| | | var id=myGrid.getSelectItemId(); |
| | |
| | | <script matrix:btn="serviceClub-edit"> |
| | | btns[6]='<a class="text-primary mr-5" onclick="updateTime(\'VALUE\')" title="修改时间"><i class="fa fa-edit">修改时间</i></a> ' |
| | | </script> |
| | | <script matrix:btn="serviceClub-edit"> |
| | | btns[7]='<a class="text-primary mr-5" onclick="confirmServiceOrder(\'VALUE\')" title="确认服务单"><i class="fa fa-edit">确认服务单</i></a> ' |
| | | </script> |
| | | |
| | | </html> |