| | |
| | | model.setIsdeleted(Constants.ZERO); |
| | | model.setCreateDate(new Date()); |
| | | model.setStatus(Constants.ZERO); |
| | | model.setDealStatus(Constants.ZERO); |
| | | model.setEditDate(model.getCreateDate()); |
| | | model.setEditor(model.getCreator()); |
| | | ywWorkorderMapper.insert(model); |
| | |
| | | update.setDispatchUserId(update.getEditor()); |
| | | update.setDispatchDate(update.getEditDate()); |
| | | update.setDispatchInfo(ywWorkorder.getDispatchInfo()); |
| | | update.setDealUserId(ywWorkorder.getDealUserId()); |
| | | ywWorkorderMapper.updateById(update); |
| | | dealLogBiz(model,Constants.YwLogType.WORKORDER_DISPATCH,model.getLoginUserInfo().getRealname(),user.getRealname());//记录新建日志 |
| | | dealLogBiz(model,Constants.YwLogType.WORKORDER_DISPATCH,ywWorkorder.getLoginUserInfo().getRealname(),user.getRealname());//记录新建日志 |
| | | } |
| | | @Override |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | |
| | | update.setDealDate(update.getEditDate()); |
| | | update.setDealInfo(ywWorkorder.getDispatchInfo()); |
| | | ywWorkorderMapper.updateById(update); |
| | | dealLogBiz(model,Constants.YwLogType.WORKORDER_DEAL,model.getLoginUserInfo().getRealname(),null);//记录新建日志 |
| | | dealLogBiz(model,Constants.YwLogType.WORKORDER_DEAL,ywWorkorder.getLoginUserInfo().getRealname(),null);//记录新建日志 |
| | | } |
| | | @Override |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | |
| | | |
| | | @Override |
| | | public YwWorkorder findById(Integer id) { |
| | | MPJLambdaWrapper<YwWorkorder> wrapper = new MPJLambdaWrapper<>(); |
| | | wrapper.selectAll(YwWorkorder.class ) |
| | | .selectAs(SystemUser::getRealname,YwWorkorder::getDispatchUserName) |
| | | .select("t2.realname",YwWorkorder::getDealUserName) |
| | | MPJLambdaWrapper<YwWorkorder> queryWrapper = new MPJLambdaWrapper<>(); |
| | | queryWrapper.selectAll(YwWorkorder.class ) |
| | | .selectAs(SystemUser::getRealname,YwWorkorder::getDealUserName) |
| | | .select("t3.realname",YwWorkorder::getCreatorName) |
| | | .selectAs(SystemUser::getMobile,YwWorkorder::getCreatorPhone) |
| | | .selectAs(Company::getCompanyNamePath,YwWorkorder::getCreatorCompany) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,YwWorkorder::getDispatchUserId) |
| | | .selectAs(Category::getName,YwWorkorder::getCategoryName) |
| | | .selectAs(YwRoom::getName,YwWorkorder::getRoomName) |
| | | .selectAs(YwRoom::getRoomNum,YwWorkorder::getRoomNum) |
| | | .selectAs(YwFloor::getName,YwWorkorder::getFloorName) |
| | | .selectAs(YwBuilding::getName,YwWorkorder::getBuildingName) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,YwWorkorder::getDealUserId) |
| | | .leftJoin(Category.class,Category::getId,YwWorkorder::getCateId) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,YwWorkorder::getCreator) |
| | | .leftJoin(Company.class,Company::getId,SystemUser::getCompanyId) |
| | | .leftJoin(YwRoom.class,YwRoom::getId,YwWorkorder::getRoomId) |
| | | .leftJoin(YwFloor.class,YwFloor::getId,YwWorkorder::getFloorId) |
| | | .leftJoin(YwBuilding.class,YwBuilding::getId,YwWorkorder::getBuildingId) |
| | | .eq(YwWorkorder::getId,id); |
| | | YwWorkorder model = ywWorkorderMapper.selectJoinOne(YwWorkorder.class,wrapper); |
| | | YwWorkorder model = ywWorkorderMapper.selectJoinOne(YwWorkorder.class,queryWrapper); |
| | | initFiles(model);//读取附件信息 |
| | | YwWorkorderLog log = new YwWorkorderLog(); |
| | | log.setJobId(model.getId()); |