| | |
| | | import com.core.common.R; |
| | | import com.core.domain.KeyValueVo; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.crm.common.entity.PhoneCodeTypeParam; |
| | | import com.zy.crm.common.model.SettleDto; |
| | | import com.zy.crm.common.web.BaseController; |
| | | import com.zy.crm.manager.entity.*; |
| | |
| | | |
| | | @Autowired |
| | | private PriOnline2FollService priOnline2FollService; |
| | | |
| | | @Autowired |
| | | private SmsCodeService smsCodeService; |
| | | |
| | | String PZH = " ———————————————————————————————————————————————————————————————————————————————— "; |
| | | |
| | |
| | | priOnline2.setMemberId(getUserId()); |
| | | |
| | | Cstmr cstmr = cstmrService.selectById(plan.getCstmrId()); |
| | | priOnline2.setTemplateName(cstmr.getName()); //甲方单位名称 |
| | | priOnline2.setTemplateName(cstmr.getName()); //客户信息名称 |
| | | |
| | | priOnline2.setSettle(0); |
| | | |
| | |
| | | |
| | | if (user.getId().equals(priOnline2.getUserId())) { |
| | | if (priOnline2.getAssistantHostSign()==0){ |
| | | User manager = new User(); |
| | | try { |
| | | manager = userService.getDeptManager(getHostId(), getUser().getDeptId()); // 获取部门领导 |
| | | } catch (Exception e) { |
| | | manager = getUser(); |
| | | } |
| | | try { |
| | | priQuoteAdd(priOnline2.getId(), plannerId); |
| | | } catch (Exception e) { |
| | | return R.error("自动生成报价单失败"); |
| | | } |
| | | if (!smsCodeService.sendSmsCodeText(manager.getMobile(), PhoneCodeTypeParam.ALIYUN_M1ABAC630E)) { |
| | | return R.ok("审批成功但短信发送失败!"); |
| | | } |
| | | }else { |
| | | try { |
| | |
| | | return R.error("更新主表失败"); |
| | | } |
| | | } |
| | | |
| | | }else { |
| | | User phoneUser = userService.selectById(nextUserId); |
| | | if (!smsCodeService.sendSmsCodeText(phoneUser.getMobile(), PhoneCodeTypeParam.ALIYUN_M1ABAC630E)) { |
| | | return R.ok("审批成功但短信发送失败!"); |
| | | } |
| | | } |
| | | |
| | | return R.ok("审批成功"); |