| | |
| | | import com.doumee.dao.system.model.Multifile; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.service.business.YwContractService; |
| | | import com.doumee.service.business.YwCustomerDeviceAutoBindService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | @Autowired |
| | | private YwCustomerDeviceAutoBindService ywCustomerDeviceAutoBindService; |
| | | @Override |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | | public Integer create(YwContract model) { |
| | |
| | | dealDetailListBiz(model,false);//处理条款信息 |
| | | dealMultifileBiz(model);//处理附件信息 |
| | | dealRoomsForContract(model);//处理房源关联表 |
| | | if (Constants.equalsInteger(model.getStatus(), Constants.ONE) && model.getRenterId() != null) { |
| | | ywCustomerDeviceAutoBindService.syncByContractId(model.getId(), model.getLoginUserInfo()); |
| | | } |
| | | dealLogBiz(model,Constants.YwLogType.CONTRACT_CREATE,model.getLoginUserInfo().getRealname(),"【"+model.getRemark().replace("合同摘要:","")+"】");//记录新建日志 |
| | | return model.getId(); |
| | | } |
| | |
| | | .in(YwRoom::getId,contractRoomList.stream().map(i->i.getRoomId()).collect(Collectors.toList())) |
| | | ); |
| | | } |
| | | LoginUserInfo timerUser = new LoginUserInfo(); |
| | | timerUser.setId(1); |
| | | timerUser.setRealname("timer"); |
| | | for (YwContract c : listA) { |
| | | if (c.getRenterId() != null) { |
| | | ywCustomerDeviceAutoBindService.syncByContractId(c.getId(), timerUser); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |